UNPKG

clanker-sdk

Version:

SDK for deploying tokens on Base using Clanker

1,332 lines (1,325 loc) 212 kB
#!/usr/bin/env node // node_modules/tsup/assets/esm_shims.js import { fileURLToPath } from "url"; import path from "path"; var getFilename = () => fileURLToPath(import.meta.url); var getDirname = () => path.dirname(getFilename()); var __dirname = /* @__PURE__ */ getDirname(); // src/cli/create-clanker.ts import * as fs from "node:fs"; import * as path2 from "node:path"; import { fileURLToPath as fileURLToPath2 } from "node:url"; import * as dotenv from "dotenv"; import inquirer from "inquirer"; import { createPublicClient, createWalletClient, http, stringify as stringify2 } from "viem"; import { privateKeyToAccount } from "viem/accounts"; import { base as base4 } from "viem/chains"; // src/abi/v3.1/Clanker.ts var Clanker_v3_1_abi = [ { inputs: [{ internalType: "address", name: "owner_", type: "address" }], stateMutability: "nonpayable", type: "constructor" }, { inputs: [], name: "Deprecated", type: "error" }, { inputs: [], name: "InvalidCreatorInfo", type: "error" }, { inputs: [], name: "InvalidCreatorReward", type: "error" }, { inputs: [], name: "InvalidInterfaceInfo", type: "error" }, { inputs: [], name: "InvalidTick", type: "error" }, { inputs: [], name: "InvalidVaultConfiguration", type: "error" }, { inputs: [], name: "NotFound", type: "error" }, { inputs: [], name: "OnlyNonOriginatingChains", type: "error" }, { inputs: [], name: "OnlyOriginatingChain", type: "error" }, { inputs: [{ internalType: "address", name: "owner", type: "address" }], name: "OwnableInvalidOwner", type: "error" }, { inputs: [{ internalType: "address", name: "account", type: "address" }], name: "OwnableUnauthorizedAccount", type: "error" }, { inputs: [], name: "ReentrancyGuardReentrantCall", type: "error" }, { inputs: [], name: "Unauthorized", type: "error" }, { inputs: [], name: "ZeroTeamRewardRecipient", type: "error" }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "oldClankerDeployer", type: "address" }, { indexed: false, internalType: "address", name: "newClankerDeployer", type: "address" } ], name: "ClankerDeployerUpdated", type: "event" }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "oldLocker", type: "address" }, { indexed: false, internalType: "address", name: "newLocker", type: "address" } ], name: "LiquidityLockerUpdated", type: "event" }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "previousOwner", type: "address" }, { indexed: true, internalType: "address", name: "newOwner", type: "address" } ], name: "OwnershipTransferred", type: "event" }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "admin", type: "address" }, { indexed: false, internalType: "bool", name: "isAdmin", type: "bool" } ], name: "SetAdmin", type: "event" }, { anonymous: false, inputs: [ { indexed: false, internalType: "bool", name: "deprecated", type: "bool" } ], name: "SetDeprecated", type: "event" }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "tokenAddress", type: "address" }, { indexed: true, internalType: "address", name: "creatorAdmin", type: "address" }, { indexed: true, internalType: "address", name: "interfaceAdmin", type: "address" }, { indexed: false, internalType: "address", name: "creatorRewardRecipient", type: "address" }, { indexed: false, internalType: "address", name: "interfaceRewardRecipient", type: "address" }, { indexed: false, internalType: "uint256", name: "positionId", type: "uint256" }, { indexed: false, internalType: "string", name: "name", type: "string" }, { indexed: false, internalType: "string", name: "symbol", type: "string" }, { indexed: false, internalType: "int24", name: "startingTickIfToken0IsNewToken", type: "int24" }, { indexed: false, internalType: "string", name: "metadata", type: "string" }, { indexed: false, internalType: "uint256", name: "amountTokensBought", type: "uint256" }, { indexed: false, internalType: "uint256", name: "vaultDuration", type: "uint256" }, { indexed: false, internalType: "uint8", name: "vaultPercentage", type: "uint8" }, { indexed: false, internalType: "address", name: "msgSender", type: "address" } ], name: "TokenCreated", type: "event" }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "oldVault", type: "address" }, { indexed: false, internalType: "address", name: "newVault", type: "address" } ], name: "VaultUpdated", type: "event" }, { inputs: [], name: "MAX_CREATOR_REWARD", outputs: [{ internalType: "uint256", name: "", type: "uint256" }], stateMutability: "view", type: "function" }, { inputs: [], name: "MAX_TICK", outputs: [{ internalType: "int24", name: "", type: "int24" }], stateMutability: "view", type: "function" }, { inputs: [], name: "MAX_VAULT_PERCENTAGE", outputs: [{ internalType: "uint256", name: "", type: "uint256" }], stateMutability: "view", type: "function" }, { inputs: [], name: "POOL_FEE", outputs: [{ internalType: "uint24", name: "", type: "uint24" }], stateMutability: "view", type: "function" }, { inputs: [], name: "TICK_SPACING", outputs: [{ internalType: "int24", name: "", type: "int24" }], stateMutability: "view", type: "function" }, { inputs: [], name: "TOKEN_SUPPLY", outputs: [{ internalType: "uint256", name: "", type: "uint256" }], stateMutability: "view", type: "function" }, { inputs: [{ internalType: "address", name: "", type: "address" }], name: "admins", outputs: [{ internalType: "bool", name: "", type: "bool" }], stateMutability: "view", type: "function" }, { inputs: [{ internalType: "address", name: "token", type: "address" }], name: "claimRewards", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [ { components: [ { components: [ { internalType: "string", name: "name", type: "string" }, { internalType: "string", name: "symbol", type: "string" }, { internalType: "bytes32", name: "salt", type: "bytes32" }, { internalType: "string", name: "image", type: "string" }, { internalType: "string", name: "metadata", type: "string" }, { internalType: "string", name: "context", type: "string" }, { internalType: "uint256", name: "originatingChainId", type: "uint256" } ], internalType: "struct IClanker.TokenConfig", name: "tokenConfig", type: "tuple" }, { components: [ { internalType: "uint8", name: "vaultPercentage", type: "uint8" }, { internalType: "uint256", name: "vaultDuration", type: "uint256" } ], internalType: "struct IClanker.VaultConfig", name: "vaultConfig", type: "tuple" }, { components: [ { internalType: "address", name: "pairedToken", type: "address" }, { internalType: "int24", name: "tickIfToken0IsNewToken", type: "int24" } ], internalType: "struct IClanker.PoolConfig", name: "poolConfig", type: "tuple" }, { components: [ { internalType: "uint24", name: "pairedTokenPoolFee", type: "uint24" }, { internalType: "uint256", name: "pairedTokenSwapAmountOutMinimum", type: "uint256" } ], internalType: "struct IClanker.InitialBuyConfig", name: "initialBuyConfig", type: "tuple" }, { components: [ { internalType: "uint256", name: "creatorReward", type: "uint256" }, { internalType: "address", name: "creatorAdmin", type: "address" }, { internalType: "address", name: "creatorRewardRecipient", type: "address" }, { internalType: "address", name: "interfaceAdmin", type: "address" }, { internalType: "address", name: "interfaceRewardRecipient", type: "address" } ], internalType: "struct IClanker.RewardsConfig", name: "rewardsConfig", type: "tuple" } ], internalType: "struct IClanker.DeploymentConfig", name: "deploymentConfig", type: "tuple" } ], name: "deployToken", outputs: [ { internalType: "address", name: "tokenAddress", type: "address" }, { internalType: "uint256", name: "positionId", type: "uint256" } ], stateMutability: "payable", type: "function" }, { inputs: [ { components: [ { components: [ { internalType: "string", name: "name", type: "string" }, { internalType: "string", name: "symbol", type: "string" }, { internalType: "bytes32", name: "salt", type: "bytes32" }, { internalType: "string", name: "image", type: "string" }, { internalType: "string", name: "metadata", type: "string" }, { internalType: "string", name: "context", type: "string" }, { internalType: "uint256", name: "originatingChainId", type: "uint256" } ], internalType: "struct IClanker.TokenConfig", name: "tokenConfig", type: "tuple" }, { components: [ { internalType: "uint8", name: "vaultPercentage", type: "uint8" }, { internalType: "uint256", name: "vaultDuration", type: "uint256" } ], internalType: "struct IClanker.VaultConfig", name: "vaultConfig", type: "tuple" }, { components: [ { internalType: "address", name: "pairedToken", type: "address" }, { internalType: "int24", name: "tickIfToken0IsNewToken", type: "int24" } ], internalType: "struct IClanker.PoolConfig", name: "poolConfig", type: "tuple" }, { components: [ { internalType: "uint24", name: "pairedTokenPoolFee", type: "uint24" }, { internalType: "uint256", name: "pairedTokenSwapAmountOutMinimum", type: "uint256" } ], internalType: "struct IClanker.InitialBuyConfig", name: "initialBuyConfig", type: "tuple" }, { components: [ { internalType: "uint256", name: "creatorReward", type: "uint256" }, { internalType: "address", name: "creatorAdmin", type: "address" }, { internalType: "address", name: "creatorRewardRecipient", type: "address" }, { internalType: "address", name: "interfaceAdmin", type: "address" }, { internalType: "address", name: "interfaceRewardRecipient", type: "address" } ], internalType: "struct IClanker.RewardsConfig", name: "rewardsConfig", type: "tuple" } ], internalType: "struct IClanker.DeploymentConfig", name: "deploymentConfig", type: "tuple" }, { internalType: "address", name: "teamRewardRecipient", type: "address" } ], name: "deployTokenWithCustomTeamRewardRecipient", outputs: [ { internalType: "address", name: "tokenAddress", type: "address" }, { internalType: "uint256", name: "positionId", type: "uint256" } ], stateMutability: "payable", type: "function" }, { inputs: [ { components: [ { internalType: "string", name: "name", type: "string" }, { internalType: "string", name: "symbol", type: "string" }, { internalType: "bytes32", name: "salt", type: "bytes32" }, { internalType: "string", name: "image", type: "string" }, { internalType: "string", name: "metadata", type: "string" }, { internalType: "string", name: "context", type: "string" }, { internalType: "uint256", name: "originatingChainId", type: "uint256" } ], internalType: "struct IClanker.TokenConfig", name: "tokenConfig", type: "tuple" }, { internalType: "address", name: "tokenAdmin", type: "address" } ], name: "deployTokenZeroSupply", outputs: [{ internalType: "address", name: "tokenAddress", type: "address" }], stateMutability: "nonpayable", type: "function" }, { inputs: [{ internalType: "address", name: "", type: "address" }], name: "deploymentInfoForToken", outputs: [ { internalType: "address", name: "token", type: "address" }, { internalType: "uint256", name: "positionId", type: "uint256" }, { internalType: "address", name: "locker", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [], name: "deprecated", outputs: [{ internalType: "bool", name: "", type: "bool" }], stateMutability: "view", type: "function" }, { inputs: [{ internalType: "address", name: "user", type: "address" }], name: "getTokensDeployedByUser", outputs: [ { components: [ { internalType: "address", name: "token", type: "address" }, { internalType: "uint256", name: "positionId", type: "uint256" }, { internalType: "address", name: "locker", type: "address" } ], internalType: "struct IClanker.DeploymentInfo[]", name: "", type: "tuple[]" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "address", name: "uniswapV3Factory_", type: "address" }, { internalType: "address", name: "positionManager_", type: "address" }, { internalType: "address", name: "swapRouter_", type: "address" }, { internalType: "address", name: "weth_", type: "address" }, { internalType: "address", name: "liquidityLocker_", type: "address" }, { internalType: "address", name: "vault_", type: "address" } ], name: "initialize", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [], name: "liquidityLocker", outputs: [{ internalType: "contract ILpLockerv2", name: "", type: "address" }], stateMutability: "view", type: "function" }, { inputs: [], name: "owner", outputs: [{ internalType: "address", name: "", type: "address" }], stateMutability: "view", type: "function" }, { inputs: [], name: "positionManager", outputs: [ { internalType: "contract INonfungiblePositionManager", name: "", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [], name: "renounceOwnership", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "address", name: "admin", type: "address" }, { internalType: "bool", name: "isAdmin", type: "bool" } ], name: "setAdmin", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [{ internalType: "bool", name: "deprecated_", type: "bool" }], name: "setDeprecated", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [], name: "swapRouter", outputs: [{ internalType: "contract ISwapRouter", name: "", type: "address" }], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "address", name: "", type: "address" }, { internalType: "uint256", name: "", type: "uint256" } ], name: "tokensDeployedByUsers", outputs: [ { internalType: "address", name: "token", type: "address" }, { internalType: "uint256", name: "positionId", type: "uint256" }, { internalType: "address", name: "locker", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [{ internalType: "address", name: "newOwner", type: "address" }], name: "transferOwnership", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [], name: "uniswapV3Factory", outputs: [{ internalType: "contract IUniswapV3Factory", name: "", type: "address" }], stateMutability: "view", type: "function" }, { inputs: [{ internalType: "address", name: "newLocker", type: "address" }], name: "updateLiquidityLocker", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [{ internalType: "address", name: "newVault", type: "address" }], name: "updateVault", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [], name: "vault", outputs: [{ internalType: "contract IClankerVault", name: "", type: "address" }], stateMutability: "view", type: "function" }, { inputs: [], name: "weth", outputs: [{ internalType: "address", name: "", type: "address" }], stateMutability: "view", type: "function" } ]; // src/config/clankerTokenV3.ts import { isAddress as isAddress2, stringify } from "viem"; import { base as base3 } from "viem/chains"; import * as z2 from "zod/v4"; // src/constants.ts import { arbitrum, base, baseSepolia, monadTestnet, unichain } from "viem/chains"; var DEGEN_ADDRESS = "0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed"; var NATIVE_ADDRESS = "0x20DD04c17AFD5c9a8b3f2cdacaa8Ee7907385BEF"; var CLANKER_ADDRESS = "0x1bc0c42215582d5A085795f4baDbaC3ff36d1Bcb"; var ANON_ADDRESS = "0x0Db510e79909666d6dEc7f5e49370838c16D950f"; var HIGHER_ADDRESS = "0x0578d8A44db98B23BF096A382e016e29a5Ce0ffe"; var CB_BTC_ADDRESS = "0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf"; var A0X_ADDRESS = "0x820C5F0fB255a1D18fd0eBB0F1CCefbC4D546dA7"; var WETH_ADDRESSES = { [arbitrum.id]: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", [base.id]: "0x4200000000000000000000000000000000000006", [baseSepolia.id]: "0x4200000000000000000000000000000000000006", [unichain.id]: "0x4200000000000000000000000000000000000006", [monadTestnet.id]: "0x760AfE86e5de5fa0Ee542fc7B7B713e1c5425701" // WMON }; var DEFAULT_SUPPLY = 100000000000000000000000000000n; // src/services/vanityAddress.ts import { encodeDeployData, keccak256 } from "viem"; import { monadTestnet as monadTestnet3 } from "viem/chains"; // src/abi/v3.1/ClankerToken.ts var ClankerToken_v3_1_abi = [ { type: "constructor", inputs: [ { name: "name_", type: "string", internalType: "string" }, { name: "symbol_", type: "string", internalType: "string" }, { name: "maxSupply_", type: "uint256", internalType: "uint256" }, { name: "admin_", type: "address", internalType: "address" }, { name: "image_", type: "string", internalType: "string" }, { name: "metadata_", type: "string", internalType: "string" }, { name: "context_", type: "string", internalType: "string" }, { name: "initialSupplyChainId_", type: "uint256", internalType: "uint256" } ], stateMutability: "nonpayable" }, { type: "function", name: "CLOCK_MODE", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "DOMAIN_SEPARATOR", inputs: [], outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], stateMutability: "view" }, { type: "function", name: "admin", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "allowance", inputs: [ { name: "owner", type: "address", internalType: "address" }, { name: "spender", type: "address", internalType: "address" } ], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "approve", inputs: [ { name: "spender", type: "address", internalType: "address" }, { name: "value", type: "uint256", internalType: "uint256" } ], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "balanceOf", inputs: [{ name: "account", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "burn", inputs: [{ name: "value", type: "uint256", internalType: "uint256" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "burnFrom", inputs: [ { name: "account", type: "address", internalType: "address" }, { name: "value", type: "uint256", internalType: "uint256" } ], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "checkpoints", inputs: [ { name: "account", type: "address", internalType: "address" }, { name: "pos", type: "uint32", internalType: "uint32" } ], outputs: [ { name: "", type: "tuple", internalType: "struct Checkpoints.Checkpoint208", components: [ { name: "_key", type: "uint48", internalType: "uint48" }, { name: "_value", type: "uint208", internalType: "uint208" } ] } ], stateMutability: "view" }, { type: "function", name: "clock", inputs: [], outputs: [{ name: "", type: "uint48", internalType: "uint48" }], stateMutability: "view" }, { type: "function", name: "context", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "crosschainBurn", inputs: [ { name: "_from", type: "address", internalType: "address" }, { name: "_amount", type: "uint256", internalType: "uint256" } ], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "crosschainMint", inputs: [ { name: "_to", type: "address", internalType: "address" }, { name: "_amount", type: "uint256", internalType: "uint256" } ], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "decimals", inputs: [], outputs: [{ name: "", type: "uint8", internalType: "uint8" }], stateMutability: "view" }, { type: "function", name: "delegate", inputs: [{ name: "delegatee", type: "address", internalType: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "delegateBySig", inputs: [ { name: "delegatee", type: "address", internalType: "address" }, { name: "nonce", type: "uint256", internalType: "uint256" }, { name: "expiry", type: "uint256", internalType: "uint256" }, { name: "v", type: "uint8", internalType: "uint8" }, { name: "r", type: "bytes32", internalType: "bytes32" }, { name: "s", type: "bytes32", internalType: "bytes32" } ], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "delegates", inputs: [{ name: "account", type: "address", internalType: "address" }], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "eip712Domain", inputs: [], outputs: [ { name: "fields", type: "bytes1", internalType: "bytes1" }, { name: "name", type: "string", internalType: "string" }, { name: "version", type: "string", internalType: "string" }, { name: "chainId", type: "uint256", internalType: "uint256" }, { name: "verifyingContract", type: "address", internalType: "address" }, { name: "salt", type: "bytes32", internalType: "bytes32" }, { name: "extensions", type: "uint256[]", internalType: "uint256[]" } ], stateMutability: "view" }, { type: "function", name: "getPastTotalSupply", inputs: [{ name: "timepoint", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "getPastVotes", inputs: [ { name: "account", type: "address", internalType: "address" }, { name: "timepoint", type: "uint256", internalType: "uint256" } ], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "getVotes", inputs: [{ name: "account", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "imageUrl", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "isVerified", inputs: [], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "metadata", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "name", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "nonces", inputs: [{ name: "owner", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "numCheckpoints", inputs: [{ name: "account", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint32", internalType: "uint32" }], stateMutability: "view" }, { type: "function", name: "permit", inputs: [ { name: "owner", type: "address", internalType: "address" }, { name: "spender", type: "address", internalType: "address" }, { name: "value", type: "uint256", internalType: "uint256" }, { name: "deadline", type: "uint256", internalType: "uint256" }, { name: "v", type: "uint8", internalType: "uint8" }, { name: "r", type: "bytes32", internalType: "bytes32" }, { name: "s", type: "bytes32", internalType: "bytes32" } ], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "supportsInterface", inputs: [{ name: "_interfaceId", type: "bytes4", internalType: "bytes4" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "pure" }, { type: "function", name: "symbol", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "totalSupply", inputs: [], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "transfer", inputs: [ { name: "to", type: "address", internalType: "address" }, { name: "value", type: "uint256", internalType: "uint256" } ], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "transferFrom", inputs: [ { name: "from", type: "address", internalType: "address" }, { name: "to", type: "address", internalType: "address" }, { name: "value", type: "uint256", internalType: "uint256" } ], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "updateImage", inputs: [{ name: "image_", type: "string", internalType: "string" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateMetadata", inputs: [{ name: "metadata_", type: "string", internalType: "string" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "verify", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "event", name: "Approval", inputs: [ { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "spender", type: "address", indexed: true, internalType: "address" }, { name: "value", type: "uint256", indexed: false, internalType: "uint256" } ], anonymous: false }, { type: "event", name: "CrosschainBurn", inputs: [ { name: "from", type: "address", indexed: true, internalType: "address" }, { name: "amount", type: "uint256", indexed: false, internalType: "uint256" }, { name: "sender", type: "address", indexed: true, internalType: "address" } ], anonymous: false }, { type: "event", name: "CrosschainMint", inputs: [ { name: "to", type: "address", indexed: true, internalType: "address" }, { name: "amount", type: "uint256", indexed: false, internalType: "uint256" }, { name: "sender", type: "address", indexed: true, internalType: "address" } ], anonymous: false }, { type: "event", name: "DelegateChanged", inputs: [ { name: "delegator", type: "address", indexed: true, internalType: "address" }, { name: "fromDelegate", type: "address", indexed: true, internalType: "address" }, { name: "toDelegate", type: "address", indexed: true, internalType: "address" } ], anonymous: false }, { type: "event", name: "DelegateVotesChanged", inputs: [ { name: "delegate", type: "address", indexed: true, internalType: "address" }, { name: "previousVotes", type: "uint256", indexed: false, internalType: "uint256" }, { name: "newVotes", type: "uint256", indexed: false, internalType: "uint256" } ], anonymous: false }, { type: "event", name: "EIP712DomainChanged", inputs: [], anonymous: false }, { type: "event", name: "Transfer", inputs: [ { name: "from", type: "address", indexed: true, internalType: "address" }, { name: "to", type: "address", indexed: true, internalType: "address" }, { name: "value", type: "uint256", indexed: false, internalType: "uint256" } ], anonymous: false }, { type: "event", name: "Verified", inputs: [ { name: "admin", type: "address", indexed: true, internalType: "address" }, { name: "token", type: "address", indexed: true, internalType: "address" } ], anonymous: false }, { type: "error", name: "AlreadyVerified", inputs: [] }, { type: "error", name: "CheckpointUnorderedInsertion", inputs: [] }, { type: "error", name: "ECDSAInvalidSignature", inputs: [] }, { type: "error", name: "ECDSAInvalidSignatureLength", inputs: [{ name: "length", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ECDSAInvalidSignatureS", inputs: [{ name: "s", type: "bytes32", internalType: "bytes32" }] }, { type: "error", name: "ERC20ExceededSafeSupply", inputs: [ { name: "increasedSupply", type: "uint256", internalType: "uint256" }, { name: "cap", type: "uint256", internalType: "uint256" } ] }, { type: "error", name: "ERC20InsufficientAllowance", inputs: [ { name: "spender", type: "address", internalType: "address" }, { name: "allowance", type: "uint256", internalType: "uint256" }, { name: "needed", type: "uint256", internalType: "uint256" } ] }, { type: "error", name: "ERC20InsufficientBalance", inputs: [ { name: "sender", type: "address", internalType: "address" }, { name: "balance", type: "uint256", internalType: "uint256" }, { name: "needed", type: "uint256", internalType: "uint256" } ] }, { type: "error", name: "ERC20InvalidApprover", inputs: [{ name: "approver", type: "address", internalType: "address" }] }, { type: "error", name: "ERC20InvalidReceiver", inputs: [{ name: "receiver", type: "address", internalType: "address" }] }, { type: "error", name: "ERC20InvalidSender", inputs: [{ name: "sender", type: "address", internalType: "address" }] }, { type: "error", name: "ERC20InvalidSpender", inputs: [{ name: "spender", type: "address", internalType: "address" }] }, { type: "error", name: "ERC2612ExpiredSignature", inputs: [{ name: "deadline", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC2612InvalidSigner", inputs: [ { name: "signer", type: "address", internalType: "address" }, { name: "owner", type: "address", internalType: "address" } ] }, { type: "error", name: "ERC5805FutureLookup", inputs: [ { name: "timepoint", type: "uint256", internalType: "uint256" }, { name: "clock", type: "uint48", internalType: "uint48" } ] }, { type: "error", name: "ERC6372InconsistentClock", inputs: [] }, { type: "error", name: "InvalidAccountNonce", inputs: [ { name: "account", type: "address", internalType: "address" }, { name: "currentNonce", type: "uint256", internalType: "uint256" } ] }, { type: "error", name: "InvalidShortString", inputs: [] }, { type: "error", name: "NotAdmin", inputs: [] }, { type: "error", name: "SafeCastOverflowedUintDowncast", inputs: [ { name: "bits", type: "uint8", internalType: "uint8" }, { name: "value", type: "uint256", internalType: "uint256" } ] }, { type: "error", name: "StringTooLong", inputs: [{ name: "str", type: "string", internalType: "string" }] }, { type: "error", name: "Unauthorized", inputs: [] }, { type: "error", name: "VotesExpiredSignature", inputs: [{ name: "expiry", type: "uint256", internalType: "uint256" }] } ]; var ClankerToken_v3_1_bytecode = "0x61016060405234610141576140a2803803809161001b82610159565b610160396101008161016001911261014157610160516001600160401b038111610141578161004d91610160016101b9565b610180516001600160401b038111610141578261006d91610160016101b9565b6101a05161007c6101c061020e565b6101e0516001600160401b038111610141578561009c91610160016101b9565b610200519091906001600160401b03811161014157866100bf91610160016101b9565b610220519093906001600160401b038111610141576100f0976100e591610160016101b9565b946102405196610669565b604051612ffa908161106882396080518161210a015260a051816121c7015260c051816120db015260e051816121590152610100518161217f01526101205181610bf701526101405181610c200152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b610160601f91909101601f19168101906001600160401b0382119082101761018057604052565b610145565b601f909101601f19168101906001600160401b0382119082101761018057604052565b604051906101b7604083610185565b565b81601f82011215610141578051906001600160401b03821161018057604051926101ed601f8401601f191660200185610185565b8284526020838301011161014157815f9260208093018386015e8301015290565b51906001600160a01b038216820361014157565b90600182811c92168015610250575b602083101461023c57565b634e487b7160e01b5f52602260045260245ffd5b91607f1691610231565b601f8111610266575050565b60035f5260205f20906020601f840160051c830193106102a0575b601f0160051c01905b818110610295575050565b5f815560010161028a565b9091508190610281565b601f82116102b757505050565b5f5260205f20906020601f840160051c830193106102ef575b601f0160051c01905b8181106102e4575050565b5f81556001016102d9565b90915081906102d0565b80519091906001600160401b038111610180576103228161031b600454610222565b60046102aa565b602092601f821160011461036257610352929382915f92610357575b50508160011b915f199060031b1c19161790565b600455565b015190505f8061033e565b60045f52601f198216937f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b915f5b8681106103c657508360019596106103ae575b505050811b01600455565b01515f1960f88460031b161c191690555f80806103a3565b91926020600181928685015181550194019201610390565b80519091906001600160401b0381116101805761040781610400600e54610222565b600e6102aa565b602092601f821160011461043b57610436929382915f926103575750508160011b915f199060031b1c19161790565b600e55565b600e5f52601f198216937fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd915f5b86811061049f5750836001959610610487575b505050811b01600e55565b01515f1960f88460031b161c191690555f808061047c565b91926020600181928685015181550194019201610469565b80519091906001600160401b038111610180576104e0816104d9600c54610222565b600c6102aa565b602092601f82116001146105145761050f929382915f926103575750508160011b915f199060031b1c19161790565b600c55565b600c5f52601f198216937fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7915f5b8681106105785750836001959610610560575b505050811b01600c55565b01515f1960f88460031b161c191690555f8080610555565b91926020600181928685015181550194019201610542565b80519091906001600160401b038111610180576105b9816105b2600d54610222565b600d6102aa565b602092601f82116001146105ed576105e8929382915f926103575750508160011b915f199060031b1c19161790565b600d55565b600d5f52601f198216937fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb5915f5b8681106106515750836001959610610639575b505050811b01600d55565b01515f1960f88460031b161c191690555f808061062e565b9192602060018192868501518155019401920161061b565b969594939291966040519061067f604083610185565b60018252603160f81b6020830190815281519093906001600160401b038111610180576106b6816106b1600354610222565b61025a565b6020601f821160011461078f5793610762936107026107719b9a98946106fa856107679a9661076c9d9a5f91610784575b508160011b915f199060031b1c19161790565b6003556102f9565b61070b816108d2565b61012052610718826109c7565b610140526020815191012060e052519020610100524660a052610739610ab9565b6080523060c052600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6103de565b6104b7565b610590565b461461077a5750565b6101b79033610826565b90508501515f6106e7565b60035f52601f198216907fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b915f5b81811061080e57506107719b9a989460018561076c9c999561076299956107679c9861070296106107f6575b5050811b016003556102f9565b8601515f1960f88460031b161c191690555f806107e9565b9192602060018192868a0151815501940192016107bd565b91906001600160a01b03831680156108bf576002548281018091116108ba576002555f81815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a3600254926001600160d01b038085116108a357506101b7929350610b96565b630e58ae9360e11b5f52600485905260245260445ffd5b610b82565b63ec442f0560e01b5f525f60045260245ffd5b908151602081105f146108ed5750906108ea90610b17565b90565b6001600160401b038111610180576109118161090a600554610222565b60056102aa565b602092601f821160011461094857610940929382915f926103575750508160011b915f199060031b1c19161790565b60055560ff90565b60055f52601f198216937f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0915f5b8681106109af5750836001959610610997575b505050811b0160055560ff90565b01515f1960f88460031b161c191690555f8080610989565b91926020600181928685015181550194019201610976565b908151602081105f146109df5750906108ea90610b17565b6001600160401b03811161018057610a03816109fc600654610222565b60066102aa565b602092601f8211600114610a3a57610a32929382915f926103575750508160011b915f199060031b1c19161790565b60065560ff90565b60065f52601f198216937ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f915f5b868110610aa15750836001959610610a89575b505050811b0160065560ff90565b01515f1960f88460031b161c191690555f8080610a7b565b91926020600181928685015181550194019201610a68565b60e051610100516040519060208201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8452604083015260608201524660808201523060a082015260a08152610b1160c082610185565b51902090565b601f815111610b42576020815191015160208210610b33571790565b5f198260200360031b1b161790565b604460209160405192839163305a27a960e01b83528160048401528051918291826024860152018484015e5f828201840152601f01601f19168101030190fd5b634e487b7160e01b5f52601160045260245ffd5b90610ba081610c95565b9165ffffffffffff4311610c7d57600a5480610c475750610bda610bca6101b7945f5b600161100b565b65ffffffffffff4316600a610f35565b50506001600160a01b03168015610c2f575b60086020527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c7545f9182526040909120546001600160a01b039081169116610dc4565b610c40610c3b83610c95565b610cc6565b5050610bec565b92835f198101116108ba57600a5f525f5160206140625f395f51905f52909301546101b793610bda91610bca919060301c610bc3565b6306dfcc6560e41b5f5260306004524360245260445ffd5b6001600160d01b038111610caf576001600160d01b031690565b6306dfcc6560e41b5f5260d060045260245260445ffd5b65ffffffffffff4311610c7d57600a5480610cf05750610bca610cec915f5b600261100b565b9091565b805f198101116108ba57600a5f525f5160206140625f395f51905f520154610cec91610bca9160301c610ce5565b65ffffffffffff4311610c7d57805480610d525750610d42610cec925f600261100b565b9065ffffffffffff431690610f35565b805f198101116108ba575f82815260209020015f190154610cec92610d429160301c610ce5565b65ffffffffffff4311610c7d57805480610d9d5750610d42610cec925f600161100b565b805f198101116108ba575f82815260209020015f190154610cec92610d429160301c610bc3565b6001600160a01b03808316939291908116908185141580610eb7575b610dec575b5050505050565b81610e5d575b505082610e01575b8080610de5565b6001600160a01b03165f9081526009602052604090205f5160206140825f395f51905f5291610e3a91610e349091610c95565b90610d79565b604080516001600160d01b039384168152919092166020820152a25f8080610dfa565b6001600160a01b03165f9081526009602052604090205f5160206140825f395f51905f5290610e9590610e8f86610c95565b90610d1e565b604080516001600160d01b039384168152919092166020820152a25f80610df2565b50831515610de0565b5f198101919082116108ba57565b908154680100000000000000008110156101805760018101808455811015610f21575f9283526020928390208251929093015160301b65ffffffffffff191665ffffffffffff9290921691909117910155565b634e487b7160e01b5f52603260045260245ffd5b80549293928015610fe157610f4c610f5791610ec0565b825f5260205f200190565b8054603081901c9365ffffffffffff91821692918116808411610fd257879303610f9e5750610f9a92509065ffffffffffff82549181199060301b169116179055565b9190565b915050610f9a91610fbe610fb06101a8565b65ffffffffffff9093168352565b6001600160d01b0386166020830152610ece565b632520601d60e01b5f5260045ffd5b509061100691610ff2610fb06101a8565b6001600160d01b0385166020830152610ece565b5f9190565b9190918060011461104d5760021461103157634e487b7160e01b5f52605160045260245ffd5b6001600160d01b03908116918116919091039081116108ba5790565b506001600160d01b03918216908216019081116108ba579056fe60806040526004361015610011575f80fd5b5f3560e01c806301ffc9a71461025457806306fdde031461024f578063095ea7b31461024a57806318160ddd1461024557806318bf50771461024057806323b872dd1461023b5780632b8c49e314610236578063313ce567146102315780633644e5151461022c578063392f37e9146102275780633a46b1a81461022257806342966c681461021d5780634bf5d7e914610218578063587cde1e146102135780635c19a95c1461020e5780636fcfff451461020957806370a082311461020457806379cc6790146101ff5780637ecebe00146101fa57806380007e83146101f557806384b0196e146101f05780638e539e8c146101eb578063918b5be1146101e657806391ddadf4146101e157806395d89b41146101dc5780639ab24eb0146101d7578063a9059cbb146101d2578063aba83150146101cd578063c3cda520146101c8578063d0496d6a146101c3578063d505accf146101be578063dd62ed3e146101b9578063eb3d68e7146101b4578063f1127ed8146101af578063f851a440146101aa5763fc735e99146101a5575f80fd5b6119de565b6119ab565b6118d5565b611761565b6116ee565b611553565b6114ae565b611340565b61127b565b611255565b6111ed565b611148565b61111d565b610f70565b610d16565b610bdf565b610bbd565b610b78565b610b48565b610b06565b610a7e565b610a5c565b610a01565b610958565b610939565b610871565b6107cc565b6107aa565b61078f565b610709565b6106d1565b61051d565b610500565b6104cf565b610391565b34610336576020600319360112610336576004357fffffffff000000000000000000000000000000000000000000000000000000008116809103610336577f3333199400000000000000000000000000000000000000000000000000000000811490811561030c575b81156102e2575b81156102d9575b506040519015158152602090f35b9050155f6102cb565b7f01ffc9a700000000000000000000000000000000000000000000000000000000811491506102c4565b7f36372b0700000000000000000000000000000000000000000000000000000000811491506102bd565b5f80fd5b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602080948051918291828752018686015e5f8582860101520116010190565b90602061038e92818152019061033a565b90565b34610336575f600319360112610336576040515f6003546103b181611abd565b808452906001811690811561044757506001146103e9575b6103e5836103d981850382610e88565b6040519182918261037d565b0390f35b60035f9081527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b939250905b80821061042d575090915081016020016103d96103c9565b919260018160209254838588010152019101909291610415565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208086019190915291151560051b840190910191506103d990506103c9565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361033657565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361033657565b34610336576040600319360112610336576104f56104eb610489565b6024359033612418565b602060405160018152f35b34610336575f600319360112610336576020600254604051908152f35b3461033657604060031936011261033657610536610489565b6024359073420000000000000000000000000000000000002833036106a95773ffffffffffffffffffffffffffffffffffffffff811690811561067d5761058761058284600254612251565b600255565b6105ae8173ffffffffffffffffffffffffffffffffffffffff165f525f60205260405f2090565b838154019055815f7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef604051806105ea88829190602083019252565b0390a360025479ffffffffffffffffffffffffffffffffffffffffffffffffffff9081811161064f5750508261061f91612ccc565b60405191825233917fde22baff038e3a3e08407cbdf617deed74e869a7ba517df611e33131c6e6ea0490602090a3005b7f1cb15d26000000000000000000000000000000000000000000000000000000005f5260045260245260445ffd5b7fec442f05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b7f82b42900000000000000000000000000000000000000000000000000000000005f5260045ffd5b34610336576060600319360112610336576104f56106ed610489565b6106f56104ac565b60443591610704833383611c66565b611dcb565b3461033657604060031936011261033657610722610489565b60243573420000000000000000000000000000000000002833036106a95761074a8183611f3e565b6040519081527fb90795a66650155983e242cac3e1ac1a4dc26f8ed2987f3ce416a34e00111fd4602073ffffffffffffffffffffffffffffffffffffffff33941692a3005b34610336575f60031936011261033657602060405160128152f35b34610336575f6003193601126103365760206107c46120c4565b604051908152f35b34610336575f600319360112610336576040515f600c546107ec81611abd565b80845290600181169081156104475750600114610813576103e5836103d981850382610e88565b600c5f9081527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7939250905b808210610857575090915081016020016103d96103c9565b9192600181602092548385880101