From a7c51593e4e6bc514f4f975fdc6fb9207c52ac8e Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 6 Feb 2018 12:07:19 +0100 Subject: Use abi-gen for events in 0x.js --- .../0x.js/contract_templates/contract.handlebars | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'packages/0x.js/contract_templates/contract.handlebars') diff --git a/packages/0x.js/contract_templates/contract.handlebars b/packages/0x.js/contract_templates/contract.handlebars index d3fe1b8cc..227cfcc5a 100644 --- a/packages/0x.js/contract_templates/contract.handlebars +++ b/packages/0x.js/contract_templates/contract.handlebars @@ -1,6 +1,6 @@ /** * 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. + * Templates can be found at https://github.com/0xProject/0x.js/tree/development/packages/0x.js/contract_templates. */ // tslint:disable-next-line:no-unused-variable import { TxData, TxDataPayable } from '@0xproject/types'; @@ -9,6 +9,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}} -- cgit v1.2.3 From fcbe24a1263e189aad8f2698043217e6ed6488b3 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 6 Feb 2018 17:15:20 +0100 Subject: Fix linter errors --- packages/0x.js/contract_templates/contract.handlebars | 1 + 1 file changed, 1 insertion(+) (limited to 'packages/0x.js/contract_templates/contract.handlebars') diff --git a/packages/0x.js/contract_templates/contract.handlebars b/packages/0x.js/contract_templates/contract.handlebars index 227cfcc5a..33699b8a7 100644 --- a/packages/0x.js/contract_templates/contract.handlebars +++ b/packages/0x.js/contract_templates/contract.handlebars @@ -2,6 +2,7 @@ * 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/0x.js/contract_templates. */ +// tslint:disable:no-consecutive-blank-lines // tslint:disable-next-line:no-unused-variable import { TxData, TxDataPayable } from '@0xproject/types'; import { BigNumber, classUtils, promisify } from '@0xproject/utils'; -- cgit v1.2.3