@vechain/vebetterdao-contracts
Version:
Open-source repository that houses the smart contracts powering the decentralized VeBetterDAO on the VeChain Thor blockchain.
757 lines (756 loc) • 16.2 kB
JSON
{
"_format": "hh-sol-artifact-1",
"contractName": "IStargate",
"sourceName": "contracts/mocks/Stargate/interfaces/IStargate.sol",
"abi": [
{
"inputs": [],
"name": "DelegationExitAlreadyRequested",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "DelegationNotFound",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "contractBalance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "tokenAmount",
"type": "uint256"
}
],
"name": "InsufficientContractBalance",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "enum IStargate.DelegationStatus",
"name": "status",
"type": "uint8"
}
],
"name": "InvalidDelegationStatus",
"type": "error"
},
{
"inputs": [],
"name": "InvalidInitializationParams",
"type": "error"
},
{
"inputs": [],
"name": "InvalidMaxClaimablePeriods",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "InvalidToken",
"type": "error"
},
{
"inputs": [],
"name": "MaxClaimablePeriodsExceeded",
"type": "error"
},
{
"inputs": [],
"name": "OnlyStargateNFTAndProtocolStaker",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "TokenAlreadyDelegated",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "TokenUnderMaturityPeriod",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "user",
"type": "address"
}
],
"name": "UnauthorizedUser",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "validator",
"type": "address"
}
],
"name": "ValidatorNotActiveOrQueued",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint8",
"name": "levelId",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "required",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "provided",
"type": "uint256"
}
],
"name": "VetAmountMismatch",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "receiver",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "VetTransferFailed",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "validator",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "delegationId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint48",
"name": "exitBlock",
"type": "uint48"
}
],
"name": "DelegationExitRequested",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "validator",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "delegationId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint8",
"name": "levelId",
"type": "uint8"
},
{
"indexed": false,
"internalType": "uint8",
"name": "probabilityMultiplier",
"type": "uint8"
}
],
"name": "DelegationInitiated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "receiver",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"indexed": true,
"internalType": "uint256",
"name": "delegationId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint32",
"name": "firstClaimedPeriod",
"type": "uint32"
},
{
"indexed": false,
"internalType": "uint32",
"name": "lastClaimedPeriod",
"type": "uint32"
}
],
"name": "DelegationRewardsClaimed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "validator",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "delegationId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint8",
"name": "levelId",
"type": "uint8"
}
],
"name": "DelegationWithdrawn",
"type": "event"
},
{
"inputs": [],
"name": "CLOCK_MODE",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_tokenId",
"type": "uint256"
}
],
"name": "claimRewards",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_tokenId",
"type": "uint256"
}
],
"name": "claimableDelegationPeriods",
"outputs": [
{
"internalType": "uint32",
"name": "",
"type": "uint32"
},
{
"internalType": "uint32",
"name": "",
"type": "uint32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_tokenId",
"type": "uint256"
}
],
"name": "claimableRewards",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_tokenId",
"type": "uint256"
},
{
"internalType": "uint32",
"name": "_batch",
"type": "uint32"
}
],
"name": "claimableRewards",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "clock",
"outputs": [
{
"internalType": "uint48",
"name": "",
"type": "uint48"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_tokenId",
"type": "uint256"
},
{
"internalType": "address",
"name": "_validator",
"type": "address"
}
],
"name": "delegate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_tokenId",
"type": "uint256"
}
],
"name": "getDelegationDetails",
"outputs": [
{
"components": [
{
"internalType": "uint256",
"name": "delegationId",
"type": "uint256"
},
{
"internalType": "address",
"name": "validator",
"type": "address"
},
{
"internalType": "uint256",
"name": "stake",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "probabilityMultiplier",
"type": "uint8"
},
{
"internalType": "uint32",
"name": "startPeriod",
"type": "uint32"
},
{
"internalType": "uint32",
"name": "endPeriod",
"type": "uint32"
},
{
"internalType": "bool",
"name": "isLocked",
"type": "bool"
},
{
"internalType": "enum IStargate.DelegationStatus",
"name": "status",
"type": "uint8"
}
],
"internalType": "struct IStargate.Delegation",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_tokenId",
"type": "uint256"
}
],
"name": "getDelegationIdOfToken",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_tokenId",
"type": "uint256"
}
],
"name": "getDelegationStatus",
"outputs": [
{
"internalType": "enum IStargate.DelegationStatus",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_validator",
"type": "address"
},
{
"internalType": "uint32",
"name": "_period",
"type": "uint32"
}
],
"name": "getDelegatorsEffectiveStake",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_tokenId",
"type": "uint256"
}
],
"name": "getEffectiveStake",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getMaxClaimablePeriods",
"outputs": [
{
"internalType": "uint32",
"name": "",
"type": "uint32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_tokenId",
"type": "uint256"
}
],
"name": "hasRequestedExit",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_tokenId",
"type": "uint256"
}
],
"name": "lockedRewards",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_tokenId",
"type": "uint256"
},
{
"internalType": "address",
"name": "_validator",
"type": "address"
}
],
"name": "migrateAndDelegate",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "pause",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_tokenId",
"type": "uint256"
}
],
"name": "requestDelegationExit",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint32",
"name": "_maxClaimablePeriods",
"type": "uint32"
}
],
"name": "setMaxClaimablePeriods",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint8",
"name": "_levelId",
"type": "uint8"
}
],
"name": "stake",
"outputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint8",
"name": "_levelId",
"type": "uint8"
},
{
"internalType": "address",
"name": "_validator",
"type": "address"
}
],
"name": "stakeAndDelegate",
"outputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "unpause",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_tokenId",
"type": "uint256"
}
],
"name": "unstake",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"linkReferences": {},
"deployedLinkReferences": {}
}