Module HoprStakingProxyForNetworkRegistry

Source
Expand description

Generated by the following Solidity interface…

interface HoprStakingProxyForNetworkRegistry {
    error MaxRegistrationsMismatch();
    error NftRanksMismatch();
    error SameStakingThreshold();

    event NftTypeAndRankAdded(uint256 indexed nftType, string nftRank);
    event NftTypeAndRankRemoved(uint256 indexed nftType, string nftRank);
    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
    event SpecialNftTypeAndRankAdded(uint256 indexed nftType, string nftRank, uint256 indexed maxRegistration);
    event SpecialNftTypeAndRankRemoved(uint256 indexed nftType, string nftRank);
    event StakeContractUpdated(address indexed stakeContract);
    event ThresholdUpdated(uint256 indexed threshold);

    constructor(address _stakeContract, address _newOwner, uint256 _minStake);

    function canOperateFor(address, address) external pure returns (bool eligiblity);
    function eligibleNftTypeAndRank(uint256) external view returns (uint256 nftType, string memory nftRank);
    function maxAllowedRegistrations(address account) external view returns (uint256);
    function maxRegistrationsPerSpecialNft(uint256) external view returns (uint256);
    function owner() external view returns (address);
    function ownerAddNftTypeAndRank(uint256 nftType, string memory nftRank) external;
    function ownerBatchAddNftTypeAndRank(uint256[] memory nftTypes, string[] memory nftRanks) external;
    function ownerBatchAddSpecialNftTypeAndRank(uint256[] memory nftTypes, string[] memory nftRanks, uint256[] memory maxRegistrations) external;
    function ownerBatchRemoveNftTypeAndRank(uint256[] memory nftTypes, string[] memory nftRanks) external;
    function ownerBatchRemoveSpecialNftTypeAndRank(uint256[] memory nftTypes, string[] memory nftRanks) external;
    function ownerRemoveNftTypeAndRank(uint256 nftType, string memory nftRank) external;
    function ownerUpdateThreshold(uint256 newThreshold) external;
    function renounceOwnership() external;
    function specialNftTypeAndRank(uint256) external view returns (uint256 nftType, string memory nftRank);
    function stakeContract() external view returns (address);
    function stakeThreshold() external view returns (uint256);
    function transferOwnership(address newOwner) external;
    function updateStakeContract(address _stakeContract) external;
}

…which was generated by the following JSON ABI:

