Skip to content

Commit 6e244e6

Browse files
Merge pull request #5484 from BitGo/ben/SC-1024-coredao-testnet2
feat(coredao): migrate sdk config to test2
2 parents d8ec7cf + 3f294e8 commit 6e244e6

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

modules/sdk-coin-coredao/test/unit/coredao.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ describe('Coredao', function () {
111111
eip1559: { maxFeePerGas: 20000000000, maxPriorityFeePerGas: 10000000000 },
112112
gasLimit: 500000,
113113
replayProtectionOptions: {
114-
chain: 1115,
114+
chain: 1114,
115115
hardfork: 'london',
116116
},
117117
});
@@ -121,7 +121,7 @@ describe('Coredao', function () {
121121
const tx = FeeMarketEIP1559Transaction.fromSerializedTx(Buffer.from(stripHexPrefix(transaction.tx), 'hex'));
122122
tx.getSenderAddress().toString().should.equal(mockData.walletRootAddress);
123123
const jsonTx = tx.toJSON();
124-
jsonTx.chainId?.should.equal('0x45b');
124+
jsonTx.chainId?.should.equal('0x45a');
125125
jsonTx.to?.should.equal(mockData.recoveryDestination);
126126
});
127127
});

modules/sdk-coin-coredao/test/unit/transactionBuilder/send.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ describe('Coredao Transfer Builder', () => {
66
it('Should successfully build from txHex', async function () {
77
const txBuilder = getBuilder('tcoredao');
88
const txHex =
9-
'0x02f86482045b010102825208944943dd2a2494e3ea5937954cb836692a047695b50180c080a0a967298f91f5c8bb735a0837e68cb43d6541f987028b60a10a165f55bca0eda6a04266fc6f2b7b1c55636bbcc2552fbe18930cf0a483ba85d2fa496fe3042f1796';
9+
'0xf9016c02843b9aca0083b8a1a0948f977e912ef500548a0c3be6ddde9899f1199b8180b901043912521500000000000000000000000019645032c7f1533395d44a629462e751084d3e4c000000000000000000000000000000000000000000000000000000003b9aca0000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000005ec67e28000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008208d7a01157f17e3b584fa18159a0badf189c4fcea677afdbd0af8bfa9429d9a21665e7a04ac01f86b999875a64ff8333d09143ab78ab2b26fd26d6b09d367449bcf8d59c';
1010
txBuilder.from(txHex);
1111
const parsedTx = await txBuilder.build();
12-
1312
should.exist(parsedTx.toJson());
1413
});
1514
});

modules/sdk-coin-coredao/test/unit/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ describe('Network Common Configuration', () => {
1616
const common = getCommon(NetworkType.TESTNET);
1717
should.equal(common.chainName(), 'coredao testnet');
1818
should.equal(common.hardfork(), 'london');
19-
should.equal(common.chainIdBN().toString(), '1115');
20-
should.equal(common.networkIdBN().toString(), '1115');
19+
should.equal(common.chainIdBN().toString(), '1114');
20+
should.equal(common.networkIdBN().toString(), '1114');
2121
});
2222

2323
it('getCommon for invalid network', () => {

modules/statics/src/map.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export class CoinMap {
5757
10: 'opeth',
5858
11155420: 'topeth',
5959
1116: 'coredao',
60-
1115: 'tcoredao',
60+
1114: 'tcoredao',
6161
248: 'oas',
6262
9372: 'toas',
6363
14: 'flr',

modules/statics/src/networks.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,10 +1153,12 @@ class Coredao extends Mainnet implements EthereumNetwork {
11531153
class CoredaoTestnet extends Testnet implements EthereumNetwork {
11541154
name = 'CoredaoTestnet';
11551155
family = CoinFamily.COREDAO;
1156-
explorerUrl = 'https://scan.test.btcs.network/tx/';
1157-
accountExplorerUrl = 'https://scan.test.btcs.network/address/';
1158-
chainId = 1115;
1159-
nativeCoinOperationHashPrefix = '1115';
1156+
explorerUrl = 'https://scan.test2.btcs.network/tx/';
1157+
accountExplorerUrl = 'https://scan.test2.btcs.network/address/';
1158+
chainId = 1114;
1159+
nativeCoinOperationHashPrefix = '1114';
1160+
1161+
// TODO (SC-1024) Update contract addresses to new testnet when they are deployed
11601162
batcherContractAddress = '0xad7a34aa9c0c7cb2c4d1f07ce8d1d0530b07fe27';
11611163
forwarderFactoryAddress = '0x37996e762fa8b671869740c79eb33f625b3bf92a';
11621164
forwarderImplementationAddress = '0xd5fe1c1f216b775dfd30638fa7164d41321ef79b';

0 commit comments

Comments
 (0)