flow-cli
flow-cli copied to clipboard
[BUG] Extra argument passed to transactions in Stable Cadence Pre-release version
Problem
When trying to send a transaction with parameters, I consistently get
❌ Command Error: error parsing transaction arguments: argument count is [n+1], expected [n]
Steps to Reproduce
With the Stable Cadence CLI preview release installed, try the following transaction:
transaction(s: String) {
prepare(signer: &Account) {
log(s)
}
}
flow transactions send ./transactions/test_param.cdc hello
And it should output:
❌ Command Error: error parsing transaction arguments: argument count is 2, expected 1
Confirm it works without the transaction parameter:
transaction {
prepare(signer: &Account) {
log("hello")
}
}
flow transactions send ./transactions/test.cdc
And it should succeed.
Acceptance Criteria
Transactions with and without params should execute.
Context
Using the preview release to update FLIPs and contracts.
Machine Info
OS: macOS 13.6 (22G120) CLI: v1.5.0-stable-cadence.2
This has been fixed in head i belive
Just tried with fresh install of v1.5.0-stable-cadence.2
and still experiencing the issue.
@SupunS Is it possible that the latest Stable Cadence release, v1.5.0-stable-cadence.2
, does not yet have the Flow CLI master
code which includes #1179 and #1182? Could you please merge master
into the Stable Cadence feature branch and create a new preview build?
I took a stab at this @turbolent @SupunS
Merging the master seems to fix it.
Would be good to have some test cases around this. Didn't see any test in the above two PRs (#1179 and #1182) either.