Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

Commit

Permalink
docs: remove documentation for standalone token registry deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
MinHtet-O committed Jul 8, 2024
1 parent 7139bff commit 30b886e
Showing 1 changed file with 1 addition and 33 deletions.
34 changes: 1 addition & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ isRevokedBefore

#### Deploying Token Registry

This example provides how to deploy TradeTrust standard token-registry for [transferrable records](https://docs.tradetrust.io/docs/tutorial/transferable-records/overview/). It requires less gas compared to [standalone deployment](#deploying-standalone-token-registry), as it uses deployer and implementation addresses for deployment. Replace the values for `<your_private_key>` and `<your_provider_url>` with your wallet private key and the JSON RPC url for desired network accordingly. Currently, it supports the following networks.
This example provides how to deploy TradeTrust token-registry for [transferrable records](https://docs.tradetrust.io/docs/tutorial/transferable-records/overview/). Replace the values for `<your_private_key>` and `<your_provider_url>` with your wallet private key and the JSON RPC url for desired network accordingly. Currently, it supports the following networks.

- ethereum
- sepolia
Expand Down Expand Up @@ -211,38 +211,6 @@ async function start() {
start()
```

#### Deploying Standalone Token Registry

This example provides how to deploy TradeTrust standalone token-registry for [transferrable records](https://docs.tradetrust.io/docs/tutorial/transferable-records/overview/). Replace the values for `<your_private_key>` and `<your_provider_url>` with your wallet private key and the JSON RPC url for desired network accordingly. It works on all the [supported networks](https://docs.tradetrust.io/docs/topics/introduction/supported-network/#tradetrust-supported-networks).

```ts
import {
TradeTrustToken__factory,
TOKEN_REG_CONSTS,
} from '@tradetrust-tt/tradetrust-core'
import { Wallet, ethers } from 'ethers'

async function start() {
const unconnectedWallet = new Wallet('<your_private_key>')
const provider = new ethers.providers.JsonRpcProvider('<your_provider_url>')
const wallet = unconnectedWallet.connect(provider)
const tokenFactory = new TradeTrustToken__factory(wallet)
const CHAIN_ID = await wallet.getChainId()
// get the title escrow factory address for each network
const TitleEscrowFactory =
TOKEN_REG_CONSTS.contractAddress.TitleEscrowFactory[CHAIN_ID]
const tokenRegistry = await tokenFactory.deploy(
'DemoTokenRegistry',
'DTR',
TitleEscrowFactory
)
const registryAddress = tokenRegistry.address
// new standalone token registry contract address
console.log(registryAddress)
}
start()
```

#### Wrapping and Minting of Transferrable Record

This example provides how to wrap the [raw transferrable document](https://docs.tradetrust.io/docs/tutorial/transferable-records/raw-document) and mint the tradetrust token for [transferrable record](https://docs.tradetrust.io/docs/tutorial/transferable-records/overview/) using the existing token registry address. Replace the place holders `<your_private_key>`, `<your_provider_url>`, `<token_registry_address>`, `<beneficiary_address>` and `<holder_address>` accordingly. After successfully minted, transaction hash will be displayed and the `wrappedDocument` should be successfully [verified](#verifying).
Expand Down

0 comments on commit 30b886e

Please sign in to comment.