Arguments parsing fix for Transactions with functions
@@ -132,13 +132,6 @@ func ParseArgumentsWithoutType(fileName string, code []byte, args []string) (scr
var parameterList []*ast.Parameter
- transactionDeclaration := program.SoleTransactionDeclaration()
- if transactionDeclaration != nil {
- if transactionDeclaration.ParameterList != nil {
- parameterList = transactionDeclaration.ParameterList.Parameters
- }
- }
-
functionDeclaration := sema.FunctionEntryPointDeclaration(program)
if functionDeclaration != nil {
if functionDeclaration.ParameterList != nil {
@@ -146,6 +139,14 @@ func ParseArgumentsWithoutType(fileName string, code []byte, args []string) (scr
}
}
+ transactionDeclaration := program.TransactionDeclarations()
+ fmt.Println(transactionDeclaration)
+ if transactionDeclaration != nil {
+ if transactionDeclaration[0].ParameterList != nil {
+ parameterList = transactionDeclaration[0].ParameterList.Parameters
+ }
+ }
+
if parameterList == nil {
return resultArgs, nil
}
