aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/contract_templates/contract.handlebars
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contracts/contract_templates/contract.handlebars')
-rw-r--r--packages/contracts/contract_templates/contract.handlebars18
1 files changed, 18 insertions, 0 deletions
diff --git a/packages/contracts/contract_templates/contract.handlebars b/packages/contracts/contract_templates/contract.handlebars
index afb9708e9..84b0696b1 100644
--- a/packages/contracts/contract_templates/contract.handlebars
+++ b/packages/contracts/contract_templates/contract.handlebars
@@ -10,6 +10,24 @@ import * as Web3 from 'web3';
import {BaseContract} from './base_contract';
+{{#if events}}
+export type {{contractName}}ContractEventArgs =
+{{#each events}}
+ | {{name}}ContractEventArgs{{#if @last}};{{/if}}
+{{/each}}
+
+export enum {{contractName}}Events {
+ {{#each events}}
+ {{name}} = '{{name}}',
+ {{/each}}
+}
+
+{{#each events}}
+{{> event}}
+
+{{/each}}
+{{/if}}
+
export class {{contractName}}Contract extends BaseContract {
{{#each methods}}
{{#this.constant}}