diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2018-11-09 05:41:58 +0800 |
---|---|---|
committer | Greg Hysen <greg.hysen@gmail.com> | 2018-11-29 08:38:10 +0800 |
commit | 8f61f6d0f9532e95fd32cbab8dd0344b42de2da7 (patch) | |
tree | 8d2d5d4bdea797bb8b8f9179d5ca440f17c9c2e0 /packages/order-utils/test/abi_samples.ts | |
parent | 180d1ca63a45ca96df2c9f811075411ca495f693 (diff) | |
download | dexon-0x-contracts-8f61f6d0f9532e95fd32cbab8dd0344b42de2da7.tar dexon-0x-contracts-8f61f6d0f9532e95fd32cbab8dd0344b42de2da7.tar.gz dexon-0x-contracts-8f61f6d0f9532e95fd32cbab8dd0344b42de2da7.tar.bz2 dexon-0x-contracts-8f61f6d0f9532e95fd32cbab8dd0344b42de2da7.tar.lz dexon-0x-contracts-8f61f6d0f9532e95fd32cbab8dd0344b42de2da7.tar.xz dexon-0x-contracts-8f61f6d0f9532e95fd32cbab8dd0344b42de2da7.tar.zst dexon-0x-contracts-8f61f6d0f9532e95fd32cbab8dd0344b42de2da7.zip |
Arrays of tuples
Diffstat (limited to 'packages/order-utils/test/abi_samples.ts')
-rw-r--r-- | packages/order-utils/test/abi_samples.ts | 150 |
1 files changed, 150 insertions, 0 deletions
diff --git a/packages/order-utils/test/abi_samples.ts b/packages/order-utils/test/abi_samples.ts index 0882b389a..7939cbaeb 100644 --- a/packages/order-utils/test/abi_samples.ts +++ b/packages/order-utils/test/abi_samples.ts @@ -129,6 +129,156 @@ export const dynamicTupleAbi = { type: 'function', } as MethodAbi; +export const arrayOfStaticTuplesWithDefinedLengthAbi = { + constant: false, + inputs: [ + { + components: [ + { + name: 'someUint', + type: 'uint256', + }, + { + name: 'someUint2', + type: 'uint256', + }, + ], + name: 'order', + type: 'tuple[8]', + }, + ], + name: 'simpleFunction', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', +} as MethodAbi; + +export const arrayOfStaticTuplesWithDynamicLengthAbi = { + constant: false, + inputs: [ + { + components: [ + { + name: 'someUint', + type: 'uint256', + }, + { + name: 'someUint2', + type: 'uint256', + }, + ], + name: 'order', + type: 'tuple[]', + }, + ], + name: 'simpleFunction', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', +} as MethodAbi; + +export const arrayOfDynamicTuplesWithDefinedLengthAbi = { + constant: false, + inputs: [ + { + components: [ + { + name: 'someUint', + type: 'uint256', + }, + { + name: 'someString', + type: 'string', + }, + ], + name: 'order', + type: 'tuple[8]', + }, + ], + name: 'simpleFunction', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', +} as MethodAbi; + +export const arrayOfDynamicTuplesWithUndefinedLengthAbi = { + constant: false, + inputs: [ + { + components: [ + { + name: 'someUint', + type: 'uint256', + }, + { + name: 'someString', + type: 'string', + }, + ], + name: 'order', + type: 'tuple[]', + }, + ], + name: 'simpleFunction', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', +} as MethodAbi; + +export const arrayOfDynamicTuplesAbi = { + constant: false, + inputs: [ + { + components: [ + { + name: 'someUint', + type: 'uint256', + }, + { + name: 'someString', + type: 'string', + }, + ], + name: 'order', + type: 'tuple[]', + }, + ], + name: 'simpleFunction', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', +} as MethodAbi; + +export const multidimensionalArrayOfDynamicTuplesAbi = { + constant: false, + inputs: [ + { + components: [ + { + name: 'someUint', + type: 'uint256', + }, + { + name: 'someString', + type: 'string', + }, + ], + name: 'order', + type: 'tuple[][2][]', + }, + ], + name: 'simpleFunction', + outputs: [], + payable: false, + stateMutability: 'nonpayable', + type: 'function', +} as MethodAbi; + export const staticTupleAbi = { constant: false, inputs: [ |