Skip to content

Commit

Permalink
Merge pull request #5406 from BitGo/WIN-4388_cartio_bera
Browse files Browse the repository at this point in the history
chore(sdk-coin-bera): add bera Cartio testnet
  • Loading branch information
adarsh312 authored Jan 22, 2025
2 parents c7fa1dd + b10ac05 commit ca76411
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 134 deletions.
2 changes: 1 addition & 1 deletion modules/sdk-coin-bera/src/lib/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { coins, EthereumNetwork } from '@bitgo/statics';

export const testnetCommon = EthereumCommon.custom(
{
name: 'Berachain bArtio',
name: 'Berachain cArtio',
networkId: (coins.get('tbera').network as EthereumNetwork).chainId,
chainId: (coins.get('tbera').network as EthereumNetwork).chainId,
},
Expand Down
18 changes: 8 additions & 10 deletions modules/sdk-coin-bera/test/resources.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion modules/sdk-coin-bera/test/unit/bera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ describe('Bera', function () {
bera.should.be.an.instanceof(Bera);
bera.getChain().should.equal('bera');
bera.getFamily().should.equal('bera');
bera.getFullName().should.equal('berachain');
bera.getFullName().should.equal('Bera');
bera.getBaseFactor().should.equal(1e18);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe('Bera address initialization', () => {
txBuilder.sign({ key: testData.KEYPAIR_PRV.getKeys().prv });
const tx = await txBuilder.build();
const txJson = tx.toJson();
should.equal(txJson.deployedAddress, '0xfaa32fa9edbc6fd8bdfc765c218fe8f83267c6da');
should.equal(txJson.deployedAddress, '0xd9d189aa6907a4fafd3c66e8cc178011b1f443f5');
should.equal(txJson.to, testData.FORWARDER_FACTORY_ADDRESS);
});

Expand Down
2 changes: 1 addition & 1 deletion modules/sdk-coin-bera/test/unit/transactionBuilder/send.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('Bera transaction builder send', () => {
txBuilder.sign({ key: testData.PRIVATE_KEY_1 });
const tx = await txBuilder.build();

should.equal(tx.toJson().chainId, 0x138d4);
should.equal(tx.toJson().chainId, 0x13880);
should.equal(tx.toBroadcastFormat(), testData.SEND_TX_BROADCAST_LEGACY);
should.equal(tx.signature.length, 2);
should.equal(tx.inputs.length, 1);
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion modules/statics/src/coins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1384,7 +1384,7 @@ export const coins = CoinMap.fromCoins([
account(
'ac3c225e-55a9-4236-b907-a4cccc30a2fd',
'bera',
'berachain',
'Bera',
Networks.main.bera,
18,
UnderlyingAsset.BERA,
Expand Down
18 changes: 8 additions & 10 deletions modules/statics/src/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1090,16 +1090,14 @@ class Berachain extends Mainnet implements EthereumNetwork {
class BerachainTestnet extends Testnet implements EthereumNetwork {
name = 'BerachainTestnet';
family = CoinFamily.BERA;
explorerUrl = 'https://bartio.beratrail.io/tx/';
accountExplorerUrl = 'https://bartio.beratrail.io/address/';
chainId = 80084;
nativeCoinOperationHashPrefix = '80084';
tokenOperationHashPrefix = '80084-ERC20';
forwarderFactoryAddress = '0xccadf4198de4957d07d80673684ed19310579fc4';
forwarderImplementationAddress = '0xc75fb848eb0bb04e3faedbee0fc8144e8d62b83d';
walletFactoryAddress = '0x6e4a83086c6dd9fbce203c1ebb69eda1aba872d7';
walletImplementationAddress = '0xb8d48d310818b15a6960f9afbef49dc96d2bd2d3';
batcherContractAddress = '0xf499549720116c3dEA867D4fC279C43aCA172712';
explorerUrl = 'https://80000.testnet.routescan.io/tx/';
accountExplorerUrl = 'https://80000.testnet.routescan.io/address/';
chainId = 80000;
nativeCoinOperationHashPrefix = '80000';
tokenOperationHashPrefix = '80000-ERC20';
batcherContractAddress = '0xedf1a0016d9c41d2ad0c275e1ba708361a90c0d1';
forwarderFactoryAddress = '0x37996e762fa8b671869740c79eb33f625b3bf92a';
forwarderImplementationAddress = '0xd5fe1c1f216b775dfd30638fa7164d41321ef79b';
}

class Oas extends Mainnet implements EthereumNetwork {
Expand Down

0 comments on commit ca76411

Please sign in to comment.