Skip to content

Commit

Permalink
2244, blast chain (#581)
Browse files Browse the repository at this point in the history
  • Loading branch information
axtezy authored Mar 1, 2024
2 parents 66065c0 + 516be03 commit cfccb3e
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 16 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rubic-sdk",
"version": "5.3.2",
"version": "5.4.0",
"description": "Simplify dApp creation",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
11 changes: 9 additions & 2 deletions src/common/tokens/constants/native-tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ const testnetNativeTokens: Record<TestnetEvmBlockchain, Token> = {
symbol: 'BERA',
decimals: 18
}),
[BLOCKCHAIN_NAME.BLAST]: new Token({
blockchain: BLOCKCHAIN_NAME.BLAST,
[BLOCKCHAIN_NAME.BLAST_TESTNET]: new Token({
blockchain: BLOCKCHAIN_NAME.BLAST_TESTNET,
address: EvmWeb3Pure.nativeTokenAddress,
name: 'Ether',
symbol: 'ETH',
Expand Down Expand Up @@ -397,5 +397,12 @@ export const nativeTokensList: Record<BlockchainName, Token> = {
name: 'Solana',
symbol: 'SOL',
decimals: 9
}),
[BLOCKCHAIN_NAME.BLAST]: new Token({
blockchain: BLOCKCHAIN_NAME.BLAST,
address: EvmWeb3Pure.nativeTokenAddress,
name: 'Ether',
symbol: 'ETH',
decimals: 18
})
};
3 changes: 2 additions & 1 deletion src/common/tokens/constants/wrapped-addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,14 @@ export const wrappedAddress: Partial<Record<EvmBlockchainName, string>> = {
[BLOCKCHAIN_NAME.MANTA_PACIFIC]: '0x0Dc808adcE2099A9F62AA87D9670745AbA741746',
[BLOCKCHAIN_NAME.SCROLL]: '0x5300000000000000000000000000000000000004',
[BLOCKCHAIN_NAME.ZETACHAIN]: '0x5F0b1a82749cb4E2278EC87F8BF6B618dC71a8bf',
[BLOCKCHAIN_NAME.BLAST]: '0x4300000000000000000000000000000000000004',
// Testnet
[BLOCKCHAIN_NAME.GOERLI]: '0xb4fbf271143f4fbf7b91a5ded31805e42b2208d6',
[BLOCKCHAIN_NAME.SCROLL_SEPOLIA]: '0x5300000000000000000000000000000000000004',
[BLOCKCHAIN_NAME.ARTHERA]: '0xC7A183Ad373301d68f7E0Ee824c8c727C7D5B21d',
[BLOCKCHAIN_NAME.TAIKO]: '0x0011E559da84dde3f841e22dc33F3adbF184D84A',
[BLOCKCHAIN_NAME.SEPOLIA]: '0xfff9976782d46cc05630d1f6ebab18b2324d6b14',
[BLOCKCHAIN_NAME.BERACHAIN]: '0x5806E416dA447b267cEA759358cF22Cc41FAE80F',
[BLOCKCHAIN_NAME.BLAST]: '0x4200000000000000000000000000000000000023',
[BLOCKCHAIN_NAME.BLAST_TESTNET]: '0x4200000000000000000000000000000000000023',
[BLOCKCHAIN_NAME.HOLESKY]: ''
};
11 changes: 9 additions & 2 deletions src/common/tokens/constants/wrapped-native-tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,8 @@ export const wrappedNativeTokensList: Partial<Record<EvmBlockchainName, Token>>
symbol: 'WBERA',
decimals: 18
}),
[BLOCKCHAIN_NAME.BLAST]: new Token({
blockchain: BLOCKCHAIN_NAME.BLAST,
[BLOCKCHAIN_NAME.BLAST_TESTNET]: new Token({
blockchain: BLOCKCHAIN_NAME.BLAST_TESTNET,
address: '0x4200000000000000000000000000000000000023',
name: 'Wrapped ETH',
symbol: 'WETH',
Expand All @@ -380,5 +380,12 @@ export const wrappedNativeTokensList: Partial<Record<EvmBlockchainName, Token>>
name: 'Wrapped ETH',
symbol: 'WETH',
decimals: 18
}),
[BLOCKCHAIN_NAME.BLAST]: new Token({
blockchain: BLOCKCHAIN_NAME.BLAST,
address: '0x4300000000000000000000000000000000000004',
name: 'Wrapped ETH',
symbol: 'WETH',
decimals: 18
})
};
5 changes: 3 additions & 2 deletions src/core/blockchain/models/blockchain-name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const TEST_EVM_BLOCKCHAIN_NAME = {
TAIKO: 'TAIKO',
SEPOLIA: 'SEPOLIA',
BERACHAIN: 'BERACHAIN',
BLAST: 'BLAST',
BLAST_TESTNET: 'BLAST_TESTNET',
HOLESKY: 'HOLESKY'
} as const;

Expand Down Expand Up @@ -57,7 +57,8 @@ export const EVM_BLOCKCHAIN_NAME = {
MANTLE: 'MANTLE',
MANTA_PACIFIC: 'MANTA_PACIFIC',
SCROLL: 'SCROLL',
ZETACHAIN: 'ZETACHAIN'
ZETACHAIN: 'ZETACHAIN',
BLAST: 'BLAST'
} as const;

export const BLOCKCHAIN_NAME = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const blockchainId: Record<BlockchainName, number> = {
[BLOCKCHAIN_NAME.MANTA_PACIFIC]: 169,
[BLOCKCHAIN_NAME.SCROLL]: 534352,
[BLOCKCHAIN_NAME.ZETACHAIN]: 7000,
[BLOCKCHAIN_NAME.BLAST]: 81457,
// Tesnents
[BLOCKCHAIN_NAME.GOERLI]: 5,
[BLOCKCHAIN_NAME.BINANCE_SMART_CHAIN_TESTNET]: 87,
Expand All @@ -65,7 +66,7 @@ export const blockchainId: Record<BlockchainName, number> = {
[BLOCKCHAIN_NAME.TAIKO]: 167008,
[BLOCKCHAIN_NAME.SEPOLIA]: 11155111,
[BLOCKCHAIN_NAME.BERACHAIN]: 80085,
[BLOCKCHAIN_NAME.BLAST]: 168587773,
[BLOCKCHAIN_NAME.BLAST_TESTNET]: 168587773,
[BLOCKCHAIN_NAME.HOLESKY]: 17000,
// Non EVN blockchains
[BLOCKCHAIN_NAME.BITCOIN]: 5555,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ export const MULTICALL_ADDRESSES: Record<Web3PublicSupportedBlockchain, string>
[BLOCKCHAIN_NAME.MANTA_PACIFIC]: '0xf43727c9BEb4C0aA3fEE1281A902e518f8586E54',
[BLOCKCHAIN_NAME.SCROLL]: '0xcA11bde05977b3631167028862bE2a173976CA11',
[BLOCKCHAIN_NAME.BERACHAIN]: '',
[BLOCKCHAIN_NAME.BLAST]: '',
[BLOCKCHAIN_NAME.BLAST_TESTNET]: '',
[BLOCKCHAIN_NAME.ZETACHAIN]: '0xcA11bde05977b3631167028862bE2a173976CA11',
[BLOCKCHAIN_NAME.HOLESKY]: '0xcA11bde05977b3631167028862bE2a173976CA11'
[BLOCKCHAIN_NAME.HOLESKY]: '0xcA11bde05977b3631167028862bE2a173976CA11',
[BLOCKCHAIN_NAME.BLAST]: '0xcA11bde05977b3631167028862bE2a173976CA11'
};
9 changes: 6 additions & 3 deletions src/core/coingecko-api/coingecko-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ const supportedBlockchains = [
BLOCKCHAIN_NAME.PULSECHAIN,
BLOCKCHAIN_NAME.LINEA,
BLOCKCHAIN_NAME.MANTLE,
BLOCKCHAIN_NAME.BASE
BLOCKCHAIN_NAME.BASE,
BLOCKCHAIN_NAME.BLAST
] as const;

type SupportedBlockchain = (typeof supportedBlockchains)[number];
Expand Down Expand Up @@ -115,7 +116,8 @@ export class CoingeckoApi {
[BLOCKCHAIN_NAME.PULSECHAIN]: 'pulsechain',
[BLOCKCHAIN_NAME.LINEA]: 'ethereum',
[BLOCKCHAIN_NAME.MANTLE]: 'mantle',
[BLOCKCHAIN_NAME.BASE]: 'ethereum'
[BLOCKCHAIN_NAME.BASE]: 'ethereum',
[BLOCKCHAIN_NAME.BLAST]: 'blast'
};

this.tokenBlockchainId = {
Expand Down Expand Up @@ -161,7 +163,8 @@ export class CoingeckoApi {
[BLOCKCHAIN_NAME.PULSECHAIN]: 'pulsechain',
[BLOCKCHAIN_NAME.LINEA]: 'linea',
[BLOCKCHAIN_NAME.MANTLE]: 'mantle',
[BLOCKCHAIN_NAME.BASE]: 'base'
[BLOCKCHAIN_NAME.BASE]: 'base',
[BLOCKCHAIN_NAME.BLAST]: 'blast-2'
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ export const orbiterContractAddresses: Record<OrbiterSupportedBlockchain, string
[BLOCKCHAIN_NAME.BASE]: '0x13e46b2a3f8512ed4682a8fb8b560589fe3c2172',
[BLOCKCHAIN_NAME.MANTA_PACIFIC]: '0x13e46b2a3f8512ed4682a8fb8b560589fe3c2172',
[BLOCKCHAIN_NAME.SCROLL]: '0x13e46b2a3f8512ed4682a8fb8b560589fe3c2172',
[BLOCKCHAIN_NAME.BLAST]: '0x13E46b2a3f8512eD4682a8Fb8B560589fE3C2172',
[BLOCKCHAIN_NAME.STARKNET]: '0x0173f81c529191726c6e7287e24626fe24760ac44dae2a1f7e02080230f8458b'
};
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const orbiterSupportedBlockchains = [
BLOCKCHAIN_NAME.MANTA_PACIFIC,
BLOCKCHAIN_NAME.SCROLL,
BLOCKCHAIN_NAME.ZETACHAIN,
BLOCKCHAIN_NAME.BLAST,
BLOCKCHAIN_NAME.STARKNET
] as const;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ export const openOceanBlockchainName: Record<OpenoceanOnChainSupportedBlockchain
[BLOCKCHAIN_NAME.BASE]: 'base',
[BLOCKCHAIN_NAME.MANTA_PACIFIC]: 'manta',
[BLOCKCHAIN_NAME.METIS]: 'metis',
[BLOCKCHAIN_NAME.SCROLL]: 'scroll'
[BLOCKCHAIN_NAME.SCROLL]: 'scroll',
[BLOCKCHAIN_NAME.BLAST]: 'blast'
};
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export const openoceanOnChainSupportedBlockchains = [
BLOCKCHAIN_NAME.BASE,
BLOCKCHAIN_NAME.MANTA_PACIFIC,
BLOCKCHAIN_NAME.METIS,
BLOCKCHAIN_NAME.SCROLL
BLOCKCHAIN_NAME.SCROLL,
BLOCKCHAIN_NAME.BLAST
] as const;

export type OpenoceanOnChainSupportedBlockchain =
Expand Down

0 comments on commit cfccb3e

Please sign in to comment.