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:
		
							
								
								
									
										15
									
								
								packages/contract_templates/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								packages/contract_templates/README.md
									
									
									
									
									
										Normal 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"
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
```
 | 
			
		||||
@@ -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';
 | 
			
		||||
 
 | 
			
		||||
@@ -1,3 +1,3 @@
 | 
			
		||||
{{#each inputs}}
 | 
			
		||||
{{name}},
 | 
			
		||||
{{name}}{{#if @last}}{{else}},{{/if}}
 | 
			
		||||
{{/each}}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user