forked from cerc-io/ts-nitro
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f8b7906
commit 618dd73
Showing
4 changed files
with
35 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Porting go-nitro latest commits | ||
# Development | ||
|
||
## Skipped go-nitro Commits / Features | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -182,3 +182,7 @@ Run relay node using v2 watcher | |
```bash | ||
clearNodeStorage() | ||
``` | ||
|
||
### Development | ||
|
||
* [README](./DEVELOPMENT.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Development | ||
|
||
## Generate contract bindings | ||
|
||
* Clone the go-nitro repo (<https://github.com/statechannels/go-nitro>) and run `yarn` in root of repo. | ||
|
||
* Move to `go-nitro/packages/nitro-protocol/` and run `yarn hardhat compile` to compile the contract | ||
|
||
```bash | ||
$ yarn hardhat compile | ||
Generating typings for: 43 artifacts in dir: typechain-types for target: ethers-v5 | ||
Successfully generated 67 typings! | ||
Compiled 42 Solidity files successfully | ||
``` | ||
|
||
* Copy files `ConsensusApp.json` `NitroAdjudicator.json` `VirtualPaymentApp.json` from go-nitro `packages/nitro-protocol/artifacts` to ts-nitro `packages/nitro-util/contracts` | ||
|
||
* In ts-nitro `packages/nitro-util` run `yarn generate-bindings` to generate the contract bindings | ||
|
||
```bash | ||
$ yarn generate-bindings | ||
|
||
yarn run v1.22.19 | ||
$ ./scripts/generate-bindings.sh | ||
$ /ts-nitro/node_modules/.bin/typechain --target ethers-v5 --out-dir ./src/contract-bindings ./contracts/NitroAdjudicator.json ./contracts/ConsensusApp.json ./contracts/VirtualPaymentApp.json ./contracts/Token.json | ||
Successfully generated 11 typings! | ||
Done in 1.27s. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,5 @@ | ||
# nitro-util | ||
|
||
## Generate contract bindings | ||
## Development | ||
|
||
* Clone the go-nitro repo (<https://github.com/statechannels/go-nitro>) and run `yarn` in root of repo. | ||
|
||
* Move to `go-nitro/packages/nitro-protocol/` and run `yarn hardhat compile` to compile the contract | ||
|
||
```bash | ||
$ yarn hardhat compile | ||
Generating typings for: 43 artifacts in dir: typechain-types for target: ethers-v5 | ||
Successfully generated 67 typings! | ||
Compiled 42 Solidity files successfully | ||
``` | ||
|
||
* Copy files `ConsensusApp.json` `NitroAdjudicator.json` `VirtualPaymentApp.json` from go-nitro `packages/nitro-protocol/artifacts` to ts-nitro `packages/nitro-util/contracts` | ||
|
||
* In ts-nitro `packages/nitro-util` run `yarn generate-bindings` to generate the contract bindings | ||
|
||
```bash | ||
$ yarn generate-bindings | ||
|
||
yarn run v1.22.19 | ||
$ ./scripts/generate-bindings.sh | ||
$ /ts-nitro/node_modules/.bin/typechain --target ethers-v5 --out-dir ./src/contract-bindings ./contracts/NitroAdjudicator.json ./contracts/ConsensusApp.json ./contracts/VirtualPaymentApp.json ./contracts/Token.json | ||
Successfully generated 11 typings! | ||
Done in 1.27s. | ||
``` | ||
* [README](./DEVELOPMENT.md) |