UNPKG

@xswap-link/sdk

Version:
1,439 lines (1,438 loc) 28.4 kB
[ { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "AmountExceedStakedBalance", "type": "error" }, { "inputs": [], "name": "ClaimingPaused", "type": "error" }, { "inputs": [], "name": "InsufficientFee", "type": "error" }, { "inputs": [], "name": "InvalidAddress", "type": "error" }, { "inputs": [], "name": "NoStakedTokens", "type": "error" }, { "inputs": [], "name": "NoTokensToWithdraw", "type": "error" }, { "inputs": [], "name": "NotEnoughTokensToStake", "type": "error" }, { "inputs": [], "name": "NothingToClaim", "type": "error" }, { "inputs": [], "name": "NothingToCompound", "type": "error" }, { "inputs": [], "name": "NothingToRestake", "type": "error" }, { "inputs": [], "name": "NothingToStake", "type": "error" }, { "inputs": [], "name": "StakingPoolLimitReached", "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "apr", "type": "uint256" } ], "name": "APRUpdate", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "previousAdmin", "type": "address" }, { "indexed": false, "internalType": "address", "name": "newAdmin", "type": "address" } ], "name": "AdminChanged", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "beacon", "type": "address" } ], "name": "BeaconUpgraded", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "Claim", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "Compound", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint8", "name": "version", "type": "uint8" } ], "name": "Initialized", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferStarted", "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": "account", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "Restake", "type": "event" }, { "anonymous": false, "inputs": [ { "components": [ { "internalType": "uint256", "name": "xPowerMultiplier", "type": "uint256" }, { "internalType": "uint256", "name": "startTimestamp", "type": "uint256" }, { "internalType": "uint256", "name": "endTimestamp", "type": "uint256" } ], "indexed": false, "internalType": "struct StakingStableAPR.BoostEvent", "name": "newBoostEvent", "type": "tuple" } ], "name": "SetBoostEvent", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "compoundingBonus", "type": "uint256" } ], "name": "SetCompoundingBonus", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "feeBurner", "type": "address" } ], "name": "SetFeeBurner", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "feeCollector", "type": "address" } ], "name": "SetFeeCollector", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "bool", "name": "isClaimingPaused", "type": "bool" } ], "name": "SetIsClaimingPaused", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "nativeFeeForAction", "type": "uint256" } ], "name": "SetNativeFeeForAction", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "stakingPoolLimit", "type": "uint256" } ], "name": "SetStakingPoolLimit", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "contract IERC20", "name": "newStakingToken", "type": "address" } ], "name": "SetStakingToken", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "newUnbondingDuration", "type": "uint256" } ], "name": "SetUnbondingDuration", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "newUnbondingInitialBurnPercentage", "type": "uint256" } ], "name": "SetUnbondingInitialBurnPercentage", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "newXPowerMultiplier", "type": "uint256" } ], "name": "SetXPowerMultiplier", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "tokensFrom", "type": "address" }, { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "Stake", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "endTimestamp", "type": "uint256" } ], "name": "Unstake", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "implementation", "type": "address" } ], "name": "Upgraded", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "Withdraw", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "WithdrawTokensBurnedByUsers", "type": "event" }, { "inputs": [], "name": "acceptOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "aprPercentage", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "aprPeriods", "outputs": [ { "internalType": "uint256", "name": "start", "type": "uint256" }, { "internalType": "uint256", "name": "apr", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "boostEvent", "outputs": [ { "internalType": "uint256", "name": "xPowerMultiplier", "type": "uint256" }, { "internalType": "uint256", "name": "startTimestamp", "type": "uint256" }, { "internalType": "uint256", "name": "endTimestamp", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "claim", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [], "name": "compound", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [], "name": "compoundingBonus", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "contract IERC20", "name": "token", "type": "address" } ], "name": "emergencyTokenWithdraw", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "feeBurner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "feeCollector", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "staker", "type": "address" } ], "name": "getStaker", "outputs": [ { "components": [ { "internalType": "address", "name": "walletAddress", "type": "address" }, { "internalType": "uint256", "name": "xPower", "type": "uint256" }, { "internalType": "uint256", "name": "balance", "type": "uint256" }, { "internalType": "uint256", "name": "claimableReward", "type": "uint256" }, { "internalType": "uint256", "name": "compoundableReward", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawableFromUnbonding", "type": "uint256" } ], "internalType": "struct StakingStableAPR.StakerResponse", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "limit", "type": "uint256" }, { "internalType": "uint256", "name": "offset", "type": "uint256" } ], "name": "getStakers", "outputs": [ { "components": [ { "internalType": "address", "name": "walletAddress", "type": "address" }, { "internalType": "uint256", "name": "xPower", "type": "uint256" }, { "internalType": "uint256", "name": "balance", "type": "uint256" }, { "internalType": "uint256", "name": "claimableReward", "type": "uint256" }, { "internalType": "uint256", "name": "compoundableReward", "type": "uint256" }, { "internalType": "uint256", "name": "withdrawableFromUnbonding", "type": "uint256" } ], "internalType": "struct StakingStableAPR.StakerResponse[]", "name": "", "type": "tuple[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getStakingInfo", "outputs": [ { "components": [ { "internalType": "uint256", "name": "totalStakedAmount", "type": "uint256" }, { "internalType": "uint256", "name": "stakingPoolLimit", "type": "uint256" }, { "internalType": "uint256", "name": "unbondingDuration", "type": "uint256" }, { "internalType": "uint256", "name": "nativeFeeForAction", "type": "uint256" }, { "internalType": "uint256", "name": "stakersCount", "type": "uint256" }, { "internalType": "uint256", "name": "compoundingBonus", "type": "uint256" }, { "internalType": "uint256", "name": "currentAPR", "type": "uint256" }, { "internalType": "uint256", "name": "xPowerMultiplier", "type": "uint256" } ], "internalType": "struct StakingStableAPR.StakingInfo", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "staker", "type": "address" } ], "name": "getUnbonding", "outputs": [ { "components": [ { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256", "name": "xPower", "type": "uint256" }, { "internalType": "uint256", "name": "startTimestamp", "type": "uint256" }, { "internalType": "uint256", "name": "endTimestamp", "type": "uint256" } ], "internalType": "struct StakingStableAPR.Unbonding", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "contract IERC20", "name": "_stakingToken", "type": "address" }, { "internalType": "uint256", "name": "_unbondingDuration", "type": "uint256" }, { "internalType": "uint256", "name": "_unbondingInitialBurnPercentage", "type": "uint256" }, { "internalType": "uint256", "name": "_stakingPoolLimit", "type": "uint256" }, { "internalType": "uint256", "name": "_nativeFeeForAction", "type": "uint256" }, { "internalType": "address", "name": "_feeCollector", "type": "address" }, { "internalType": "address", "name": "_feeBurner", "type": "address" }, { "internalType": "uint256", "name": "_compoundingBonus", "type": "uint256" }, { "internalType": "uint256", "name": "_apr", "type": "uint256" }, { "internalType": "uint256", "name": "_xPowerMultiplier", "type": "uint256" }, { "internalType": "address", "name": "_owner", "type": "address" } ], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "isClaimingPaused", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "nativeFeeForAction", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pendingOwner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "proxiableUUID", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "restake", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [], "name": "secondsInYear", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_apr", "type": "uint256" } ], "name": "setAPR", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "uint256", "name": "xPowerMultiplier", "type": "uint256" }, { "internalType": "uint256", "name": "startTimestamp", "type": "uint256" }, { "internalType": "uint256", "name": "endTimestamp", "type": "uint256" } ], "internalType": "struct StakingStableAPR.BoostEvent", "name": "_boostEvent", "type": "tuple" } ], "name": "setBoostEvent", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_compoundingBonus", "type": "uint256" } ], "name": "setCompoundingBonus", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_feeBurner", "type": "address" } ], "name": "setFeeBurner", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_feeCollector", "type": "address" } ], "name": "setFeeCollector", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bool", "name": "_isClaimingPaused", "type": "bool" } ], "name": "setIsClaimingPaused", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_nativeFeeForAction", "type": "uint256" } ], "name": "setNativeFeeForAction", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_stakingPoolLimit", "type": "uint256" } ], "name": "setStakingPoolLimit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "contract IERC20", "name": "_stakingToken", "type": "address" } ], "name": "setStakingToken", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_unbondingDuration", "type": "uint256" } ], "name": "setUnbondingDuration", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_unbondingInitialBurnPercentage", "type": "uint256" } ], "name": "setUnbondingInitialBurnPercentage", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_xPowerMultiplier", "type": "uint256" } ], "name": "setXPowerMultiplier", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "stake", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "address", "name": "user", "type": "address" } ], "name": "stakeFor", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "stakerAddresses", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "stakers", "outputs": [ { "internalType": "uint256", "name": "lastUpdate", "type": "uint256" }, { "internalType": "uint256", "name": "pendingReward", "type": "uint256" }, { "internalType": "uint256", "name": "balance", "type": "uint256" }, { "internalType": "uint256", "name": "xPower", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "stakersCount", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "stakingPoolLimit", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "stakingToken", "outputs": [ { "internalType": "contract IERC20", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalStakedAmount", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "unbondingDuration", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "unbondingInitialBurnPercentage", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "unbondings", "outputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256", "name": "xPower", "type": "uint256" }, { "internalType": "uint256", "name": "startTimestamp", "type": "uint256" }, { "internalType": "uint256", "name": "endTimestamp", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amountToUnstake", "type": "uint256" } ], "name": "unstake", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newImplementation", "type": "address" } ], "name": "upgradeTo", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newImplementation", "type": "address" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "name": "upgradeToAndCall", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [], "name": "withdraw", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [], "name": "withdrawTokensBurnedByUsers", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "withdrawableTokensBurnedByUsers", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "xPowerMultiplier", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" } ]