UNPKG

@opendatalabs/vana-sdk

Version:

A TypeScript library for interacting with Vana Network smart contracts.

1,383 lines 26 kB
"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var VanaEpochImplementation_exports = {}; __export(VanaEpochImplementation_exports, { VanaEpochABI: () => VanaEpochABI, default: () => VanaEpochImplementation_default }); module.exports = __toCommonJS(VanaEpochImplementation_exports); const VanaEpochABI = [ { 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: [ { internalType: "address", name: "implementation", type: "address" } ], name: "ERC1967InvalidImplementation", type: "error" }, { inputs: [], name: "ERC1967NonPayable", type: "error" }, { inputs: [], name: "EnforcedPause", type: "error" }, { inputs: [], name: "EpochAlreadyFinalized", type: "error" }, { inputs: [], name: "EpochNotEnded", type: "error" }, { inputs: [], name: "EpochNotFinalized", type: "error" }, { inputs: [ { internalType: "uint256", name: "totalRewardAmount", type: "uint256" }, { internalType: "uint256", name: "epochRewardAmount", type: "uint256" } ], name: "EpochRewardExceeded", type: "error" }, { inputs: [], name: "EpochRewardNotDistributed", type: "error" }, { inputs: [], name: "ExpectedPause", type: "error" }, { inputs: [], name: "FailedInnerCall", type: "error" }, { inputs: [], name: "InvalidEpoch", type: "error" }, { inputs: [], name: "InvalidInitialization", type: "error" }, { inputs: [], name: "LastEpochAlreadySet", type: "error" }, { inputs: [ { internalType: "uint256", name: "lastEpoch", type: "uint256" } ], name: "LastEpochExceeded", type: "error" }, { inputs: [], name: "NotInitializing", type: "error" }, { inputs: [], name: "ReentrancyGuardReentrantCall", type: "error" }, { inputs: [ { internalType: "uint256", name: "a", type: "uint256" }, { internalType: "uint256", name: "b", type: "uint256" } ], name: "Test", type: "error" }, { inputs: [], name: "UUPSUnauthorizedCallContext", type: "error" }, { inputs: [ { internalType: "bytes32", name: "slot", type: "bytes32" } ], name: "UUPSUnsupportedProxiableUUID", type: "error" }, { anonymous: false, inputs: [ { indexed: false, internalType: "uint256", name: "epochId", type: "uint256" }, { indexed: false, internalType: "uint256", name: "startBlock", type: "uint256" }, { indexed: false, internalType: "uint256", name: "endBlock", type: "uint256" }, { indexed: false, internalType: "uint256", name: "rewardAmount", type: "uint256" } ], name: "EpochCreated", type: "event" }, { anonymous: false, inputs: [ { indexed: false, internalType: "uint256", name: "newDaySize", type: "uint256" } ], name: "EpochDayUpdated", type: "event" }, { anonymous: false, inputs: [ { indexed: false, internalType: "uint256", name: "epochId", type: "uint256" }, { indexed: false, internalType: "uint256", name: "dlpId", type: "uint256" }, { indexed: false, internalType: "uint256", name: "oldBonusAmount", type: "uint256" }, { indexed: false, internalType: "uint256", name: "newBonusAmount", type: "uint256" } ], name: "EpochDlpBonusUpdated", type: "event" }, { anonymous: false, inputs: [ { indexed: false, internalType: "uint256", name: "epochId", type: "uint256" }, { indexed: false, internalType: "uint256", name: "dlpId", type: "uint256" }, { indexed: false, internalType: "uint256", name: "rewardAmount", type: "uint256" }, { indexed: false, internalType: "uint256", name: "penaltyAmount", type: "uint256" } ], name: "EpochDlpRewardAdded", type: "event" }, { anonymous: false, inputs: [ { indexed: false, internalType: "uint256", name: "epochId", type: "uint256" }, { indexed: false, internalType: "uint256", name: "dlpId", type: "uint256" }, { indexed: false, internalType: "uint256", name: "rewardAmount", type: "uint256" }, { indexed: false, internalType: "uint256", name: "penaltyAmount", type: "uint256" } ], name: "EpochDlpRewardOverridden", type: "event" }, { anonymous: false, inputs: [ { indexed: false, internalType: "uint256", name: "epochId", type: "uint256" } ], name: "EpochFinalized", type: "event" }, { anonymous: false, inputs: [ { indexed: false, internalType: "uint256", name: "newEpochRewardAmount", type: "uint256" } ], name: "EpochRewardAmountUpdated", type: "event" }, { anonymous: false, inputs: [ { indexed: false, internalType: "uint256", name: "newEpochSize", type: "uint256" } ], name: "EpochSizeUpdated", type: "event" }, { anonymous: false, inputs: [ { indexed: false, internalType: "uint256", name: "epochId", type: "uint256" }, { indexed: false, internalType: "uint256", name: "startBlock", type: "uint256" }, { indexed: false, internalType: "uint256", name: "endBlock", type: "uint256" }, { indexed: false, internalType: "uint256", name: "rewardAmount", type: "uint256" } ], name: "EpochUpdated", type: "event" }, { anonymous: false, inputs: [ { indexed: false, internalType: "uint64", name: "version", type: "uint64" } ], name: "Initialized", type: "event" }, { anonymous: false, inputs: [ { indexed: false, internalType: "uint256", name: "lastEpoch", type: "uint256" } ], name: "LastEpochSet", type: "event" }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "account", type: "address" } ], name: "Paused", 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: "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: "DLP_PERFORMANCE_ROLE", outputs: [ { internalType: "bytes32", name: "", type: "bytes32" } ], stateMutability: "view", type: "function" }, { inputs: [], name: "DLP_REWARD_DEPLOYER_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: "UPGRADE_INTERFACE_VERSION", outputs: [ { internalType: "string", name: "", type: "string" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "epochId", type: "uint256" }, { internalType: "uint256", name: "dlpId", type: "uint256" }, { internalType: "uint256", name: "amount", type: "uint256" } ], name: "addEpochDlpBonusAmount", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [], name: "createEpochs", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "uint256", name: "blockNumber", type: "uint256" } ], name: "createEpochsUntilBlockNumber", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [], name: "daySize", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [], name: "dlpPerformance", outputs: [ { internalType: "contract IDLPPerformance", name: "", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [], name: "dlpRegistry", outputs: [ { internalType: "contract IDLPRegistry", name: "", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [], name: "dlpRewardDeployer", outputs: [ { internalType: "contract IDLPRewardDeployer", name: "", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "epochId", type: "uint256" } ], name: "epochDlpIds", outputs: [ { internalType: "uint256[]", name: "", type: "uint256[]" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "epochId", type: "uint256" } ], name: "epochDlpIdsWithBonus", outputs: [ { internalType: "uint256[]", name: "", type: "uint256[]" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "epochId", type: "uint256" }, { internalType: "uint256", name: "dlpId", type: "uint256" } ], name: "epochDlps", outputs: [ { components: [ { internalType: "bool", name: "isTopDlp", type: "bool" }, { internalType: "uint256", name: "rewardAmount", type: "uint256" }, { internalType: "uint256", name: "penaltyAmount", type: "uint256" }, { internalType: "uint256", name: "bonusAmount", type: "uint256" }, { internalType: "uint256", name: "distributedAmount", type: "uint256" }, { internalType: "uint256", name: "distributedPenaltyAmount", type: "uint256" } ], internalType: "struct IVanaEpoch.EpochDlpInfo", name: "", type: "tuple" } ], stateMutability: "view", type: "function" }, { inputs: [], name: "epochRewardAmount", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [], name: "epochSize", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "epochId", type: "uint256" } ], name: "epochs", outputs: [ { components: [ { internalType: "uint256", name: "startBlock", type: "uint256" }, { internalType: "uint256", name: "endBlock", type: "uint256" }, { internalType: "uint256", name: "rewardAmount", type: "uint256" }, { internalType: "bool", name: "isFinalized", type: "bool" } ], internalType: "struct IVanaEpoch.EpochInfo", name: "", type: "tuple" } ], stateMutability: "view", type: "function" }, { inputs: [], name: "epochsCount", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "epochId", type: "uint256" } ], name: "forceFinalizedEpoch", outputs: [], stateMutability: "nonpayable", 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: [ { components: [ { internalType: "address", name: "ownerAddress", type: "address" }, { internalType: "address", name: "dlpRegistryAddress", type: "address" }, { internalType: "uint256", name: "daySize", type: "uint256" }, { internalType: "uint256", name: "epochSize", type: "uint256" }, { internalType: "uint256", name: "epochRewardAmount", type: "uint256" } ], internalType: "struct VanaEpochImplementation.InitializeParams", name: "params", type: "tuple" } ], name: "initialize", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [], name: "lastEpoch", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "epochId", type: "uint256" }, { internalType: "uint256", name: "dlpId", type: "uint256" }, { internalType: "uint256", name: "amount", type: "uint256" } ], name: "overrideEpochDlpBonusAmount", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "uint256", name: "epochId", type: "uint256" }, { internalType: "uint256", name: "dlpId", type: "uint256" }, { internalType: "uint256", name: "rewardAmount", type: "uint256" }, { internalType: "uint256", name: "penaltyAmount", type: "uint256" } ], name: "overrideEpochDlpReward", outputs: [], stateMutability: "nonpayable", 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: [ { internalType: "uint256", name: "epochId", type: "uint256" }, { components: [ { internalType: "uint256", name: "dlpId", type: "uint256" }, { internalType: "uint256", name: "rewardAmount", type: "uint256" }, { internalType: "uint256", name: "penaltyAmount", type: "uint256" } ], internalType: "struct IVanaEpoch.Rewards[]", name: "dlpRewards", type: "tuple[]" } ], name: "saveEpochDlpRewards", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "uint256", name: "_lastEpoch", type: "uint256" } ], name: "setLastEpoch", 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: "unpause", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "uint256", name: "newDaySize", type: "uint256" } ], name: "updateDaySize", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "address", name: "dlpPerformanceAddress", type: "address" } ], name: "updateDlpPerformance", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "address", name: "dlpRegistryAddress", type: "address" } ], name: "updateDlpRegistry", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "address", name: "dlpRewardDeployerAddress", type: "address" } ], name: "updateDlpRewardDeployer", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "uint256", name: "epochId", type: "uint256" }, { internalType: "uint256", name: "startBlock", type: "uint256" }, { internalType: "uint256", name: "endBlock", type: "uint256" }, { internalType: "uint256", name: "rewardAmount", type: "uint256" }, { components: [ { internalType: "uint256", name: "dlpId", type: "uint256" }, { internalType: "uint256", name: "rewardAmount", type: "uint256" }, { internalType: "uint256", name: "penaltyAmount", type: "uint256" } ], internalType: "struct IVanaEpoch.Rewards[]", name: "dlpRewards", type: "tuple[]" }, { internalType: "bool", name: "isFinalized", type: "bool" } ], name: "updateEpoch", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "uint256", name: "newEpochRewardAmount", type: "uint256" } ], name: "updateEpochRewardAmount", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "uint256", name: "newEpochSizeInDays", type: "uint256" } ], name: "updateEpochSize", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "uint256", name: "newEpochsCount", type: "uint256" } ], name: "updateEpochsCount", 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: "version", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "pure", type: "function" } ]; var VanaEpochImplementation_default = VanaEpochABI; // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { VanaEpochABI }); //# sourceMappingURL=VanaEpochImplementation.cjs.map