Skip to main content

Deploying Transferable Record Registry

The token registry is a smart contract on the Ethereum network that records the ownership information of a transferable record. It is compliant to the ERC721 standards.

In this guide, we will deploy a token registry smart contract on the Ethereum goerli network which is a test network that does not require actual ethers for transactions.

Pre-requisite

Deploying via OpenAttestation CLI

Creating the key file

Create a file key.txt with the private key of your Ethereum wallet and save it in your working directory. If you are using Metamask, you may retrieve this key from the extension in this guide.

Sample key.txt file content (replace with your private key):

d8f30c982fc23245a2cc4ec8271edcb4637f539d490ce750cdb5085241ffb41c

Do not share this file with anyone else!

Deploying the token registry

Simply run the following command. You may replace the <registry-name> and <registry-symbol> with a suitable name and symbol (usually 3 characters).

open-attestation deploy token-registry "My Token Registry" MTR -n goerli -f key.txt

This will deploy the token registry on the goerli network. You should see a similar output when the deployment is successful:

ℹ  info      Deploying token registry My Token Registry
… awaiting Sending transaction to pool
… awaiting Waiting for transaction 0x7e3eea01c42bb10b3160f19c9f55fe3de24ed05abb9d6f4363c80c0d0f1be355 to be mined
✔ success Token registry deployed at 0x8431012Bc040942B59e3C5bf428221eab0b2f723
ℹ info Find more details at https://goerli.etherscan.io/address/0x8431012Bc040942B59e3C5bf428221eab0b2f723

In this case, our contract has been successfully deployed on goerli at the address 0x8431012Bc040942B59e3C5bf428221eab0b2f723.

Save YOUR token registry address for future reference