Create delegation
Esta página aún no está disponible en tu idioma.
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.