Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions modules/sdk-core/src/bitgo/environments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ interface EnvironmentTemplate {
baseUrl: string;
apiToken?: string;
rpcUrl?: string;
tokenId?: number;
systemAddr?: string;
};
};
// The key here is coinFamily and it will be same for both mainnet and testnet (eg: 'cronos')
Expand Down Expand Up @@ -224,6 +226,9 @@ const mainnetBase: EnvironmentTemplate = {
},
hypeevm: {
baseUrl: 'https://api.etherscan.io/v2',
// These are used for Bridging assets on hype chain.
tokenId: 150,
systemAddr: '0x2222222222222222222222222222222222222222',
},
og: {
baseUrl: 'https://chainscan.0g.ai/open',
Expand Down Expand Up @@ -406,6 +411,9 @@ const testnetBase: EnvironmentTemplate = {
},
hypeevm: {
baseUrl: 'https://rpc.hyperliquid-testnet.xyz/evm', // Not Available
// These are used for Bridging assets on hype chain.
tokenId: 1105,
systemAddr: '0x2222222222222222222222222222222222222222',
},
og: {
baseUrl: 'https://chainscan-test.0g.ai/open',
Expand Down
18 changes: 18 additions & 0 deletions modules/sdk-core/test/unit/bitgo/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,21 @@ describe('zkSync Era Environment Configuration', function () {
testnetEnv.evm?.zksyncera.baseUrl.should.equal('https://api.etherscan.io/v2');
});
});

describe('HypeEvm Bridging Environment Configuration', function () {
it('should have bridging config for mainnet Hypeevm', function () {
const mainnetEnv = Environments.prod;
should.exist(mainnetEnv.evm);
should.exist(mainnetEnv.evm?.hypeevm);
mainnetEnv.evm?.hypeevm.tokenId?.should.equal(150);
mainnetEnv.evm?.hypeevm.systemAddr?.should.equal('0x2222222222222222222222222222222222222222');
});

it('should have bridging config for testnet Hypeevm', function () {
const testnetEnv = Environments.test;
should.exist(testnetEnv.evm);
should.exist(testnetEnv.evm?.hypeevm);
testnetEnv.evm?.hypeevm.tokenId?.should.equal(1105);
testnetEnv.evm?.hypeevm.systemAddr?.should.equal('0x2222222222222222222222222222222222222222');
});
});