aboutsummaryrefslogtreecommitdiffstats
path: root/packages/abi-gen/README.md
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2017-12-25 08:39:50 +0800
committerBrandon Millman <brandon.millman@gmail.com>2017-12-25 08:46:45 +0800
commiteda6b8d01b4e3c297d93b026b058aa23aa2de3ae (patch)
tree421de12f63760276a5aa525ae784570768ece40f /packages/abi-gen/README.md
parentcbf06b2165715aaadf1afb6fb84040837a7a8827 (diff)
downloaddexon-sol-tools-eda6b8d01b4e3c297d93b026b058aa23aa2de3ae.tar
dexon-sol-tools-eda6b8d01b4e3c297d93b026b058aa23aa2de3ae.tar.gz
dexon-sol-tools-eda6b8d01b4e3c297d93b026b058aa23aa2de3ae.tar.bz2
dexon-sol-tools-eda6b8d01b4e3c297d93b026b058aa23aa2de3ae.tar.lz
dexon-sol-tools-eda6b8d01b4e3c297d93b026b058aa23aa2de3ae.tar.xz
dexon-sol-tools-eda6b8d01b4e3c297d93b026b058aa23aa2de3ae.tar.zst
dexon-sol-tools-eda6b8d01b4e3c297d93b026b058aa23aa2de3ae.zip
Fix broken links in the abi-gen README
Diffstat (limited to 'packages/abi-gen/README.md')
-rw-r--r--packages/abi-gen/README.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/abi-gen/README.md b/packages/abi-gen/README.md
index 0eaacd86f..ab2315232 100644
--- a/packages/abi-gen/README.md
+++ b/packages/abi-gen/README.md
@@ -5,9 +5,9 @@ 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/0x.js/src/contract_templates) are the templates used to generate those files.
+[Here](https://github.com/0xProject/0x.js/tree/development/packages/0x.js/contract_templates) are the templates used to generate those files.
-## Instalation
+## Installation
`yarn add -g @0xproject/abi-gen`
## Usage
```
@@ -29,8 +29,8 @@ 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/0x.js/src/contract_templates) and start adjusting them for your needs.
-We use [handlebars](handlebarsjs.com) template engine under the hood.
+The best way to get started is to copy [0x.js templates](https://github.com/0xProject/0x.js/tree/development/packages/0x.js/contract_templates) and start adjusting them for your needs.
+We use [handlebars](http://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?
For now you don't get much on top of methods abi, some useful helpers and a contract name because it was enough for our use-case, but if you need something else - create a PR.