Module HoprCapabilityPermissions

Source
Expand description

Generated by the following Solidity interface…

interface HoprCapabilityPermissions {
    type GranularPermission is uint8;
    type Target is uint256;

    error AddressIsZero();
    error ArrayTooLong();
    error ArraysDifferentLength();
    error CalldataOutOfBounds();
    error DefaultPermissionRejected();
    error DelegateCallNotAllowed();
    error FunctionSignatureTooShort();
    error GranularPermissionRejected();
    error NoMembership();
    error NodePermissionRejected();
    error ParameterNotAllowed();
    error PermissionNotConfigured();
    error SendNotAllowed();
    error TargetAddressNotAllowed();
    error TargetIsNotScoped();
    error TargetIsScoped();
    error UnacceptableMultiSendOffset();

    event RevokedTarget(address indexed targetAddress);
    event ScopedGranularChannelCapability(address indexed targetAddress, bytes32 indexed channelId, bytes4 selector, GranularPermission permission);
    event ScopedGranularSendCapability(address indexed nodeAddress, address indexed recipientAddress, GranularPermission permission);
    event ScopedGranularTokenCapability(address indexed nodeAddress, address indexed targetAddress, address indexed recipientAddress, bytes4 selector, GranularPermission permission);
    event ScopedTargetChannels(address indexed targetAddress, Target target);
    event ScopedTargetSend(address indexed targetAddress, Target target);
    event ScopedTargetToken(address indexed targetAddress, Target target);

    function APPROVE_SELECTOR() external view returns (bytes4);
    function CLOSE_INCOMING_CHANNEL_SELECTOR() external view returns (bytes4);
    function FINALIZE_OUTGOING_CHANNEL_CLOSURE_SELECTOR() external view returns (bytes4);
    function FUND_CHANNEL_SELECTOR() external view returns (bytes4);
    function INITIATE_OUTGOING_CHANNEL_CLOSURE_SELECTOR() external view returns (bytes4);
    function REDEEM_TICKET_SELECTOR() external view returns (bytes4);
    function SEND_SELECTOR() external view returns (bytes4);
}

…which was generated by the following JSON ABI:

