diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2018-11-14 08:17:24 +0800 |
---|---|---|
committer | Greg Hysen <greg.hysen@gmail.com> | 2018-11-29 08:38:10 +0800 |
commit | 27cb966991c9408025106624f36927548b9e873c (patch) | |
tree | 71431e1f56572bcc160ed6397e58af5de489b036 /packages/order-utils/test/abi_encoder_test.ts | |
parent | 457cb1dc843511d6e987b0ffce0f985d4e97c968 (diff) | |
download | dexon-sol-tools-27cb966991c9408025106624f36927548b9e873c.tar dexon-sol-tools-27cb966991c9408025106624f36927548b9e873c.tar.gz dexon-sol-tools-27cb966991c9408025106624f36927548b9e873c.tar.bz2 dexon-sol-tools-27cb966991c9408025106624f36927548b9e873c.tar.lz dexon-sol-tools-27cb966991c9408025106624f36927548b9e873c.tar.xz dexon-sol-tools-27cb966991c9408025106624f36927548b9e873c.tar.zst dexon-sol-tools-27cb966991c9408025106624f36927548b9e873c.zip |
Alias now points to dependency, not pointer
Diffstat (limited to 'packages/order-utils/test/abi_encoder_test.ts')
-rw-r--r-- | packages/order-utils/test/abi_encoder_test.ts | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/packages/order-utils/test/abi_encoder_test.ts b/packages/order-utils/test/abi_encoder_test.ts index 5ef4203b7..661fb62a6 100644 --- a/packages/order-utils/test/abi_encoder_test.ts +++ b/packages/order-utils/test/abi_encoder_test.ts @@ -27,7 +27,7 @@ const expect = chai.expect; describe.only('ABI Encoder', () => { describe.only('ABI Tests at Method Level', () => { - it.only('Optimizer', async () => { + it('Optimizer #1', async () => { const method = new AbiEncoder.Method(AbiSamples.stringAbi); const strings = [ "Test String", @@ -41,6 +41,29 @@ describe.only('ABI Encoder', () => { console.log(optimizedCalldata); }); + it.only('Optimizer #2', async () => { + const method = new AbiEncoder.Method(AbiSamples.optimizerAbi2); + const stringArray = [ + "Test String", + "Test String", + "Test String", + "Test String", + ]; + const string = 'Test String'; + const args = [stringArray, string]; + + + const TEST = method.encode(args, new Calldata(), true, true); + console.log(TEST); + + const optimizedCalldata = method.encode(args, new Calldata(), false, true); + + console.log(`OPTIMIZED CALLDATA == '${optimizedCalldata}'`); + const decodedArgs = method.decode(optimizedCalldata); + console.log(JSON.stringify(decodedArgs)); + //expect(decodedArgs).to.be.equal(args); + }); + it('Crazy ABI', async () => { const method = new AbiEncoder.Method(AbiSamples.crazyAbi); console.log(method.getSignature()); |