aboutsummaryrefslogtreecommitdiffstats
path: root/packages/utils/test
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-07-27 05:11:03 +0800
committerAlex Browne <stephenalexbrowne@gmail.com>2018-08-09 05:27:30 +0800
commit6a5965d73bb542634631d7af76c150795d899744 (patch)
treeaba6597779094b9738c0ad94fb2694a18d22cdc2 /packages/utils/test
parent19cda0eb036b6876964d8074aea1295142d25027 (diff)
downloaddexon-sol-tools-6a5965d73bb542634631d7af76c150795d899744.tar
dexon-sol-tools-6a5965d73bb542634631d7af76c150795d899744.tar.gz
dexon-sol-tools-6a5965d73bb542634631d7af76c150795d899744.tar.bz2
dexon-sol-tools-6a5965d73bb542634631d7af76c150795d899744.tar.lz
dexon-sol-tools-6a5965d73bb542634631d7af76c150795d899744.tar.xz
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')
-rw-r--r--packages/utils/test/abi_utils_test.ts19
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']);
+ });
+ });
+});