aboutsummaryrefslogtreecommitdiffstats
path: root/packages/abi-gen
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-03-04 03:29:40 +0800
committerFabio Berger <me@fabioberger.com>2018-03-04 03:29:40 +0800
commite64be284ddf18e7bbe43a7e11052c00b9927488e (patch)
treecc250c162e57752c78f389f962ea4b843d09cde3 /packages/abi-gen
parent1b5742fbf094ae9e5e745fa61760fb0a4eb871ec (diff)
parent4445d1d5a0f5d5fa263d7a063519a9a9bca1ec94 (diff)
downloaddexon-sol-tools-e64be284ddf18e7bbe43a7e11052c00b9927488e.tar
dexon-sol-tools-e64be284ddf18e7bbe43a7e11052c00b9927488e.tar.gz
dexon-sol-tools-e64be284ddf18e7bbe43a7e11052c00b9927488e.tar.bz2
dexon-sol-tools-e64be284ddf18e7bbe43a7e11052c00b9927488e.tar.lz
dexon-sol-tools-e64be284ddf18e7bbe43a7e11052c00b9927488e.tar.xz
dexon-sol-tools-e64be284ddf18e7bbe43a7e11052c00b9927488e.tar.zst
dexon-sol-tools-e64be284ddf18e7bbe43a7e11052c00b9927488e.zip
Merge branch 'development' into 0x.js/updateTypeDoc
* development: Update yarn.lock 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.md8
-rw-r--r--packages/abi-gen/package.json6
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",