UNPKG

vana-sdk

Version:

A TypeScript library for interacting with Vana Network smart contracts

1,620 lines 38.1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DLPRootImplementation2Abi = void 0; exports.DLPRootImplementation2Abi = [ { inputs: [], stateMutability: "nonpayable", type: "constructor", }, { 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: [], name: "CheckpointUnorderedInsertion", type: "error", }, { inputs: [ { internalType: "address", name: "implementation", type: "address", }, ], name: "ERC1967InvalidImplementation", type: "error", }, { inputs: [], name: "ERC1967NonPayable", type: "error", }, { inputs: [], name: "EnforcedPause", type: "error", }, { inputs: [], name: "EpochNotEnded", type: "error", }, { inputs: [], name: "ExpectedPause", type: "error", }, { inputs: [], name: "FailedInnerCall", type: "error", }, { inputs: [], name: "InvalidAddress", type: "error", }, { inputs: [], name: "InvalidDlpId", type: "error", }, { inputs: [], name: "InvalidDlpStatus", type: "error", }, { inputs: [], name: "InvalidInitialization", type: "error", }, { inputs: [], name: "InvalidParam", type: "error", }, { inputs: [], name: "InvalidStakeAmount", type: "error", }, { inputs: [], name: "InvalidStakersPercentage", type: "error", }, { inputs: [], name: "LastEpochMustBeFinalised", type: "error", }, { inputs: [], name: "NotInitializing", type: "error", }, { inputs: [], name: "NotStakeOwner", type: "error", }, { inputs: [], name: "NothingToClaim", type: "error", }, { inputs: [], name: "ReentrancyGuardReentrantCall", type: "error", }, { inputs: [], name: "StakeActionPaused", type: "error", }, { inputs: [], name: "StakeAlreadyClosed", type: "error", }, { inputs: [], name: "StakeAlreadyWithdrawn", type: "error", }, { inputs: [], name: "StakeNotClosed", type: "error", }, { inputs: [], name: "StakeWithdrawalTooEarly", type: "error", }, { inputs: [], name: "TransferFailed", type: "error", }, { inputs: [], name: "UUPSUnauthorizedCallContext", type: "error", }, { inputs: [ { internalType: "bytes32", name: "slot", type: "bytes32", }, ], name: "UUPSUnsupportedProxiableUUID", type: "error", }, { anonymous: false, inputs: [ { indexed: false, internalType: "uint64", name: "version", type: "uint64", }, ], name: "Initialized", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "uint256", name: "newMinStakeAmount", type: "uint256", }, ], name: "MinStakeAmountUpdated", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "account", type: "address", }, ], name: "Paused", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "uint256", name: "newRewardClaimDelay", type: "uint256", }, ], name: "RewardClaimDelayUpdated", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "uint256", name: "stakeId", type: "uint256", }, { indexed: false, internalType: "uint256", name: "amount", type: "uint256", }, { indexed: false, internalType: "uint256", name: "entityId", type: "uint256", }, ], name: "RewardMigratedToVanaPool", 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: true, internalType: "uint256", name: "stakeId", type: "uint256", }, ], name: "StakeClosed", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "uint256", name: "stakeId", type: "uint256", }, { indexed: true, internalType: "address", name: "staker", type: "address", }, { indexed: true, internalType: "uint256", name: "dlpId", type: "uint256", }, { indexed: false, internalType: "uint256", name: "amount", type: "uint256", }, ], name: "StakeCreated", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "uint256", name: "oldStakeId", type: "uint256", }, { indexed: false, internalType: "uint256", name: "newStakeId", type: "uint256", }, { indexed: true, internalType: "uint256", name: "newDlpId", type: "uint256", }, { indexed: false, internalType: "uint256", name: "newAmount", type: "uint256", }, ], name: "StakeMigrated", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "uint256", name: "stakeId", type: "uint256", }, { indexed: false, internalType: "uint256", name: "amount", type: "uint256", }, { indexed: false, internalType: "uint256", name: "entityId", type: "uint256", }, ], name: "StakeMigratedToVanaPool", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "uint256", name: "stakeId", type: "uint256", }, { indexed: true, internalType: "uint256", name: "epochId", type: "uint256", }, { indexed: false, internalType: "uint256", name: "amount", type: "uint256", }, { indexed: false, internalType: "bool", name: "isFinal", type: "bool", }, ], name: "StakeRewardClaimed", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "uint256", name: "newStakeWithdrawalDelay", type: "uint256", }, ], name: "StakeWithdrawalDelayUpdated", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "uint256", name: "stakeId", type: "uint256", }, ], name: "StakeWithdrawn", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "account", type: "address", }, ], name: "Unpaused", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "implementation", type: "address", }, ], name: "Upgraded", type: "event", }, { inputs: [], name: "DEFAULT_ADMIN_ROLE", outputs: [ { internalType: "bytes32", name: "", type: "bytes32", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "MAINTAINER_ROLE", outputs: [ { internalType: "bytes32", name: "", type: "bytes32", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "NEW_MULTIPLIER_EPOCH", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "UPGRADE_INTERFACE_VERSION", outputs: [ { internalType: "string", name: "", type: "string", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint256", name: "stakeId", type: "uint256", }, ], name: "calculateStakeClaimableAmount", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", name: "stakeAmount", type: "uint256", }, { internalType: "uint256", name: "stakeStartBlock", type: "uint256", }, { internalType: "uint256", name: "blockNumber", type: "uint256", }, ], name: "calculateStakeScore", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint256", name: "stakeId", type: "uint256", }, { internalType: "uint256", name: "lastEpochToClaim", type: "uint256", }, ], name: "claimStakeRewardUntilEpoch", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256[]", name: "stakeIds", type: "uint256[]", }, ], name: "claimStakesReward", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256[]", name: "stakeIds", type: "uint256[]", }, ], name: "closeStakes", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", name: "dlpId", type: "uint256", }, ], name: "createStake", outputs: [], stateMutability: "payable", type: "function", }, { inputs: [ { internalType: "uint256", name: "dlpId", type: "uint256", }, { internalType: "address", name: "stakeOwner", type: "address", }, ], name: "createStakeOnBehalf", outputs: [], stateMutability: "payable", type: "function", }, { inputs: [], name: "dlpRootCore", outputs: [ { internalType: "contract IDLPRootCore", name: "", type: "address", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "dlpRootEpoch", outputs: [ { internalType: "contract IDLPRootEpoch", name: "", type: "address", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "dlpRootMetrics", outputs: [ { internalType: "contract IDLPRootMetrics", name: "", type: "address", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "dlpRootRewardsTreasury", outputs: [ { internalType: "contract IDLPRootTreasury", name: "", type: "address", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "dlpRootStakesTreasury", outputs: [ { internalType: "contract IDLPRootTreasury", name: "", type: "address", }, ], 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: "address", name: "ownerAddress", type: "address", }, ], name: "initialize", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "forwarder", type: "address", }, ], name: "isTrustedForwarder", outputs: [ { internalType: "bool", name: "", type: "bool", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint256", name: "stakeId", type: "uint256", }, { internalType: "uint256", name: "entityId", type: "uint256", }, ], name: "migrateRewardToVanaPool", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", name: "stakeId", type: "uint256", }, { internalType: "uint256", name: "newDlpId", type: "uint256", }, { internalType: "uint256", name: "newAmount", type: "uint256", }, ], name: "migrateStake", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", name: "stakeId", type: "uint256", }, { internalType: "uint256", name: "entityId", type: "uint256", }, ], name: "migrateStakeAndRewardToVanaPool", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", name: "stakeId", type: "uint256", }, { internalType: "uint256", name: "entityId", type: "uint256", }, ], name: "migrateStakeToVanaPool", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], name: "minStakeAmount", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "pause", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], name: "paused", outputs: [ { internalType: "bool", name: "", type: "bool", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "proxiableUUID", outputs: [ { internalType: "bytes32", name: "", type: "bytes32", }, ], 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: [], name: "rewardClaimDelay", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint256", name: "stakeId", type: "uint256", }, { internalType: "uint256", name: "epochId", type: "uint256", }, ], name: "stakeClaimedAmounts", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint256", name: "stakeId", type: "uint256", }, { internalType: "uint256", name: "epochId", type: "uint256", }, ], name: "stakeEpochReward", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "stakeWithdrawalDelay", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "stakerAddress", type: "address", }, { internalType: "uint256", name: "dlpId", type: "uint256", }, ], name: "stakerDlpStakeAmount", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "staker", type: "address", }, { internalType: "uint256", name: "index", type: "uint256", }, ], name: "stakerDlpsListAt", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "staker", type: "address", }, ], name: "stakerDlpsListCount", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "staker", type: "address", }, ], name: "stakerDlpsListValues", outputs: [ { internalType: "uint256[]", name: "", type: "uint256[]", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "stakerAddress", type: "address", }, { internalType: "uint256", name: "index", type: "uint256", }, ], name: "stakerStakesListAt", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "stakerAddress", type: "address", }, ], name: "stakerStakesListCount", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "stakerAddress", type: "address", }, ], name: "stakerStakesListValues", outputs: [ { internalType: "uint256[]", name: "", type: "uint256[]", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "stakerAddress", type: "address", }, ], name: "stakerTotalStakeAmount", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint256", name: "index", type: "uint256", }, ], name: "stakersListAt", outputs: [ { internalType: "address", name: "", type: "address", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "stakersListCount", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint256", name: "stakeId", type: "uint256", }, ], name: "stakes", outputs: [ { components: [ { internalType: "uint256", name: "id", type: "uint256", }, { internalType: "address", name: "stakerAddress", type: "address", }, { internalType: "uint256", name: "dlpId", type: "uint256", }, { internalType: "uint256", name: "amount", type: "uint256", }, { internalType: "uint256", name: "startBlock", type: "uint256", }, { internalType: "uint256", name: "endBlock", type: "uint256", }, { internalType: "bool", name: "withdrawn", type: "bool", }, { internalType: "uint256", name: "lastClaimedEpochId", type: "uint256", }, ], internalType: "struct IDLPRoot.StakeInfo", name: "", type: "tuple", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "stakesCount", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "stakingLastBlockNumber", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "bytes4", name: "interfaceId", type: "bytes4", }, ], name: "supportsInterface", outputs: [ { internalType: "bool", name: "", type: "bool", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "trustedForwarder", outputs: [ { internalType: "address", name: "", type: "address", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "unpause", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "newDlpRootCoreAddress", type: "address", }, ], name: "updateDlpRootCore", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "newDlpRootEpochAddress", type: "address", }, ], name: "updateDlpRootEpoch", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "newDlpRootMetricsAddress", type: "address", }, ], name: "updateDlpRootMetrics", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "newDlpRootRewardsTreasuryAddress", type: "address", }, ], name: "updateDlpRootRewardsTreasury", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "newDlpRootStakesTreasuryAddress", type: "address", }, ], name: "updateDlpRootStakesTreasury", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", name: "newMinStakeAmount", type: "uint256", }, ], name: "updateMinStakeAmount", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", name: "newRewardClaimDelay", type: "uint256", }, ], name: "updateRewardClaimDelay", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", name: "newStakingLastBlockNumber", type: "uint256", }, ], name: "updateStakeLastBlockNumber", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", name: "newStakeWithdrawalDelay", type: "uint256", }, ], name: "updateStakeWithdrawalDelay", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "trustedForwarderAddress", type: "address", }, ], name: "updateTrustedForwarder", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "newVanaPoolStakingAddress", type: "address", }, ], name: "updateVanaPoolStaking", 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: "vanaPoolStaking", outputs: [ { internalType: "contract IVanaPoolStaking", name: "", type: "address", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "version", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "pure", type: "function", }, { inputs: [ { internalType: "uint256[]", name: "stakeIds", type: "uint256[]", }, ], name: "withdrawStakes", outputs: [], stateMutability: "nonpayable", type: "function", }, { stateMutability: "payable", type: "receive", }, ]; //# sourceMappingURL=DLPRootImplementation.js.map