diff options
Diffstat (limited to 'packages/order-utils')
-rw-r--r-- | packages/order-utils/test/abi/calldata.ts | 2 | ||||
-rw-r--r-- | packages/order-utils/test/abi/data_type.ts | 4 | ||||
-rw-r--r-- | packages/order-utils/test/abi_encoder_test.ts | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/packages/order-utils/test/abi/calldata.ts b/packages/order-utils/test/abi/calldata.ts index 74f0c0924..c1630c34a 100644 --- a/packages/order-utils/test/abi/calldata.ts +++ b/packages/order-utils/test/abi/calldata.ts @@ -96,7 +96,7 @@ export class DependentCalldataBlock extends CalldataBlock { console.log("Parent Offset - ", parentOffset); const parentHeaderSize = this.parent.getHeaderSizeInBytes(); console.log("Parent Header size - ", parentHeaderSize); - const pointer: number = (dependencyOffset - parentOffset) + parentHeaderSize; + const pointer: number = dependencyOffset - (parentOffset + parentHeaderSize); console.log("DAT PTR = ", pointer); const pointerBuf = ethUtil.toBuffer(`0x${pointer.toString(16)}`); console.log("Chye - ", pointerBuf); diff --git a/packages/order-utils/test/abi/data_type.ts b/packages/order-utils/test/abi/data_type.ts index 5311ffb81..72d270bf1 100644 --- a/packages/order-utils/test/abi/data_type.ts +++ b/packages/order-utils/test/abi/data_type.ts @@ -102,6 +102,8 @@ export abstract class MemberDataType extends DataType { public constructor(dataItem: DataItem, isArray: boolean = false, arrayLength?: number, arrayElementType?: string) { super(dataItem); + console.log('*'.repeat(40), arrayLength); + this.memberMap = {}; this.members = []; this.isArray = isArray; @@ -243,7 +245,7 @@ export abstract class MemberDataType extends DataType { */ if (this.isArray && this.arrayLength === undefined) { - return true; + return false; } // Search for dependent members diff --git a/packages/order-utils/test/abi_encoder_test.ts b/packages/order-utils/test/abi_encoder_test.ts index e600542b8..4c571434e 100644 --- a/packages/order-utils/test/abi_encoder_test.ts +++ b/packages/order-utils/test/abi_encoder_test.ts @@ -259,7 +259,7 @@ describe.only('ABI Encoder', () => { expect(calldata).to.be.equal(expectedCalldata); }); - it('Fixed Lenfgth Array / Dynamic Members', async () => { + it.only('Fixed Lenfgth Array / Dynamic Members', async () => { const method = new AbiEncoder.Method(AbiSamples.staticArrayDynamicMembersAbi); const args = [["Brave", "New", "World"]]; const calldata = method.encode(args); @@ -303,7 +303,7 @@ describe.only('ABI Encoder', () => { }); - it.only('Fixed Length Array / Static Members ABI', async () => { + it('Fixed Length Array / Static Members ABI', async () => { const method = new AbiEncoder.Method(AbiSamples.staticArrayAbi); const args = [[new BigNumber(127), new BigNumber(14), new BigNumber(54)]]; const calldata = method.encode(args); |