Skip to content

Commit 40a8664

Browse files
feat(sdk-coin-celo): update celo testnet config
TICKET: COIN-6224
1 parent 7478abc commit 40a8664

File tree

6 files changed

+25
-24
lines changed

6 files changed

+25
-24
lines changed

modules/sdk-coin-celo/test/resources/celo.ts

Lines changed: 12 additions & 12 deletions
Large diffs are not rendered by default.

modules/sdk-coin-celo/test/unit/transactionBuilder/addressInitialization.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe('An address initialization', () => {
2323
txJson.gasLimit.should.equal('12100000');
2424
txJson.gasPrice.should.equal('1000000000');
2525
should.equal(txJson.nonce, 2);
26-
should.equal(txJson.chainId, 44787);
26+
should.equal(txJson.chainId, 11142220);
2727
should.equal(txJson.from, testData.KEYPAIR_PRV.getAddress());
2828
should.equal(tx.toBroadcastFormat(), testData.TX_ADDRESS_INIT);
2929
should.equal(txJson.deployedAddress, '0x016e4eee27f3f355bbb78d0e5eb813c4761822c9');

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ describe('Send transaction', function () {
308308
.key(key);
309309
const tx = await txBuilder.build();
310310
const txJson = tx.toJson();
311-
should.equal(txJson.v, '0x015e09');
311+
should.equal(txJson.v, '0x015408bb');
312312
});
313313
});
314314

modules/sdk-coin-celo/test/unit/transactionBuilder/walletInitialization.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ describe('Celo Transaction builder for wallet initialization', () => {
3131
txJson.gasLimit.should.equal('12100000');
3232
txJson.gasPrice.should.equal('1000000000');
3333
should.equal(txJson.nonce, 2);
34-
should.equal(txJson.chainId, 44787);
34+
should.equal(txJson.chainId, 11142220);
35+
console.log('tx.toBroadcastFormat(): ', tx.toBroadcastFormat());
3536
should.equal(tx.toBroadcastFormat(), testData.TX_BROADCAST);
3637
should.equal(txJson.from, testData.KEYPAIR_PRV.getAddress());
3738
});
@@ -47,7 +48,7 @@ describe('Celo Transaction builder for wallet initialization', () => {
4748
txJson.gasLimit.should.equal('12100000');
4849
txJson.gasPrice.should.equal('1000000000');
4950
should.equal(txJson.nonce, 0);
50-
should.equal(txJson.chainId, 44787);
51+
should.equal(txJson.chainId, 11142220);
5152
should.equal(txJson.from, testData.KEYPAIR_PRV.getAddress());
5253
});
5354

@@ -60,9 +61,9 @@ describe('Celo Transaction builder for wallet initialization', () => {
6061
txJson.gasLimit.should.equal('12100000');
6162
txJson.gasPrice.should.equal('1000000000');
6263
should.equal(txJson.nonce, 0);
63-
should.equal(txJson.chainId, 44787);
64+
should.equal(txJson.chainId, 11142220);
6465
// Celo has disable final v and it has chain id as v value.
65-
should.equal(txJson.v, 0x015e09);
66+
should.equal(txJson.v, 0x015408bb);
6667
});
6768

6869
it('an init transaction from an unsigned serialized one', async () => {
@@ -75,7 +76,7 @@ describe('Celo Transaction builder for wallet initialization', () => {
7576
newTxBuilder.from(serialized);
7677
newTxBuilder.sign({ key: testData.KEYPAIR_PRV.getKeys().prv });
7778
const signedTx = await newTxBuilder.build();
78-
should.equal(signedTx.toJson().chainId, 44787);
79+
should.equal(signedTx.toJson().chainId, 11142220);
7980
should.equal(signedTx.toBroadcastFormat(), testData.TX_BROADCAST);
8081
});
8182

@@ -90,7 +91,7 @@ describe('Celo Transaction builder for wallet initialization', () => {
9091
const newTxBuilder = getBuilder('tcelo') as TransactionBuilder;
9192
newTxBuilder.from(testData.TEST_WALLET_CREATION);
9293
const newTx = await newTxBuilder.build();
93-
should.equal(newTx.toJson().id, '0x3b6cdb03cc92aae90ae067ec71e27f17ff879e9c6499ab682212bab367628a9c');
94+
should.equal(newTx.toJson().id, '0xbfb1de15a69c20c1467fa9708a8ac71e15e3a162618f865067b541b2db03f894');
9495
});
9596
});
9697

modules/statics/src/map.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export class CoinMap {
105105
80094: 'bera',
106106
80069: 'tbera',
107107
42220: 'celo',
108-
44787: 'tcelo',
108+
11142220: 'tcelo',
109109
2222: 'kava',
110110
2221: 'tkava',
111111
43114: 'avax',

modules/statics/src/networks.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -545,9 +545,9 @@ class Celo extends Mainnet implements EthereumNetwork {
545545
class CeloTestnet extends Testnet implements EthereumNetwork {
546546
name = 'CeloTestnet';
547547
family = CoinFamily.CELO;
548-
explorerUrl = 'https://alfajores-blockscout.celo-testnet.org/tx/';
549-
accountExplorerUrl = 'https://alfajores-blockscout.celo-testnet.org/address/';
550-
chainId = 44787;
548+
explorerUrl = 'https://sepolia.celoscan.io/tx/';
549+
accountExplorerUrl = 'https://sepolia.celoscan.io/address/';
550+
chainId = 11142220;
551551
nativeCoinOperationHashPrefix = 'CELO';
552552
tokenOperationHashPrefix = 'CELO-ERC20';
553553
}

0 commit comments

Comments
 (0)