ADMIN and MANAGER. These roles can be accessed through the Roles enum:
- The
MANAGERrole allows an address to manage funds within the budget and deploy boosts using available funds. - The
ADMINrole allows an address to grant and revoke roles on the budget as well as manage available funds.
API
grantRoles
Grants access control roles to an address.
ADMIN and MANAGER roles at once:
Parameters
Optional parameters to pass to the underlying
writeContract method. Checkout wagmi’s documentation for more information. address, args, functionName, abi are handled for you under the hood.Returns
grantManyRoles
Grants access control roles to multiple addresses. The roles array must match the addresses array in length and order.
Parameters
Optional parameters to pass to the underlying
writeContract method. Checkout wagmi’s documentation for more information. address, args, functionName, abi are handled for you under the hood.Returns
revokeRoles
Revokes access control roles from an address.
ADMIN and MANAGER roles at once:
Parameters
Optional parameters to pass to the underlying
writeContract method. Checkout wagmi’s documentation for more information. address, args, functionName, abi are handled for you under the hood.Returns
revokeManyRoles
Revokes access control roles from multiple addresses. The roles array must match the addresses array in length and order.
Parameters
Optional parameters to pass to the underlying
writeContract method. Checkout wagmi’s documentation for more information. address, args, functionName, abi are handled for you under the hood.Returns
setAuthorized
Grants or revokes the MANAGER role for multiple addresses. The authorized values array must match the addresses array in length and order.
Parameters
Optional parameters to pass to the underlying
writeContract method. Checkout wagmi’s documentation for more information. address, args, functionName, abi are handled for you under the hood.Returns
isAuthorized
Checks if an address is authorized to manage the budget. Returns true if the address is authorized, otherwise false.
Parameters
Optional parameters to pass to the underlying
readContract method. Checkout wagmi’s documentation for more information. address, args, functionName, abi are handled for you under the hood.Returns
hasAllRoles
Checks if an address has all the roles specified. Returns true if the address has all the roles, otherwise false.
Parameters
Optional parameters to pass to the underlying
readContract method. Checkout wagmi’s documentation for more information. address, args, functionName, abi are handled for you under the hood.Returns
hasAnyRole
Checks if an address has at least one of the roles specified. Returns true if the address has at least one of the roles, otherwise false.
Parameters
Optional parameters to pass to the underlying
readContract method. Checkout wagmi’s documentation for more information. address, args, functionName, abi are handled for you under the hood.Returns
Returns
true if the address has at least one of the specified roles, otherwise false.rolesOf
Returns the an array of roles for a given address. Returns an empty array if the address has no roles.
1n = Roles.MANAGER, 2n = Roles.ADMIN
Parameters
Optional parameters to pass to the underlying
readContract method. Checkout wagmi’s documentation for more information. address, args, functionName, abi are handled for you under the hood.Returns
owner
Returns the budget owner’s address.
Parameters
Optional parameters to pass to the underlying
readContract method. Checkout wagmi’s documentation for more information. address, args, functionName, abi are handled for you under the hood.