aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-11-10 12:22:48 +0800
committerGreg Hysen <greg.hysen@gmail.com>2018-11-29 08:38:10 +0800
commit58177060a49917d0de88e6a58559b13211127efe (patch)
treef8de93a4a7af72d9b333887cbb7e64fb69d03341
parent3027e6bc0db9d0722f0dcf09f84505ad8440e65b (diff)
downloaddexon-sol-tools-58177060a49917d0de88e6a58559b13211127efe.tar
dexon-sol-tools-58177060a49917d0de88e6a58559b13211127efe.tar.gz
dexon-sol-tools-58177060a49917d0de88e6a58559b13211127efe.tar.bz2
dexon-sol-tools-58177060a49917d0de88e6a58559b13211127efe.tar.lz
dexon-sol-tools-58177060a49917d0de88e6a58559b13211127efe.tar.xz
dexon-sol-tools-58177060a49917d0de88e6a58559b13211127efe.tar.zst
dexon-sol-tools-58177060a49917d0de88e6a58559b13211127efe.zip
works for simple case
-rw-r--r--packages/order-utils/test/abi/calldata.ts3
-rw-r--r--packages/order-utils/test/abi_encoder_test.ts4
2 files changed, 4 insertions, 3 deletions
diff --git a/packages/order-utils/test/abi/calldata.ts b/packages/order-utils/test/abi/calldata.ts
index 725bdce62..aaad332f8 100644
--- a/packages/order-utils/test/abi/calldata.ts
+++ b/packages/order-utils/test/abi/calldata.ts
@@ -81,7 +81,7 @@ export class DependentCalldataBlock extends CalldataBlock {
private parent: CalldataBlock;
private dependency: CalldataBlock;
- constructor(name: string, signature: string, /*offsetInBytes: number,*/ relocatable: boolean, parent: CalldataBlock, dependency: CalldataBlock) {
+ constructor(name: string, signature: string, /*offsetInBytes: number,*/ relocatable: boolean, dependency: CalldataBlock, parent: CalldataBlock) {
const headerSizeInBytes = 0;
const bodySizeInBytes = DependentCalldataBlock.DEPENDENT_PAYLOAD_SIZE_IN_BYTES;
super(name, signature, /*offsetInBytes,*/ headerSizeInBytes, bodySizeInBytes, relocatable);
@@ -174,6 +174,7 @@ export class Calldata {
let block: CalldataBlock | undefined;
let offset = 0;
while ((block = blockQueue.pop()) !== undefined) {
+ console.log(block.getName());
block.setOffset(offset);
if (block instanceof DependentCalldataBlock) {
blockQueue.push(block.getDependency());
diff --git a/packages/order-utils/test/abi_encoder_test.ts b/packages/order-utils/test/abi_encoder_test.ts
index 6655af1ff..0455169a3 100644
--- a/packages/order-utils/test/abi_encoder_test.ts
+++ b/packages/order-utils/test/abi_encoder_test.ts
@@ -116,7 +116,7 @@ describe.only('ABI Encoder', () => {
});
- it('Types with default widths', async () => {
+ it.skip('Types with default widths', async () => {
const method = new AbiEncoder.Method(AbiSamples.typesWithDefaultWidthsAbi);
console.log(method);
const args = [new BigNumber(1), new BigNumber(-1), '0x56', [new BigNumber(1)], [new BigNumber(-1)], ['0x56']];
@@ -329,7 +329,7 @@ describe.only('ABI Encoder', () => {
expect(calldata).to.be.equal(expectedCalldata);
});
- it.only('Yessir', async () => {
+ it('Yessir', async () => {
const method = new AbiEncoder.Method(AbiSamples.simpleAbi);
const calldata = method.encode([new BigNumber(5), 'five']);
console.log(calldata);