aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/contract_templates
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contracts/contract_templates')
-rw-r--r--packages/contracts/contract_templates/contract.handlebars26
-rw-r--r--packages/contracts/contract_templates/partials/call.handlebars10
-rw-r--r--packages/contracts/contract_templates/partials/params.handlebars3
-rw-r--r--packages/contracts/contract_templates/partials/return_type.handlebars10
-rw-r--r--packages/contracts/contract_templates/partials/tx.handlebars36
-rw-r--r--packages/contracts/contract_templates/partials/typed_params.handlebars3
6 files changed, 0 insertions, 88 deletions
diff --git a/packages/contracts/contract_templates/contract.handlebars b/packages/contracts/contract_templates/contract.handlebars
deleted file mode 100644
index afb9708e9..000000000
--- a/packages/contracts/contract_templates/contract.handlebars
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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:async-suffix member-ordering no-consecutive-blank-lines
-// 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
diff --git a/packages/contracts/contract_templates/partials/call.handlebars b/packages/contracts/contract_templates/partials/call.handlebars
deleted file mode 100644
index 82a45b40e..000000000
--- a/packages/contracts/contract_templates/partials/call.handlebars
+++ /dev/null
@@ -1,10 +0,0 @@
-public async {{this.name}}(
-{{> typed_params inputs=inputs}}
- defaultBlock?: Web3.BlockParam,
-): Promise<{{> return_type outputs=outputs}}> {
- const self = this as {{contractName}}Contract;
- const result = await self._web3ContractInstance.{{this.name}}.call(
- {{> params inputs=inputs}}
- );
- return result;
-}
diff --git a/packages/contracts/contract_templates/partials/params.handlebars b/packages/contracts/contract_templates/partials/params.handlebars
deleted file mode 100644
index ac5d4ae85..000000000
--- a/packages/contracts/contract_templates/partials/params.handlebars
+++ /dev/null
@@ -1,3 +0,0 @@
-{{#each inputs}}
-{{name}},
-{{/each}}
diff --git a/packages/contracts/contract_templates/partials/return_type.handlebars b/packages/contracts/contract_templates/partials/return_type.handlebars
deleted file mode 100644
index 40a5dd8b0..000000000
--- a/packages/contracts/contract_templates/partials/return_type.handlebars
+++ /dev/null
@@ -1,10 +0,0 @@
-{{#if outputs.length}}
-{{#singleReturnValue}}
-{{#returnType outputs.0.type}}{{/returnType}}
-{{/singleReturnValue}}
-{{^singleReturnValue}}
-[{{#each outputs}}{{#returnType type}}{{/returnType}}{{#unless @last}}, {{/unless}}{{/each}}]
-{{/singleReturnValue}}
-{{else}}
-void
-{{/if}}
diff --git a/packages/contracts/contract_templates/partials/tx.handlebars b/packages/contracts/contract_templates/partials/tx.handlebars
deleted file mode 100644
index 69ae982d6..000000000
--- a/packages/contracts/contract_templates/partials/tx.handlebars
+++ /dev/null
@@ -1,36 +0,0 @@
-public {{this.name}} = {
- async sendTransactionAsync(
- {{> typed_params inputs=inputs}}
- {{#this.payable}}
- txData: TxDataPayable = {},
- {{/this.payable}}
- {{^this.payable}}
- txData: TxData = {},
- {{/this.payable}}
- ): Promise<string> {
- const self = this as {{contractName}}Contract;
- const txDataWithDefaults = await self._applyDefaultsToTxDataAsync(txData);
- const txHash = await self._web3ContractInstance.{{this.name}}(
- {{> params inputs=inputs}}
- txDataWithDefaults,
- );
- return txHash;
- },
- async callAsync(
- {{> typed_params inputs=inputs}}
- {{#this.payable}}
- txData: TxDataPayable = {},
- {{/this.payable}}
- {{^this.payable}}
- txData: TxData = {},
- {{/this.payable}}
- ): Promise<{{> return_type outputs=outputs}}> {
- const self = this as {{contractName}}Contract;
- const txDataWithDefaults = await self._applyDefaultsToTxDataAsync(txData);
- const returnValue = await self._web3ContractInstance.{{this.name}}.call(
- {{> params inputs=inputs}}
- txDataWithDefaults,
- );
- return returnValue;
- },
-};
diff --git a/packages/contracts/contract_templates/partials/typed_params.handlebars b/packages/contracts/contract_templates/partials/typed_params.handlebars
deleted file mode 100644
index 3ea4b2e95..000000000
--- a/packages/contracts/contract_templates/partials/typed_params.handlebars
+++ /dev/null
@@ -1,3 +0,0 @@
-{{#each inputs}}
- {{name}}: {{#parameterType type}}{{/parameterType}},
-{{/each}}