@zebec-network/evm-card-sdk
Version:
An sdk for interacting with zebec card evm contracts
93 lines (92 loc) • 4.88 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DEFAULT_GAS_LIMIT = exports.ATOKEN_ADDRESS = exports.WETH_ADDRESS = exports.USDC_ADDRESS = exports.ZEBEC_CARD_ADDRESS = exports.ODYSSEY_CHAIN_IDS = exports.SupportedChain = void 0;
exports.parseSupportedChain = parseSupportedChain;
/**
* Supported Chain Ids by SDK
*/
var SupportedChain;
(function (SupportedChain) {
SupportedChain[SupportedChain["Mainnet"] = 1] = "Mainnet";
SupportedChain[SupportedChain["Sepolia"] = 11155111] = "Sepolia";
SupportedChain[SupportedChain["Base"] = 8453] = "Base";
SupportedChain[SupportedChain["Bsc"] = 56] = "Bsc";
SupportedChain[SupportedChain["BscTestnet"] = 97] = "BscTestnet";
SupportedChain[SupportedChain["OdysseyTestnet"] = 131313] = "OdysseyTestnet";
SupportedChain[SupportedChain["Odyssey"] = 153153] = "Odyssey";
SupportedChain[SupportedChain["Polygon"] = 137] = "Polygon";
SupportedChain[SupportedChain["PolygonAmoy"] = 80002] = "PolygonAmoy";
})(SupportedChain || (exports.SupportedChain = SupportedChain = {}));
function parseSupportedChain(chainId) {
switch (chainId) {
case 1:
return SupportedChain.Mainnet;
case 11155111:
return SupportedChain.Sepolia;
case 8453:
return SupportedChain.Base;
case 56:
return SupportedChain.Bsc;
case 97:
return SupportedChain.BscTestnet;
case 131313:
return SupportedChain.OdysseyTestnet;
case 153153:
return SupportedChain.Odyssey;
case 137:
return SupportedChain.Polygon;
case 80002:
return SupportedChain.PolygonAmoy;
default:
throw new Error(`Chain Id: ${chainId} not supported.`);
}
}
/**
* Odyssey chain ids
*/
exports.ODYSSEY_CHAIN_IDS = [SupportedChain.Odyssey, SupportedChain.OdysseyTestnet];
exports.ZEBEC_CARD_ADDRESS = {
[]: "0xD0e8f23ACcC1a7147Fb17E078A5cbe7ff1F47407",
[]: "0x1bF6419D8555EafaE79142D309534e8aBd54aBa3",
[]: "0xB4f6E946E12200F4E0ba3B352B8DbF0a66635b53",
[]: "0x1bF6419D8555EafaE79142D309534e8aBd54aBa3",
[]: "0x9061E6eB59890D33C94B9f517c3dba30621fAB2f",
[]: "0x597fA3656FF24034939edce2d74480c0619F51A7",
[]: "0x935D149eCB4E3F3824327e7d4357180a08aE8a15",
[]: "0xB4f6E946E12200F4E0ba3B352B8DbF0a66635b53",
[]: "0xB4f6E946E12200F4E0ba3B352B8DbF0a66635b53",
};
exports.USDC_ADDRESS = {
[]: "0x94a9D9AC8a22534E3FaCa9F4e7F2E2cf85d5E4C8",
[]: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
[]: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
[]: "0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d",
[]: "0xF8Dc6f35a10244213096D86c376491042594a84e",
[]: "0x1bF6419D8555EafaE79142D309534e8aBd54aBa3",
[]: "0x8aBEE32587864cce7000e6f2820680874eD6100A",
[]: "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
[]: "0x935d149ecb4e3f3824327e7d4357180a08ae8a15",
};
exports.WETH_ADDRESS = {
[]: "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9",
[]: "0x4200000000000000000000000000000000000006",
[]: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
[]: "0x094616F0BdFB0b526bD735Bf66Eca0Ad254ca81F",
[]: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
[]: "0xF21Cbaf7bD040D686Bd390957770D2ea652E4013",
[]: "0xF21Cbaf7bD040D686Bd390957770D2ea652E4013",
[]: "0x0000000000000000000000000000000000001010",
[]: "0x0000000000000000000000000000000000000000",
};
exports.ATOKEN_ADDRESS = {
[]: "0x16dA4541aD1807f4443d92D26044C1147406EB80",
[]: "0x4e65fE4DbA92790696d040ac24Aa414708F5c0AB",
[]: "0x00901a076785e0906d1028c7d6372d247bec7d61",
[]: "0x0000000000000000000000000000000000000000",
[]: "0x98C23E9d8f34FEFb1B7BD6a91B7FF122F4e16F5c",
[]: "0x0000000000000000000000000000000000000000",
[]: "0x0000000000000000000000000000000000000000",
[]: "0x0000000000000000000000000000000000000000",
[]: "0x0000000000000000000000000000000000000000",
};
exports.DEFAULT_GAS_LIMIT = 3000000; // Default gas limit for transactions