diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-02-24 04:53:27 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-02-28 04:05:23 +0800 |
commit | 9d9cab1711f2d5c77376056affc1d7287211c18d (patch) | |
tree | 695c3934b2cfb8726fc8472fc5ddb57c94ce5a86 /packages/contracts/contract_templates/contract.handlebars | |
parent | fe8f2d8d898e9909636366c9ceee37a5e9481573 (diff) | |
download | dexon-sol-tools-9d9cab1711f2d5c77376056affc1d7287211c18d.tar dexon-sol-tools-9d9cab1711f2d5c77376056affc1d7287211c18d.tar.gz dexon-sol-tools-9d9cab1711f2d5c77376056affc1d7287211c18d.tar.bz2 dexon-sol-tools-9d9cab1711f2d5c77376056affc1d7287211c18d.tar.lz dexon-sol-tools-9d9cab1711f2d5c77376056affc1d7287211c18d.tar.xz dexon-sol-tools-9d9cab1711f2d5c77376056affc1d7287211c18d.tar.zst dexon-sol-tools-9d9cab1711f2d5c77376056affc1d7287211c18d.zip |
Fix build by using local events types
Diffstat (limited to 'packages/contracts/contract_templates/contract.handlebars')
-rw-r--r-- | packages/contracts/contract_templates/contract.handlebars | 18 |
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}} |