Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions config/networks/arbitrum-one.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"network": "arbitrum-one",
"chainId": "42161",
"displayName": "Arbitrum One",
"identityRegistry": {
"address": "0x8004A169FB4a3325136EB29fA0ceB6D2e539a432",
"startBlock": 428895443
},
"reputationRegistry": {
"address": "0x8004BAa17C55a88189AE136b182e5fdA19dE9b63",
"startBlock": 428895443
},
"validationRegistry": {},
"graphNode": {
"network": "arbitrum-one"
}
}
17 changes: 17 additions & 0 deletions config/networks/arbitrum-sepolia.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"network": "arbitrum-sepolia",
"chainId": "421614",
"displayName": "Arbitrum Sepolia",
"identityRegistry": {
"address": "0x8004A818BFB912233c491871b3d84c89A494BD9e",
"startBlock": 239945838
},
"reputationRegistry": {
"address": "0x8004B663056A597Dffe9eCcC1965A193B7388713",
"startBlock": 239945838
},
"validationRegistry": {},
"graphNode": {
"network": "arbitrum-sepolia"
}
}
22 changes: 22 additions & 0 deletions deployments/deployment.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,28 @@
"schema": "1.0.0",
"subgraph": "1.0.0"
}
},
"erc-8004-arbitrum-sepolia": {
"network": "arbitrum-sepolia",
"displayName": "Arbitrum Sepolia",
"chainId": "421614",
"status": "prod",
"configFile": "config/networks/arbitrum-sepolia.json",
"versions": {
"schema": "1.0.0",
"subgraph": "1.0.0"
}
},
"erc-8004-arbitrum-one": {
"network": "arbitrum-one",
"displayName": "Arbitrum One",
"chainId": "42161",
"status": "prod",
"configFile": "config/networks/arbitrum-one.json",
"versions": {
"schema": "1.0.0",
"subgraph": "1.0.0"
}
}
}
}
Expand Down
40 changes: 31 additions & 9 deletions src/contract-addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,24 @@ export function getContractAddresses(chainId: BigInt): ContractAddresses {
Bytes.fromHexString("0x34ae1196b1609e01ebc90b75c802b2ea87203f13")
)
}
// Arbitrum Sepolia Testnet (421614)
else if (chainId.equals(BigInt.fromString("421614"))) {
return new ContractAddresses(
Bytes.fromHexString("0x8004A818BFB912233c491871b3d84c89A494BD9e"),
Bytes.fromHexString("0x8004B663056A597Dffe9eCcC1965A193B7388713"),
// Validation registry not configured / indexing paused
Bytes.fromHexString("0x0000000000000000000000000000000000000000")
)
}
// Arbitrum One (Mainnet) (42161)
else if (chainId.equals(BigInt.fromString("42161"))) {
return new ContractAddresses(
Bytes.fromHexString("0x8004A169FB4a3325136EB29fA0ceB6D2e539a432"),
Bytes.fromHexString("0x8004BAa17C55a88189AE136b182e5fdA19dE9b63"),
// Validation registry not configured / indexing paused
Bytes.fromHexString("0x0000000000000000000000000000000000000000")
)
}

// Unsupported chain - return zero addresses
return new ContractAddresses(
Expand All @@ -122,6 +140,8 @@ export function getChainName(chainId: BigInt): string {
if (chainId.equals(BigInt.fromI32(296))) return "Hedera Testnet"
if (chainId.equals(BigInt.fromI32(998))) return "HyperEVM Testnet"
if (chainId.equals(BigInt.fromString("1351057110"))) return "SKALE Base Sepolia Testnet"
if (chainId.equals(BigInt.fromI32(421614))) return "Arbitrum Sepolia"
if (chainId.equals(BigInt.fromI32(42161))) return "Arbitrum One"
return `Unsupported Chain ${chainId.toString()}`
}

Expand Down Expand Up @@ -150,14 +170,16 @@ export function isSupportedChain(chainId: BigInt): boolean {

export function getSupportedChains(): BigInt[] {
return [
BigInt.fromI32(1), // Ethereum Mainnet
BigInt.fromI32(137), // Polygon Mainnet
BigInt.fromI32(11155111), // Ethereum Sepolia
BigInt.fromI32(84532), // Base Sepolia
BigInt.fromI32(59141), // Linea Sepolia
BigInt.fromI32(80002), // Polygon Amoy
BigInt.fromI32(296), // Hedera Testnet
BigInt.fromI32(998), // HyperEVM Testnet
BigInt.fromString("1351057110") // SKALE Base Sepolia Testnet
BigInt.fromI32(1), // Ethereum Mainnet
BigInt.fromI32(137), // Polygon Mainnet
BigInt.fromI32(11155111), // Ethereum Sepolia
BigInt.fromI32(84532), // Base Sepolia
BigInt.fromI32(59141), // Linea Sepolia
BigInt.fromI32(80002), // Polygon Amoy
BigInt.fromI32(296), // Hedera Testnet
BigInt.fromI32(998), // HyperEVM Testnet
BigInt.fromString("1351057110"), // SKALE Base Sepolia Testnet
BigInt.fromI32(421614), // Arbitrum Sepolia
BigInt.fromI32(42161) // Arbitrum One (Mainnet)
]
}
4 changes: 3 additions & 1 deletion src/utils/chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ export function getChainId(): i32 {
return 998 // HyperEVM Testnet
} else if (network == "skale-base-sepolia-testnet") {
return 1351057110 // SKALE Base Sepolia Testnet
} else if (network == "arbitrum-sepolia") {
return 421614 // Arbitrum Sepolia Testnet
}
// Mainnets (for future use)
else if (network == "mainnet") {
Expand All @@ -37,7 +39,7 @@ export function getChainId(): i32 {
} else if (network == "polygon" || network == "matic") {
return 137
} else if (network == "arbitrum-one") {
return 42161
return 42161 // Arbitrum One (Mainnet)
} else if (network == "optimism") {
return 10
} else if (network == "bsc") {
Expand Down