diff options
-rw-r--r-- | packages/order-utils/test/abi/calldata.ts | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/packages/order-utils/test/abi/calldata.ts b/packages/order-utils/test/abi/calldata.ts index 37dd30e57..94f6a5571 100644 --- a/packages/order-utils/test/abi/calldata.ts +++ b/packages/order-utils/test/abi/calldata.ts @@ -223,44 +223,6 @@ export class Calldata { valueBufs.push(block.toBuffer()); } - /* - const blockQueue = new Queue<CalldataBlock>(); - blockQueue.push(this.root); - - // Assign locations in breadth-first manner - let block: CalldataBlock | undefined; - let offset = 0; - while ((block = blockQueue.pop()) !== undefined) { - console.log(block.getName()); - block.setOffset(offset); - offset += block.getSizeInBytes(); - if (block instanceof DependentCalldataBlock) { - console.log(block.getDependency()); - blockQueue.push(block.getDependency()); - } else if (block instanceof MemberCalldataBlock) { - _.eachRight(block.getMembers(), (member: CalldataBlock) => { - blockQueue.pushFront(member); - }); - } - } - - console.log(this.root); - - // Fetch values using same technique - const valueBufs: Buffer[] = [selectorBuffer]; - blockQueue.push(this.root); - while ((block = blockQueue.pop()) !== undefined) { - valueBufs.push(block.toBuffer()); - - if (block instanceof DependentCalldataBlock) { - blockQueue.push(block.getDependency()); - } else if (block instanceof MemberCalldataBlock) { - _.eachRight(block.getMembers(), (member: CalldataBlock) => { - blockQueue.pushFront(member); - }); - } - }*/ - const combinedBuffers = Buffer.concat(valueBufs); const hexValue = ethUtil.bufferToHex(combinedBuffers); return hexValue; |