aboutsummaryrefslogtreecommitdiffstats
path: root/packages/abi-gen/README.md
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-12-16 02:37:03 +0800
committerFabio Berger <me@fabioberger.com>2017-12-16 02:37:03 +0800
commitb46dd2e0a277340c19fa137a436981cc53c8cb80 (patch)
treed2814176fe8ffc5ec6a61534aa77487aae6bcc13 /packages/abi-gen/README.md
parent484dd4c33aa5786def1f0b159f5b51f99a585aa8 (diff)
parent3eb08735d4d0fe4b046dd6b74f5ed503cf5c64e3 (diff)
downloaddexon-sol-tools-b46dd2e0a277340c19fa137a436981cc53c8cb80.tar
dexon-sol-tools-b46dd2e0a277340c19fa137a436981cc53c8cb80.tar.gz
dexon-sol-tools-b46dd2e0a277340c19fa137a436981cc53c8cb80.tar.bz2
dexon-sol-tools-b46dd2e0a277340c19fa137a436981cc53c8cb80.tar.lz
dexon-sol-tools-b46dd2e0a277340c19fa137a436981cc53c8cb80.tar.xz
dexon-sol-tools-b46dd2e0a277340c19fa137a436981cc53c8cb80.tar.zst
dexon-sol-tools-b46dd2e0a277340c19fa137a436981cc53c8cb80.zip
Merge branch 'development' into createWethPage
* development: (54 commits) Fix redundant spaces Fix tests Fix website unused vars Fix connect unused vars Fix 0x.js unused vars Dissallow unused vars/imports Implement first custom linter rule async-suffix Reuse intervalutils in website Add a newline Name a variable Add a comment Fix a conditional Make migrations deterministic Fix linter error Fix linter errors Add a function to init token balances Rename tokenUtils.getNonProtocolTokens to tokenUtils.getDummyTokens Add DummyToken to gitignore Add DummyToken to artifacts list Increase mocha timeout ...
Diffstat (limited to 'packages/abi-gen/README.md')
-rw-r--r--packages/abi-gen/README.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/abi-gen/README.md b/packages/abi-gen/README.md
index 16dd9b969..0eaacd86f 100644
--- a/packages/abi-gen/README.md
+++ b/packages/abi-gen/README.md
@@ -5,7 +5,7 @@ It's heavily inspired by [Geth abigen](https://github.com/ethereum/go-ethereum/w
You can write your custom handlebars templates which will allow you to seamlessly integrate the generated code into your existing codebase with existing conventions.
For an example of the generated [wrapper files](https://github.com/0xProject/0x.js/tree/development/packages/0x.js/src/contract_wrappers/generated) check out 0x.js.
-[Here](https://github.com/0xProject/0x.js/tree/development/packages/abi-gen-templates) are the templates used to generate those files.
+[Here](https://github.com/0xProject/0x.js/tree/development/packages/0x.js/src/contract_templates) are the templates used to generate those files.
## Instalation
`yarn add -g @0xproject/abi-gen`
@@ -29,7 +29,7 @@ We could've just used `--abiGlob 'src/artifacts/*.json` but we wanted to exclude
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.
## How to write custom templates?
-The best way to get started is to copy [0x.js templates](https://github.com/0xProject/0x.js/tree/development/packages/abi-gen-templates) and start adjusting them for your needs.
+The best way to get started is to copy [0x.js templates](https://github.com/0xProject/0x.js/tree/development/packages/0x.js/src/contract_templates) and start adjusting them for your needs.
We use [handlebars](handlebarsjs.com) template engine under the hood.
You need to have a master template called `contract.mustache`. it will be used to generate each contract wrapper. Although - you don't need and probably shouldn't write all your logic in a single template file. You can write [partial templates](http://handlebarsjs.com/partials.html) and as long as they are within a partials folder - they will be registered and available.
## Which data/context do I get in my templates?