@etherspot/remote-signer
Version:
Etherspot Permissioned Signer SDK - signs the UserOp with SessionKey and sends it to the Bundler
1,952 lines (1,891 loc) • 227 kB
JavaScript
import {
ancient8,
ancient8Sepolia,
base,
optimism,
optimismSepolia
} from "./chunk-2ENCRYRN.mjs";
import {
defineBlock,
defineChain,
defineTransaction,
defineTransactionReceipt,
formatLog,
formatTransaction,
maxUint16,
serializeAccessList,
serializeTransaction,
sha256,
toRlp,
toYParitySignatureArray
} from "./chunk-EGVR4AKQ.mjs";
import {
BaseError,
FeeCapTooHighError,
InvalidAddressError,
InvalidChainIdError,
TipAboveFeeCapError,
concatHex,
defineTransactionRequest,
hexToBigInt,
hexToBytes,
hexToNumber,
isAddress,
pad,
toBytes,
toHex,
trim
} from "./chunk-VPBLFL5G.mjs";
import {
__export
} from "./chunk-W3I6WR3Q.mjs";
// node_modules/viem/_esm/chains/index.js
var chains_exports = {};
__export(chains_exports, {
acala: () => acala,
ancient8: () => ancient82,
ancient8Sepolia: () => ancient8Sepolia2,
anvil: () => anvil,
apexTestnet: () => apexTestnet,
arbitrum: () => arbitrum,
arbitrumGoerli: () => arbitrumGoerli,
arbitrumNova: () => arbitrumNova,
arbitrumSepolia: () => arbitrumSepolia,
areonNetwork: () => areonNetwork,
areonNetworkTestnet: () => areonNetworkTestnet,
astar: () => astar,
astarZkEVM: () => astarZkEVM,
astarZkyoto: () => astarZkyoto,
aurora: () => aurora,
auroraTestnet: () => auroraTestnet,
auroria: () => auroria,
avalanche: () => avalanche,
avalancheFuji: () => avalancheFuji,
bahamut: () => bahamut,
base: () => base2,
baseGoerli: () => baseGoerli,
baseSepolia: () => baseSepolia,
beam: () => beam,
beamTestnet: () => beamTestnet,
bearNetworkChainMainnet: () => bearNetworkChainMainnet,
bearNetworkChainTestnet: () => bearNetworkChainTestnet,
berachainTestnet: () => berachainTestnet,
berachainTestnetbArtio: () => berachainTestnetbArtio,
bevmMainnet: () => bevmMainnet,
bitTorrent: () => bitTorrent,
bitTorrentTestnet: () => bitTorrentTestnet,
bitkub: () => bitkub,
bitkubTestnet: () => bitkubTestnet,
blast: () => blast,
blastSepolia: () => blastSepolia,
bob: () => bob,
boba: () => boba,
bronos: () => bronos,
bronosTestnet: () => bronosTestnet,
bsc: () => bsc,
bscGreenfield: () => bscGreenfield,
bscTestnet: () => bscTestnet,
btr: () => btr,
btrTestnet: () => btrTestnet,
bxn: () => bxn,
bxnTestnet: () => bxnTestnet,
canto: () => canto,
celo: () => celo,
celoAlfajores: () => celoAlfajores,
chiliz: () => chiliz,
classic: () => classic,
confluxESpace: () => confluxESpace,
confluxESpaceTestnet: () => confluxESpaceTestnet,
coreDao: () => coreDao,
cronos: () => cronos,
cronosTestnet: () => cronosTestnet,
crossbell: () => crossbell,
cyber: () => cyber,
cyberTestnet: () => cyberTestnet,
darwinia: () => darwinia,
dchain: () => dchain,
dchainTestnet: () => dchainTestnet,
defichainEvm: () => defichainEvm,
defichainEvmTestnet: () => defichainEvmTestnet,
degen: () => degen,
dfk: () => dfk,
dodochainTestnet: () => dodochainTestnet,
dogechain: () => dogechain,
dreyerxMainnet: () => dreyerxMainnet,
edgeless: () => edgeless,
edgelessTestnet: () => edgelessTestnet,
edgeware: () => edgeware,
edgewareTestnet: () => edgewareTestnet,
ekta: () => ekta,
ektaTestnet: () => ektaTestnet,
eon: () => eon,
eos: () => eos,
eosTestnet: () => eosTestnet,
etherlink: () => etherlink,
etherlinkTestnet: () => etherlinkTestnet,
evmos: () => evmos,
evmosTestnet: () => evmosTestnet,
fantom: () => fantom,
fantomSonicTestnet: () => fantomSonicTestnet,
fantomTestnet: () => fantomTestnet,
fibo: () => fibo,
filecoin: () => filecoin,
filecoinCalibration: () => filecoinCalibration,
filecoinHyperspace: () => filecoinHyperspace,
flare: () => flare,
flareTestnet: () => flareTestnet,
flowMainnet: () => flowMainnet,
flowPreviewnet: () => flowPreviewnet,
flowTestnet: () => flowTestnet,
foundry: () => foundry,
fraxtal: () => fraxtal,
fraxtalTestnet: () => fraxtalTestnet,
funkiSepolia: () => funkiSepolia,
fuse: () => fuse,
fuseSparknet: () => fuseSparknet,
gnosis: () => gnosis,
gnosisChiado: () => gnosisChiado,
gobi: () => gobi,
goerli: () => goerli,
ham: () => ham,
haqqMainnet: () => haqqMainnet,
haqqTestedge2: () => haqqTestedge2,
hardhat: () => hardhat,
harmonyOne: () => harmonyOne,
hedera: () => hedera,
hederaPreviewnet: () => hederaPreviewnet,
hederaTestnet: () => hederaTestnet,
holesky: () => holesky,
immutableZkEvm: () => immutableZkEvm,
immutableZkEvmTestnet: () => immutableZkEvmTestnet,
inEVM: () => inEVM,
iotex: () => iotex,
iotexTestnet: () => iotexTestnet,
jbc: () => jbc,
jbcTestnet: () => jbcTestnet,
kakarotSepolia: () => kakarotSepolia,
karura: () => karura,
kava: () => kava,
kavaTestnet: () => kavaTestnet,
kcc: () => kcc,
klaytn: () => klaytn,
klaytnBaobab: () => klaytnBaobab,
kroma: () => kroma,
kromaSepolia: () => kromaSepolia,
l3x: () => l3x,
l3xTestnet: () => l3xTestnet,
lightlinkPegasus: () => lightlinkPegasus,
lightlinkPhoenix: () => lightlinkPhoenix,
linea: () => linea,
lineaGoerli: () => lineaGoerli,
lineaSepolia: () => lineaSepolia,
lineaTestnet: () => lineaTestnet,
lisk: () => lisk,
liskSepolia: () => liskSepolia,
localhost: () => localhost,
lukso: () => lukso,
luksoTestnet: () => luksoTestnet,
lycan: () => lycan,
mainnet: () => mainnet,
mandala: () => mandala,
manta: () => manta,
mantaSepoliaTestnet: () => mantaSepoliaTestnet,
mantaTestnet: () => mantaTestnet,
mantle: () => mantle,
mantleSepoliaTestnet: () => mantleSepoliaTestnet,
mantleTestnet: () => mantleTestnet,
merlin: () => merlin,
metachain: () => metachain,
metachainIstanbul: () => metachainIstanbul,
metalL2: () => metalL2,
meter: () => meter,
meterTestnet: () => meterTestnet,
metis: () => metis,
metisGoerli: () => metisGoerli,
mev: () => mev,
mevTestnet: () => mevTestnet,
mintSepoliaTestnet: () => mintSepoliaTestnet,
mode: () => mode,
modeTestnet: () => modeTestnet,
moonbaseAlpha: () => moonbaseAlpha,
moonbeam: () => moonbeam,
moonbeamDev: () => moonbeamDev,
moonriver: () => moonriver,
morphHolesky: () => morphHolesky,
morphSepolia: () => morphSepolia,
nautilus: () => nautilus,
neonDevnet: () => neonDevnet,
neonMainnet: () => neonMainnet,
nexi: () => nexi,
nexilix: () => nexilix,
oasisTestnet: () => oasisTestnet,
oasys: () => oasys,
okc: () => okc,
oortMainnetDev: () => oortMainnetDev,
opBNB: () => opBNB,
opBNBTestnet: () => opBNBTestnet,
optimism: () => optimism2,
optimismGoerli: () => optimismGoerli,
optimismSepolia: () => optimismSepolia2,
otimDevnet: () => otimDevnet,
palm: () => palm,
palmTestnet: () => palmTestnet,
pgn: () => pgn,
pgnTestnet: () => pgnTestnet,
phoenix: () => phoenix,
playfiAlbireo: () => playfiAlbireo,
plinga: () => plinga,
plumeTestnet: () => plumeTestnet,
polygon: () => polygon,
polygonAmoy: () => polygonAmoy,
polygonMumbai: () => polygonMumbai,
polygonZkEvm: () => polygonZkEvm,
polygonZkEvmCardona: () => polygonZkEvmCardona,
polygonZkEvmTestnet: () => polygonZkEvmTestnet,
pulsechain: () => pulsechain,
pulsechainV4: () => pulsechainV4,
qMainnet: () => qMainnet,
qTestnet: () => qTestnet,
real: () => real,
redbellyTestnet: () => redbellyTestnet,
redstone: () => redstone,
reyaNetwork: () => reyaNetwork,
rollux: () => rollux,
rolluxTestnet: () => rolluxTestnet,
ronin: () => ronin,
rootstock: () => rootstock,
rootstockTestnet: () => rootstockTestnet,
rss3: () => rss3,
rss3Sepolia: () => rss3Sepolia,
saigon: () => saigon,
sapphire: () => sapphire,
sapphireTestnet: () => sapphireTestnet,
satoshiVM: () => satoshiVM,
satoshiVMTestnet: () => satoshiVMTestnet,
scroll: () => scroll,
scrollSepolia: () => scrollSepolia,
sei: () => sei,
seiDevnet: () => seiDevnet,
sepolia: () => sepolia,
shardeumSphinx: () => shardeumSphinx,
shibarium: () => shibarium,
shimmer: () => shimmer,
shimmerTestnet: () => shimmerTestnet,
skaleBlockBrawlers: () => skaleBlockBrawlers,
skaleCalypso: () => skaleCalypso,
skaleCalypsoTestnet: () => skaleCalypsoTestnet,
skaleCryptoBlades: () => skaleCryptoBlades,
skaleCryptoColosseum: () => skaleCryptoColosseum,
skaleEuropa: () => skaleEuropa,
skaleEuropaTestnet: () => skaleEuropaTestnet,
skaleExorde: () => skaleExorde,
skaleHumanProtocol: () => skaleHumanProtocol,
skaleNebula: () => skaleNebula,
skaleNebulaTestnet: () => skaleNebulaTestnet,
skaleRazor: () => skaleRazor,
skaleTitan: () => skaleTitan,
skaleTitanTestnet: () => skaleTitanTestnet,
songbird: () => songbird,
songbirdTestnet: () => songbirdTestnet,
spicy: () => spicy,
stratis: () => stratis,
syscoin: () => syscoin,
syscoinTestnet: () => syscoinTestnet,
taiko: () => taiko,
taikoHekla: () => taikoHekla,
taikoJolnir: () => taikoJolnir,
taikoKatla: () => taikoKatla,
taikoTestnetSepolia: () => taikoTestnetSepolia,
taraxa: () => taraxa,
taraxaTestnet: () => taraxaTestnet,
telcoinTestnet: () => telcoinTestnet,
telos: () => telos,
telosTestnet: () => telosTestnet,
tenet: () => tenet,
thaiChain: () => thaiChain,
thunderTestnet: () => thunderTestnet,
unreal: () => unreal,
vechain: () => vechain,
wanchain: () => wanchain,
wanchainTestnet: () => wanchainTestnet,
wemix: () => wemix,
wemixTestnet: () => wemixTestnet,
x1Testnet: () => xLayerTestnet,
xLayer: () => xLayer,
xLayerTestnet: () => xLayerTestnet,
xai: () => xai,
xaiTestnet: () => xaiTestnet,
xdc: () => xdc,
xdcTestnet: () => xdcTestnet,
yooldoVerse: () => yooldoVerse,
yooldoVerseTestnet: () => yooldoVerseTestnet,
zetachain: () => zetachain,
zetachainAthensTestnet: () => zetachainAthensTestnet,
zhejiang: () => zhejiang,
zilliqa: () => zilliqa,
zilliqaTestnet: () => zilliqaTestnet,
zircuitTestnet: () => zircuitTestnet,
zkFair: () => zkFair,
zkFairTestnet: () => zkFairTestnet,
zkSync: () => zkSync,
zkSyncInMemoryNode: () => zkSyncInMemoryNode,
zkSyncLocalNode: () => zkSyncLocalNode,
zkSyncSepoliaTestnet: () => zkSyncSepoliaTestnet,
zkSyncTestnet: () => zkSyncTestnet,
zora: () => zora,
zoraSepolia: () => zoraSepolia,
zoraTestnet: () => zoraTestnet
});
// node_modules/viem/_esm/chains/definitions/acala.js
var acala = /* @__PURE__ */ defineChain({
id: 787,
name: "Acala",
network: "acala",
nativeCurrency: {
name: "Acala",
symbol: "ACA",
decimals: 18
},
rpcUrls: {
public: {
http: ["https://eth-rpc-acala.aca-api.network"],
webSocket: ["wss://eth-rpc-acala.aca-api.network"]
},
default: {
http: ["https://eth-rpc-acala.aca-api.network"],
webSocket: ["wss://eth-rpc-acala.aca-api.network"]
}
},
blockExplorers: {
default: {
name: "Acala Blockscout",
url: "https://blockscout.acala.network",
apiUrl: "https://blockscout.acala.network/api"
}
},
testnet: false
});
// node_modules/viem/_esm/op-stack/contracts.js
var contracts = {
gasPriceOracle: { address: "0x420000000000000000000000000000000000000F" },
l1Block: { address: "0x4200000000000000000000000000000000000015" },
l2CrossDomainMessenger: {
address: "0x4200000000000000000000000000000000000007"
},
l2Erc721Bridge: { address: "0x4200000000000000000000000000000000000014" },
l2StandardBridge: { address: "0x4200000000000000000000000000000000000010" },
l2ToL1MessagePasser: {
address: "0x4200000000000000000000000000000000000016"
}
};
// node_modules/viem/_esm/op-stack/formatters.js
var formatters = {
block: /* @__PURE__ */ defineBlock({
format(args) {
const transactions = args.transactions?.map((transaction) => {
if (typeof transaction === "string")
return transaction;
const formatted = formatTransaction(transaction);
if (formatted.typeHex === "0x7e") {
formatted.isSystemTx = transaction.isSystemTx;
formatted.mint = transaction.mint ? hexToBigInt(transaction.mint) : void 0;
formatted.sourceHash = transaction.sourceHash;
formatted.type = "deposit";
}
return formatted;
});
return {
transactions,
stateRoot: args.stateRoot
};
}
}),
transaction: /* @__PURE__ */ defineTransaction({
format(args) {
const transaction = {};
if (args.type === "0x7e") {
transaction.isSystemTx = args.isSystemTx;
transaction.mint = args.mint ? hexToBigInt(args.mint) : void 0;
transaction.sourceHash = args.sourceHash;
transaction.type = "deposit";
}
return transaction;
}
}),
transactionReceipt: /* @__PURE__ */ defineTransactionReceipt({
format(args) {
return {
l1GasPrice: args.l1GasPrice ? hexToBigInt(args.l1GasPrice) : null,
l1GasUsed: args.l1GasUsed ? hexToBigInt(args.l1GasUsed) : null,
l1Fee: args.l1Fee ? hexToBigInt(args.l1Fee) : null,
l1FeeScalar: args.l1FeeScalar ? Number(args.l1FeeScalar) : null
};
}
})
};
// node_modules/viem/_esm/op-stack/serializers.js
function serializeTransaction2(transaction, signature) {
if (isDeposit(transaction))
return serializeTransactionDeposit(transaction);
return serializeTransaction(transaction, signature);
}
var serializers = {
transaction: serializeTransaction2
};
function serializeTransactionDeposit(transaction) {
assertTransactionDeposit(transaction);
const { sourceHash, data, from, gas, isSystemTx, mint, to, value } = transaction;
const serializedTransaction = [
sourceHash,
from,
to ?? "0x",
mint ? toHex(mint) : "0x",
value ? toHex(value) : "0x",
gas ? toHex(gas) : "0x",
isSystemTx ? "0x1" : "0x",
data ?? "0x"
];
return concatHex([
"0x7e",
toRlp(serializedTransaction)
]);
}
function isDeposit(transaction) {
if (transaction.type === "deposit")
return true;
if (typeof transaction.sourceHash !== "undefined")
return true;
return false;
}
function assertTransactionDeposit(transaction) {
const { from, to } = transaction;
if (from && !isAddress(from))
throw new InvalidAddressError({ address: from });
if (to && !isAddress(to))
throw new InvalidAddressError({ address: to });
}
// node_modules/viem/_esm/op-stack/chainConfig.js
var chainConfig = {
contracts,
formatters,
serializers
};
// node_modules/viem/_esm/chains/definitions/ancient8.js
var sourceId = 1;
var ancient82 = /* @__PURE__ */ defineChain({
...chainConfig,
id: 888888888,
name: "Ancient8",
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
rpcUrls: {
default: {
http: ["https://rpc.ancient8.gg"]
}
},
blockExplorers: {
default: {
name: "Ancient8 explorer",
url: "https://scan.ancient8.gg",
apiUrl: "https://scan.ancient8.gg/api"
}
},
contracts: {
...chainConfig.contracts,
l2OutputOracle: {
[sourceId]: {
address: "0xB09DC08428C8b4EFB4ff9C0827386CDF34277996"
}
},
portal: {
[sourceId]: {
address: "0x639F2AECE398Aa76b07e59eF6abe2cFe32bacb68",
blockCreated: 19070571
}
},
l1StandardBridge: {
[sourceId]: {
address: "0xd5e3eDf5b68135D559D572E26bF863FBC1950033",
blockCreated: 19070571
}
}
},
sourceId
});
// node_modules/viem/_esm/chains/definitions/ancient8Sepolia.js
var sourceId2 = 11155111;
var ancient8Sepolia2 = /* @__PURE__ */ defineChain({
...chainConfig,
id: 28122024,
name: "Ancient8 Testnet",
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
rpcUrls: {
default: {
http: ["https://rpcv2-testnet.ancient8.gg"]
}
},
blockExplorers: {
default: {
name: "Ancient8 Celestia Testnet explorer",
url: "https://scanv2-testnet.ancient8.gg",
apiUrl: "https://scanv2-testnet.ancient8.gg/api"
}
},
contracts: {
...chainConfig.contracts,
l2OutputOracle: {
[sourceId2]: {
address: "0x942fD5017c0F60575930D8574Eaca13BEcD6e1bB"
}
},
portal: {
[sourceId2]: {
address: "0xfa1d9E26A6aCD7b22115D27572c1221B9803c960",
blockCreated: 4972908
}
},
l1StandardBridge: {
[sourceId2]: {
address: "0xF6Bc0146d3c74D48306e79Ae134A260E418C9335",
blockCreated: 4972908
}
}
},
sourceId: sourceId2
});
// node_modules/viem/_esm/chains/definitions/anvil.js
var anvil = /* @__PURE__ */ defineChain({
id: 31337,
name: "Anvil",
nativeCurrency: {
decimals: 18,
name: "Ether",
symbol: "ETH"
},
rpcUrls: {
default: {
http: ["http://127.0.0.1:8545"],
webSocket: ["ws://127.0.0.1:8545"]
}
}
});
// node_modules/viem/_esm/chains/definitions/apexTestnet.js
var apexTestnet = /* @__PURE__ */ defineChain({
id: 3993,
name: "APEX Testnet",
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
rpcUrls: {
default: {
http: ["https://rpc-testnet.apexlayer.xyz"]
}
},
blockExplorers: {
default: {
name: "Blockscout",
url: "https://exp-testnet.apexlayer.xyz",
apiUrl: "https://exp-testnet.apexlayer.xyz/api"
}
},
contracts: {
multicall3: {
address: "0xf7642be33a6b18D16a995657adb5a68CD0438aE2",
blockCreated: 283775
}
},
testnet: true
});
// node_modules/viem/_esm/chains/definitions/arbitrum.js
var arbitrum = /* @__PURE__ */ defineChain({
id: 42161,
name: "Arbitrum One",
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
rpcUrls: {
default: {
http: ["https://arb1.arbitrum.io/rpc"]
}
},
blockExplorers: {
default: {
name: "Arbiscan",
url: "https://arbiscan.io",
apiUrl: "https://api.arbiscan.io/api"
}
},
contracts: {
multicall3: {
address: "0xca11bde05977b3631167028862be2a173976ca11",
blockCreated: 7654707
}
}
});
// node_modules/viem/_esm/chains/definitions/arbitrumGoerli.js
var arbitrumGoerli = /* @__PURE__ */ defineChain({
id: 421613,
name: "Arbitrum Goerli",
nativeCurrency: {
name: "Arbitrum Goerli Ether",
symbol: "ETH",
decimals: 18
},
rpcUrls: {
default: {
http: ["https://goerli-rollup.arbitrum.io/rpc"]
}
},
blockExplorers: {
default: {
name: "Arbiscan",
url: "https://goerli.arbiscan.io"
}
},
contracts: {
multicall3: {
address: "0xca11bde05977b3631167028862be2a173976ca11",
blockCreated: 88114
}
},
testnet: true
});
// node_modules/viem/_esm/chains/definitions/arbitrumNova.js
var arbitrumNova = /* @__PURE__ */ defineChain({
id: 42170,
name: "Arbitrum Nova",
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
rpcUrls: {
default: {
http: ["https://nova.arbitrum.io/rpc"]
}
},
blockExplorers: {
default: {
name: "Arbiscan",
url: "https://nova.arbiscan.io",
apiUrl: "https://api-nova.arbiscan.io/api"
}
},
contracts: {
multicall3: {
address: "0xca11bde05977b3631167028862be2a173976ca11",
blockCreated: 1746963
}
}
});
// node_modules/viem/_esm/chains/definitions/astar.js
var astar = /* @__PURE__ */ defineChain({
id: 592,
name: "Astar",
network: "astar-mainnet",
nativeCurrency: {
name: "Astar",
symbol: "ASTR",
decimals: 18
},
rpcUrls: {
default: { http: ["https://astar.api.onfinality.io/public"] }
},
blockExplorers: {
default: {
name: "Astar Subscan",
url: "https://astar.subscan.io"
}
},
contracts: {
multicall3: {
address: "0xca11bde05977b3631167028862be2a173976ca11",
blockCreated: 761794
}
},
testnet: false
});
// node_modules/viem/_esm/chains/definitions/astarZkEVM.js
var astarZkEVM = /* @__PURE__ */ defineChain({
id: 3776,
name: "Astar zkEVM",
network: "AstarZkEVM",
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
rpcUrls: {
default: {
http: ["https://rpc.startale.com/astar-zkevm"]
}
},
blockExplorers: {
default: {
name: "Astar zkEVM Explorer",
url: "https://astar-zkevm.explorer.startale.com"
}
},
contracts: {
multicall3: {
address: "0xca11bde05977b3631167028862be2a173976ca11",
blockCreated: 93528
}
},
testnet: false
});
// node_modules/viem/_esm/chains/definitions/astarZkyoto.js
var astarZkyoto = /* @__PURE__ */ defineChain({
id: 6038361,
name: "Astar zkEVM Testnet zKyoto",
network: "zKyoto",
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
rpcUrls: {
default: {
http: ["https://rpc.startale.com/zkyoto"]
}
},
blockExplorers: {
default: {
name: "zKyoto Explorer",
url: "https://zkyoto.explorer.startale.com"
}
},
contracts: {
multicall3: {
address: "0xca11bde05977b3631167028862be2a173976ca11",
blockCreated: 196153
}
},
testnet: true
});
// node_modules/viem/_esm/chains/definitions/arbitrumSepolia.js
var arbitrumSepolia = /* @__PURE__ */ defineChain({
id: 421614,
name: "Arbitrum Sepolia",
nativeCurrency: {
name: "Arbitrum Sepolia Ether",
symbol: "ETH",
decimals: 18
},
rpcUrls: {
default: {
http: ["https://sepolia-rollup.arbitrum.io/rpc"]
}
},
blockExplorers: {
default: {
name: "Arbiscan",
url: "https://sepolia.arbiscan.io",
apiUrl: "https://api-sepolia.arbiscan.io/api"
}
},
contracts: {
multicall3: {
address: "0xca11bde05977b3631167028862be2a173976ca11",
blockCreated: 81930
}
},
testnet: true
});
// node_modules/viem/_esm/chains/definitions/areonNetwork.js
var areonNetwork = /* @__PURE__ */ defineChain({
id: 463,
name: "Areon Network",
nativeCurrency: { decimals: 18, name: "AREA", symbol: "AREA" },
rpcUrls: {
default: {
http: ["https://mainnet-rpc.areon.network"],
webSocket: ["wss://mainnet-ws.areon.network"]
}
},
blockExplorers: {
default: {
name: "Areonscan",
url: "https://areonscan.com"
}
},
testnet: false
});
// node_modules/viem/_esm/chains/definitions/areonNetworkTestnet.js
var areonNetworkTestnet = /* @__PURE__ */ defineChain({
id: 462,
name: "Areon Network Testnet",
nativeCurrency: { decimals: 18, name: "TAREA", symbol: "TAREA" },
rpcUrls: {
default: {
http: ["https://testnet-rpc.areon.network"],
webSocket: ["wss://testnet-ws.areon.network"]
}
},
blockExplorers: {
default: {
name: "Areonscan",
url: "https://areonscan.com"
}
},
testnet: true
});
// node_modules/viem/_esm/chains/definitions/aurora.js
var aurora = /* @__PURE__ */ defineChain({
id: 1313161554,
name: "Aurora",
nativeCurrency: {
decimals: 18,
name: "Ether",
symbol: "ETH"
},
rpcUrls: {
default: { http: ["https://mainnet.aurora.dev"] }
},
blockExplorers: {
default: {
name: "Aurorascan",
url: "https://aurorascan.dev",
apiUrl: "https://aurorascan.dev/api"
}
},
contracts: {
multicall3: {
address: "0xca11bde05977b3631167028862be2a173976ca11",
blockCreated: 62907816
}
}
});
// node_modules/viem/_esm/chains/definitions/auroraTestnet.js
var auroraTestnet = /* @__PURE__ */ defineChain({
id: 1313161555,
name: "Aurora Testnet",
nativeCurrency: {
decimals: 18,
name: "Ether",
symbol: "ETH"
},
rpcUrls: {
default: { http: ["https://testnet.aurora.dev"] }
},
blockExplorers: {
default: {
name: "Aurorascan",
url: "https://testnet.aurorascan.dev",
apiUrl: "https://testnet.aurorascan.dev/api"
}
},
testnet: true
});
// node_modules/viem/_esm/chains/definitions/auroria.js
var auroria = /* @__PURE__ */ defineChain({
id: 205205,
name: "Auroria Testnet",
network: "auroria",
nativeCurrency: {
name: "Auroria Stratis",
symbol: "tSTRAX",
decimals: 18
},
rpcUrls: {
default: {
http: ["https://auroria.rpc.stratisevm.com"]
}
},
blockExplorers: {
default: {
name: "Auroria Testnet Explorer",
url: "https://auroria.explorer.stratisevm.com"
}
},
testnet: true
});
// node_modules/viem/_esm/chains/definitions/avalanche.js
var avalanche = /* @__PURE__ */ defineChain({
id: 43114,
name: "Avalanche",
nativeCurrency: {
decimals: 18,
name: "Avalanche",
symbol: "AVAX"
},
rpcUrls: {
default: { http: ["https://api.avax.network/ext/bc/C/rpc"] }
},
blockExplorers: {
default: {
name: "SnowTrace",
url: "https://snowtrace.io",
apiUrl: "https://api.snowtrace.io"
}
},
contracts: {
multicall3: {
address: "0xca11bde05977b3631167028862be2a173976ca11",
blockCreated: 11907934
}
}
});
// node_modules/viem/_esm/chains/definitions/avalancheFuji.js
var avalancheFuji = /* @__PURE__ */ defineChain({
id: 43113,
name: "Avalanche Fuji",
nativeCurrency: {
decimals: 18,
name: "Avalanche Fuji",
symbol: "AVAX"
},
rpcUrls: {
default: { http: ["https://api.avax-test.network/ext/bc/C/rpc"] }
},
blockExplorers: {
default: {
name: "SnowTrace",
url: "https://testnet.snowtrace.io",
apiUrl: "https://api-testnet.snowtrace.io"
}
},
contracts: {
multicall3: {
address: "0xca11bde05977b3631167028862be2a173976ca11",
blockCreated: 7096959
}
},
testnet: true
});
// node_modules/viem/_esm/chains/definitions/bahamut.js
var bahamut = /* @__PURE__ */ defineChain({
id: 5165,
network: "bahamut",
name: "Bahamut",
nativeCurrency: { name: "Fasttoken", symbol: "FTN", decimals: 18 },
rpcUrls: {
default: {
http: [
"https://rpc1.bahamut.io",
"https://bahamut-rpc.publicnode.com",
"https://rpc2.bahamut.io"
],
webSocket: [
"wss://ws1.sahara.bahamutchain.com",
"wss://bahamut-rpc.publicnode.com",
"wss://ws2.sahara.bahamutchain.com"
]
},
public: {
http: [
"https://rpc1.bahamut.io",
"https://bahamut-rpc.publicnode.com",
"https://rpc2.bahamut.io"
],
webSocket: [
"wss://ws1.sahara.bahamutchain.com",
"wss://bahamut-rpc.publicnode.com",
"wss://ws2.sahara.bahamutchain.com"
]
}
},
blockExplorers: {
default: {
name: "Ftnscan",
url: "https://www.ftnscan.com",
apiUrl: "https://www.ftnscan.com/api"
}
}
});
// node_modules/viem/_esm/chains/definitions/base.js
var sourceId3 = 1;
var base2 = /* @__PURE__ */ defineChain({
...chainConfig,
id: 8453,
name: "Base",
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
rpcUrls: {
default: {
http: ["https://mainnet.base.org"]
}
},
blockExplorers: {
default: {
name: "Basescan",
url: "https://basescan.org",
apiUrl: "https://api.basescan.org/api"
}
},
contracts: {
...chainConfig.contracts,
l2OutputOracle: {
[sourceId3]: {
address: "0x56315b90c40730925ec5485cf004d835058518A0"
}
},
multicall3: {
address: "0xca11bde05977b3631167028862be2a173976ca11",
blockCreated: 5022
},
portal: {
[sourceId3]: {
address: "0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",
blockCreated: 17482143
}
},
l1StandardBridge: {
[sourceId3]: {
address: "0x3154Cf16ccdb4C6d922629664174b904d80F2C35",
blockCreated: 17482143
}
}
},
sourceId: sourceId3
});
// node_modules/viem/_esm/chains/definitions/baseGoerli.js
var sourceId4 = 5;
var baseGoerli = /* @__PURE__ */ defineChain({
...chainConfig,
id: 84531,
name: "Base Goerli",
nativeCurrency: { name: "Goerli Ether", symbol: "ETH", decimals: 18 },
rpcUrls: {
default: { http: ["https://goerli.base.org"] }
},
blockExplorers: {
default: {
name: "Basescan",
url: "https://goerli.basescan.org",
apiUrl: "https://goerli.basescan.org/api"
}
},
contracts: {
...chainConfig.contracts,
l2OutputOracle: {
[sourceId4]: {
address: "0x2A35891ff30313CcFa6CE88dcf3858bb075A2298"
}
},
multicall3: {
address: "0xca11bde05977b3631167028862be2a173976ca11",
blockCreated: 1376988
},
portal: {
[sourceId4]: {
address: "0xe93c8cD0D409341205A592f8c4Ac1A5fe5585cfA"
}
},
l1StandardBridge: {
[sourceId4]: {
address: "0xfA6D8Ee5BE770F84FC001D098C4bD604Fe01284a"
}
}
},
testnet: true,
sourceId: sourceId4
});
// node_modules/viem/_esm/chains/definitions/baseSepolia.js
var sourceId5 = 11155111;
var baseSepolia = /* @__PURE__ */ defineChain({
...chainConfig,
id: 84532,
network: "base-sepolia",
name: "Base Sepolia",
nativeCurrency: { name: "Sepolia Ether", symbol: "ETH", decimals: 18 },
rpcUrls: {
default: {
http: ["https://sepolia.base.org"]
}
},
blockExplorers: {
default: {
name: "Basescan",
url: "https://sepolia.basescan.org",
apiUrl: "https://api-sepolia.basescan.org/api"
}
},
contracts: {
...chainConfig.contracts,
l2OutputOracle: {
[sourceId5]: {
address: "0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"
}
},
portal: {
[sourceId5]: {
address: "0x49f53e41452c74589e85ca1677426ba426459e85",
blockCreated: 4446677
}
},
l1StandardBridge: {
[sourceId5]: {
address: "0xfd0Bf71F60660E2f608ed56e1659C450eB113120",
blockCreated: 4446677
}
},
multicall3: {
address: "0xca11bde05977b3631167028862be2a173976ca11",
blockCreated: 1059647
}
},
testnet: true,
sourceId: sourceId5
});
// node_modules/viem/_esm/chains/definitions/beam.js
var beam = /* @__PURE__ */ defineChain({
id: 4337,
name: "Beam",
network: "beam",
nativeCurrency: {
decimals: 18,
name: "Beam",
symbol: "BEAM"
},
rpcUrls: {
public: {
http: ["https://build.onbeam.com/rpc"],
webSocket: ["wss://build.onbeam.com/ws"]
},
default: {
http: ["https://build.onbeam.com/rpc"],
webSocket: ["wss://build.onbeam.com/ws"]
}
},
blockExplorers: {
default: {
name: "Beam Explorer",
url: "https://subnets.avax.network/beam"
}
},
contracts: {
multicall3: {
address: "0x4956f15efdc3dc16645e90cc356eafa65ffc65ec",
blockCreated: 1
}
}
});
// node_modules/viem/_esm/chains/definitions/beamTestnet.js
var beamTestnet = /* @__PURE__ */ defineChain({
id: 13337,
name: "Beam Testnet",
network: "beam",
nativeCurrency: {
decimals: 18,
name: "Beam",
symbol: "BEAM"
},
rpcUrls: {
public: {
http: ["https://build.onbeam.com/rpc/testnet"],
webSocket: ["wss://build.onbeam.com/ws/testnet"]
},
default: {
http: ["https://build.onbeam.com/rpc/testnet"],
webSocket: ["wss://build.onbeam.com/ws/testnet"]
}
},
blockExplorers: {
default: {
name: "Beam Explorer",
url: "https://subnets-test.avax.network/beam"
}
},
contracts: {
multicall3: {
address: "0x9bf49b704ee2a095b95c1f2d4eb9010510c41c9e",
blockCreated: 3
}
},
testnet: true
});
// node_modules/viem/_esm/chains/definitions/bearNetworkChainMainnet.js
var bearNetworkChainMainnet = /* @__PURE__ */ defineChain({
id: 641230,
name: "Bear Network Chain Mainnet",
nativeCurrency: {
decimals: 18,
name: "BearNetworkChain",
symbol: "BRNKC"
},
rpcUrls: {
default: { http: ["https://brnkc-mainnet.bearnetwork.net"] }
},
blockExplorers: {
default: {
name: "BrnkScan",
url: "https://brnkscan.bearnetwork.net",
apiUrl: "https://brnkscan.bearnetwork.net/api"
}
}
});
// node_modules/viem/_esm/chains/definitions/bearNetworkChainTestnet.js
var bearNetworkChainTestnet = /* @__PURE__ */ defineChain({
id: 751230,
name: "Bear Network Chain Testnet",
nativeCurrency: {
decimals: 18,
name: "tBRNKC",
symbol: "tBRNKC"
},
rpcUrls: {
default: { http: ["https://brnkc-test.bearnetwork.net"] }
},
blockExplorers: {
default: {
name: "BrnkTestScan",
url: "https://brnktest-scan.bearnetwork.net",
apiUrl: "https://brnktest-scan.bearnetwork.net/api"
}
},
testnet: true
});
// node_modules/viem/_esm/chains/definitions/berachainTestnet.js
var berachainTestnet = /* @__PURE__ */ defineChain({
id: 80085,
name: "Berachain Artio",
nativeCurrency: {
decimals: 18,
name: "BERA Token",
symbol: "BERA"
},
rpcUrls: {
default: { http: ["https://artio.rpc.berachain.com"] }
},
blockExplorers: {
default: {
name: "Berachain",
url: "https://artio.beratrail.io"
}
},
testnet: true
});
// node_modules/viem/_esm/chains/definitions/berachainTestnetbArtio.js
var berachainTestnetbArtio = /* @__PURE__ */ defineChain({
id: 80084,
name: "Berachain bArtio",
nativeCurrency: {
decimals: 18,
name: "BERA Token",
symbol: "BERA"
},
rpcUrls: {
default: { http: ["https://bartio.rpc.berachain.com"] }
},
blockExplorers: {
default: {
name: "Berachain bArtio Beratrail",
url: "https://bartio.beratrail.io"
}
},
testnet: true
});
// node_modules/viem/_esm/chains/definitions/bevmMainnet.js
var bevmMainnet = /* @__PURE__ */ defineChain({
id: 11501,
name: "BEVM Mainnet",
nativeCurrency: { name: "Bitcoin", symbol: "BTC", decimals: 18 },
rpcUrls: {
default: { http: ["https://rpc-mainnet-1.bevm.io"] }
},
blockExplorers: {
default: {
name: "Bevmscan",
url: "https://scan-mainnet.bevm.io",
apiUrl: "https://scan-mainnet-api.bevm.io/api"
}
}
});
// node_modules/viem/_esm/chains/definitions/bitkub.js
var bitkub = /* @__PURE__ */ defineChain({
id: 96,
name: "Bitkub",
nativeCurrency: { name: "Bitkub", symbol: "KUB", decimals: 18 },
rpcUrls: {
default: {
http: ["https://rpc.bitkubchain.io"]
}
},
blockExplorers: {
default: {
name: "Bitkub Chain Mainnet Explorer",
url: "https://www.bkcscan.com",
apiUrl: "https://www.bkcscan.com/api"
}
}
});
// node_modules/viem/_esm/chains/definitions/bitkubTestnet.js
var bitkubTestnet = /* @__PURE__ */ defineChain({
id: 25925,
name: "Bitkub Testnet",
network: "Bitkub Testnet",
nativeCurrency: { name: "Bitkub Test", symbol: "tKUB", decimals: 18 },
rpcUrls: {
default: {
http: ["https://rpc-testnet.bitkubchain.io"]
}
},
blockExplorers: {
default: {
name: "Bitkub Chain Testnet Explorer",
url: "https://testnet.bkcscan.com",
apiUrl: "https://testnet.bkcscan.com/api"
}
},
testnet: true
});
// node_modules/viem/_esm/chains/definitions/bitTorrent.js
var bitTorrent = /* @__PURE__ */ defineChain({
id: 199,
name: "BitTorrent",
network: "bittorrent-chain-mainnet",
nativeCurrency: { name: "BitTorrent", symbol: "BTT", decimals: 18 },
rpcUrls: {
default: { http: ["https://rpc.bittorrentchain.io"] },
public: { http: ["https://rpc.bittorrentchain.io"] }
},
blockExplorers: {
default: {
name: "Bttcscan",
url: "https://bttcscan.com",
apiUrl: "https://api.bttcscan.com/api"
}
},
contracts: {
multicall3: {
address: "0xcA11bde05977b3631167028862bE2a173976CA11",
blockCreated: 31078552
}
}
});
// node_modules/viem/_esm/chains/definitions/bitTorrentTestnet.js
var bitTorrentTestnet = /* @__PURE__ */ defineChain({
id: 1028,
name: "BitTorrent Chain Testnet",
network: "bittorrent-chain-testnet",
nativeCurrency: { name: "BitTorrent", symbol: "BTT", decimals: 18 },
rpcUrls: {
default: { http: ["https://testrpc.bittorrentchain.io"] },
public: { http: ["https://testrpc.bittorrentchain.io"] }
},
blockExplorers: {
default: {
name: "Bttcscan",
url: "https://testnet.bttcscan.com",
apiUrl: "https://testnet.bttcscan.com/api"
}
},
testnet: true
});
// node_modules/viem/_esm/chains/definitions/blast.js
var sourceId6 = 1;
var blast = /* @__PURE__ */ defineChain({
id: 81457,
name: "Blast",
nativeCurrency: {
decimals: 18,
name: "Ether",
symbol: "ETH"
},
rpcUrls: {
default: { http: ["https://rpc.blast.io"] }
},
blockExplorers: {
default: {
name: "Blastscan",
url: "https://blastscan.io",
apiUrl: "https://api.blastscan.io/api"
}
},
contracts: {
multicall3: {
address: "0xcA11bde05977b3631167028862bE2a173976CA11",
blockCreated: 212929
}
},
sourceId: sourceId6
});
// node_modules/viem/_esm/chains/definitions/blastSepolia.js
var sourceId7 = 11155111;
var blastSepolia = /* @__PURE__ */ defineChain({
id: 168587773,
name: "Blast Sepolia",
nativeCurrency: {
name: "Ether",
symbol: "ETH",
decimals: 18
},
rpcUrls: {
default: {
http: ["https://sepolia.blast.io"]
}
},
blockExplorers: {
default: {
name: "Blastscan",
url: "https://sepolia.blastscan.io",
apiUrl: "https://api-sepolia.blastscan.io/api"
}
},
contracts: {
multicall3: {
address: "0xca11bde05977b3631167028862be2a173976ca11",
blockCreated: 756690
}
},
testnet: true,
sourceId: sourceId7
});
// node_modules/viem/_esm/chains/definitions/bob.js
var bob = defineChain({
id: 60808,
name: "BOB",
nativeCurrency: {
decimals: 18,
name: "ETH",
symbol: "ETH"
},
rpcUrls: {
default: {
http: ["https://rpc.gobob.xyz"],
webSocket: ["wss://rpc.gobob.xyz"]
}
},
blockExplorers: {
default: {
name: "Blockscout",
url: "https://explorer.gobob.xyz"
}
},
contracts: {
multicall3: {
address: "0x63f8279bccDb75c0F38e0CD6B6A0c72a0a760FF9",
blockCreated: 457045
}
},
testnet: false
});
// node_modules/viem/_esm/chains/definitions/boba.js
var boba = /* @__PURE__ */ defineChain({
id: 288,
name: "Boba Network",
nativeCurrency: {
decimals: 18,
name: "Ether",
symbol: "ETH"
},
rpcUrls: {
default: { http: ["https://mainnet.boba.network"] }
},
blockExplorers: {
default: {
name: "BOBAScan",
url: "https://bobascan.com"
}
},
contracts: {
multicall3: {
address: "0xca11bde05977b3631167028862be2a173976ca11",
blockCreated: 446859
}
}
});
// node_modules/viem/_esm/chains/definitions/bronos.js
var bronos = /* @__PURE__ */ defineChain({
id: 1039,
name: "Bronos",
nativeCurrency: {
decimals: 18,
name: "BRO",
symbol: "BRO"
},
rpcUrls: {
default: { http: ["https://evm.bronos.org"] }
},
blockExplorers: {
default: {
name: "BronoScan",
url: "https://broscan.bronos.org"
}
}
});
// node_modules/viem/_esm/chains/definitions/bronosTestnet.js
var bronosTestnet = /* @__PURE__ */ defineChain({
id: 1038,
name: "Bronos Testnet",
nativeCurrency: {
decimals: 18,
name: "Bronos Coin",
symbol: "tBRO"
},
rpcUrls: {
default: { http: ["https://evm-testnet.bronos.org"] }
},
blockExplorers: {
default: {
name: "BronoScan",
url: "https://tbroscan.bronos.org"
}
},
testnet: true
});
// node_modules/viem/_esm/chains/definitions/bsc.js
var bsc = /* @__PURE__ */ defineChain({
id: 56,
name: "BNB Smart Chain",
nativeCurrency: {
decimals: 18,
name: "BNB",
symbol: "BNB"
},
rpcUrls: {
default: { http: ["https://rpc.ankr.com/bsc"] }
},
blockExplorers: {
default: {
name: "BscScan",
url: "https://bscscan.com",
apiUrl: "https://api.bscscan.com/api"
}
},
contracts: {
multicall3: {
address: "0xca11bde05977b3631167028862be2a173976ca11",
blockCreated: 15921452
}
}
});
// node_modules/viem/_esm/chains/definitions/bscTestnet.js
var bscTestnet = /* @__PURE__ */ defineChain({
id: 97,
name: "Binance Smart Chain Testnet",
nativeCurrency: {
decimals: 18,
name: "BNB",
symbol: "tBNB"
},
rpcUrls: {
default: { http: ["https://data-seed-prebsc-1-s1.bnbchain.org:8545"] }
},
blockExplorers: {
default: {
name: "BscScan",
url: "https://testnet.bscscan.com",
apiUrl: "https://testnet.bscscan.com/api"
}
},
contracts: {
multicall3: {
address: "0xca11bde05977b3631167028862be2a173976ca11",
blockCreated: 17422483
}
},
testnet: true
});
// node_modules/viem/_esm/chains/definitions/bscGreenfield.js
var bscGreenfield = /* @__PURE__ */ defineChain({
id: 1017,
name: "BNB Greenfield Chain",
nativeCurrency: {
decimals: 18,
name: "BNB",
symbol: "BNB"
},
rpcUrls: {
default: { http: ["https://greenfield-chain.bnbchain.org"] }
},
blockExplorers: {
default: {
name: "BNB Greenfield Mainnet Scan",
url: "https://greenfieldscan.com"
}
},
testnet: false
});
// node_modules/viem/_esm/chains/definitions/btr.js
var btr = /* @__PURE__ */ defineChain({
id: 200901,
name: "Bitlayer",
nativeCurrency: {
name: "Ether",
symbol: "ETH",
decimals: 18
},
rpcUrls: {
default: {
http: [
"https://rpc.bitlayer.org",
"https://rpc.bitlayer-rpc.com",
"https://rpc.ankr.com/bitlayer"
],
webSocket: ["wss://ws.bitlayer.org", "wss://ws.bitlayer-rpc.com"]
}
},
blockExplorers: {
default: {
name: "btrscan",
url: "https://www.btrscan.com",
apiUrl: "https://www.btrscan.com/apis"
}
}
});
// node_modules/viem/_esm/chains/definitions/btrTestnet.js
var btrTestnet = /* @__PURE__ */ defineChain({
id: 200810,
name: "Bitlayer Testnet",
nativeCurrency: {
name: "Ether",
symbol: "ETH",
decimals: 18
},
rpcUrls: {
default: {
http: ["https://testnet-rpc.bitlayer.org"],
webSocket: [
"wss://testnet-ws.bitlayer.org",
"wss://testnet-ws.bitlayer-rpc.com"
]
}
},
blockExplorers: {
default: {
name: "btrscan",
url: "https://testnet-scan.bitlayer.org",
apiUrl: "https://testnet-scan.bitlayer.org/apis"
}
},
testnet: true
});
// node_modules/viem/_esm/chains/definitions/bxn.js
var bxn = /* @__PURE__ */ defineChain({
id: 4999,
name: "BlackFort Exchange Network",
nativeCurrency: { name: "BlackFort Token", symbol: "BXN", decimals: 18 },
rpcUrls: {
default: {
http: ["https://mainnet.blackfort.network/rpc"]
}
},
blockExplorers: {
default: {
name: "Blockscout",
url: "https://explorer.blackfort.network",
apiUrl: "https://explorer.blackfort.network/api"
}
}
});
// node_modules/viem/_esm/chains/definitions/bxnTestnet.js
var bxnTestnet = /* @__PURE__ */ defineChain({
id: 4777,
name: "BlackFort Exchange Network Testnet",
nativeCurrency: {
name: "BlackFort Testnet Token",
symbol: "TBXN",
decimals: 18
},
rpcUrls: {
default: {
http: ["https://testnet.blackfort.network/rpc"]
}
},
blockExplorers: {
default: {
name: "Blockscout",
url: "https://testnet-explorer.blackfort.network",
apiUrl: "https://testnet-explorer.blackfort.network/api"
}
},
testnet: true
});
// node_modules/viem/_esm/chains/definitions/canto.js
var canto = /* @__PURE__ */ defineChain({
id: 7700,
name: "Canto",
nativeCurrency: {
decimals: 18,
name: "Canto",
symbol: "CANTO"
},
rpcUrls: {
default: { http: ["https://canto.gravitychain.io"] }
},
blockExplorers: {
default: {
name: "Tuber.Build (Blockscout)",
url: "https://tuber.build"
}
},
contracts: {
multicall3: {
address: "0xca11bde05977b3631167028862be2a173976ca11",
blockCreated: 2905789
}
}
});
// node_modules/viem/_esm/celo/fees.js
var fees = {
/*
* Estimates the fees per gas for a transaction.
* If the transaction is to be paid in a token (feeCurrency is present) then the fees
* are estimated in the value of the token. Otherwise falls back to the default
* estimation by returning null.
*
* @param params fee estimation function parameters
*/
estimateFeesPerGas: async (params) => {
if (!params.request?.feeCurrency)
return null;
const [maxFeePerGas, maxPriorityFeePerGas] = await Promise.all([
estimateFeePerGasInFeeCurrency(params.client, params.request.feeCurrency),
estimateMaxPriorityFeePerGasInFeeCurrency(params.client, params.request.feeCurrency)
]);
return {
maxFeePerGas,
maxPriorityFeePerGas
};
}
};
async function estimateFeePerGasInFeeCurrency(client, feeCurrency) {
const fee = await client.request({
method: "eth_gasPrice",
params: [feeCurrency]
});
return BigInt(fee);
}
async function estimateMaxPriorityFeePerGasInFeeCurrency(client, feeCurrency) {
const feesPerGas = await client.request({
method: "eth_maxPriorityFeePerGas",
params: [feeCurrency]
});
return BigInt(feesPerGas);
}
// node_modules/viem/_esm/celo/utils.js
function isEmpty(value) {
return value === 0 || value === 0n || value === void 0 || value === null || value === "0" || value === "" || typeof value === "string" && (trim(value).toLowerCase() === "0x" || trim(value).toLowerCase() === "0x00");
}
function isPresent(value) {
return !isEmpty(value);
}
function isEIP1559(transaction) {
return typeof transaction.maxFeePerGas !== "undefined" && typeof transaction.maxPriorityFeePerGas !== "undefined";
}
function isCIP64(transaction) {
if (transaction.type === "cip64") {
return true;
}
return isEIP1559(transaction) && isPresent(transaction.feeCurrency);
}
// node_modules/viem/_esm/celo/formatters.js
var formatters2 = {
block: /* @__PURE__ */ defineBlock({
exclude: ["difficulty", "gasLimit", "mixHash", "nonce", "uncles"],
format(args) {
const transactions = args.transactions?.map((transaction) => {
if (typeof transaction === "string")
return transaction;
return {
...formatTransaction(transaction),
feeCurrency: transaction.feeCurrency,
...transaction.type !== "0x7b" ? {
gatewayFee: transaction.gatewayFee ? hexToBigInt(transaction.gatewayFee) : null,
gatewayFeeRecipient: transaction.gatewayFeeRecipient || null
} : {}
};
});
return {
randomness: args.randomness,
transactions
};
}
}),
transaction: /* @__PURE__ */ defineTransaction({
format(args) {
const transaction = { feeCurrency: args.feeCurrency };
if (args.type === "0x7b")
transaction.type = "cip64";
else {
if (args.type === "0x7c")
transaction.type = "cip42";
transaction.gatewayFee = args.gatewayFee ? hexToBigInt(args.gatewayFee) : null;
transaction.gatewayFeeRecipient = args.gatewayFeeRecipient;
}
return transaction;
}
}),
transactionRequest: /* @__PURE__ */ defineTransactionRequest({
format(args) {
const request = {
feeCurrency: args.feeCurrency
};
if (isCIP64(args))
request.type = "0x7b";
return request;
}
})
};
// node_modules/viem/_esm/celo/serializers.js
function serializeTransaction3(transaction, signature) {
if (isCIP64(transaction))
return serializeTransactionCIP64(transaction, signature);
return serializeTransaction(transaction, signature);
}
var serializers2 = {
transaction: serializeTransaction3
};
function serializeTransactionCIP64(transaction, signature) {
assertTransactionCIP64(transaction);
const { chainId, gas, nonce, to, value, maxFeePerGas, maxPriorityFeePerGas, accessList, feeCurrency, data } = transaction;
const serializedTransaction = [
toHex(chainId),
nonce ? toHex(nonce) : "0x",
maxPriorityFeePerGas ? toHex(maxPriorityFeePerGas) : "0x",
maxFeePerGas ? toHex(maxFeePerGas) : "0x",
gas ? toHex(gas) : "0x",
to ?? "0x",
value ? toHex(value) : "0x",
data ?? "0x",
serializeAccessList(accessList),
feeCurrency,
...toYParitySignatureArray(transaction, signature)
];
return concatHex([
"0x7b",
toRlp(serializedTransaction)
]);
}
var MAX_MAX_FEE_PER_GAS = 2n ** 256n - 1n;
function assertTransactionCIP64(transaction) {
const { chainId, maxPriorityFeePerGas, gasPrice, maxFeePerGas, to, feeCurrency } = transaction;
if (chainId <= 0)
throw new InvalidChainIdError({ chainId });
if (to && !isAddress(to))
throw new InvalidAddressError({ address: to });
if (gasPrice)
throw new BaseError("`gasPrice` is not a valid CIP-64 Transaction attribute.");
if (isPresent(maxFeePerGas) && maxFeePerGas > MAX_MAX_FEE_PER_GAS)
throw new FeeCapTooHighError({ maxFeePerGas });
if (isPresent(maxPriorityFeePerGas) && isPresent(maxFeePerGas) && maxPriorityFeePerGas > maxFeePerGas)
throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas });
if (isPresent(feeCurrency) && !isAddress(feeCurrency)) {
throw new BaseError("`feeCurrency` MUST be a token address for CIP-64 transactions.");
}
if (isEmpty(feeCurrency)) {
throw new BaseError("`feeCurrency` must be provided for CIP-64 transactions.");
}
}
// node_modules/viem/_esm/celo/chainConfig.js
var chainConfig2 = {
formatters: formatters2,
serializers: serializers2,
fees
};
// node_modules/viem/_esm/chains/definitions/celo.js
var celo = /* @__PURE__ */ defineChain({
...chainConfig2,
id: 42220,
name: "Celo",
nativeCurrency: {
decimals: 18,
name: "CELO",
symbol: "CELO"
},
rpcUrls: {
default: { http: ["https://forno.celo.org"] }
},
blockExplorers: {
default: {
name: "Celo Explorer",
url: "https://celoscan.io",
apiUrl: "https://api.celoscan.io/api"
}
},
contracts: {
multicall3: {
address: "0xcA11bde05977b3631167028862bE2a173976CA11",
blockCreated: 13112599
}
},
testnet: false
});
// node_modules/viem/_esm/chains/definitions/celoAlfajores.js
var celoAlfajores = /* @__PURE__ */ defineChain({
...chainConfig2,
id: 44