aboutsummaryrefslogtreecommitdiffstats
path: root/packages/abi-gen/README.md
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-03-12 18:24:37 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-03-12 18:24:37 +0800
commitfb0fd8ddc4eba0d8b6481ba57eb2995527e1f4f4 (patch)
tree6ef4e23bcaa8fe6f985c7f1d03825dea1ba9c087 /packages/abi-gen/README.md
parenta6571b09d2087ffb9a4860c0db3d7344321fe2c3 (diff)
downloaddexon-sol-tools-fb0fd8ddc4eba0d8b6481ba57eb2995527e1f4f4.tar
dexon-sol-tools-fb0fd8ddc4eba0d8b6481ba57eb2995527e1f4f4.tar.gz
dexon-sol-tools-fb0fd8ddc4eba0d8b6481ba57eb2995527e1f4f4.tar.bz2
dexon-sol-tools-fb0fd8ddc4eba0d8b6481ba57eb2995527e1f4f4.tar.lz
dexon-sol-tools-fb0fd8ddc4eba0d8b6481ba57eb2995527e1f4f4.tar.xz
dexon-sol-tools-fb0fd8ddc4eba0d8b6481ba57eb2995527e1f4f4.tar.zst
dexon-sol-tools-fb0fd8ddc4eba0d8b6481ba57eb2995527e1f4f4.zip
Update README
Diffstat (limited to 'packages/abi-gen/README.md')
-rw-r--r--packages/abi-gen/README.md27
1 files changed, 18 insertions, 9 deletions
diff --git a/packages/abi-gen/README.md b/packages/abi-gen/README.md
index 5232e59ce..899b4845e 100644
--- a/packages/abi-gen/README.md
+++ b/packages/abi-gen/README.md
@@ -16,24 +16,33 @@ For an example of the generated [wrapper files](https://github.com/0xProject/0x-
```
abi-gen
Options:
- --help Show help [boolean]
- --version Show version number [boolean]
- --abiGlob Glob pattern to search for ABI JSON files [string] [required]
- --templates Folder where to search for templates [string] [required]
- --output Folder where to put the output files [string] [required]
+ --help Show help [boolean]
+ --version Show version number [boolean]
+ --abis Glob pattern to search for ABI JSON files
+ [string] [required]
+ --output, -o, --out Folder where to put the output files [string] [required]
+ --partials Glob pattern for the partial template files [string]
+ --template Path for the main template file that will be used to
+ generate each contract [string] [required]
+ --backend The backing Ethereum library your app uses. Either 'web3'
+ or 'ethers'. Ethers auto-converts small ints to numbers
+ whereas Web3 doesn't.
+ [string] [choices: "web3", "ethers"] [default: "web3"]
+ --network-id ID of the network where contract ABIs are nested in
+ artifacts [number] [default: 50]
```
-## ABI files
-
You're required to pass a [glob](<https://en.wikipedia.org/wiki/Glob_(programming)>) template where your abi files are located.
TL;DR - here is the example from 0x.js.
-`--abiGlob 'src/artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry).json`
+`--abis 'src/artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry).json`
-We could've just used `--abiGlob 'src/artifacts/*.json` but we wanted to exclude some of the abi files.
+We could've just used `--abis 'src/artifacts/*.json` but we wanted to exclude some of the abi files.
The abi file should be either a [Truffle](http://truffleframework.com/) contract artifact (a JSON object with an abi key) or a JSON abi array.
+You need to also specify the location of your main template used for every contract `--template` as well as the partial templates `--partials` that can later be used from the main one.
+
## How to write custom templates?
The best way to get started is to copy [0x.js templates](https://github.com/0xProject/0x-monorepo/tree/development/packages/0x.js/contract_templates) and start adjusting them for your needs.