clanker-sdk
Version:
SDK for deploying tokens on Base using Clanker
1,506 lines (1,494 loc) • 169 kB
JavaScript
// src/v4/index.ts
import { base as base3 } from "viem/chains";
// src/abi/v4/ClankerFeeLocker.ts
var ClankerFeeLocker_abi = [
{
inputs: [{ internalType: "address", name: "owner_", type: "address" }],
stateMutability: "nonpayable",
type: "constructor"
},
{ inputs: [], name: "ClaimAmountTooHigh", type: "error" },
{ inputs: [], name: "InvalidRecipient", type: "error" },
{ inputs: [], name: "NoFeesToClaim", 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: [{ internalType: "address", name: "token", type: "address" }],
name: "SafeERC20FailedOperation",
type: "error"
},
{ inputs: [], name: "TransferFailed", type: "error" },
{ inputs: [], name: "Unauthorized", type: "error" },
{
anonymous: false,
inputs: [{ indexed: true, internalType: "address", name: "depositor", type: "address" }],
name: "AddDepositor",
type: "event"
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "feeOwner", type: "address" },
{ indexed: true, internalType: "address", name: "token", type: "address" },
{ indexed: false, internalType: "uint256", name: "amountClaimed", type: "uint256" }
],
name: "ClaimTokens",
type: "event"
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "feeOwner", type: "address" },
{ indexed: true, internalType: "address", name: "token", type: "address" },
{ indexed: false, internalType: "address", name: "recipient", type: "address" },
{ indexed: false, internalType: "uint256", name: "amountClaimed", type: "uint256" }
],
name: "ClaimTokensPermissioned",
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: true, internalType: "address", name: "sender", type: "address" },
{ indexed: true, internalType: "address", name: "feeOwner", type: "address" },
{ indexed: true, internalType: "address", name: "token", type: "address" },
{ indexed: false, internalType: "uint256", name: "balance", type: "uint256" },
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" }
],
name: "StoreTokens",
type: "event"
},
{
inputs: [{ internalType: "address", name: "depositor", type: "address" }],
name: "addDepositor",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [{ internalType: "address", name: "depositor", type: "address" }],
name: "allowedDepositors",
outputs: [{ internalType: "bool", name: "isAllowed", type: "bool" }],
stateMutability: "view",
type: "function"
},
{
inputs: [
{ internalType: "address", name: "feeOwner", type: "address" },
{ internalType: "address", name: "token", type: "address" }
],
name: "availableFees",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function"
},
{
inputs: [
{ internalType: "address", name: "feeOwner", type: "address" },
{ internalType: "address", name: "token", type: "address" }
],
name: "claim",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{ internalType: "address", name: "feeOwner", type: "address" },
{ internalType: "address", name: "token", type: "address" }
],
name: "feesToClaim",
outputs: [{ internalType: "uint256", name: "balance", type: "uint256" }],
stateMutability: "view",
type: "function"
},
{
inputs: [],
name: "owner",
outputs: [{ internalType: "address", name: "", type: "address" }],
stateMutability: "view",
type: "function"
},
{
inputs: [],
name: "renounceOwnership",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{ internalType: "address", name: "feeOwner", type: "address" },
{ internalType: "address", name: "token", type: "address" },
{ internalType: "uint256", name: "amount", type: "uint256" }
],
name: "storeFees",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [{ internalType: "bytes4", name: "interfaceId", type: "bytes4" }],
name: "supportsInterface",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "pure",
type: "function"
},
{
inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
name: "transferOwnership",
outputs: [],
stateMutability: "nonpayable",
type: "function"
}
];
// src/abi/v4/ClankerVault.ts
var ClankerVault_v4_abi = [
{
type: "constructor",
inputs: [{ name: "factory_", type: "address", internalType: "address" }],
stateMutability: "nonpayable"
},
{
type: "function",
name: "MIN_LOCKUP_DURATION",
inputs: [],
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
stateMutability: "view"
},
{
type: "function",
name: "allocation",
inputs: [{ name: "", type: "address", internalType: "address" }],
outputs: [
{ name: "token", type: "address", internalType: "address" },
{ name: "amountTotal", type: "uint256", internalType: "uint256" },
{ name: "amountClaimed", type: "uint256", internalType: "uint256" },
{ name: "lockupEndTime", type: "uint256", internalType: "uint256" },
{ name: "vestingEndTime", type: "uint256", internalType: "uint256" },
{ name: "admin", type: "address", internalType: "address" }
],
stateMutability: "view"
},
{
type: "function",
name: "amountAvailableToClaim",
inputs: [{ name: "token", type: "address", internalType: "address" }],
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
stateMutability: "view"
},
{
type: "function",
name: "claim",
inputs: [{ name: "token", type: "address", internalType: "address" }],
outputs: [],
stateMutability: "nonpayable"
},
{
type: "function",
name: "editAllocationAdmin",
inputs: [
{ name: "token", type: "address", internalType: "address" },
{ name: "newAdmin", type: "address", internalType: "address" }
],
outputs: [],
stateMutability: "nonpayable"
},
{
type: "function",
name: "factory",
inputs: [],
outputs: [{ name: "", type: "address", internalType: "address" }],
stateMutability: "view"
},
{
type: "function",
name: "receiveTokens",
inputs: [
{
name: "deploymentConfig",
type: "tuple",
internalType: "struct IClanker.DeploymentConfig",
components: [
{
name: "tokenConfig",
type: "tuple",
internalType: "struct IClanker.TokenConfig",
components: [
{ name: "tokenAdmin", type: "address", internalType: "address" },
{ name: "name", type: "string", internalType: "string" },
{ name: "symbol", type: "string", internalType: "string" },
{ name: "salt", type: "bytes32", internalType: "bytes32" },
{ name: "image", type: "string", internalType: "string" },
{ name: "metadata", type: "string", internalType: "string" },
{ name: "context", type: "string", internalType: "string" },
{ name: "originatingChainId", type: "uint256", internalType: "uint256" }
]
},
{
name: "poolConfig",
type: "tuple",
internalType: "struct IClanker.PoolConfig",
components: [
{ name: "hook", type: "address", internalType: "address" },
{ name: "pairedToken", type: "address", internalType: "address" },
{ name: "tickIfToken0IsClanker", type: "int24", internalType: "int24" },
{ name: "tickSpacing", type: "int24", internalType: "int24" },
{ name: "poolData", type: "bytes", internalType: "bytes" }
]
},
{
name: "lockerConfig",
type: "tuple",
internalType: "struct IClanker.LockerConfig",
components: [
{ name: "locker", type: "address", internalType: "address" },
{ name: "rewardAdmins", type: "address[]", internalType: "address[]" },
{ name: "rewardRecipients", type: "address[]", internalType: "address[]" },
{ name: "rewardBps", type: "uint16[]", internalType: "uint16[]" },
{ name: "tickLower", type: "int24[]", internalType: "int24[]" },
{ name: "tickUpper", type: "int24[]", internalType: "int24[]" },
{ name: "positionBps", type: "uint16[]", internalType: "uint16[]" },
{ name: "lockerData", type: "bytes", internalType: "bytes" }
]
},
{
name: "mevModuleConfig",
type: "tuple",
internalType: "struct IClanker.MevModuleConfig",
components: [
{ name: "mevModule", type: "address", internalType: "address" },
{ name: "mevModuleData", type: "bytes", internalType: "bytes" }
]
},
{
name: "extensionConfigs",
type: "tuple[]",
internalType: "struct IClanker.ExtensionConfig[]",
components: [
{ name: "extension", type: "address", internalType: "address" },
{ name: "msgValue", type: "uint256", internalType: "uint256" },
{ name: "extensionBps", type: "uint16", internalType: "uint16" },
{ name: "extensionData", type: "bytes", internalType: "bytes" }
]
}
]
},
{
name: "",
type: "tuple",
internalType: "struct PoolKey",
components: [
{ name: "currency0", type: "address", internalType: "Currency" },
{ name: "currency1", type: "address", internalType: "Currency" },
{ name: "fee", type: "uint24", internalType: "uint24" },
{ name: "tickSpacing", type: "int24", internalType: "int24" },
{ name: "hooks", type: "address", internalType: "contract IHooks" }
]
},
{ name: "token", type: "address", internalType: "address" },
{ name: "extensionSupply", type: "uint256", internalType: "uint256" },
{ name: "extensionIndex", type: "uint256", internalType: "uint256" }
],
outputs: [],
stateMutability: "payable"
},
{
type: "function",
name: "supportsInterface",
inputs: [{ name: "interfaceId", type: "bytes4", internalType: "bytes4" }],
outputs: [{ name: "", type: "bool", internalType: "bool" }],
stateMutability: "pure"
},
{
type: "event",
name: "AllocationAdminUpdated",
inputs: [
{ name: "token", type: "address", indexed: true, internalType: "address" },
{ name: "oldAdmin", type: "address", indexed: true, internalType: "address" },
{ name: "newAdmin", type: "address", indexed: true, internalType: "address" }
],
anonymous: false
},
{
type: "event",
name: "AllocationClaimed",
inputs: [
{ name: "token", type: "address", indexed: true, internalType: "address" },
{ name: "amount", type: "uint256", indexed: false, internalType: "uint256" },
{
name: "remainingAmount",
type: "uint256",
indexed: false,
internalType: "uint256"
}
],
anonymous: false
},
{
type: "event",
name: "AllocationCreated",
inputs: [
{ name: "token", type: "address", indexed: true, internalType: "address" },
{ name: "admin", type: "address", indexed: true, internalType: "address" },
{ name: "supply", type: "uint256", indexed: false, internalType: "uint256" },
{
name: "lockupDuration",
type: "uint256",
indexed: false,
internalType: "uint256"
},
{
name: "vestingDuration",
type: "uint256",
indexed: false,
internalType: "uint256"
}
],
anonymous: false
},
{ type: "error", name: "AllocationAlreadyExists", inputs: [] },
{ type: "error", name: "AllocationNotUnlocked", inputs: [] },
{ type: "error", name: "InvalidMsgValue", inputs: [] },
{ type: "error", name: "InvalidVaultAdmin", inputs: [] },
{ type: "error", name: "InvalidVaultBps", inputs: [] },
{ type: "error", name: "NoBalanceToClaim", inputs: [] },
{ type: "error", name: "ReentrancyGuardReentrantCall", inputs: [] },
{ type: "error", name: "TransferFailed", inputs: [] },
{ type: "error", name: "Unauthorized", inputs: [] },
{ type: "error", name: "VaultLockupDurationTooShort", inputs: [] }
];
var ClankerVault_Instantiation_v4_abi = [
{ type: "address" },
{ type: "uint256" },
{ type: "uint256" }
];
// src/config/clankerTokenV4.ts
import {
encodeAbiParameters,
isAddressEqual,
stringify,
zeroAddress,
zeroHash
} from "viem";
import * as z2 from "zod/v4";
// src/abi/v4/Clanker.ts
var Clanker_v4_abi = [
{
inputs: [{ internalType: "address", name: "owner_", type: "address" }],
stateMutability: "nonpayable",
type: "constructor"
},
{ inputs: [], name: "Deprecated", type: "error" },
{ inputs: [], name: "ExtensionMsgValueMismatch", type: "error" },
{ inputs: [], name: "ExtensionNotEnabled", type: "error" },
{ inputs: [], name: "HookNotEnabled", type: "error" },
{ inputs: [], name: "InvalidExtension", type: "error" },
{ inputs: [], name: "InvalidHook", type: "error" },
{ inputs: [], name: "InvalidLocker", type: "error" },
{ inputs: [], name: "InvalidMevModule", type: "error" },
{ inputs: [], name: "LockerNotEnabled", type: "error" },
{ inputs: [], name: "MaxExtensionBpsExceeded", type: "error" },
{ inputs: [], name: "MaxExtensionsExceeded", type: "error" },
{ inputs: [], name: "MevModuleNotEnabled", 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" },
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "token", type: "address" },
{ indexed: true, internalType: "address", name: "recipient", type: "address" },
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" }
],
name: "ClaimTeamFees",
type: "event"
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: "address", name: "extension", type: "address" },
{ indexed: false, internalType: "uint256", name: "extensionSupply", type: "uint256" },
{ indexed: false, internalType: "uint256", name: "msgValue", type: "uint256" }
],
name: "ExtensionTriggered",
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: true, internalType: "address", name: "admin", type: "address" },
{ indexed: false, internalType: "bool", name: "enabled", 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: false, internalType: "address", name: "extension", type: "address" },
{ indexed: false, internalType: "bool", name: "enabled", type: "bool" }
],
name: "SetExtension",
type: "event"
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: "address", name: "hook", type: "address" },
{ indexed: false, internalType: "bool", name: "enabled", type: "bool" }
],
name: "SetHook",
type: "event"
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: "address", name: "locker", type: "address" },
{ indexed: false, internalType: "address", name: "pool", type: "address" },
{ indexed: false, internalType: "bool", name: "enabled", type: "bool" }
],
name: "SetLocker",
type: "event"
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: "address", name: "mevModule", type: "address" },
{ indexed: false, internalType: "bool", name: "enabled", type: "bool" }
],
name: "SetMevModule",
type: "event"
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: "address", name: "oldTeamFeeRecipient", type: "address" },
{ indexed: false, internalType: "address", name: "newTeamFeeRecipient", type: "address" }
],
name: "SetTeamFeeRecipient",
type: "event"
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: "address", name: "msgSender", type: "address" },
{ indexed: true, internalType: "address", name: "tokenAddress", type: "address" },
{ indexed: true, internalType: "address", name: "tokenAdmin", type: "address" },
{ indexed: false, internalType: "string", name: "tokenImage", type: "string" },
{ indexed: false, internalType: "string", name: "tokenName", type: "string" },
{ indexed: false, internalType: "string", name: "tokenSymbol", type: "string" },
{ indexed: false, internalType: "string", name: "tokenMetadata", type: "string" },
{ indexed: false, internalType: "string", name: "tokenContext", type: "string" },
{ indexed: false, internalType: "int24", name: "startingTick", type: "int24" },
{ indexed: false, internalType: "address", name: "poolHook", type: "address" },
{ indexed: false, internalType: "PoolId", name: "poolId", type: "bytes32" },
{ indexed: false, internalType: "address", name: "pairedToken", type: "address" },
{ indexed: false, internalType: "address", name: "locker", type: "address" },
{ indexed: false, internalType: "address", name: "mevModule", type: "address" },
{ indexed: false, internalType: "uint256", name: "extensionsSupply", type: "uint256" },
{ indexed: false, internalType: "address[]", name: "extensions", type: "address[]" }
],
name: "TokenCreated",
type: "event"
},
{
inputs: [],
name: "BPS",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function"
},
{
inputs: [],
name: "MAX_EXTENSIONS",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function"
},
{
inputs: [],
name: "MAX_EXTENSION_BPS",
outputs: [{ internalType: "uint16", name: "", type: "uint16" }],
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: "claimTeamFees",
outputs: [],
stateMutability: "nonpayable",
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"
}
],
name: "deployToken",
outputs: [{ internalType: "address", name: "tokenAddress", type: "address" }],
stateMutability: "payable",
type: "function"
},
{
inputs: [
{
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"
}
],
name: "deployTokenZeroSupply",
outputs: [{ internalType: "address", name: "tokenAddress", type: "address" }],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [{ internalType: "address", name: "token", type: "address" }],
name: "deploymentInfoForToken",
outputs: [
{ internalType: "address", name: "token", type: "address" },
{ internalType: "address", name: "hook", type: "address" },
{ 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: "locker", type: "address" },
{ internalType: "address", name: "pool", type: "address" }
],
name: "enabledLockers",
outputs: [{ internalType: "bool", name: "enabled", type: "bool" }],
stateMutability: "view",
type: "function"
},
{
inputs: [{ internalType: "address", name: "teamFeeRecipient_", type: "address" }],
name: "initialize",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [],
name: "owner",
outputs: [{ internalType: "address", 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: "enabled", type: "bool" }
],
name: "setAdmin",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [{ internalType: "bool", name: "deprecated_", type: "bool" }],
name: "setDeprecated",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{ internalType: "address", name: "extension", type: "address" },
{ internalType: "bool", name: "enabled", type: "bool" }
],
name: "setExtension",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{ internalType: "address", name: "hook", type: "address" },
{ internalType: "bool", name: "enabled", type: "bool" }
],
name: "setHook",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{ internalType: "address", name: "locker", type: "address" },
{ internalType: "address", name: "pool", type: "address" },
{ internalType: "bool", name: "enabled", type: "bool" }
],
name: "setLocker",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{ internalType: "address", name: "mevModule", type: "address" },
{ internalType: "bool", name: "enabled", type: "bool" }
],
name: "setMevModule",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [{ internalType: "address", name: "teamFeeRecipient_", type: "address" }],
name: "setTeamFeeRecipient",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [],
name: "teamFeeRecipient",
outputs: [{ internalType: "address", name: "", type: "address" }],
stateMutability: "view",
type: "function"
},
{
inputs: [{ internalType: "address", name: "token", type: "address" }],
name: "tokenDeploymentInfo",
outputs: [
{
components: [
{ internalType: "address", name: "token", type: "address" },
{ internalType: "address", name: "hook", type: "address" },
{ internalType: "address", name: "locker", type: "address" },
{ internalType: "address[]", name: "extensions", type: "address[]" }
],
internalType: "struct IClanker.DeploymentInfo",
name: "",
type: "tuple"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
name: "transferOwnership",
outputs: [],
stateMutability: "nonpayable",
type: "function"
}
];
// src/abi/v4/ClankerAirdrop.ts
var ClankerAirdrop_Instantiation_v4_abi = [
{ type: "bytes32" },
{ type: "uint256" },
{ type: "uint256" }
];
// src/abi/v4/ClankerHookDynamicFee.ts
var ClankerHook_DynamicFee_Instantiation_v4_abi = [
{ type: "uint24", name: "baseFee" },
{ type: "uint24", name: "maxLpFee" },
{ type: "uint256", name: "referenceTickFilterPeriod" },
{ type: "uint256", name: "resetPeriod" },
{ type: "int24", name: "resetTickFilter" },
{ type: "uint256", name: "feeControlNumerator" },
{ type: "uint24", name: "decayFilterBps" }
];
// src/abi/v4/ClankerHookStaticFee.ts
var ClankerHook_StaticFee_Instantiation_v4_abi = [
{ type: "uint24" },
{ type: "uint24" }
];
// src/abi/v4/ClankerLocker.ts
var ClankerLpLocker_Instantiation_v4_abi = [
{
type: "tuple",
components: [{ type: "uint8[]", name: "feePreference" }]
}
];
// src/abi/v4/ClankerUniV4EthDevBuy.ts
var ClankerUniV4EthDevBuy_Instantiation_v4_abi = [
{
type: "tuple",
components: [
{ type: "address", name: "currency0" },
{ type: "address", name: "currency1" },
{ type: "uint24", name: "fee" },
{ type: "int24", name: "tickSpacing" },
{ type: "address", name: "hooks" }
]
},
{ type: "uint128" },
{ type: "address" }
];
// src/constants.ts
import { arbitrum, base, baseSepolia, monadTestnet, unichain } from "viem/chains";
var WETH_ADDRESSES = {
[arbitrum.id]: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
[base.id]: "0x4200000000000000000000000000000000000006",
[baseSepolia.id]: "0x4200000000000000000000000000000000000006",
[unichain.id]: "0x4200000000000000000000000000000000000006",
[monadTestnet.id]: "0x760AfE86e5de5fa0Ee542fc7B7B713e1c5425701"
// WMON
};
var DEFAULT_SUPPLY = 100000000000000000000000000000n;
var POOL_POSITIONS = {
Standard: [
{
tickLower: -230400,
// ~$27,000
tickUpper: -12e4,
// ~$1.5B
positionBps: 1e4
// All tokens in one LP position
}
],
Project: [
{
tickLower: -230400,
// ~$27K
tickUpper: -214e3,
// ~$130K
positionBps: 1e3
// 10% of LP
},
{
tickLower: -214e3,
// ~$130K
tickUpper: -155e3,
// ~$50M
positionBps: 5e3
// 50% of LP
},
{
tickLower: -202e3,
// ~$450K
tickUpper: -155e3,
// ~$50M
positionBps: 1500
// 15% of LP
},
{
tickLower: -155e3,
// ~$50M
tickUpper: -12e4,
// ~$1.5B
positionBps: 2e3
// 20% of LP
},
{
tickLower: -141e3,
// ~$200M
tickUpper: -12e4,
// ~$1.5B
positionBps: 500
// 5% of LP
}
]
};
// src/services/vanityAddress.ts
import { encodeDeployData, keccak256 } from "viem";
import { monadTestnet as monadTestnet3 } from "viem/chains";
// src/abi/v4/ClankerToken.ts
var ClankerToken_v4_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: "allData",
inputs: [],
outputs: [
{ name: "originalAdmin", type: "address", internalType: "address" },
{ name: "admin", type: "address", internalType: "address" },
{ name: "image", type: "string", internalType: "string" },
{ name: "metadata", type: "string", internalType: "string" },
{ name: "context", type: "string", internalType: "string" }
],
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: "originalAdmin",
inputs: [],
outputs: [{ name: "", type: "address", internalType: "address" }],
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: "updateAdmin",
inputs: [{ name: "admin_", type: "address", internalType: "address" }],
outputs: [],
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: "UpdateAdmin",
inputs: [
{ name: "oldAdmin", type: "address", indexed: true, internalType: "address" },
{ name: "newAdmin", type: "address", indexed: true, internalType: "address" }
],
anonymous: false
},
{
type: "event",
name: "UpdateImage",
inputs: [{ name: "image", type: "string", indexed: false, internalType: "string" }],
anonymous: false
},
{
type: "event",
name: "UpdateMetadata",
inputs: [{ name: "metadata", type: "string", indexed: false, internalType: "string" }],
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: "NotOriginalAdmin", 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_v4_bytecode = "0x6101806040523461008d57610024610015610147565b9695909594919493929361067a565b6040516131f7908161107e823960805181612383015260a05181612440015260c05181612354015260e051816123d2015261010051816123f801526101205181610c4c01526101405181610c7501526101605181818161072d0152818161131d0152611a750152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b601f909101601f19168101906001600160401b038211908210176100c857604052565b610091565b604051906100dc6040836100a5565b565b81601f8201121561008d578051906001600160401b0382116100c85760405192610112601f8401601f1916602001856100a5565b8284526020838301011161008d57815f9260208093018386015e8301015290565b51906001600160a01b038216820361008d57565b6142b5803803806040519261015c82856100a5565b83398101916101008284031261008d5781516001600160401b03811161008d57836101889184016100de565b60208301519091906001600160401b03811161008d57846101aa9185016100de565b936040840151936101bd60608201610133565b60808201519094906001600160401b03811161008d57836101df9184016100de565b60a08301519094906001600160401b03811161008d57846102019185016100de565b60c08401519094906001600160401b03811161008d5760e0916102259186016100de565b930151919796959493929190565b90600182811c92168015610261575b602083101461024d575