[
  {
    "type": "function",
    "name": "APPROVE_SELECTOR",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "CLOSE_INCOMING_CHANNEL_SELECTOR",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "FINALIZE_OUTGOING_CHANNEL_CLOSURE_SELECTOR",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "FUND_CHANNEL_SELECTOR",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "INITIATE_OUTGOING_CHANNEL_CLOSURE_SELECTOR",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "REDEEM_TICKET_SELECTOR",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "SEND_SELECTOR",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "event",
    "name": "RevokedTarget",
    "inputs": [
      {
        "name": "targetAddress",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "ScopedGranularChannelCapability",
    "inputs": [
      {
        "name": "targetAddress",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "channelId",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      },
      {
        "name": "selector",
        "type": "bytes4",
        "indexed": false,
        "internalType": "bytes4"
      },
      {
        "name": "permission",
        "type": "uint8",
        "indexed": false,
        "internalType": "enum GranularPermission"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "ScopedGranularSendCapability",
    "inputs": [
      {
        "name": "nodeAddress",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "recipientAddress",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "permission",
        "type": "uint8",
        "indexed": false,
        "internalType": "enum GranularPermission"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "ScopedGranularTokenCapability",
    "inputs": [
      {
        "name": "nodeAddress",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "targetAddress",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "recipientAddress",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "selector",
        "type": "bytes4",
        "indexed": false,
        "internalType": "bytes4"
      },
      {
        "name": "permission",
        "type": "uint8",
        "indexed": false,
        "internalType": "enum GranularPermission"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "ScopedTargetChannels",
    "inputs": [
      {
        "name": "targetAddress",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "target",
        "type": "uint256",
        "indexed": false,
        "internalType": "Target"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "ScopedTargetSend",
    "inputs": [
      {
        "name": "targetAddress",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "target",
        "type": "uint256",
        "indexed": false,
        "internalType": "Target"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "ScopedTargetToken",
    "inputs": [
      {
        "name": "targetAddress",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "target",
        "type": "uint256",
        "indexed": false,
        "internalType": "Target"
      }
    ],
    "anonymous": false
  },
  {
    "type": "error",
    "name": "AddressIsZero",
    "inputs": []
  },
  {
    "type": "error",
    "name": "ArrayTooLong",
    "inputs": []
  },
  {
    "type": "error",
    "name": "ArraysDifferentLength",
    "inputs": []
  },
  {
    "type": "error",
    "name": "CalldataOutOfBounds",
    "inputs": []
  },
  {
    "type": "error",
    "name": "DefaultPermissionRejected",
    "inputs": []
  },
  {
    "type": "error",
    "name": "DelegateCallNotAllowed",
    "inputs": []
  },
  {
    "type": "error",
    "name": "FunctionSignatureTooShort",
    "inputs": []
  },
  {
    "type": "error",
    "name": "GranularPermissionRejected",
    "inputs": []
  },
  {
    "type": "error",
    "name": "NoMembership",
    "inputs": []
  },
  {
    "type": "error",
    "name": "NodePermissionRejected",
    "inputs": []
  },
  {
    "type": "error",
    "name": "ParameterNotAllowed",
    "inputs": []
  },
  {
    "type": "error",
    "name": "PermissionNotConfigured",
    "inputs": []
  },
  {
    "type": "error",
    "name": "SendNotAllowed",
    "inputs": []
  },
  {
    "type": "error",
    "name": "TargetAddressNotAllowed",
    "inputs": []
  },
  {
    "type": "error",
    "name": "TargetIsNotScoped",
    "inputs": []
  },
  {
    "type": "error",
    "name": "TargetIsScoped",
    "inputs": []
  },
  {
    "type": "error",
    "name": "UnacceptableMultiSendOffset",
    "inputs": []
  }
]

Structs§

APPROVE_SELECTORCall
Function with signature APPROVE_SELECTOR() and selector 0xa0865839.
APPROVE_SELECTORReturn
Container type for the return parameters of the APPROVE_SELECTOR() function.
AddressIsZero
Custom error with signature AddressIsZero() and selector 0x867915ab.
ArrayTooLong
Custom error with signature ArrayTooLong() and selector 0xbd26cc38.
ArraysDifferentLength
Custom error with signature ArraysDifferentLength() and selector 0x74f4d537.
CLOSE_INCOMING_CHANNEL_SELECTORCall
Function with signature CLOSE_INCOMING_CHANNEL_SELECTOR() and selector 0x678a5efb.
CLOSE_INCOMING_CHANNEL_SELECTORReturn
Container type for the return parameters of the CLOSE_INCOMING_CHANNEL_SELECTOR() function.
CalldataOutOfBounds
Custom error with signature CalldataOutOfBounds() and selector 0x742638b4.
DefaultPermissionRejected
Custom error with signature DefaultPermissionRejected() and selector 0x58723037.
DelegateCallNotAllowed
Custom error with signature DelegateCallNotAllowed() and selector 0x0d89438e.
FINALIZE_OUTGOING_CHANNEL_CLOSURE_SELECTORCall
Function with signature FINALIZE_OUTGOING_CHANNEL_CLOSURE_SELECTOR() and selector 0x8167b67e.
FINALIZE_OUTGOING_CHANNEL_CLOSURE_SELECTORReturn
Container type for the return parameters of the FINALIZE_OUTGOING_CHANNEL_CLOSURE_SELECTOR() function.
FUND_CHANNEL_SELECTORCall
Function with signature FUND_CHANNEL_SELECTOR() and selector 0xb677a40f.
FUND_CHANNEL_SELECTORReturn
Container type for the return parameters of the FUND_CHANNEL_SELECTOR() function.
FunctionSignatureTooShort
Custom error with signature FunctionSignatureTooShort() and selector 0x4684c122.
GranularPermission
GranularPermissionRejected
Custom error with signature GranularPermissionRejected() and selector 0x864dd1e7.
HoprCapabilityPermissionsInstance
A HoprCapabilityPermissions instance.
INITIATE_OUTGOING_CHANNEL_CLOSURE_SELECTORCall
Function with signature INITIATE_OUTGOING_CHANNEL_CLOSURE_SELECTOR() and selector 0x5daa9e24.
INITIATE_OUTGOING_CHANNEL_CLOSURE_SELECTORReturn
Container type for the return parameters of the INITIATE_OUTGOING_CHANNEL_CLOSURE_SELECTOR() function.
NoMembership
Custom error with signature NoMembership() and selector 0xfd8e9f28.
NodePermissionRejected
Custom error with signature NodePermissionRejected() and selector 0x6eb0315f.
ParameterNotAllowed
Custom error with signature ParameterNotAllowed() and selector 0x31e98246.
PermissionNotConfigured
Custom error with signature PermissionNotConfigured() and selector 0x46ad4588.
REDEEM_TICKET_SELECTORCall
Function with signature REDEEM_TICKET_SELECTOR() and selector 0x51d2614b.
REDEEM_TICKET_SELECTORReturn
Container type for the return parameters of the REDEEM_TICKET_SELECTOR() function.
RevokedTarget
Event with signature RevokedTarget(address) and selector 0x0dfce1ea4ba1eeba891ffb2a066790fbc293a9e517fe61d49d156a30165f93f3.
SEND_SELECTORCall
Function with signature SEND_SELECTOR() and selector 0x7a757115.
SEND_SELECTORReturn
Container type for the return parameters of the SEND_SELECTOR() function.
ScopedGranularChannelCapability
Event with signature ScopedGranularChannelCapability(address,bytes32,bytes4,uint8) and selector 0xf2ffd4f09d58d06824188033d3318d06eb957bfb1a8ffed9af78e1f19168b904.
ScopedGranularSendCapability
Event with signature ScopedGranularSendCapability(address,address,uint8) and selector 0x7487530ddff120799505e52b1b19b6933f85a9eeae9220c80a7ad7c429b612ae.
ScopedGranularTokenCapability
Event with signature ScopedGranularTokenCapability(address,address,address,bytes4,uint8) and selector 0xa3df710420b01cc30ff300309abbc7fadd4630d4ab385b0f5a126fb4babe762b.
ScopedTargetChannels
Event with signature ScopedTargetChannels(address,uint256) and selector 0x5ffb06b0b0e8ad6a8f3c5831d499dfa612d9c9d4dc107bbd66f18f61a6492e71.
ScopedTargetSend
Event with signature ScopedTargetSend(address,uint256) and selector 0x1ee2791f2caf0e92a9dc32a37a9ea53ab6ac7a6fb8f2d090e53a067d3a43f6ac.
ScopedTargetToken
Event with signature ScopedTargetToken(address,uint256) and selector 0xaaf26bb12aa89ee96bbe19667a6a055727b75d3f6ed7b8b611ef6519180209d6.
SendNotAllowed
Custom error with signature SendNotAllowed() and selector 0x09e9cd49.
Target
TargetAddressNotAllowed
Custom error with signature TargetAddressNotAllowed() and selector 0xef3440ac.
TargetIsNotScoped
Custom error with signature TargetIsNotScoped() and selector 0x4a890321.
TargetIsScoped
Custom error with signature TargetIsScoped() and selector 0xe8c07d2a.
UnacceptableMultiSendOffset
Custom error with signature UnacceptableMultiSendOffset() and selector 0x7ed11137.

Enums§

HoprCapabilityPermissionsCalls
Container for all the HoprCapabilityPermissions function calls.
HoprCapabilityPermissionsErrors
Container for all the HoprCapabilityPermissions custom errors.
HoprCapabilityPermissionsEvents
Container for all the HoprCapabilityPermissions 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 HoprCapabilityPermissions contract instance.