Merge pull request #701 from feuGeneA/v2-prototype

Document use of contract_templates (take 2; based on v2-prototype, not master)
This commit is contained in:
Fabio Berger
2018-06-19 13:44:55 +02:00
committed by GitHub
3 changed files with 16 additions and 5 deletions

View File

@@ -0,0 +1,15 @@
These templates are used with [abi-gen](https://github.com/0xProject/0x-monorepo/tree/development/packages/abi-gen).
To successfully compile the generated TypeScript contract wrappers, you must:
* Install the packages on which the main contract template directly depends: `yarn add @0xproject/base-contract @0xproject/sol-compiler @0xproject/utils @0xproject/web3-wrapper ethereum-types ethers lodash`
* Install the packages on which the main contract template *in*directly depends: `yarn add @types/lodash`
* Ensure that your TypeScript configuration includes the following:
```
"compilerOptions": {
"lib": ["ES2015"],
"typeRoots": [
"node_modules/@0xproject/typescript-typings/types",
"node_modules/@types"
]
}
```

View File

@@ -1,7 +1,3 @@
/**
* This file is auto-generated using abi-gen. Don't edit directly.
* Templates can be found at https://github.com/0xProject/0x-monorepo/tree/development/packages/contract_templates.
*/
// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace
// tslint:disable:no-unused-variable
import { BaseContract } from '@0xproject/base-contract';

View File

@@ -1,3 +1,3 @@
{{#each inputs}}
{{name}},
{{name}}{{#if @last}}{{else}},{{/if}}
{{/each}}