blob: 0ebee64c482f4a7da0ea82b30674eac5ff04c0c4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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']);
});
});
});
|