Skip to content

Commit

Permalink
Added support for sighash-style tuple parsing.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Nov 20, 2019
1 parent c35ddaf commit 19aaade
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/abi/src.ts/fragments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ function parseParamType(param: string, allowIndexed: boolean): ParseNode {
let c = param[i];
switch (c) {
case "(":
if (!node.state.allowParams) { throwError(i); }
if (node.state.allowType && node.type === "") {
node.type = "tuple";
} else if (!node.state.allowParams) {
throwError(i);
}
node.state.allowType = false;
node.type = verifyType(node.type);
node.components = [ newNode(node) ];
Expand Down

0 comments on commit 19aaade

Please sign in to comment.