diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-07-27 05:11:03 +0800 |
---|---|---|
committer | Alex Browne <stephenalexbrowne@gmail.com> | 2018-08-09 05:27:30 +0800 |
commit | 6a5965d73bb542634631d7af76c150795d899744 (patch) | |
tree | aba6597779094b9738c0ad94fb2694a18d22cdc2 /packages/utils/test/abi_utils_test.ts | |
parent | 19cda0eb036b6876964d8074aea1295142d25027 (diff) | |
download | dexon-sol-tools-6a5965d73bb542634631d7af76c150795d899744.tar.gz dexon-sol-tools-6a5965d73bb542634631d7af76c150795d899744.tar.zst dexon-sol-tools-6a5965d73bb542634631d7af76c150795d899744.zip |
Add strictArgumentEncodingCheck to BaseContract and use it in contract templates
Diffstat (limited to 'packages/utils/test/abi_utils_test.ts')
-rw-r--r-- | packages/utils/test/abi_utils_test.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/packages/utils/test/abi_utils_test.ts b/packages/utils/test/abi_utils_test.ts new file mode 100644 index 000000000..0ebee64c4 --- /dev/null +++ b/packages/utils/test/abi_utils_test.ts @@ -0,0 +1,19 @@ +import * as chai from 'chai'; +import 'mocha'; + +import { abiUtils } from '../src'; + +const expect = chai.expect; + +describe('abiUtils', () => { + describe('splitTupleTypes', () => { + it('handles basic types', () => { + const got = abiUtils.splitTupleTypes('tuple(bytes,uint256,address)'); + expect(got).to.deep.equal(['bytes', 'uint256', 'address']); + }); + it('handles nested tuple types', () => { + const got = abiUtils.splitTupleTypes('tuple(tuple(bytes,uint256),address)'); + expect(got).to.deep.equal(['tuple(bytes,uint256)', 'address']); + }); + }); +}); |