Skip to content

Commit

Permalink
feat(statics): add polygon amoy testnet
Browse files Browse the repository at this point in the history
WIN-2819
TICKET: WIN-2819

This PR is adding polygon amoy testnet
  • Loading branch information
gianchandania committed Apr 18, 2024
1 parent 5d13956 commit 75deeaf
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
12 changes: 8 additions & 4 deletions modules/sdk-coin-polygon/src/lib/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@ import EthereumCommon from '@ethereumjs/common';
/**
* A Common object defining the chain and the hardfork for Polygon Testnet
*/
export const testnetCommon = EthereumCommon.forCustomChain(
'goerli',

export const testnetCommon = EthereumCommon.custom(
{
name: 'mumbai',
name: 'polygon amoy testnet',
networkId: (coins.get('tpolygon').network as EthereumNetwork).chainId,
chainId: (coins.get('tpolygon').network as EthereumNetwork).chainId,
},
'london'
{
baseChain: 'sepolia',
hardfork: 'london',
eips: [1559],
}
);

/**
Expand Down
2 changes: 1 addition & 1 deletion modules/sdk-coin-polygon/test/unit/polygon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ describe('Polygon', function () {
gasPrice: 20000000000,
gasLimit: 500000,
replayProtectionOptions: {
chain: 80001,
chain: 80002,
hardfork: 'london',
},
};
Expand Down
2 changes: 1 addition & 1 deletion modules/statics/src/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class CoinMap {
5: 'gteth',
17000: 'hteth',
10001: 'ethw',
80001: 'tpolygon',
80002: 'tpolygon',
137: 'polygon',
56: 'bsc',
97: 'tbsc',
Expand Down
14 changes: 7 additions & 7 deletions modules/statics/src/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -913,13 +913,13 @@ class Polygon extends Mainnet implements EthereumNetwork {
class PolygonTestnet extends Testnet implements EthereumNetwork {
name = 'PolygonTestnet';
family = CoinFamily.POLYGON;
explorerUrl = 'https://mumbai.polygonscan.com/tx/';
accountExplorerUrl = 'https://mumbai.polygonscan.com/address/';
chainId = 80001;
forwarderFactoryAddress = '0x7d10cfdcb763375fb5f0a0e9101f490f0bf1b43a';
forwarderImplementationAddress = '0xaa2216d72d7c149dfe4c3dd2154cd00994216506';
walletFactoryAddress = '0xe37c07faec87be075ce4002b5fedbde00a4fe9d5';
walletImplementationAddress = '0x11f8d70a4ee9d0962bb1160d776d4a996cfdff40';
explorerUrl = 'https://amoy.polygonscan.com/tx/';
accountExplorerUrl = 'https://amoy.polygonscan.com/address/';
chainId = 80002;
forwarderFactoryAddress = '0x23223fd7cfc5f34b20f38ebb9a489e1ff3c084d1';
forwarderImplementationAddress = '0xd4c24325b5ef514fbb1ecc76a9bb4dcb57a8341e';
walletFactoryAddress = '0xe9c16033e01bf9f94bf9f99fc0fefcfb8b124992';
walletImplementationAddress = '0xf8360c213e4f44cce03e48cb9281254de2a7a566';
batcherContractAddress = '0xcdf01a31ea2a1d62951aac3a5743c4416f9da3fb';
nativeCoinOperationHashPrefix = 'POLYGON';
tokenOperationHashPrefix = 'POLYGON-ERC20';
Expand Down

0 comments on commit 75deeaf

Please sign in to comment.