diff --git a/erc-6551-accounts/package.json b/erc-6551-accounts/package.json index 0473760b..e7d792a8 100644 --- a/erc-6551-accounts/package.json +++ b/erc-6551-accounts/package.json @@ -4,7 +4,7 @@ "scripts": { "codegen": "graph codegen", "build": "graph build", - "deploy": "graph deploy --node https://api.studio.thegraph.com/deploy erc-6551-accounts-mainnet", + "deploy": "graph deploy --product hosted-service sharathkrml/erc6551-base", "create-local": "graph create --node https://api.studio.thegraph.com/deploy erc-6551-accounts-mainnet", "remove-local": "graph remove --node https://api.studio.thegraph.com/deploy erc-6551-accounts-mainnet", "deploy-local": "graph deploy --node https://api.studio.thegraph.com/deploy --ipfs https://api.thegraph.com/ipfs erc-6551-accounts-mainnet", diff --git a/erc-6551-accounts/src/common/index.ts b/erc-6551-accounts/src/common/index.ts index f7f57184..18349643 100644 --- a/erc-6551-accounts/src/common/index.ts +++ b/erc-6551-accounts/src/common/index.ts @@ -17,9 +17,9 @@ export const BIG_INT_ZERO = BigInt.fromI32(0); export const SUBGRAPH_SCHEMA_VERSION = "1.0.0"; -export const SUBGRAPH_NAME = "Mainnet ERC-6551"; +export const SUBGRAPH_NAME = "Base ERC-6551"; export const SUBGRAPH_VERSION = "v1"; -export const SUBGRAPH_SLUG = "mainnet-erc-6551"; +export const SUBGRAPH_SLUG = "base-erc-6551"; const AIR_CHAIN_ID_MAP = new TypedMap(); AIR_CHAIN_ID_MAP.set("arbitrum-one", "42161"); @@ -44,6 +44,7 @@ AIR_CHAIN_ID_MAP.set("optimism", "10"); AIR_CHAIN_ID_MAP.set("osmosis", "osmosis-1"); AIR_CHAIN_ID_MAP.set("matic", "137"); AIR_CHAIN_ID_MAP.set("gnosis", "100") +AIR_CHAIN_ID_MAP.set("base", "8453") export function getChainId(): string { const network = dataSource.network(); @@ -133,38 +134,3 @@ export function getOrCreateAirBlock( } return block as AirBlock; } - -/** - * @dev this function does not save the returned entity - * @dev this function gets or creates a new air account entity - * @param chainId chain id - * @param address account address - * @param block air block object - * @returns AirAccount entity - */ -export function getOrCreateAirAccount(chainId: string, address: string, block: AirBlock): AirAccount { - const id = chainId.concat("-").concat(address); - let entity = AirAccount.load(id); - if (entity == null) { - entity = new AirAccount(id); - entity.address = address; - entity.createdAt = block.id; - } - return entity as AirAccount; -} - -/** - * @dev this function does not save the returned entity - * @dev this function gets or creates a new air token entity - * @param chainID chain id - * @param address token address - * @returns AirToken entity - */ -export function getOrCreateAirToken(chainID: string, address: string): AirToken { - let entity = AirToken.load(chainID + "-" + address); - if (entity == null) { - entity = new AirToken(chainID + "-" + address); - entity.address = address; - } - return entity as AirToken; -} \ No newline at end of file diff --git a/erc-6551-accounts/subgraph.yaml b/erc-6551-accounts/subgraph.yaml index 5bee92ad..9675c06e 100644 --- a/erc-6551-accounts/subgraph.yaml +++ b/erc-6551-accounts/subgraph.yaml @@ -4,11 +4,11 @@ schema: dataSources: - kind: ethereum name: ERC6551Registry - network: mainnet + network: base source: address: "0x02101dfB77FDE026414827Fdc604ddAF224F0921" abi: ERC6551Registry - startBlock: 17212995 + startBlock: 2333712 mapping: kind: ethereum/events apiVersion: 0.0.7