aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/contract_templates/contract.handlebars
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-02-01 04:38:12 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-02-01 04:38:12 +0800
commit89547332eef489a8f258300224cf632dad12fe61 (patch)
tree5d4bf5d804b8ae2843b0a6c709ff5290d00d6e0f /packages/0x.js/contract_templates/contract.handlebars
parentca55cc99edee3697646e2b4f28622f345c290fd7 (diff)
parent75539bf67537f202bc1075b096fd70f64705867e (diff)
downloaddexon-sol-tools-89547332eef489a8f258300224cf632dad12fe61.tar
dexon-sol-tools-89547332eef489a8f258300224cf632dad12fe61.tar.gz
dexon-sol-tools-89547332eef489a8f258300224cf632dad12fe61.tar.bz2
dexon-sol-tools-89547332eef489a8f258300224cf632dad12fe61.tar.lz
dexon-sol-tools-89547332eef489a8f258300224cf632dad12fe61.tar.xz
dexon-sol-tools-89547332eef489a8f258300224cf632dad12fe61.tar.zst
dexon-sol-tools-89547332eef489a8f258300224cf632dad12fe61.zip
Merge branch 'development' into feature/tslint-config/underscore-protected-members
* development: Updated contract generation in 0x to new abi-gen CLI Removed deprecated CLI options Added PR # to the changelog of abi-gen Added CLI options for explicit specifying location of partials and main template
Diffstat (limited to 'packages/0x.js/contract_templates/contract.handlebars')
-rw-r--r--packages/0x.js/contract_templates/contract.handlebars25
1 files changed, 25 insertions, 0 deletions
diff --git a/packages/0x.js/contract_templates/contract.handlebars b/packages/0x.js/contract_templates/contract.handlebars
new file mode 100644
index 000000000..d3fe1b8cc
--- /dev/null
+++ b/packages/0x.js/contract_templates/contract.handlebars
@@ -0,0 +1,25 @@
+/**
+ * This file is auto-generated using abi-gen. Don't edit directly.
+ * Templates can be found at https://github.com/0xProject/0x.js/tree/development/packages/abi-gen-templates.
+ */
+// tslint:disable-next-line:no-unused-variable
+import { TxData, TxDataPayable } from '@0xproject/types';
+import { BigNumber, classUtils, promisify } from '@0xproject/utils';
+import * as Web3 from 'web3';
+
+import {BaseContract} from './base_contract';
+
+export class {{contractName}}Contract extends BaseContract {
+{{#each methods}}
+ {{#this.constant}}
+ {{> call contractName=../contractName}}
+ {{/this.constant}}
+ {{^this.constant}}
+ {{> tx contractName=../contractName}}
+ {{/this.constant}}
+{{/each}}
+ constructor(web3ContractInstance: Web3.ContractInstance, defaults: Partial<TxData>) {
+ super(web3ContractInstance, defaults);
+ classUtils.bindAll(this, ['_web3ContractInstance', '_defaults']);
+ }
+} // tslint:disable:max-file-line-count