aboutsummaryrefslogtreecommitdiffstats
path: root/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-12-18 10:26:03 +0800
committerGreg Hysen <greg.hysen@gmail.com>2019-01-15 02:49:29 +0800
commit285fb3deadd0413bf993557575a3f96a840f0e10 (patch)
tree8970de6db324e3773146f61265e0b44d03976a60 /packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts
parent797d7c7878e33ce012259a6a5db5335e9dc838ba (diff)
downloaddexon-sol-tools-285fb3deadd0413bf993557575a3f96a840f0e10.tar
dexon-sol-tools-285fb3deadd0413bf993557575a3f96a840f0e10.tar.gz
dexon-sol-tools-285fb3deadd0413bf993557575a3f96a840f0e10.tar.bz2
dexon-sol-tools-285fb3deadd0413bf993557575a3f96a840f0e10.tar.lz
dexon-sol-tools-285fb3deadd0413bf993557575a3f96a840f0e10.tar.xz
dexon-sol-tools-285fb3deadd0413bf993557575a3f96a840f0e10.tar.zst
dexon-sol-tools-285fb3deadd0413bf993557575a3f96a840f0e10.zip
Progress
Diffstat (limited to 'packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts')
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts1054
1 files changed, 289 insertions, 765 deletions
diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts
index 11b5e7024..f5c5a87cd 100644
--- a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts
+++ b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts
@@ -83,10 +83,8 @@ export class ExchangeContract extends BaseContract {
[index_0
] = BaseContract._formatABIDataItemList(inputAbi, [index_0
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [index_0
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.filled;
- const encodedData = ethersFunction.encode([index_0
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([index_0
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
@@ -98,7 +96,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'filled'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -113,22 +112,11 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('batchFillOrders(tuple[],uint256[],bytes[])').inputs;
- [orders,
- takerAssetFillAmounts,
- signatures
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- takerAssetFillAmounts,
- signatures
- ], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [orders,
+ const abiEncoder = self._lookupAbiEncoder('batchFillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])');
+ const encodedData = abiEncoder.encode([orders,
takerAssetFillAmounts,
signatures
- ]);
- const encodedData = self._lookupEthersInterface('batchFillOrders(tuple[],uint256[],bytes[])').functions.batchFillOrders.encode([orders,
- takerAssetFillAmounts,
- signatures
- ]);
+ ], {optimize: false});
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
@@ -153,15 +141,8 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('batchFillOrders(tuple[],uint256[],bytes[])').inputs;
- [orders,
- takerAssetFillAmounts,
- signatures
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- takerAssetFillAmounts,
- signatures
- ], BaseContract._bigNumberToString);
- const encodedData = self._lookupEthersInterface('batchFillOrders(tuple[],uint256[],bytes[])').functions.batchFillOrders.encode([orders,
+ const abiEncoder = self._lookupAbiEncoder('batchFillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])');
+ const encodedData = abiEncoder.encode([orders,
takerAssetFillAmounts,
signatures
]);
@@ -182,15 +163,8 @@ export class ExchangeContract extends BaseContract {
signatures: string[],
): string {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('batchFillOrders(tuple[],uint256[],bytes[])').inputs;
- [orders,
- takerAssetFillAmounts,
- signatures
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- takerAssetFillAmounts,
- signatures
- ], BaseContract._bigNumberToString);
- const abiEncodedTransactionData = self._lookupEthersInterface('batchFillOrders(tuple[],uint256[],bytes[])').functions.batchFillOrders.encode([orders,
+ const abiEncoder = self._lookupAbiEncoder('batchFillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])');
+ const abiEncodedTransactionData = abiEncoder.encode([orders,
takerAssetFillAmounts,
signatures
]);
@@ -205,7 +179,7 @@ export class ExchangeContract extends BaseContract {
): Promise<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}
> {
const self = this as any as ExchangeContract;
- const functionSignature = 'batchFillOrders(tuple[],uint256[],bytes[])';
+ const functionSignature = 'batchFillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[orders,
takerAssetFillAmounts,
@@ -214,12 +188,8 @@ export class ExchangeContract extends BaseContract {
takerAssetFillAmounts,
signatures
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [orders,
- takerAssetFillAmounts,
- signatures
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.batchFillOrders;
- const encodedData = ethersFunction.encode([orders,
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([orders,
takerAssetFillAmounts,
signatures
]);
@@ -233,7 +203,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'batchFillOrders'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -253,10 +224,8 @@ export class ExchangeContract extends BaseContract {
[index_0
] = BaseContract._formatABIDataItemList(inputAbi, [index_0
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [index_0
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.cancelled;
- const encodedData = ethersFunction.encode([index_0
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([index_0
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
@@ -268,7 +237,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'cancelled'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -283,22 +253,11 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('preSign(bytes32,address,bytes)').inputs;
- [hash,
- signerAddress,
- signature
- ] = BaseContract._formatABIDataItemList(inputAbi, [hash,
- signerAddress,
- signature
- ], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [hash,
+ const abiEncoder = self._lookupAbiEncoder('preSign(bytes32,address,bytes)');
+ const encodedData = abiEncoder.encode([hash,
signerAddress,
signature
- ]);
- const encodedData = self._lookupEthersInterface('preSign(bytes32,address,bytes)').functions.preSign.encode([hash,
- signerAddress,
- signature
- ]);
+ ], {optimize: false});
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
@@ -323,15 +282,8 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('preSign(bytes32,address,bytes)').inputs;
- [hash,
- signerAddress,
- signature
- ] = BaseContract._formatABIDataItemList(inputAbi, [hash,
- signerAddress,
- signature
- ], BaseContract._bigNumberToString);
- const encodedData = self._lookupEthersInterface('preSign(bytes32,address,bytes)').functions.preSign.encode([hash,
+ const abiEncoder = self._lookupAbiEncoder('preSign(bytes32,address,bytes)');
+ const encodedData = abiEncoder.encode([hash,
signerAddress,
signature
]);
@@ -352,15 +304,8 @@ export class ExchangeContract extends BaseContract {
signature: string,
): string {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('preSign(bytes32,address,bytes)').inputs;
- [hash,
- signerAddress,
- signature
- ] = BaseContract._formatABIDataItemList(inputAbi, [hash,
- signerAddress,
- signature
- ], BaseContract._bigNumberToString);
- const abiEncodedTransactionData = self._lookupEthersInterface('preSign(bytes32,address,bytes)').functions.preSign.encode([hash,
+ const abiEncoder = self._lookupAbiEncoder('preSign(bytes32,address,bytes)');
+ const abiEncodedTransactionData = abiEncoder.encode([hash,
signerAddress,
signature
]);
@@ -384,12 +329,8 @@ export class ExchangeContract extends BaseContract {
signerAddress,
signature
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [hash,
- signerAddress,
- signature
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.preSign;
- const encodedData = ethersFunction.encode([hash,
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([hash,
signerAddress,
signature
]);
@@ -403,7 +344,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'preSign'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -419,26 +361,12 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('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)').inputs;
- [leftOrder,
- rightOrder,
- leftSignature,
- rightSignature
- ] = BaseContract._formatABIDataItemList(inputAbi, [leftOrder,
- rightOrder,
- leftSignature,
- rightSignature
- ], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [leftOrder,
- rightOrder,
- leftSignature,
- rightSignature
- ]);
- const encodedData = self._lookupEthersInterface('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)').functions.matchOrders.encode([leftOrder,
+ const abiEncoder = self._lookupAbiEncoder('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)');
+ const encodedData = abiEncoder.encode([leftOrder,
rightOrder,
leftSignature,
rightSignature
- ]);
+ ], {optimize: false});
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
@@ -465,17 +393,8 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('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)').inputs;
- [leftOrder,
- rightOrder,
- leftSignature,
- rightSignature
- ] = BaseContract._formatABIDataItemList(inputAbi, [leftOrder,
- rightOrder,
- leftSignature,
- rightSignature
- ], BaseContract._bigNumberToString);
- const encodedData = self._lookupEthersInterface('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)').functions.matchOrders.encode([leftOrder,
+ const abiEncoder = self._lookupAbiEncoder('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)');
+ const encodedData = abiEncoder.encode([leftOrder,
rightOrder,
leftSignature,
rightSignature
@@ -498,17 +417,8 @@ export class ExchangeContract extends BaseContract {
rightSignature: string,
): string {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('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)').inputs;
- [leftOrder,
- rightOrder,
- leftSignature,
- rightSignature
- ] = BaseContract._formatABIDataItemList(inputAbi, [leftOrder,
- rightOrder,
- leftSignature,
- rightSignature
- ], BaseContract._bigNumberToString);
- const abiEncodedTransactionData = self._lookupEthersInterface('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)').functions.matchOrders.encode([leftOrder,
+ const abiEncoder = self._lookupAbiEncoder('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)');
+ const abiEncodedTransactionData = abiEncoder.encode([leftOrder,
rightOrder,
leftSignature,
rightSignature
@@ -525,7 +435,7 @@ export class ExchangeContract extends BaseContract {
): Promise<{left: {makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber};right: {makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber};leftMakerAssetSpreadAmount: BigNumber}
> {
const self = this as any as ExchangeContract;
- const functionSignature = '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)';
+ const functionSignature = '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)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[leftOrder,
rightOrder,
@@ -536,13 +446,8 @@ export class ExchangeContract extends BaseContract {
leftSignature,
rightSignature
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [leftOrder,
- rightOrder,
- leftSignature,
- rightSignature
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.matchOrders;
- const encodedData = ethersFunction.encode([leftOrder,
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([leftOrder,
rightOrder,
leftSignature,
rightSignature
@@ -557,7 +462,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'matchOrders'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -572,22 +478,11 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('fillOrderNoThrow({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes},uint256,bytes)').inputs;
- [order,
- takerAssetFillAmount,
- signature
- ] = BaseContract._formatABIDataItemList(inputAbi, [order,
- takerAssetFillAmount,
- signature
- ], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [order,
- takerAssetFillAmount,
- signature
- ]);
- const encodedData = self._lookupEthersInterface('fillOrderNoThrow({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes},uint256,bytes)').functions.fillOrderNoThrow.encode([order,
+ const abiEncoder = self._lookupAbiEncoder('fillOrderNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)');
+ const encodedData = abiEncoder.encode([order,
takerAssetFillAmount,
signature
- ]);
+ ], {optimize: false});
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
@@ -612,15 +507,8 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('fillOrderNoThrow({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes},uint256,bytes)').inputs;
- [order,
- takerAssetFillAmount,
- signature
- ] = BaseContract._formatABIDataItemList(inputAbi, [order,
- takerAssetFillAmount,
- signature
- ], BaseContract._bigNumberToString);
- const encodedData = self._lookupEthersInterface('fillOrderNoThrow({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes},uint256,bytes)').functions.fillOrderNoThrow.encode([order,
+ const abiEncoder = self._lookupAbiEncoder('fillOrderNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)');
+ const encodedData = abiEncoder.encode([order,
takerAssetFillAmount,
signature
]);
@@ -641,15 +529,8 @@ export class ExchangeContract extends BaseContract {
signature: string,
): string {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('fillOrderNoThrow({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes},uint256,bytes)').inputs;
- [order,
- takerAssetFillAmount,
- signature
- ] = BaseContract._formatABIDataItemList(inputAbi, [order,
- takerAssetFillAmount,
- signature
- ], BaseContract._bigNumberToString);
- const abiEncodedTransactionData = self._lookupEthersInterface('fillOrderNoThrow({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes},uint256,bytes)').functions.fillOrderNoThrow.encode([order,
+ const abiEncoder = self._lookupAbiEncoder('fillOrderNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)');
+ const abiEncodedTransactionData = abiEncoder.encode([order,
takerAssetFillAmount,
signature
]);
@@ -664,7 +545,7 @@ export class ExchangeContract extends BaseContract {
): Promise<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}
> {
const self = this as any as ExchangeContract;
- const functionSignature = 'fillOrderNoThrow({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes},uint256,bytes)';
+ const functionSignature = 'fillOrderNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[order,
takerAssetFillAmount,
@@ -673,12 +554,8 @@ export class ExchangeContract extends BaseContract {
takerAssetFillAmount,
signature
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [order,
- takerAssetFillAmount,
- signature
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.fillOrderNoThrow;
- const encodedData = ethersFunction.encode([order,
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([order,
takerAssetFillAmount,
signature
]);
@@ -692,7 +569,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'fillOrderNoThrow'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -712,10 +590,8 @@ export class ExchangeContract extends BaseContract {
[index_0
] = BaseContract._formatABIDataItemList(inputAbi, [index_0
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [index_0
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.assetProxies;
- const encodedData = ethersFunction.encode([index_0
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([index_0
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
@@ -727,7 +603,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'assetProxies'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -740,14 +617,9 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('batchCancelOrders(tuple[])').inputs;
- [orders
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders
- ], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [orders
- ]);
- const encodedData = self._lookupEthersInterface('batchCancelOrders(tuple[])').functions.batchCancelOrders.encode([orders
- ]);
+ const abiEncoder = self._lookupAbiEncoder('batchCancelOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[])');
+ const encodedData = abiEncoder.encode([orders
+ ], {optimize: false});
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
@@ -768,11 +640,8 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('batchCancelOrders(tuple[])').inputs;
- [orders
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders
- ], BaseContract._bigNumberToString);
- const encodedData = self._lookupEthersInterface('batchCancelOrders(tuple[])').functions.batchCancelOrders.encode([orders
+ const abiEncoder = self._lookupAbiEncoder('batchCancelOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[])');
+ const encodedData = abiEncoder.encode([orders
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
@@ -789,11 +658,8 @@ export class ExchangeContract extends BaseContract {
orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
): string {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('batchCancelOrders(tuple[])').inputs;
- [orders
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders
- ], BaseContract._bigNumberToString);
- const abiEncodedTransactionData = self._lookupEthersInterface('batchCancelOrders(tuple[])').functions.batchCancelOrders.encode([orders
+ const abiEncoder = self._lookupAbiEncoder('batchCancelOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[])');
+ const abiEncodedTransactionData = abiEncoder.encode([orders
]);
return abiEncodedTransactionData;
},
@@ -804,15 +670,13 @@ export class ExchangeContract extends BaseContract {
): Promise<void
> {
const self = this as any as ExchangeContract;
- const functionSignature = 'batchCancelOrders(tuple[])';
+ const functionSignature = 'batchCancelOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[])';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[orders
] = BaseContract._formatABIDataItemList(inputAbi, [orders
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [orders
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.batchCancelOrders;
- const encodedData = ethersFunction.encode([orders
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([orders
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
@@ -824,7 +688,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'batchCancelOrders'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -839,22 +704,11 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('batchFillOrKillOrders(tuple[],uint256[],bytes[])').inputs;
- [orders,
+ const abiEncoder = self._lookupAbiEncoder('batchFillOrKillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])');
+ const encodedData = abiEncoder.encode([orders,
takerAssetFillAmounts,
signatures
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- takerAssetFillAmounts,
- signatures
- ], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [orders,
- takerAssetFillAmounts,
- signatures
- ]);
- const encodedData = self._lookupEthersInterface('batchFillOrKillOrders(tuple[],uint256[],bytes[])').functions.batchFillOrKillOrders.encode([orders,
- takerAssetFillAmounts,
- signatures
- ]);
+ ], {optimize: false});
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
@@ -879,15 +733,8 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('batchFillOrKillOrders(tuple[],uint256[],bytes[])').inputs;
- [orders,
- takerAssetFillAmounts,
- signatures
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- takerAssetFillAmounts,
- signatures
- ], BaseContract._bigNumberToString);
- const encodedData = self._lookupEthersInterface('batchFillOrKillOrders(tuple[],uint256[],bytes[])').functions.batchFillOrKillOrders.encode([orders,
+ const abiEncoder = self._lookupAbiEncoder('batchFillOrKillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])');
+ const encodedData = abiEncoder.encode([orders,
takerAssetFillAmounts,
signatures
]);
@@ -908,15 +755,8 @@ export class ExchangeContract extends BaseContract {
signatures: string[],
): string {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('batchFillOrKillOrders(tuple[],uint256[],bytes[])').inputs;
- [orders,
- takerAssetFillAmounts,
- signatures
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- takerAssetFillAmounts,
- signatures
- ], BaseContract._bigNumberToString);
- const abiEncodedTransactionData = self._lookupEthersInterface('batchFillOrKillOrders(tuple[],uint256[],bytes[])').functions.batchFillOrKillOrders.encode([orders,
+ const abiEncoder = self._lookupAbiEncoder('batchFillOrKillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])');
+ const abiEncodedTransactionData = abiEncoder.encode([orders,
takerAssetFillAmounts,
signatures
]);
@@ -931,7 +771,7 @@ export class ExchangeContract extends BaseContract {
): Promise<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}
> {
const self = this as any as ExchangeContract;
- const functionSignature = 'batchFillOrKillOrders(tuple[],uint256[],bytes[])';
+ const functionSignature = 'batchFillOrKillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[orders,
takerAssetFillAmounts,
@@ -940,12 +780,8 @@ export class ExchangeContract extends BaseContract {
takerAssetFillAmounts,
signatures
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [orders,
- takerAssetFillAmounts,
- signatures
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.batchFillOrKillOrders;
- const encodedData = ethersFunction.encode([orders,
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([orders,
takerAssetFillAmounts,
signatures
]);
@@ -959,7 +795,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'batchFillOrKillOrders'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -972,14 +809,9 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('cancelOrdersUpTo(uint256)').inputs;
- [targetOrderEpoch
- ] = BaseContract._formatABIDataItemList(inputAbi, [targetOrderEpoch
- ], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [targetOrderEpoch
- ]);
- const encodedData = self._lookupEthersInterface('cancelOrdersUpTo(uint256)').functions.cancelOrdersUpTo.encode([targetOrderEpoch
- ]);
+ const abiEncoder = self._lookupAbiEncoder('cancelOrdersUpTo(uint256)');
+ const encodedData = abiEncoder.encode([targetOrderEpoch
+ ], {optimize: false});
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
@@ -1000,11 +832,8 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('cancelOrdersUpTo(uint256)').inputs;
- [targetOrderEpoch
- ] = BaseContract._formatABIDataItemList(inputAbi, [targetOrderEpoch
- ], BaseContract._bigNumberToString);
- const encodedData = self._lookupEthersInterface('cancelOrdersUpTo(uint256)').functions.cancelOrdersUpTo.encode([targetOrderEpoch
+ const abiEncoder = self._lookupAbiEncoder('cancelOrdersUpTo(uint256)');
+ const encodedData = abiEncoder.encode([targetOrderEpoch
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
@@ -1021,11 +850,8 @@ export class ExchangeContract extends BaseContract {
targetOrderEpoch: BigNumber,
): string {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('cancelOrdersUpTo(uint256)').inputs;
- [targetOrderEpoch
- ] = BaseContract._formatABIDataItemList(inputAbi, [targetOrderEpoch
- ], BaseContract._bigNumberToString);
- const abiEncodedTransactionData = self._lookupEthersInterface('cancelOrdersUpTo(uint256)').functions.cancelOrdersUpTo.encode([targetOrderEpoch
+ const abiEncoder = self._lookupAbiEncoder('cancelOrdersUpTo(uint256)');
+ const abiEncodedTransactionData = abiEncoder.encode([targetOrderEpoch
]);
return abiEncodedTransactionData;
},
@@ -1041,10 +867,8 @@ export class ExchangeContract extends BaseContract {
[targetOrderEpoch
] = BaseContract._formatABIDataItemList(inputAbi, [targetOrderEpoch
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [targetOrderEpoch
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.cancelOrdersUpTo;
- const encodedData = ethersFunction.encode([targetOrderEpoch
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([targetOrderEpoch
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
@@ -1056,7 +880,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'cancelOrdersUpTo'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -1071,22 +896,11 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('batchFillOrdersNoThrow(tuple[],uint256[],bytes[])').inputs;
- [orders,
- takerAssetFillAmounts,
- signatures
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
+ const abiEncoder = self._lookupAbiEncoder('batchFillOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])');
+ const encodedData = abiEncoder.encode([orders,
takerAssetFillAmounts,
signatures
- ], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [orders,
- takerAssetFillAmounts,
- signatures
- ]);
- const encodedData = self._lookupEthersInterface('batchFillOrdersNoThrow(tuple[],uint256[],bytes[])').functions.batchFillOrdersNoThrow.encode([orders,
- takerAssetFillAmounts,
- signatures
- ]);
+ ], {optimize: false});
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
@@ -1111,15 +925,8 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('batchFillOrdersNoThrow(tuple[],uint256[],bytes[])').inputs;
- [orders,
- takerAssetFillAmounts,
- signatures
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- takerAssetFillAmounts,
- signatures
- ], BaseContract._bigNumberToString);
- const encodedData = self._lookupEthersInterface('batchFillOrdersNoThrow(tuple[],uint256[],bytes[])').functions.batchFillOrdersNoThrow.encode([orders,
+ const abiEncoder = self._lookupAbiEncoder('batchFillOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])');
+ const encodedData = abiEncoder.encode([orders,
takerAssetFillAmounts,
signatures
]);
@@ -1140,15 +947,8 @@ export class ExchangeContract extends BaseContract {
signatures: string[],
): string {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('batchFillOrdersNoThrow(tuple[],uint256[],bytes[])').inputs;
- [orders,
- takerAssetFillAmounts,
- signatures
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- takerAssetFillAmounts,
- signatures
- ], BaseContract._bigNumberToString);
- const abiEncodedTransactionData = self._lookupEthersInterface('batchFillOrdersNoThrow(tuple[],uint256[],bytes[])').functions.batchFillOrdersNoThrow.encode([orders,
+ const abiEncoder = self._lookupAbiEncoder('batchFillOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])');
+ const abiEncodedTransactionData = abiEncoder.encode([orders,
takerAssetFillAmounts,
signatures
]);
@@ -1163,7 +963,7 @@ export class ExchangeContract extends BaseContract {
): Promise<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}
> {
const self = this as any as ExchangeContract;
- const functionSignature = 'batchFillOrdersNoThrow(tuple[],uint256[],bytes[])';
+ const functionSignature = 'batchFillOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[orders,
takerAssetFillAmounts,
@@ -1172,12 +972,8 @@ export class ExchangeContract extends BaseContract {
takerAssetFillAmounts,
signatures
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [orders,
- takerAssetFillAmounts,
- signatures
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.batchFillOrdersNoThrow;
- const encodedData = ethersFunction.encode([orders,
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([orders,
takerAssetFillAmounts,
signatures
]);
@@ -1191,7 +987,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'batchFillOrdersNoThrow'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -1211,10 +1008,8 @@ export class ExchangeContract extends BaseContract {
[assetProxyId
] = BaseContract._formatABIDataItemList(inputAbi, [assetProxyId
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [assetProxyId
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.getAssetProxy;
- const encodedData = ethersFunction.encode([assetProxyId
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([assetProxyId
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
@@ -1226,7 +1021,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'getAssetProxy'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -1246,10 +1042,8 @@ export class ExchangeContract extends BaseContract {
[index_0
] = BaseContract._formatABIDataItemList(inputAbi, [index_0
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [index_0
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.transactions;
- const encodedData = ethersFunction.encode([index_0
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([index_0
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
@@ -1261,7 +1055,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'transactions'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -1276,22 +1071,11 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('fillOrKillOrder({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes},uint256,bytes)').inputs;
- [order,
+ const abiEncoder = self._lookupAbiEncoder('fillOrKillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)');
+ const encodedData = abiEncoder.encode([order,
takerAssetFillAmount,
signature
- ] = BaseContract._formatABIDataItemList(inputAbi, [order,
- takerAssetFillAmount,
- signature
- ], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [order,
- takerAssetFillAmount,
- signature
- ]);
- const encodedData = self._lookupEthersInterface('fillOrKillOrder({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes},uint256,bytes)').functions.fillOrKillOrder.encode([order,
- takerAssetFillAmount,
- signature
- ]);
+ ], {optimize: false});
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
@@ -1316,15 +1100,8 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('fillOrKillOrder({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes},uint256,bytes)').inputs;
- [order,
- takerAssetFillAmount,
- signature
- ] = BaseContract._formatABIDataItemList(inputAbi, [order,
- takerAssetFillAmount,
- signature
- ], BaseContract._bigNumberToString);
- const encodedData = self._lookupEthersInterface('fillOrKillOrder({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes},uint256,bytes)').functions.fillOrKillOrder.encode([order,
+ const abiEncoder = self._lookupAbiEncoder('fillOrKillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)');
+ const encodedData = abiEncoder.encode([order,
takerAssetFillAmount,
signature
]);
@@ -1345,15 +1122,8 @@ export class ExchangeContract extends BaseContract {
signature: string,
): string {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('fillOrKillOrder({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes},uint256,bytes)').inputs;
- [order,
- takerAssetFillAmount,
- signature
- ] = BaseContract._formatABIDataItemList(inputAbi, [order,
- takerAssetFillAmount,
- signature
- ], BaseContract._bigNumberToString);
- const abiEncodedTransactionData = self._lookupEthersInterface('fillOrKillOrder({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes},uint256,bytes)').functions.fillOrKillOrder.encode([order,
+ const abiEncoder = self._lookupAbiEncoder('fillOrKillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)');
+ const abiEncodedTransactionData = abiEncoder.encode([order,
takerAssetFillAmount,
signature
]);
@@ -1368,7 +1138,7 @@ export class ExchangeContract extends BaseContract {
): Promise<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}
> {
const self = this as any as ExchangeContract;
- const functionSignature = 'fillOrKillOrder({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes},uint256,bytes)';
+ const functionSignature = 'fillOrKillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[order,
takerAssetFillAmount,
@@ -1377,12 +1147,8 @@ export class ExchangeContract extends BaseContract {
takerAssetFillAmount,
signature
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [order,
- takerAssetFillAmount,
- signature
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.fillOrKillOrder;
- const encodedData = ethersFunction.encode([order,
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([order,
takerAssetFillAmount,
signature
]);
@@ -1396,7 +1162,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'fillOrKillOrder'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -1410,18 +1177,10 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('setSignatureValidatorApproval(address,bool)').inputs;
- [validatorAddress,
- approval
- ] = BaseContract._formatABIDataItemList(inputAbi, [validatorAddress,
+ const abiEncoder = self._lookupAbiEncoder('setSignatureValidatorApproval(address,bool)');
+ const encodedData = abiEncoder.encode([validatorAddress,
approval
- ], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [validatorAddress,
- approval
- ]);
- const encodedData = self._lookupEthersInterface('setSignatureValidatorApproval(address,bool)').functions.setSignatureValidatorApproval.encode([validatorAddress,
- approval
- ]);
+ ], {optimize: false});
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
@@ -1444,13 +1203,8 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('setSignatureValidatorApproval(address,bool)').inputs;
- [validatorAddress,
- approval
- ] = BaseContract._formatABIDataItemList(inputAbi, [validatorAddress,
- approval
- ], BaseContract._bigNumberToString);
- const encodedData = self._lookupEthersInterface('setSignatureValidatorApproval(address,bool)').functions.setSignatureValidatorApproval.encode([validatorAddress,
+ const abiEncoder = self._lookupAbiEncoder('setSignatureValidatorApproval(address,bool)');
+ const encodedData = abiEncoder.encode([validatorAddress,
approval
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -1469,13 +1223,8 @@ export class ExchangeContract extends BaseContract {
approval: boolean,
): string {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('setSignatureValidatorApproval(address,bool)').inputs;
- [validatorAddress,
- approval
- ] = BaseContract._formatABIDataItemList(inputAbi, [validatorAddress,
- approval
- ], BaseContract._bigNumberToString);
- const abiEncodedTransactionData = self._lookupEthersInterface('setSignatureValidatorApproval(address,bool)').functions.setSignatureValidatorApproval.encode([validatorAddress,
+ const abiEncoder = self._lookupAbiEncoder('setSignatureValidatorApproval(address,bool)');
+ const abiEncodedTransactionData = abiEncoder.encode([validatorAddress,
approval
]);
return abiEncodedTransactionData;
@@ -1495,11 +1244,8 @@ export class ExchangeContract extends BaseContract {
] = BaseContract._formatABIDataItemList(inputAbi, [validatorAddress,
approval
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [validatorAddress,
- approval
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.setSignatureValidatorApproval;
- const encodedData = ethersFunction.encode([validatorAddress,
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([validatorAddress,
approval
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -1512,7 +1258,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'setSignatureValidatorApproval'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -1535,11 +1282,8 @@ export class ExchangeContract extends BaseContract {
] = BaseContract._formatABIDataItemList(inputAbi, [index_0,
index_1
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [index_0,
- index_1
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.allowedValidators;
- const encodedData = ethersFunction.encode([index_0,
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([index_0,
index_1
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -1552,7 +1296,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'allowedValidators'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -1567,22 +1312,11 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('marketSellOrders(tuple[],uint256,bytes[])').inputs;
- [orders,
+ const abiEncoder = self._lookupAbiEncoder('marketSellOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])');
+ const encodedData = abiEncoder.encode([orders,
takerAssetFillAmount,
signatures
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- takerAssetFillAmount,
- signatures
- ], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [orders,
- takerAssetFillAmount,
- signatures
- ]);
- const encodedData = self._lookupEthersInterface('marketSellOrders(tuple[],uint256,bytes[])').functions.marketSellOrders.encode([orders,
- takerAssetFillAmount,
- signatures
- ]);
+ ], {optimize: false});
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
@@ -1607,15 +1341,8 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('marketSellOrders(tuple[],uint256,bytes[])').inputs;
- [orders,
- takerAssetFillAmount,
- signatures
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- takerAssetFillAmount,
- signatures
- ], BaseContract._bigNumberToString);
- const encodedData = self._lookupEthersInterface('marketSellOrders(tuple[],uint256,bytes[])').functions.marketSellOrders.encode([orders,
+ const abiEncoder = self._lookupAbiEncoder('marketSellOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])');
+ const encodedData = abiEncoder.encode([orders,
takerAssetFillAmount,
signatures
]);
@@ -1636,15 +1363,8 @@ export class ExchangeContract extends BaseContract {
signatures: string[],
): string {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('marketSellOrders(tuple[],uint256,bytes[])').inputs;
- [orders,
- takerAssetFillAmount,
- signatures
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- takerAssetFillAmount,
- signatures
- ], BaseContract._bigNumberToString);
- const abiEncodedTransactionData = self._lookupEthersInterface('marketSellOrders(tuple[],uint256,bytes[])').functions.marketSellOrders.encode([orders,
+ const abiEncoder = self._lookupAbiEncoder('marketSellOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])');
+ const abiEncodedTransactionData = abiEncoder.encode([orders,
takerAssetFillAmount,
signatures
]);
@@ -1659,7 +1379,7 @@ export class ExchangeContract extends BaseContract {
): Promise<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}
> {
const self = this as any as ExchangeContract;
- const functionSignature = 'marketSellOrders(tuple[],uint256,bytes[])';
+ const functionSignature = 'marketSellOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[orders,
takerAssetFillAmount,
@@ -1668,12 +1388,8 @@ export class ExchangeContract extends BaseContract {
takerAssetFillAmount,
signatures
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [orders,
- takerAssetFillAmount,
- signatures
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.marketSellOrders;
- const encodedData = ethersFunction.encode([orders,
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([orders,
takerAssetFillAmount,
signatures
]);
@@ -1687,7 +1403,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'marketSellOrders'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -1702,15 +1419,13 @@ export class ExchangeContract extends BaseContract {
): Promise<Array<{orderStatus: number;orderHash: string;orderTakerAssetFilledAmount: BigNumber}>
> {
const self = this as any as ExchangeContract;
- const functionSignature = 'getOrdersInfo(tuple[])';
+ const functionSignature = 'getOrdersInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[])';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[orders
] = BaseContract._formatABIDataItemList(inputAbi, [orders
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [orders
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.getOrdersInfo;
- const encodedData = ethersFunction.encode([orders
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([orders
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
@@ -1722,7 +1437,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'getOrdersInfo'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -1745,11 +1461,8 @@ export class ExchangeContract extends BaseContract {
] = BaseContract._formatABIDataItemList(inputAbi, [index_0,
index_1
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [index_0,
- index_1
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.preSigned;
- const encodedData = ethersFunction.encode([index_0,
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([index_0,
index_1
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -1762,7 +1475,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'preSigned'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -1779,9 +1493,8 @@ export class ExchangeContract extends BaseContract {
const functionSignature = 'owner()';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, []);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.owner;
- const encodedData = ethersFunction.encode([]);
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
@@ -1792,7 +1505,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'owner'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -1818,12 +1532,8 @@ export class ExchangeContract extends BaseContract {
signerAddress,
signature
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [hash,
- signerAddress,
- signature
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.isValidSignature;
- const encodedData = ethersFunction.encode([hash,
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([hash,
signerAddress,
signature
]);
@@ -1837,7 +1547,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'isValidSignature'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -1852,22 +1563,11 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('marketBuyOrdersNoThrow(tuple[],uint256,bytes[])').inputs;
- [orders,
+ const abiEncoder = self._lookupAbiEncoder('marketBuyOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])');
+ const encodedData = abiEncoder.encode([orders,
makerAssetFillAmount,
signatures
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- makerAssetFillAmount,
- signatures
- ], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [orders,
- makerAssetFillAmount,
- signatures
- ]);
- const encodedData = self._lookupEthersInterface('marketBuyOrdersNoThrow(tuple[],uint256,bytes[])').functions.marketBuyOrdersNoThrow.encode([orders,
- makerAssetFillAmount,
- signatures
- ]);
+ ], {optimize: false});
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
@@ -1892,15 +1592,8 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('marketBuyOrdersNoThrow(tuple[],uint256,bytes[])').inputs;
- [orders,
- makerAssetFillAmount,
- signatures
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- makerAssetFillAmount,
- signatures
- ], BaseContract._bigNumberToString);
- const encodedData = self._lookupEthersInterface('marketBuyOrdersNoThrow(tuple[],uint256,bytes[])').functions.marketBuyOrdersNoThrow.encode([orders,
+ const abiEncoder = self._lookupAbiEncoder('marketBuyOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])');
+ const encodedData = abiEncoder.encode([orders,
makerAssetFillAmount,
signatures
]);
@@ -1921,15 +1614,8 @@ export class ExchangeContract extends BaseContract {
signatures: string[],
): string {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('marketBuyOrdersNoThrow(tuple[],uint256,bytes[])').inputs;
- [orders,
- makerAssetFillAmount,
- signatures
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- makerAssetFillAmount,
- signatures
- ], BaseContract._bigNumberToString);
- const abiEncodedTransactionData = self._lookupEthersInterface('marketBuyOrdersNoThrow(tuple[],uint256,bytes[])').functions.marketBuyOrdersNoThrow.encode([orders,
+ const abiEncoder = self._lookupAbiEncoder('marketBuyOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])');
+ const abiEncodedTransactionData = abiEncoder.encode([orders,
makerAssetFillAmount,
signatures
]);
@@ -1944,7 +1630,7 @@ export class ExchangeContract extends BaseContract {
): Promise<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}
> {
const self = this as any as ExchangeContract;
- const functionSignature = 'marketBuyOrdersNoThrow(tuple[],uint256,bytes[])';
+ const functionSignature = 'marketBuyOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[orders,
makerAssetFillAmount,
@@ -1953,12 +1639,8 @@ export class ExchangeContract extends BaseContract {
makerAssetFillAmount,
signatures
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [orders,
- makerAssetFillAmount,
- signatures
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.marketBuyOrdersNoThrow;
- const encodedData = ethersFunction.encode([orders,
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([orders,
makerAssetFillAmount,
signatures
]);
@@ -1972,7 +1654,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'marketBuyOrdersNoThrow'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -1987,22 +1670,11 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('fillOrder({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes},uint256,bytes)').inputs;
- [order,
- takerAssetFillAmount,
- signature
- ] = BaseContract._formatABIDataItemList(inputAbi, [order,
- takerAssetFillAmount,
- signature
- ], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [order,
+ const abiEncoder = self._lookupAbiEncoder('fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)');
+ const encodedData = abiEncoder.encode([order,
takerAssetFillAmount,
signature
- ]);
- const encodedData = self._lookupEthersInterface('fillOrder({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes},uint256,bytes)').functions.fillOrder.encode([order,
- takerAssetFillAmount,
- signature
- ]);
+ ], {optimize: false});
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
@@ -2027,15 +1699,8 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('fillOrder({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes},uint256,bytes)').inputs;
- [order,
- takerAssetFillAmount,
- signature
- ] = BaseContract._formatABIDataItemList(inputAbi, [order,
- takerAssetFillAmount,
- signature
- ], BaseContract._bigNumberToString);
- const encodedData = self._lookupEthersInterface('fillOrder({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes},uint256,bytes)').functions.fillOrder.encode([order,
+ const abiEncoder = self._lookupAbiEncoder('fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)');
+ const encodedData = abiEncoder.encode([order,
takerAssetFillAmount,
signature
]);
@@ -2056,15 +1721,8 @@ export class ExchangeContract extends BaseContract {
signature: string,
): string {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('fillOrder({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes},uint256,bytes)').inputs;
- [order,
- takerAssetFillAmount,
- signature
- ] = BaseContract._formatABIDataItemList(inputAbi, [order,
- takerAssetFillAmount,
- signature
- ], BaseContract._bigNumberToString);
- const abiEncodedTransactionData = self._lookupEthersInterface('fillOrder({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes},uint256,bytes)').functions.fillOrder.encode([order,
+ const abiEncoder = self._lookupAbiEncoder('fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)');
+ const abiEncodedTransactionData = abiEncoder.encode([order,
takerAssetFillAmount,
signature
]);
@@ -2079,7 +1737,7 @@ export class ExchangeContract extends BaseContract {
): Promise<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}
> {
const self = this as any as ExchangeContract;
- const functionSignature = 'fillOrder({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes},uint256,bytes)';
+ const functionSignature = 'fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[order,
takerAssetFillAmount,
@@ -2088,12 +1746,8 @@ export class ExchangeContract extends BaseContract {
takerAssetFillAmount,
signature
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [order,
- takerAssetFillAmount,
- signature
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.fillOrder;
- const encodedData = ethersFunction.encode([order,
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([order,
takerAssetFillAmount,
signature
]);
@@ -2107,7 +1761,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'fillOrder'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -2123,26 +1778,12 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('executeTransaction(uint256,address,bytes,bytes)').inputs;
- [salt,
+ const abiEncoder = self._lookupAbiEncoder('executeTransaction(uint256,address,bytes,bytes)');
+ const encodedData = abiEncoder.encode([salt,
signerAddress,
data,
signature
- ] = BaseContract._formatABIDataItemList(inputAbi, [salt,
- signerAddress,
- data,
- signature
- ], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [salt,
- signerAddress,
- data,
- signature
- ]);
- const encodedData = self._lookupEthersInterface('executeTransaction(uint256,address,bytes,bytes)').functions.executeTransaction.encode([salt,
- signerAddress,
- data,
- signature
- ]);
+ ], {optimize: false});
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
@@ -2169,17 +1810,8 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('executeTransaction(uint256,address,bytes,bytes)').inputs;
- [salt,
- signerAddress,
- data,
- signature
- ] = BaseContract._formatABIDataItemList(inputAbi, [salt,
- signerAddress,
- data,
- signature
- ], BaseContract._bigNumberToString);
- const encodedData = self._lookupEthersInterface('executeTransaction(uint256,address,bytes,bytes)').functions.executeTransaction.encode([salt,
+ const abiEncoder = self._lookupAbiEncoder('executeTransaction(uint256,address,bytes,bytes)');
+ const encodedData = abiEncoder.encode([salt,
signerAddress,
data,
signature
@@ -2202,17 +1834,8 @@ export class ExchangeContract extends BaseContract {
signature: string,
): string {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('executeTransaction(uint256,address,bytes,bytes)').inputs;
- [salt,
- signerAddress,
- data,
- signature
- ] = BaseContract._formatABIDataItemList(inputAbi, [salt,
- signerAddress,
- data,
- signature
- ], BaseContract._bigNumberToString);
- const abiEncodedTransactionData = self._lookupEthersInterface('executeTransaction(uint256,address,bytes,bytes)').functions.executeTransaction.encode([salt,
+ const abiEncoder = self._lookupAbiEncoder('executeTransaction(uint256,address,bytes,bytes)');
+ const abiEncodedTransactionData = abiEncoder.encode([salt,
signerAddress,
data,
signature
@@ -2240,13 +1863,8 @@ export class ExchangeContract extends BaseContract {
data,
signature
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [salt,
- signerAddress,
- data,
- signature
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.executeTransaction;
- const encodedData = ethersFunction.encode([salt,
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([salt,
signerAddress,
data,
signature
@@ -2261,7 +1879,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'executeTransaction'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -2274,14 +1893,9 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('registerAssetProxy(address)').inputs;
- [assetProxy
- ] = BaseContract._formatABIDataItemList(inputAbi, [assetProxy
- ], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [assetProxy
- ]);
- const encodedData = self._lookupEthersInterface('registerAssetProxy(address)').functions.registerAssetProxy.encode([assetProxy
- ]);
+ const abiEncoder = self._lookupAbiEncoder('registerAssetProxy(address)');
+ const encodedData = abiEncoder.encode([assetProxy
+ ], {optimize: false});
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
@@ -2302,11 +1916,8 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('registerAssetProxy(address)').inputs;
- [assetProxy
- ] = BaseContract._formatABIDataItemList(inputAbi, [assetProxy
- ], BaseContract._bigNumberToString);
- const encodedData = self._lookupEthersInterface('registerAssetProxy(address)').functions.registerAssetProxy.encode([assetProxy
+ const abiEncoder = self._lookupAbiEncoder('registerAssetProxy(address)');
+ const encodedData = abiEncoder.encode([assetProxy
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
@@ -2323,11 +1934,8 @@ export class ExchangeContract extends BaseContract {
assetProxy: string,
): string {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('registerAssetProxy(address)').inputs;
- [assetProxy
- ] = BaseContract._formatABIDataItemList(inputAbi, [assetProxy
- ], BaseContract._bigNumberToString);
- const abiEncodedTransactionData = self._lookupEthersInterface('registerAssetProxy(address)').functions.registerAssetProxy.encode([assetProxy
+ const abiEncoder = self._lookupAbiEncoder('registerAssetProxy(address)');
+ const abiEncodedTransactionData = abiEncoder.encode([assetProxy
]);
return abiEncodedTransactionData;
},
@@ -2343,10 +1951,8 @@ export class ExchangeContract extends BaseContract {
[assetProxy
] = BaseContract._formatABIDataItemList(inputAbi, [assetProxy
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [assetProxy
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.registerAssetProxy;
- const encodedData = ethersFunction.encode([assetProxy
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([assetProxy
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
@@ -2358,7 +1964,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'registerAssetProxy'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -2373,15 +1980,13 @@ export class ExchangeContract extends BaseContract {
): Promise<{orderStatus: number;orderHash: string;orderTakerAssetFilledAmount: BigNumber}
> {
const self = this as any as ExchangeContract;
- const functionSignature = 'getOrderInfo({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes})';
+ const functionSignature = 'getOrderInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[order
] = BaseContract._formatABIDataItemList(inputAbi, [order
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [order
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.getOrderInfo;
- const encodedData = ethersFunction.encode([order
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([order
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
@@ -2393,7 +1998,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'getOrderInfo'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -2406,14 +2012,9 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('cancelOrder({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes})').inputs;
- [order
- ] = BaseContract._formatABIDataItemList(inputAbi, [order
- ], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [order
- ]);
- const encodedData = self._lookupEthersInterface('cancelOrder({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes})').functions.cancelOrder.encode([order
- ]);
+ const abiEncoder = self._lookupAbiEncoder('cancelOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))');
+ const encodedData = abiEncoder.encode([order
+ ], {optimize: false});
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
@@ -2434,11 +2035,8 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('cancelOrder({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes})').inputs;
- [order
- ] = BaseContract._formatABIDataItemList(inputAbi, [order
- ], BaseContract._bigNumberToString);
- const encodedData = self._lookupEthersInterface('cancelOrder({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes})').functions.cancelOrder.encode([order
+ const abiEncoder = self._lookupAbiEncoder('cancelOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))');
+ const encodedData = abiEncoder.encode([order
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
@@ -2455,11 +2053,8 @@ export class ExchangeContract extends BaseContract {
order: {makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string},
): string {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('cancelOrder({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes})').inputs;
- [order
- ] = BaseContract._formatABIDataItemList(inputAbi, [order
- ], BaseContract._bigNumberToString);
- const abiEncodedTransactionData = self._lookupEthersInterface('cancelOrder({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes})').functions.cancelOrder.encode([order
+ const abiEncoder = self._lookupAbiEncoder('cancelOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))');
+ const abiEncodedTransactionData = abiEncoder.encode([order
]);
return abiEncodedTransactionData;
},
@@ -2470,15 +2065,13 @@ export class ExchangeContract extends BaseContract {
): Promise<void
> {
const self = this as any as ExchangeContract;
- const functionSignature = 'cancelOrder({address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes})';
+ const functionSignature = 'cancelOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[order
] = BaseContract._formatABIDataItemList(inputAbi, [order
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [order
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.cancelOrder;
- const encodedData = ethersFunction.encode([order
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([order
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
@@ -2490,7 +2083,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'cancelOrder'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -2513,11 +2107,8 @@ export class ExchangeContract extends BaseContract {
] = BaseContract._formatABIDataItemList(inputAbi, [index_0,
index_1
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [index_0,
- index_1
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.orderEpoch;
- const encodedData = ethersFunction.encode([index_0,
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([index_0,
index_1
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
@@ -2530,7 +2121,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'orderEpoch'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -2547,9 +2139,8 @@ export class ExchangeContract extends BaseContract {
const functionSignature = 'ZRX_ASSET_DATA()';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, []);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.ZRX_ASSET_DATA;
- const encodedData = ethersFunction.encode([]);
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
@@ -2560,7 +2151,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'ZRX_ASSET_DATA'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -2575,22 +2167,11 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('marketSellOrdersNoThrow(tuple[],uint256,bytes[])').inputs;
- [orders,
- takerAssetFillAmount,
- signatures
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- takerAssetFillAmount,
- signatures
- ], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [orders,
+ const abiEncoder = self._lookupAbiEncoder('marketSellOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])');
+ const encodedData = abiEncoder.encode([orders,
takerAssetFillAmount,
signatures
- ]);
- const encodedData = self._lookupEthersInterface('marketSellOrdersNoThrow(tuple[],uint256,bytes[])').functions.marketSellOrdersNoThrow.encode([orders,
- takerAssetFillAmount,
- signatures
- ]);
+ ], {optimize: false});
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
@@ -2615,15 +2196,8 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('marketSellOrdersNoThrow(tuple[],uint256,bytes[])').inputs;
- [orders,
- takerAssetFillAmount,
- signatures
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- takerAssetFillAmount,
- signatures
- ], BaseContract._bigNumberToString);
- const encodedData = self._lookupEthersInterface('marketSellOrdersNoThrow(tuple[],uint256,bytes[])').functions.marketSellOrdersNoThrow.encode([orders,
+ const abiEncoder = self._lookupAbiEncoder('marketSellOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])');
+ const encodedData = abiEncoder.encode([orders,
takerAssetFillAmount,
signatures
]);
@@ -2644,15 +2218,8 @@ export class ExchangeContract extends BaseContract {
signatures: string[],
): string {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('marketSellOrdersNoThrow(tuple[],uint256,bytes[])').inputs;
- [orders,
- takerAssetFillAmount,
- signatures
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- takerAssetFillAmount,
- signatures
- ], BaseContract._bigNumberToString);
- const abiEncodedTransactionData = self._lookupEthersInterface('marketSellOrdersNoThrow(tuple[],uint256,bytes[])').functions.marketSellOrdersNoThrow.encode([orders,
+ const abiEncoder = self._lookupAbiEncoder('marketSellOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])');
+ const abiEncodedTransactionData = abiEncoder.encode([orders,
takerAssetFillAmount,
signatures
]);
@@ -2667,7 +2234,7 @@ export class ExchangeContract extends BaseContract {
): Promise<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}
> {
const self = this as any as ExchangeContract;
- const functionSignature = 'marketSellOrdersNoThrow(tuple[],uint256,bytes[])';
+ const functionSignature = 'marketSellOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[orders,
takerAssetFillAmount,
@@ -2676,12 +2243,8 @@ export class ExchangeContract extends BaseContract {
takerAssetFillAmount,
signatures
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [orders,
- takerAssetFillAmount,
- signatures
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.marketSellOrdersNoThrow;
- const encodedData = ethersFunction.encode([orders,
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([orders,
takerAssetFillAmount,
signatures
]);
@@ -2695,7 +2258,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'marketSellOrdersNoThrow'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -2712,9 +2276,8 @@ export class ExchangeContract extends BaseContract {
const functionSignature = 'EIP712_DOMAIN_HASH()';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, []);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.EIP712_DOMAIN_HASH;
- const encodedData = ethersFunction.encode([]);
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
@@ -2725,7 +2288,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'EIP712_DOMAIN_HASH'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -2740,22 +2304,11 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('marketBuyOrders(tuple[],uint256,bytes[])').inputs;
- [orders,
+ const abiEncoder = self._lookupAbiEncoder('marketBuyOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])');
+ const encodedData = abiEncoder.encode([orders,
makerAssetFillAmount,
signatures
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- makerAssetFillAmount,
- signatures
- ], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [orders,
- makerAssetFillAmount,
- signatures
- ]);
- const encodedData = self._lookupEthersInterface('marketBuyOrders(tuple[],uint256,bytes[])').functions.marketBuyOrders.encode([orders,
- makerAssetFillAmount,
- signatures
- ]);
+ ], {optimize: false});
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
@@ -2780,15 +2333,8 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('marketBuyOrders(tuple[],uint256,bytes[])').inputs;
- [orders,
- makerAssetFillAmount,
- signatures
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- makerAssetFillAmount,
- signatures
- ], BaseContract._bigNumberToString);
- const encodedData = self._lookupEthersInterface('marketBuyOrders(tuple[],uint256,bytes[])').functions.marketBuyOrders.encode([orders,
+ const abiEncoder = self._lookupAbiEncoder('marketBuyOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])');
+ const encodedData = abiEncoder.encode([orders,
makerAssetFillAmount,
signatures
]);
@@ -2809,15 +2355,8 @@ export class ExchangeContract extends BaseContract {
signatures: string[],
): string {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('marketBuyOrders(tuple[],uint256,bytes[])').inputs;
- [orders,
- makerAssetFillAmount,
- signatures
- ] = BaseContract._formatABIDataItemList(inputAbi, [orders,
- makerAssetFillAmount,
- signatures
- ], BaseContract._bigNumberToString);
- const abiEncodedTransactionData = self._lookupEthersInterface('marketBuyOrders(tuple[],uint256,bytes[])').functions.marketBuyOrders.encode([orders,
+ const abiEncoder = self._lookupAbiEncoder('marketBuyOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])');
+ const abiEncodedTransactionData = abiEncoder.encode([orders,
makerAssetFillAmount,
signatures
]);
@@ -2832,7 +2371,7 @@ export class ExchangeContract extends BaseContract {
): Promise<{makerAssetFilledAmount: BigNumber;takerAssetFilledAmount: BigNumber;makerFeePaid: BigNumber;takerFeePaid: BigNumber}
> {
const self = this as any as ExchangeContract;
- const functionSignature = 'marketBuyOrders(tuple[],uint256,bytes[])';
+ const functionSignature = 'marketBuyOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[orders,
makerAssetFillAmount,
@@ -2841,12 +2380,8 @@ export class ExchangeContract extends BaseContract {
makerAssetFillAmount,
signatures
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [orders,
- makerAssetFillAmount,
- signatures
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.marketBuyOrders;
- const encodedData = ethersFunction.encode([orders,
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([orders,
makerAssetFillAmount,
signatures
]);
@@ -2860,7 +2395,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'marketBuyOrders'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -2877,9 +2413,8 @@ export class ExchangeContract extends BaseContract {
const functionSignature = 'currentContextAddress()';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, []);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.currentContextAddress;
- const encodedData = ethersFunction.encode([]);
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
@@ -2890,7 +2425,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'currentContextAddress'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -2903,14 +2439,9 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<string> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('transferOwnership(address)').inputs;
- [newOwner
- ] = BaseContract._formatABIDataItemList(inputAbi, [newOwner
- ], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [newOwner
- ]);
- const encodedData = self._lookupEthersInterface('transferOwnership(address)').functions.transferOwnership.encode([newOwner
- ]);
+ const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)');
+ const encodedData = abiEncoder.encode([newOwner
+ ], {optimize: false});
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
@@ -2931,11 +2462,8 @@ export class ExchangeContract extends BaseContract {
txData: Partial<TxData> = {},
): Promise<number> {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('transferOwnership(address)').inputs;
- [newOwner
- ] = BaseContract._formatABIDataItemList(inputAbi, [newOwner
- ], BaseContract._bigNumberToString);
- const encodedData = self._lookupEthersInterface('transferOwnership(address)').functions.transferOwnership.encode([newOwner
+ const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)');
+ const encodedData = abiEncoder.encode([newOwner
]);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
@@ -2952,11 +2480,8 @@ export class ExchangeContract extends BaseContract {
newOwner: string,
): string {
const self = this as any as ExchangeContract;
- const inputAbi = self._lookupAbi('transferOwnership(address)').inputs;
- [newOwner
- ] = BaseContract._formatABIDataItemList(inputAbi, [newOwner
- ], BaseContract._bigNumberToString);
- const abiEncodedTransactionData = self._lookupEthersInterface('transferOwnership(address)').functions.transferOwnership.encode([newOwner
+ const abiEncoder = self._lookupAbiEncoder('transferOwnership(address)');
+ const abiEncodedTransactionData = abiEncoder.encode([newOwner
]);
return abiEncodedTransactionData;
},
@@ -2972,10 +2497,8 @@ export class ExchangeContract extends BaseContract {
[newOwner
] = BaseContract._formatABIDataItemList(inputAbi, [newOwner
], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, [newOwner
- ]);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.transferOwnership;
- const encodedData = ethersFunction.encode([newOwner
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([newOwner
]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
@@ -2987,7 +2510,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'transferOwnership'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -3004,9 +2528,8 @@ export class ExchangeContract extends BaseContract {
const functionSignature = 'VERSION()';
const inputAbi = self._lookupAbi(functionSignature).inputs;
[] = BaseContract._formatABIDataItemList(inputAbi, [], BaseContract._bigNumberToString.bind(self));
- BaseContract.strictArgumentEncodingCheck(inputAbi, []);
- const ethersFunction = self._lookupEthersInterface(functionSignature).functions.VERSION;
- const encodedData = ethersFunction.encode([]);
+ const abiEncoder = self._lookupAbiEncoder(functionSignature);
+ const encodedData = abiEncoder.encode([]);
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{
to: self.address,
@@ -3017,7 +2540,8 @@ export class ExchangeContract extends BaseContract {
);
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
- let resultArray = ethersFunction.decode(rawCallResult);
+ const decodingRules = {structsAsObjects: false};
+ let resultArray = abiEncoder.decodeReturnValues(rawCallResult, decodingRules);
const outputAbi = (_.find(self.abi, {name: 'VERSION'}) as MethodAbi).outputs;
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this));
resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this));
@@ -3074,7 +2598,7 @@ export class ExchangeContract extends BaseContract {
}
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
super('Exchange', abi, address, provider, txDefaults);
- classUtils.bindAll(this, ['_ethersInterfacesByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
+ classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
}
} // tslint:disable:max-file-line-count
// tslint:enable:no-unbound-method