Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPASS-2753 Remove all *goerli chains and polygonMumbai, add optimismSepolia support #496

Merged
merged 1 commit into from
Jun 11, 2024
Merged
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
587 changes: 198 additions & 389 deletions ethereum/gatekeeper-cli/README.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions ethereum/gatekeeper-cli/src/utils/oclif/providers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import assert = require('assert');
describe('Check ethers provider', function () {
let provider: BaseProvider
const mainnetNetworkID = 1
const goerliNetworkID = 5
const sepoliaNetworkID = 11155111;

it('Try connect to mainnet ethers provider, check network ID', async () => {
provider = getProvider('ethereum')
Expand All @@ -14,11 +14,11 @@ describe('Check ethers provider', function () {
assert.equal(networkId, mainnetNetworkID)
})

it('Try connect to goerli ethers provider, check network ID', async () => {
provider = getProvider('goerli')
it('Try connect to sepolia ethers provider, check network ID', async () => {
provider = getProvider('sepolia')
const networkId = (await provider.getNetwork()).chainId

assert.equal(networkId, goerliNetworkID)
assert.equal(networkId, sepoliaNetworkID)
})

it('Try connect to localhost provider, check connection URL', () => {
Expand Down
18 changes: 3 additions & 15 deletions ethereum/gatekeeper-cli/src/utils/oclif/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@ export const networks = {
url: 'https://sepolia.infura.io/v3/',
chainId: 11_155_111,
},
goerli: {
url: 'https://goerli.infura.io/v3/',
chainId: 5,
},
polygonMumbai: {
url: 'https://polygon-mumbai.infura.io/v3/',
chainId: 80_001,
},
polygonAmoy: {
url: 'https://polygon-amoy.infura.io/v3/',
chainId: 80_002,
Expand All @@ -45,9 +37,9 @@ export const networks = {
url: 'https://aurora-mainnet.infura.io/v3/',
chainId: 1_313_161_554,
},
optimismGoerli: {
url: 'https://optimism-goerli.infura.io/v3/',
chainId: 420,
optimismSepolia: {
url: 'https://optimism-sepolia.infura.io/v3/',
chainId: 11155420,
},
optimism: {
url: 'https://optimism-mainnet.infura.io/v3/',
Expand All @@ -61,10 +53,6 @@ export const networks = {
url: 'https://palm-mainnet.infura.io/v3/',
chainId: 11_297_108_109,
},
arbitrumGoerli: {
url: 'https://arbitrum-goerli.infura.io/v3/',
chainId: 421_613,
},
arbitrumSepolia: {
url: 'https://sepolia-rollup.arbitrum.io/rpc',
chainId: 421_614,
Expand Down
37 changes: 0 additions & 37 deletions ethereum/smart-contract/config/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,6 @@ export const networks = {
accounts: liveAccounts,
chainId: 11155111,
},
goerli: {
url: process.env.GOERLI_RPC ??`https://goerli.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: liveAccounts,
chainId: 5,
},
polygonMumbai: {
url: process.env.POLYGONMUMBAI_RPC ??`https://polygon-mumbai.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: liveAccounts,
chainId: 80001,
},
polygonMainnet: {
url: process.env.POLYGON_RPC ?? `https://polygon-mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: liveAccounts,
Expand All @@ -65,13 +55,6 @@ export const networks = {
accounts: liveAccounts,
chainId: 1313161554,
},
optimismGoerli: {
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: process.env.OPSEPOLIA_RPC ??`https://sepolia.optimism.io`,
accounts: liveAccounts,
Expand All @@ -94,11 +77,6 @@ export const networks = {
accounts: liveAccounts,
chainId: 11297108109,
},
arbitrumGoerli: {
url: process.env.ARBGOERLI_RPC ??`https://arbitrum-goerli.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: liveAccounts,
chainId: 421613,
},
arbitrumSepolia: {
url: process.env.ARBSEPOLIA_RPC ??`https://sepolia-rollup.arbitrum.io/rpc`,
accounts: liveAccounts,
Expand Down Expand Up @@ -134,11 +112,6 @@ export const networks = {
accounts: liveAccounts,
chainId: 0, // not documented anywhere
},
starknetGoerli: {
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: process.env.XDC_RPC ??'https://erpc.xinfin.network',
accounts: liveAccounts,
Expand Down Expand Up @@ -197,11 +170,6 @@ export const networks = {
accounts: liveAccounts,
chainId: 59144,
},
lineaGoerli: {
url: process.env.LINEAGOERLI_RPC ?? `https://linea-goerli.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: liveAccounts,
chainId: 59140,
},
gnosis: {
url: process.env.GNOSIS_RPC ?? 'https://rpc.gnosischain.com',
accounts: liveAccounts,
Expand All @@ -228,9 +196,4 @@ export const networks = {
accounts: liveAccounts,
chainId: 324,
},
zkSyncGoerli: {
url: process.env.ZKSYNCGOERLI_RPC ?? 'https://testnet.era.zksync.dev',
accounts: liveAccounts,
chainId: 280,
},
};
2 changes: 0 additions & 2 deletions ethereum/smart-contract/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,10 @@ module.exports = {
etherscan: {
apiKey: {
mainnet: process.env.ETHERSCAN_API_KEY,
goerli: process.env.ETHERSCAN_API_KEY,
polygon: process.env.POLYGONSCAN_API_KEY,
polygonZkEVM: process.env.POLYGONSCAN_API_KEY,
polygonZkEVMTestnet: process.env.POLYGONSCAN_API_KEY,
arbitrumOne: process.env.ARBISCAN_API_KEY,
arbitrumGoerli: process.env.ARBISCAN_API_KEY,
polygonAmoy: process.env.OKLINK_AMOY_API_KEY
},
customChains: [
Expand Down
2 changes: 1 addition & 1 deletion ethereum/smart-contract/scripts/gatekeeperBatch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ action=$2 # Assign the second argument to action
# mainnets
networks=(mainnet polygonMainnet arbitrumMainnet xdc polygonZkEVM fantom)
# testnets
#networks=(sepolia goerli polygonMumbai arbitrumGoerli xdcApothem polygonZkEVMTestnet fantomTestnet)
#networks=(sepolia xdcApothem polygonZkEVMTestnet fantomTestnet)
gatekeepernetworks=(1 12 13 14 15 16 17 18 20 21 23 25)

# Load completed tasks from batch.temp
Expand Down
4 changes: 2 additions & 2 deletions solana/gatekeeper-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $ npm install -g @identity.com/solana-gatekeeper-cli
$ gateway COMMAND
running command...
$ gateway (-v|--version|version)
@identity.com/solana-gatekeeper-cli/0.0.2 darwin-arm64 node-v18.16.0
@identity.com/solana-gatekeeper-cli/0.0.2 darwin-x64 node-v20.12.0
$ gateway --help [COMMAND]
USAGE
$ gateway COMMAND
Expand Down Expand Up @@ -107,7 +107,7 @@ OPTIONS

EXAMPLE
$ gateway burn EzZgkwaDrgycsiyGeCVRXXRcieE1fxhGMp829qwj5TMv
Revoked
Burned
```

## `gateway freeze GATEWAYTOKEN`
Expand Down
Loading