Create delegation
To create a delegation, the user (or another entity acting on the userโs behalf) calls one of the delegation functions. The same functions are also called to remove delegations.
Function | Interface | Implementation |
---|---|---|
delegateAll | ๐ | ๐ |
delegateAllFor | ๐ | ๐ |
delegateContract | ๐ | ๐ |
delegateContractFor | ๐ | ๐ |
Step by step directions
-
Set up environment variables.
Variable Meaning How to get it PRIVATE_KEY Your private key You can usually get it from the wallet REGISTRAR_ID The Royal ID of the registry If you know the registryโs address, use this function ๐ -
If necessary, install Foundry ๐.
-
Run these commands to use the
cast
command ๐. -
When you get the transaction hash, you can use a block explorer ๐ to see the log entry with your delegation. Alternatively, you can use this function ๐ with the registrarโs ID to see your delegation.