File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
packages/thirdweb/src/utils/abi Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,14 @@ export function normalizeFunctionParams(
1313 abiFunction . inputs . map ( ( i ) => i . type ) ,
1414 abiFunction . inputs . map ( ( input , index ) => {
1515 const value = input . name ;
16- if ( value === undefined ) {
17- throw new Error (
18- `Missing named parameter for ${ "name" in abiFunction ? abiFunction . name : "constructor" } at index ${ index } ` ,
19- ) ;
16+ if ( value === undefined || value . length === 0 ) {
17+ if ( ! params [ "*" ] ) {
18+ throw new Error (
19+ `Missing named parameter for ${ "name" in abiFunction ? abiFunction . name : "constructor" } at index ${ index } ` ,
20+ ) ;
21+ }
22+
23+ return params [ "*" ] ;
2024 }
2125 const valueWithoutUnderscore = value . replace ( / ^ _ + / , "" ) ;
2226 const normalizedValue =
You can’t perform that action at this time.
0 commit comments