From 2135a8677129ea85f2aa45a0ef0442704c16db83 Mon Sep 17 00:00:00 2001 From: Damian I Date: Wed, 10 Apr 2024 05:05:08 -0400 Subject: [PATCH] Added Polygon Amoy network integration --- packages/sdk/src/constants/addresses.ts | 9 +++++++ packages/sdk/src/constants/chains.ts | 31 +++++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/packages/sdk/src/constants/addresses.ts b/packages/sdk/src/constants/addresses.ts index d87ca20..f5de586 100644 --- a/packages/sdk/src/constants/addresses.ts +++ b/packages/sdk/src/constants/addresses.ts @@ -14,6 +14,9 @@ export const starFactoryContracts: ContractData = { [Chains.polygonMumbai.id]: { address: '0x429cB2c2A030952D3F5e10B534584aB49c303763', }, + [Chains.polygonAmoy.id]: { + address: '0x542D145f2c66CB9ac58447Fe141BFB12fea7C8bE', + }, [Chains.aurora.id]: { address: '0xc0553B98d93114FB241196272603DF4543359820', }, @@ -34,6 +37,9 @@ export const constellationFactoryContracts: ContractData = { [Chains.polygonMumbai.id]: { address: '0x609401678A22F7e2c7AaFd817F6F5a0bbBf44e8F', }, + [Chains.polygonAmoy.id]: { + address: '0x4cE72ceB49223A259FA1265Ba3a78484BbE8B889', + }, [Chains.aurora.id]: { address: '0xa3cCc90A2025cefad0AeDF4CFe44aD059605620c', }, @@ -55,6 +61,9 @@ export const txFeeContractAddress: ContractData = { [Chains.polygonMumbai.id]: { address: '0x746a330Add641444ADbFa3Cc969F433aA632504E', }, + [Chains.polygonAmoy.id]: { + address: '0x746a330Add641444ADbFa3Cc969F433aA632504E', + }, [Chains.aurora.id]: { address: '0x746a330Add641444ADbFa3Cc969F433aA632504E', }, diff --git a/packages/sdk/src/constants/chains.ts b/packages/sdk/src/constants/chains.ts index fc0a1a0..65dd86d 100644 --- a/packages/sdk/src/constants/chains.ts +++ b/packages/sdk/src/constants/chains.ts @@ -35,10 +35,41 @@ export const polygonMumbai = { testnet: true, } as const satisfies Chain; +export const polygonAmoy = { + id: 80002, + name: 'Polygon Amoy', + network: 'amoy', + nativeCurrency: { name: 'MATIC', symbol: 'MATIC', decimals: 18 }, + rpcUrls: { + alchemy: { + http: ['https://polygon-amoy.g.alchemy.com/v2'], + webSocket: ['wss://polygon-amoy.g.alchemy.com/v2'], + }, + infura: { + http: ['https://polygon-amoy.infura.io/v3'], + webSocket: ['wss://polygon-amoy.infura.io/ws/v3'], + }, + default: { + http: ['https://rpc-amoy.polygon.technology'], + }, + public: { + http: ['https://rpc-amoy.polygon.technology'], + }, + }, + blockExplorers: { + default: { + name: 'OkLink', + url: 'https://www.oklink.com/amoy', + }, + }, + testnet: true, +} as const satisfies Chain; + export const Chains = { aurora, auroraTestnet, foundry, polygon, polygonMumbai, + polygonAmoy, };