Update abi-gen-wrappers

This commit is contained in:
Fabio Berger 2019-05-20 13:34:00 +01:00
parent 8c9de31c5c
commit e742708261
19 changed files with 1153 additions and 516 deletions

View File

@ -156,10 +156,11 @@ export class AssetProxyOwnerContract extends BaseContract {
const self = this as any as AssetProxyOwnerContract; const self = this as any as AssetProxyOwnerContract;
const encodedData = self._strictEncodeArguments('removeOwner(address)', [owner const encodedData = self._strictEncodeArguments('removeOwner(address)', [owner
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -201,10 +202,11 @@ export class AssetProxyOwnerContract extends BaseContract {
const self = this as any as AssetProxyOwnerContract; const self = this as any as AssetProxyOwnerContract;
const encodedData = self._strictEncodeArguments('removeOwner(address)', [owner const encodedData = self._strictEncodeArguments('removeOwner(address)', [owner
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -266,10 +268,11 @@ export class AssetProxyOwnerContract extends BaseContract {
const self = this as any as AssetProxyOwnerContract; const self = this as any as AssetProxyOwnerContract;
const encodedData = self._strictEncodeArguments('revokeConfirmation(uint256)', [transactionId const encodedData = self._strictEncodeArguments('revokeConfirmation(uint256)', [transactionId
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -311,10 +314,11 @@ export class AssetProxyOwnerContract extends BaseContract {
const self = this as any as AssetProxyOwnerContract; const self = this as any as AssetProxyOwnerContract;
const encodedData = self._strictEncodeArguments('revokeConfirmation(uint256)', [transactionId const encodedData = self._strictEncodeArguments('revokeConfirmation(uint256)', [transactionId
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -412,7 +416,8 @@ export class AssetProxyOwnerContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<boolean ): Promise<boolean
> { > {
assert.isBigNumber('index_0', index_0);assert.isString('index_1', index_1); assert.isBigNumber('index_0', index_0);
assert.isString('index_1', index_1);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -452,10 +457,11 @@ export class AssetProxyOwnerContract extends BaseContract {
const self = this as any as AssetProxyOwnerContract; const self = this as any as AssetProxyOwnerContract;
const encodedData = self._strictEncodeArguments('executeRemoveAuthorizedAddressAtIndex(uint256)', [transactionId const encodedData = self._strictEncodeArguments('executeRemoveAuthorizedAddressAtIndex(uint256)', [transactionId
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -497,10 +503,11 @@ export class AssetProxyOwnerContract extends BaseContract {
const self = this as any as AssetProxyOwnerContract; const self = this as any as AssetProxyOwnerContract;
const encodedData = self._strictEncodeArguments('executeRemoveAuthorizedAddressAtIndex(uint256)', [transactionId const encodedData = self._strictEncodeArguments('executeRemoveAuthorizedAddressAtIndex(uint256)', [transactionId
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -559,7 +566,6 @@ export class AssetProxyOwnerContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<BigNumber ): Promise<BigNumber
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -596,7 +602,8 @@ export class AssetProxyOwnerContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<BigNumber ): Promise<BigNumber
> { > {
assert.isBoolean('pending', pending);assert.isBoolean('executed', executed); assert.isBoolean('pending', pending);
assert.isBoolean('executed', executed);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -633,15 +640,17 @@ export class AssetProxyOwnerContract extends BaseContract {
isRegistered: boolean, isRegistered: boolean,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('assetProxyContract', assetProxyContract);assert.isBoolean('isRegistered', isRegistered); assert.isString('assetProxyContract', assetProxyContract);
assert.isBoolean('isRegistered', isRegistered);
const self = this as any as AssetProxyOwnerContract; const self = this as any as AssetProxyOwnerContract;
const encodedData = self._strictEncodeArguments('registerAssetProxy(address,bool)', [assetProxyContract, const encodedData = self._strictEncodeArguments('registerAssetProxy(address,bool)', [assetProxyContract,
isRegistered isRegistered
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -661,7 +670,8 @@ export class AssetProxyOwnerContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('assetProxyContract', assetProxyContract);assert.isBoolean('isRegistered', isRegistered); assert.isString('assetProxyContract', assetProxyContract);
assert.isBoolean('isRegistered', isRegistered);
const self = this as any as AssetProxyOwnerContract; const self = this as any as AssetProxyOwnerContract;
const txHashPromise = self.registerAssetProxy.sendTransactionAsync(assetProxyContract, const txHashPromise = self.registerAssetProxy.sendTransactionAsync(assetProxyContract,
isRegistered isRegistered
@ -683,15 +693,17 @@ export class AssetProxyOwnerContract extends BaseContract {
isRegistered: boolean, isRegistered: boolean,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('assetProxyContract', assetProxyContract);assert.isBoolean('isRegistered', isRegistered); assert.isString('assetProxyContract', assetProxyContract);
assert.isBoolean('isRegistered', isRegistered);
const self = this as any as AssetProxyOwnerContract; const self = this as any as AssetProxyOwnerContract;
const encodedData = self._strictEncodeArguments('registerAssetProxy(address,bool)', [assetProxyContract, const encodedData = self._strictEncodeArguments('registerAssetProxy(address,bool)', [assetProxyContract,
isRegistered isRegistered
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -703,7 +715,8 @@ export class AssetProxyOwnerContract extends BaseContract {
assetProxyContract: string, assetProxyContract: string,
isRegistered: boolean, isRegistered: boolean,
): string { ): string {
assert.isString('assetProxyContract', assetProxyContract);assert.isBoolean('isRegistered', isRegistered); assert.isString('assetProxyContract', assetProxyContract);
assert.isBoolean('isRegistered', isRegistered);
const self = this as any as AssetProxyOwnerContract; const self = this as any as AssetProxyOwnerContract;
const abiEncodedTransactionData = self._strictEncodeArguments('registerAssetProxy(address,bool)', [assetProxyContract, const abiEncodedTransactionData = self._strictEncodeArguments('registerAssetProxy(address,bool)', [assetProxyContract,
isRegistered isRegistered
@ -717,7 +730,8 @@ export class AssetProxyOwnerContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<void ): Promise<void
> { > {
assert.isString('assetProxyContract', assetProxyContract);assert.isBoolean('isRegistered', isRegistered); assert.isString('assetProxyContract', assetProxyContract);
assert.isBoolean('isRegistered', isRegistered);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -757,10 +771,11 @@ export class AssetProxyOwnerContract extends BaseContract {
const self = this as any as AssetProxyOwnerContract; const self = this as any as AssetProxyOwnerContract;
const encodedData = self._strictEncodeArguments('addOwner(address)', [owner const encodedData = self._strictEncodeArguments('addOwner(address)', [owner
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -802,10 +817,11 @@ export class AssetProxyOwnerContract extends BaseContract {
const self = this as any as AssetProxyOwnerContract; const self = this as any as AssetProxyOwnerContract;
const encodedData = self._strictEncodeArguments('addOwner(address)', [owner const encodedData = self._strictEncodeArguments('addOwner(address)', [owner
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -904,10 +920,11 @@ export class AssetProxyOwnerContract extends BaseContract {
const self = this as any as AssetProxyOwnerContract; const self = this as any as AssetProxyOwnerContract;
const encodedData = self._strictEncodeArguments('changeTimeLock(uint256)', [_secondsTimeLocked const encodedData = self._strictEncodeArguments('changeTimeLock(uint256)', [_secondsTimeLocked
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -949,10 +966,11 @@ export class AssetProxyOwnerContract extends BaseContract {
const self = this as any as AssetProxyOwnerContract; const self = this as any as AssetProxyOwnerContract;
const encodedData = self._strictEncodeArguments('changeTimeLock(uint256)', [_secondsTimeLocked const encodedData = self._strictEncodeArguments('changeTimeLock(uint256)', [_secondsTimeLocked
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -1122,7 +1140,6 @@ export class AssetProxyOwnerContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<string[] ): Promise<string[]
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -1161,7 +1178,10 @@ export class AssetProxyOwnerContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<BigNumber[] ): Promise<BigNumber[]
> { > {
assert.isBigNumber('from', from);assert.isBigNumber('to', to);assert.isBoolean('pending', pending);assert.isBoolean('executed', executed); assert.isBigNumber('from', from);
assert.isBigNumber('to', to);
assert.isBoolean('pending', pending);
assert.isBoolean('executed', executed);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -1237,7 +1257,6 @@ export class AssetProxyOwnerContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<BigNumber ): Promise<BigNumber
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -1275,10 +1294,11 @@ export class AssetProxyOwnerContract extends BaseContract {
const self = this as any as AssetProxyOwnerContract; const self = this as any as AssetProxyOwnerContract;
const encodedData = self._strictEncodeArguments('changeRequirement(uint256)', [_required const encodedData = self._strictEncodeArguments('changeRequirement(uint256)', [_required
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -1320,10 +1340,11 @@ export class AssetProxyOwnerContract extends BaseContract {
const self = this as any as AssetProxyOwnerContract; const self = this as any as AssetProxyOwnerContract;
const encodedData = self._strictEncodeArguments('changeRequirement(uint256)', [_required const encodedData = self._strictEncodeArguments('changeRequirement(uint256)', [_required
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -1385,10 +1406,11 @@ export class AssetProxyOwnerContract extends BaseContract {
const self = this as any as AssetProxyOwnerContract; const self = this as any as AssetProxyOwnerContract;
const encodedData = self._strictEncodeArguments('confirmTransaction(uint256)', [transactionId const encodedData = self._strictEncodeArguments('confirmTransaction(uint256)', [transactionId
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -1430,10 +1452,11 @@ export class AssetProxyOwnerContract extends BaseContract {
const self = this as any as AssetProxyOwnerContract; const self = this as any as AssetProxyOwnerContract;
const encodedData = self._strictEncodeArguments('confirmTransaction(uint256)', [transactionId const encodedData = self._strictEncodeArguments('confirmTransaction(uint256)', [transactionId
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -1493,16 +1516,19 @@ export class AssetProxyOwnerContract extends BaseContract {
data: string, data: string,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('destination', destination);assert.isBigNumber('value', value);assert.isString('data', data); assert.isString('destination', destination);
assert.isBigNumber('value', value);
assert.isString('data', data);
const self = this as any as AssetProxyOwnerContract; const self = this as any as AssetProxyOwnerContract;
const encodedData = self._strictEncodeArguments('submitTransaction(address,uint256,bytes)', [destination, const encodedData = self._strictEncodeArguments('submitTransaction(address,uint256,bytes)', [destination,
value, value,
data data
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -1524,7 +1550,9 @@ export class AssetProxyOwnerContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('destination', destination);assert.isBigNumber('value', value);assert.isString('data', data); assert.isString('destination', destination);
assert.isBigNumber('value', value);
assert.isString('data', data);
const self = this as any as AssetProxyOwnerContract; const self = this as any as AssetProxyOwnerContract;
const txHashPromise = self.submitTransaction.sendTransactionAsync(destination, const txHashPromise = self.submitTransaction.sendTransactionAsync(destination,
value, value,
@ -1548,16 +1576,19 @@ export class AssetProxyOwnerContract extends BaseContract {
data: string, data: string,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('destination', destination);assert.isBigNumber('value', value);assert.isString('data', data); assert.isString('destination', destination);
assert.isBigNumber('value', value);
assert.isString('data', data);
const self = this as any as AssetProxyOwnerContract; const self = this as any as AssetProxyOwnerContract;
const encodedData = self._strictEncodeArguments('submitTransaction(address,uint256,bytes)', [destination, const encodedData = self._strictEncodeArguments('submitTransaction(address,uint256,bytes)', [destination,
value, value,
data data
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -1570,7 +1601,9 @@ export class AssetProxyOwnerContract extends BaseContract {
value: BigNumber, value: BigNumber,
data: string, data: string,
): string { ): string {
assert.isString('destination', destination);assert.isBigNumber('value', value);assert.isString('data', data); assert.isString('destination', destination);
assert.isBigNumber('value', value);
assert.isString('data', data);
const self = this as any as AssetProxyOwnerContract; const self = this as any as AssetProxyOwnerContract;
const abiEncodedTransactionData = self._strictEncodeArguments('submitTransaction(address,uint256,bytes)', [destination, const abiEncodedTransactionData = self._strictEncodeArguments('submitTransaction(address,uint256,bytes)', [destination,
value, value,
@ -1586,7 +1619,9 @@ export class AssetProxyOwnerContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<BigNumber ): Promise<BigNumber
> { > {
assert.isString('destination', destination);assert.isBigNumber('value', value);assert.isString('data', data); assert.isString('destination', destination);
assert.isBigNumber('value', value);
assert.isString('data', data);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -1661,7 +1696,6 @@ export class AssetProxyOwnerContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<BigNumber ): Promise<BigNumber
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -1696,7 +1730,6 @@ export class AssetProxyOwnerContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<BigNumber ): Promise<BigNumber
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -1731,15 +1764,17 @@ export class AssetProxyOwnerContract extends BaseContract {
newOwner: string, newOwner: string,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('owner', owner);assert.isString('newOwner', newOwner); assert.isString('owner', owner);
assert.isString('newOwner', newOwner);
const self = this as any as AssetProxyOwnerContract; const self = this as any as AssetProxyOwnerContract;
const encodedData = self._strictEncodeArguments('replaceOwner(address,address)', [owner, const encodedData = self._strictEncodeArguments('replaceOwner(address,address)', [owner,
newOwner newOwner
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -1759,7 +1794,8 @@ export class AssetProxyOwnerContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('owner', owner);assert.isString('newOwner', newOwner); assert.isString('owner', owner);
assert.isString('newOwner', newOwner);
const self = this as any as AssetProxyOwnerContract; const self = this as any as AssetProxyOwnerContract;
const txHashPromise = self.replaceOwner.sendTransactionAsync(owner, const txHashPromise = self.replaceOwner.sendTransactionAsync(owner,
newOwner newOwner
@ -1781,15 +1817,17 @@ export class AssetProxyOwnerContract extends BaseContract {
newOwner: string, newOwner: string,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('owner', owner);assert.isString('newOwner', newOwner); assert.isString('owner', owner);
assert.isString('newOwner', newOwner);
const self = this as any as AssetProxyOwnerContract; const self = this as any as AssetProxyOwnerContract;
const encodedData = self._strictEncodeArguments('replaceOwner(address,address)', [owner, const encodedData = self._strictEncodeArguments('replaceOwner(address,address)', [owner,
newOwner newOwner
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -1801,7 +1839,8 @@ export class AssetProxyOwnerContract extends BaseContract {
owner: string, owner: string,
newOwner: string, newOwner: string,
): string { ): string {
assert.isString('owner', owner);assert.isString('newOwner', newOwner); assert.isString('owner', owner);
assert.isString('newOwner', newOwner);
const self = this as any as AssetProxyOwnerContract; const self = this as any as AssetProxyOwnerContract;
const abiEncodedTransactionData = self._strictEncodeArguments('replaceOwner(address,address)', [owner, const abiEncodedTransactionData = self._strictEncodeArguments('replaceOwner(address,address)', [owner,
newOwner newOwner
@ -1815,7 +1854,8 @@ export class AssetProxyOwnerContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<void ): Promise<void
> { > {
assert.isString('owner', owner);assert.isString('newOwner', newOwner); assert.isString('owner', owner);
assert.isString('newOwner', newOwner);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -1855,10 +1895,11 @@ export class AssetProxyOwnerContract extends BaseContract {
const self = this as any as AssetProxyOwnerContract; const self = this as any as AssetProxyOwnerContract;
const encodedData = self._strictEncodeArguments('executeTransaction(uint256)', [transactionId const encodedData = self._strictEncodeArguments('executeTransaction(uint256)', [transactionId
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -1900,10 +1941,11 @@ export class AssetProxyOwnerContract extends BaseContract {
const self = this as any as AssetProxyOwnerContract; const self = this as any as AssetProxyOwnerContract;
const encodedData = self._strictEncodeArguments('executeTransaction(uint256)', [transactionId const encodedData = self._strictEncodeArguments('executeTransaction(uint256)', [transactionId
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -1992,7 +2034,7 @@ _secondsTimeLocked
_required: BigNumber, _required: BigNumber,
_secondsTimeLocked: BigNumber, _secondsTimeLocked: BigNumber,
): Promise<AssetProxyOwnerContract> { ): Promise<AssetProxyOwnerContract> {
assert.isHexString('bytecode', bytecode); assert.isString('bytecode', bytecode);
assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [ assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,

View File

@ -36,7 +36,8 @@ export class CoordinatorContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<string ): Promise<string
> { > {
assert.isString('hash', hash);assert.isString('signature', signature); assert.isString('hash', hash);
assert.isString('signature', signature);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -150,7 +151,11 @@ export class CoordinatorContract extends BaseContract {
approvalSignatures: string[], approvalSignatures: string[],
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('txOrigin', txOrigin);assert.isString('transactionSignature', transactionSignature);assert.isArray('approvalExpirationTimeSeconds', approvalExpirationTimeSeconds);assert.isArray('approvalSignatures', approvalSignatures);
assert.isString('txOrigin', txOrigin);
assert.isString('transactionSignature', transactionSignature);
assert.isArray('approvalExpirationTimeSeconds', approvalExpirationTimeSeconds);
assert.isArray('approvalSignatures', approvalSignatures);
const self = this as any as CoordinatorContract; const self = this as any as CoordinatorContract;
const encodedData = self._strictEncodeArguments('executeTransaction((uint256,address,bytes),address,bytes,uint256[],bytes[])', [transaction, const encodedData = self._strictEncodeArguments('executeTransaction((uint256,address,bytes),address,bytes,uint256[],bytes[])', [transaction,
txOrigin, txOrigin,
@ -158,10 +163,11 @@ export class CoordinatorContract extends BaseContract {
approvalExpirationTimeSeconds, approvalExpirationTimeSeconds,
approvalSignatures approvalSignatures
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -187,7 +193,11 @@ export class CoordinatorContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('txOrigin', txOrigin);assert.isString('transactionSignature', transactionSignature);assert.isArray('approvalExpirationTimeSeconds', approvalExpirationTimeSeconds);assert.isArray('approvalSignatures', approvalSignatures);
assert.isString('txOrigin', txOrigin);
assert.isString('transactionSignature', transactionSignature);
assert.isArray('approvalExpirationTimeSeconds', approvalExpirationTimeSeconds);
assert.isArray('approvalSignatures', approvalSignatures);
const self = this as any as CoordinatorContract; const self = this as any as CoordinatorContract;
const txHashPromise = self.executeTransaction.sendTransactionAsync(transaction, const txHashPromise = self.executeTransaction.sendTransactionAsync(transaction,
txOrigin, txOrigin,
@ -215,7 +225,11 @@ export class CoordinatorContract extends BaseContract {
approvalSignatures: string[], approvalSignatures: string[],
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('txOrigin', txOrigin);assert.isString('transactionSignature', transactionSignature);assert.isArray('approvalExpirationTimeSeconds', approvalExpirationTimeSeconds);assert.isArray('approvalSignatures', approvalSignatures);
assert.isString('txOrigin', txOrigin);
assert.isString('transactionSignature', transactionSignature);
assert.isArray('approvalExpirationTimeSeconds', approvalExpirationTimeSeconds);
assert.isArray('approvalSignatures', approvalSignatures);
const self = this as any as CoordinatorContract; const self = this as any as CoordinatorContract;
const encodedData = self._strictEncodeArguments('executeTransaction((uint256,address,bytes),address,bytes,uint256[],bytes[])', [transaction, const encodedData = self._strictEncodeArguments('executeTransaction((uint256,address,bytes),address,bytes,uint256[],bytes[])', [transaction,
txOrigin, txOrigin,
@ -223,10 +237,11 @@ export class CoordinatorContract extends BaseContract {
approvalExpirationTimeSeconds, approvalExpirationTimeSeconds,
approvalSignatures approvalSignatures
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -241,7 +256,11 @@ export class CoordinatorContract extends BaseContract {
approvalExpirationTimeSeconds: BigNumber[], approvalExpirationTimeSeconds: BigNumber[],
approvalSignatures: string[], approvalSignatures: string[],
): string { ): string {
assert.isString('txOrigin', txOrigin);assert.isString('transactionSignature', transactionSignature);assert.isArray('approvalExpirationTimeSeconds', approvalExpirationTimeSeconds);assert.isArray('approvalSignatures', approvalSignatures);
assert.isString('txOrigin', txOrigin);
assert.isString('transactionSignature', transactionSignature);
assert.isArray('approvalExpirationTimeSeconds', approvalExpirationTimeSeconds);
assert.isArray('approvalSignatures', approvalSignatures);
const self = this as any as CoordinatorContract; const self = this as any as CoordinatorContract;
const abiEncodedTransactionData = self._strictEncodeArguments('executeTransaction((uint256,address,bytes),address,bytes,uint256[],bytes[])', [transaction, const abiEncodedTransactionData = self._strictEncodeArguments('executeTransaction((uint256,address,bytes),address,bytes,uint256[],bytes[])', [transaction,
txOrigin, txOrigin,
@ -261,7 +280,11 @@ export class CoordinatorContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<void ): Promise<void
> { > {
assert.isString('txOrigin', txOrigin);assert.isString('transactionSignature', transactionSignature);assert.isArray('approvalExpirationTimeSeconds', approvalExpirationTimeSeconds);assert.isArray('approvalSignatures', approvalSignatures);
assert.isString('txOrigin', txOrigin);
assert.isString('transactionSignature', transactionSignature);
assert.isArray('approvalExpirationTimeSeconds', approvalExpirationTimeSeconds);
assert.isArray('approvalSignatures', approvalSignatures);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -301,7 +324,6 @@ export class CoordinatorContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<string ): Promise<string
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -341,7 +363,11 @@ export class CoordinatorContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<void ): Promise<void
> { > {
assert.isString('txOrigin', txOrigin);assert.isString('transactionSignature', transactionSignature);assert.isArray('approvalExpirationTimeSeconds', approvalExpirationTimeSeconds);assert.isArray('approvalSignatures', approvalSignatures);
assert.isString('txOrigin', txOrigin);
assert.isString('transactionSignature', transactionSignature);
assert.isArray('approvalExpirationTimeSeconds', approvalExpirationTimeSeconds);
assert.isArray('approvalSignatures', approvalSignatures);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -418,7 +444,6 @@ export class CoordinatorContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<string ): Promise<string
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -474,7 +499,7 @@ export class CoordinatorContract extends BaseContract {
txDefaults: Partial<TxData>, txDefaults: Partial<TxData>,
_exchange: string, _exchange: string,
): Promise<CoordinatorContract> { ): Promise<CoordinatorContract> {
assert.isHexString('bytecode', bytecode); assert.isString('bytecode', bytecode);
assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [ assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,

View File

@ -49,10 +49,11 @@ export class CoordinatorRegistryContract extends BaseContract {
const self = this as any as CoordinatorRegistryContract; const self = this as any as CoordinatorRegistryContract;
const encodedData = self._strictEncodeArguments('setCoordinatorEndpoint(string)', [coordinatorEndpoint const encodedData = self._strictEncodeArguments('setCoordinatorEndpoint(string)', [coordinatorEndpoint
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -94,10 +95,11 @@ export class CoordinatorRegistryContract extends BaseContract {
const self = this as any as CoordinatorRegistryContract; const self = this as any as CoordinatorRegistryContract;
const encodedData = self._strictEncodeArguments('setCoordinatorEndpoint(string)', [coordinatorEndpoint const encodedData = self._strictEncodeArguments('setCoordinatorEndpoint(string)', [coordinatorEndpoint
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),

View File

@ -55,7 +55,6 @@ export class DummyERC20TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<string ): Promise<string
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -90,15 +89,17 @@ export class DummyERC20TokenContract extends BaseContract {
_value: BigNumber, _value: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('_spender', _spender);assert.isBigNumber('_value', _value); assert.isString('_spender', _spender);
assert.isBigNumber('_value', _value);
const self = this as any as DummyERC20TokenContract; const self = this as any as DummyERC20TokenContract;
const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_spender, const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_spender,
_value _value
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -118,7 +119,8 @@ export class DummyERC20TokenContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('_spender', _spender);assert.isBigNumber('_value', _value); assert.isString('_spender', _spender);
assert.isBigNumber('_value', _value);
const self = this as any as DummyERC20TokenContract; const self = this as any as DummyERC20TokenContract;
const txHashPromise = self.approve.sendTransactionAsync(_spender, const txHashPromise = self.approve.sendTransactionAsync(_spender,
_value _value
@ -140,15 +142,17 @@ export class DummyERC20TokenContract extends BaseContract {
_value: BigNumber, _value: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('_spender', _spender);assert.isBigNumber('_value', _value); assert.isString('_spender', _spender);
assert.isBigNumber('_value', _value);
const self = this as any as DummyERC20TokenContract; const self = this as any as DummyERC20TokenContract;
const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_spender, const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_spender,
_value _value
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -160,7 +164,8 @@ export class DummyERC20TokenContract extends BaseContract {
_spender: string, _spender: string,
_value: BigNumber, _value: BigNumber,
): string { ): string {
assert.isString('_spender', _spender);assert.isBigNumber('_value', _value); assert.isString('_spender', _spender);
assert.isBigNumber('_value', _value);
const self = this as any as DummyERC20TokenContract; const self = this as any as DummyERC20TokenContract;
const abiEncodedTransactionData = self._strictEncodeArguments('approve(address,uint256)', [_spender, const abiEncodedTransactionData = self._strictEncodeArguments('approve(address,uint256)', [_spender,
_value _value
@ -174,7 +179,8 @@ export class DummyERC20TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<boolean ): Promise<boolean
> { > {
assert.isString('_spender', _spender);assert.isBigNumber('_value', _value); assert.isString('_spender', _spender);
assert.isBigNumber('_value', _value);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -211,7 +217,6 @@ export class DummyERC20TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<BigNumber ): Promise<BigNumber
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -247,16 +252,19 @@ export class DummyERC20TokenContract extends BaseContract {
_value: BigNumber, _value: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
const self = this as any as DummyERC20TokenContract; const self = this as any as DummyERC20TokenContract;
const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from,
_to, _to,
_value _value
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -278,7 +286,9 @@ export class DummyERC20TokenContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
const self = this as any as DummyERC20TokenContract; const self = this as any as DummyERC20TokenContract;
const txHashPromise = self.transferFrom.sendTransactionAsync(_from, const txHashPromise = self.transferFrom.sendTransactionAsync(_from,
_to, _to,
@ -302,16 +312,19 @@ export class DummyERC20TokenContract extends BaseContract {
_value: BigNumber, _value: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
const self = this as any as DummyERC20TokenContract; const self = this as any as DummyERC20TokenContract;
const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from,
_to, _to,
_value _value
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -324,7 +337,9 @@ export class DummyERC20TokenContract extends BaseContract {
_to: string, _to: string,
_value: BigNumber, _value: BigNumber,
): string { ): string {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
const self = this as any as DummyERC20TokenContract; const self = this as any as DummyERC20TokenContract;
const abiEncodedTransactionData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, const abiEncodedTransactionData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from,
_to, _to,
@ -340,7 +355,9 @@ export class DummyERC20TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<boolean ): Promise<boolean
> { > {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -378,7 +395,6 @@ export class DummyERC20TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<BigNumber ): Promise<BigNumber
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -450,7 +466,6 @@ export class DummyERC20TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<string ): Promise<string
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -485,7 +500,6 @@ export class DummyERC20TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<string ): Promise<string
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -523,10 +537,11 @@ export class DummyERC20TokenContract extends BaseContract {
const self = this as any as DummyERC20TokenContract; const self = this as any as DummyERC20TokenContract;
const encodedData = self._strictEncodeArguments('mint(uint256)', [_value const encodedData = self._strictEncodeArguments('mint(uint256)', [_value
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -568,10 +583,11 @@ export class DummyERC20TokenContract extends BaseContract {
const self = this as any as DummyERC20TokenContract; const self = this as any as DummyERC20TokenContract;
const encodedData = self._strictEncodeArguments('mint(uint256)', [_value const encodedData = self._strictEncodeArguments('mint(uint256)', [_value
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -630,15 +646,17 @@ export class DummyERC20TokenContract extends BaseContract {
_value: BigNumber, _value: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
const self = this as any as DummyERC20TokenContract; const self = this as any as DummyERC20TokenContract;
const encodedData = self._strictEncodeArguments('transfer(address,uint256)', [_to, const encodedData = self._strictEncodeArguments('transfer(address,uint256)', [_to,
_value _value
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -658,7 +676,8 @@ export class DummyERC20TokenContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
const self = this as any as DummyERC20TokenContract; const self = this as any as DummyERC20TokenContract;
const txHashPromise = self.transfer.sendTransactionAsync(_to, const txHashPromise = self.transfer.sendTransactionAsync(_to,
_value _value
@ -680,15 +699,17 @@ export class DummyERC20TokenContract extends BaseContract {
_value: BigNumber, _value: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
const self = this as any as DummyERC20TokenContract; const self = this as any as DummyERC20TokenContract;
const encodedData = self._strictEncodeArguments('transfer(address,uint256)', [_to, const encodedData = self._strictEncodeArguments('transfer(address,uint256)', [_to,
_value _value
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -700,7 +721,8 @@ export class DummyERC20TokenContract extends BaseContract {
_to: string, _to: string,
_value: BigNumber, _value: BigNumber,
): string { ): string {
assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
const self = this as any as DummyERC20TokenContract; const self = this as any as DummyERC20TokenContract;
const abiEncodedTransactionData = self._strictEncodeArguments('transfer(address,uint256)', [_to, const abiEncodedTransactionData = self._strictEncodeArguments('transfer(address,uint256)', [_to,
_value _value
@ -714,7 +736,8 @@ export class DummyERC20TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<boolean ): Promise<boolean
> { > {
assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -753,7 +776,8 @@ export class DummyERC20TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<BigNumber ): Promise<BigNumber
> { > {
assert.isString('_owner', _owner);assert.isString('_spender', _spender); assert.isString('_owner', _owner);
assert.isString('_spender', _spender);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -790,15 +814,17 @@ export class DummyERC20TokenContract extends BaseContract {
_value: BigNumber, _value: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('_target', _target);assert.isBigNumber('_value', _value); assert.isString('_target', _target);
assert.isBigNumber('_value', _value);
const self = this as any as DummyERC20TokenContract; const self = this as any as DummyERC20TokenContract;
const encodedData = self._strictEncodeArguments('setBalance(address,uint256)', [_target, const encodedData = self._strictEncodeArguments('setBalance(address,uint256)', [_target,
_value _value
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -818,7 +844,8 @@ export class DummyERC20TokenContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('_target', _target);assert.isBigNumber('_value', _value); assert.isString('_target', _target);
assert.isBigNumber('_value', _value);
const self = this as any as DummyERC20TokenContract; const self = this as any as DummyERC20TokenContract;
const txHashPromise = self.setBalance.sendTransactionAsync(_target, const txHashPromise = self.setBalance.sendTransactionAsync(_target,
_value _value
@ -840,15 +867,17 @@ export class DummyERC20TokenContract extends BaseContract {
_value: BigNumber, _value: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('_target', _target);assert.isBigNumber('_value', _value); assert.isString('_target', _target);
assert.isBigNumber('_value', _value);
const self = this as any as DummyERC20TokenContract; const self = this as any as DummyERC20TokenContract;
const encodedData = self._strictEncodeArguments('setBalance(address,uint256)', [_target, const encodedData = self._strictEncodeArguments('setBalance(address,uint256)', [_target,
_value _value
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -860,7 +889,8 @@ export class DummyERC20TokenContract extends BaseContract {
_target: string, _target: string,
_value: BigNumber, _value: BigNumber,
): string { ): string {
assert.isString('_target', _target);assert.isBigNumber('_value', _value); assert.isString('_target', _target);
assert.isBigNumber('_value', _value);
const self = this as any as DummyERC20TokenContract; const self = this as any as DummyERC20TokenContract;
const abiEncodedTransactionData = self._strictEncodeArguments('setBalance(address,uint256)', [_target, const abiEncodedTransactionData = self._strictEncodeArguments('setBalance(address,uint256)', [_target,
_value _value
@ -874,7 +904,8 @@ export class DummyERC20TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<void ): Promise<void
> { > {
assert.isString('_target', _target);assert.isBigNumber('_value', _value); assert.isString('_target', _target);
assert.isBigNumber('_value', _value);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -914,10 +945,11 @@ export class DummyERC20TokenContract extends BaseContract {
const self = this as any as DummyERC20TokenContract; const self = this as any as DummyERC20TokenContract;
const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -959,10 +991,11 @@ export class DummyERC20TokenContract extends BaseContract {
const self = this as any as DummyERC20TokenContract; const self = this as any as DummyERC20TokenContract;
const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -1021,7 +1054,6 @@ export class DummyERC20TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<BigNumber ): Promise<BigNumber
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -1086,7 +1118,7 @@ _totalSupply
_decimals: BigNumber, _decimals: BigNumber,
_totalSupply: BigNumber, _totalSupply: BigNumber,
): Promise<DummyERC20TokenContract> { ): Promise<DummyERC20TokenContract> {
assert.isHexString('bytecode', bytecode); assert.isString('bytecode', bytecode);
assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [ assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,

View File

@ -63,7 +63,6 @@ export class DummyERC721TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<string ): Promise<string
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -135,15 +134,17 @@ export class DummyERC721TokenContract extends BaseContract {
_tokenId: BigNumber, _tokenId: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('_approved', _approved);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_approved', _approved);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_approved, const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_approved,
_tokenId _tokenId
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -163,7 +164,8 @@ export class DummyERC721TokenContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('_approved', _approved);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_approved', _approved);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const txHashPromise = self.approve.sendTransactionAsync(_approved, const txHashPromise = self.approve.sendTransactionAsync(_approved,
_tokenId _tokenId
@ -185,15 +187,17 @@ export class DummyERC721TokenContract extends BaseContract {
_tokenId: BigNumber, _tokenId: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('_approved', _approved);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_approved', _approved);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_approved, const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_approved,
_tokenId _tokenId
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -205,7 +209,8 @@ export class DummyERC721TokenContract extends BaseContract {
_approved: string, _approved: string,
_tokenId: BigNumber, _tokenId: BigNumber,
): string { ): string {
assert.isString('_approved', _approved);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_approved', _approved);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const abiEncodedTransactionData = self._strictEncodeArguments('approve(address,uint256)', [_approved, const abiEncodedTransactionData = self._strictEncodeArguments('approve(address,uint256)', [_approved,
_tokenId _tokenId
@ -219,7 +224,8 @@ export class DummyERC721TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<void ): Promise<void
> { > {
assert.isString('_approved', _approved);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_approved', _approved);
assert.isBigNumber('_tokenId', _tokenId);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -257,16 +263,19 @@ export class DummyERC721TokenContract extends BaseContract {
_tokenId: BigNumber, _tokenId: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from,
_to, _to,
_tokenId _tokenId
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -288,7 +297,9 @@ export class DummyERC721TokenContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const txHashPromise = self.transferFrom.sendTransactionAsync(_from, const txHashPromise = self.transferFrom.sendTransactionAsync(_from,
_to, _to,
@ -312,16 +323,19 @@ export class DummyERC721TokenContract extends BaseContract {
_tokenId: BigNumber, _tokenId: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from,
_to, _to,
_tokenId _tokenId
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -334,7 +348,9 @@ export class DummyERC721TokenContract extends BaseContract {
_to: string, _to: string,
_tokenId: BigNumber, _tokenId: BigNumber,
): string { ): string {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const abiEncodedTransactionData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, const abiEncodedTransactionData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from,
_to, _to,
@ -350,7 +366,9 @@ export class DummyERC721TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<void ): Promise<void
> { > {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -388,15 +406,17 @@ export class DummyERC721TokenContract extends BaseContract {
_tokenId: BigNumber, _tokenId: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const encodedData = self._strictEncodeArguments('mint(address,uint256)', [_to, const encodedData = self._strictEncodeArguments('mint(address,uint256)', [_to,
_tokenId _tokenId
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -416,7 +436,8 @@ export class DummyERC721TokenContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const txHashPromise = self.mint.sendTransactionAsync(_to, const txHashPromise = self.mint.sendTransactionAsync(_to,
_tokenId _tokenId
@ -438,15 +459,17 @@ export class DummyERC721TokenContract extends BaseContract {
_tokenId: BigNumber, _tokenId: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const encodedData = self._strictEncodeArguments('mint(address,uint256)', [_to, const encodedData = self._strictEncodeArguments('mint(address,uint256)', [_to,
_tokenId _tokenId
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -458,7 +481,8 @@ export class DummyERC721TokenContract extends BaseContract {
_to: string, _to: string,
_tokenId: BigNumber, _tokenId: BigNumber,
): string { ): string {
assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const abiEncodedTransactionData = self._strictEncodeArguments('mint(address,uint256)', [_to, const abiEncodedTransactionData = self._strictEncodeArguments('mint(address,uint256)', [_to,
_tokenId _tokenId
@ -472,7 +496,8 @@ export class DummyERC721TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<void ): Promise<void
> { > {
assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -510,16 +535,19 @@ export class DummyERC721TokenContract extends BaseContract {
_tokenId: BigNumber, _tokenId: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const encodedData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256)', [_from, const encodedData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256)', [_from,
_to, _to,
_tokenId _tokenId
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -541,7 +569,9 @@ export class DummyERC721TokenContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const txHashPromise = self.safeTransferFrom1.sendTransactionAsync(_from, const txHashPromise = self.safeTransferFrom1.sendTransactionAsync(_from,
_to, _to,
@ -565,16 +595,19 @@ export class DummyERC721TokenContract extends BaseContract {
_tokenId: BigNumber, _tokenId: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const encodedData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256)', [_from, const encodedData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256)', [_from,
_to, _to,
_tokenId _tokenId
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -587,7 +620,9 @@ export class DummyERC721TokenContract extends BaseContract {
_to: string, _to: string,
_tokenId: BigNumber, _tokenId: BigNumber,
): string { ): string {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const abiEncodedTransactionData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256)', [_from, const abiEncodedTransactionData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256)', [_from,
_to, _to,
@ -603,7 +638,9 @@ export class DummyERC721TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<void ): Promise<void
> { > {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -715,7 +752,6 @@ export class DummyERC721TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<string ): Promise<string
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -750,7 +786,6 @@ export class DummyERC721TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<string ): Promise<string
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -785,15 +820,17 @@ export class DummyERC721TokenContract extends BaseContract {
_tokenId: BigNumber, _tokenId: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('_owner', _owner);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_owner', _owner);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const encodedData = self._strictEncodeArguments('burn(address,uint256)', [_owner, const encodedData = self._strictEncodeArguments('burn(address,uint256)', [_owner,
_tokenId _tokenId
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -813,7 +850,8 @@ export class DummyERC721TokenContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('_owner', _owner);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_owner', _owner);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const txHashPromise = self.burn.sendTransactionAsync(_owner, const txHashPromise = self.burn.sendTransactionAsync(_owner,
_tokenId _tokenId
@ -835,15 +873,17 @@ export class DummyERC721TokenContract extends BaseContract {
_tokenId: BigNumber, _tokenId: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('_owner', _owner);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_owner', _owner);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const encodedData = self._strictEncodeArguments('burn(address,uint256)', [_owner, const encodedData = self._strictEncodeArguments('burn(address,uint256)', [_owner,
_tokenId _tokenId
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -855,7 +895,8 @@ export class DummyERC721TokenContract extends BaseContract {
_owner: string, _owner: string,
_tokenId: BigNumber, _tokenId: BigNumber,
): string { ): string {
assert.isString('_owner', _owner);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_owner', _owner);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const abiEncodedTransactionData = self._strictEncodeArguments('burn(address,uint256)', [_owner, const abiEncodedTransactionData = self._strictEncodeArguments('burn(address,uint256)', [_owner,
_tokenId _tokenId
@ -869,7 +910,8 @@ export class DummyERC721TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<void ): Promise<void
> { > {
assert.isString('_owner', _owner);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_owner', _owner);
assert.isBigNumber('_tokenId', _tokenId);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -906,15 +948,17 @@ export class DummyERC721TokenContract extends BaseContract {
_approved: boolean, _approved: boolean,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('_operator', _operator);assert.isBoolean('_approved', _approved); assert.isString('_operator', _operator);
assert.isBoolean('_approved', _approved);
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const encodedData = self._strictEncodeArguments('setApprovalForAll(address,bool)', [_operator, const encodedData = self._strictEncodeArguments('setApprovalForAll(address,bool)', [_operator,
_approved _approved
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -934,7 +978,8 @@ export class DummyERC721TokenContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('_operator', _operator);assert.isBoolean('_approved', _approved); assert.isString('_operator', _operator);
assert.isBoolean('_approved', _approved);
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const txHashPromise = self.setApprovalForAll.sendTransactionAsync(_operator, const txHashPromise = self.setApprovalForAll.sendTransactionAsync(_operator,
_approved _approved
@ -956,15 +1001,17 @@ export class DummyERC721TokenContract extends BaseContract {
_approved: boolean, _approved: boolean,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('_operator', _operator);assert.isBoolean('_approved', _approved); assert.isString('_operator', _operator);
assert.isBoolean('_approved', _approved);
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const encodedData = self._strictEncodeArguments('setApprovalForAll(address,bool)', [_operator, const encodedData = self._strictEncodeArguments('setApprovalForAll(address,bool)', [_operator,
_approved _approved
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -976,7 +1023,8 @@ export class DummyERC721TokenContract extends BaseContract {
_operator: string, _operator: string,
_approved: boolean, _approved: boolean,
): string { ): string {
assert.isString('_operator', _operator);assert.isBoolean('_approved', _approved); assert.isString('_operator', _operator);
assert.isBoolean('_approved', _approved);
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const abiEncodedTransactionData = self._strictEncodeArguments('setApprovalForAll(address,bool)', [_operator, const abiEncodedTransactionData = self._strictEncodeArguments('setApprovalForAll(address,bool)', [_operator,
_approved _approved
@ -990,7 +1038,8 @@ export class DummyERC721TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<void ): Promise<void
> { > {
assert.isString('_operator', _operator);assert.isBoolean('_approved', _approved); assert.isString('_operator', _operator);
assert.isBoolean('_approved', _approved);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -1029,17 +1078,21 @@ export class DummyERC721TokenContract extends BaseContract {
_data: string, _data: string,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId);assert.isString('_data', _data); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
assert.isString('_data', _data);
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const encodedData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256,bytes)', [_from, const encodedData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256,bytes)', [_from,
_to, _to,
_tokenId, _tokenId,
_data _data
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -1063,7 +1116,10 @@ export class DummyERC721TokenContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId);assert.isString('_data', _data); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
assert.isString('_data', _data);
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const txHashPromise = self.safeTransferFrom2.sendTransactionAsync(_from, const txHashPromise = self.safeTransferFrom2.sendTransactionAsync(_from,
_to, _to,
@ -1089,17 +1145,21 @@ export class DummyERC721TokenContract extends BaseContract {
_data: string, _data: string,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId);assert.isString('_data', _data); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
assert.isString('_data', _data);
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const encodedData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256,bytes)', [_from, const encodedData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256,bytes)', [_from,
_to, _to,
_tokenId, _tokenId,
_data _data
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -1113,7 +1173,10 @@ export class DummyERC721TokenContract extends BaseContract {
_tokenId: BigNumber, _tokenId: BigNumber,
_data: string, _data: string,
): string { ): string {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId);assert.isString('_data', _data); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
assert.isString('_data', _data);
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const abiEncodedTransactionData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256,bytes)', [_from, const abiEncodedTransactionData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256,bytes)', [_from,
_to, _to,
@ -1131,7 +1194,10 @@ export class DummyERC721TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<void ): Promise<void
> { > {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId);assert.isString('_data', _data); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
assert.isString('_data', _data);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -1172,7 +1238,8 @@ export class DummyERC721TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<boolean ): Promise<boolean
> { > {
assert.isString('_owner', _owner);assert.isString('_operator', _operator); assert.isString('_owner', _owner);
assert.isString('_operator', _operator);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -1212,10 +1279,11 @@ export class DummyERC721TokenContract extends BaseContract {
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -1257,10 +1325,11 @@ export class DummyERC721TokenContract extends BaseContract {
const self = this as any as DummyERC721TokenContract; const self = this as any as DummyERC721TokenContract;
const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -1343,7 +1412,7 @@ _symbol
_name: string, _name: string,
_symbol: string, _symbol: string,
): Promise<DummyERC721TokenContract> { ): Promise<DummyERC721TokenContract> {
assert.isHexString('bytecode', bytecode); assert.isString('bytecode', bytecode);
assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [ assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,

View File

@ -37,10 +37,11 @@ export class DutchAuctionContract extends BaseContract {
const self = this as any as DutchAuctionContract; const self = this as any as DutchAuctionContract;
const encodedData = self._strictEncodeArguments('getAuctionDetails((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))', [order const encodedData = self._strictEncodeArguments('getAuctionDetails((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))', [order
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -82,10 +83,11 @@ export class DutchAuctionContract extends BaseContract {
const self = this as any as DutchAuctionContract; const self = this as any as DutchAuctionContract;
const encodedData = self._strictEncodeArguments('getAuctionDetails((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))', [order const encodedData = self._strictEncodeArguments('getAuctionDetails((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))', [order
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -146,17 +148,21 @@ export class DutchAuctionContract extends BaseContract {
sellSignature: string, sellSignature: string,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('buySignature', buySignature);assert.isString('sellSignature', sellSignature);
assert.isString('buySignature', buySignature);
assert.isString('sellSignature', sellSignature);
const self = this as any as DutchAuctionContract; const self = this as any as DutchAuctionContract;
const encodedData = self._strictEncodeArguments('matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes,bytes)', [buyOrder, const encodedData = self._strictEncodeArguments('matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes,bytes)', [buyOrder,
sellOrder, sellOrder,
buySignature, buySignature,
sellSignature sellSignature
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -180,7 +186,10 @@ export class DutchAuctionContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('buySignature', buySignature);assert.isString('sellSignature', sellSignature);
assert.isString('buySignature', buySignature);
assert.isString('sellSignature', sellSignature);
const self = this as any as DutchAuctionContract; const self = this as any as DutchAuctionContract;
const txHashPromise = self.matchOrders.sendTransactionAsync(buyOrder, const txHashPromise = self.matchOrders.sendTransactionAsync(buyOrder,
sellOrder, sellOrder,
@ -206,17 +215,21 @@ export class DutchAuctionContract extends BaseContract {
sellSignature: string, sellSignature: string,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('buySignature', buySignature);assert.isString('sellSignature', sellSignature);
assert.isString('buySignature', buySignature);
assert.isString('sellSignature', sellSignature);
const self = this as any as DutchAuctionContract; const self = this as any as DutchAuctionContract;
const encodedData = self._strictEncodeArguments('matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes,bytes)', [buyOrder, const encodedData = self._strictEncodeArguments('matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes,bytes)', [buyOrder,
sellOrder, sellOrder,
buySignature, buySignature,
sellSignature sellSignature
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -230,7 +243,10 @@ export class DutchAuctionContract extends BaseContract {
buySignature: string, buySignature: string,
sellSignature: string, sellSignature: string,
): string { ): string {
assert.isString('buySignature', buySignature);assert.isString('sellSignature', sellSignature);
assert.isString('buySignature', buySignature);
assert.isString('sellSignature', sellSignature);
const self = this as any as DutchAuctionContract; const self = this as any as DutchAuctionContract;
const abiEncodedTransactionData = self._strictEncodeArguments('matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes,bytes)', [buyOrder, const abiEncodedTransactionData = self._strictEncodeArguments('matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes,bytes)', [buyOrder,
sellOrder, sellOrder,
@ -248,7 +264,10 @@ export class DutchAuctionContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<{left: {makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber};right: {makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber};leftMakerAssetSpreadAmount: BigNumber} ): Promise<{left: {makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber};right: {makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber};leftMakerAssetSpreadAmount: BigNumber}
> { > {
assert.isString('buySignature', buySignature);assert.isString('sellSignature', sellSignature);
assert.isString('buySignature', buySignature);
assert.isString('sellSignature', sellSignature);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -308,7 +327,7 @@ export class DutchAuctionContract extends BaseContract {
txDefaults: Partial<TxData>, txDefaults: Partial<TxData>,
_exchange: string, _exchange: string,
): Promise<DutchAuctionContract> { ): Promise<DutchAuctionContract> {
assert.isHexString('bytecode', bytecode); assert.isString('bytecode', bytecode);
assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [ assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,

View File

@ -56,10 +56,11 @@ export class ERC20ProxyContract extends BaseContract {
const self = this as any as ERC20ProxyContract; const self = this as any as ERC20ProxyContract;
const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -101,10 +102,11 @@ export class ERC20ProxyContract extends BaseContract {
const self = this as any as ERC20ProxyContract; const self = this as any as ERC20ProxyContract;
const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -203,10 +205,11 @@ export class ERC20ProxyContract extends BaseContract {
const self = this as any as ERC20ProxyContract; const self = this as any as ERC20ProxyContract;
const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -248,10 +251,11 @@ export class ERC20ProxyContract extends BaseContract {
const self = this as any as ERC20ProxyContract; const self = this as any as ERC20ProxyContract;
const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -310,7 +314,6 @@ export class ERC20ProxyContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<string ): Promise<string
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -345,15 +348,17 @@ export class ERC20ProxyContract extends BaseContract {
index: BigNumber, index: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('target', target);assert.isBigNumber('index', index); assert.isString('target', target);
assert.isBigNumber('index', index);
const self = this as any as ERC20ProxyContract; const self = this as any as ERC20ProxyContract;
const encodedData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target, const encodedData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target,
index index
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -373,7 +378,8 @@ export class ERC20ProxyContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('target', target);assert.isBigNumber('index', index); assert.isString('target', target);
assert.isBigNumber('index', index);
const self = this as any as ERC20ProxyContract; const self = this as any as ERC20ProxyContract;
const txHashPromise = self.removeAuthorizedAddressAtIndex.sendTransactionAsync(target, const txHashPromise = self.removeAuthorizedAddressAtIndex.sendTransactionAsync(target,
index index
@ -395,15 +401,17 @@ export class ERC20ProxyContract extends BaseContract {
index: BigNumber, index: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('target', target);assert.isBigNumber('index', index); assert.isString('target', target);
assert.isBigNumber('index', index);
const self = this as any as ERC20ProxyContract; const self = this as any as ERC20ProxyContract;
const encodedData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target, const encodedData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target,
index index
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -415,7 +423,8 @@ export class ERC20ProxyContract extends BaseContract {
target: string, target: string,
index: BigNumber, index: BigNumber,
): string { ): string {
assert.isString('target', target);assert.isBigNumber('index', index); assert.isString('target', target);
assert.isBigNumber('index', index);
const self = this as any as ERC20ProxyContract; const self = this as any as ERC20ProxyContract;
const abiEncodedTransactionData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target, const abiEncodedTransactionData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target,
index index
@ -429,7 +438,8 @@ export class ERC20ProxyContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<void ): Promise<void
> { > {
assert.isString('target', target);assert.isBigNumber('index', index); assert.isString('target', target);
assert.isBigNumber('index', index);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -466,7 +476,6 @@ export class ERC20ProxyContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<string ): Promise<string
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -538,7 +547,6 @@ export class ERC20ProxyContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<string[] ): Promise<string[]
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -576,10 +584,11 @@ export class ERC20ProxyContract extends BaseContract {
const self = this as any as ERC20ProxyContract; const self = this as any as ERC20ProxyContract;
const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -621,10 +630,11 @@ export class ERC20ProxyContract extends BaseContract {
const self = this as any as ERC20ProxyContract; const self = this as any as ERC20ProxyContract;
const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -701,7 +711,7 @@ export class ERC20ProxyContract extends BaseContract {
supportedProvider: SupportedProvider, supportedProvider: SupportedProvider,
txDefaults: Partial<TxData>, txDefaults: Partial<TxData>,
): Promise<ERC20ProxyContract> { ): Promise<ERC20ProxyContract> {
assert.isHexString('bytecode', bytecode); assert.isString('bytecode', bytecode);
assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [ assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,

View File

@ -55,15 +55,17 @@ export class ERC20TokenContract extends BaseContract {
_value: BigNumber, _value: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('_spender', _spender);assert.isBigNumber('_value', _value); assert.isString('_spender', _spender);
assert.isBigNumber('_value', _value);
const self = this as any as ERC20TokenContract; const self = this as any as ERC20TokenContract;
const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_spender, const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_spender,
_value _value
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -83,7 +85,8 @@ export class ERC20TokenContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('_spender', _spender);assert.isBigNumber('_value', _value); assert.isString('_spender', _spender);
assert.isBigNumber('_value', _value);
const self = this as any as ERC20TokenContract; const self = this as any as ERC20TokenContract;
const txHashPromise = self.approve.sendTransactionAsync(_spender, const txHashPromise = self.approve.sendTransactionAsync(_spender,
_value _value
@ -105,15 +108,17 @@ export class ERC20TokenContract extends BaseContract {
_value: BigNumber, _value: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('_spender', _spender);assert.isBigNumber('_value', _value); assert.isString('_spender', _spender);
assert.isBigNumber('_value', _value);
const self = this as any as ERC20TokenContract; const self = this as any as ERC20TokenContract;
const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_spender, const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_spender,
_value _value
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -125,7 +130,8 @@ export class ERC20TokenContract extends BaseContract {
_spender: string, _spender: string,
_value: BigNumber, _value: BigNumber,
): string { ): string {
assert.isString('_spender', _spender);assert.isBigNumber('_value', _value); assert.isString('_spender', _spender);
assert.isBigNumber('_value', _value);
const self = this as any as ERC20TokenContract; const self = this as any as ERC20TokenContract;
const abiEncodedTransactionData = self._strictEncodeArguments('approve(address,uint256)', [_spender, const abiEncodedTransactionData = self._strictEncodeArguments('approve(address,uint256)', [_spender,
_value _value
@ -139,7 +145,8 @@ export class ERC20TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<boolean ): Promise<boolean
> { > {
assert.isString('_spender', _spender);assert.isBigNumber('_value', _value); assert.isString('_spender', _spender);
assert.isBigNumber('_value', _value);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -176,7 +183,6 @@ export class ERC20TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<BigNumber ): Promise<BigNumber
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -212,16 +218,19 @@ export class ERC20TokenContract extends BaseContract {
_value: BigNumber, _value: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
const self = this as any as ERC20TokenContract; const self = this as any as ERC20TokenContract;
const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from,
_to, _to,
_value _value
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -243,7 +252,9 @@ export class ERC20TokenContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
const self = this as any as ERC20TokenContract; const self = this as any as ERC20TokenContract;
const txHashPromise = self.transferFrom.sendTransactionAsync(_from, const txHashPromise = self.transferFrom.sendTransactionAsync(_from,
_to, _to,
@ -267,16 +278,19 @@ export class ERC20TokenContract extends BaseContract {
_value: BigNumber, _value: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
const self = this as any as ERC20TokenContract; const self = this as any as ERC20TokenContract;
const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from,
_to, _to,
_value _value
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -289,7 +303,9 @@ export class ERC20TokenContract extends BaseContract {
_to: string, _to: string,
_value: BigNumber, _value: BigNumber,
): string { ): string {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
const self = this as any as ERC20TokenContract; const self = this as any as ERC20TokenContract;
const abiEncodedTransactionData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, const abiEncodedTransactionData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from,
_to, _to,
@ -305,7 +321,9 @@ export class ERC20TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<boolean ): Promise<boolean
> { > {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -380,15 +398,17 @@ export class ERC20TokenContract extends BaseContract {
_value: BigNumber, _value: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
const self = this as any as ERC20TokenContract; const self = this as any as ERC20TokenContract;
const encodedData = self._strictEncodeArguments('transfer(address,uint256)', [_to, const encodedData = self._strictEncodeArguments('transfer(address,uint256)', [_to,
_value _value
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -408,7 +428,8 @@ export class ERC20TokenContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
const self = this as any as ERC20TokenContract; const self = this as any as ERC20TokenContract;
const txHashPromise = self.transfer.sendTransactionAsync(_to, const txHashPromise = self.transfer.sendTransactionAsync(_to,
_value _value
@ -430,15 +451,17 @@ export class ERC20TokenContract extends BaseContract {
_value: BigNumber, _value: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
const self = this as any as ERC20TokenContract; const self = this as any as ERC20TokenContract;
const encodedData = self._strictEncodeArguments('transfer(address,uint256)', [_to, const encodedData = self._strictEncodeArguments('transfer(address,uint256)', [_to,
_value _value
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -450,7 +473,8 @@ export class ERC20TokenContract extends BaseContract {
_to: string, _to: string,
_value: BigNumber, _value: BigNumber,
): string { ): string {
assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
const self = this as any as ERC20TokenContract; const self = this as any as ERC20TokenContract;
const abiEncodedTransactionData = self._strictEncodeArguments('transfer(address,uint256)', [_to, const abiEncodedTransactionData = self._strictEncodeArguments('transfer(address,uint256)', [_to,
_value _value
@ -464,7 +488,8 @@ export class ERC20TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<boolean ): Promise<boolean
> { > {
assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -503,7 +528,8 @@ export class ERC20TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<BigNumber ): Promise<BigNumber
> { > {
assert.isString('_owner', _owner);assert.isString('_spender', _spender); assert.isString('_owner', _owner);
assert.isString('_spender', _spender);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -558,7 +584,7 @@ export class ERC20TokenContract extends BaseContract {
supportedProvider: SupportedProvider, supportedProvider: SupportedProvider,
txDefaults: Partial<TxData>, txDefaults: Partial<TxData>,
): Promise<ERC20TokenContract> { ): Promise<ERC20TokenContract> {
assert.isHexString('bytecode', bytecode); assert.isString('bytecode', bytecode);
assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [ assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,

View File

@ -56,10 +56,11 @@ export class ERC721ProxyContract extends BaseContract {
const self = this as any as ERC721ProxyContract; const self = this as any as ERC721ProxyContract;
const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -101,10 +102,11 @@ export class ERC721ProxyContract extends BaseContract {
const self = this as any as ERC721ProxyContract; const self = this as any as ERC721ProxyContract;
const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -203,10 +205,11 @@ export class ERC721ProxyContract extends BaseContract {
const self = this as any as ERC721ProxyContract; const self = this as any as ERC721ProxyContract;
const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -248,10 +251,11 @@ export class ERC721ProxyContract extends BaseContract {
const self = this as any as ERC721ProxyContract; const self = this as any as ERC721ProxyContract;
const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -310,7 +314,6 @@ export class ERC721ProxyContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<string ): Promise<string
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -345,15 +348,17 @@ export class ERC721ProxyContract extends BaseContract {
index: BigNumber, index: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('target', target);assert.isBigNumber('index', index); assert.isString('target', target);
assert.isBigNumber('index', index);
const self = this as any as ERC721ProxyContract; const self = this as any as ERC721ProxyContract;
const encodedData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target, const encodedData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target,
index index
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -373,7 +378,8 @@ export class ERC721ProxyContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('target', target);assert.isBigNumber('index', index); assert.isString('target', target);
assert.isBigNumber('index', index);
const self = this as any as ERC721ProxyContract; const self = this as any as ERC721ProxyContract;
const txHashPromise = self.removeAuthorizedAddressAtIndex.sendTransactionAsync(target, const txHashPromise = self.removeAuthorizedAddressAtIndex.sendTransactionAsync(target,
index index
@ -395,15 +401,17 @@ export class ERC721ProxyContract extends BaseContract {
index: BigNumber, index: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('target', target);assert.isBigNumber('index', index); assert.isString('target', target);
assert.isBigNumber('index', index);
const self = this as any as ERC721ProxyContract; const self = this as any as ERC721ProxyContract;
const encodedData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target, const encodedData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target,
index index
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -415,7 +423,8 @@ export class ERC721ProxyContract extends BaseContract {
target: string, target: string,
index: BigNumber, index: BigNumber,
): string { ): string {
assert.isString('target', target);assert.isBigNumber('index', index); assert.isString('target', target);
assert.isBigNumber('index', index);
const self = this as any as ERC721ProxyContract; const self = this as any as ERC721ProxyContract;
const abiEncodedTransactionData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target, const abiEncodedTransactionData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target,
index index
@ -429,7 +438,8 @@ export class ERC721ProxyContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<void ): Promise<void
> { > {
assert.isString('target', target);assert.isBigNumber('index', index); assert.isString('target', target);
assert.isBigNumber('index', index);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -466,7 +476,6 @@ export class ERC721ProxyContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<string ): Promise<string
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -538,7 +547,6 @@ export class ERC721ProxyContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<string[] ): Promise<string[]
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -576,10 +584,11 @@ export class ERC721ProxyContract extends BaseContract {
const self = this as any as ERC721ProxyContract; const self = this as any as ERC721ProxyContract;
const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -621,10 +630,11 @@ export class ERC721ProxyContract extends BaseContract {
const self = this as any as ERC721ProxyContract; const self = this as any as ERC721ProxyContract;
const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -701,7 +711,7 @@ export class ERC721ProxyContract extends BaseContract {
supportedProvider: SupportedProvider, supportedProvider: SupportedProvider,
txDefaults: Partial<TxData>, txDefaults: Partial<TxData>,
): Promise<ERC721ProxyContract> { ): Promise<ERC721ProxyContract> {
assert.isHexString('bytecode', bytecode); assert.isString('bytecode', bytecode);
assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [ assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,

View File

@ -100,15 +100,17 @@ export class ERC721TokenContract extends BaseContract {
_tokenId: BigNumber, _tokenId: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('_approved', _approved);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_approved', _approved);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as ERC721TokenContract; const self = this as any as ERC721TokenContract;
const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_approved, const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_approved,
_tokenId _tokenId
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -128,7 +130,8 @@ export class ERC721TokenContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('_approved', _approved);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_approved', _approved);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as ERC721TokenContract; const self = this as any as ERC721TokenContract;
const txHashPromise = self.approve.sendTransactionAsync(_approved, const txHashPromise = self.approve.sendTransactionAsync(_approved,
_tokenId _tokenId
@ -150,15 +153,17 @@ export class ERC721TokenContract extends BaseContract {
_tokenId: BigNumber, _tokenId: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('_approved', _approved);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_approved', _approved);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as ERC721TokenContract; const self = this as any as ERC721TokenContract;
const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_approved, const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_approved,
_tokenId _tokenId
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -170,7 +175,8 @@ export class ERC721TokenContract extends BaseContract {
_approved: string, _approved: string,
_tokenId: BigNumber, _tokenId: BigNumber,
): string { ): string {
assert.isString('_approved', _approved);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_approved', _approved);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as ERC721TokenContract; const self = this as any as ERC721TokenContract;
const abiEncodedTransactionData = self._strictEncodeArguments('approve(address,uint256)', [_approved, const abiEncodedTransactionData = self._strictEncodeArguments('approve(address,uint256)', [_approved,
_tokenId _tokenId
@ -184,7 +190,8 @@ export class ERC721TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<void ): Promise<void
> { > {
assert.isString('_approved', _approved);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_approved', _approved);
assert.isBigNumber('_tokenId', _tokenId);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -222,16 +229,19 @@ export class ERC721TokenContract extends BaseContract {
_tokenId: BigNumber, _tokenId: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as ERC721TokenContract; const self = this as any as ERC721TokenContract;
const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from,
_to, _to,
_tokenId _tokenId
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -253,7 +263,9 @@ export class ERC721TokenContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as ERC721TokenContract; const self = this as any as ERC721TokenContract;
const txHashPromise = self.transferFrom.sendTransactionAsync(_from, const txHashPromise = self.transferFrom.sendTransactionAsync(_from,
_to, _to,
@ -277,16 +289,19 @@ export class ERC721TokenContract extends BaseContract {
_tokenId: BigNumber, _tokenId: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as ERC721TokenContract; const self = this as any as ERC721TokenContract;
const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from,
_to, _to,
_tokenId _tokenId
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -299,7 +314,9 @@ export class ERC721TokenContract extends BaseContract {
_to: string, _to: string,
_tokenId: BigNumber, _tokenId: BigNumber,
): string { ): string {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as ERC721TokenContract; const self = this as any as ERC721TokenContract;
const abiEncodedTransactionData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, const abiEncodedTransactionData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from,
_to, _to,
@ -315,7 +332,9 @@ export class ERC721TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<void ): Promise<void
> { > {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -354,16 +373,19 @@ export class ERC721TokenContract extends BaseContract {
_tokenId: BigNumber, _tokenId: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as ERC721TokenContract; const self = this as any as ERC721TokenContract;
const encodedData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256)', [_from, const encodedData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256)', [_from,
_to, _to,
_tokenId _tokenId
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -385,7 +407,9 @@ export class ERC721TokenContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as ERC721TokenContract; const self = this as any as ERC721TokenContract;
const txHashPromise = self.safeTransferFrom1.sendTransactionAsync(_from, const txHashPromise = self.safeTransferFrom1.sendTransactionAsync(_from,
_to, _to,
@ -409,16 +433,19 @@ export class ERC721TokenContract extends BaseContract {
_tokenId: BigNumber, _tokenId: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as ERC721TokenContract; const self = this as any as ERC721TokenContract;
const encodedData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256)', [_from, const encodedData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256)', [_from,
_to, _to,
_tokenId _tokenId
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -431,7 +458,9 @@ export class ERC721TokenContract extends BaseContract {
_to: string, _to: string,
_tokenId: BigNumber, _tokenId: BigNumber,
): string { ): string {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
const self = this as any as ERC721TokenContract; const self = this as any as ERC721TokenContract;
const abiEncodedTransactionData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256)', [_from, const abiEncodedTransactionData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256)', [_from,
_to, _to,
@ -447,7 +476,9 @@ export class ERC721TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<void ): Promise<void
> { > {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -559,15 +590,17 @@ export class ERC721TokenContract extends BaseContract {
_approved: boolean, _approved: boolean,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('_operator', _operator);assert.isBoolean('_approved', _approved); assert.isString('_operator', _operator);
assert.isBoolean('_approved', _approved);
const self = this as any as ERC721TokenContract; const self = this as any as ERC721TokenContract;
const encodedData = self._strictEncodeArguments('setApprovalForAll(address,bool)', [_operator, const encodedData = self._strictEncodeArguments('setApprovalForAll(address,bool)', [_operator,
_approved _approved
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -587,7 +620,8 @@ export class ERC721TokenContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('_operator', _operator);assert.isBoolean('_approved', _approved); assert.isString('_operator', _operator);
assert.isBoolean('_approved', _approved);
const self = this as any as ERC721TokenContract; const self = this as any as ERC721TokenContract;
const txHashPromise = self.setApprovalForAll.sendTransactionAsync(_operator, const txHashPromise = self.setApprovalForAll.sendTransactionAsync(_operator,
_approved _approved
@ -609,15 +643,17 @@ export class ERC721TokenContract extends BaseContract {
_approved: boolean, _approved: boolean,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('_operator', _operator);assert.isBoolean('_approved', _approved); assert.isString('_operator', _operator);
assert.isBoolean('_approved', _approved);
const self = this as any as ERC721TokenContract; const self = this as any as ERC721TokenContract;
const encodedData = self._strictEncodeArguments('setApprovalForAll(address,bool)', [_operator, const encodedData = self._strictEncodeArguments('setApprovalForAll(address,bool)', [_operator,
_approved _approved
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -629,7 +665,8 @@ export class ERC721TokenContract extends BaseContract {
_operator: string, _operator: string,
_approved: boolean, _approved: boolean,
): string { ): string {
assert.isString('_operator', _operator);assert.isBoolean('_approved', _approved); assert.isString('_operator', _operator);
assert.isBoolean('_approved', _approved);
const self = this as any as ERC721TokenContract; const self = this as any as ERC721TokenContract;
const abiEncodedTransactionData = self._strictEncodeArguments('setApprovalForAll(address,bool)', [_operator, const abiEncodedTransactionData = self._strictEncodeArguments('setApprovalForAll(address,bool)', [_operator,
_approved _approved
@ -643,7 +680,8 @@ export class ERC721TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<void ): Promise<void
> { > {
assert.isString('_operator', _operator);assert.isBoolean('_approved', _approved); assert.isString('_operator', _operator);
assert.isBoolean('_approved', _approved);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -682,17 +720,21 @@ export class ERC721TokenContract extends BaseContract {
_data: string, _data: string,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId);assert.isString('_data', _data); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
assert.isString('_data', _data);
const self = this as any as ERC721TokenContract; const self = this as any as ERC721TokenContract;
const encodedData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256,bytes)', [_from, const encodedData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256,bytes)', [_from,
_to, _to,
_tokenId, _tokenId,
_data _data
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -716,7 +758,10 @@ export class ERC721TokenContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId);assert.isString('_data', _data); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
assert.isString('_data', _data);
const self = this as any as ERC721TokenContract; const self = this as any as ERC721TokenContract;
const txHashPromise = self.safeTransferFrom2.sendTransactionAsync(_from, const txHashPromise = self.safeTransferFrom2.sendTransactionAsync(_from,
_to, _to,
@ -742,17 +787,21 @@ export class ERC721TokenContract extends BaseContract {
_data: string, _data: string,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId);assert.isString('_data', _data); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
assert.isString('_data', _data);
const self = this as any as ERC721TokenContract; const self = this as any as ERC721TokenContract;
const encodedData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256,bytes)', [_from, const encodedData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256,bytes)', [_from,
_to, _to,
_tokenId, _tokenId,
_data _data
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -766,7 +815,10 @@ export class ERC721TokenContract extends BaseContract {
_tokenId: BigNumber, _tokenId: BigNumber,
_data: string, _data: string,
): string { ): string {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId);assert.isString('_data', _data); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
assert.isString('_data', _data);
const self = this as any as ERC721TokenContract; const self = this as any as ERC721TokenContract;
const abiEncodedTransactionData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256,bytes)', [_from, const abiEncodedTransactionData = self._strictEncodeArguments('safeTransferFrom(address,address,uint256,bytes)', [_from,
_to, _to,
@ -784,7 +836,10 @@ export class ERC721TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<void ): Promise<void
> { > {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_tokenId', _tokenId);assert.isString('_data', _data); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_tokenId', _tokenId);
assert.isString('_data', _data);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -825,7 +880,8 @@ export class ERC721TokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<boolean ): Promise<boolean
> { > {
assert.isString('_owner', _owner);assert.isString('_operator', _operator); assert.isString('_owner', _owner);
assert.isString('_operator', _operator);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -880,7 +936,7 @@ export class ERC721TokenContract extends BaseContract {
supportedProvider: SupportedProvider, supportedProvider: SupportedProvider,
txDefaults: Partial<TxData>, txDefaults: Partial<TxData>,
): Promise<ERC721TokenContract> { ): Promise<ERC721TokenContract> {
assert.isHexString('bytecode', bytecode); assert.isString('bytecode', bytecode);
assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [ assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,

File diff suppressed because it is too large Load Diff

View File

@ -39,7 +39,13 @@ export class ForwarderContract extends BaseContract {
feeRecipient: string, feeRecipient: string,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isArray('orders', orders);assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount);assert.isArray('signatures', signatures);assert.isArray('feeOrders', feeOrders);assert.isArray('feeSignatures', feeSignatures);assert.isBigNumber('feePercentage', feePercentage);assert.isString('feeRecipient', feeRecipient); assert.isArray('orders', orders);
assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount);
assert.isArray('signatures', signatures);
assert.isArray('feeOrders', feeOrders);
assert.isArray('feeSignatures', feeSignatures);
assert.isBigNumber('feePercentage', feePercentage);
assert.isString('feeRecipient', feeRecipient);
const self = this as any as ForwarderContract; const self = this as any as ForwarderContract;
const encodedData = self._strictEncodeArguments('marketBuyOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],uint256,address)', [orders, const encodedData = self._strictEncodeArguments('marketBuyOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],uint256,address)', [orders,
makerAssetFillAmount, makerAssetFillAmount,
@ -49,10 +55,11 @@ export class ForwarderContract extends BaseContract {
feePercentage, feePercentage,
feeRecipient feeRecipient
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -82,7 +89,13 @@ export class ForwarderContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isArray('orders', orders);assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount);assert.isArray('signatures', signatures);assert.isArray('feeOrders', feeOrders);assert.isArray('feeSignatures', feeSignatures);assert.isBigNumber('feePercentage', feePercentage);assert.isString('feeRecipient', feeRecipient); assert.isArray('orders', orders);
assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount);
assert.isArray('signatures', signatures);
assert.isArray('feeOrders', feeOrders);
assert.isArray('feeSignatures', feeSignatures);
assert.isBigNumber('feePercentage', feePercentage);
assert.isString('feeRecipient', feeRecipient);
const self = this as any as ForwarderContract; const self = this as any as ForwarderContract;
const txHashPromise = self.marketBuyOrdersWithEth.sendTransactionAsync(orders, const txHashPromise = self.marketBuyOrdersWithEth.sendTransactionAsync(orders,
makerAssetFillAmount, makerAssetFillAmount,
@ -114,7 +127,13 @@ export class ForwarderContract extends BaseContract {
feeRecipient: string, feeRecipient: string,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isArray('orders', orders);assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount);assert.isArray('signatures', signatures);assert.isArray('feeOrders', feeOrders);assert.isArray('feeSignatures', feeSignatures);assert.isBigNumber('feePercentage', feePercentage);assert.isString('feeRecipient', feeRecipient); assert.isArray('orders', orders);
assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount);
assert.isArray('signatures', signatures);
assert.isArray('feeOrders', feeOrders);
assert.isArray('feeSignatures', feeSignatures);
assert.isBigNumber('feePercentage', feePercentage);
assert.isString('feeRecipient', feeRecipient);
const self = this as any as ForwarderContract; const self = this as any as ForwarderContract;
const encodedData = self._strictEncodeArguments('marketBuyOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],uint256,address)', [orders, const encodedData = self._strictEncodeArguments('marketBuyOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],uint256,address)', [orders,
makerAssetFillAmount, makerAssetFillAmount,
@ -124,10 +143,11 @@ export class ForwarderContract extends BaseContract {
feePercentage, feePercentage,
feeRecipient feeRecipient
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -144,7 +164,13 @@ export class ForwarderContract extends BaseContract {
feePercentage: BigNumber, feePercentage: BigNumber,
feeRecipient: string, feeRecipient: string,
): string { ): string {
assert.isArray('orders', orders);assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount);assert.isArray('signatures', signatures);assert.isArray('feeOrders', feeOrders);assert.isArray('feeSignatures', feeSignatures);assert.isBigNumber('feePercentage', feePercentage);assert.isString('feeRecipient', feeRecipient); assert.isArray('orders', orders);
assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount);
assert.isArray('signatures', signatures);
assert.isArray('feeOrders', feeOrders);
assert.isArray('feeSignatures', feeSignatures);
assert.isBigNumber('feePercentage', feePercentage);
assert.isString('feeRecipient', feeRecipient);
const self = this as any as ForwarderContract; const self = this as any as ForwarderContract;
const abiEncodedTransactionData = self._strictEncodeArguments('marketBuyOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],uint256,address)', [orders, const abiEncodedTransactionData = self._strictEncodeArguments('marketBuyOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],uint256,address)', [orders,
makerAssetFillAmount, makerAssetFillAmount,
@ -168,7 +194,13 @@ export class ForwarderContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<[{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}, {makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}] ): Promise<[{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}, {makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}]
> { > {
assert.isArray('orders', orders);assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount);assert.isArray('signatures', signatures);assert.isArray('feeOrders', feeOrders);assert.isArray('feeSignatures', feeSignatures);assert.isBigNumber('feePercentage', feePercentage);assert.isString('feeRecipient', feeRecipient); assert.isArray('orders', orders);
assert.isBigNumber('makerAssetFillAmount', makerAssetFillAmount);
assert.isArray('signatures', signatures);
assert.isArray('feeOrders', feeOrders);
assert.isArray('feeSignatures', feeSignatures);
assert.isBigNumber('feePercentage', feePercentage);
assert.isString('feeRecipient', feeRecipient);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -210,15 +242,17 @@ export class ForwarderContract extends BaseContract {
amount: BigNumber, amount: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('assetData', assetData);assert.isBigNumber('amount', amount); assert.isString('assetData', assetData);
assert.isBigNumber('amount', amount);
const self = this as any as ForwarderContract; const self = this as any as ForwarderContract;
const encodedData = self._strictEncodeArguments('withdrawAsset(bytes,uint256)', [assetData, const encodedData = self._strictEncodeArguments('withdrawAsset(bytes,uint256)', [assetData,
amount amount
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -238,7 +272,8 @@ export class ForwarderContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('assetData', assetData);assert.isBigNumber('amount', amount); assert.isString('assetData', assetData);
assert.isBigNumber('amount', amount);
const self = this as any as ForwarderContract; const self = this as any as ForwarderContract;
const txHashPromise = self.withdrawAsset.sendTransactionAsync(assetData, const txHashPromise = self.withdrawAsset.sendTransactionAsync(assetData,
amount amount
@ -260,15 +295,17 @@ export class ForwarderContract extends BaseContract {
amount: BigNumber, amount: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('assetData', assetData);assert.isBigNumber('amount', amount); assert.isString('assetData', assetData);
assert.isBigNumber('amount', amount);
const self = this as any as ForwarderContract; const self = this as any as ForwarderContract;
const encodedData = self._strictEncodeArguments('withdrawAsset(bytes,uint256)', [assetData, const encodedData = self._strictEncodeArguments('withdrawAsset(bytes,uint256)', [assetData,
amount amount
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -280,7 +317,8 @@ export class ForwarderContract extends BaseContract {
assetData: string, assetData: string,
amount: BigNumber, amount: BigNumber,
): string { ): string {
assert.isString('assetData', assetData);assert.isBigNumber('amount', amount); assert.isString('assetData', assetData);
assert.isBigNumber('amount', amount);
const self = this as any as ForwarderContract; const self = this as any as ForwarderContract;
const abiEncodedTransactionData = self._strictEncodeArguments('withdrawAsset(bytes,uint256)', [assetData, const abiEncodedTransactionData = self._strictEncodeArguments('withdrawAsset(bytes,uint256)', [assetData,
amount amount
@ -294,7 +332,8 @@ export class ForwarderContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<void ): Promise<void
> { > {
assert.isString('assetData', assetData);assert.isBigNumber('amount', amount); assert.isString('assetData', assetData);
assert.isBigNumber('amount', amount);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -331,7 +370,6 @@ export class ForwarderContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<string ): Promise<string
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -370,7 +408,12 @@ export class ForwarderContract extends BaseContract {
feeRecipient: string, feeRecipient: string,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isArray('orders', orders);assert.isArray('signatures', signatures);assert.isArray('feeOrders', feeOrders);assert.isArray('feeSignatures', feeSignatures);assert.isBigNumber('feePercentage', feePercentage);assert.isString('feeRecipient', feeRecipient); assert.isArray('orders', orders);
assert.isArray('signatures', signatures);
assert.isArray('feeOrders', feeOrders);
assert.isArray('feeSignatures', feeSignatures);
assert.isBigNumber('feePercentage', feePercentage);
assert.isString('feeRecipient', feeRecipient);
const self = this as any as ForwarderContract; const self = this as any as ForwarderContract;
const encodedData = self._strictEncodeArguments('marketSellOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],uint256,address)', [orders, const encodedData = self._strictEncodeArguments('marketSellOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],uint256,address)', [orders,
signatures, signatures,
@ -379,10 +422,11 @@ export class ForwarderContract extends BaseContract {
feePercentage, feePercentage,
feeRecipient feeRecipient
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -410,7 +454,12 @@ export class ForwarderContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isArray('orders', orders);assert.isArray('signatures', signatures);assert.isArray('feeOrders', feeOrders);assert.isArray('feeSignatures', feeSignatures);assert.isBigNumber('feePercentage', feePercentage);assert.isString('feeRecipient', feeRecipient); assert.isArray('orders', orders);
assert.isArray('signatures', signatures);
assert.isArray('feeOrders', feeOrders);
assert.isArray('feeSignatures', feeSignatures);
assert.isBigNumber('feePercentage', feePercentage);
assert.isString('feeRecipient', feeRecipient);
const self = this as any as ForwarderContract; const self = this as any as ForwarderContract;
const txHashPromise = self.marketSellOrdersWithEth.sendTransactionAsync(orders, const txHashPromise = self.marketSellOrdersWithEth.sendTransactionAsync(orders,
signatures, signatures,
@ -440,7 +489,12 @@ export class ForwarderContract extends BaseContract {
feeRecipient: string, feeRecipient: string,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isArray('orders', orders);assert.isArray('signatures', signatures);assert.isArray('feeOrders', feeOrders);assert.isArray('feeSignatures', feeSignatures);assert.isBigNumber('feePercentage', feePercentage);assert.isString('feeRecipient', feeRecipient); assert.isArray('orders', orders);
assert.isArray('signatures', signatures);
assert.isArray('feeOrders', feeOrders);
assert.isArray('feeSignatures', feeSignatures);
assert.isBigNumber('feePercentage', feePercentage);
assert.isString('feeRecipient', feeRecipient);
const self = this as any as ForwarderContract; const self = this as any as ForwarderContract;
const encodedData = self._strictEncodeArguments('marketSellOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],uint256,address)', [orders, const encodedData = self._strictEncodeArguments('marketSellOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],uint256,address)', [orders,
signatures, signatures,
@ -449,10 +503,11 @@ export class ForwarderContract extends BaseContract {
feePercentage, feePercentage,
feeRecipient feeRecipient
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -468,7 +523,12 @@ export class ForwarderContract extends BaseContract {
feePercentage: BigNumber, feePercentage: BigNumber,
feeRecipient: string, feeRecipient: string,
): string { ): string {
assert.isArray('orders', orders);assert.isArray('signatures', signatures);assert.isArray('feeOrders', feeOrders);assert.isArray('feeSignatures', feeSignatures);assert.isBigNumber('feePercentage', feePercentage);assert.isString('feeRecipient', feeRecipient); assert.isArray('orders', orders);
assert.isArray('signatures', signatures);
assert.isArray('feeOrders', feeOrders);
assert.isArray('feeSignatures', feeSignatures);
assert.isBigNumber('feePercentage', feePercentage);
assert.isString('feeRecipient', feeRecipient);
const self = this as any as ForwarderContract; const self = this as any as ForwarderContract;
const abiEncodedTransactionData = self._strictEncodeArguments('marketSellOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],uint256,address)', [orders, const abiEncodedTransactionData = self._strictEncodeArguments('marketSellOrdersWithEth((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes[],uint256,address)', [orders,
signatures, signatures,
@ -490,7 +550,12 @@ export class ForwarderContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<[{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}, {makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}] ): Promise<[{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}, {makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}]
> { > {
assert.isArray('orders', orders);assert.isArray('signatures', signatures);assert.isArray('feeOrders', feeOrders);assert.isArray('feeSignatures', feeSignatures);assert.isBigNumber('feePercentage', feePercentage);assert.isString('feeRecipient', feeRecipient); assert.isArray('orders', orders);
assert.isArray('signatures', signatures);
assert.isArray('feeOrders', feeOrders);
assert.isArray('feeSignatures', feeSignatures);
assert.isBigNumber('feePercentage', feePercentage);
assert.isString('feeRecipient', feeRecipient);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -534,10 +599,11 @@ export class ForwarderContract extends BaseContract {
const self = this as any as ForwarderContract; const self = this as any as ForwarderContract;
const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -579,10 +645,11 @@ export class ForwarderContract extends BaseContract {
const self = this as any as ForwarderContract; const self = this as any as ForwarderContract;
const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -668,7 +735,7 @@ _wethAssetData
_zrxAssetData: string, _zrxAssetData: string,
_wethAssetData: string, _wethAssetData: string,
): Promise<ForwarderContract> { ): Promise<ForwarderContract> {
assert.isHexString('bytecode', bytecode); assert.isString('bytecode', bytecode);
assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [ assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,

View File

@ -37,10 +37,11 @@ export class IAssetProxyContract extends BaseContract {
const self = this as any as IAssetProxyContract; const self = this as any as IAssetProxyContract;
const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -82,10 +83,11 @@ export class IAssetProxyContract extends BaseContract {
const self = this as any as IAssetProxyContract; const self = this as any as IAssetProxyContract;
const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -147,10 +149,11 @@ export class IAssetProxyContract extends BaseContract {
const self = this as any as IAssetProxyContract; const self = this as any as IAssetProxyContract;
const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -192,10 +195,11 @@ export class IAssetProxyContract extends BaseContract {
const self = this as any as IAssetProxyContract; const self = this as any as IAssetProxyContract;
const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -254,15 +258,17 @@ export class IAssetProxyContract extends BaseContract {
index: BigNumber, index: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('target', target);assert.isBigNumber('index', index); assert.isString('target', target);
assert.isBigNumber('index', index);
const self = this as any as IAssetProxyContract; const self = this as any as IAssetProxyContract;
const encodedData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target, const encodedData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target,
index index
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -282,7 +288,8 @@ export class IAssetProxyContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('target', target);assert.isBigNumber('index', index); assert.isString('target', target);
assert.isBigNumber('index', index);
const self = this as any as IAssetProxyContract; const self = this as any as IAssetProxyContract;
const txHashPromise = self.removeAuthorizedAddressAtIndex.sendTransactionAsync(target, const txHashPromise = self.removeAuthorizedAddressAtIndex.sendTransactionAsync(target,
index index
@ -304,15 +311,17 @@ export class IAssetProxyContract extends BaseContract {
index: BigNumber, index: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('target', target);assert.isBigNumber('index', index); assert.isString('target', target);
assert.isBigNumber('index', index);
const self = this as any as IAssetProxyContract; const self = this as any as IAssetProxyContract;
const encodedData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target, const encodedData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target,
index index
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -324,7 +333,8 @@ export class IAssetProxyContract extends BaseContract {
target: string, target: string,
index: BigNumber, index: BigNumber,
): string { ): string {
assert.isString('target', target);assert.isBigNumber('index', index); assert.isString('target', target);
assert.isBigNumber('index', index);
const self = this as any as IAssetProxyContract; const self = this as any as IAssetProxyContract;
const abiEncodedTransactionData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target, const abiEncodedTransactionData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target,
index index
@ -338,7 +348,8 @@ export class IAssetProxyContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<void ): Promise<void
> { > {
assert.isString('target', target);assert.isBigNumber('index', index); assert.isString('target', target);
assert.isBigNumber('index', index);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -377,17 +388,21 @@ export class IAssetProxyContract extends BaseContract {
amount: BigNumber, amount: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('assetData', assetData);assert.isString('from', from);assert.isString('to', to);assert.isBigNumber('amount', amount); assert.isString('assetData', assetData);
assert.isString('from', from);
assert.isString('to', to);
assert.isBigNumber('amount', amount);
const self = this as any as IAssetProxyContract; const self = this as any as IAssetProxyContract;
const encodedData = self._strictEncodeArguments('transferFrom(bytes,address,address,uint256)', [assetData, const encodedData = self._strictEncodeArguments('transferFrom(bytes,address,address,uint256)', [assetData,
from, from,
to, to,
amount amount
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -411,7 +426,10 @@ export class IAssetProxyContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('assetData', assetData);assert.isString('from', from);assert.isString('to', to);assert.isBigNumber('amount', amount); assert.isString('assetData', assetData);
assert.isString('from', from);
assert.isString('to', to);
assert.isBigNumber('amount', amount);
const self = this as any as IAssetProxyContract; const self = this as any as IAssetProxyContract;
const txHashPromise = self.transferFrom.sendTransactionAsync(assetData, const txHashPromise = self.transferFrom.sendTransactionAsync(assetData,
from, from,
@ -437,17 +455,21 @@ export class IAssetProxyContract extends BaseContract {
amount: BigNumber, amount: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('assetData', assetData);assert.isString('from', from);assert.isString('to', to);assert.isBigNumber('amount', amount); assert.isString('assetData', assetData);
assert.isString('from', from);
assert.isString('to', to);
assert.isBigNumber('amount', amount);
const self = this as any as IAssetProxyContract; const self = this as any as IAssetProxyContract;
const encodedData = self._strictEncodeArguments('transferFrom(bytes,address,address,uint256)', [assetData, const encodedData = self._strictEncodeArguments('transferFrom(bytes,address,address,uint256)', [assetData,
from, from,
to, to,
amount amount
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -461,7 +483,10 @@ export class IAssetProxyContract extends BaseContract {
to: string, to: string,
amount: BigNumber, amount: BigNumber,
): string { ): string {
assert.isString('assetData', assetData);assert.isString('from', from);assert.isString('to', to);assert.isBigNumber('amount', amount); assert.isString('assetData', assetData);
assert.isString('from', from);
assert.isString('to', to);
assert.isBigNumber('amount', amount);
const self = this as any as IAssetProxyContract; const self = this as any as IAssetProxyContract;
const abiEncodedTransactionData = self._strictEncodeArguments('transferFrom(bytes,address,address,uint256)', [assetData, const abiEncodedTransactionData = self._strictEncodeArguments('transferFrom(bytes,address,address,uint256)', [assetData,
from, from,
@ -479,7 +504,10 @@ export class IAssetProxyContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<void ): Promise<void
> { > {
assert.isString('assetData', assetData);assert.isString('from', from);assert.isString('to', to);assert.isBigNumber('amount', amount); assert.isString('assetData', assetData);
assert.isString('from', from);
assert.isString('to', to);
assert.isBigNumber('amount', amount);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -518,7 +546,6 @@ export class IAssetProxyContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<string ): Promise<string
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -553,7 +580,6 @@ export class IAssetProxyContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<string[] ): Promise<string[]
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -591,10 +617,11 @@ export class IAssetProxyContract extends BaseContract {
const self = this as any as IAssetProxyContract; const self = this as any as IAssetProxyContract;
const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -636,10 +663,11 @@ export class IAssetProxyContract extends BaseContract {
const self = this as any as IAssetProxyContract; const self = this as any as IAssetProxyContract;
const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -716,7 +744,7 @@ export class IAssetProxyContract extends BaseContract {
supportedProvider: SupportedProvider, supportedProvider: SupportedProvider,
txDefaults: Partial<TxData>, txDefaults: Partial<TxData>,
): Promise<IAssetProxyContract> { ): Promise<IAssetProxyContract> {
assert.isHexString('bytecode', bytecode); assert.isString('bytecode', bytecode);
assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [ assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,

View File

@ -37,7 +37,9 @@ export class IValidatorContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<boolean ): Promise<boolean
> { > {
assert.isString('hash', hash);assert.isString('signerAddress', signerAddress);assert.isString('signature', signature); assert.isString('hash', hash);
assert.isString('signerAddress', signerAddress);
assert.isString('signature', signature);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -93,7 +95,7 @@ export class IValidatorContract extends BaseContract {
supportedProvider: SupportedProvider, supportedProvider: SupportedProvider,
txDefaults: Partial<TxData>, txDefaults: Partial<TxData>,
): Promise<IValidatorContract> { ): Promise<IValidatorContract> {
assert.isHexString('bytecode', bytecode); assert.isString('bytecode', bytecode);
assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [ assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,

View File

@ -36,7 +36,8 @@ export class IWalletContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<boolean ): Promise<boolean
> { > {
assert.isString('hash', hash);assert.isString('signature', signature); assert.isString('hash', hash);
assert.isString('signature', signature);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -91,7 +92,7 @@ export class IWalletContract extends BaseContract {
supportedProvider: SupportedProvider, supportedProvider: SupportedProvider,
txDefaults: Partial<TxData>, txDefaults: Partial<TxData>,
): Promise<IWalletContract> { ): Promise<IWalletContract> {
assert.isHexString('bytecode', bytecode); assert.isString('bytecode', bytecode);
assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [ assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,

View File

@ -100,10 +100,11 @@ export class MultiAssetProxyContract extends BaseContract {
const self = this as any as MultiAssetProxyContract; const self = this as any as MultiAssetProxyContract;
const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -145,10 +146,11 @@ export class MultiAssetProxyContract extends BaseContract {
const self = this as any as MultiAssetProxyContract; const self = this as any as MultiAssetProxyContract;
const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target const encodedData = self._strictEncodeArguments('addAuthorizedAddress(address)', [target
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -284,10 +286,11 @@ export class MultiAssetProxyContract extends BaseContract {
const self = this as any as MultiAssetProxyContract; const self = this as any as MultiAssetProxyContract;
const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -329,10 +332,11 @@ export class MultiAssetProxyContract extends BaseContract {
const self = this as any as MultiAssetProxyContract; const self = this as any as MultiAssetProxyContract;
const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target const encodedData = self._strictEncodeArguments('removeAuthorizedAddress(address)', [target
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -391,7 +395,6 @@ export class MultiAssetProxyContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<string ): Promise<string
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -426,15 +429,17 @@ export class MultiAssetProxyContract extends BaseContract {
index: BigNumber, index: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('target', target);assert.isBigNumber('index', index); assert.isString('target', target);
assert.isBigNumber('index', index);
const self = this as any as MultiAssetProxyContract; const self = this as any as MultiAssetProxyContract;
const encodedData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target, const encodedData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target,
index index
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -454,7 +459,8 @@ export class MultiAssetProxyContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('target', target);assert.isBigNumber('index', index); assert.isString('target', target);
assert.isBigNumber('index', index);
const self = this as any as MultiAssetProxyContract; const self = this as any as MultiAssetProxyContract;
const txHashPromise = self.removeAuthorizedAddressAtIndex.sendTransactionAsync(target, const txHashPromise = self.removeAuthorizedAddressAtIndex.sendTransactionAsync(target,
index index
@ -476,15 +482,17 @@ export class MultiAssetProxyContract extends BaseContract {
index: BigNumber, index: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('target', target);assert.isBigNumber('index', index); assert.isString('target', target);
assert.isBigNumber('index', index);
const self = this as any as MultiAssetProxyContract; const self = this as any as MultiAssetProxyContract;
const encodedData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target, const encodedData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target,
index index
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -496,7 +504,8 @@ export class MultiAssetProxyContract extends BaseContract {
target: string, target: string,
index: BigNumber, index: BigNumber,
): string { ): string {
assert.isString('target', target);assert.isBigNumber('index', index); assert.isString('target', target);
assert.isBigNumber('index', index);
const self = this as any as MultiAssetProxyContract; const self = this as any as MultiAssetProxyContract;
const abiEncodedTransactionData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target, const abiEncodedTransactionData = self._strictEncodeArguments('removeAuthorizedAddressAtIndex(address,uint256)', [target,
index index
@ -510,7 +519,8 @@ export class MultiAssetProxyContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<void ): Promise<void
> { > {
assert.isString('target', target);assert.isBigNumber('index', index); assert.isString('target', target);
assert.isBigNumber('index', index);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -547,7 +557,6 @@ export class MultiAssetProxyContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<string ): Promise<string
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -622,10 +631,11 @@ export class MultiAssetProxyContract extends BaseContract {
const self = this as any as MultiAssetProxyContract; const self = this as any as MultiAssetProxyContract;
const encodedData = self._strictEncodeArguments('registerAssetProxy(address)', [assetProxy const encodedData = self._strictEncodeArguments('registerAssetProxy(address)', [assetProxy
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -667,10 +677,11 @@ export class MultiAssetProxyContract extends BaseContract {
const self = this as any as MultiAssetProxyContract; const self = this as any as MultiAssetProxyContract;
const encodedData = self._strictEncodeArguments('registerAssetProxy(address)', [assetProxy const encodedData = self._strictEncodeArguments('registerAssetProxy(address)', [assetProxy
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -729,7 +740,6 @@ export class MultiAssetProxyContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<string[] ): Promise<string[]
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -767,10 +777,11 @@ export class MultiAssetProxyContract extends BaseContract {
const self = this as any as MultiAssetProxyContract; const self = this as any as MultiAssetProxyContract;
const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -812,10 +823,11 @@ export class MultiAssetProxyContract extends BaseContract {
const self = this as any as MultiAssetProxyContract; const self = this as any as MultiAssetProxyContract;
const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner const encodedData = self._strictEncodeArguments('transferOwnership(address)', [newOwner
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -892,7 +904,7 @@ export class MultiAssetProxyContract extends BaseContract {
supportedProvider: SupportedProvider, supportedProvider: SupportedProvider,
txDefaults: Partial<TxData>, txDefaults: Partial<TxData>,
): Promise<MultiAssetProxyContract> { ): Promise<MultiAssetProxyContract> {
assert.isHexString('bytecode', bytecode); assert.isString('bytecode', bytecode);
assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [ assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,

View File

@ -75,7 +75,8 @@ export class OrderValidatorContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<[BigNumber, BigNumber] ): Promise<[BigNumber, BigNumber]
> { > {
assert.isString('target', target);assert.isString('assetData', assetData); assert.isString('target', target);
assert.isString('assetData', assetData);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -114,7 +115,8 @@ export class OrderValidatorContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<[Array<{orderStatus: number;orderHash: string;orderTakerAssetFilledAmount: BigNumber}>, Array<{makerBalance: BigNumber;makerAllowance: BigNumber;takerBalance: BigNumber;takerAllowance: BigNumber;makerZrxBalance: BigNumber;makerZrxAllowance: BigNumber;takerZrxBalance: BigNumber;takerZrxAllowance: BigNumber}>] ): Promise<[Array<{orderStatus: number;orderHash: string;orderTakerAssetFilledAmount: BigNumber}>, Array<{makerBalance: BigNumber;makerAllowance: BigNumber;takerBalance: BigNumber;takerAllowance: BigNumber;makerZrxBalance: BigNumber;makerZrxAllowance: BigNumber;takerZrxBalance: BigNumber;takerZrxAllowance: BigNumber}>]
> { > {
assert.isArray('orders', orders);assert.isArray('takerAddresses', takerAddresses); assert.isArray('orders', orders);
assert.isArray('takerAddresses', takerAddresses);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -153,7 +155,8 @@ export class OrderValidatorContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<Array<{makerBalance: BigNumber;makerAllowance: BigNumber;takerBalance: BigNumber;takerAllowance: BigNumber;makerZrxBalance: BigNumber;makerZrxAllowance: BigNumber;takerZrxBalance: BigNumber;takerZrxAllowance: BigNumber}> ): Promise<Array<{makerBalance: BigNumber;makerAllowance: BigNumber;takerBalance: BigNumber;takerAllowance: BigNumber;makerZrxBalance: BigNumber;makerZrxAllowance: BigNumber;takerZrxBalance: BigNumber;takerZrxAllowance: BigNumber}>
> { > {
assert.isArray('orders', orders);assert.isArray('takerAddresses', takerAddresses); assert.isArray('orders', orders);
assert.isArray('takerAddresses', takerAddresses);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -192,7 +195,8 @@ export class OrderValidatorContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<string ): Promise<string
> { > {
assert.isString('token', token);assert.isBigNumber('tokenId', tokenId); assert.isString('token', token);
assert.isBigNumber('tokenId', tokenId);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -231,7 +235,8 @@ export class OrderValidatorContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<[BigNumber[], BigNumber[]] ): Promise<[BigNumber[], BigNumber[]]
> { > {
assert.isString('target', target);assert.isArray('assetData', assetData); assert.isString('target', target);
assert.isArray('assetData', assetData);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -331,7 +336,7 @@ _zrxAssetData
_exchange: string, _exchange: string,
_zrxAssetData: string, _zrxAssetData: string,
): Promise<OrderValidatorContract> { ): Promise<OrderValidatorContract> {
assert.isHexString('bytecode', bytecode); assert.isString('bytecode', bytecode);
assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [ assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,

View File

@ -69,7 +69,6 @@ export class WETH9Contract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<string ): Promise<string
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -104,15 +103,17 @@ export class WETH9Contract extends BaseContract {
wad: BigNumber, wad: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('guy', guy);assert.isBigNumber('wad', wad); assert.isString('guy', guy);
assert.isBigNumber('wad', wad);
const self = this as any as WETH9Contract; const self = this as any as WETH9Contract;
const encodedData = self._strictEncodeArguments('approve(address,uint256)', [guy, const encodedData = self._strictEncodeArguments('approve(address,uint256)', [guy,
wad wad
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -132,7 +133,8 @@ export class WETH9Contract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('guy', guy);assert.isBigNumber('wad', wad); assert.isString('guy', guy);
assert.isBigNumber('wad', wad);
const self = this as any as WETH9Contract; const self = this as any as WETH9Contract;
const txHashPromise = self.approve.sendTransactionAsync(guy, const txHashPromise = self.approve.sendTransactionAsync(guy,
wad wad
@ -154,15 +156,17 @@ export class WETH9Contract extends BaseContract {
wad: BigNumber, wad: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('guy', guy);assert.isBigNumber('wad', wad); assert.isString('guy', guy);
assert.isBigNumber('wad', wad);
const self = this as any as WETH9Contract; const self = this as any as WETH9Contract;
const encodedData = self._strictEncodeArguments('approve(address,uint256)', [guy, const encodedData = self._strictEncodeArguments('approve(address,uint256)', [guy,
wad wad
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -174,7 +178,8 @@ export class WETH9Contract extends BaseContract {
guy: string, guy: string,
wad: BigNumber, wad: BigNumber,
): string { ): string {
assert.isString('guy', guy);assert.isBigNumber('wad', wad); assert.isString('guy', guy);
assert.isBigNumber('wad', wad);
const self = this as any as WETH9Contract; const self = this as any as WETH9Contract;
const abiEncodedTransactionData = self._strictEncodeArguments('approve(address,uint256)', [guy, const abiEncodedTransactionData = self._strictEncodeArguments('approve(address,uint256)', [guy,
wad wad
@ -188,7 +193,8 @@ export class WETH9Contract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<boolean ): Promise<boolean
> { > {
assert.isString('guy', guy);assert.isBigNumber('wad', wad); assert.isString('guy', guy);
assert.isBigNumber('wad', wad);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -225,7 +231,6 @@ export class WETH9Contract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<BigNumber ): Promise<BigNumber
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -261,16 +266,19 @@ export class WETH9Contract extends BaseContract {
wad: BigNumber, wad: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('src', src);assert.isString('dst', dst);assert.isBigNumber('wad', wad); assert.isString('src', src);
assert.isString('dst', dst);
assert.isBigNumber('wad', wad);
const self = this as any as WETH9Contract; const self = this as any as WETH9Contract;
const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [src, const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [src,
dst, dst,
wad wad
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -292,7 +300,9 @@ export class WETH9Contract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('src', src);assert.isString('dst', dst);assert.isBigNumber('wad', wad); assert.isString('src', src);
assert.isString('dst', dst);
assert.isBigNumber('wad', wad);
const self = this as any as WETH9Contract; const self = this as any as WETH9Contract;
const txHashPromise = self.transferFrom.sendTransactionAsync(src, const txHashPromise = self.transferFrom.sendTransactionAsync(src,
dst, dst,
@ -316,16 +326,19 @@ export class WETH9Contract extends BaseContract {
wad: BigNumber, wad: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('src', src);assert.isString('dst', dst);assert.isBigNumber('wad', wad); assert.isString('src', src);
assert.isString('dst', dst);
assert.isBigNumber('wad', wad);
const self = this as any as WETH9Contract; const self = this as any as WETH9Contract;
const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [src, const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [src,
dst, dst,
wad wad
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -338,7 +351,9 @@ export class WETH9Contract extends BaseContract {
dst: string, dst: string,
wad: BigNumber, wad: BigNumber,
): string { ): string {
assert.isString('src', src);assert.isString('dst', dst);assert.isBigNumber('wad', wad); assert.isString('src', src);
assert.isString('dst', dst);
assert.isBigNumber('wad', wad);
const self = this as any as WETH9Contract; const self = this as any as WETH9Contract;
const abiEncodedTransactionData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [src, const abiEncodedTransactionData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [src,
dst, dst,
@ -354,7 +369,9 @@ export class WETH9Contract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<boolean ): Promise<boolean
> { > {
assert.isString('src', src);assert.isString('dst', dst);assert.isBigNumber('wad', wad); assert.isString('src', src);
assert.isString('dst', dst);
assert.isBigNumber('wad', wad);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -395,10 +412,11 @@ export class WETH9Contract extends BaseContract {
const self = this as any as WETH9Contract; const self = this as any as WETH9Contract;
const encodedData = self._strictEncodeArguments('withdraw(uint256)', [wad const encodedData = self._strictEncodeArguments('withdraw(uint256)', [wad
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -440,10 +458,11 @@ export class WETH9Contract extends BaseContract {
const self = this as any as WETH9Contract; const self = this as any as WETH9Contract;
const encodedData = self._strictEncodeArguments('withdraw(uint256)', [wad const encodedData = self._strictEncodeArguments('withdraw(uint256)', [wad
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -502,7 +521,6 @@ export class WETH9Contract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<number ): Promise<number
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -574,7 +592,6 @@ export class WETH9Contract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<string ): Promise<string
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -609,15 +626,17 @@ export class WETH9Contract extends BaseContract {
wad: BigNumber, wad: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('dst', dst);assert.isBigNumber('wad', wad); assert.isString('dst', dst);
assert.isBigNumber('wad', wad);
const self = this as any as WETH9Contract; const self = this as any as WETH9Contract;
const encodedData = self._strictEncodeArguments('transfer(address,uint256)', [dst, const encodedData = self._strictEncodeArguments('transfer(address,uint256)', [dst,
wad wad
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -637,7 +656,8 @@ export class WETH9Contract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('dst', dst);assert.isBigNumber('wad', wad); assert.isString('dst', dst);
assert.isBigNumber('wad', wad);
const self = this as any as WETH9Contract; const self = this as any as WETH9Contract;
const txHashPromise = self.transfer.sendTransactionAsync(dst, const txHashPromise = self.transfer.sendTransactionAsync(dst,
wad wad
@ -659,15 +679,17 @@ export class WETH9Contract extends BaseContract {
wad: BigNumber, wad: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('dst', dst);assert.isBigNumber('wad', wad); assert.isString('dst', dst);
assert.isBigNumber('wad', wad);
const self = this as any as WETH9Contract; const self = this as any as WETH9Contract;
const encodedData = self._strictEncodeArguments('transfer(address,uint256)', [dst, const encodedData = self._strictEncodeArguments('transfer(address,uint256)', [dst,
wad wad
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -679,7 +701,8 @@ export class WETH9Contract extends BaseContract {
dst: string, dst: string,
wad: BigNumber, wad: BigNumber,
): string { ): string {
assert.isString('dst', dst);assert.isBigNumber('wad', wad); assert.isString('dst', dst);
assert.isBigNumber('wad', wad);
const self = this as any as WETH9Contract; const self = this as any as WETH9Contract;
const abiEncodedTransactionData = self._strictEncodeArguments('transfer(address,uint256)', [dst, const abiEncodedTransactionData = self._strictEncodeArguments('transfer(address,uint256)', [dst,
wad wad
@ -693,7 +716,8 @@ export class WETH9Contract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<boolean ): Promise<boolean
> { > {
assert.isString('dst', dst);assert.isBigNumber('wad', wad); assert.isString('dst', dst);
assert.isBigNumber('wad', wad);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -731,10 +755,11 @@ export class WETH9Contract extends BaseContract {
const self = this as any as WETH9Contract; const self = this as any as WETH9Contract;
const encodedData = self._strictEncodeArguments('deposit()', []); const encodedData = self._strictEncodeArguments('deposit()', []);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -750,7 +775,6 @@ export class WETH9Contract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
const self = this as any as WETH9Contract; const self = this as any as WETH9Contract;
const txHashPromise = self.deposit.sendTransactionAsync(txData); const txHashPromise = self.deposit.sendTransactionAsync(txData);
return new PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>( return new PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs>(
@ -771,10 +795,11 @@ export class WETH9Contract extends BaseContract {
const self = this as any as WETH9Contract; const self = this as any as WETH9Contract;
const encodedData = self._strictEncodeArguments('deposit()', []); const encodedData = self._strictEncodeArguments('deposit()', []);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -794,7 +819,6 @@ export class WETH9Contract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<void ): Promise<void
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -831,7 +855,8 @@ export class WETH9Contract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<BigNumber ): Promise<BigNumber
> { > {
assert.isString('index_0', index_0);assert.isString('index_1', index_1); assert.isString('index_0', index_0);
assert.isString('index_1', index_1);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -886,7 +911,7 @@ export class WETH9Contract extends BaseContract {
supportedProvider: SupportedProvider, supportedProvider: SupportedProvider,
txDefaults: Partial<TxData>, txDefaults: Partial<TxData>,
): Promise<WETH9Contract> { ): Promise<WETH9Contract> {
assert.isHexString('bytecode', bytecode); assert.isString('bytecode', bytecode);
assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [ assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,

View File

@ -55,7 +55,6 @@ export class ZRXTokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<string ): Promise<string
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -90,15 +89,17 @@ export class ZRXTokenContract extends BaseContract {
_value: BigNumber, _value: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('_spender', _spender);assert.isBigNumber('_value', _value); assert.isString('_spender', _spender);
assert.isBigNumber('_value', _value);
const self = this as any as ZRXTokenContract; const self = this as any as ZRXTokenContract;
const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_spender, const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_spender,
_value _value
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -118,7 +119,8 @@ export class ZRXTokenContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('_spender', _spender);assert.isBigNumber('_value', _value); assert.isString('_spender', _spender);
assert.isBigNumber('_value', _value);
const self = this as any as ZRXTokenContract; const self = this as any as ZRXTokenContract;
const txHashPromise = self.approve.sendTransactionAsync(_spender, const txHashPromise = self.approve.sendTransactionAsync(_spender,
_value _value
@ -140,15 +142,17 @@ export class ZRXTokenContract extends BaseContract {
_value: BigNumber, _value: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('_spender', _spender);assert.isBigNumber('_value', _value); assert.isString('_spender', _spender);
assert.isBigNumber('_value', _value);
const self = this as any as ZRXTokenContract; const self = this as any as ZRXTokenContract;
const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_spender, const encodedData = self._strictEncodeArguments('approve(address,uint256)', [_spender,
_value _value
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -160,7 +164,8 @@ export class ZRXTokenContract extends BaseContract {
_spender: string, _spender: string,
_value: BigNumber, _value: BigNumber,
): string { ): string {
assert.isString('_spender', _spender);assert.isBigNumber('_value', _value); assert.isString('_spender', _spender);
assert.isBigNumber('_value', _value);
const self = this as any as ZRXTokenContract; const self = this as any as ZRXTokenContract;
const abiEncodedTransactionData = self._strictEncodeArguments('approve(address,uint256)', [_spender, const abiEncodedTransactionData = self._strictEncodeArguments('approve(address,uint256)', [_spender,
_value _value
@ -174,7 +179,8 @@ export class ZRXTokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<boolean ): Promise<boolean
> { > {
assert.isString('_spender', _spender);assert.isBigNumber('_value', _value); assert.isString('_spender', _spender);
assert.isBigNumber('_value', _value);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -211,7 +217,6 @@ export class ZRXTokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<BigNumber ): Promise<BigNumber
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -247,16 +252,19 @@ export class ZRXTokenContract extends BaseContract {
_value: BigNumber, _value: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
const self = this as any as ZRXTokenContract; const self = this as any as ZRXTokenContract;
const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from,
_to, _to,
_value _value
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -278,7 +286,9 @@ export class ZRXTokenContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
const self = this as any as ZRXTokenContract; const self = this as any as ZRXTokenContract;
const txHashPromise = self.transferFrom.sendTransactionAsync(_from, const txHashPromise = self.transferFrom.sendTransactionAsync(_from,
_to, _to,
@ -302,16 +312,19 @@ export class ZRXTokenContract extends BaseContract {
_value: BigNumber, _value: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
const self = this as any as ZRXTokenContract; const self = this as any as ZRXTokenContract;
const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, const encodedData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from,
_to, _to,
_value _value
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -324,7 +337,9 @@ export class ZRXTokenContract extends BaseContract {
_to: string, _to: string,
_value: BigNumber, _value: BigNumber,
): string { ): string {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
const self = this as any as ZRXTokenContract; const self = this as any as ZRXTokenContract;
const abiEncodedTransactionData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from, const abiEncodedTransactionData = self._strictEncodeArguments('transferFrom(address,address,uint256)', [_from,
_to, _to,
@ -340,7 +355,9 @@ export class ZRXTokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<boolean ): Promise<boolean
> { > {
assert.isString('_from', _from);assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_from', _from);
assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -378,7 +395,6 @@ export class ZRXTokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<number ): Promise<number
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -450,7 +466,6 @@ export class ZRXTokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<string ): Promise<string
> { > {
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -485,15 +500,17 @@ export class ZRXTokenContract extends BaseContract {
_value: BigNumber, _value: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<string> { ): Promise<string> {
assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
const self = this as any as ZRXTokenContract; const self = this as any as ZRXTokenContract;
const encodedData = self._strictEncodeArguments('transfer(address,uint256)', [_to, const encodedData = self._strictEncodeArguments('transfer(address,uint256)', [_to,
_value _value
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -513,7 +530,8 @@ export class ZRXTokenContract extends BaseContract {
pollingIntervalMs?: number, pollingIntervalMs?: number,
timeoutMs?: number, timeoutMs?: number,
): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> { ): PromiseWithTransactionHash<TransactionReceiptWithDecodedLogs> {
assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
const self = this as any as ZRXTokenContract; const self = this as any as ZRXTokenContract;
const txHashPromise = self.transfer.sendTransactionAsync(_to, const txHashPromise = self.transfer.sendTransactionAsync(_to,
_value _value
@ -535,15 +553,17 @@ export class ZRXTokenContract extends BaseContract {
_value: BigNumber, _value: BigNumber,
txData?: Partial<TxData> | undefined, txData?: Partial<TxData> | undefined,
): Promise<number> { ): Promise<number> {
assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
const self = this as any as ZRXTokenContract; const self = this as any as ZRXTokenContract;
const encodedData = self._strictEncodeArguments('transfer(address,uint256)', [_to, const encodedData = self._strictEncodeArguments('transfer(address,uint256)', [_to,
_value _value
]); ]);
const passedInTxData = txData === undefined ? {} : txData;
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ {
to: self.address, to: self.address,
...txData, ...passedInTxData,
data: encodedData, data: encodedData,
}, },
self._web3Wrapper.getContractDefaults(), self._web3Wrapper.getContractDefaults(),
@ -555,7 +575,8 @@ export class ZRXTokenContract extends BaseContract {
_to: string, _to: string,
_value: BigNumber, _value: BigNumber,
): string { ): string {
assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
const self = this as any as ZRXTokenContract; const self = this as any as ZRXTokenContract;
const abiEncodedTransactionData = self._strictEncodeArguments('transfer(address,uint256)', [_to, const abiEncodedTransactionData = self._strictEncodeArguments('transfer(address,uint256)', [_to,
_value _value
@ -569,7 +590,8 @@ export class ZRXTokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<boolean ): Promise<boolean
> { > {
assert.isString('_to', _to);assert.isBigNumber('_value', _value); assert.isString('_to', _to);
assert.isBigNumber('_value', _value);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -608,7 +630,8 @@ export class ZRXTokenContract extends BaseContract {
defaultBlock?: BlockParam, defaultBlock?: BlockParam,
): Promise<BigNumber ): Promise<BigNumber
> { > {
assert.isString('_owner', _owner);assert.isString('_spender', _spender); assert.isString('_owner', _owner);
assert.isString('_spender', _spender);
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [ assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,
@ -663,7 +686,7 @@ export class ZRXTokenContract extends BaseContract {
supportedProvider: SupportedProvider, supportedProvider: SupportedProvider,
txDefaults: Partial<TxData>, txDefaults: Partial<TxData>,
): Promise<ZRXTokenContract> { ): Promise<ZRXTokenContract> {
assert.isHexString('bytecode', bytecode); assert.isString('bytecode', bytecode);
assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [ assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [
schemas.addressSchema, schemas.addressSchema,
schemas.numberSchema, schemas.numberSchema,