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
29 changes: 29 additions & 0 deletions src/constants/chainList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const chains = {
blockchain: "eth",
currency: "ETH",
explorer: "https://etherscan.io",
icon_url: "https://icons.llamao.fi/icons/chains/rsz_ethereum.jpg",
},
137: {
name: "Polygon",
Expand All @@ -14,6 +15,7 @@ const chains = {
blockchain: "polygon",
currency: "MATIC",
explorer: "https://polygonscan.com",
icon_url: "https://icons.llamao.fi/icons/chains/rsz_polygon.jpg",
},
80001: {
name: "Polygon Mumbai",
Expand All @@ -22,6 +24,7 @@ const chains = {
blockchain: "polygon_mumbai",
currency: "MATIC",
explorer: "https://mumbai.polygonscan.com",
icon_url: "https://icons.llamao.fi/icons/chains/rsz_polygon.jpg",
},
42161: {
name: "Arbitrum One",
Expand All @@ -30,6 +33,7 @@ const chains = {
rpc_url: "https://rpc.ankr.com/arbitrum",
currency: "ETH",
explorer: "https://arbiscan.io",
icon_url: "https://icons.llamao.fi/icons/chains/rsz_arbitrum.jpg",
},
56: {
name: "BNB Smart Chain",
Expand All @@ -38,6 +42,7 @@ const chains = {
rpc_url: "https://rpc.ankr.com/bsc",
currency: "BNB",
explorer: "https://bscscan.com",
icon_url: "https://icons.llamao.fi/icons/chains/rsz_binance.jpg",
},
97: {
name: "BNB Smart Chain Testnet",
Expand All @@ -46,6 +51,7 @@ const chains = {
rpc_url: "https://rpc.ankr.com/bsc_testnet_chapel",
currency: "BNB",
explorer: "https://testnet.bscscan.com",
icon_url: "https://icons.llamao.fi/icons/chains/rsz_binance.jpg",
},
204: {
name: "opBNB Mainnet",
Expand All @@ -54,6 +60,25 @@ const chains = {
rpc_url: "https://1rpc.io/opbnb",
currency: "BNB",
explorer: "https://opbnbscan.com/",
icon_url: "https://icons.llamao.fi/icons/chains/rsz_binance.jpg",
},
59144: {
name: "Linea",
chain_id: 59144,
rpc_url: "https://1rpc.io/linea",
blockchain: "linea",
currency: "ETH",
explorer: "https://lineascan.build",
icon_url: "https://icons.llamao.fi/icons/chains/rsz_linea.jpg",
},
59140: {
name: "Linea Goerli",
chain_id: 59140,
rpc_url: "https://rpc.goerli.linea.build",
blockchain: "linea_testnet",
currency: "ETH",
explorer: "https://goerli.lineascan.build",
icon_url: "https://icons.llamao.fi/icons/chains/rsz_linea.jpg",
},
};

Expand All @@ -74,6 +99,8 @@ export enum ChainNames {
"bsc" = "BNB Smart Chain",
"bsc_testnet_chapel" = "BNB Smart Chain Testnet",
"opbnb" = "opBNB Mainnet",
"linea" = "Linea",
"linea_testnet" = "Linea Goerli",
}

export enum ChainIds {
Expand All @@ -84,6 +111,8 @@ export enum ChainIds {
"bsc" = 56,
"bsc_testnet_chapel" = 97,
"opbnb" = 204,
"linea" = 59144,
"linea_testnet" = 59140,
}

export const SupportedChainIdsForAccounts = {
Expand Down
2 changes: 1 addition & 1 deletion src/services/send.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ async function nativeTokenTransfer(
value: decimalAmount.mul(Decimal.pow(10, 18)).ceil().toHexadecimal(),
};
if (feeData) {
rawTx.gasLimit = 21000n;
// rawTx.gasLimit = 21000n;
rawTx.maxFeePerGas = feeData.maxFeePerGas;
rawTx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;
}
Expand Down
1 change: 1 addition & 0 deletions src/use/switchChain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export async function switchChain(chainId) {
},
rpcUrls: [chainDetails.rpc_url],
blockExplorerUrls: [chainDetails.explorer],
iconUrls: [chainDetails.icon_url],
},
],
});
Expand Down