Permissions
PermissionClient
Methods
- setPermission
setPermission
Sets the permission for a specific function call
Each policy is represented as a mapping from an IP account address to a signer address to a recipient
address to a function selector to a permission level. The permission level can be 0 (ABSTAIN), 1 (ALLOW), or
2 (DENY).
By default, all policies are set to 0 (ABSTAIN), which means that the permission is not set.
The owner of ipAccount by default has all permission.
address(0) => wildcard
bytes4(0) => wildcard
Specific permission overrides wildcard permission.
Method | Type |
---|---|
setPermission | (request: setPermissionsRequest) => Promise<setPermissionsResponse> |
Parameters:
request
: The request object containing necessary data to set permissions.request.ipAsset
: The address of the IP account that grants the permission forsigner
request.signer
: The address that can callto
on behalf of theipAccount
request.to
: The address that can be called by thesigner
(currently only modules can beto
)request.func
: The function selector string ofto
that can be called by thesigner
on behalf of theipAccount
request.permission
: The new permission level
Updated 6 days ago