|
|
@ -41,7 +41,7 @@ export const evmMap: Map<HardFork, { chainId: ChainInfo[], minCompilerVersion: s |
|
|
|
{ id: 59141, name: "Linea Testnet" }, |
|
|
|
{ id: 59141, name: "Linea Testnet" }, |
|
|
|
{ id: 421614, name: "Arbitrum Sepolia" }, |
|
|
|
{ id: 421614, name: "Arbitrum Sepolia" }, |
|
|
|
{ id: 534352, name: "Scroll" }, |
|
|
|
{ id: 534352, name: "Scroll" }, |
|
|
|
{ id: 11155111, name: "Sepolia" } |
|
|
|
// { id: 11155111, name: "Sepolia" }
|
|
|
|
], |
|
|
|
], |
|
|
|
minCompilerVersion: "0.8.24+commit.e11b9ed9", |
|
|
|
minCompilerVersion: "0.8.24+commit.e11b9ed9", |
|
|
|
evmVersion: 'cancun' |
|
|
|
evmVersion: 'cancun' |
|
|
@ -73,7 +73,7 @@ export const evmMap: Map<HardFork, { chainId: ChainInfo[], minCompilerVersion: s |
|
|
|
{ id: 59902, name: "Metis Sepolia Testnet" }, |
|
|
|
{ id: 59902, name: "Metis Sepolia Testnet" }, |
|
|
|
{ id: 421614, name: "Arbitrum Sepolia" }, |
|
|
|
{ id: 421614, name: "Arbitrum Sepolia" }, |
|
|
|
{ id: 534352, name: "Scroll" }, |
|
|
|
{ id: 534352, name: "Scroll" }, |
|
|
|
{ id: 11155111, name: "Sepolia" }, |
|
|
|
// { id: 11155111, name: "Sepolia" },
|
|
|
|
{ id: 11155420, name: "Optimism Sepolia Testnet" }, |
|
|
|
{ id: 11155420, name: "Optimism Sepolia Testnet" }, |
|
|
|
{ id: 1666600000, name: "Harmony Mainnet Shard 0" } |
|
|
|
{ id: 1666600000, name: "Harmony Mainnet Shard 0" } |
|
|
|
], |
|
|
|
], |
|
|
@ -109,7 +109,7 @@ export const evmMap: Map<HardFork, { chainId: ChainInfo[], minCompilerVersion: s |
|
|
|
{ id: 59902, name: "Metis Sepolia Testnet" }, |
|
|
|
{ id: 59902, name: "Metis Sepolia Testnet" }, |
|
|
|
{ id: 421614, name: "Arbitrum Sepolia" }, |
|
|
|
{ id: 421614, name: "Arbitrum Sepolia" }, |
|
|
|
{ id: 534352, name: "Scroll" }, |
|
|
|
{ id: 534352, name: "Scroll" }, |
|
|
|
{ id: 11155111, name: "Sepolia" }, |
|
|
|
// { id: 11155111, name: "Sepolia" },
|
|
|
|
{ id: 11155420, name: "Optimism Sepolia Testnet" }, |
|
|
|
{ id: 11155420, name: "Optimism Sepolia Testnet" }, |
|
|
|
{ id: 1666600000, name: "Harmony Mainnet Shard 0" } |
|
|
|
{ id: 1666600000, name: "Harmony Mainnet Shard 0" } |
|
|
|
], |
|
|
|
], |
|
|
@ -132,7 +132,7 @@ export const evmMap: Map<HardFork, { chainId: ChainInfo[], minCompilerVersion: s |
|
|
|
{ id: 42220, name: "Celo Mainnet" }, |
|
|
|
{ id: 42220, name: "Celo Mainnet" }, |
|
|
|
{ id: 59144, name: "Linea Mainnet" }, |
|
|
|
{ id: 59144, name: "Linea Mainnet" }, |
|
|
|
{ id: 59141, name: "Linea Testnet" }, |
|
|
|
{ id: 59141, name: "Linea Testnet" }, |
|
|
|
{ id: 11155111, name: "Sepolia" }, |
|
|
|
// { id: 11155111, name: "Sepolia" },
|
|
|
|
], |
|
|
|
], |
|
|
|
minCompilerVersion: "0.8.7+commit.e28d00a7", |
|
|
|
minCompilerVersion: "0.8.7+commit.e28d00a7", |
|
|
|
evmVersion: 'london' |
|
|
|
evmVersion: 'london' |
|
|
@ -153,7 +153,7 @@ export const evmMap: Map<HardFork, { chainId: ChainInfo[], minCompilerVersion: s |
|
|
|
{ id: 42220, name: "Celo Mainnet" }, |
|
|
|
{ id: 42220, name: "Celo Mainnet" }, |
|
|
|
{ id: 59144, name: "Linea Mainnet" }, |
|
|
|
{ id: 59144, name: "Linea Mainnet" }, |
|
|
|
{ id: 59141, name: "Linea Testnet" }, |
|
|
|
{ id: 59141, name: "Linea Testnet" }, |
|
|
|
{ id: 11155111, name: "Sepolia" } |
|
|
|
// { id: 11155111, name: "Sepolia" }
|
|
|
|
], |
|
|
|
], |
|
|
|
minCompilerVersion: "0.8.5+commit.a4f2e591", |
|
|
|
minCompilerVersion: "0.8.5+commit.a4f2e591", |
|
|
|
evmVersion: 'berlin' |
|
|
|
evmVersion: 'berlin' |
|
|
@ -174,7 +174,7 @@ export const evmMap: Map<HardFork, { chainId: ChainInfo[], minCompilerVersion: s |
|
|
|
{ id: 42220, name: "Celo Mainnet" }, |
|
|
|
{ id: 42220, name: "Celo Mainnet" }, |
|
|
|
{ id: 59144, name: "Linea Mainnet" }, |
|
|
|
{ id: 59144, name: "Linea Mainnet" }, |
|
|
|
{ id: 59141, name: "Linea Testnet" }, |
|
|
|
{ id: 59141, name: "Linea Testnet" }, |
|
|
|
{ id: 11155111, name: "Sepolia" } |
|
|
|
// { id: 11155111, name: "Sepolia" }
|
|
|
|
], |
|
|
|
], |
|
|
|
minCompilerVersion: "0.5.14+commit.01f1aaa4", |
|
|
|
minCompilerVersion: "0.5.14+commit.01f1aaa4", |
|
|
|
evmVersion: 'istanbul' |
|
|
|
evmVersion: 'istanbul' |
|
|
@ -183,7 +183,7 @@ export const evmMap: Map<HardFork, { chainId: ChainInfo[], minCompilerVersion: s |
|
|
|
chainId: [ |
|
|
|
chainId: [ |
|
|
|
{ id: 1, name: "Ethereum Mainnet" }, |
|
|
|
{ id: 1, name: "Ethereum Mainnet" }, |
|
|
|
{ id: 5, name: "Goerli" }, |
|
|
|
{ id: 5, name: "Goerli" }, |
|
|
|
{ id: 11155111, name: "Sepolia" } |
|
|
|
// { id: 11155111, name: "Sepolia" }
|
|
|
|
], |
|
|
|
], |
|
|
|
minCompilerVersion: "0.5.5+commit.47a71e8f", |
|
|
|
minCompilerVersion: "0.5.5+commit.47a71e8f", |
|
|
|
evmVersion: 'petersburg' |
|
|
|
evmVersion: 'petersburg' |
|
|
@ -192,7 +192,7 @@ export const evmMap: Map<HardFork, { chainId: ChainInfo[], minCompilerVersion: s |
|
|
|
chainId: [ |
|
|
|
chainId: [ |
|
|
|
{ id: 1, name: "Ethereum Mainnet" }, |
|
|
|
{ id: 1, name: "Ethereum Mainnet" }, |
|
|
|
{ id: 5, name: "Goerli" }, |
|
|
|
{ id: 5, name: "Goerli" }, |
|
|
|
{ id: 11155111, name: "Sepolia" } |
|
|
|
// { id: 11155111, name: "Sepolia" }
|
|
|
|
], |
|
|
|
], |
|
|
|
minCompilerVersion: "0.5.5+commit.47a71e8f", |
|
|
|
minCompilerVersion: "0.5.5+commit.47a71e8f", |
|
|
|
evmVersion: 'constantinople' |
|
|
|
evmVersion: 'constantinople' |
|
|
@ -222,7 +222,7 @@ export const evmMap: Map<HardFork, { chainId: ChainInfo[], minCompilerVersion: s |
|
|
|
chainId: [ |
|
|
|
chainId: [ |
|
|
|
{ id: 1, name: "Ethereum Mainnet" }, |
|
|
|
{ id: 1, name: "Ethereum Mainnet" }, |
|
|
|
{ id: 5, name: "Goerli" }, |
|
|
|
{ id: 5, name: "Goerli" }, |
|
|
|
{ id: 11155111, name: "Sepolia" } |
|
|
|
// { id: 11155111, name: "Sepolia" }
|
|
|
|
], |
|
|
|
], |
|
|
|
minCompilerVersion: "0.1.2+commit.d0d36e3", |
|
|
|
minCompilerVersion: "0.1.2+commit.d0d36e3", |
|
|
|
evmVersion: 'homestead' |
|
|
|
evmVersion: 'homestead' |
|
|
@ -247,15 +247,26 @@ export function getCompatibleChain( |
|
|
|
fork: HardFork, |
|
|
|
fork: HardFork, |
|
|
|
chainId: number |
|
|
|
chainId: number |
|
|
|
): ChainCompatibleInfo | undefined { |
|
|
|
): ChainCompatibleInfo | undefined { |
|
|
|
const forkData = evmMap.get(fork) |
|
|
|
// const forkData = evmMap.get(fork)
|
|
|
|
if (!forkData) return undefined |
|
|
|
// if (!forkData) return undefined
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// const compatibleChain = forkData.chainId.find(chain => chain.id === chainId)
|
|
|
|
|
|
|
|
// if (compatibleChain) {
|
|
|
|
|
|
|
|
// return {
|
|
|
|
|
|
|
|
// chain: compatibleChain,
|
|
|
|
|
|
|
|
// minCompilerVersion: forkData.minCompilerVersion,
|
|
|
|
|
|
|
|
// evmVersion: fork
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (const [forkKey, forkData] of evmMap) { |
|
|
|
const compatibleChain = forkData.chainId.find(chain => chain.id === chainId) |
|
|
|
const compatibleChain = forkData.chainId.find(chain => chain.id === chainId) |
|
|
|
if (compatibleChain) { |
|
|
|
if (compatibleChain) { |
|
|
|
return { |
|
|
|
return { |
|
|
|
chain: compatibleChain, |
|
|
|
chain: compatibleChain, |
|
|
|
minCompilerVersion: forkData.minCompilerVersion, |
|
|
|
minCompilerVersion: forkData.minCompilerVersion, |
|
|
|
evmVersion: fork |
|
|
|
evmVersion: forkKey |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|