@etherisc/registry-contracts
Version:
Etherisc's smart contracts for the registry.
2,226 lines (2,225 loc) • 2.67 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": "NftId",
"name": "target",
"type": "uint96"
}
],
"name": "calculateLockingUntil",
"outputs": [
{
"internalType": "Timestamp",
"name": "lockedUntil",
"type": "uint40"
}
],
"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": "info",
"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": "owner",
"type": "address"
},
{
"internalType": "NftId",
"name": "target",
"type": "uint96"
},
{
"internalType": "uint256",
"name": "dipAmount",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "signatureId",
"type": "bytes32"
},
{
"internalType": "bytes",
"name": "signature",
"type": "bytes"
}
],
"name": "createStakeWithSignature",
"outputs": [
{
"internalType": "NftId",
"name": "stakeId",
"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": "target",
"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": "stakeId",
"type": "uint96"
}
],
"name": "isUnstakingAvailable",
"outputs": [
{
"internalType": "bool",
"name": "isAvailable",
"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": "stakeId",
"type": "uint96"
},
{
"internalType": "NftId",
"name": "newTarget",
"type": "uint96"
}
],
"name": "restake",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "NftId",
"name": "stakeId",
"type": "uint96"
},
{
"internalType": "NftId",
"name": "newTarget",
"type": "uint96"
},
{
"internalType": "bytes32",
"name": "signatureId",
"type": "bytes32"
},
{
"internalType": "bytes",
"name": "signature",
"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": "stakingMessageHelper",
"type": "address"
}
],
"name": "setMessageHelper",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "registryAddress",
"type": "address"
}
],
"name": "setRegistry",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "rewardHelper",
"type": "address"
}
],
"name": "setRewardHelper",
"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": "target",
"type": "uint96"
},
{
"internalType": "UFixed",
"name": "newRewardRate",
"type": "uint256"
}
],
"name": "setTargetRewardRate",
"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": [
{
"internalType": "NftId",
"name": "stakeId",
"type": "uint96"
}
],
"name": "updateRewards",
"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",
"23": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/Context.sol",
"25": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/Strings.sol",
"26": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/cryptography/ECDSA.sol",
"27": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/cryptography/EIP712.sol",
"3": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts-upgradeable@4.8.2/contracts/utils/ContextUpgradeable.sol",
"30": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/math/Math.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",
"52": "contracts/staking/RewardHelper.sol",
"53": "contracts/staking/StakingMessageHelper.sol",
"54": "contracts/staking/StakingV01.sol",
"55": "contracts/staking/StakingV02.sol",
"56": "contracts/staking/StakingV03.sol",
"6": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/access/Ownable.sol"
},
"ast": {
"absolutePath": "contracts/staking/StakingV03.sol",
"exportedSymbols": {
"IChainRegistry": [
4025
],
"NftId": [
3353
],
"ObjectType": [
3555
],
"RewardHelper": [
6866
],
"StakingMessageHelper": [
7109
],
"StakingV02": [
9369
],
"StakingV03": [
10309
],
"Timestamp": [
4530
],
"UFixed": [
5099
],
"Version": [
12269
],
"blockTimestamp": [
4700
],
"toTimestamp": [
4688
],
"toVersion": [
12435
],
"toVersionPart": [
12383
],
"zeroTimestamp": [
4711
]
},
"id": 10310,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 9371,
"literals": [
"solidity",
"^",
"0.8",
".19"
],
"nodeType": "PragmaDirective",
"src": "39:24:56"
},
{
"absolutePath": "contracts/shared/IVersionType.sol",
"file": "../shared/IVersionType.sol",
"id": 9375,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 10310,
"sourceUnit": 12455,
"src": "65:77:56",
"symbolAliases": [
{
"foreign": {
"id": 9372,
"name": "Version",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12269,
"src": "73:7:56",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
},
{
"foreign": {
"id": 9373,
"name": "toVersion",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12435,
"src": "82:9:56",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
},
{
"foreign": {
"id": 9374,
"name": "toVersionPart",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12383,
"src": "93:13:56",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],
"unitAlias": ""
},
{
"absolutePath": "contracts/shared/IBaseTypes.sol",
"file": "../shared/IBaseTypes.sol",
"id": 9380,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 10310,
"sourceUnit": 4754,
"src": "143:95:56",
"symbolAliases": [
{
"foreign": {
"id": 9376,
"name": "Timestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4530,
"src": "151:9:56",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
},
{
"foreign": {
"id": 9377,
"name": "blockTimestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4700,
"src": "162:14:56",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
},
{
"foreign": {
"id": 9378,
"name": "toTimestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4688,
"src": "178:11:56",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
},
{
"foreign": {
"id": 9379,
"name": "zeroTimestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4711,
"src": "191:13:56",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],
"unitAlias": ""
},
{
"absolutePath": "contracts/shared/UFixedMath.sol",
"file": "../shared/UFixedMath.sol",
"id": 9382,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 10310,
"sourceUnit": 5592,
"src": "239:48:56",
"symbolAliases": [
{
"foreign": {
"id": 9381,
"name": "UFixed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5099,
"src": "247:6:56",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],
"unitAlias": ""
},
{
"absolutePath": "contracts/registry/ChainRegistryV01.sol",
"file": "../registry/ChainRegistryV01.sol",
"id": 9385,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 10310,
"sourceUnit": 3156,
"src": "289:76:56",
"symbolAliases": [
{
"foreign": {
"id": 9383,
"name": "IChainRegistry",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4025,
"src": "297:14:56",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
},
{
"foreign": {
"id": 9384,
"name": "ObjectType",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3555,
"src": "313:10:56",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],