fix ABI encoding/decoding functions (#2165)
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
{{> params_docstring inputs=inputs docstrings=devdoc.params}}
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(
|
||||
{{> typed_params inputs=inputs}}
|
||||
@@ -14,15 +15,25 @@ getABIEncodedTransactionData(
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('{{this.functionSignature}}', [{{> normalized_params inputs=inputs}}]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(
|
||||
callData: string
|
||||
): ({{> return_type inputs=inputs ~}}) {
|
||||
): ({{> return_type outputs=inputs ~}}) {
|
||||
const self = this as any as {{contractName}}Contract;
|
||||
const abiEncoder = self._lookupAbiEncoder('{{this.functionSignature}}');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<{{> return_type inputs=inputs}}>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<{{> return_type outputs=inputs}}>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(
|
||||
returnData: string
|
||||
): ({{> return_type outputs=outputs ~}}) {
|
||||
|
||||
@@ -83,12 +83,18 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('simpleRequire()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('simpleRequire()');
|
||||
@@ -96,6 +102,11 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('simpleRequire()');
|
||||
@@ -141,6 +152,7 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @param a the array of bytes being accepted
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(a: string[]): string {
|
||||
assert.isArray('a', a);
|
||||
@@ -148,13 +160,23 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('acceptsAnArrayOfBytes(bytes[])', [a]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string[]] {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('acceptsAnArrayOfBytes(bytes[])');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string[]]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('acceptsAnArrayOfBytes(bytes[])');
|
||||
@@ -202,6 +224,7 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(index_0: BigNumber): string {
|
||||
assert.isBigNumber('index_0', index_0);
|
||||
@@ -211,6 +234,11 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('simpleInputSimpleOutput(uint256)');
|
||||
@@ -218,6 +246,11 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): BigNumber {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('simpleInputSimpleOutput(uint256)');
|
||||
@@ -351,6 +384,7 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(wad: BigNumber): string {
|
||||
assert.isBigNumber('wad', wad);
|
||||
@@ -358,13 +392,23 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('withdraw(uint256)', [wad]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [BigNumber] {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('withdraw(uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('withdraw(uint256)');
|
||||
@@ -420,6 +464,7 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(index_0: BigNumber, index_1: string, index_2: string): string {
|
||||
assert.isBigNumber('index_0', index_0);
|
||||
@@ -432,13 +477,23 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): [string, string, string] {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [BigNumber, string, string] {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('multiInputMultiOutput(uint256,bytes,string)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string, string, string]>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber, string, string]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): [string, string, string] {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('multiInputMultiOutput(uint256,bytes,string)');
|
||||
@@ -511,6 +566,7 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* @param v some v, recovery id
|
||||
* @param r ECDSA r output
|
||||
* @param s ECDSA s output
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(hash: string, v: number | BigNumber, r: string, s: string): string {
|
||||
assert.isString('hash', hash);
|
||||
@@ -524,6 +580,11 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('ecrecoverFn(bytes32,uint8,bytes32,bytes32)');
|
||||
@@ -531,6 +592,11 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('ecrecoverFn(bytes32,uint8,bytes32,bytes32)');
|
||||
@@ -571,6 +637,7 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(a: string): string {
|
||||
assert.isString('a', a);
|
||||
@@ -578,13 +645,23 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('acceptsBytes(bytes)', [a]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string] {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('acceptsBytes(bytes)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('acceptsBytes(bytes)');
|
||||
@@ -627,19 +704,30 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('noInputSimpleOutput()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('noInputSimpleOutput()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): BigNumber {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('noInputSimpleOutput()');
|
||||
@@ -679,12 +767,18 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('revertWithConstant()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('revertWithConstant()');
|
||||
@@ -692,6 +786,11 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('revertWithConstant()');
|
||||
@@ -731,12 +830,18 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('simpleRevert()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('simpleRevert()');
|
||||
@@ -744,6 +849,11 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('simpleRevert()');
|
||||
@@ -789,6 +899,7 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
@@ -798,13 +909,23 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): { innerStruct: { aField: BigNumber } } {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('methodUsingNestedStructWithInnerStructNotUsedElsewhere()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<{ innerStruct: { aField: BigNumber } }>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): { innerStruct: { aField: BigNumber } } {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('methodUsingNestedStructWithInnerStructNotUsedElsewhere()');
|
||||
@@ -855,27 +976,30 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('nestedStructOutput()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(
|
||||
callData: string,
|
||||
): {
|
||||
innerStruct: { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string };
|
||||
description: string;
|
||||
} {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('nestedStructOutput()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<{
|
||||
innerStruct: { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string };
|
||||
description: string;
|
||||
}>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(
|
||||
returnData: string,
|
||||
): {
|
||||
@@ -923,12 +1047,18 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('requireWithConstant()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('requireWithConstant()');
|
||||
@@ -936,6 +1066,11 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('requireWithConstant()');
|
||||
@@ -991,6 +1126,7 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(x: string, a: BigNumber, b: BigNumber, y: string, c: BigNumber): string {
|
||||
assert.isString('x', x);
|
||||
@@ -1005,6 +1141,11 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('withAddressInput(address,uint256,uint256,address,uint256)');
|
||||
@@ -1012,6 +1153,11 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('withAddressInput(address,uint256,uint256,address,uint256)');
|
||||
@@ -1055,6 +1201,7 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(s: {
|
||||
someBytes: string;
|
||||
@@ -1069,13 +1216,27 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(
|
||||
callData: string,
|
||||
): [{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }] {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('structInput((bytes,uint32,bytes[],string))');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<
|
||||
[{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }]
|
||||
>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('structInput((bytes,uint32,bytes[],string))');
|
||||
@@ -1204,19 +1365,30 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('nonPureMethod()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('nonPureMethod()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): BigNumber {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('nonPureMethod()');
|
||||
@@ -1275,6 +1447,7 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(complexInput: { foo: BigNumber; bar: string; car: string }): string {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
@@ -1284,20 +1457,23 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(
|
||||
callData: string,
|
||||
): { input: { foo: BigNumber; bar: string; car: string }; lorem: string; ipsum: string; dolor: string } {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): { foo: BigNumber; bar: string; car: string } {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('complexInputComplexOutput((uint256,bytes,string))');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<{
|
||||
input: { foo: BigNumber; bar: string; car: string };
|
||||
lorem: string;
|
||||
ipsum: string;
|
||||
dolor: string;
|
||||
}>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<{ foo: BigNumber; bar: string; car: string }>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(
|
||||
returnData: string,
|
||||
): { input: { foo: BigNumber; bar: string; car: string }; lorem: string; ipsum: string; dolor: string } {
|
||||
@@ -1347,12 +1523,18 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('noInputNoOutput()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('noInputNoOutput()');
|
||||
@@ -1360,6 +1542,11 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('noInputNoOutput()');
|
||||
@@ -1400,6 +1587,7 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(x: BigNumber): string {
|
||||
assert.isBigNumber('x', x);
|
||||
@@ -1407,6 +1595,11 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('simplePureFunctionWithInput(uint256)', [x]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('simplePureFunctionWithInput(uint256)');
|
||||
@@ -1414,6 +1607,11 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): BigNumber {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('simplePureFunctionWithInput(uint256)');
|
||||
@@ -1542,12 +1740,18 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('nonPureMethodThatReturnsNothing()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('nonPureMethodThatReturnsNothing()');
|
||||
@@ -1555,6 +1759,11 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('nonPureMethodThatReturnsNothing()');
|
||||
@@ -1594,19 +1803,30 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('simplePureFunction()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('simplePureFunction()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): BigNumber {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('simplePureFunction()');
|
||||
@@ -1661,6 +1881,7 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(n: {
|
||||
innerStruct: {
|
||||
@@ -1678,13 +1899,42 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(
|
||||
callData: string,
|
||||
): [
|
||||
{
|
||||
innerStruct: { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string };
|
||||
description: string;
|
||||
}
|
||||
] {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('nestedStructInput(((bytes,uint32,bytes[],string),string))');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<
|
||||
[
|
||||
{
|
||||
innerStruct: {
|
||||
someBytes: string;
|
||||
anInteger: number;
|
||||
aDynamicArrayOfBytes: string[];
|
||||
aString: string;
|
||||
};
|
||||
description: string;
|
||||
}
|
||||
]
|
||||
>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('nestedStructInput(((bytes,uint32,bytes[],string),string))');
|
||||
@@ -1724,19 +1974,30 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('methodReturningMultipleValues()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): [BigNumber, string] {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('methodReturningMultipleValues()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber, string]>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): [BigNumber, string] {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('methodReturningMultipleValues()');
|
||||
@@ -1781,23 +2042,30 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('methodReturningArrayOfStructs()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(
|
||||
callData: string,
|
||||
): Array<{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }> {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('methodReturningArrayOfStructs()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<
|
||||
Array<{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }>
|
||||
>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(
|
||||
returnData: string,
|
||||
): Array<{ someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string }> {
|
||||
@@ -1994,26 +2262,30 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('structOutput()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(
|
||||
callData: string,
|
||||
): { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string } {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('structOutput()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<{
|
||||
someBytes: string;
|
||||
anInteger: number;
|
||||
aDynamicArrayOfBytes: string[];
|
||||
aString: string;
|
||||
}>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(
|
||||
returnData: string,
|
||||
): { someBytes: string; anInteger: number; aDynamicArrayOfBytes: string[]; aString: string } {
|
||||
@@ -2060,19 +2332,30 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(): string {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('pureFunctionWithConstant()', []);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('pureFunctionWithConstant()');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): BigNumber {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('pureFunctionWithConstant()');
|
||||
@@ -2120,6 +2403,7 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(index_0: BigNumber): string {
|
||||
assert.isBigNumber('index_0', index_0);
|
||||
@@ -2127,13 +2411,23 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('simpleInputNoOutput(uint256)', [index_0]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [BigNumber] {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('simpleInputNoOutput(uint256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('simpleInputNoOutput(uint256)');
|
||||
@@ -2174,6 +2468,7 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(a: string): string {
|
||||
assert.isString('a', a);
|
||||
@@ -2181,13 +2476,23 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('overloadedMethod(string)', [a]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [string] {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('overloadedMethod(string)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[string]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('overloadedMethod(string)');
|
||||
@@ -2228,6 +2533,7 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(a: BigNumber): string {
|
||||
assert.isBigNumber('a', a);
|
||||
@@ -2235,13 +2541,23 @@ export class AbiGenDummyContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('overloadedMethod(int256)', [a]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): void {
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): [BigNumber] {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('overloadedMethod(int256)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<void>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<[BigNumber]>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): void {
|
||||
const self = (this as any) as AbiGenDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('overloadedMethod(int256)');
|
||||
|
||||
@@ -60,6 +60,7 @@ export class TestLibDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(x: BigNumber): string {
|
||||
assert.isBigNumber('x', x);
|
||||
@@ -67,6 +68,11 @@ export class TestLibDummyContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('publicAddConstant(uint256)', [x]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
const self = (this as any) as TestLibDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('publicAddConstant(uint256)');
|
||||
@@ -74,6 +80,11 @@ export class TestLibDummyContract extends BaseContract {
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): BigNumber {
|
||||
const self = (this as any) as TestLibDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('publicAddConstant(uint256)');
|
||||
@@ -114,6 +125,7 @@ export class TestLibDummyContract extends BaseContract {
|
||||
* Returns the ABI encoded transaction data needed to send an Ethereum transaction calling this method. Before
|
||||
* sending the Ethereum tx, this encoded tx data can first be sent to a separate signing service or can be used
|
||||
* to create a 0x transaction (see protocol spec for more details).
|
||||
* @returns The ABI encoded transaction data as a string
|
||||
*/
|
||||
getABIEncodedTransactionData(x: BigNumber): string {
|
||||
assert.isBigNumber('x', x);
|
||||
@@ -121,6 +133,11 @@ export class TestLibDummyContract extends BaseContract {
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('publicAddOne(uint256)', [x]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded transaction data into its input arguments
|
||||
* @param callData The ABI-encoded transaction data
|
||||
* @returns An array representing the input arguments in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedTransactionData(callData: string): BigNumber {
|
||||
const self = (this as any) as TestLibDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('publicAddOne(uint256)');
|
||||
@@ -128,6 +145,11 @@ export class TestLibDummyContract extends BaseContract {
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<BigNumber>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
/**
|
||||
* Decode the ABI-encoded return data from a transaction
|
||||
* @param returnData the data returned after transaction execution
|
||||
* @returns An array representing the output results in order. Keynames of nested structs are preserved.
|
||||
*/
|
||||
getABIDecodedReturnData(returnData: string): BigNumber {
|
||||
const self = (this as any) as TestLibDummyContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('publicAddOne(uint256)');
|
||||
|
||||
Reference in New Issue
Block a user