UNPKG

@q-dev/gdk-sdk

Version:

Typescript Library to interact with GDK Contracts

422 lines (421 loc) 8.35 kB
[ { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "string", "name": "role", "type": "string" }, { "indexed": false, "internalType": "string", "name": "resource", "type": "string" }, { "indexed": false, "internalType": "string[]", "name": "permissionsToAdd", "type": "string[]" }, { "indexed": false, "internalType": "bool", "name": "allowed", "type": "bool" } ], "name": "AddedPermissions", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "string[]", "name": "rolesToGrant", "type": "string[]" } ], "name": "GrantedRoles", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint8", "name": "version", "type": "uint8" } ], "name": "Initialized", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "string", "name": "role", "type": "string" }, { "indexed": false, "internalType": "string", "name": "resource", "type": "string" }, { "indexed": false, "internalType": "string[]", "name": "permissionsToRemove", "type": "string[]" }, { "indexed": false, "internalType": "bool", "name": "allowed", "type": "bool" } ], "name": "RemovedPermissions", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "from", "type": "address" }, { "indexed": false, "internalType": "string[]", "name": "rolesToRevoke", "type": "string[]" } ], "name": "RevokedRoles", "type": "event" }, { "inputs": [], "name": "ALL_PERMISSION", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "ALL_RESOURCE", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "CREATE_PERMISSION", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "DELETE_PERMISSION", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MASTER_ROLE", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "RBAC_RESOURCE", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "READ_PERMISSION", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "UPDATE_PERMISSION", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "role_", "type": "string" }, { "components": [ { "internalType": "string", "name": "resource", "type": "string" }, { "internalType": "string[]", "name": "permissions", "type": "string[]" } ], "internalType": "struct IRBAC.ResourceWithPermissions[]", "name": "permissionsToAdd_", "type": "tuple[]" }, { "internalType": "bool", "name": "allowed_", "type": "bool" } ], "name": "addPermissionsToRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "role_", "type": "string" } ], "name": "getRolePermissions", "outputs": [ { "components": [ { "internalType": "string", "name": "resource", "type": "string" }, { "internalType": "string[]", "name": "permissions", "type": "string[]" } ], "internalType": "struct IRBAC.ResourceWithPermissions[]", "name": "allowed_", "type": "tuple[]" }, { "components": [ { "internalType": "string", "name": "resource", "type": "string" }, { "internalType": "string[]", "name": "permissions", "type": "string[]" } ], "internalType": "struct IRBAC.ResourceWithPermissions[]", "name": "disallowed_", "type": "tuple[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "who_", "type": "address" } ], "name": "getUserRoles", "outputs": [ { "internalType": "string[]", "name": "roles_", "type": "string[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "to_", "type": "address" }, { "internalType": "string[]", "name": "rolesToGrant_", "type": "string[]" } ], "name": "grantRoles", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "who_", "type": "address" }, { "internalType": "string", "name": "resource_", "type": "string" }, { "internalType": "string", "name": "permission_", "type": "string" } ], "name": "hasPermission", "outputs": [ { "internalType": "bool", "name": "isAllowed_", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "role_", "type": "string" }, { "components": [ { "internalType": "string", "name": "resource", "type": "string" }, { "internalType": "string[]", "name": "permissions", "type": "string[]" } ], "internalType": "struct IRBAC.ResourceWithPermissions[]", "name": "permissionsToRemove_", "type": "tuple[]" }, { "internalType": "bool", "name": "allowed_", "type": "bool" } ], "name": "removePermissionsFromRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "from_", "type": "address" }, { "internalType": "string[]", "name": "rolesToRevoke_", "type": "string[]" } ], "name": "revokeRoles", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ]