UNPKG

@knine-sdk/contracts

Version:

Contracts for Knine projects. Part of Knine JS SDK

798 lines (793 loc) 19.6 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var ethers = require('ethers'); /* Autogenerated file. Do not edit manually. */ const _abi = [ { inputs: [], name: "AccessControlBadConfirmation", type: "error", }, { inputs: [ { internalType: "address", name: "account", type: "address", }, { internalType: "bytes32", name: "neededRole", type: "bytes32", }, ], name: "AccessControlUnauthorizedAccount", type: "error", }, { inputs: [ { internalType: "address", name: "target", type: "address", }, ], name: "AddressEmptyCode", type: "error", }, { inputs: [ { internalType: "address", name: "account", type: "address", }, ], name: "AddressInsufficientBalance", type: "error", }, { inputs: [], name: "FailedInnerCall", type: "error", }, { inputs: [], name: "InvalidInitialization", type: "error", }, { inputs: [], name: "NotInitializing", type: "error", }, { inputs: [], name: "ReentrancyGuardReentrantCall", type: "error", }, { inputs: [ { internalType: "address", name: "token", type: "address", }, ], name: "SafeERC20FailedOperation", type: "error", }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "user", type: "address", }, { indexed: false, internalType: "uint256", name: "amount", type: "uint256", }, ], name: "ClaimedReward", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "user", type: "address", }, { indexed: false, internalType: "uint256", name: "amount", type: "uint256", }, { indexed: false, internalType: "uint256", name: "weight", type: "uint256", }, { indexed: false, internalType: "uint256", name: "lockEnds", type: "uint256", }, ], name: "Deposited", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "uint64", name: "version", type: "uint64", }, ], name: "Initialized", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "user", type: "address", }, { indexed: false, internalType: "uint256", name: "newLockEnd", type: "uint256", }, { indexed: false, internalType: "uint256", name: "newWeight", type: "uint256", }, ], name: "LockIncreased", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "bytes32", name: "role", type: "bytes32", }, { indexed: true, internalType: "bytes32", name: "previousAdminRole", type: "bytes32", }, { indexed: true, internalType: "bytes32", name: "newAdminRole", type: "bytes32", }, ], name: "RoleAdminChanged", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "bytes32", name: "role", type: "bytes32", }, { indexed: true, internalType: "address", name: "account", type: "address", }, { indexed: true, internalType: "address", name: "sender", type: "address", }, ], name: "RoleGranted", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "bytes32", name: "role", type: "bytes32", }, { indexed: true, internalType: "address", name: "account", type: "address", }, { indexed: true, internalType: "address", name: "sender", type: "address", }, ], name: "RoleRevoked", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "user", type: "address", }, { indexed: false, internalType: "uint256", name: "amount", type: "uint256", }, ], name: "Withdrawed", type: "event", }, { inputs: [], name: "ADMIN_ROLE", outputs: [ { internalType: "bytes32", name: "", type: "bytes32", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "DEFAULT_ADMIN_ROLE", outputs: [ { internalType: "bytes32", name: "", type: "bytes32", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "KNINE", outputs: [ { internalType: "contract IERC20", name: "", type: "address", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint256", name: "value", type: "uint256", }, ], name: "changeTestTime", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "bool", name: "isLocked", type: "bool", }, ], name: "claimRewards", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], name: "claimTotalRewards", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", name: "amount", type: "uint256", }, { internalType: "uint8", name: "lockDuration", type: "uint8", }, ], name: "deposit", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], name: "emergencyStop", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], name: "excessReward", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "bytes32", name: "role", type: "bytes32", }, ], name: "getRoleAdmin", outputs: [ { internalType: "bytes32", name: "", type: "bytes32", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "bytes32", name: "role", type: "bytes32", }, { internalType: "address", name: "account", type: "address", }, ], name: "grantRole", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "bytes32", name: "role", type: "bytes32", }, { internalType: "address", name: "account", type: "address", }, ], name: "hasRole", outputs: [ { internalType: "bool", name: "", type: "bool", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint8", name: "lockDuration", type: "uint8", }, ], name: "increaseLockup", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "_knine", type: "address", }, { internalType: "address", name: "_admin", type: "address", }, ], name: "initialize", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], name: "maxLockMultiplier", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "user", type: "address", }, ], name: "pendingRewards", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "poolInfo", outputs: [ { internalType: "uint256", name: "startTime", type: "uint256", }, { internalType: "uint256", name: "endTime", type: "uint256", }, { internalType: "uint256", name: "periodFinish", type: "uint256", }, { internalType: "uint256", name: "lastUpdate", type: "uint256", }, { internalType: "uint256", name: "rps", type: "uint256", }, { internalType: "uint256", name: "totalStaked", type: "uint256", }, { internalType: "uint256", name: "totalWeight", type: "uint256", }, { internalType: "uint256", name: "acc", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "bytes32", name: "role", type: "bytes32", }, { internalType: "address", name: "callerConfirmation", type: "address", }, ], name: "renounceRole", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "bytes32", name: "role", type: "bytes32", }, { internalType: "address", name: "account", type: "address", }, ], name: "revokeRole", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", name: "value", type: "uint256", }, ], name: "setMaxMultiplier", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", name: "value", type: "uint256", }, ], name: "setRPS", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "value", type: "address", }, ], name: "setVesting", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", name: "startTime", type: "uint256", }, { internalType: "uint256", name: "rps", type: "uint256", }, ], name: "start", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "bytes4", name: "interfaceId", type: "bytes4", }, ], name: "supportsInterface", outputs: [ { internalType: "bool", name: "", type: "bool", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "testTime", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "totalStakers", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "user", type: "address", }, ], name: "userDeposits", outputs: [ { components: [ { internalType: "uint256", name: "amount", type: "uint256", }, { internalType: "uint256", name: "weight", type: "uint256", }, { internalType: "uint256", name: "acc", type: "uint256", }, { internalType: "uint256", name: "debt", type: "uint256", }, { internalType: "uint256", name: "lockEnd", type: "uint256", }, ], internalType: "struct IDepositStruct.UserInfo[2]", name: "", type: "tuple[2]", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "vesting", outputs: [ { internalType: "address", name: "", type: "address", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "bool", name: "isLocked", type: "bool", }, ], name: "withdraw", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], name: "withdrawExcessReward", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "token", type: "address", }, ], name: "withdrawStockTokens", outputs: [], stateMutability: "nonpayable", type: "function", }, { stateMutability: "payable", type: "receive", }, ]; class RealYieldStakingAbi__factory { static createInterface() { return new ethers.utils.Interface(_abi); } static connect(address, signerOrProvider) { return new ethers.Contract(address, _abi, signerOrProvider); } } RealYieldStakingAbi__factory.abi = _abi; exports.RealYieldStakingAbi__factory = RealYieldStakingAbi__factory;