diff options
author | Fabio Berger <me@fabioberger.com> | 2018-03-04 02:20:56 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-03-04 02:20:56 +0800 |
commit | a783d21409424a5da934d5909a9238d1d08fe88b (patch) | |
tree | 71cbc7cb17514e0b2c789b8e17a09fc8f90ea3c4 /packages/abi-gen | |
parent | 1b5742fbf094ae9e5e745fa61760fb0a4eb871ec (diff) | |
parent | a716e3de74a9cf22d7e6e99795d731189fa8427d (diff) | |
download | dexon-sol-tools-a783d21409424a5da934d5909a9238d1d08fe88b.tar dexon-sol-tools-a783d21409424a5da934d5909a9238d1d08fe88b.tar.gz dexon-sol-tools-a783d21409424a5da934d5909a9238d1d08fe88b.tar.bz2 dexon-sol-tools-a783d21409424a5da934d5909a9238d1d08fe88b.tar.lz dexon-sol-tools-a783d21409424a5da934d5909a9238d1d08fe88b.tar.xz dexon-sol-tools-a783d21409424a5da934d5909a9238d1d08fe88b.tar.zst dexon-sol-tools-a783d21409424a5da934d5909a9238d1d08fe88b.zip |
Merge branch 'development' into extractDocs
* development:
Update yarn.lock
Update all mentions of the repo name being `0x.js` to `0x-monorepo`
Diffstat (limited to 'packages/abi-gen')
-rw-r--r-- | packages/abi-gen/README.md | 8 | ||||
-rw-r--r-- | packages/abi-gen/package.json | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/packages/abi-gen/README.md b/packages/abi-gen/README.md index 1188bd437..5232e59ce 100644 --- a/packages/abi-gen/README.md +++ b/packages/abi-gen/README.md @@ -4,8 +4,8 @@ This package allows you to generate TypeScript contract wrappers from ABI files. It's heavily inspired by [Geth abigen](https://github.com/ethereum/go-ethereum/wiki/Native-DApps:-Go-bindings-to-Ethereum-contracts) but takes a different approach. 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/contract_templates) are the templates used to generate those files. +For an example of the generated [wrapper files](https://github.com/0xProject/0x-monorepo/tree/development/packages/0x.js/src/contract_wrappers/generated) check out 0x.js. +[Here](https://github.com/0xProject/0x-monorepo/tree/development/packages/0x.js/contract_templates) are the templates used to generate those files. ## Installation @@ -36,14 +36,14 @@ The abi file should be either a [Truffle](http://truffleframework.com/) contract ## 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/contract_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-monorepo/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. -See the [type definition](https://github.com/0xProject/0x.js/tree/development/packages/abi-gen/src/types.ts) of what we pass to the render method. +See the [type definition](https://github.com/0xProject/0x-monorepo/tree/development/packages/abi-gen/src/types.ts) of what we pass to the render method. ## Output files diff --git a/packages/abi-gen/package.json b/packages/abi-gen/package.json index 2506335a4..3a89a7064 100644 --- a/packages/abi-gen/package.json +++ b/packages/abi-gen/package.json @@ -15,13 +15,13 @@ }, "repository": { "type": "git", - "url": "https://github.com/0xProject/0x.js.git" + "url": "https://github.com/0xProject/0x-monorepo.git" }, "license": "Apache-2.0", "bugs": { - "url": "https://github.com/0xProject/0x.js/issues" + "url": "https://github.com/0xProject/0x-monorepo/issues" }, - "homepage": "https://github.com/0xProject/0x.js/packages/abi-gen/README.md", + "homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen/README.md", "dependencies": { "@0xproject/utils": "^0.3.4", "chalk": "^2.3.0", |