Module HoprSafeProxyForNetworkRegistry

Source
Expand description

Generated by the following Solidity interface…

interface HoprSafeProxyForNetworkRegistry {
    error SameValue();

    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
    event SnapshotUpdated(uint128 indexed blockNumber);
    event ThresholdUpdated(uint256 indexed threshold);
    event TokenAndRegistryUpdated(address indexed token, address indexed nodeSafeRegistry);

    constructor(address _owner, address _manager, uint256 _stakeThreshold, uint128 _snapshotBlockNumber, address _token, address _nodeSafeRegistry);

    function DEFAULT_ADMIN_ROLE() external view returns (bytes32);
    function MANAGER_ROLE() external view returns (bytes32);
    function canOperateFor(address stakingAccount, address nodeAddress) external view returns (bool eligiblity);
    function getRoleAdmin(bytes32 role) external view returns (bytes32);
    function getRoleMember(bytes32 role, uint256 index) external view returns (address);
    function getRoleMemberCount(bytes32 role) external view returns (uint256);
    function grantRole(bytes32 role, address account) external;
    function hasRole(bytes32 role, address account) external view returns (bool);
    function maxAllowedRegistrations(address safeAddress) external view returns (uint256);
    function nodeSafeRegistry() external view returns (address);
    function renounceRole(bytes32 role, address account) external;
    function revokeRole(bytes32 role, address account) external;
    function snapshotBlockNumber() external view returns (uint128);
    function stakeThreshold() external view returns (uint256);
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
    function token() external view returns (address);
    function updateSnapshotBlockNumber(uint128 newSnapshotBlock) external;
    function updateStakeThreshold(uint256 newThreshold) external;
}

…which was generated by the following JSON ABI:

