@flaunch/sdk
Version:
Flaunch SDK to easily interact with the Flaunch protocol
1,463 lines (1,460 loc) • 404 kB
JavaScript
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const AnyPositionManagerAbi = [
{
inputs: [
{
components: [
{ internalType: "address", name: "nativeToken", type: "address" },
{
internalType: "contract IPoolManager",
name: "poolManager",
type: "address",
},
{
components: [
{ internalType: "uint24", name: "swapFee", type: "uint24" },
{ internalType: "uint24", name: "referrer", type: "uint24" },
{ internalType: "uint24", name: "protocol", type: "uint24" },
{ internalType: "bool", name: "active", type: "bool" },
],
internalType: "struct FeeDistributor.FeeDistribution",
name: "feeDistribution",
type: "tuple",
},
{
internalType: "contract IInitialPrice",
name: "initialPrice",
type: "address",
},
{ internalType: "address", name: "protocolOwner", type: "address" },
{
internalType: "address",
name: "protocolFeeRecipient",
type: "address",
},
{ internalType: "address", name: "flayGovernance", type: "address" },
{ internalType: "address", name: "feeEscrow", type: "address" },
{
internalType: "contract FeeExemptions",
name: "feeExemptions",
type: "address",
},
{
internalType: "contract TreasuryActionManager",
name: "actionManager",
type: "address",
},
{ internalType: "address", name: "bidWall", type: "address" },
],
internalType: "struct AnyPositionManager.ConstructorParams",
name: "params",
type: "tuple",
},
],
stateMutability: "nonpayable",
type: "constructor",
},
{ inputs: [], name: "AlreadyFlaunched", type: "error" },
{ inputs: [], name: "AlreadyInitialized", type: "error" },
{ inputs: [], name: "CallerIsNotApprovedCreator", type: "error" },
{ inputs: [], name: "CallerIsNotBidWall", type: "error" },
{
inputs: [{ internalType: "address", name: "_caller", type: "address" }],
name: "CallerNotCreator",
type: "error",
},
{ inputs: [], name: "CannotBeInitializedDirectly", type: "error" },
{ inputs: [], name: "HookNotImplemented", type: "error" },
{ inputs: [], name: "InvalidPool", type: "error" },
{ inputs: [], name: "LockFailure", type: "error" },
{ inputs: [], name: "NewOwnerIsZeroAddress", type: "error" },
{ inputs: [], name: "NoHandoverRequest", type: "error" },
{ inputs: [], name: "NotPoolManager", type: "error" },
{ inputs: [], name: "NotSelf", type: "error" },
{ inputs: [], name: "ProtocolFeeInvalid", type: "error" },
{ inputs: [], name: "RecipientZeroAddress", type: "error" },
{ inputs: [], name: "ReferrerFeeInvalid", type: "error" },
{ inputs: [], name: "SwapFeeInvalid", type: "error" },
{ inputs: [], name: "Unauthorized", type: "error" },
{
inputs: [{ internalType: "PoolId", name: "_poolId", type: "bytes32" }],
name: "UnknownPool",
type: "error",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "_creator",
type: "address",
},
{
indexed: false,
internalType: "bool",
name: "_isApproved",
type: "bool",
},
],
name: "CreatorApproved",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "PoolId",
name: "_poolId",
type: "bytes32",
},
{
indexed: false,
internalType: "uint24",
name: "_allocation",
type: "uint24",
},
],
name: "CreatorFeeAllocationUpdated",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "_feeCalculator",
type: "address",
},
],
name: "FairLaunchFeeCalculatorUpdated",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "_feeCalculator",
type: "address",
},
],
name: "FeeCalculatorUpdated",
type: "event",
},
{
anonymous: false,
inputs: [
{
components: [
{ internalType: "uint24", name: "swapFee", type: "uint24" },
{ internalType: "uint24", name: "referrer", type: "uint24" },
{ internalType: "uint24", name: "protocol", type: "uint24" },
{ internalType: "bool", name: "active", type: "bool" },
],
indexed: false,
internalType: "struct FeeDistributor.FeeDistribution",
name: "_feeDistribution",
type: "tuple",
},
],
name: "FeeDistributionUpdated",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "bytes32", name: "id", type: "bytes32" },
{
indexed: true,
internalType: "address",
name: "sender",
type: "address",
},
{
indexed: false,
internalType: "uint128",
name: "feeAmount0",
type: "uint128",
},
{
indexed: false,
internalType: "uint128",
name: "feeAmount1",
type: "uint128",
},
],
name: "HookFee",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "bytes32", name: "id", type: "bytes32" },
{
indexed: true,
internalType: "address",
name: "sender",
type: "address",
},
{
indexed: false,
internalType: "int128",
name: "amount0",
type: "int128",
},
{
indexed: false,
internalType: "int128",
name: "amount1",
type: "int128",
},
{
indexed: false,
internalType: "uint128",
name: "hookLPfeeAmount0",
type: "uint128",
},
{
indexed: false,
internalType: "uint128",
name: "hookLPfeeAmount1",
type: "uint128",
},
],
name: "HookSwap",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "_initialPrice",
type: "address",
},
],
name: "InitialPriceUpdated",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "pendingOwner",
type: "address",
},
],
name: "OwnershipHandoverCanceled",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "pendingOwner",
type: "address",
},
],
name: "OwnershipHandoverRequested",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "oldOwner",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "newOwner",
type: "address",
},
],
name: "OwnershipTransferred",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "PoolId",
name: "_poolId",
type: "bytes32",
},
{
indexed: false,
internalType: "address",
name: "_memecoin",
type: "address",
},
{
indexed: false,
internalType: "address",
name: "_memecoinTreasury",
type: "address",
},
{
indexed: false,
internalType: "uint256",
name: "_tokenId",
type: "uint256",
},
{
indexed: false,
internalType: "bool",
name: "_currencyFlipped",
type: "bool",
},
{
components: [
{ internalType: "address", name: "memecoin", type: "address" },
{ internalType: "address", name: "creator", type: "address" },
{
internalType: "uint24",
name: "creatorFeeAllocation",
type: "uint24",
},
{ internalType: "bytes", name: "initialPriceParams", type: "bytes" },
{ internalType: "bytes", name: "feeCalculatorParams", type: "bytes" },
],
indexed: false,
internalType: "struct AnyPositionManager.FlaunchParams",
name: "_params",
type: "tuple",
},
],
name: "PoolCreated",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "PoolId",
name: "_poolId",
type: "bytes32",
},
{
components: [
{ internalType: "uint24", name: "swapFee", type: "uint24" },
{ internalType: "uint24", name: "referrer", type: "uint24" },
{ internalType: "uint24", name: "protocol", type: "uint24" },
{ internalType: "bool", name: "active", type: "bool" },
],
indexed: false,
internalType: "struct FeeDistributor.FeeDistribution",
name: "_feeDistribution",
type: "tuple",
},
],
name: "PoolFeeDistributionUpdated",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "PoolId",
name: "_poolId",
type: "bytes32",
},
{
indexed: false,
internalType: "uint256",
name: "_donateAmount",
type: "uint256",
},
{
indexed: false,
internalType: "uint256",
name: "_creatorAmount",
type: "uint256",
},
{
indexed: false,
internalType: "uint256",
name: "_bidWallAmount",
type: "uint256",
},
{
indexed: false,
internalType: "uint256",
name: "_governanceAmount",
type: "uint256",
},
{
indexed: false,
internalType: "uint256",
name: "_protocolAmount",
type: "uint256",
},
],
name: "PoolFeesDistributed",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "PoolId",
name: "_poolId",
type: "bytes32",
},
{
indexed: false,
internalType: "uint256",
name: "_amount0",
type: "uint256",
},
{
indexed: false,
internalType: "uint256",
name: "_amount1",
type: "uint256",
},
],
name: "PoolFeesReceived",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "PoolId",
name: "_poolId",
type: "bytes32",
},
{
indexed: false,
internalType: "bool",
name: "zeroForOne",
type: "bool",
},
{
indexed: false,
internalType: "uint256",
name: "_amount0",
type: "uint256",
},
{
indexed: false,
internalType: "uint256",
name: "_amount1",
type: "uint256",
},
],
name: "PoolFeesSwapped",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "PoolId",
name: "_poolId",
type: "bytes32",
},
{
indexed: false,
internalType: "uint160",
name: "_sqrtPriceX96",
type: "uint160",
},
{ indexed: false, internalType: "int24", name: "_tick", type: "int24" },
{
indexed: false,
internalType: "uint24",
name: "_protocolFee",
type: "uint24",
},
{
indexed: false,
internalType: "uint24",
name: "_swapFee",
type: "uint24",
},
{
indexed: false,
internalType: "uint128",
name: "_liquidity",
type: "uint128",
},
],
name: "PoolStateUpdated",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "PoolId",
name: "poolId",
type: "bytes32",
},
{
indexed: false,
internalType: "int256",
name: "flAmount0",
type: "int256",
},
{
indexed: false,
internalType: "int256",
name: "flAmount1",
type: "int256",
},
{
indexed: false,
internalType: "int256",
name: "flFee0",
type: "int256",
},
{
indexed: false,
internalType: "int256",
name: "flFee1",
type: "int256",
},
{
indexed: false,
internalType: "int256",
name: "ispAmount0",
type: "int256",
},
{
indexed: false,
internalType: "int256",
name: "ispAmount1",
type: "int256",
},
{
indexed: false,
internalType: "int256",
name: "ispFee0",
type: "int256",
},
{
indexed: false,
internalType: "int256",
name: "ispFee1",
type: "int256",
},
{
indexed: false,
internalType: "int256",
name: "uniAmount0",
type: "int256",
},
{
indexed: false,
internalType: "int256",
name: "uniAmount1",
type: "int256",
},
{
indexed: false,
internalType: "int256",
name: "uniFee0",
type: "int256",
},
{
indexed: false,
internalType: "int256",
name: "uniFee1",
type: "int256",
},
],
name: "PoolSwap",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "_referralEscrow",
type: "address",
},
],
name: "ReferralEscrowUpdated",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "PoolId",
name: "_poolId",
type: "bytes32",
},
{
indexed: false,
internalType: "address",
name: "_recipient",
type: "address",
},
{
indexed: false,
internalType: "address",
name: "_token",
type: "address",
},
{
indexed: false,
internalType: "uint256",
name: "_amount",
type: "uint256",
},
],
name: "ReferrerFeePaid",
type: "event",
},
{
inputs: [],
name: "MAX_PROTOCOL_ALLOCATION",
outputs: [{ internalType: "uint24", name: "", type: "uint24" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "MIN_DISTRIBUTE_THRESHOLD",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "actionManager",
outputs: [
{
internalType: "contract TreasuryActionManager",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "_sender", type: "address" },
{
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: "_key",
type: "tuple",
},
{
components: [
{ internalType: "int24", name: "tickLower", type: "int24" },
{ internalType: "int24", name: "tickUpper", type: "int24" },
{ internalType: "int256", name: "liquidityDelta", type: "int256" },
{ internalType: "bytes32", name: "salt", type: "bytes32" },
],
internalType: "struct IPoolManager.ModifyLiquidityParams",
name: "",
type: "tuple",
},
{ internalType: "BalanceDelta", name: "_delta", type: "int256" },
{ internalType: "BalanceDelta", name: "_feesAccrued", type: "int256" },
{ internalType: "bytes", name: "", type: "bytes" },
],
name: "afterAddLiquidity",
outputs: [
{ internalType: "bytes4", name: "selector_", type: "bytes4" },
{ internalType: "BalanceDelta", name: "", type: "int256" },
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "_sender", type: "address" },
{
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: "_key",
type: "tuple",
},
{ internalType: "uint256", name: "_amount0", type: "uint256" },
{ internalType: "uint256", name: "_amount1", type: "uint256" },
{ internalType: "bytes", name: "", type: "bytes" },
],
name: "afterDonate",
outputs: [{ internalType: "bytes4", name: "selector_", type: "bytes4" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "", type: "address" },
{
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: "uint160", name: "", type: "uint160" },
{ internalType: "int24", name: "", type: "int24" },
],
name: "afterInitialize",
outputs: [{ internalType: "bytes4", name: "", type: "bytes4" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "_sender", type: "address" },
{
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: "_key",
type: "tuple",
},
{
components: [
{ internalType: "int24", name: "tickLower", type: "int24" },
{ internalType: "int24", name: "tickUpper", type: "int24" },
{ internalType: "int256", name: "liquidityDelta", type: "int256" },
{ internalType: "bytes32", name: "salt", type: "bytes32" },
],
internalType: "struct IPoolManager.ModifyLiquidityParams",
name: "",
type: "tuple",
},
{ internalType: "BalanceDelta", name: "_delta", type: "int256" },
{ internalType: "BalanceDelta", name: "_feesAccrued", type: "int256" },
{ internalType: "bytes", name: "", type: "bytes" },
],
name: "afterRemoveLiquidity",
outputs: [
{ internalType: "bytes4", name: "selector_", type: "bytes4" },
{ internalType: "BalanceDelta", name: "", type: "int256" },
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "_sender", type: "address" },
{
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: "_key",
type: "tuple",
},
{
components: [
{ internalType: "bool", name: "zeroForOne", type: "bool" },
{ internalType: "int256", name: "amountSpecified", type: "int256" },
{
internalType: "uint160",
name: "sqrtPriceLimitX96",
type: "uint160",
},
],
internalType: "struct IPoolManager.SwapParams",
name: "_params",
type: "tuple",
},
{ internalType: "BalanceDelta", name: "_delta", type: "int256" },
{ internalType: "bytes", name: "_hookData", type: "bytes" },
],
name: "afterSwap",
outputs: [
{ internalType: "bytes4", name: "selector_", type: "bytes4" },
{ internalType: "int128", name: "hookDeltaUnspecified_", type: "int128" },
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "_creator", type: "address" },
{ internalType: "bool", name: "_isApproved", type: "bool" },
],
name: "approveCreator",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "_creator", type: "address" }],
name: "approvedMemecoinCreator",
outputs: [{ internalType: "bool", name: "isApproved", type: "bool" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "", type: "address" },
{
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",
},
{
components: [
{ internalType: "int24", name: "tickLower", type: "int24" },
{ internalType: "int24", name: "tickUpper", type: "int24" },
{ internalType: "int256", name: "liquidityDelta", type: "int256" },
{ internalType: "bytes32", name: "salt", type: "bytes32" },
],
internalType: "struct IPoolManager.ModifyLiquidityParams",
name: "",
type: "tuple",
},
{ internalType: "bytes", name: "", type: "bytes" },
],
name: "beforeAddLiquidity",
outputs: [{ internalType: "bytes4", name: "", type: "bytes4" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "", type: "address" },
{
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: "uint256", name: "", type: "uint256" },
{ internalType: "uint256", name: "", type: "uint256" },
{ internalType: "bytes", name: "", type: "bytes" },
],
name: "beforeDonate",
outputs: [{ internalType: "bytes4", name: "", type: "bytes4" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "", type: "address" },
{
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: "uint160", name: "", type: "uint160" },
],
name: "beforeInitialize",
outputs: [{ internalType: "bytes4", name: "", type: "bytes4" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "", type: "address" },
{
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",
},
{
components: [
{ internalType: "int24", name: "tickLower", type: "int24" },
{ internalType: "int24", name: "tickUpper", type: "int24" },
{ internalType: "int256", name: "liquidityDelta", type: "int256" },
{ internalType: "bytes32", name: "salt", type: "bytes32" },
],
internalType: "struct IPoolManager.ModifyLiquidityParams",
name: "",
type: "tuple",
},
{ internalType: "bytes", name: "", type: "bytes" },
],
name: "beforeRemoveLiquidity",
outputs: [{ internalType: "bytes4", name: "", type: "bytes4" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "_sender", type: "address" },
{
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: "_key",
type: "tuple",
},
{
components: [
{ internalType: "bool", name: "zeroForOne", type: "bool" },
{ internalType: "int256", name: "amountSpecified", type: "int256" },
{
internalType: "uint160",
name: "sqrtPriceLimitX96",
type: "uint160",
},
],
internalType: "struct IPoolManager.SwapParams",
name: "_params",
type: "tuple",
},
{ internalType: "bytes", name: "_hookData", type: "bytes" },
],
name: "beforeSwap",
outputs: [
{ internalType: "bytes4", name: "selector_", type: "bytes4" },
{
internalType: "BeforeSwapDelta",
name: "beforeSwapDelta_",
type: "int256",
},
{ internalType: "uint24", name: "", type: "uint24" },
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "bidWall",
outputs: [{ internalType: "contract BidWall", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "cancelOwnershipHandover",
outputs: [],
stateMutability: "payable",
type: "function",
},
{
inputs: [
{
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: "_key",
type: "tuple",
},
],
name: "closeBidWall",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "pendingOwner", type: "address" },
],
name: "completeOwnershipHandover",
outputs: [],
stateMutability: "payable",
type: "function",
},
{
inputs: [],
name: "fairLaunchFeeCalculator",
outputs: [
{ internalType: "contract IFeeCalculator", name: "", type: "address" },
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "feeCalculator",
outputs: [
{ internalType: "contract IFeeCalculator", name: "", type: "address" },
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "feeEscrow",
outputs: [
{ internalType: "contract FeeEscrow", name: "", type: "address" },
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "feeExemptions",
outputs: [
{ internalType: "contract FeeExemptions", name: "", type: "address" },
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "PoolId", name: "_poolId", type: "bytes32" },
{ internalType: "uint256", name: "_amount", type: "uint256" },
],
name: "feeSplit",
outputs: [
{ internalType: "uint256", name: "bidWall_", type: "uint256" },
{ internalType: "uint256", name: "creator_", type: "uint256" },
{ internalType: "uint256", name: "protocol_", type: "uint256" },
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
components: [
{ internalType: "address", name: "memecoin", type: "address" },
{ internalType: "address", name: "creator", type: "address" },
{
internalType: "uint24",
name: "creatorFeeAllocation",
type: "uint24",
},
{ internalType: "bytes", name: "initialPriceParams", type: "bytes" },
{ internalType: "bytes", name: "feeCalculatorParams", type: "bytes" },
],
internalType: "struct AnyPositionManager.FlaunchParams",
name: "_params",
type: "tuple",
},
],
name: "flaunch",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "flaunchContract",
outputs: [
{ internalType: "contract IAnyFlaunch", name: "", type: "address" },
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "flayGovernance",
outputs: [{ internalType: "address", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "bool", name: "_isFairLaunch", type: "bool" }],
name: "getFeeCalculator",
outputs: [
{ internalType: "contract IFeeCalculator", name: "", type: "address" },
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "bytes", name: "_initialPriceParams", type: "bytes" },
],
name: "getFlaunchingMarketCap",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "getHookPermissions",
outputs: [
{
components: [
{ internalType: "bool", name: "beforeInitialize", type: "bool" },
{ internalType: "bool", name: "afterInitialize", type: "bool" },
{ internalType: "bool", name: "beforeAddLiquidity", type: "bool" },
{ internalType: "bool", name: "afterAddLiquidity", type: "bool" },
{ internalType: "bool", name: "beforeRemoveLiquidity", type: "bool" },
{ internalType: "bool", name: "afterRemoveLiquidity", type: "bool" },
{ internalType: "bool", name: "beforeSwap", type: "bool" },
{ internalType: "bool", name: "afterSwap", type: "bool" },
{ internalType: "bool", name: "beforeDonate", type: "bool" },
{ internalType: "bool", name: "afterDonate", type: "bool" },
{ internalType: "bool", name: "beforeSwapReturnDelta", type: "bool" },
{ internalType: "bool", name: "afterSwapReturnDelta", type: "bool" },
{
internalType: "bool",
name: "afterAddLiquidityReturnDelta",
type: "bool",
},
{
internalType: "bool",
name: "afterRemoveLiquidityReturnDelta",
type: "bool",
},
],
internalType: "struct Hooks.Permissions",
name: "",
type: "tuple",
},
],
stateMutability: "pure",
type: "function",
},
{
inputs: [{ internalType: "PoolId", name: "_poolId", type: "bytes32" }],
name: "getPoolFeeDistribution",
outputs: [
{
components: [
{ internalType: "uint24", name: "swapFee", type: "uint24" },
{ internalType: "uint24", name: "referrer", type: "uint24" },
{ internalType: "uint24", name: "protocol", type: "uint24" },
{ internalType: "bool", name: "active", type: "bool" },
],
internalType: "struct FeeDistributor.FeeDistribution",
name: "feeDistribution_",
type: "tuple",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "initialPrice",
outputs: [
{ internalType: "contract IInitialPrice", name: "", type: "address" },
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "nativeToken",
outputs: [{ internalType: "address", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "notifier",
outputs: [{ internalType: "contract Notifier", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "owner",
outputs: [{ internalType: "address", name: "result", type: "address" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "pendingOwner", type: "address" },
],
name: "ownershipHandoverExpiresAt",
outputs: [{ internalType: "uint256", name: "result", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
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: "_poolKey",
type: "tuple",
},
],
name: "poolFees",
outputs: [
{
components: [
{ internalType: "uint256", name: "amount0", type: "uint256" },
{ internalType: "uint256", name: "amount1", type: "uint256" },
],
internalType: "struct InternalSwapPool.ClaimableFees",
name: "",
type: "tuple",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "address", name: "_token", type: "address" }],
name: "poolKey",
outputs: [
{
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",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "poolManager",
outputs: [
{ internalType: "contract IPoolManager", name: "", type: "address" },
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "referralEscrow",
outputs: [
{ internalType: "contract ReferralEscrow", name: "", type: "address" },
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "renounceOwnership",
outputs: [],
stateMutability: "payable",
type: "function",
},
{
inputs: [],
name: "requestOwnershipHandover",
outputs: [],
stateMutability: "payable",
type: "function",
},
{
inputs: [
{
internalType: "contract IFeeCalculator",
name: "_feeCalculator",
type: "address",
},
],
name: "setFairLaunchFeeCalculator",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "contract IFeeCalculator",
name: "_feeCalculator",
type: "address",
},
],
name: "setFeeCalculator",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
components: [
{ internalType: "uint24", name: "swapFee", type: "uint24" },
{ internalType: "uint24", name: "referrer", type: "uint24" },
{ internalType: "uint24", name: "protocol", type: "uint24" },
{ internalType: "bool", name: "active", type: "bool" },
],
internalType: "struct FeeDistributor.FeeDistribution",
name: "_feeDistribution",
type: "tuple",
},
],
name: "setFeeDistribution",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "_flaunchContract", type: "address" },
],
name: "setFlaunch",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "_initialPrice", type: "address" },
],
name: "setInitialPrice",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "PoolId", name: "_poolId", type: "bytes32" },
{
components: [
{ internalType: "uint24", name: "swapFee", type: "uint24" },
{ internalType: "uint24", name: "referrer", type: "uint24" },
{ internalType: "uint24", name: "protocol", type: "uint24" },
{ internalType: "bool", name: "active", type: "bool" },
],
internalType: "struct FeeDistributor.FeeDistribution",
name: "_feeDistribution",
type: "tuple",
},
],
name: "setPoolFeeDistribution",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "uint24", name: "_protocol", type: "uint24" }],
name: "setProtocolFeeDistribution",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address payable",
name: "_referralEscrow",
type: "address",
},
],
name: "setReferralEscrow",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
name: "transferOwnership",
outputs: [],
stateMutability: "payable",
type: "function",
},
{
inputs: [{ internalType: "bytes", name: "data", type: "bytes" }],
name: "unlockCallback",
outputs: [{ internalType: "bytes", name: "", type: "bytes" }],
stateMutability: "nonpayable",
type: "function",
},
{ stateMutability: "payable", type: "receive" },
];
const BidwallAbi = [
{
inputs: [
{ internalType: "address", name: "_nativeToken", type: "address" },
{ internalType: "address", name: "_poolManager", type: "address" },
{ internalType: "address", name: "_protocolOwner", type: "address" },
],
stateMutability: "nonpayable",
type: "constructor",
},
{ inputs: [], name: "AlreadyInitialized", type: "error" },
{ inputs: [], name: "CallerIsNotCreator", type: "error" },
{ inputs: [], name: "NewOwnerIsZeroAddress", type: "error" },
{ inputs: [], name: "NoHandoverRequest", type: "error" },
{ inputs: [], name: "NotPositionManager", type: "error" },
{ inputs: [], name: "Unauthoriz