Skip to content
This repository was archived by the owner on Oct 1, 2025. It is now read-only.

Commit f3ef78f

Browse files
authored
docs: remove chain managers in readme (#64)
1 parent 247d506 commit f3ef78f

File tree

1 file changed

+17
-87
lines changed

1 file changed

+17
-87
lines changed

README.md

Lines changed: 17 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -96,112 +96,42 @@ signerFromMnemonic.connect(provider);
9696
Hardhat is used to manage the contract development environment and deployment.
9797
This repository provides a couple of Hardhat tasks to simplify the deployment process.
9898

99-
Instead of combining the deployment of the token contracts and chain managers into a single Hardhat task, the deployment is split into smaller tasks so that any one of these individual tasks can be run on its own when needed.
100-
For instance, one may prefer to deploy the token contracts without the chain managers first.
101-
102-
> 💡 The configurations of the network and accounts are in `hardhat.config.ts`.
103-
> The deployer will be the first account of the network.
104-
10599
## Token Contract
106100
Deploying the token contract.
107101
```
108-
Usage: hardhat [GLOBAL OPTIONS] deploy:token [--chain <STRING>] [--mintable] --name <STRING> --symbol <STRING> [--verify]
102+
Usage: hardhat [GLOBAL OPTIONS] deploy:token --network <STRING> --name <STRING> --symbol <STRING> [--verify]
109103
110104
OPTIONS:
111105
112-
--chain Chain ('ethereum' or 'polygon') to deploy token (default: "ethereum")
113-
--mintable Mintability of the token
106+
--network Name of network
114107
--name Name of the token
115108
--symbol Symbol of token
116109
--verify Verify on Etherscan
117110
118111
deploy:token: Deploys the TradeTrustERC721 token
119112
```
120-
> 💡 Note that the `--chain` argument is optional. If not provided, the default chain will always be the root chain, `ethereum`.
121-
> The `--mintable` and `--verify` flags are optional.
122-
123-
> 💡 The `--mintable` flag specifies whether a token is mintable on L2, for example, Polygon.
124-
> If the intention is to mint the tokens on L1, the `--mintable` flag is not necessary.
125-
126-
#### Example
127-
```
128-
npx hardhat deploy:token --name "The Great Shipping Co." --symbol GSC --chain polygon --network mumbai --mintable --verify
129-
```
130-
This uses the _mintable_ contract meant for the _Polygon_ chain and deploys it to the Polygon's _Mumbai_ network. The token will be deployed with the name _The Great Shipping Co._ under the symbol _GSC_.
131-
The contract source will also be _verified_ on Etherscan.
132-
133-
## Chain Managers
134-
The Chain Managers can be deployed and used to bridge the tokens between Ethereum and Polygon. They are not needed if the intention is to remain on a blockchain only.
135-
136-
> ⚠️ Transferring of documents across chains currently only works when the address of the token registry is the same between them.
137-
138-
The deployment of the Chain Managers mainly involves 3 steps.
139-
140-
### Step 1. Deploy Root Chain Manager on Ethereum
141-
```
142-
Usage: hardhat [GLOBAL OPTIONS] deploy:cm:root [--check-point-manager <STRING>] [--fx-root <STRING>] --token <STRING> [--verify]
143-
144-
OPTIONS:
145-
146-
--check-point-manager Address of Checkpoint Manager (default: "0x2890bA17EfE978480615e330ecB65333b880928e")
147-
--fx-root Address of FxRoot (default: "0x3d1d3E34f7fB6D26245E6640E1c50710eFFf15bA")
148-
--token Address of Root Token
149-
--verify Verify on Etherscan
150-
151-
deploy:cm:root: Deploys the root chain manager
152-
```
153-
> 💡 The `--check-point-manager` and `--fx-root` parameters are optional.
154-
> The default value of these parameters will refer to the addresses on the mainnet if the env variable value of `NODE_ENV` is `production`. Otherwise, the default values will refer to the addresses on the testnet.
155-
156-
#### Example
157-
```
158-
npx hardhat deploy:cm:root --network goerli --token 0xRootTokenAddress --verify
159-
```
160-
This example will deploy the _root chain manager_ on the Ethereum _Goerli_ network meant for the root token address `0xRootTokenAddress`.
161-
The root chain manager will also be _verified_ on Etherscan.
162-
163-
### Step 2. Deploy Child Chain Manager on Polygon
164-
```
165-
Usage: hardhat [GLOBAL OPTIONS] deploy:cm:child --token <STRING> [--fx-child <STRING>] [--verify]
166113

167-
OPTIONS:
168-
169-
--token Address of Child Token
170-
--fx-child Address of FxChild (default: "0xCf73231F28B7331BBe3124B907840A94851f9f11")
171-
--verify Verify on Etherscan
172-
173-
deploy:cm:child: Deploys the child chain manager
174-
```
175-
> 💡 The `--fx-child` parameter is optional.
176-
> Its default value refers to the addresses on the mainnet if the env variable value of `NODE_ENV` is `production`. Otherwise, the default value will refer to the address on the testnet.
114+
> 💡 Remember to supply the`--network` argument with the name of the network you wish to deploy on.
115+
> See section below for more info on the list of network names.
177116
178117
#### Example
179118
```
180-
npx hardhat deploy:cm:child --network mumbai --token 0xChildTokenAddress --verify
119+
npx hardhat deploy:token --network mumbai --name "The Great Shipping Co." --symbol GSC --verify
181120
```
182-
This example will deploy the _child chain manager_ on the Polygon _Mumbai_ network meant for the child token address `0xChildTokenAddress`.
183-
The child chain manager will also be _verified_ on Etherscan.
121+
This will deploy the token with the name _The Great Shipping Co._ under the symbol _GSC_ on the Polygon _mumbai_ network.
122+
The contract will also be _verified_ on Etherscan.
184123

185-
### Step 3. Link up the Root and Child Chain Managers
186-
```
187-
Usage: hardhat [GLOBAL OPTIONS] deploy:cm:link --child-cm <STRING> --child-network <STRING> --root-cm <STRING>
188-
189-
OPTIONS:
124+
## Networks Configuration
125+
Here's a list of network names currently pre-configured:
126+
* `mainnet` (Ethereum)
127+
* `ropsten`
128+
* `rinkeby`
129+
* `kovan`
130+
* `goerli`
131+
* `polygon` (Polygon Mainnet)
132+
* `mumbai` (Polygon Mumbai)
190133

191-
--child-cm Address of Root Chain Manager
192-
--child-network Network name of child chain
193-
--root-cm Address of Root Chain Manager
194-
195-
deploy:cm:link: Links up the root and child chain managers
196-
```
197-
> 💡 The `--child-network` should be supplied with the name of the child network where the child chain manager is deployed on.
198-
> The root network has to be supplied to Hardhat's `--network`. See below for an example.
199-
200-
#### Example
201-
```
202-
npx hardhat deploy:cm:link --network goerli --child-network mumbai --root-cm 0xRootChainManagerAddress --child-cm 0xChildChainManagerAddress
203-
```
204-
This example will link up the root chain manager located at `0xRootChainManagerAddress` on the Ethereum _Goerli_ network to the child chain manager located at `0xChildChainManagerAddress` on the Polygon _Mumbai_ network. Notice that the name of the child network is provided to `--child-network`.
134+
> 💡 You can configure existing and add other networks you wish to deploy to in the `hardhat.config.ts` file.
205135
206136
## Verification
207137
When verifying the contracts through either the Hardhat's verify plugin or passing the `--verify` flag to the deployment tasks (which internally uses the same plugin), you will need to set `ETHERSCAN_API_KEY` in your environment to your Etherscan API key.

0 commit comments

Comments
 (0)