Module PermissionController

Module PermissionController 

Source
Expand description

Generated by the following Solidity interface…

interface PermissionController {
    error AdminAlreadyPending();
    error AdminAlreadySet();
    error AdminNotPending();
    error AdminNotSet();
    error AppointeeAlreadySet();
    error AppointeeNotSet();
    error CannotHaveZeroAdmins();
    error InvalidShortString();
    error NotAdmin();
    error StringTooLong(string str);

    event AdminRemoved(address indexed account, address admin);
    event AdminSet(address indexed account, address admin);
    event AppointeeRemoved(address indexed account, address indexed appointee, address target, bytes4 selector);
    event AppointeeSet(address indexed account, address indexed appointee, address target, bytes4 selector);
    event Initialized(uint8 version);
    event PendingAdminAdded(address indexed account, address admin);
    event PendingAdminRemoved(address indexed account, address admin);

    constructor(string _version);

    function acceptAdmin(address account) external;
    function addPendingAdmin(address account, address admin) external;
    function canCall(address account, address caller, address target, bytes4 selector) external view returns (bool);
    function getAdmins(address account) external view returns (address[] memory);
    function getAppointeePermissions(address account, address appointee) external view returns (address[] memory, bytes4[] memory);
    function getAppointees(address account, address target, bytes4 selector) external view returns (address[] memory);
    function getPendingAdmins(address account) external view returns (address[] memory);
    function isAdmin(address account, address caller) external view returns (bool);
    function isPendingAdmin(address account, address pendingAdmin) external view returns (bool);
    function removeAdmin(address account, address admin) external;
    function removeAppointee(address account, address appointee, address target, bytes4 selector) external;
    function removePendingAdmin(address account, address admin) external;
    function setAppointee(address account, address appointee, address target, bytes4 selector) external;
    function version() external view returns (string memory);
}

…which was generated by the following JSON ABI:

