Make wrappers small again (#2243)

* introduce --debug option to abi-gen and remove debug functions from @0x/abi-gen-wrappers
* make evmExecAsync protected; ignore deployedBytecode in doc comment
* trim deployedBytecode so it's undefined unless a contract has pure functions
* remove validateAndSendTransactionAsync
* Create `AwaitTransactionSuccessOpts` and `SendTransactionOpts` types 
* Remove duplicate types `IndexedFilterValues`, `DecodedLogEvent`, `EventCallback` from `@0x/base-contract`
This commit is contained in:
Xianny
2019-10-16 09:38:34 -07:00
committed by GitHub
parent 23198174f3
commit 0e90b0e7d0
70 changed files with 1834 additions and 12279 deletions

View File

@@ -1,4 +1,4 @@
import { constants, LogDecoder } from '@0x/contracts-test-utils';
import { LogDecoder } from '@0x/contracts-test-utils';
import { BigNumber } from '@0x/utils';
import { Web3Wrapper } from '@0x/web3-wrapper';
import * as chai from 'chai';
@@ -100,7 +100,6 @@ export class Erc1155Wrapper {
beneficiaries,
tokenAmountsAsArray,
{ from: this._contractOwner },
constants.AWAIT_TRANSACTION_MINED_MS,
);
}
public async mintNonFungibleTokensAsync(beneficiaries: string[]): Promise<[BigNumber, BigNumber[]]> {
@@ -114,12 +113,9 @@ export class Erc1155Wrapper {
// tslint:disable-next-line no-unnecessary-type-assertion
const createFungibleTokenLog = tx.logs[0] as LogWithDecodedArgs<ERC1155TransferSingleEventArgs>;
const token = createFungibleTokenLog.args.id;
await this._erc1155Contract.mintNonFungible.awaitTransactionSuccessAsync(
token,
beneficiaries,
{ from: this._contractOwner },
constants.AWAIT_TRANSACTION_MINED_MS,
);
await this._erc1155Contract.mintNonFungible.awaitTransactionSuccessAsync(token, beneficiaries, {
from: this._contractOwner,
});
const encodedNftIds: BigNumber[] = [];
const nftIdBegin = 1;
const nftIdEnd = beneficiaries.length + 1;