Skip to content

Commit

Permalink
Merge pull request #5484 from BitGo/ben/SC-1024-coredao-testnet2
Browse files Browse the repository at this point in the history
feat(coredao): migrate sdk config to test2
  • Loading branch information
benkelcher-bitgo authored Feb 5, 2025
2 parents d8ec7cf + 3f294e8 commit 6e244e6
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions modules/sdk-coin-coredao/test/unit/coredao.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ describe('Coredao', function () {
eip1559: { maxFeePerGas: 20000000000, maxPriorityFeePerGas: 10000000000 },
gasLimit: 500000,
replayProtectionOptions: {
chain: 1115,
chain: 1114,
hardfork: 'london',
},
});
Expand All @@ -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);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
});
});
Expand Down
4 changes: 2 additions & 2 deletions modules/sdk-coin-coredao/test/unit/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
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 @@ -57,7 +57,7 @@ export class CoinMap {
10: 'opeth',
11155420: 'topeth',
1116: 'coredao',
1115: 'tcoredao',
1114: 'tcoredao',
248: 'oas',
9372: 'toas',
14: 'flr',
Expand Down
10 changes: 6 additions & 4 deletions modules/statics/src/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 6e244e6

Please sign in to comment.