UNPKG

@crocswap-libs/sdk

Version:

🛠🐊🛠 An SDK for building applications on top of CrocSwap

1,717 lines 42 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TEMPEST_VAULT_ABI = void 0; exports.TEMPEST_VAULT_ABI = [ { "type": "receive", "stateMutability": "payable" }, { "type": "function", "name": "DEFAULT_ADMIN_ROLE", "inputs": [], "outputs": [ { "name": "", "type": "bytes32", "internalType": "bytes32" } ], "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": "calculateAmount0ForAmount1", "inputs": [ { "name": "amountToken1", "type": "uint256", "internalType": "uint256" } ], "outputs": [ { "name": "", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "calculateAmount1ForAmount0", "inputs": [ { "name": "amountToken0", "type": "uint256", "internalType": "uint256" } ], "outputs": [ { "name": "", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "convertToAssets", "inputs": [ { "name": "shares", "type": "uint256", "internalType": "uint256" } ], "outputs": [ { "name": "", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "convertToShares", "inputs": [ { "name": "amount", "type": "uint256", "internalType": "uint256" } ], "outputs": [ { "name": "", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "crocsQuery", "inputs": [], "outputs": [ { "name": "", "type": "address", "internalType": "contract CrocsQuery" } ], "stateMutability": "view" }, { "type": "function", "name": "crocsSwapDex", "inputs": [], "outputs": [ { "name": "", "type": "address", "internalType": "contract CrocsSwapDex" } ], "stateMutability": "view" }, { "type": "function", "name": "currentTick", "inputs": [], "outputs": [ { "name": "", "type": "int24", "internalType": "int24" } ], "stateMutability": "view" }, { "type": "function", "name": "decimals", "inputs": [], "outputs": [ { "name": "", "type": "uint8", "internalType": "uint8" } ], "stateMutability": "view" }, { "type": "function", "name": "deposit", "inputs": [ { "name": "amount", "type": "uint256", "internalType": "uint256" }, { "name": "receiver", "type": "address", "internalType": "address" }, { "name": "checkSlippage", "type": "bool", "internalType": "bool" } ], "outputs": [ { "name": "shares", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "payable" }, { "type": "function", "name": "deposit", "inputs": [ { "name": "amount", "type": "uint256", "internalType": "uint256" }, { "name": "receiver", "type": "address", "internalType": "address" }, { "name": "merkleProofs", "type": "bytes", "internalType": "bytes" } ], "outputs": [ { "name": "shares", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "payable" }, { "type": "function", "name": "depositPaused", "inputs": [], "outputs": [ { "name": "", "type": "bool", "internalType": "bool" } ], "stateMutability": "view" }, { "type": "function", "name": "deposits", "inputs": [ { "name": "amounts", "type": "uint256[]", "internalType": "uint256[]" }, { "name": "receiver", "type": "address", "internalType": "address" }, { "name": "checkSlippage", "type": "bool", "internalType": "bool" } ], "outputs": [ { "name": "shares", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "payable" }, { "type": "function", "name": "fee", "inputs": [], "outputs": [ { "name": "", "type": "uint16", "internalType": "uint16" } ], "stateMutability": "view" }, { "type": "function", "name": "feeRecipient", "inputs": [], "outputs": [ { "name": "", "type": "address", "internalType": "address" } ], "stateMutability": "view" }, { "type": "function", "name": "getLpParams", "inputs": [], "outputs": [ { "name": "", "type": "tuple[]", "internalType": "struct LpParam[]", "components": [ { "name": "upperTick", "type": "int24", "internalType": "int24" }, { "name": "lowerTick", "type": "int24", "internalType": "int24" } ] } ], "stateMutability": "view" }, { "type": "function", "name": "getPosition", "inputs": [ { "name": "_upperTick", "type": "int24", "internalType": "int24" }, { "name": "_lowerTick", "type": "int24", "internalType": "int24" } ], "outputs": [ { "name": "", "type": "uint128", "internalType": "uint128" }, { "name": "", "type": "uint128", "internalType": "uint128" }, { "name": "", "type": "uint128", "internalType": "uint128" } ], "stateMutability": "view" }, { "type": "function", "name": "getPositions", "inputs": [], "outputs": [ { "name": "amount0Invested", "type": "uint256", "internalType": "uint256" }, { "name": "amount1Invested", "type": "uint256", "internalType": "uint256" }, { "name": "amount0Idle", "type": "uint256", "internalType": "uint256" }, { "name": "amount1Idle", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "getRoleAdmin", "inputs": [ { "name": "role", "type": "bytes32", "internalType": "bytes32" } ], "outputs": [ { "name": "", "type": "bytes32", "internalType": "bytes32" } ], "stateMutability": "view" }, { "type": "function", "name": "getTokenAddresses", "inputs": [], "outputs": [ { "name": "", "type": "address[2]", "internalType": "address[2]" } ], "stateMutability": "view" }, { "type": "function", "name": "grantRole", "inputs": [ { "name": "role", "type": "bytes32", "internalType": "bytes32" }, { "name": "account", "type": "address", "internalType": "address" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "hasRole", "inputs": [ { "name": "role", "type": "bytes32", "internalType": "bytes32" }, { "name": "account", "type": "address", "internalType": "address" } ], "outputs": [ { "name": "", "type": "bool", "internalType": "bool" } ], "stateMutability": "view" }, { "type": "function", "name": "investDust", "inputs": [ { "name": "checkSlippage", "type": "bool", "internalType": "bool" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "investedPercentage", "inputs": [], "outputs": [ { "name": "", "type": "uint16", "internalType": "uint16" } ], "stateMutability": "view" }, { "type": "function", "name": "liqSlippage", "inputs": [], "outputs": [ { "name": "", "type": "uint16", "internalType": "uint16" } ], "stateMutability": "view" }, { "type": "function", "name": "minimumDeposit", "inputs": [], "outputs": [ { "name": "", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "name", "inputs": [], "outputs": [ { "name": "", "type": "string", "internalType": "string" } ], "stateMutability": "view" }, { "type": "function", "name": "operatorPath", "inputs": [], "outputs": [ { "name": "", "type": "address", "internalType": "address" } ], "stateMutability": "view" }, { "type": "function", "name": "oracle", "inputs": [], "outputs": [ { "name": "", "type": "address", "internalType": "address" } ], "stateMutability": "view" }, { "type": "function", "name": "padding", "inputs": [], "outputs": [ { "name": "", "type": "uint8", "internalType": "uint8" } ], "stateMutability": "view" }, { "type": "function", "name": "previewDeposit", "inputs": [ { "name": "assets", "type": "uint256", "internalType": "uint256" } ], "outputs": [ { "name": "", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "previewWithdraw", "inputs": [ { "name": "assets", "type": "uint256", "internalType": "uint256" } ], "outputs": [ { "name": "", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", "name": "redeem", "inputs": [ { "name": "shares", "type": "uint256", "internalType": "uint256" }, { "name": "receiver", "type": "address", "internalType": "address" }, { "name": "owner", "type": "address", "internalType": "address" }, { "name": "minimumReceive", "type": "uint256", "internalType": "uint256" }, { "name": "checkSlippage", "type": "bool", "internalType": "bool" } ], "outputs": [ { "name": "assets", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "nonpayable" }, { "inputs": [ { "internalType": "uint256", "name": "shares", "type": "uint256" }, { "internalType": "address", "name": "receiver", "type": "address" }, { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "bytes", "name": "merkleProofs", "type": "bytes" } ], "name": "redeem", "outputs": [ { "internalType": "uint256", "name": "assets", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "type": "function", "name": "redeemWithoutSwap", "inputs": [ { "name": "shares", "type": "uint256", "internalType": "uint256" }, { "name": "receiver", "type": "address", "internalType": "address" }, { "name": "owner", "type": "address", "internalType": "address" }, { "name": "checkSlippage", "type": "bool", "internalType": "bool" } ], "outputs": [ { "name": "amount0", "type": "uint256", "internalType": "uint256" }, { "name": "amount1", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "nonpayable" }, { "type": "function", "name": "renounceRole", "inputs": [ { "name": "role", "type": "bytes32", "internalType": "bytes32" }, { "name": "callerConfirmation", "type": "address", "internalType": "address" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "revokeRole", "inputs": [ { "name": "role", "type": "bytes32", "internalType": "bytes32" }, { "name": "account", "type": "address", "internalType": "address" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "setFeeRecipient", "inputs": [ { "name": "_feeRecipient", "type": "address", "internalType": "address" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "setFees", "inputs": [ { "name": "_fee", "type": "uint16", "internalType": "uint16" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "setInvestedPercentage", "inputs": [ { "name": "_investedPercentage", "type": "uint16", "internalType": "uint16" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "setLiqSlippage", "inputs": [ { "name": "_liqSlippage", "type": "uint16", "internalType": "uint16" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "setMinimumDeposit", "inputs": [ { "name": "_newMinimumDeposit", "type": "uint256", "internalType": "uint256" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "setOperatorPath", "inputs": [ { "name": "newPath", "type": "address", "internalType": "address" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "setOracle", "inputs": [ { "name": "_oracle", "type": "address", "internalType": "address" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "setPadding", "inputs": [ { "name": "_padding", "type": "uint8", "internalType": "uint8" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "setSwapSlippage", "inputs": [ { "name": "_swapSlippage", "type": "uint16", "internalType": "uint16" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "setUserPath", "inputs": [ { "name": "newPath", "type": "address", "internalType": "address" } ], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "supportsInterface", "inputs": [ { "name": "interfaceId", "type": "bytes4", "internalType": "bytes4" } ], "outputs": [ { "name": "", "type": "bool", "internalType": "bool" } ], "stateMutability": "view" }, { "type": "function", "name": "swapSlippage", "inputs": [], "outputs": [ { "name": "", "type": "uint16", "internalType": "uint16" } ], "stateMutability": "view" }, { "type": "function", "name": "symbol", "inputs": [], "outputs": [ { "name": "", "type": "string", "internalType": "string" } ], "stateMutability": "view" }, { "type": "function", "name": "toggleDepositPause", "inputs": [], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "toggleWithdrawPause", "inputs": [], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "totalAssets", "inputs": [], "outputs": [ { "name": "", "type": "uint256", "internalType": "uint256" } ], "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": "userPath", "inputs": [], "outputs": [ { "name": "", "type": "address", "internalType": "address" } ], "stateMutability": "view" }, { "type": "function", "name": "withdraw", "inputs": [ { "name": "assets", "type": "uint256", "internalType": "uint256" }, { "name": "receiver", "type": "address", "internalType": "address" }, { "name": "owner", "type": "address", "internalType": "address" }, { "name": "minimumReceive", "type": "uint256", "internalType": "uint256" }, { "name": "checkSlippage", "type": "bool", "internalType": "bool" } ], "outputs": [ { "name": "shares", "type": "uint256", "internalType": "uint256" } ], "stateMutability": "nonpayable" }, { "type": "function", "name": "withdrawPaused", "inputs": [], "outputs": [ { "name": "", "type": "bool", "internalType": "bool" } ], "stateMutability": "view" }, { "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": "Deposit", "inputs": [ { "name": "sender", "type": "address", "indexed": true, "internalType": "address" }, { "name": "owner", "type": "address", "indexed": true, "internalType": "address" }, { "name": "assets", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "shares", "type": "uint256", "indexed": false, "internalType": "uint256" } ], "anonymous": false }, { "type": "event", "name": "DepositPauseToggled", "inputs": [ { "name": "isPaused", "type": "bool", "indexed": false, "internalType": "bool" } ], "anonymous": false }, { "type": "event", "name": "Deposits", "inputs": [ { "name": "sender", "type": "address", "indexed": true, "internalType": "address" }, { "name": "owner", "type": "address", "indexed": true, "internalType": "address" }, { "name": "assets", "type": "uint256[]", "indexed": false, "internalType": "uint256[]" }, { "name": "shares", "type": "uint256", "indexed": false, "internalType": "uint256" } ], "anonymous": false }, { "type": "event", "name": "FeeRecipientSet", "inputs": [ { "name": "feeRecipient", "type": "address", "indexed": false, "internalType": "address" } ], "anonymous": false }, { "type": "event", "name": "FeesSet", "inputs": [ { "name": "fee", "type": "uint16", "indexed": false, "internalType": "uint16" } ], "anonymous": false }, { "type": "event", "name": "Initialized", "inputs": [ { "name": "version", "type": "uint64", "indexed": false, "internalType": "uint64" } ], "anonymous": false }, { "type": "event", "name": "InvestedPercentageSet", "inputs": [ { "name": "investedPercentage", "type": "uint16", "indexed": false, "internalType": "uint16" } ], "anonymous": false }, { "type": "event", "name": "LiqSlippageSet", "inputs": [ { "name": "liqSlippage", "type": "uint16", "indexed": false, "internalType": "uint16" } ], "anonymous": false }, { "type": "event", "name": "MinimumDepositSet", "inputs": [ { "name": "newValue", "type": "uint256", "indexed": false, "internalType": "uint256" } ], "anonymous": false }, { "type": "event", "name": "OperatorPathSet", "inputs": [ { "name": "newValue", "type": "address", "indexed": false, "internalType": "address" } ], "anonymous": false }, { "type": "event", "name": "OracleSet", "inputs": [ { "name": "oracle", "type": "address", "indexed": false, "internalType": "address" } ], "anonymous": false }, { "type": "event", "name": "PaddingSet", "inputs": [ { "name": "padding", "type": "uint8", "indexed": false, "internalType": "uint8" } ], "anonymous": false }, { "type": "event", "name": "Rebalance", "inputs": [ { "name": "oldUpperTicks", "type": "int24[]", "indexed": false, "internalType": "int24[]" }, { "name": "oldLowerTicks", "type": "int24[]", "indexed": false, "internalType": "int24[]" }, { "name": "newUpperTicks", "type": "int24[]", "indexed": false, "internalType": "int24[]" }, { "name": "newLowerTicks", "type": "int24[]", "indexed": false, "internalType": "int24[]" } ], "anonymous": false }, { "type": "event", "name": "RoleAdminChanged", "inputs": [ { "name": "role", "type": "bytes32", "indexed": true, "internalType": "bytes32" }, { "name": "previousAdminRole", "type": "bytes32", "indexed": true, "internalType": "bytes32" }, { "name": "newAdminRole", "type": "bytes32", "indexed": true, "internalType": "bytes32" } ], "anonymous": false }, { "type": "event", "name": "RoleGranted", "inputs": [ { "name": "role", "type": "bytes32", "indexed": true, "internalType": "bytes32" }, { "name": "account", "type": "address", "indexed": true, "internalType": "address" }, { "name": "sender", "type": "address", "indexed": true, "internalType": "address" } ], "anonymous": false }, { "type": "event", "name": "RoleRevoked", "inputs": [ { "name": "role", "type": "bytes32", "indexed": true, "internalType": "bytes32" }, { "name": "account", "type": "address", "indexed": true, "internalType": "address" }, { "name": "sender", "type": "address", "indexed": true, "internalType": "address" } ], "anonymous": false }, { "type": "event", "name": "SwapSlippageSet", "inputs": [ { "name": "swapSlippage", "type": "uint16", "indexed": false, "internalType": "uint16" } ], "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": "UserPathSet", "inputs": [ { "name": "newValue", "type": "address", "indexed": false, "internalType": "address" } ], "anonymous": false }, { "type": "event", "name": "Withdraw", "inputs": [ { "name": "caller", "type": "address", "indexed": true, "internalType": "address" }, { "name": "receiver", "type": "address", "indexed": true, "internalType": "address" }, { "name": "owner", "type": "address", "indexed": true, "internalType": "address" }, { "name": "assets", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "shares", "type": "uint256", "indexed": false, "internalType": "uint256" } ], "anonymous": false }, { "type": "event", "name": "WithdrawPausedToggled", "inputs": [ { "name": "isPaused", "type": "bool", "indexed": false, "internalType": "bool" } ], "anonymous": false }, { "type": "event", "name": "WithdrawWithoutSwap", "inputs": [ { "name": "caller", "type": "address", "indexed": true, "internalType": "address" }, { "name": "receiver", "type": "address", "indexed": true, "internalType": "address" }, { "name": "owner", "type": "address", "indexed": true, "internalType": "address" }, { "name": "amount0", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "amount1", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "shares", "type": "uint256", "indexed": false, "internalType": "uint256" } ], "anonymous": false }, { "type": "error", "name": "AccessControlBadConfirmation", "inputs": [] }, { "type": "error", "name": "AccessControlUnauthorizedAccount", "inputs": [ { "name": "account", "type": "address", "internalType": "address" }, { "name": "neededRole", "type": "bytes32", "internalType": "bytes32" } ] }, { "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": "InvalidInitialization", "inputs": [] }, { "type": "error", "name": "NotInitializing", "inputs": [] }, { "type": "error", "name": "ReentrancyGuardReentrantCall", "inputs": [] } ]; //# sourceMappingURL=TempestVaultAbi.js.map