[
  {
    "type": "constructor",
    "inputs": [
      {
        "name": "_stakeContract",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "_newOwner",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "_minStake",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "canOperateFor",
    "inputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "eligiblity",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "eligibleNftTypeAndRank",
    "inputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "nftType",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "nftRank",
        "type": "string",
        "internalType": "string"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "maxAllowedRegistrations",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "maxRegistrationsPerSpecialNft",
    "inputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "owner",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "ownerAddNftTypeAndRank",
    "inputs": [
      {
        "name": "nftType",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "nftRank",
        "type": "string",
        "internalType": "string"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "ownerBatchAddNftTypeAndRank",
    "inputs": [
      {
        "name": "nftTypes",
        "type": "uint256[]",
        "internalType": "uint256[]"
      },
      {
        "name": "nftRanks",
        "type": "string[]",
        "internalType": "string[]"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "ownerBatchAddSpecialNftTypeAndRank",
    "inputs": [
      {
        "name": "nftTypes",
        "type": "uint256[]",
        "internalType": "uint256[]"
      },
      {
        "name": "nftRanks",
        "type": "string[]",
        "internalType": "string[]"
      },
      {
        "name": "maxRegistrations",
        "type": "uint256[]",
        "internalType": "uint256[]"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "ownerBatchRemoveNftTypeAndRank",
    "inputs": [
      {
        "name": "nftTypes",
        "type": "uint256[]",
        "internalType": "uint256[]"
      },
      {
        "name": "nftRanks",
        "type": "string[]",
        "internalType": "string[]"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "ownerBatchRemoveSpecialNftTypeAndRank",
    "inputs": [
      {
        "name": "nftTypes",
        "type": "uint256[]",
        "internalType": "uint256[]"
      },
      {
        "name": "nftRanks",
        "type": "string[]",
        "internalType": "string[]"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "ownerRemoveNftTypeAndRank",
    "inputs": [
      {
        "name": "nftType",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "nftRank",
        "type": "string",
        "internalType": "string"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "ownerUpdateThreshold",
    "inputs": [
      {
        "name": "newThreshold",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "renounceOwnership",
    "inputs": [],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "specialNftTypeAndRank",
    "inputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "nftType",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "nftRank",
        "type": "string",
        "internalType": "string"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "stakeContract",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "contract IHoprStake"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "stakeThreshold",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "transferOwnership",
    "inputs": [
      {
        "name": "newOwner",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "updateStakeContract",
    "inputs": [
      {
        "name": "_stakeContract",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "event",
    "name": "NftTypeAndRankAdded",
    "inputs": [
      {
        "name": "nftType",
        "type": "uint256",
        "indexed": true,
        "internalType": "uint256"
      },
      {
        "name": "nftRank",
        "type": "string",
        "indexed": false,
        "internalType": "string"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "NftTypeAndRankRemoved",
    "inputs": [
      {
        "name": "nftType",
        "type": "uint256",
        "indexed": true,
        "internalType": "uint256"
      },
      {
        "name": "nftRank",
        "type": "string",
        "indexed": false,
        "internalType": "string"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "OwnershipTransferred",
    "inputs": [
      {
        "name": "previousOwner",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "newOwner",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "SpecialNftTypeAndRankAdded",
    "inputs": [
      {
        "name": "nftType",
        "type": "uint256",
        "indexed": true,
        "internalType": "uint256"
      },
      {
        "name": "nftRank",
        "type": "string",
        "indexed": false,
        "internalType": "string"
      },
      {
        "name": "maxRegistration",
        "type": "uint256",
        "indexed": true,
        "internalType": "uint256"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "SpecialNftTypeAndRankRemoved",
    "inputs": [
      {
        "name": "nftType",
        "type": "uint256",
        "indexed": true,
        "internalType": "uint256"
      },
      {
        "name": "nftRank",
        "type": "string",
        "indexed": false,
        "internalType": "string"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "StakeContractUpdated",
    "inputs": [
      {
        "name": "stakeContract",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "ThresholdUpdated",
    "inputs": [
      {
        "name": "threshold",
        "type": "uint256",
        "indexed": true,
        "internalType": "uint256"
      }
    ],
    "anonymous": false
  },
  {
    "type": "error",
    "name": "MaxRegistrationsMismatch",
    "inputs": []
  },
  {
    "type": "error",
    "name": "NftRanksMismatch",
    "inputs": []
  },
  {
    "type": "error",
    "name": "SameStakingThreshold",
    "inputs": []
  }
]

Structs§

HoprStakingProxyForNetworkRegistryInstance
A HoprStakingProxyForNetworkRegistry instance.
MaxRegistrationsMismatch
Custom error with signature MaxRegistrationsMismatch() and selector 0x197910e9.
NftRanksMismatch
Custom error with signature NftRanksMismatch() and selector 0x4885f59b.
NftTypeAndRankAdded
Event with signature NftTypeAndRankAdded(uint256,string) and selector 0x2360ee3e77485441cfa07e30e8dc5b031fac38455647c89a763434f58733fcc1.
NftTypeAndRankRemoved
Event with signature NftTypeAndRankRemoved(uint256,string) and selector 0xb1323e42d97b2b3d45f9d4641bf4b6b3f9d0d01e90832ae7b7413109b7a5d347.
OwnershipTransferred
Event with signature OwnershipTransferred(address,address) and selector 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
SameStakingThreshold
Custom error with signature SameStakingThreshold() and selector 0x20e47b13.
SpecialNftTypeAndRankAdded
Event with signature SpecialNftTypeAndRankAdded(uint256,string,uint256) and selector 0xe43bf5f5f8a1211930e5726ba0abceacb1748f97b2966db30a818ba10961cbcc.
SpecialNftTypeAndRankRemoved
Event with signature SpecialNftTypeAndRankRemoved(uint256,string) and selector 0xdb75199103504bd1d3653de758d4295bf00d4587e1d53dfc114464cc47ed97b7.
StakeContractUpdated
Event with signature StakeContractUpdated(address) and selector 0x573bbfa679af6fdcdbd9cf191c5ef3e526599ac2bf75e9177d47adb8530b9c69.
ThresholdUpdated
Event with signature ThresholdUpdated(uint256) and selector 0xadfa8ecb21b6962ebcd0adbd9ab985b7b4c5b5eb3b0dead683171565c7bfe171.
canOperateForCall
Function with signature canOperateFor(address,address) and selector 0xd85ad044.
canOperateForReturn
Container type for the return parameters of the canOperateFor(address,address) function.
constructorCall
Constructor`.
eligibleNftTypeAndRankCall
Function with signature eligibleNftTypeAndRank(uint256) and selector 0xde626c0e.
eligibleNftTypeAndRankReturn
Container type for the return parameters of the eligibleNftTypeAndRank(uint256) function.
maxAllowedRegistrationsCall
Function with signature maxAllowedRegistrations(address) and selector 0xb3544e82.
maxAllowedRegistrationsReturn
Container type for the return parameters of the maxAllowedRegistrations(address) function.
maxRegistrationsPerSpecialNftCall
Function with signature maxRegistrationsPerSpecialNft(uint256) and selector 0xba1cef23.
maxRegistrationsPerSpecialNftReturn
Container type for the return parameters of the maxRegistrationsPerSpecialNft(uint256) function.
ownerAddNftTypeAndRankCall
Function with signature ownerAddNftTypeAndRank(uint256,string) and selector 0x9b97076f.
ownerAddNftTypeAndRankReturn
Container type for the return parameters of the ownerAddNftTypeAndRank(uint256,string) function.
ownerBatchAddNftTypeAndRankCall
Function with signature ownerBatchAddNftTypeAndRank(uint256[],string[]) and selector 0x506472cc.
ownerBatchAddNftTypeAndRankReturn
Container type for the return parameters of the ownerBatchAddNftTypeAndRank(uint256[],string[]) function.
ownerBatchAddSpecialNftTypeAndRankCall
Function with signature ownerBatchAddSpecialNftTypeAndRank(uint256[],string[],uint256[]) and selector 0x6a3b64b6.
ownerBatchAddSpecialNftTypeAndRankReturn
Container type for the return parameters of the ownerBatchAddSpecialNftTypeAndRank(uint256[],string[],uint256[]) function.
ownerBatchRemoveNftTypeAndRankCall
Function with signature ownerBatchRemoveNftTypeAndRank(uint256[],string[]) and selector 0xfb66ac57.
ownerBatchRemoveNftTypeAndRankReturn
Container type for the return parameters of the ownerBatchRemoveNftTypeAndRank(uint256[],string[]) function.
ownerBatchRemoveSpecialNftTypeAndRankCall
Function with signature ownerBatchRemoveSpecialNftTypeAndRank(uint256[],string[]) and selector 0xb05e8ba9.
ownerBatchRemoveSpecialNftTypeAndRankReturn
Container type for the return parameters of the ownerBatchRemoveSpecialNftTypeAndRank(uint256[],string[]) function.
ownerCall
Function with signature owner() and selector 0x8da5cb5b.
ownerRemoveNftTypeAndRankCall
Function with signature ownerRemoveNftTypeAndRank(uint256,string) and selector 0x654251eb.
ownerRemoveNftTypeAndRankReturn
Container type for the return parameters of the ownerRemoveNftTypeAndRank(uint256,string) function.
ownerReturn
Container type for the return parameters of the owner() function.
ownerUpdateThresholdCall
Function with signature ownerUpdateThreshold(uint256) and selector 0xee50c7c4.
ownerUpdateThresholdReturn
Container type for the return parameters of the ownerUpdateThreshold(uint256) function.
renounceOwnershipCall
Function with signature renounceOwnership() and selector 0x715018a6.
renounceOwnershipReturn
Container type for the return parameters of the renounceOwnership() function.
specialNftTypeAndRankCall
Function with signature specialNftTypeAndRank(uint256) and selector 0x2c3ec80b.
specialNftTypeAndRankReturn
Container type for the return parameters of the specialNftTypeAndRank(uint256) function.
stakeContractCall
Function with signature stakeContract() and selector 0x1a186227.
stakeContractReturn
Container type for the return parameters of the stakeContract() function.
stakeThresholdCall
Function with signature stakeThreshold() and selector 0xf11f77f9.
stakeThresholdReturn
Container type for the return parameters of the stakeThreshold() function.
transferOwnershipCall
Function with signature transferOwnership(address) and selector 0xf2fde38b.
transferOwnershipReturn
Container type for the return parameters of the transferOwnership(address) function.
updateStakeContractCall
Function with signature updateStakeContract(address) and selector 0x830c6cc2.
updateStakeContractReturn
Container type for the return parameters of the updateStakeContract(address) function.

Enums§

HoprStakingProxyForNetworkRegistryCalls
Container for all the HoprStakingProxyForNetworkRegistry function calls.
HoprStakingProxyForNetworkRegistryErrors
Container for all the HoprStakingProxyForNetworkRegistry custom errors.
HoprStakingProxyForNetworkRegistryEvents
Container for all the HoprStakingProxyForNetworkRegistry events.

Statics§

BYTECODE
The creation / init bytecode of the contract.
DEPLOYED_BYTECODE
The runtime bytecode of the contract, as deployed on the network.

Functions§

deploy
Deploys this contract using the given provider and constructor arguments, if any.
deploy_builder
Creates a RawCallBuilder for deploying this contract using the given provider and constructor arguments, if any.
new
Creates a new wrapper around an on-chain HoprStakingProxyForNetworkRegistry contract instance.