@etherisc/registry-contracts
Version:
Etherisc's smart contracts for the registry.
2,211 lines (2,210 loc) • 3.01 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",
"14": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC20/IERC20.sol",
"15": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC20/extensions/IERC20Metadata.sol",
"17": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC721/IERC721.sol",
"2": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts-upgradeable@4.8.2/contracts/utils/AddressUpgradeable.sol",
"20": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC721/extensions/IERC721Enumerable.sol",
"29": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/utils/introspection/IERC165.sol",
"3": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts-upgradeable@4.8.2/contracts/utils/ContextUpgradeable.sol",
"32": "contracts/registry/ChainRegistryV01.sol",
"34": "contracts/registry/IChainNft.sol",
"36": "contracts/registry/IChainRegistry.sol",
"38": "contracts/registry/IInstanceRegistryFacade.sol",
"39": "contracts/registry/IInstanceServiceFacade.sol",
"4": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts-upgradeable@4.8.2/contracts/utils/StringsUpgradeable.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",
"5": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts-upgradeable@4.8.2/contracts/utils/math/MathUpgradeable.sol",
"50": "contracts/staking/IStaking.sol",
"54": "contracts/staking/StakingV01.sol"
},
"ast": {
"absolutePath": "contracts/staking/StakingV01.sol",
"exportedSymbols": {
"BaseTypes": [
4443
],
"ChainId": [
4447
],
"ChainRegistryV01": [
3155
],
"IChainRegistry": [
4025
],
"IERC20Metadata": [
12510
],
"IInstanceServiceFacade": [
4295
],
"IStaking": [
6479
],
"IVersionable": [
4856
],
"NftId": [
3353
],
"ObjectType": [
3555
],
"StakingV01": [
9277
],
"Timestamp": [
4530
],
"UFixed": [
5099
],
"UFixedType": [
5591
],
"Version": [
12269
],
"Versionable": [
5891
],
"VersionedOwnable": [
5965
],
"blockTimestamp": [
4700
],
"gtz": [
5368,
3418
],
"thisChainId": [
4528
],
"toChainId": [
4516
],
"toTimestamp": [
4688
],
"toVersion": [
12435
],
"toVersionPart": [
12383
],
"zeroTimestamp": [
4711
],
"zeroVersion": [
12454
]
},
"id": 9278,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 7111,
"literals": [
"solidity",
"^",
"0.8",
".19"
],
"nodeType": "PragmaDirective",
"src": "39:24:54"
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC20/extensions/IERC20Metadata.sol",
"file": "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol",
"id": 7113,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 9278,
"sourceUnit": 12511,
"src": "65:97:54",
"symbolAliases": [
{
"foreign": {
"id": 7112,
"name": "IERC20Metadata",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 12510,
"src": "73:14:54",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],
"unitAlias": ""
},
{
"absolutePath": "contracts/shared/IBaseTypes.sol",
"file": "../shared/IBaseTypes.sol",
"id": 7121,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 9278,
"sourceUnit": 4754,
"src": "164:128:54",
"symbolAliases": [
{
"foreign": {
"id": 7114,
"name": "ChainId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4447,
"src": "172:7:54",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
},
{
"foreign": {
"id": 7115,
"name": "Timestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4530,
"src": "181:9:54",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
},
{
"foreign": {
"id": 7116,
"name": "blockTimestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4700,
"src": "192:14:54",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
},
{
"foreign": {
"id": 7117,
"name": "thisChainId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4528,
"src": "208:11:54",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
},
{
"foreign": {
"id": 7118,
"name": "toChainId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4516,
"src": "221:9:54",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
},
{
"foreign": {
"id": 7119,
"name": "toTimestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4688,
"src": "232:11:54",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
},
{
"foreign": {
"id": 7120,
"name": "zeroTimestamp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4711,
"src": "245:13:54",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],
"unitAlias": ""
},
{
"absolutePath": "contracts/shared/BaseTypes.sol",
"file": "../shared/BaseTypes.sol",
"id": 7123,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 9278,
"sourceUnit": 4444,
"src": "293:50:54",
"symbolAliases": [
{
"foreign": {
"id": 7122,
"name": "BaseTypes",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4443,
"src": "301:9:54",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],
"unitAlias": ""
},
{
"absolutePath": "contracts/shared/UFixedMath.sol",
"file": "../shared/UFixedMath.sol",
"id": 7127,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 9278,
"sourceUnit": 5592,
"src": "344:65:54",
"symbolAliases": [
{
"foreign": {
"id": 7124,
"name": "UFixed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5099,
"src": "352:6:54",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
},
{
"foreign": {
"id": 7125,
"name": "UFixedType",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5591,
"src": "360:10:54",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
},
{
"foreign": {
"id": 7126,
"name": "gtz",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5368,
"src": "372:3:54",
"typeDescriptions": {}
},
"nameLocation": "-1:-1:-1"
}
],
"unitAlias": ""