Minting of the Document (CLI)
For the current step, you can either opt to use the CLI or Code.
In this final step, we will mint the transferable record and initialize the first owner and holder for the title escrow.
Prerequisite
You will require the following:
- token registry address
- wallet private key file (key.txt)
- merkle root of the wrapped transferable record
Minting a Transferable Record
In the example, we will use 0x6FFeD6E6591b808130a9b248fEA32101b5220eca
wallet address as the initial owner and holder. You will need to replace this value with a wallet address you control to be able to perform different actions on the transferable records later.
To mint the transferable record, simply run the following command:
tradetrust token-registry mint --address 0x8431012Bc040942B59e3C5bf428221eab0b2f723 --tokenId 0x0d9839a8034cb783d98bd57bcbaafb4dc3614c4193d2edf8a655c1ec6635b7ea --beneficiary 0x6FFeD6E6591b808130a9b248fEA32101b5220eca --holder 0x6FFeD6E6591b808130a9b248fEA32101b5220eca --network sepolia -f key.txt
Note to replace the following values:
- --address:
0x8431012Bc040942B59e3C5bf428221eab0b2f723
with your token registry contract address - --tokenId:
0x0d9839a8034cb783d98bd57bcbaafb4dc3614c4193d2edf8a655c1ec6635b7ea
with your merkle root (with a0x
prefix) - --beneficiary:
0x6FFeD6E6591b808130a9b248fEA32101b5220eca
with your owner wallet addresses - --holder:
0x6FFeD6E6591b808130a9b248fEA32101b5220eca
with your holder wallet addresses
Once the document has been minted, you will be able to see an output similar to the following:
ℹ info Issuing 0x0d9839a8034cb783d98bd57bcbaafb4dc3614c4193d2edf8a655c1ec6635b7ea to the initial recipient 0x6FFeD6E6591b808130a9b248fEA32101b5220eca and initial holder 0x6FFeD6E6591b808130a9b248fEA32101b5220eca in the registry 0x1E63411DC2fCd6Fab5EE938622f5f6A390F48272
… awaiting Sending transaction to pool
… awaiting Waiting for transaction 0xaff547d8f608ca17c4c33acef1788ee0b0cc177abb1efcb868250dbecdde46cf to be mined
✔ success Token with hash 0x0d9839a8034cb783d98bd57bcbaafb4dc3614c4193d2edf8a655c1ec6635b7ea has been issued on 0x1E63411DC2fCd6Fab5EE938622f5f6A390F48272 with the initial recipient being 0x6FFeD6E6591b808130a9b248fEA32101b5220eca and initial holder 0x6FFeD6E6591b808130a9b248fEA32101b5220eca
ℹ info Find more details at https://sepolia.etherscan.io/tx/0xaff547d8f608ca17c4c33acef1788ee0b0cc177abb1efcb868250dbecdde46cf
🎉 Congratulations, you have completed the getting started guide and minted your first transferable record.
Verifying your transferable record
To verify your transferable record, simply head over the https://dev.tradetrust.io/verify. You will be able to drop your transferable record (found in wrapped-documents
folder from the previous steps) into the dropzone and see something similar to the following:
Notice you are able to click on Connect Wallet
when logged in to either the owner or holder to gain access to actions to change the ownership and holdership of the transferable record.