[
  {
    "type": "constructor",
    "inputs": [
      {
        "name": "_version",
        "type": "string",
        "internalType": "string"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "acceptAdmin",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "addPendingAdmin",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "admin",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "canCall",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "caller",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "target",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "selector",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getAdmins",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "address[]",
        "internalType": "address[]"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getAppointeePermissions",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "appointee",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "address[]",
        "internalType": "address[]"
      },
      {
        "name": "",
        "type": "bytes4[]",
        "internalType": "bytes4[]"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getAppointees",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "target",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "selector",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "address[]",
        "internalType": "address[]"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getPendingAdmins",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "address[]",
        "internalType": "address[]"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "isAdmin",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "caller",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "isPendingAdmin",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "pendingAdmin",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "removeAdmin",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "admin",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "removeAppointee",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "appointee",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "target",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "selector",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "removePendingAdmin",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "admin",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "setAppointee",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "appointee",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "target",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "selector",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "version",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "string",
        "internalType": "string"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "event",
    "name": "AdminRemoved",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "admin",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "AdminSet",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "admin",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "AppointeeRemoved",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "appointee",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "target",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      },
      {
        "name": "selector",
        "type": "bytes4",
        "indexed": false,
        "internalType": "bytes4"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "AppointeeSet",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "appointee",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "target",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      },
      {
        "name": "selector",
        "type": "bytes4",
        "indexed": false,
        "internalType": "bytes4"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "Initialized",
    "inputs": [
      {
        "name": "version",
        "type": "uint8",
        "indexed": false,
        "internalType": "uint8"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "PendingAdminAdded",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "admin",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "PendingAdminRemoved",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "admin",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "error",
    "name": "AdminAlreadyPending",
    "inputs": []
  },
  {
    "type": "error",
    "name": "AdminAlreadySet",
    "inputs": []
  },
  {
    "type": "error",
    "name": "AdminNotPending",
    "inputs": []
  },
  {
    "type": "error",
    "name": "AdminNotSet",
    "inputs": []
  },
  {
    "type": "error",
    "name": "AppointeeAlreadySet",
    "inputs": []
  },
  {
    "type": "error",
    "name": "AppointeeNotSet",
    "inputs": []
  },
  {
    "type": "error",
    "name": "CannotHaveZeroAdmins",
    "inputs": []
  },
  {
    "type": "error",
    "name": "InvalidShortString",
    "inputs": []
  },
  {
    "type": "error",
    "name": "NotAdmin",
    "inputs": []
  },
  {
    "type": "error",
    "name": "StringTooLong",
    "inputs": [
      {
        "name": "str",
        "type": "string",
        "internalType": "string"
      }
    ]
  }
]

Structs§

AdminAlreadyPending
Custom error with signature AdminAlreadyPending() and selector 0x3357dbc6.
AdminAlreadySet
Custom error with signature AdminAlreadySet() and selector 0x980b0728.
AdminNotPending
Custom error with signature AdminNotPending() and selector 0xbed8295f.
AdminNotSet
Custom error with signature AdminNotSet() and selector 0xe2db0360.
AdminRemoved
Event with signature AdminRemoved(address,address) and selector 0xdb9d5d31320daf5bc7181d565b6da4d12e30f0f4d5aa324a992426c14a1d19ce.
AdminSet
Event with signature AdminSet(address,address) and selector 0xbf265e8326285a2747e33e54d5945f7111f2b5edb826eb8c08d4677779b3ff97.
AppointeeAlreadySet
Custom error with signature AppointeeAlreadySet() and selector 0xad8efeb7.
AppointeeNotSet
Custom error with signature AppointeeNotSet() and selector 0x262118cd.
AppointeeRemoved
Event with signature AppointeeRemoved(address,address,address,bytes4) and selector 0x18242326b6b862126970679759169f01f646bd55ec5bfcab85ba9f337a74e0c6.
AppointeeSet
Event with signature AppointeeSet(address,address,address,bytes4) and selector 0x037f03a2ad6b967df4a01779b6d2b4c85950df83925d9e31362b519422fc0169.
CannotHaveZeroAdmins
Custom error with signature CannotHaveZeroAdmins() and selector 0x86744958.
Initialized
Event with signature Initialized(uint8) and selector 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
InvalidShortString
Custom error with signature InvalidShortString() and selector 0xb3512b0c.
NotAdmin
Custom error with signature NotAdmin() and selector 0x7bfa4b9f.
PendingAdminAdded
Event with signature PendingAdminAdded(address,address) and selector 0xb14b9a3d448c5b04f0e5b087b6f5193390db7955482a6ffb841e7b3ba61a460c.
PendingAdminRemoved
Event with signature PendingAdminRemoved(address,address) and selector 0xd706ed7ae044d795b49e54c9f519f663053951011985f663a862cd9ee72a9ac7.
PermissionControllerInstance
A PermissionController instance.
StringTooLong
Custom error with signature StringTooLong(string) and selector 0x305a27a9.
acceptAdminCall
Function with signature acceptAdmin(address) and selector 0x628806ef.
acceptAdminReturn
Container type for the return parameters of the acceptAdmin(address) function.
addPendingAdminCall
Function with signature addPendingAdmin(address,address) and selector 0xeb5a4e87.
addPendingAdminReturn
Container type for the return parameters of the addPendingAdmin(address,address) function.
canCallCall
Function with signature canCall(address,address,address,bytes4) and selector 0xdf595cb8.
canCallReturn
Container type for the return parameters of the canCall(address,address,address,bytes4) function.
constructorCall
Constructor`.
getAdminsCall
Function with signature getAdmins(address) and selector 0xad5f2210.
getAdminsReturn
Container type for the return parameters of the getAdmins(address) function.
getAppointeePermissionsCall
Function with signature getAppointeePermissions(address,address) and selector 0x882a3b38.
getAppointeePermissionsReturn
Container type for the return parameters of the getAppointeePermissions(address,address) function.
getAppointeesCall
Function with signature getAppointees(address,address,bytes4) and selector 0xfddbdefd.
getAppointeesReturn
Container type for the return parameters of the getAppointees(address,address,bytes4) function.
getPendingAdminsCall
Function with signature getPendingAdmins(address) and selector 0x6bddfa1f.
getPendingAdminsReturn
Container type for the return parameters of the getPendingAdmins(address) function.
isAdminCall
Function with signature isAdmin(address,address) and selector 0x91006745.
isAdminReturn
Container type for the return parameters of the isAdmin(address,address) function.
isPendingAdminCall
Function with signature isPendingAdmin(address,address) and selector 0xad8aca77.
isPendingAdminReturn
Container type for the return parameters of the isPendingAdmin(address,address) function.
removeAdminCall
Function with signature removeAdmin(address,address) and selector 0x268959e5.
removeAdminReturn
Container type for the return parameters of the removeAdmin(address,address) function.
removeAppointeeCall
Function with signature removeAppointee(address,address,address,bytes4) and selector 0x06641201.
removeAppointeeReturn
Container type for the return parameters of the removeAppointee(address,address,address,bytes4) function.
removePendingAdminCall
Function with signature removePendingAdmin(address,address) and selector 0x4f906cf9.
removePendingAdminReturn
Container type for the return parameters of the removePendingAdmin(address,address) function.
setAppointeeCall
Function with signature setAppointee(address,address,address,bytes4) and selector 0x950d806e.
setAppointeeReturn
Container type for the return parameters of the setAppointee(address,address,address,bytes4) function.
versionCall
Function with signature version() and selector 0x54fd4d50.
versionReturn
Container type for the return parameters of the version() function.

Enums§

PermissionControllerCalls
Container for all the PermissionController function calls.
PermissionControllerErrors
Container for all the PermissionController custom errors.
PermissionControllerEvents
Container for all the PermissionController 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 PermissionController contract instance.