Skip to content

Commit

Permalink
Merge pull request sphinx-labs#1651 from sphinx-labs/pate/support-pol…
Browse files Browse the repository at this point in the history
…ygon-amoy

feat(pg): Add support for Polygon Amoy
  • Loading branch information
RPate97 authored Apr 11, 2024
2 parents 30c88f4 + caf22d4 commit 28bc6ce
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 38 deletions.
6 changes: 6 additions & 0 deletions .changeset/twenty-radios-tie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@sphinx-labs/contracts': patch
'@sphinx-labs/plugins': patch
---

Support Polygon Amoy
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ Test networks:
- Optimism Sepolia
- Arbitrum Sepolia
- Polygon Mumbai
- Polygon Amoy
- Polygon zkEVM Cardona
- BNB Smart Chain Testnet
- Gnosis Chiado
Expand Down
85 changes: 47 additions & 38 deletions packages/contracts/contracts/foundry/SphinxConstants.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ contract SphinxConstants {
address public constant safeSingletonAddress = 0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552;
address public constant sphinxModuleImplAddress = 0x8f4E4d51B8050B0ff713eff1F88f3dD8b5e8a530;

uint8 internal constant numSupportedNetworks = 47;
uint8 internal constant numSupportedNetworks = 48;

function getNetworkInfoArray() public pure returns (NetworkInfo[] memory) {
NetworkInfo[] memory all = new NetworkInfo[](numSupportedNetworks);
Expand Down Expand Up @@ -91,302 +91,310 @@ contract SphinxConstants {
dripSizeString: '1 MATIC'
});
all[9] = NetworkInfo({
network: Network.polygon_amoy,
name: "polygon_amoy",
chainId: 80002,
networkType: NetworkType.Testnet,
dripSize: 1000000000000000000,
dripSizeString: '1 MATIC'
});
all[10] = NetworkInfo({
network: Network.bnb,
name: "bnb",
chainId: 56,
networkType: NetworkType.Mainnet,
dripSize: 50000000000000000,
dripSizeString: '0.05 BNB'
});
all[10] = NetworkInfo({
all[11] = NetworkInfo({
network: Network.bnb_testnet,
name: "bnb_testnet",
chainId: 97,
networkType: NetworkType.Testnet,
dripSize: 150000000000000000,
dripSizeString: '0.15 BNB'
});
all[11] = NetworkInfo({
all[12] = NetworkInfo({
network: Network.gnosis,
name: "gnosis",
chainId: 100,
networkType: NetworkType.Mainnet,
dripSize: 1000000000000000000,
dripSizeString: '1 xDAI'
});
all[12] = NetworkInfo({
all[13] = NetworkInfo({
network: Network.gnosis_chiado,
name: "gnosis_chiado",
chainId: 10200,
networkType: NetworkType.Testnet,
dripSize: 150000000000000000,
dripSizeString: '0.15 xDAI'
});
all[13] = NetworkInfo({
all[14] = NetworkInfo({
network: Network.linea,
name: "linea",
chainId: 59144,
networkType: NetworkType.Mainnet,
dripSize: 25000000000000000,
dripSizeString: '0.025 ETH'
});
all[14] = NetworkInfo({
all[15] = NetworkInfo({
network: Network.linea_sepolia,
name: "linea_sepolia",
chainId: 59141,
networkType: NetworkType.Testnet,
dripSize: 150000000000000000,
dripSizeString: '0.15 ETH'
});
all[15] = NetworkInfo({
all[16] = NetworkInfo({
network: Network.polygon_zkevm,
name: "polygon_zkevm",
chainId: 1101,
networkType: NetworkType.Mainnet,
dripSize: 25000000000000000,
dripSizeString: '0.025 ETH'
});
all[16] = NetworkInfo({
all[17] = NetworkInfo({
network: Network.polygon_zkevm_cardona,
name: "polygon_zkevm_cardona",
chainId: 2442,
networkType: NetworkType.Testnet,
dripSize: 150000000000000000,
dripSizeString: '0.15 ETH'
});
all[17] = NetworkInfo({
all[18] = NetworkInfo({
network: Network.avalanche,
name: "avalanche",
chainId: 43114,
networkType: NetworkType.Mainnet,
dripSize: 1000000000000000000,
dripSizeString: '1 AVAX'
});
all[18] = NetworkInfo({
all[19] = NetworkInfo({
network: Network.avalanche_fuji,
name: "avalanche_fuji",
chainId: 43113,
networkType: NetworkType.Testnet,
dripSize: 1000000000000000000,
dripSizeString: '1 AVAX'
});
all[19] = NetworkInfo({
all[20] = NetworkInfo({
network: Network.fantom,
name: "fantom",
chainId: 250,
networkType: NetworkType.Mainnet,
dripSize: 1000000000000000000,
dripSizeString: '1 FTM'
});
all[20] = NetworkInfo({
all[21] = NetworkInfo({
network: Network.fantom_testnet,
name: "fantom_testnet",
chainId: 4002,
networkType: NetworkType.Testnet,
dripSize: 1000000000000000000,
dripSizeString: '1 FTM'
});
all[21] = NetworkInfo({
all[22] = NetworkInfo({
network: Network.base,
name: "base",
chainId: 8453,
networkType: NetworkType.Mainnet,
dripSize: 25000000000000000,
dripSizeString: '0.025 ETH'
});
all[22] = NetworkInfo({
all[23] = NetworkInfo({
network: Network.base_sepolia,
name: "base_sepolia",
chainId: 84532,
networkType: NetworkType.Testnet,
dripSize: 150000000000000000,
dripSizeString: '0.15 ETH'
});
all[23] = NetworkInfo({
all[24] = NetworkInfo({
network: Network.celo,
name: "celo",
chainId: 42220,
networkType: NetworkType.Mainnet,
dripSize: 1000000000000000000,
dripSizeString: '1 CELO'
});
all[24] = NetworkInfo({
all[25] = NetworkInfo({
network: Network.celo_alfajores,
name: "celo_alfajores",
chainId: 44787,
networkType: NetworkType.Testnet,
dripSize: 150000000000000000,
dripSizeString: '0.15 CELO'
});
all[25] = NetworkInfo({
all[26] = NetworkInfo({
network: Network.moonriver,
name: "moonriver",
chainId: 1285,
networkType: NetworkType.Mainnet,
dripSize: 150000000000000000,
dripSizeString: '0.15 MOVR'
});
all[26] = NetworkInfo({
all[27] = NetworkInfo({
network: Network.moonbeam,
name: "moonbeam",
chainId: 1284,
networkType: NetworkType.Mainnet,
dripSize: 1000000000000000000,
dripSizeString: '1 GLMR'
});
all[27] = NetworkInfo({
all[28] = NetworkInfo({
network: Network.moonbase_alpha,
name: "moonbase_alpha",
chainId: 1287,
networkType: NetworkType.Testnet,
dripSize: 50000000000000000,
dripSizeString: '0.05 GLMR'
});
all[28] = NetworkInfo({
all[29] = NetworkInfo({
network: Network.fuse,
name: "fuse",
chainId: 122,
networkType: NetworkType.Mainnet,
dripSize: 1000000000000000000,
dripSizeString: '1 FUSE'
});
all[29] = NetworkInfo({
all[30] = NetworkInfo({
network: Network.evmos,
name: "evmos",
chainId: 9001,
networkType: NetworkType.Mainnet,
dripSize: 1000000000000000000,
dripSizeString: '1 EVMOS'
});
all[30] = NetworkInfo({
all[31] = NetworkInfo({
network: Network.evmos_testnet,
name: "evmos_testnet",
chainId: 9000,
networkType: NetworkType.Testnet,
dripSize: 15000000000000000,
dripSizeString: '0.015 EVMOS'
});
all[31] = NetworkInfo({
all[32] = NetworkInfo({
network: Network.kava,
name: "kava",
chainId: 2222,
networkType: NetworkType.Mainnet,
dripSize: 1000000000000000000,
dripSizeString: '1 KAVA'
});
all[32] = NetworkInfo({
all[33] = NetworkInfo({
network: Network.kava_testnet,
name: "kava_testnet",
chainId: 2221,
networkType: NetworkType.Testnet,
dripSize: 1000000000000000000,
dripSizeString: '1 KAVA'
});
all[33] = NetworkInfo({
all[34] = NetworkInfo({
network: Network.scroll,
name: "scroll",
chainId: 534352,
networkType: NetworkType.Mainnet,
dripSize: 25000000000000000,
dripSizeString: '0.025 ETH'
});
all[34] = NetworkInfo({
all[35] = NetworkInfo({
network: Network.scroll_sepolia,
name: "scroll_sepolia",
chainId: 534351,
networkType: NetworkType.Testnet,
dripSize: 150000000000000000,
dripSizeString: '0.15 ETH'
});
all[35] = NetworkInfo({
all[36] = NetworkInfo({
network: Network.rootstock,
name: "rootstock",
chainId: 30,
networkType: NetworkType.Mainnet,
dripSize: 1000000000000000,
dripSizeString: '0.001 RBTC'
});
all[36] = NetworkInfo({
all[37] = NetworkInfo({
network: Network.rootstock_testnet,
name: "rootstock_testnet",
chainId: 31,
networkType: NetworkType.Testnet,
dripSize: 1000000000000000,
dripSizeString: '0.001 RBTC'
});
all[37] = NetworkInfo({
all[38] = NetworkInfo({
network: Network.zora,
name: "zora",
chainId: 7777777,
networkType: NetworkType.Mainnet,
dripSize: 25000000000000000,
dripSizeString: '0.025 ETH'
});
all[38] = NetworkInfo({
all[39] = NetworkInfo({
network: Network.zora_sepolia,
name: "zora_sepolia",
chainId: 999999999,
networkType: NetworkType.Testnet,
dripSize: 150000000000000000,
dripSizeString: '0.15 ETH'
});
all[39] = NetworkInfo({
all[40] = NetworkInfo({
network: Network.rari,
name: "rari",
chainId: 1380012617,
networkType: NetworkType.Mainnet,
dripSize: 25000000000000000,
dripSizeString: '0.025 ETH'
});
all[40] = NetworkInfo({
all[41] = NetworkInfo({
network: Network.rari_sepolia,
name: "rari_sepolia",
chainId: 1918988905,
networkType: NetworkType.Testnet,
dripSize: 150000000000000000,
dripSizeString: '0.15 ETH'
});
all[41] = NetworkInfo({
all[42] = NetworkInfo({
network: Network.blast_sepolia,
name: "blast_sepolia",
chainId: 168587773,
networkType: NetworkType.Testnet,
dripSize: 25000000000000000,
dripSizeString: '0.025 ETH'
});
all[42] = NetworkInfo({
all[43] = NetworkInfo({
network: Network.blast,
name: "blast",
chainId: 81457,
networkType: NetworkType.Mainnet,
dripSize: 25000000000000000,
dripSizeString: '0.025 ETH'
});
all[43] = NetworkInfo({
all[44] = NetworkInfo({
network: Network.taiko_katla,
name: "taiko_katla",
chainId: 167008,
networkType: NetworkType.Testnet,
dripSize: 150000000000000000,
dripSizeString: '0.15 ETH'
});
all[44] = NetworkInfo({
all[45] = NetworkInfo({
network: Network.mode_sepolia,
name: "mode_sepolia",
chainId: 919,
networkType: NetworkType.Testnet,
dripSize: 150000000000000000,
dripSizeString: '0.15 ETH'
});
all[45] = NetworkInfo({
all[46] = NetworkInfo({
network: Network.mode,
name: "mode",
chainId: 34443,
networkType: NetworkType.Mainnet,
dripSize: 25000000000000000,
dripSizeString: '0.025 ETH'
});
all[46] = NetworkInfo({
all[47] = NetworkInfo({
network: Network.darwinia_pangolin,
name: "darwinia_pangolin",
chainId: 43,
Expand All @@ -408,6 +416,7 @@ enum Network {
arbitrum_sepolia,
polygon,
polygon_mumbai,
polygon_amoy,
bnb,
bnb_testnet,
gnosis,
Expand Down
Loading

0 comments on commit 28bc6ce

Please sign in to comment.