@sfpro/sdk
Version:
TypeScript SDK for Superfluid Protocol - stream money every second
1,194 lines (1,193 loc) • 19.9 kB
JSON
[
{
"type": "constructor",
"inputs": [
{
"name": "fluid",
"type": "address",
"internalType": "contract ISuperToken"
},
{
"name": "programManager",
"type": "address",
"internalType": "contract IEPProgramManager"
},
{
"name": "stakingRewardController",
"type": "address",
"internalType": "contract IStakingRewardController"
},
{
"name": "fontaineBeacon",
"type": "address",
"internalType": "address"
},
{
"name": "isUnlockAvailable",
"type": "bool",
"internalType": "bool"
},
{
"name": "nonfungiblePositionManager",
"type": "address",
"internalType": "contract INonfungiblePositionManager"
},
{
"name": "ethSupPool",
"type": "address",
"internalType": "contract IUniswapV3Pool"
},
{
"name": "swapRouter",
"type": "address",
"internalType": "contract IV3SwapRouter"
},
{
"name": "daoTreasury",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "nonpayable"
},
{
"type": "fallback",
"stateMutability": "payable"
},
{
"type": "receive",
"stateMutability": "payable"
},
{
"type": "function",
"name": "BP_PUMP_RATIO",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "BP_SLIPPAGE_TOLERANCE",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "DAO_TREASURY",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "EP_PROGRAM_MANAGER",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IEPProgramManager"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "ETH_SUP_POOL",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IUniswapV3Pool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "FLUID",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract ISuperToken"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "FONTAINE_BEACON",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract UpgradeableBeacon"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "LP_DISTRIBUTION_POOL",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract ISuperfluidPool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "LP_OPERATION_DEADLINE",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "MIN_UNLOCK_AMOUNT",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "NONFUNGIBLE_POSITION_MANAGER",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract INonfungiblePositionManager"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "STAKER_DISTRIBUTION_POOL",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract ISuperfluidPool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "STAKING_REWARD_CONTROLLER",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IStakingRewardController"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "SWAP_ROUTER",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IV3SwapRouter"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "TAX_FREE_WITHDRAW_DELAY",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "UNLOCKING_FEE",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "UNLOCK_AVAILABLE",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "activePositionCount",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "claim",
"inputs": [
{
"name": "programId",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "totalProgramUnits",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "nonce",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "stackSignature",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "claim",
"inputs": [
{
"name": "programIds",
"type": "uint256[]",
"internalType": "uint256[]"
},
{
"name": "totalProgramUnits",
"type": "uint256[]",
"internalType": "uint256[]"
},
{
"name": "nonce",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "stackSignature",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "claimAndStake",
"inputs": [
{
"name": "programId",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "totalProgramUnits",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "nonce",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "stackSignature",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "claimAndStake",
"inputs": [
{
"name": "programIds",
"type": "uint256[]",
"internalType": "uint256[]"
},
{
"name": "totalProgramUnits",
"type": "uint256[]",
"internalType": "uint256[]"
},
{
"name": "nonce",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "stackSignature",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "collectFees",
"inputs": [
{
"name": "tokenId",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "collectedEthx",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "collectedSup",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "connect",
"inputs": [
{
"name": "programId",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "disconnect",
"inputs": [
{
"name": "programIds",
"type": "uint256[]",
"internalType": "uint256[]"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "disconnect",
"inputs": [
{
"name": "programId",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "disconnectAndClaim",
"inputs": [
{
"name": "programIdsToDisconnect",
"type": "uint256[]",
"internalType": "uint256[]"
},
{
"name": "programIdsToClaim",
"type": "uint256[]",
"internalType": "uint256[]"
},
{
"name": "totalProgramUnits",
"type": "uint256[]",
"internalType": "uint256[]"
},
{
"name": "nonce",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "stackSignature",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "disconnectAndClaimAndStake",
"inputs": [
{
"name": "programIdsToDisconnect",
"type": "uint256[]",
"internalType": "uint256[]"
},
{
"name": "programIdsToClaim",
"type": "uint256[]",
"internalType": "uint256[]"
},
{
"name": "totalProgramUnits",
"type": "uint256[]",
"internalType": "uint256[]"
},
{
"name": "nonce",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "stackSignature",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "fontaineCount",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint16",
"internalType": "uint16"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "fontaines",
"inputs": [
{
"name": "unlockId",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "fontaine",
"type": "address",
"internalType": "contract IFontaine"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getAvailableBalance",
"inputs": [],
"outputs": [
{
"name": "aBalance",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getFlowRatePerProgram",
"inputs": [
{
"name": "programIds",
"type": "uint256[]",
"internalType": "uint256[]"
}
],
"outputs": [
{
"name": "flowRates",
"type": "int96[]",
"internalType": "int96[]"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getFlowRatePerProgram",
"inputs": [
{
"name": "programId",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "flowRate",
"type": "int96",
"internalType": "int96"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getFontaineBeaconImplementation",
"inputs": [],
"outputs": [
{
"name": "fontaineBeaconImpl",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getLiquidityBalance",
"inputs": [],
"outputs": [
{
"name": "lBalance",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getPositionLiquidity",
"inputs": [
{
"name": "tokenId",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "liquidity",
"type": "uint128",
"internalType": "uint128"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getStakedBalance",
"inputs": [],
"outputs": [
{
"name": "sBalance",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getUnitsPerProgram",
"inputs": [
{
"name": "programId",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "units",
"type": "uint128",
"internalType": "uint128"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getUnitsPerProgram",
"inputs": [
{
"name": "programIds",
"type": "uint256[]",
"internalType": "uint256[]"
}
],
"outputs": [
{
"name": "units",
"type": "uint128[]",
"internalType": "uint128[]"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "initialize",
"inputs": [
{
"name": "owner",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "lock",
"inputs": [
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "lockerOwner",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "lpCooldownTimestamps",
"inputs": [
{
"name": "positionTokenId",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "lpCooldownTimestamp",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "provideLiquidity",
"inputs": [
{
"name": "supAmount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "positionTokenId",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "payable"
},
{
"type": "function",
"name": "stake",
"inputs": [
{
"name": "amountToStake",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "stakingUnlocksAt",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint80",
"internalType": "uint80"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "taxFreeExitTimestamps",
"inputs": [
{
"name": "positionTokenId",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "taxFreeWithdrawTimestamp",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "unlock",
"inputs": [
{
"name": "unlockAmount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "unlockPeriod",
"type": "uint128",
"internalType": "uint128"
},
{
"name": "recipient",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "payable"
},
{
"type": "function",
"name": "unstake",
"inputs": [
{
"name": "amountToUnstake",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "withdrawDustETH",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "withdrawLiquidity",
"inputs": [
{
"name": "tokenId",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "liquidityToRemove",
"type": "uint128",
"internalType": "uint128"
},
{
"name": "amount0ToRemove",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "amount1ToRemove",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "event",
"name": "FluidLocked",
"inputs": [
{
"name": "amount",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "FluidStaked",
"inputs": [
{
"name": "newTotalStakedBalance",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
},
{
"name": "addedAmount",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "FluidStreamClaimed",
"inputs": [
{
"name": "programId",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
},
{
"name": "totalProgramUnits",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "FluidStreamsClaimed",
"inputs": [
{
"name": "programId",
"type": "uint256[]",
"indexed": true,
"internalType": "uint256[]"
},
{
"name": "totalProgramUnits",
"type": "uint256[]",
"indexed": true,
"internalType": "uint256[]"
}
],
"anonymous": false
},
{
"type": "event",
"name": "FluidUnlocked",
"inputs": [
{
"name": "unlockPeriod",
"type": "uint128",
"indexed": true,
"internalType": "uint128"
},
{
"name": "availableBalance",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
},
{
"name": "recipient",
"type": "address",
"indexed": false,
"internalType": "address"
},
{
"name": "fontaine",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "FluidUnstaked",
"inputs": [
{
"name": "newTotalStakedBalance",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
},
{
"name": "removedAmount",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Initialized",
"inputs": [
{
"name": "version",
"type": "uint64",
"indexed": false,
"internalType": "uint64"
}
],
"anonymous": false
},
{
"type": "event",
"name": "LiquidityPositionBurned",
"inputs": [
{
"name": "tokenId",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "LiquidityPositionCreated",
"inputs": [
{
"name": "tokenId",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "error",
"name": "FORBIDDEN",
"inputs": []
},
{
"type": "error",
"name": "INSUFFICIENT_AVAILABLE_BALANCE",
"inputs": []
},
{
"type": "error",
"name": "INSUFFICIENT_BALANCE",
"inputs": []
},
{
"type": "error",
"name": "INSUFFICIENT_ETH_SENT",
"inputs": []
},
{
"type": "error",
"name": "INSUFFICIENT_STAKED_BALANCE",
"inputs": []
},
{
"type": "error",
"name": "INSUFFICIENT_UNLOCK_AMOUNT",
"inputs": []
},
{
"type": "error",
"name": "INVALID_UNLOCKING_FEE",
"inputs": []
},
{
"type": "error",
"name": "INVALID_UNLOCK_PERIOD",
"inputs": []
},
{
"type": "error",
"name": "InvalidInitialization",
"inputs": []
},
{
"type": "error",
"name": "LIQUIDITY_POOL_NOT_APPROVED",
"inputs": []
},
{
"type": "error",
"name": "LOCKER_HAS_NO_POSITION",
"inputs": []
},
{
"type": "error",
"name": "LP_COOLDOWN_NOT_ELAPSED",
"inputs": []
},
{
"type": "error",
"name": "LP_DISTRIBUTION_POOL_HAS_NO_UNITS",
"inputs": []
},
{
"type": "error",
"name": "MathOverflowedMulDiv",
"inputs": []
},
{
"type": "error",
"name": "NOT_LOCKER_OWNER",
"inputs": []
},
{
"type": "error",
"name": "NO_FLUID_TO_UNLOCK",
"inputs": []
},
{
"type": "error",
"name": "NO_FLUID_TO_UNSTAKE",
"inputs": []
},
{
"type": "error",
"name": "NotInitializing",
"inputs": []
},
{
"type": "error",
"name": "Reentrancy",
"inputs": []
},
{
"type": "error",
"name": "STAKER_DISTRIBUTION_POOL_HAS_NO_UNITS",
"inputs": []
},
{
"type": "error",
"name": "STAKING_COOLDOWN_NOT_ELAPSED",
"inputs": []
},
{
"type": "error",
"name": "SafeCastOverflowedIntDowncast",
"inputs": [
{
"name": "bits",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "value",
"type": "int256",
"internalType": "int256"
}
]
},
{
"type": "error",
"name": "TTE_NOT_ACTIVATED",
"inputs": []
}
]