Assign an NFT for a provenance claim through a registrar
Esta página aún no está disponible en tu idioma.
The process for assigning an NFT to a provenance claim through a registrar consists of two major steps:
-
Have the originator create a delegation for the registrar. This permission can either be specific (
assignNft
), or general (the empty string).Loading graph...
graph TB Bill@{ shape: rounded } Registry@{ shape: rounded, label: "Delegation Registry"} RobertRegistar@{ shape: rounded, label: "Robert Registrar" } Bill --->|Let Robert Registry act in my name| Registry
-
The registrar calls the
assignNft
function 🔗, using these steps:Loading graph...
graph TB Bill@{ shape: rounded } DeleRegistry@{ shape: rounded, label: "Delegation Registry"} IdRegistry@{ shape: rounded, label: "Identity Registry"} RobertRegistrar@{ shape: rounded, label: "Robert Registrar" } Gateway@{ shape: rounded, label: "Provenance Gateway" } ProvRegistry@{ shape: rounded, label: "Provenance Registry" } RobertRegistrar ==> |2 Assign NFT for Bill's existing Provenance Claim| Gateway Gateway --> |3a Is this OK?| IdRegistry IdRegistry --> |3b Is this OK?| DeleRegistry DeleRegistry --> |3c Yes| IdRegistry IdRegistry --> |3d Yes| Gateway Gateway ==> |4 Assign NFT for Bill's existing Provenance Claim| ProvRegistry
-
The registrar decides to assign an NFT to an existing provenance claim. In most cases, the registrar would need to create a new NFT with the correct metadata first.
-
The registrar sends a transaction to the
assignNft
function 🔗. This transaction includes the provenance claim’s ID as well as the NFT contract and token ID. -
The
assignNft
function 🔗 verifies that the registrar is delegated the right to register content by the originator. This check goes through theIdRegistry
’scanAct
function 🔗, which uses theDelegateRegistry
’scheckDelegateForContract
function 🔗. -
The
ProvenanceGateway
’sassignNft
function calls theProvenanceRegistry
’sassignNft
function 🔗 -
That
assignNft
function 🔗 runs more checks and then registers the provenance claim.
-
Step by step directions
-
As a user, create a delegation to another Royal ID whose private key you know.
-
Set up environment variables.
Variable Meaning How to get it PRIVATE_KEY Your registrar private key You can usually get it from the wallet CLAIM_ID The ID for your provenance claim Use the indexer 🔗 NFT_ADDR The address of your NFT contract TOKEN_ID The token ID of your NFT within that contract -
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 assigned NFT.