Skip to content

Commit

Permalink
added blast chain
Browse files Browse the repository at this point in the history
  • Loading branch information
D4mph1r committed Oct 11, 2024
1 parent 095ab73 commit 4cf0551
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export enum TestNetRpcUri {
ENERGI = "https://nodeapi.test.energi.network",
BASE = "https://base-goerli.diamondswap.org/rpc",
FINDORA = "https://prod-testnet.prod.findora.org:8545",
BLAST = "https://blast-sepolia.blockpi.network/v1/rpc/public",
// TODO: Algorand
// TODO: Fuse
}
Expand Down Expand Up @@ -128,6 +129,7 @@ export enum MainNetRpcUri {
ENERGI = "",
BASE = "https://base.llamarpc.com",
FINDORA = "",
BLAST = "https://blastl2-mainnet.public.blastapi.io",
// TODO: Algorand
}

Expand Down Expand Up @@ -191,6 +193,7 @@ export type MetaMap = {
0x2a: Web3Meta;
0x2b: Web3Meta;
0x2c: Web3Meta;
0x2d: Web3Meta;
} & MetaMapAssert;

export namespace Chain {
Expand Down Expand Up @@ -236,6 +239,7 @@ export namespace Chain {
export const ENERGI = 0x2a; //42
export const BASE = 0x2b; //43
export const FINDORA = 0x2c; //44
export const BLAST = 0x2d; //45
}

export enum v3_ChainId {
Expand Down Expand Up @@ -924,6 +928,24 @@ CHAIN_INFO.set(Chain.FINDORA, {
tnBlockExplorerUrlAddr: "https://testnet-anvil.evm.findorascan.io/address/",
tnChainId: 2153,
});

CHAIN_INFO.set(Chain.BASE, {
blockExplorerUrl: "https://blastscan.io/tx",
blockExplorerUrlAddr: "https://blastscan.io/address/",
constructor: web3HelperFactory,
currency: SupportedCurrency.ETH,
currencySymbol: SupportedCurrencyName.ETH,
decimals: Decimals.ETH,
name: "Blast",
nonce: Chain.BLAST,
v3_chainId: v3_ChainId.DEFAULT,
type: ChainType.EVM,
chainId: 81457,
tnBlockExplorerUrl: "https://sepolia.blastexplorer.io/tx/",
tnBlockExplorerUrlAddr: "https://sepolia.blastexplorer.io/address/",
tnChainId: 168587773,
});

setTimeout(() => {
CHAIN_INFO.set(Chain.ELROND, {
name: "Elrond",
Expand Down
36 changes: 36 additions & 0 deletions src/factory/factories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,18 @@ export namespace ChainFactoryConfigs {
nonce: Chain.BASE,
provider: new ethers.providers.JsonRpcProvider(TestNetRpcUri.BASE),
},
blastParams: {
erc1155_addr: "",
erc721_addr: "",
erc1155Minter: "",
erc721Minter: "",
feeMargin,
notifier,
noWhitelist: true,
minter_addr: "",
nonce: Chain.BLAST,
provider: new ethers.providers.JsonRpcProvider(TestNetRpcUri.BLAST),
},
solanaParams: {
xpnftAddr: "C7bw5dJZwhjWd6TZE3LnE2b1RLqWDiy9XRMA1rajPKQY",
bridgeContractAddr: "FXaXLtmkuoJCJeX6BnLwQJWgT8cPdwuXN8BmmQzVvuRA",
Expand Down Expand Up @@ -623,6 +635,18 @@ export namespace ChainFactoryConfigs {
notifier,
provider: new ethers.providers.JsonRpcProvider(MainNetRpcUri.BASE),
},
blastParams: {
erc1155_addr: "",
erc721_addr: "",
erc1155Minter: "",
erc721Minter: "",
feeMargin,
notifier,
noWhitelist: true,
minter_addr: "",
nonce: Chain.BLAST,
provider: new ethers.providers.JsonRpcProvider(TestNetRpcUri.BLAST),
},
nearParams: {
networkId: "mainnet",
nonce: Chain.NEAR,
Expand Down Expand Up @@ -1020,6 +1044,18 @@ export namespace ChainFactoryConfigs {
notifier,
provider: new ethers.providers.JsonRpcProvider(MainNetRpcUri.BASE),
},
blastParams: {
erc1155_addr: "",
erc721_addr: "",
erc1155Minter: "",
erc721Minter: "",
feeMargin,
notifier,
noWhitelist: true,
minter_addr: "",
nonce: Chain.BLAST,
provider: new ethers.providers.JsonRpcProvider(TestNetRpcUri.BLAST),
},
dfinityParams: {
agent: new HttpAgent({
host: "https://ic0.app",
Expand Down
2 changes: 2 additions & 0 deletions src/factory/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ export interface ChainParams {
casperParams: CasperParams;
baseParams: Web3Params;
findoraParams: Web3Params;
blastParams: Web3Params;
}

export type MoralisNetwork = "mainnet" | "testnet";
Expand Down Expand Up @@ -446,6 +447,7 @@ function mapNonceToParams(chainParams: Partial<ChainParams>): ParamMap {
cToP.set(Chain.CASPER, chainParams.casperParams);
cToP.set(Chain.BASE, chainParams.baseParams);
cToP.set(Chain.FINDORA, chainParams.findoraParams);
cToP.set(Chain.BLAST, chainParams.blastParams);
return cToP;
}
/**
Expand Down

0 comments on commit 4cf0551

Please sign in to comment.