diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2018-11-15 07:55:10 +0800 |
---|---|---|
committer | Greg Hysen <greg.hysen@gmail.com> | 2018-11-29 08:38:10 +0800 |
commit | ebd4dbc6c6ebdf776ba1582367d3eda32717ba65 (patch) | |
tree | e5310a79564647232b1e68ac3d2bb6e2cf2637be /packages/utils | |
parent | 1f9ea7ed1b3d56a13b5e518adeed907eb830c02a (diff) | |
download | dexon-sol-tools-ebd4dbc6c6ebdf776ba1582367d3eda32717ba65.tar dexon-sol-tools-ebd4dbc6c6ebdf776ba1582367d3eda32717ba65.tar.gz dexon-sol-tools-ebd4dbc6c6ebdf776ba1582367d3eda32717ba65.tar.bz2 dexon-sol-tools-ebd4dbc6c6ebdf776ba1582367d3eda32717ba65.tar.lz dexon-sol-tools-ebd4dbc6c6ebdf776ba1582367d3eda32717ba65.tar.xz dexon-sol-tools-ebd4dbc6c6ebdf776ba1582367d3eda32717ba65.tar.zst dexon-sol-tools-ebd4dbc6c6ebdf776ba1582367d3eda32717ba65.zip |
Exports AbiEncoder as 1 unit
Diffstat (limited to 'packages/utils')
-rw-r--r-- | packages/utils/src/index.ts | 4 | ||||
-rw-r--r-- | packages/utils/test/abi_encoder_test.ts | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/packages/utils/src/index.ts b/packages/utils/src/index.ts index 2edc6a331..f59cbec8c 100644 --- a/packages/utils/src/index.ts +++ b/packages/utils/src/index.ts @@ -9,4 +9,6 @@ export { abiUtils } from './abi_utils'; export { NULL_BYTES } from './constants'; export { errorUtils } from './error_utils'; export { fetchAsync } from './fetch_async'; -export { signTypedDataUtils } from './sign_typed_data_utils';
\ No newline at end of file +export { signTypedDataUtils } from './sign_typed_data_utils'; +import * as AbiEncoder from './abi_encoder'; +export { AbiEncoder }; diff --git a/packages/utils/test/abi_encoder_test.ts b/packages/utils/test/abi_encoder_test.ts index 0961458da..8d78b61b5 100644 --- a/packages/utils/test/abi_encoder_test.ts +++ b/packages/utils/test/abi_encoder_test.ts @@ -2,8 +2,7 @@ import * as chai from 'chai'; import 'mocha'; import { chaiSetup } from './utils/chai_setup'; -import { BigNumber } from '../src/'; -import * as AbiEncoder from '../src/abi_encoder'; +import { BigNumber, AbiEncoder } from '../src/'; import * as AbiSamples from './abi_samples'; chaiSetup.configure(); @@ -29,7 +28,7 @@ describe.only('ABI Encoder', () => { // Verify optimized calldata is expected const optimizedCalldata = method.encode(args, { optimize: true }); const expectedOptimizedCalldata = '0x13e751a900000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000b5465737420537472696e67000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d5465737420537472696e67203200000000000000000000000000000000000000'; - //expect(optimizedCalldata).to.be.equal(expectedOptimizedCalldata); + expect(optimizedCalldata).to.be.equal(expectedOptimizedCalldata); // Verify args decode properly const decodedArgs = method.decode(optimizedCalldata); |