Skip to content

Commit

Permalink
Merge pull request #492 from identity-com/feature/amoy
Browse files Browse the repository at this point in the history
Feature/amoy
  • Loading branch information
dankelleher authored Apr 19, 2024
2 parents b8f9dac + 32ddf10 commit fd6e76c
Show file tree
Hide file tree
Showing 15 changed files with 6,711 additions and 40 deletions.
1,016 changes: 1,016 additions & 0 deletions ethereum/smart-contract/.openzeppelin/unknown-80002.json

Large diffs are not rendered by default.

84 changes: 44 additions & 40 deletions ethereum/smart-contract/config/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,206 +26,210 @@ export const networks = {
accounts: liveAccounts,
},
mainnet: {
url: `https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
url: process.env.MAINNET_RPC ?? `https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: liveAccounts,
chainId: 1,
},
sepolia: {
url: `https://sepolia.infura.io/v3/${process.env.INFURA_API_KEY}`,
url: process.env.SEPOLIA_RPC ?? `https://sepolia.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: liveAccounts,
chainId: 11155111,
},
goerli: {
url: `https://goerli.infura.io/v3/${process.env.INFURA_API_KEY}`,
url: process.env.GOERLI_RPC ??`https://goerli.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: liveAccounts,
chainId: 5,
},
polygonMumbai: {
url: `https://polygon-mumbai.infura.io/v3/${process.env.INFURA_API_KEY}`,
url: process.env.POLYGONMUMBAI_RPC ??`https://polygon-mumbai.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: liveAccounts,
chainId: 80001,
},
polygonMainnet: {
url: `https://polygon-mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
url: process.env.POLYGON_RPC ?? `https://polygon-mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: liveAccounts,
chainId: 137,
},
polygonAmoy: {
url: process.env.POLYGONAMOY_RPC ??`https://polygon-amoy.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: liveAccounts,
chainId: 80002,
},
auroraTestnet: {
url: `https://aurora-testnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
url: process.env.AURORATESTNET_RPC ??`https://aurora-testnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: liveAccounts,
chainId: 1313161555,
},
auroraMainnet: {
url: `https://aurora-mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
url: process.env.AURORA_RPC ??`https://aurora-mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: liveAccounts,
chainId: 1313161554,
},
optimismGoerli: {
url: `https://optimism-goerli.infura.io/v3/${process.env.INFURA_API_KEY}`,
url: process.env.OPGOERLI_RPC ??`https://optimism-goerli.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: liveAccounts,
chainId: 420,
// optimism goerli deployment is only reliable if a gas price is set - the gas oracles are not reliable
gasPrice: 1_000_000_000,
},
optimismSepolia: {
url: `https://sepolia.optimism.io`,
url: process.env.OPSEPOLIA_RPC ??`https://sepolia.optimism.io`,
accounts: liveAccounts,
chainId: 11155420,
// optimism sepolia deployment is only reliable if a gas price is set - the gas oracles are not reliable
gasPrice: 1_000_000_000,
},
optimismMainnet: {
url: `https://optimism-mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
url: process.env.OP_RPC ??`https://optimism-mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: liveAccounts,
chainId: 10,
},
palmTestnet: {
url: `https://palm-testnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
url: process.env.PALMTESTNET_RPC ??`https://palm-testnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: liveAccounts,
chainId: 11297108099,
},
palmMainnet: {
url: `https://palm-mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
url: process.env.PALM_RPC ??`https://palm-mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: liveAccounts,
chainId: 11297108109,
},
arbitrumGoerli: {
url: `https://arbitrum-goerli.infura.io/v3/${process.env.INFURA_API_KEY}`,
url: process.env.ARBGOERLI_RPC ??`https://arbitrum-goerli.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: liveAccounts,
chainId: 421613,
},
arbitrumSepolia: {
url: `https://sepolia-rollup.arbitrum.io/rpc`,
url: process.env.ARBSEPOLIA_RPC ??`https://sepolia-rollup.arbitrum.io/rpc`,
accounts: liveAccounts,
chainId: 421614,
},
arbitrumMainnet: {
url: `https://arbitrum-mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
url: process.env.AR_RPC ??`https://arbitrum-mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: liveAccounts,
chainId: 42161,
},
celoMainnet: {
url: `https://celo-mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
url: process.env.CELO_RPC ??`https://celo-mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: liveAccounts,
chainId: 42220,
},
celoAlfajores: {
url: `https://celo-alfajores.infura.io/v3/${process.env.INFURA_API_KEY}`,
url: process.env.CELOALFAJORES_RPC ??`https://celo-alfajores.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: liveAccounts,
chainId: 44787,
},
avalancheCChain: {
url: `https://avalanche-mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
url: process.env.AVA_RPC ??`https://avalanche-mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: liveAccounts,
chainId: 43114,
},
avalancheCChainFuji: {
url: `https://avalanche-fuji.infura.io/v3/${process.env.INFURA_API_KEY}`,
url: process.env.AVAFUJI_RPC ??`https://avalanche-fuji.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: liveAccounts,
chainId: 43113,
},
starknetMainnet: {
url: `https://starknet-mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
url: process.env.STARKNET_RPC ??`https://starknet-mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: liveAccounts,
chainId: 0, // not documented anywhere
},
starknetGoerli: {
url: `https://starknet-goerli.infura.io/v3/${process.env.INFURA_API_KEY}`,
url: process.env.STARKNETGOERLI_RPC ??`https://starknet-goerli.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: liveAccounts,
chainId: 0, // not documented anywhere
},
xdc: {
url: 'https://erpc.xinfin.network',
url: process.env.XDC_RPC ??'https://erpc.xinfin.network',
accounts: liveAccounts,
chainId: 50,
},
xdcApothem: {
url: 'https://erpc.apothem.network',
url: process.env.XDCAPOTHEM_RPC ??'https://erpc.apothem.network',
accounts: liveAccounts,
chainId: 51,
},
polygonZkEVM: {
url: 'https://zkevm-rpc.com',
url: process.env.POLYGONZKEVM_RPC ??'https://zkevm-rpc.com',
accounts: liveAccounts,
chainId: 1101,
},
polygonZkEVMTestnet: {
url: 'https://rpc.public.zkevm-test.net',
url: process.env.POLYGONZKEVMTESTNET_RPC ??'https://rpc.public.zkevm-test.net',
accounts: liveAccounts,
chainId: 1442,
},
fantom: {
url: 'https://rpcapi.fantom.network',
url: process.env.FANTOM_RPC ??'https://rpcapi.fantom.network',
accounts: liveAccounts,
chainId: 250,
},
fantomTestnet: {
url: 'https://rpc.testnet.fantom.network',
url: process.env.FANTOMTESTNET_RPC ??'https://rpc.testnet.fantom.network',
accounts: liveAccounts,
chainId: 4002,
},
baseSepolia: {
url: 'https://sepolia.base.org',
url: process.env.BASESEPOLIA_RPC ??'https://sepolia.base.org',
accounts: liveAccounts,
chainId: 84532,
// set a gas price - the gas oracles are not reliable
gasPrice: 150000005,
},
base: {
url: 'https://base.llamarpc.com',
url: process.env.BASE_RPC ??'https://base.llamarpc.com',
accounts: liveAccounts,
chainId: 8453,
},
bsc: {
// url: `https://bnbsmartchain-mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
url: 'https://bsc-dataseed1.bnbchain.org',
url: process.env.BSC_RPC ??'https://bsc-dataseed1.bnbchain.org',
accounts: liveAccounts,
chainId: 56,
},
bscTestnet: {
// url: `https://bnbsmartchain-testnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
url: 'https://bsc-testnet.publicnode.com',
url: process.env.BSCTESTNET_RPC ?? 'https://bsc-testnet.publicnode.com',
accounts: liveAccounts,
chainId: 97,
},
linea: {
url: `https://linea-mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
url: process.env.LINEA_RPC ?? `https://linea-mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: liveAccounts,
chainId: 59144,
},
lineaGoerli: {
url: `https://linea-goerli.infura.io/v3/${process.env.INFURA_API_KEY}`,
url: process.env.LINEAGOERLI_RPC ?? `https://linea-goerli.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: liveAccounts,
chainId: 59140,
},
gnosis: {
url: 'https://rpc.gnosischain.com',
url: process.env.GNOSIS_RPC ?? 'https://rpc.gnosischain.com',
accounts: liveAccounts,
chainId: 100
},
gnosisChiado: {
url: 'https://rpc.chiadochain.net',
url: process.env.GNOSISCHIADO_RPC ?? 'https://rpc.chiadochain.net',
accounts: liveAccounts,
chainId: 10200,
gasPrice: 1500000005,
},
klaytn: {
url: 'https://public-en-cypress.klaytn.net',
url: process.env.KLAYTN_RPC ?? 'https://public-en-cypress.klaytn.net',
accounts: liveAccounts,
chainId: 8217,
},
klaytnBaobab: {
url: 'https://api.baobab.klaytn.net:8651',
url: process.env.KLAYTONBAOBAB_RPC ?? 'https://api.baobab.klaytn.net:8651',
accounts: liveAccounts,
chainId: 1001,
},
zkSync: {
url: 'https://mainnet.era.zksync.io',
url: process.env.ZKSYNC_RPC ?? 'https://mainnet.era.zksync.io',
accounts: liveAccounts,
chainId: 324,
},
zkSyncGoerli: {
url: 'https://testnet.era.zksync.dev',
url: process.env.ZKSYNCGOERLI_RPC ?? 'https://testnet.era.zksync.dev',
accounts: liveAccounts,
chainId: 280,
},
Expand Down
2 changes: 2 additions & 0 deletions ethereum/smart-contract/config/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {createWallet} from "../tasks/createWallet";
import {addForwarder} from "../tasks/addForwarder";
import {execute} from "../tasks/execute";
import {getBalance} from "../tasks/getBalance";
import {getFees} from "../tasks/getFees";

const defaultPath = './contracts';
const testContractsPath = './test/contracts';
Expand Down Expand Up @@ -62,6 +63,7 @@ task('execute', 'sign and send a transaction')
.addParam('value', 'the amount to send with the transaction')
.setAction(execute);
task('get-balance', 'get the balance of the deployer').setAction(getBalance);
task('get-fees', 'get the current fees on the selected network').setAction(getFees);

// Override the default "compile" task to compile both main and test contracts
task('compile', 'Compiles the entire project, including main and test contracts')
Expand Down
1 change: 1 addition & 0 deletions ethereum/smart-contract/deployments/polygonAmoy/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
80002
Loading

0 comments on commit fd6e76c

Please sign in to comment.