From 3f294e83f3b21844eb6b0a90cd69bd01e641f0da Mon Sep 17 00:00:00 2001 From: Ben Kelcher Date: Wed, 5 Feb 2025 10:38:45 -0500 Subject: [PATCH] feat(statics): migrate sdk config to test2 TICKET: SC-1024 --- modules/sdk-coin-coredao/test/unit/coredao.ts | 4 ++-- .../test/unit/transactionBuilder/send.ts | 3 +-- modules/sdk-coin-coredao/test/unit/utils.ts | 4 ++-- modules/statics/src/map.ts | 2 +- modules/statics/src/networks.ts | 10 ++++++---- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/modules/sdk-coin-coredao/test/unit/coredao.ts b/modules/sdk-coin-coredao/test/unit/coredao.ts index 53443d87a9..faa0087b12 100644 --- a/modules/sdk-coin-coredao/test/unit/coredao.ts +++ b/modules/sdk-coin-coredao/test/unit/coredao.ts @@ -111,7 +111,7 @@ describe('Coredao', function () { eip1559: { maxFeePerGas: 20000000000, maxPriorityFeePerGas: 10000000000 }, gasLimit: 500000, replayProtectionOptions: { - chain: 1115, + chain: 1114, hardfork: 'london', }, }); @@ -121,7 +121,7 @@ describe('Coredao', function () { const tx = FeeMarketEIP1559Transaction.fromSerializedTx(Buffer.from(stripHexPrefix(transaction.tx), 'hex')); tx.getSenderAddress().toString().should.equal(mockData.walletRootAddress); const jsonTx = tx.toJSON(); - jsonTx.chainId?.should.equal('0x45b'); + jsonTx.chainId?.should.equal('0x45a'); jsonTx.to?.should.equal(mockData.recoveryDestination); }); }); diff --git a/modules/sdk-coin-coredao/test/unit/transactionBuilder/send.ts b/modules/sdk-coin-coredao/test/unit/transactionBuilder/send.ts index 12b780365f..e38449c134 100644 --- a/modules/sdk-coin-coredao/test/unit/transactionBuilder/send.ts +++ b/modules/sdk-coin-coredao/test/unit/transactionBuilder/send.ts @@ -6,10 +6,9 @@ describe('Coredao Transfer Builder', () => { it('Should successfully build from txHex', async function () { const txBuilder = getBuilder('tcoredao'); const txHex = - '0x02f86482045b010102825208944943dd2a2494e3ea5937954cb836692a047695b50180c080a0a967298f91f5c8bb735a0837e68cb43d6541f987028b60a10a165f55bca0eda6a04266fc6f2b7b1c55636bbcc2552fbe18930cf0a483ba85d2fa496fe3042f1796'; + '0xf9016c02843b9aca0083b8a1a0948f977e912ef500548a0c3be6ddde9899f1199b8180b901043912521500000000000000000000000019645032c7f1533395d44a629462e751084d3e4c000000000000000000000000000000000000000000000000000000003b9aca0000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000005ec67e28000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008208d7a01157f17e3b584fa18159a0badf189c4fcea677afdbd0af8bfa9429d9a21665e7a04ac01f86b999875a64ff8333d09143ab78ab2b26fd26d6b09d367449bcf8d59c'; txBuilder.from(txHex); const parsedTx = await txBuilder.build(); - should.exist(parsedTx.toJson()); }); }); diff --git a/modules/sdk-coin-coredao/test/unit/utils.ts b/modules/sdk-coin-coredao/test/unit/utils.ts index 61c63e42ab..4d408a92fa 100644 --- a/modules/sdk-coin-coredao/test/unit/utils.ts +++ b/modules/sdk-coin-coredao/test/unit/utils.ts @@ -16,8 +16,8 @@ describe('Network Common Configuration', () => { const common = getCommon(NetworkType.TESTNET); should.equal(common.chainName(), 'coredao testnet'); should.equal(common.hardfork(), 'london'); - should.equal(common.chainIdBN().toString(), '1115'); - should.equal(common.networkIdBN().toString(), '1115'); + should.equal(common.chainIdBN().toString(), '1114'); + should.equal(common.networkIdBN().toString(), '1114'); }); it('getCommon for invalid network', () => { diff --git a/modules/statics/src/map.ts b/modules/statics/src/map.ts index 2660a56ba6..bc0b99fd8c 100644 --- a/modules/statics/src/map.ts +++ b/modules/statics/src/map.ts @@ -57,7 +57,7 @@ export class CoinMap { 10: 'opeth', 11155420: 'topeth', 1116: 'coredao', - 1115: 'tcoredao', + 1114: 'tcoredao', 248: 'oas', 9372: 'toas', 14: 'flr', diff --git a/modules/statics/src/networks.ts b/modules/statics/src/networks.ts index a58ad1936d..0f83067913 100644 --- a/modules/statics/src/networks.ts +++ b/modules/statics/src/networks.ts @@ -1153,10 +1153,12 @@ class Coredao extends Mainnet implements EthereumNetwork { class CoredaoTestnet extends Testnet implements EthereumNetwork { name = 'CoredaoTestnet'; family = CoinFamily.COREDAO; - explorerUrl = 'https://scan.test.btcs.network/tx/'; - accountExplorerUrl = 'https://scan.test.btcs.network/address/'; - chainId = 1115; - nativeCoinOperationHashPrefix = '1115'; + explorerUrl = 'https://scan.test2.btcs.network/tx/'; + accountExplorerUrl = 'https://scan.test2.btcs.network/address/'; + chainId = 1114; + nativeCoinOperationHashPrefix = '1114'; + + // TODO (SC-1024) Update contract addresses to new testnet when they are deployed batcherContractAddress = '0xad7a34aa9c0c7cb2c4d1f07ce8d1d0530b07fe27'; forwarderFactoryAddress = '0x37996e762fa8b671869740c79eb33f625b3bf92a'; forwarderImplementationAddress = '0xd5fe1c1f216b775dfd30638fa7164d41321ef79b';