@etherisc/registry-contracts
Version:
Etherisc's smart contracts for the registry.
2,214 lines • 1.87 MB
JSON
{
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint8",
"name": "version",
"type": "uint8"
}
],
"name": "Initialized",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "NftId",
"name": "target",
"type": "uint96"
},
{
"indexed": false,
"internalType": "address",
"name": "user",
"type": "address"
},
{
"indexed": false,
"internalType": "NftId",
"name": "id",
"type": "uint96"
}
],
"name": "LogStakingNewStakeCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "NftId",
"name": "oldTarget",
"type": "uint96"
},
{
"indexed": false,
"internalType": "NftId",
"name": "newTrget",
"type": "uint96"
},
{
"indexed": false,
"internalType": "address",
"name": "user",
"type": "address"
},
{
"indexed": false,
"internalType": "NftId",
"name": "stakeId",
"type": "uint96"
},
{
"indexed": false,
"internalType": "uint256",
"name": "stakingAmount",
"type": "uint256"
}
],
"name": "LogStakingRestaked",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "user",
"type": "address"
},
{
"indexed": false,
"internalType": "UFixed",
"name": "oldRewardRate",
"type": "uint256"
},
{
"indexed": false,
"internalType": "UFixed",
"name": "newRewardRate",
"type": "uint256"
}
],
"name": "LogStakingRewardRateSet",
"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": "newBalance",
"type": "uint256"
}
],
"name": "LogStakingRewardReservesDecreased",
"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": "newBalance",
"type": "uint256"
}
],
"name": "LogStakingRewardReservesIncreased",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "NftId",
"name": "id",
"type": "uint96"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "newBalance",
"type": "uint256"
}
],
"name": "LogStakingRewardsClaimed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "NftId",
"name": "id",
"type": "uint96"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "newBalance",
"type": "uint256"
}
],
"name": "LogStakingRewardsUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "NftId",
"name": "target",
"type": "uint96"
},
{
"indexed": false,
"internalType": "address",
"name": "user",
"type": "address"
},
{
"indexed": false,
"internalType": "NftId",
"name": "id",
"type": "uint96"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "newBalance",
"type": "uint256"
}
],
"name": "LogStakingStaked",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "user",
"type": "address"
},
{
"indexed": false,
"internalType": "ChainId",
"name": "chain",
"type": "bytes5"
},
{
"indexed": false,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": false,
"internalType": "UFixed",
"name": "oldStakingRate",
"type": "uint256"
},
{
"indexed": false,
"internalType": "UFixed",
"name": "newStakingRate",
"type": "uint256"
}
],
"name": "LogStakingStakingRateSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "NftId",
"name": "target",
"type": "uint96"
},
{
"indexed": false,
"internalType": "address",
"name": "user",
"type": "address"
},
{
"indexed": false,
"internalType": "NftId",
"name": "id",
"type": "uint96"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "newBalance",
"type": "uint256"
}
],
"name": "LogStakingUnstaked",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "user",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "oldWallet",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "newWallet",
"type": "address"
}
],
"name": "LogStakingWalletChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "user",
"type": "address"
},
{
"indexed": false,
"internalType": "NftId",
"name": "target",
"type": "uint96"
},
{
"indexed": false,
"internalType": "UFixed",
"name": "oldRewardRate",
"type": "uint256"
},
{
"indexed": false,
"internalType": "UFixed",
"name": "newRewardRate",
"type": "uint256"
}
],
"name": "LogTargetRewardRateSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "Version",
"name": "version",
"type": "uint48"
},
{
"indexed": false,
"internalType": "address",
"name": "implementation",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "activatedBy",
"type": "address"
}
],
"name": "LogVersionableActivated",
"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"
},
{
"inputs": [],
"name": "DIP_CONTRACT_ADDRESS",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "DIP_DECIMALS",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "EXP",
"outputs": [
{
"internalType": "int8",
"name": "",
"type": "int8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MAINNET_ID",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MAX_REWARD_RATE_EXP",
"outputs": [
{
"internalType": "int8",
"name": "",
"type": "int8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MAX_REWARD_RATE_VALUE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MULTIPLIER",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MULTIPLIER_HALF",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "ROUNDING_DEFAULT",
"outputs": [
{
"internalType": "enum UFixedType.Rounding",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "YEAR_DURATION",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "implementation",
"type": "address"
},
{
"internalType": "address",
"name": "activatedBy",
"type": "address"
}
],
"name": "activate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "implementation",
"type": "address"
},
{
"internalType": "address",
"name": "newOwner",
"type": "address"
},
{
"internalType": "address",
"name": "activatedBy",
"type": "address"
}
],
"name": "activateAndSetOwner",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "blockNumber",
"outputs": [
{
"internalType": "Blocknumber",
"name": "",
"type": "uint32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "ChainId",
"name": "chain",
"type": "bytes5"
},
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "dipAmount",
"type": "uint256"
}
],
"name": "calculateCapitalSupport",
"outputs": [
{
"internalType": "uint256",
"name": "tokenAmount",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "ChainId",
"name": "chain",
"type": "bytes5"
},
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenAmount",
"type": "uint256"
}
],
"name": "calculateRequiredStaking",
"outputs": [
{
"internalType": "uint256",
"name": "dipAmount",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "duration",
"type": "uint256"
}
],
"name": "calculateRewards",
"outputs": [
{
"internalType": "uint256",
"name": "rewardAmount",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "NftId",
"name": "id",
"type": "uint96"
},
{
"internalType": "NftId",
"name": "target",
"type": "uint96"
},
{
"internalType": "uint256",
"name": "stakeBalance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "rewardBalance",
"type": "uint256"
},
{
"internalType": "Timestamp",
"name": "createdAt",
"type": "uint40"
},
{
"internalType": "Timestamp",
"name": "updatedAt",
"type": "uint40"
},
{
"internalType": "Version",
"name": "version",
"type": "uint48"
},
{
"internalType": "Timestamp",
"name": "lockedUntil",
"type": "uint40"
}
],
"internalType": "struct IStaking.StakeInfo",
"name": "stakeInfo",
"type": "tuple"
}
],
"name": "calculateRewardsIncrement",
"outputs": [
{
"internalType": "uint256",
"name": "rewardsAmount",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "NftId",
"name": "target",
"type": "uint96"
}
],
"name": "capitalSupport",
"outputs": [
{
"internalType": "uint256",
"name": "capitalAmount",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "NftId",
"name": "stakeId",
"type": "uint96"
}
],
"name": "claimRewards",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "NftId",
"name": "target",
"type": "uint96"
},
{
"internalType": "uint256",
"name": "dipAmount",
"type": "uint256"
}
],
"name": "createStake",
"outputs": [
{
"internalType": "NftId",
"name": "stakeId",
"type": "uint96"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "NftId",
"name": "",
"type": "uint96"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
},
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"name": "createStakeWithSignature",
"outputs": [
{
"internalType": "NftId",
"name": "",
"type": "uint96"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "decimals",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "UFixed",
"name": "a",
"type": "uint256"
},
{
"internalType": "enum UFixedType.Rounding",
"name": "rounding",
"type": "uint8"
}
],
"name": "ftoi",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "UFixed",
"name": "a",
"type": "uint256"
}
],
"name": "ftoi",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "NftId",
"name": "bundleNft",
"type": "uint96"
}
],
"name": "getBundleInfo",
"outputs": [
{
"internalType": "bytes32",
"name": "instanceId",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "riskpoolId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "string",
"name": "displayName",
"type": "string"
},
{
"internalType": "enum IInstanceServiceFacade.BundleState",
"name": "bundleState",
"type": "uint8"
},
{
"internalType": "Timestamp",
"name": "expiryAt",
"type": "uint40"
},
{
"internalType": "bool",
"name": "stakingSupported",
"type": "bool"
},
{
"internalType": "bool",
"name": "unstakingSupported",
"type": "bool"
},
{
"internalType": "uint256",
"name": "stakeAmount",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "NftId",
"name": "target",
"type": "uint96"
}
],
"name": "getBundleState",
"outputs": [
{
"internalType": "enum IChainRegistry.ObjectState",
"name": "objectState",
"type": "uint8"
},
{
"internalType": "enum IInstanceServiceFacade.BundleState",
"name": "bundleState",
"type": "uint8"
},
{
"internalType": "Timestamp",
"name": "expiryAt",
"type": "uint40"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getDip",
"outputs": [
{
"internalType": "contract IERC20Metadata",
"name": "dip",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "NftId",
"name": "id",
"type": "uint96"
}
],
"name": "getInfo",
"outputs": [
{
"components": [
{
"internalType": "NftId",
"name": "id",
"type": "uint96"
},
{
"internalType": "NftId",
"name": "target",
"type": "uint96"
},
{
"internalType": "uint256",
"name": "stakeBalance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "rewardBalance",
"type": "uint256"
},
{
"internalType": "Timestamp",
"name": "createdAt",
"type": "uint40"
},
{
"internalType": "Timestamp",
"name": "updatedAt",
"type": "uint40"
},
{
"internalType": "Version",
"name": "version",
"type": "uint48"
},
{
"internalType": "Timestamp",
"name": "lockedUntil",
"type": "uint40"
}
],
"internalType": "struct IStaking.StakeInfo",
"name": "info",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getMessageHelperAddress",
"outputs": [
{
"internalType": "address",
"name": "messageHelperAddress",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getRegistry",
"outputs": [
{
"internalType": "contract IChainRegistry",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getStakingWallet",
"outputs": [
{
"internalType": "address",
"name": "stakingWallet",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "NftId",
"name": "",
"type": "uint96"
}
],
"name": "getTargetRewardRate",
"outputs": [
{
"internalType": "UFixed",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "idx",
"type": "uint256"
}
],
"name": "getVersion",
"outputs": [
{
"internalType": "Version",
"name": "",
"type": "uint48"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "Version",
"name": "_version",
"type": "uint48"
}
],
"name": "getVersionInfo",
"outputs": [
{
"components": [
{
"internalType": "Version",
"name": "version",
"type": "uint48"
},
{
"internalType": "address",
"name": "implementation",
"type": "address"
},
{
"internalType": "address",
"name": "activatedBy",
"type": "address"
},
{
"internalType": "Blocknumber",
"name": "activatedIn",
"type": "uint32"
},
{
"internalType": "Timestamp",
"name": "activatedAt",
"type": "uint40"
}
],
"internalType": "struct IVersionable.VersionInfo",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "implementsIStaking",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "x",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "shift",
"type": "uint8"
}
],
"name": "intToBytes",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "Version",
"name": "_version",
"type": "uint48"
}
],
"name": "isActivated",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "NftId",
"name": "target",
"type": "uint96"
}
],
"name": "isStakingSupported",
"outputs": [
{
"internalType": "bool",
"name": "isSupported",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "ObjectType",
"name": "targetType",
"type": "uint8"
}
],
"name": "isStakingSupportedForType",
"outputs": [
{
"internalType": "bool",
"name": "isSupported",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "NftId",
"name": "",
"type": "uint96"
}
],
"name": "isUnstakingAvailable",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "NftId",
"name": "target",
"type": "uint96"
}
],
"name": "isUnstakingSupported",
"outputs": [
{
"internalType": "bool",
"name": "isSupported",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "a",
"type": "uint256"
}
],
"name": "itof",
"outputs": [
{
"internalType": "UFixed",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "a",
"type": "uint256"
},
{
"internalType": "int8",
"name": "exp",
"type": "int8"
}
],
"name": "itof",
"outputs": [
{
"internalType": "UFixed",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "maxRewardRate",
"outputs": [
{
"internalType": "UFixed",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "rateDecimals",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "dipAmount",
"type": "uint256"
}
],
"name": "refillRewardReserves",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "NftId",
"name": "",
"type": "uint96"
},
{
"internalType": "NftId",
"name": "",
"type": "uint96"
}
],
"name": "restake",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "NftId",
"name": "",
"type": "uint96"
},
{
"internalType": "NftId",
"name": "",
"type": "uint96"
},
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
},
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"name": "restakeWithSignature",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "rewardBalance",
"outputs": [
{
"internalType": "uint256",
"name": "dips",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "rewardRate",
"outputs": [
{
"internalType": "UFixed",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "rewardReserves",
"outputs": [
{
"internalType": "uint256",
"name": "dips",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "dipToken",
"type": "address"
}
],
"name": "setDipContract",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "registryAddress",
"type": "address"
}
],
"name": "setRegistry",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "UFixed",
"name": "newRewardRate",
"type": "uint256"
}
],
"name": "setRewardRate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "ChainId",
"name": "chain",
"type": "bytes5"
},
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "UFixed",
"name": "newStakingRate",
"type": "uint256"
}
],
"name": "setStakingRate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "stakingWalletNew",
"type": "address"
}
],
"name": "setStakingWallet",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "NftId",
"name": "stakeId",
"type": "uint96"
},
{
"internalType": "uint256",
"name": "dipAmount",
"type": "uint256"
}
],
"name": "stake",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "stakeBalance",
"outputs": [
{
"internalType": "uint256",
"name": "dips",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "NftId",
"name": "target",
"type": "uint96"
}
],
"name": "stakes",
"outputs": [
{
"internalType": "uint256",
"name": "dipAmount",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "ChainId",
"name": "chain",
"type": "bytes5"
},
{
"internalType": "address",
"name": "token",
"type": "address"
}
],
"name": "stakingRate",
"outputs": [
{
"internalType": "UFixed",
"name": "rate",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "chainId",
"type": "uint256"
}
],
"name": "toChain",
"outputs": [
{
"internalType": "ChainId",
"name": "",
"type": "bytes5"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "ChainId",
"name": "x",
"type": "bytes5"
}
],
"name": "toInt",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "Blocknumber",
"name": "x",
"type": "uint32"
}
],
"name": "toInt",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "Timestamp",
"name": "x",
"type": "uint40"
}
],
"name": "toInt",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
},
{
"internalType": "int8",
"name": "exp",
"type": "int8"
}
],
"name": "toRate",
"outputs": [
{
"internalType": "UFixed",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "Version",
"name": "_version",
"type": "uint48"
}
],
"name": "toVersionParts",
"outputs": [
{
"internalType": "VersionPart",
"name": "major",
"type": "uint16"
},
{
"internalType": "VersionPart",
"name": "minor",
"type": "uint16"
},
{
"internalType": "VersionPart",
"name": "patch",
"type": "uint16"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "NftId",
"name": "stakeId",
"type": "uint96"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "unstake",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "NftId",
"name": "stakeId",
"type": "uint96"
}
],
"name": "unstakeAndClaimRewards",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "version",
"outputs": [
{
"internalType": "Version",
"name": "",
"type": "uint48"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "versionParts",
"outputs": [
{
"internalType": "VersionPart",
"name": "major",
"type": "uint16"
},
{
"internalType": "VersionPart",
"name": "minor",
"type": "uint16"
},
{
"internalType": "VersionPart",
"name": "patch",
"type": "uint16"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "versions",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "dipAmount",
"type": "uint256"
}
],
"name": "withdrawRewardReserves",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"allSourcePaths": {
"0": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts-upgradeable@4.8.2/contracts/access/OwnableUpgradeable.sol",
"1": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts-upgradeable@4.8.2/contracts/proxy/utils/Initializable.sol",
"3": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts-upgradeable@4.8.2/contracts/utils/ContextUpgradeable.sol",
"34": "contracts/registry/IChainNft.sol",
"42": "contracts/shared/BaseTypes.sol",
"43": "contracts/shared/IBaseTypes.sol",
"44": "contracts/shared/IVersionType.sol",
"45": "contracts/shared/IVersionable.sol",
"47": "contracts/shared/UFixedMath.sol",
"48": "contracts/shared/Versionable.sol",
"49": "contracts/shared/VersionedOwnable.sol",
"50": "contracts/staking/IStaking.sol",
"54": "contracts/staking/StakingV01.sol",
"55": "contracts/staking/StakingV02.sol"
},
"ast": {
"absolutePath": "contracts/staking/StakingV02.sol",
"exportedSymbols": {
"IVersionable": [
4856
],
"NftId": [
3353
],
"StakingV01": [
9277
],
"StakingV02": [
9369
],
"Version": [
12269
],
"Versionable": [
5891
],
"VersionedOwnable": [
5965
],
"toVersion": [
12435
],
"toVersionPart": [
12383
]
},
"id": 9370,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 9279,
"literals": [
"solidity",
"^",
"0.8",
".19"
],
"nodeType": "PragmaDirective",
"src": "39:24:55"
},
{
"absolutePath": "contracts/shared/IVersionType.sol",
"file": "../shared/IVersionType.sol",
"id": 9283,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 9370,
"sourceUnit": 12455,
"src": "65:77:55",
"symbolAliases": [
{
"foreign": {
"id": 9280,
"name": "Version",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12269,
"src": "73:7:55",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
},
{
"foreign": {
"id": 9281,
"name": "toVersion",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12435,
"src": "82:9:55",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
},
{
"foreign": {
"id": 9282,
"name": "toVersionPart",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12383,
"src": "93:13:55",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],
"unitAlias": ""
},
{
"absolutePath": "contracts/shared/IVersionable.sol",
"file": "../shared/IVersionable.sol",
"id": 9285,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 9370,
"sourceUnit": 4857,
"src": "143:56:55",
"symbolAliases": [
{
"foreign": {
"id": 9284,
"name": "IVersionable",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4856,
"src": "151:12:55",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],
"unitAlias": ""
},
{
"absolutePath": "contracts/shared/Versionable.sol",
"file": "../shared/Versionable.sol",
"id": 9287,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 9370,
"sourceUnit": 5892,
"src": "200:54:55",
"symbolAliases": [
{
"foreign": {
"id": 9286,
"name": "Versionable",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5891,
"src": "208:11:55",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],
"unitAlias": ""
},
{
"absolutePath": "contracts/shared/VersionedOwnable.sol",
"file": "../shared/VersionedOwnable.sol",
"id": 9289,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 9370,
"sourceUnit": 5966,
"src": "255:64:55",
"symbolAliases": [
{
"foreign": {
"id": 9288,
"name": "VersionedOwnable",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5965,
"src": "263:16:55",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],
"unitAlias": ""
},
{
"absolutePath": "contracts/registry/IChainNft.sol",
"file": "../registry/IChainNft.sol",
"id": 9291,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 9370,
"sourceUnit": 3495,
"src": "321:48:55",
"symbolAliases": [
{
"foreign": {
"id": 9290,
"name": "NftId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3353,
"src": "329:5:55",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],
"unitAlias": ""
},
{
"absolutePath": "contracts/staking/StakingV01.sol",
"file": "./StakingV01.sol",
"id": 9293,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 9370,
"sourceUnit": 9278,
"src": "371:44:55",
"symbolAliases": [
{
"foreign": {
"id": 9292,
"name": "StakingV01",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9277,
"src": "379:10:55",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 9294,
"name": "StakingV01",
"nameLocations": [
"444:10:55"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 9277,
"src": "444:10:55"
},
"id": 9295,
"nodeType": "InheritanceSpecifier",
"src": "444:10:55"
}
],
"canonicalName": "StakingV02",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 9369,
"linearizedBaseContracts": [
9369,
9277,
6479,
5965,
13768,
17126,
17084,
5891,
4856,
5591,
4443,
4753
],
"name": "StakingV02",
"nameLocation": "426:10:55",
"nodeType": "ContractDefinition",
"nodes": [
{
"baseFunctions": [
7340
],
"body": {
"id": 9314,
"nodeType": "Block",
"src": "756:124:55",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"hexValue": "31",
"id": 9304,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "810:1:55",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
}
],
"id": 9303,
"name": "toVersionPart",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12383,
"src": "796:13:55",
"typeDescriptions": {
"typeIdentifier": "t_funct