[
  {
    "type": "constructor",
    "inputs": [
      {
        "name": "_owner",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "_manager",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "_stakeThreshold",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "_snapshotBlockNumber",
        "type": "uint128",
        "internalType": "uint128"
      },
      {
        "name": "_token",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "_nodeSafeRegistry",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "DEFAULT_ADMIN_ROLE",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "MANAGER_ROLE",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "canOperateFor",
    "inputs": [
      {
        "name": "stakingAccount",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "nodeAddress",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "eligiblity",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getRoleAdmin",
    "inputs": [
      {
        "name": "role",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getRoleMember",
    "inputs": [
      {
        "name": "role",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "index",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getRoleMemberCount",
    "inputs": [
      {
        "name": "role",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "grantRole",
    "inputs": [
      {
        "name": "role",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "hasRole",
    "inputs": [
      {
        "name": "role",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "maxAllowedRegistrations",
    "inputs": [
      {
        "name": "safeAddress",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "nodeSafeRegistry",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "contract HoprNodeSafeRegistry"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "renounceRole",
    "inputs": [
      {
        "name": "role",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "revokeRole",
    "inputs": [
      {
        "name": "role",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "snapshotBlockNumber",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint128",
        "internalType": "uint128"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "stakeThreshold",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "supportsInterface",
    "inputs": [
      {
        "name": "interfaceId",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "token",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "contract IERC777Snapshot"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "updateSnapshotBlockNumber",
    "inputs": [
      {
        "name": "newSnapshotBlock",
        "type": "uint128",
        "internalType": "uint128"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "updateStakeThreshold",
    "inputs": [
      {
        "name": "newThreshold",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "event",
    "name": "RoleAdminChanged",
    "inputs": [
      {
        "name": "role",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      },
      {
        "name": "previousAdminRole",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      },
      {
        "name": "newAdminRole",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "RoleGranted",
    "inputs": [
      {
        "name": "role",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      },
      {
        "name": "account",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "sender",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "RoleRevoked",
    "inputs": [
      {
        "name": "role",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      },
      {
        "name": "account",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "sender",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "SnapshotUpdated",
    "inputs": [
      {
        "name": "blockNumber",
        "type": "uint128",
        "indexed": true,
        "internalType": "uint128"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "ThresholdUpdated",
    "inputs": [
      {
        "name": "threshold",
        "type": "uint256",
        "indexed": true,
        "internalType": "uint256"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "TokenAndRegistryUpdated",
    "inputs": [
      {
        "name": "token",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "nodeSafeRegistry",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "error",
    "name": "SameValue",
    "inputs": []
  }
]

Structs§

DEFAULT_ADMIN_ROLECall
Function with signature DEFAULT_ADMIN_ROLE() and selector 0xa217fddf.
DEFAULT_ADMIN_ROLEReturn
Container type for the return parameters of the DEFAULT_ADMIN_ROLE() function.
HoprSafeProxyForNetworkRegistryInstance
A HoprSafeProxyForNetworkRegistry instance.
MANAGER_ROLECall
Function with signature MANAGER_ROLE() and selector 0xec87621c.
MANAGER_ROLEReturn
Container type for the return parameters of the MANAGER_ROLE() function.
RoleAdminChanged
Event with signature RoleAdminChanged(bytes32,bytes32,bytes32) and selector 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff.
RoleGranted
Event with signature RoleGranted(bytes32,address,address) and selector 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d.
RoleRevoked
Event with signature RoleRevoked(bytes32,address,address) and selector 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b.
SameValue
Custom error with signature SameValue() and selector 0xc23f6ccb.
SnapshotUpdated
Event with signature SnapshotUpdated(uint128) and selector 0xaf1d1599b5c7da9a2004b57ac14784199718a90364ae47f27ac894926f0655fc.
ThresholdUpdated
Event with signature ThresholdUpdated(uint256) and selector 0xadfa8ecb21b6962ebcd0adbd9ab985b7b4c5b5eb3b0dead683171565c7bfe171.
TokenAndRegistryUpdated
Event with signature TokenAndRegistryUpdated(address,address) and selector 0x77b9cb4f87feab1ebd814bb694b7d514ee2dc1f0abd4c3957f46829c2e249dff.
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`.
getRoleAdminCall
Function with signature getRoleAdmin(bytes32) and selector 0x248a9ca3.
getRoleAdminReturn
Container type for the return parameters of the getRoleAdmin(bytes32) function.
getRoleMemberCall
Function with signature getRoleMember(bytes32,uint256) and selector 0x9010d07c.
getRoleMemberCountCall
Function with signature getRoleMemberCount(bytes32) and selector 0xca15c873.
getRoleMemberCountReturn
Container type for the return parameters of the getRoleMemberCount(bytes32) function.
getRoleMemberReturn
Container type for the return parameters of the getRoleMember(bytes32,uint256) function.
grantRoleCall
Function with signature grantRole(bytes32,address) and selector 0x2f2ff15d.
grantRoleReturn
Container type for the return parameters of the grantRole(bytes32,address) function.
hasRoleCall
Function with signature hasRole(bytes32,address) and selector 0x91d14854.
hasRoleReturn
Container type for the return parameters of the hasRole(bytes32,address) function.
maxAllowedRegistrationsCall
Function with signature maxAllowedRegistrations(address) and selector 0xb3544e82.
maxAllowedRegistrationsReturn
Container type for the return parameters of the maxAllowedRegistrations(address) function.
nodeSafeRegistryCall
Function with signature nodeSafeRegistry() and selector 0x6a4a4041.
nodeSafeRegistryReturn
Container type for the return parameters of the nodeSafeRegistry() function.
renounceRoleCall
Function with signature renounceRole(bytes32,address) and selector 0x36568abe.
renounceRoleReturn
Container type for the return parameters of the renounceRole(bytes32,address) function.
revokeRoleCall
Function with signature revokeRole(bytes32,address) and selector 0xd547741f.
revokeRoleReturn
Container type for the return parameters of the revokeRole(bytes32,address) function.
snapshotBlockNumberCall
Function with signature snapshotBlockNumber() and selector 0xf25e7108.
snapshotBlockNumberReturn
Container type for the return parameters of the snapshotBlockNumber() function.
stakeThresholdCall
Function with signature stakeThreshold() and selector 0xf11f77f9.
stakeThresholdReturn
Container type for the return parameters of the stakeThreshold() function.
supportsInterfaceCall
Function with signature supportsInterface(bytes4) and selector 0x01ffc9a7.
supportsInterfaceReturn
Container type for the return parameters of the supportsInterface(bytes4) function.
tokenCall
Function with signature token() and selector 0xfc0c546a.
tokenReturn
Container type for the return parameters of the token() function.
updateSnapshotBlockNumberCall
Function with signature updateSnapshotBlockNumber(uint128) and selector 0x5abe5308.
updateSnapshotBlockNumberReturn
Container type for the return parameters of the updateSnapshotBlockNumber(uint128) function.
updateStakeThresholdCall
Function with signature updateStakeThreshold(uint256) and selector 0x5ef53329.
updateStakeThresholdReturn
Container type for the return parameters of the updateStakeThreshold(uint256) function.

Enums§

HoprSafeProxyForNetworkRegistryCalls
Container for all the HoprSafeProxyForNetworkRegistry function calls.
HoprSafeProxyForNetworkRegistryErrors
Container for all the HoprSafeProxyForNetworkRegistry custom errors.
HoprSafeProxyForNetworkRegistryEvents
Container for all the HoprSafeProxyForNetworkRegistry 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 HoprSafeProxyForNetworkRegistry contract instance.