Skip to content
Open
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
10 changes: 10 additions & 0 deletions src/blockchain/chains.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,16 @@ export const RAW_CHAIN_CONFIGS: RawChainConfig[] = [
rpcUrl: hyperEvm.rpcUrls.default.http[0],
nativeCurrency: hyperEvm.nativeCurrency,
},
{
id: 9745n,
name: 'Plasma',
type: ChainType.EVM,
env: 'production',
rpcUrl: 'https://rpc.plasma.to',
portalAddress: '0x399Dbd5DF04f83103F77A58cBa2B7c4d3cdede97',
provers: { Hyperlane: '0xC972B26C1E208845Ca8C18c6B83466bFCeED8c2F' },
nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
},

// EVM - Development
{
Expand Down
10 changes: 10 additions & 0 deletions src/config/tokens.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,16 @@ export const TOKEN_CONFIGS: Record<string, TokenConfig> = {
), // BNB Smart Chain
},
},
USDT0: {
symbol: 'USDT0',
name: 'USDT0',
decimals: 6,
addresses: {
'9745': AddressNormalizer.normalizeEvm(
'0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb' as EvmAddress
), // Plasma
},
},
ETH: {
symbol: 'ETH',
name: 'Ether',
Expand Down
46 changes: 46 additions & 0 deletions tests/core/config/plasma-mainnet.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import { RAW_CHAIN_CONFIGS } from '@/blockchain/chains.config';
import { TOKEN_CONFIGS } from '@/config/tokens.config';
import { ChainType } from '@/shared/types';

describe('Plasma mainnet chain config', () => {
const plasma = RAW_CHAIN_CONFIGS.find(c => c.id === 9745n);

it('exists in RAW_CHAIN_CONFIGS', () => {
expect(plasma).toBeDefined();
});

it('has correct static properties', () => {
expect(plasma).toMatchObject({
id: 9745n,
name: 'Plasma',
type: ChainType.EVM,
env: 'production',
rpcUrl: 'https://rpc.plasma.to',
portalAddress: '0x399Dbd5DF04f83103F77A58cBa2B7c4d3cdede97',
});
});

it('has Hyperlane prover address', () => {
expect(plasma?.provers?.Hyperlane).toBe('0xC972B26C1E208845Ca8C18c6B83466bFCeED8c2F');
});
});

describe('USDT0 token config', () => {
const usdt0 = TOKEN_CONFIGS['USDT0'];

it('exists in TOKEN_CONFIGS', () => {
expect(usdt0).toBeDefined();
});

it('has correct symbol and decimals', () => {
expect(usdt0.symbol).toBe('USDT0');
expect(usdt0.decimals).toBe(6);
});

it('has a normalized address for Plasma mainnet (chain 9745)', () => {
const addr = usdt0.addresses['9745'];
expect(addr).toBeDefined();
expect(addr).toMatch(/^0x[0-9a-fA-F]{64}$/);
expect(addr.toLowerCase()).toContain('b8ce59fc3717ada4c02eadf9682a9e934f625ebb');
});
});
Loading