UNPKG

clanker-sdk

Version:
1,749 lines (1,742 loc) 450 kB
// src/v4/extensions/airdrop.ts import { StandardMerkleTree } from "@openzeppelin/merkle-tree"; import { isAddressEqual, stringify } from "viem"; import * as z2 from "zod/v4"; // src/abi/v4/ClankerAirdrop.ts var ClankerAirdrop_v4_abi = [ { inputs: [{ internalType: "address", name: "factory_", type: "address" }], stateMutability: "nonpayable", type: "constructor" }, { inputs: [], name: "AirdropAlreadyExists", type: "error" }, { inputs: [], name: "AirdropLockupDurationTooShort", type: "error" }, { inputs: [], name: "AirdropNotUnlocked", type: "error" }, { inputs: [], name: "InvalidAirdropPercentage", type: "error" }, { inputs: [], name: "InvalidMerkleRoot", type: "error" }, { inputs: [], name: "InvalidMsgValue", type: "error" }, { inputs: [], name: "InvalidProof", type: "error" }, { inputs: [], name: "ReentrancyGuardReentrantCall", type: "error" }, { inputs: [], name: "TotalMaxClaimed", type: "error" }, { inputs: [], name: "Unauthorized", type: "error" }, { inputs: [], name: "UserMaxClaimed", type: "error" }, { inputs: [], name: "ZeroClaim", type: "error" }, { inputs: [], name: "ZeroToClaim", type: "error" }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "token", type: "address" }, { indexed: true, internalType: "address", name: "user", type: "address" }, { indexed: false, internalType: "uint256", name: "totalUserAmountClaimed", type: "uint256" }, { indexed: false, internalType: "uint256", name: "userAmountStillLocked", type: "uint256" } ], name: "AirdropClaimed", type: "event" }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "token", type: "address" }, { indexed: false, internalType: "bytes32", name: "merkleRoot", type: "bytes32" }, { indexed: false, internalType: "uint256", name: "supply", type: "uint256" }, { indexed: false, internalType: "uint256", name: "lockupDuration", type: "uint256" }, { indexed: false, internalType: "uint256", name: "vestingDuration", type: "uint256" } ], name: "AirdropCreated", type: "event" }, { inputs: [], name: "MIN_LOCKUP_DURATION", outputs: [{ internalType: "uint256", name: "", type: "uint256" }], stateMutability: "view", type: "function" }, { inputs: [{ internalType: "address", name: "token", type: "address" }], name: "airdrops", outputs: [ { internalType: "bytes32", name: "merkleRoot", type: "bytes32" }, { internalType: "uint256", name: "totalSupply", type: "uint256" }, { internalType: "uint256", name: "totalClaimed", type: "uint256" }, { internalType: "uint256", name: "lockupEndTime", type: "uint256" }, { internalType: "uint256", name: "vestingEndTime", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "address", name: "token", type: "address" }, { internalType: "address", name: "recipient", type: "address" }, { internalType: "uint256", name: "allocatedAmount", type: "uint256" } ], name: "amountAvailableToClaim", outputs: [{ internalType: "uint256", name: "", type: "uint256" }], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "address", name: "token", type: "address" }, { internalType: "address", name: "recipient", type: "address" }, { internalType: "uint256", name: "allocatedAmount", type: "uint256" }, { internalType: "bytes32[]", name: "proof", type: "bytes32[]" } ], name: "claim", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [], name: "factory", outputs: [{ internalType: "address", name: "", type: "address" }], stateMutability: "view", type: "function" }, { inputs: [ { components: [ { components: [ { internalType: "address", name: "tokenAdmin", type: "address" }, { 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: "address", name: "hook", type: "address" }, { internalType: "address", name: "pairedToken", type: "address" }, { internalType: "int24", name: "tickIfToken0IsClanker", type: "int24" }, { internalType: "int24", name: "tickSpacing", type: "int24" }, { internalType: "bytes", name: "poolData", type: "bytes" } ], internalType: "struct IClanker.PoolConfig", name: "poolConfig", type: "tuple" }, { components: [ { internalType: "address", name: "locker", type: "address" }, { internalType: "address[]", name: "rewardAdmins", type: "address[]" }, { internalType: "address[]", name: "rewardRecipients", type: "address[]" }, { internalType: "uint16[]", name: "rewardBps", type: "uint16[]" }, { internalType: "int24[]", name: "tickLower", type: "int24[]" }, { internalType: "int24[]", name: "tickUpper", type: "int24[]" }, { internalType: "uint16[]", name: "positionBps", type: "uint16[]" }, { internalType: "bytes", name: "lockerData", type: "bytes" } ], internalType: "struct IClanker.LockerConfig", name: "lockerConfig", type: "tuple" }, { components: [ { internalType: "address", name: "mevModule", type: "address" }, { internalType: "bytes", name: "mevModuleData", type: "bytes" } ], internalType: "struct IClanker.MevModuleConfig", name: "mevModuleConfig", type: "tuple" }, { components: [ { internalType: "address", name: "extension", type: "address" }, { internalType: "uint256", name: "msgValue", type: "uint256" }, { internalType: "uint16", name: "extensionBps", type: "uint16" }, { internalType: "bytes", name: "extensionData", type: "bytes" } ], internalType: "struct IClanker.ExtensionConfig[]", name: "extensionConfigs", type: "tuple[]" } ], internalType: "struct IClanker.DeploymentConfig", name: "deploymentConfig", type: "tuple" }, { components: [ { internalType: "Currency", name: "currency0", type: "address" }, { internalType: "Currency", name: "currency1", type: "address" }, { internalType: "uint24", name: "fee", type: "uint24" }, { internalType: "int24", name: "tickSpacing", type: "int24" }, { internalType: "contract IHooks", name: "hooks", type: "address" } ], internalType: "struct PoolKey", name: "", type: "tuple" }, { internalType: "address", name: "token", type: "address" }, { internalType: "uint256", name: "extensionSupply", type: "uint256" }, { internalType: "uint256", name: "extensionIndex", type: "uint256" } ], name: "receiveTokens", outputs: [], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "bytes4", name: "interfaceId", type: "bytes4" }], name: "supportsInterface", outputs: [{ internalType: "bool", name: "", type: "bool" }], stateMutability: "pure", type: "function" } ]; // src/utils/clankers.ts import { abstract, arbitrum, base, baseSepolia, mainnet, monadTestnet, unichain } from "viem/chains"; // src/abi/v0/Clanker.ts var Clanker_v0_abi = [ { inputs: [ { internalType: "address", name: "taxCollector_", type: "address" }, { internalType: "address", name: "weth_", type: "address" }, { internalType: "address", name: "locker_", type: "address" }, { internalType: "address", name: "uniswapV3Factory_", type: "address" }, { internalType: "address", name: "positionManager_", type: "address" }, { internalType: "uint64", name: "defaultLockingPeriod_", type: "uint64" }, { internalType: "address", name: "swapRouter_", type: "address" } ], stateMutability: "nonpayable", type: "constructor" }, { inputs: [{ internalType: "address", name: "owner", type: "address" }], name: "OwnableInvalidOwner", type: "error" }, { inputs: [{ internalType: "address", name: "account", type: "address" }], name: "OwnableUnauthorizedAccount", type: "error" }, { 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: "tokenAddress", type: "address" }, { indexed: false, internalType: "uint256", name: "lpNftId", type: "uint256" }, { indexed: false, internalType: "address", name: "deployer", type: "address" }, { indexed: false, internalType: "string", name: "name", type: "string" }, { indexed: false, internalType: "string", name: "symbol", type: "string" }, { indexed: false, internalType: "uint256", name: "supply", type: "uint256" }, { indexed: false, internalType: "uint256", name: "_supply", type: "uint256" }, { indexed: false, internalType: "address", name: "lockerAddress", type: "address" } ], name: "TokenCreated", type: "event" }, { inputs: [], name: "defaultLockingPeriod", outputs: [{ internalType: "uint64", name: "", type: "uint64" }], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "string", name: "_name", type: "string" }, { internalType: "string", name: "_symbol", type: "string" }, { internalType: "uint256", name: "_supply", type: "uint256" }, { internalType: "int24", name: "_initialTick", type: "int24" }, { internalType: "uint24", name: "_fee", type: "uint24" }, { internalType: "bytes32", name: "_salt", type: "bytes32" }, { internalType: "address", name: "_deployer", type: "address" } ], name: "deployToken", outputs: [ { internalType: "contract Token", name: "token", type: "address" }, { internalType: "uint256", name: "tokenId", type: "uint256" } ], stateMutability: "payable", type: "function" }, { inputs: [ { internalType: "address", name: "deployer", type: "address" }, { internalType: "string", name: "name", type: "string" }, { internalType: "string", name: "symbol", type: "string" }, { internalType: "uint256", name: "supply", type: "uint256" } ], name: "generateSalt", outputs: [ { internalType: "bytes32", name: "salt", type: "bytes32" }, { internalType: "address", name: "token", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "address", name: "token", type: "address" }, { internalType: "uint24", name: "_fee", type: "uint24" } ], name: "initialSwapTokens", outputs: [], stateMutability: "payable", type: "function" }, { inputs: [], name: "liquidityLocker", outputs: [ { internalType: "contract ILockerFactory", name: "", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [], name: "lpFeesCut", outputs: [{ internalType: "uint8", name: "", type: "uint8" }], 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: [ { internalType: "address", name: "deployer", type: "address" }, { internalType: "string", name: "name", type: "string" }, { internalType: "string", name: "symbol", type: "string" }, { internalType: "uint256", name: "supply", type: "uint256" }, { internalType: "bytes32", name: "salt", type: "bytes32" } ], name: "predictToken", outputs: [{ internalType: "address", name: "", type: "address" }], stateMutability: "view", type: "function" }, { inputs: [], name: "protocolCut", outputs: [{ internalType: "uint8", name: "", type: "uint8" }], stateMutability: "view", type: "function" }, { inputs: [], name: "renounceOwnership", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [], name: "swapRouter", outputs: [{ internalType: "address", name: "", type: "address" }], stateMutability: "view", type: "function" }, { inputs: [], name: "taxCollector", outputs: [{ internalType: "address", name: "", type: "address" }], stateMutability: "view", type: "function" }, { inputs: [], name: "taxRate", outputs: [{ internalType: "uint8", name: "", type: "uint8" }], 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: "uint64", name: "newPeriod", type: "uint64" }], name: "updateDefaultLockingPeriod", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [{ internalType: "address", name: "newLocker", type: "address" }], name: "updateLiquidityLocker", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [{ internalType: "uint8", name: "newFee", type: "uint8" }], name: "updateProtocolFees", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [{ internalType: "address", name: "newCollector", type: "address" }], name: "updateTaxCollector", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [{ internalType: "uint8", name: "newRate", type: "uint8" }], name: "updateTaxRate", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [], name: "weth", outputs: [{ internalType: "address", name: "", type: "address" }], stateMutability: "view", type: "function" } ]; // src/abi/v1/Clanker.ts var Clanker_v1_abi = [ { inputs: [ { internalType: "address", name: "taxCollector_", type: "address" }, { internalType: "address", name: "weth_", type: "address" }, { internalType: "address", name: "locker_", type: "address" }, { internalType: "address", name: "uniswapV3Factory_", type: "address" }, { internalType: "address", name: "positionManager_", type: "address" }, { internalType: "uint64", name: "defaultLockingPeriod_", type: "uint64" }, { internalType: "address", name: "swapRouter_", type: "address" }, { internalType: "address", name: "owner_", type: "address" } ], stateMutability: "nonpayable", type: "constructor" }, { inputs: [], name: "Deprecated", type: "error" }, { inputs: [{ internalType: "address", name: "owner", type: "address" }], name: "OwnableInvalidOwner", type: "error" }, { inputs: [{ internalType: "address", name: "account", type: "address" }], name: "OwnableUnauthorizedAccount", type: "error" }, { 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: "tokenAddress", type: "address" }, { indexed: false, internalType: "uint256", name: "lpNftId", type: "uint256" }, { indexed: false, internalType: "address", name: "deployer", type: "address" }, { indexed: false, internalType: "uint256", name: "fid", type: "uint256" }, { indexed: false, internalType: "string", name: "name", type: "string" }, { indexed: false, internalType: "string", name: "symbol", type: "string" }, { indexed: false, internalType: "uint256", name: "supply", type: "uint256" }, { indexed: false, internalType: "address", name: "lockerAddress", type: "address" }, { indexed: false, internalType: "string", name: "castHash", type: "string" } ], name: "TokenCreated", type: "event" }, { inputs: [], name: "bundleFeeSwitch", outputs: [{ internalType: "bool", name: "", type: "bool" }], stateMutability: "view", type: "function" }, { inputs: [], name: "defaultLockingPeriod", outputs: [{ internalType: "uint64", name: "", type: "uint64" }], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "string", name: "_name", type: "string" }, { internalType: "string", name: "_symbol", type: "string" }, { internalType: "uint256", name: "_supply", type: "uint256" }, { internalType: "int24", name: "_initialTick", type: "int24" }, { internalType: "uint24", name: "_fee", type: "uint24" }, { internalType: "bytes32", name: "_salt", type: "bytes32" }, { internalType: "address", name: "_deployer", type: "address" }, { internalType: "uint256", name: "_fid", type: "uint256" }, { internalType: "string", name: "_image", type: "string" }, { internalType: "string", name: "_castHash", type: "string" } ], name: "deployToken", outputs: [ { internalType: "contract Token", name: "token", type: "address" }, { internalType: "uint256", name: "tokenId", type: "uint256" } ], stateMutability: "payable", type: "function" }, { inputs: [], name: "deprecated", outputs: [{ internalType: "bool", name: "", type: "bool" }], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "address", name: "deployer", type: "address" }, { internalType: "uint256", name: "fid", type: "uint256" }, { internalType: "string", name: "name", type: "string" }, { internalType: "string", name: "symbol", type: "string" }, { internalType: "string", name: "image", type: "string" }, { internalType: "string", name: "castHash", type: "string" }, { internalType: "uint256", name: "supply", type: "uint256" } ], name: "generateSalt", outputs: [ { internalType: "bytes32", name: "salt", type: "bytes32" }, { internalType: "address", name: "token", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "address", name: "token", type: "address" }, { internalType: "uint24", name: "_fee", type: "uint24" } ], name: "initialSwapTokens", outputs: [], stateMutability: "payable", type: "function" }, { inputs: [], name: "liquidityLocker", outputs: [{ internalType: "contract ILockerFactory", name: "", type: "address" }], stateMutability: "view", type: "function" }, { inputs: [], name: "lpFeesCut", outputs: [{ internalType: "uint8", name: "", type: "uint8" }], 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: [ { internalType: "address", name: "deployer", type: "address" }, { internalType: "uint256", name: "fid", type: "uint256" }, { internalType: "string", name: "name", type: "string" }, { internalType: "string", name: "symbol", type: "string" }, { internalType: "string", name: "image", type: "string" }, { internalType: "string", name: "castHash", type: "string" }, { internalType: "uint256", name: "supply", type: "uint256" }, { internalType: "bytes32", name: "salt", type: "bytes32" } ], name: "predictToken", outputs: [{ internalType: "address", name: "", type: "address" }], stateMutability: "view", type: "function" }, { inputs: [], name: "protocolCut", outputs: [{ internalType: "uint8", name: "", type: "uint8" }], stateMutability: "view", type: "function" }, { inputs: [], name: "renounceOwnership", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [{ internalType: "bool", name: "_deprecated", type: "bool" }], name: "setDeprecated", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [], name: "swapRouter", outputs: [{ internalType: "address", name: "", type: "address" }], stateMutability: "view", type: "function" }, { inputs: [], name: "taxCollector", outputs: [{ internalType: "address", name: "", type: "address" }], stateMutability: "view", type: "function" }, { inputs: [], name: "taxRate", outputs: [{ internalType: "uint8", name: "", type: "uint8" }], stateMutability: "view", type: "function" }, { inputs: [{ internalType: "bool", name: "_enabled", type: "bool" }], name: "toggleBundleFeeSwitch", outputs: [], stateMutability: "nonpayable", 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: "uint64", name: "newPeriod", type: "uint64" }], name: "updateDefaultLockingPeriod", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [{ internalType: "address", name: "newLocker", type: "address" }], name: "updateLiquidityLocker", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [{ internalType: "uint8", name: "newFee", type: "uint8" }], name: "updateProtocolFees", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [{ internalType: "address", name: "newCollector", type: "address" }], name: "updateTaxCollector", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [{ internalType: "uint8", name: "newRate", type: "uint8" }], name: "updateTaxRate", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [], name: "weth", outputs: [{ internalType: "address", name: "", type: "address" }], stateMutability: "view", type: "function" } ]; // src/abi/v2/Clanker.ts var Clanker_v2_abi = [ { inputs: [ { internalType: "address", name: "locker_", type: "address" }, { internalType: "address", name: "uniswapV3Factory_", type: "address" }, { internalType: "address", name: "positionManager_", type: "address" }, { internalType: "address", name: "swapRouter_", type: "address" }, { internalType: "address", name: "owner_", type: "address" } ], stateMutability: "nonpayable", type: "constructor" }, { inputs: [], name: "Deprecated", type: "error" }, { inputs: [], name: "InvalidConfig", type: "error" }, { inputs: [{ internalType: "address", name: "user", type: "address" }], name: "NotAdmin", type: "error" }, { inputs: [{ internalType: "address", name: "token", type: "address" }], name: "NotAllowedPairedToken", 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: [{ internalType: "address", name: "token", type: "address" }], name: "TokenNotFound", type: "error" }, { 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: "tokenAddress", type: "address" }, { indexed: false, internalType: "uint256", name: "positionId", type: "uint256" }, { indexed: false, internalType: "address", name: "deployer", type: "address" }, { indexed: false, internalType: "uint256", name: "fid", type: "uint256" }, { indexed: false, internalType: "string", name: "name", type: "string" }, { indexed: false, internalType: "string", name: "symbol", type: "string" }, { indexed: false, internalType: "uint256", name: "supply", type: "uint256" }, { indexed: false, internalType: "address", name: "lockerAddress", type: "address" }, { indexed: false, internalType: "string", name: "castHash", type: "string" } ], name: "TokenCreated", type: "event" }, { inputs: [{ internalType: "address", name: "", type: "address" }], name: "admins", outputs: [{ internalType: "bool", name: "", type: "bool" }], stateMutability: "view", type: "function" }, { inputs: [{ internalType: "address", name: "", type: "address" }], name: "allowedPairedTokens", 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: [ { internalType: "string", name: "_name", type: "string" }, { internalType: "string", name: "_symbol", type: "string" }, { internalType: "uint256", name: "_supply", type: "uint256" }, { internalType: "uint24", name: "_fee", type: "uint24" }, { internalType: "bytes32", name: "_salt", type: "bytes32" }, { internalType: "address", name: "_deployer", type: "address" }, { internalType: "uint256", name: "_fid", type: "uint256" }, { internalType: "string", name: "_image", type: "string" }, { internalType: "string", name: "_castHash", type: "string" }, { components: [ { internalType: "int24", name: "tick", type: "int24" }, { internalType: "address", name: "pairedToken", type: "address" }, { internalType: "uint24", name: "devBuyFee", type: "uint24" } ], internalType: "struct Clanker.PoolConfig", name: "_poolConfig", type: "tuple" } ], name: "deployToken", outputs: [ { internalType: "contract ClankerToken", name: "token", type: "address" }, { internalType: "uint256", name: "positionId", type: "uint256" } ], stateMutability: "payable", 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 Clanker.DeploymentInfo[]", name: "", type: "tuple[]" } ], stateMutability: "view", type: "function" }, { inputs: [], name: "liquidityLocker", outputs: [{ internalType: "contract LpLockerv2", 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: "address", name: "", type: "address" }], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "address", name: "token", type: "address" }, { internalType: "bool", name: "allowed", type: "bool" } ], name: "toggleAllowedPairedToken", outputs: [], stateMutability: "nonpayable", 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: [], name: "version", outputs: [{ internalType: "string", name: "", type: "string" }], stateMutability: "view", type: "function" }, { inputs: [], name: "weth", outputs: [{ internalType: "address", name: "", type: "address" }], stateMutability: "view", type: "function" } ]; // src/abi/v3/Clanker.ts var Clanker_v3_abi = [ { inputs: [ { internalType: "address", name: "locker_", type: "address" }, { internalType: "address", name: "uniswapV3Factory_", type: "address" }, { internalType: "address", name: "positionManager_", type: "address" }, { internalType: "address", name: "swapRouter_", type: "address" }, { internalType: "address", name: "owner_", type: "address" } ], stateMutability: "nonpayable", type: "constructor" }, { inputs: [], name: "Invalid", type: "error" }, { inputs: [], name: "NotFound", 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: "Unauthorized", type: "error" }, { 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: "tokenAddress", type: "address" }, { indexed: false, internalType: "uint256", name: "positionId", type: "uint256" }, { indexed: false, internalType: "address", name: "deployer", type: "address" }, { indexed: false, internalType: "uint256", name: "fid", type: "uint256" }, { indexed: false, internalType: "string", name: "name", type: "string" }, { indexed: false, internalType: "string", name: "symbol", type: "string" }, { indexed: false, internalType: "uint256", name: "supply", type: "uint256" }, { indexed: false, internalType: "string", name: "castHash", type: "string" } ], name: "TokenCreated", type: "event" }, { 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: [ { internalType: "string", name: "_name", type: "string" }, { internalType: "string", name: "_symbol", type: "string" }, { internalType: "uint256", name: "_supply", type: "uint256" }, { internalType: "uint24", name: "_fee", type: "uint24" }, { internalType: "bytes32", name: "_salt", type: "bytes32" }, { internalType: "address", name: "_deployer", type: "address" }, { internalType: "uint256", name: "_fid", type: "uint256" }, { internalType: "string", name: "_image", type: "string" }, { internalType: "string", name: "_castHash", type: "string" }, { components: [ { internalType: "int24", name: "tick", type: "int24" }, { internalType: "address", name: "pairedToken", type: "address" }, { internalType: "uint24", name: "devBuyFee", type: "uint24" } ], internalType: "struct Clanker.PoolConfig", name: "_poolConfig", type: "tuple" } ], internalType: "struct Clanker.PreSaleTokenConfig", name: "preSaleTokenConfig", type: "tuple" } ], name: "deployToken", outputs: [ { internalType: "address", name: "token", 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: "uint256", name: "_supply", type: "uint256" }, { internalType: "uint24", name: "_fee", type: "uint24" }, { internalType: "bytes32", name: "_salt", type: "bytes32" }, { internalType: "address", name: "_deployer", type: "address" }, { internalType: "uint256", name: "_fid", type: "uint256" }, { internalType: "string", name: "_image", type: "string" }, { internalType: "string", name: "_castHash", type: "string" }, { components: [ { internalType: "int24", name: "tick", type: "int24" }, { internalType: "address", name: "pairedToken", type: "address" }, { internalType: "uint24", name: "devBuyFee", type: "uint24" } ], internalType: "struct Clanker.PoolConfig", name: "_poolConfig", type: "tuple" } ], internalType: "struct Clanker.PreSaleTokenConfig", name: "preSaleTokenConfig", type: "tuple" }, { internalType: "uint256", name: "preSaleId", type: "uint256" }, { components: [ { internalType: "uint256", name: "bpsBought", type: "uint256" }, { internalType: "address", name: "user", type: "address" } ], internalType: "struct Clanker.PreSalePurchase[]", name: "preSalePurchases", type: "tuple[]" }, { components: [ { internalType: "uint256", name: "bpsAvailable", type: "uint256" }, { internalType: "uint256", name: "ethPerBps", type: "uint256" }, { internalType: "uint256", name: "endTime", type: "uint256" }, { internalType: "uint256", name: "bpsSold", type: "uint256" }, { internalType: "address", name: "tokenAddress", type: "address" } ], internalType: "struct Clanker.PreSaleConfig", name: "preSaleConfig", type: "tuple" } ], name: "deployToken", outputs: [ { internalType: "address", name: "token", type: "address" }, { internalType: "uint256", name: "positionId", type: "uint256" } ], stateMutability: "payable", 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: [{ 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 Clanker.DeploymentInfo[]", name: "", type: "tuple[]" } ], stateMutability: "view", 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: [], name: "swapRouter", outputs: [{ internalType: "address", 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: [], name: "weth", outputs: [{ internalType: "address", name: "", type: "address" }], stateMutability: "view", type: "function" } ]; // 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: