You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-34Lines changed: 39 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Wrapped/WIT contracts and CLI tools
2
2
3
-
> A command-line tool and smart contract suite to wrap and unwrap $WIT coins between the Witnet blockchain and Ethereum, using specific RPC endpoints for each ecosystem.
3
+
> A command-line tool and smart contract suite to wrap and unwrap $WIT coins between Witnet and Ethereum blockchains, using specific RPC endpoints for each.
4
4
5
5
## ✨ Overview
6
6
@@ -11,11 +11,11 @@ This repository contains:
11
11
- Check out both wrapped and under-custody $WIT suppies on Ethereum and Witnet.
12
12
- Notarize **Proof-of-Reserve** reports on Witnet and then push them on-chain into Ethereum.
13
13
- Get list of supported EVM testnets and mainnets.
14
-
- Get relevant info about the ERC-20 contract on each supported EVM networks.
14
+
- Get relevant info about the ERC-20 contract on each supported network.
15
15
- Get history of transfer, wrap and unwrap transactions.
16
16
- Measure actual time taken by cross-chain transactions.
17
17
18
-
-**Javascript library** allowing scripts to fetch supported networks, addresses, settings and some other helper methods.
18
+
-A **Javascript library** allowing scripts to introspect supported networks, ABIs, addresses and settings, as well as some related helper methods.
19
19
20
20
- The full **Solidity source code** of both the canonical and bridged versions of the Wrapped/WIT ERC-20 token deployed on Ethereum and other Superchain-compliant networks.
21
21
@@ -63,80 +63,85 @@ You can optionally:
63
63
64
64
### Commands
65
65
66
-
You need to have a local ETH/RPC proxy running in order to get access to extra commands. You will only be able to wrap and unwrap $WIT coins if you connect to an EVM network where the canonical version of the ERC-20 token is available (see supported networks below).
66
+
You need to have a local **ETH/RPC proxy** running in order to get access to extra commands. You will only be able to wrap and unwrap $WIT coins if you connect to an EVM network where the canonical version of the ERC-20 token is available (see supported networks below).
67
67
68
+
---
68
69
#### `$ witwrap networks`
69
70
Lists supported EVM networks.
70
71
71
-
Flags:
72
+
**Flags**:
72
73
-`--mainnets`: Just list the mainnets.
73
74
-`--testnets`: Just list the testnets.
74
75
76
+
---
75
77
#### `$ witwrap proxy <evm_network>`
76
78
Launches a local ETH/RPC signing proxy to the specified `evm_network`, listening on port 8545 if no otherwise specified.
77
79
78
-
Options:
79
-
-`--port`: Port where the new proxy will be listening on.
80
+
**Options**:
81
+
-`--port`: Port where the new proxy should be listening on.
80
82
-`--remote`: URL of the ETH/RPC remote provider to use instead of the proxy's default for the specified network.
81
83
82
-
Launch a proxy to your preferred EVM network on a different terminal so you can augment the available commands of the `witwrap` CLI binary.
83
-
84
-
> *If you launch the proxy on a port other than default's, you'll need to specify `--port <PORT>` when invoking other commands of the `witwrap` binary.*
84
+
> *Launch a proxy to your preferred EVM network on a different terminal so you can augment the available commands of the `witwrap` CLI binary. If you launch the proxy on a port other than default's, you'll need to specify `--port <PORT>` when invoking other commands of the `witwrap` binary.*
85
85
86
+
---
86
87
#### `$ witwrap contract`
87
88
Shows the address and other relevant data of the WrappedWIT contract that's available on the connected EVM network.
88
89
89
-
Flags:
90
+
**Flags**:
90
91
-`--verbose`: Outputs extra information.
91
92
93
+
---
92
94
#### `$ witwrap supply`
93
95
Shows wrapped $WIT supply information on the connected EVM network. It also detects if the total reserve supply in Ethereum is outdated with respect the actual under-custody supply on Witnet, asking you whether you wish to permissionlessly contribute by notarizing (in Witnet) and pushing (in Ethereum) a fresh new **Proof-of-Reserve** report.
94
96
95
-
Flags:
97
+
**Flags**:
96
98
-`--verbose`: Outputs history of Proof-of-Reserve update reports.
97
99
98
-
Options:
100
+
**Options**:
99
101
-`--limit`: Limit number of history records.
100
102
-`--from`: EVM signer address to use when pushing a fresh new Proof-of-Reserve report into Ethereum.
101
103
-`--gasPrice`: Max. EVM gas price to pay when pushing a Proof-of-Reserve report into Ethereum.
102
104
105
+
---
103
106
#### `$ witwrap transfers`
104
-
Shows the history of recent transfers of wrapped $WIT on the connected EVM network. It also allows you to transfer your own wrapped $WIT tokens in Ethereum, as long the signing addresses of your EVM proxy holds some wrapped $WIT balance.
107
+
Shows the history of recent transfers of wrapped $WIT on the connected EVM network. It also allows you to transfer wrapped $WIT tokens in Ethereum, as long the signing addresses of your EVM proxy holds some wrapped $WIT balance.
105
108
106
-
Flags:
109
+
**Flags**:
107
110
-`--burns`: Also show history of burnt $WIT (either unwrapped to Witnet, or bridged to other EVM networks).
108
-
-`--mints`: Also show history of minted $WIT (eiter wrapped from Witnet, or bridged from other EVM networks).
111
+
-`--mints`: Also show history of minted $WIT (either wrapped from Witnet, or bridged from other EVM networks).
109
112
110
-
Options:
113
+
**Options**:
111
114
-`--limit`: Limit number of history records.
112
115
-`--since`: Process events starting from the specified EVM block number.
113
116
-`--from`: Filter transfers from the specified EVM address (required with when ordering a new transfer).
114
117
-`--into`: Filter transfers to the specified EVM address (required when ordering a new transfer).
115
118
-`--value`: Amount of $WIT to transfer between the specified addresses.
116
119
-`--gasPrice`: Max. EVM gas price to pay when transferring $WIT.
117
120
121
+
---
118
122
#### `$ witwrap wrappings`
119
-
Shows the history of past wrapping transactions, as well as an up-to-date list with the status of on-going wrapping workflows. It also allows you to initiate a wrap transaction on Witnet, and validated on Ethereum when finalized.
123
+
Shows the history of past wrapping transactions, as well as an up-to-date list with the status of on-going wrapping workflows. It also allows you to initiate a wrap transaction on Witnet, and validate it on Ethereum when finalized.
120
124
121
-
Flags:
122
-
-`--check`: Show the time difference between the wrap transaction took place on Witnet, and when it gets ultimately verified on Ethereum.
125
+
**Flags**:
126
+
-`--check`: Show the time difference since the moment when the wrap transaction took place on Witnet, and when it got ultimately verified on Ethereum.
123
127
124
-
Options:
128
+
**Options**:
125
129
-`--limit`: Limit number of history records.
126
130
-`--since`: Process events starting from the specified EVM block number.
127
131
-`--from`: Filter wrappings from the specified WIT address (required when initiating a new wrap).
128
132
-`--into`: Filter wrappings to the specified EVM address (required when initiating a new wrap).
129
133
-`--value`: Amount of $WIT to be wrapped between the specified addresses.
130
-
-`--vtt-hash`: Hash of some wrapping transaction that took place on Witnet to yet be verified on Ethereum.
134
+
-`--vtt-hash`: Request the validation on Ethereum of some not-yet verified wrapping transaction that took place on Witnet.
131
135
-`--gasPrice`: Max. EVM gas price to pay when querying the validation of some `--vtt-hash`.
132
136
137
+
---
133
138
#### `$ witwrap unwrappings`
134
-
Shows the history of past unwrapping transactions. It also allows you to unwrap $WIT tokens that you hold on any of the EVM proxy signing addresses, as long as you have enough $WIT balance and there's enough under-custody reserve supply on the ERC-20 contract.
139
+
Shows the history of past unwrapping transactions. It also allows you to unwrap $WIT tokens that you hold on any of the EVM proxy signing addresses, as long as there's enough under-custody reserve supply on the ERC-20 contract.
135
140
136
-
Flags:
137
-
-`--check`: Show the time difference between the unwrap transaction took place on Ethereum, and when the unwrapped amount gets ultimately transferred on Witnet.
141
+
**Flags**:
142
+
-`--check`: Show the time difference since the moment when the unwrap transaction took place on Ethereum, and the unwrapped amount got ultimately transferred to the recipient on Witnet.
138
143
139
-
Options:
144
+
**Options**:
140
145
-`--limit`: Limit number of history records.
141
146
-`--since`: Process events starting from the specified EVM block number.
142
147
-`--from`: Filter unwrappings from the specified EVM address (required when ordering a new unwrap).
@@ -147,12 +152,12 @@ Options:
147
152
## 📄 Smart Contracts
148
153
This repository includes the Solidity contracts that power the Ethereum side of the **Wrapped/WIT**, both on its canonical and Superchain-bridge versions.
149
154
150
-
Contracts are located in the `contracts/` directory:
155
+
Contracts are located in the **contracts/** folder:
151
156
152
-
-`WrappedWIT.sol`
157
+
-**WrappedWIT.sol**
153
158
> The canonical version of the ERC-20 token contract for $WIT on Ethereum. It relies on the Wit/Oracle contract framework for validating both Proof-of-Reserve reports and cross-chain wrapping and unwrapping transactions.
154
159
155
-
-`WrappedWITSuperchain.sol`
160
+
-**WrappedWITSuperchain.sol**
156
161
> The "bridged" version of the ERC-20 token contract that allows wrapped $WIT tokens to be bridged out to a set of Superchain-compliant networks (see below). This version does not support wrapping nor unwrapping transactions with the Witnet network.
157
162
158
163
## 🧪 Supported Networks
@@ -170,22 +175,22 @@ Soon <sup>TM</sup>.
170
175
171
176
### Wrap 10,000.0 $WIT to Ethereum
172
177
It involves a two-step workflow:
173
-
- First, transfer 10,000.0 $WIT to the Wrapped/WIT custodian's address on Witnet:
178
+
- First, transfer 10,000.0 $WIT to the Wrapped/WIT custodian's address in Witnet:
Once the finality of the value transfer transaction that took place on Witnet gets verified in Ethereum, you shall see increased the $WIT balance of the specified `<evm_recipient>` address.
187
+
Once the finality of the value transfer transaction that took place in Witnet gets verified in Ethereum, you shall see increased the $WIT balance of the specified `<evm_recipient>` address.
0 commit comments