mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2026-03-01 04:28:51 +00:00
-r flag doesn't work after the contract hash in contract update #1569
Labels
No labels
I1
I2
I3
I4
S1
S2
S3
S4
U0
U1
U2
U3
U3
U4
blocked
bug
bug
cli
compiler
config
config
consensus
dependencies
discussion
documentation
enhancement
epic
feature
go
good first issue
help wanted
neotest
network
oracle
performance
question
rpc
security
smartcontract
task
task
task
test
vm
wallet
windows
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nspcc-dev/neo-go#1569
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @edgedlt on GitHub (Nov 2, 2025).
When updating a contract via CLI, the
-rflag only works if you put it before the contract hash. If you put it after (like you can with other flags), you getRequired flag "rpc-endpoint" not set.Making the contract hash a flag instead of a positional argument would probably fix it (
-c <hash>).Examples
Doesn't work:
Error:
Required flag "rpc-endpoint" not setWorks:
Environment
@roman-khimov commented on GitHub (Nov 4, 2025):
That's expected as per current syntax, positional arguments should follow flags and they can't be mixed. But in this case the behavior was inherited from
testinvokefunctionwhere we inevitably have positionals just because of its purpose. Update command doesn't require that (and it's a relatively new command, #3968), so we can drop positional arguments from it (but some support for both is required for transition period).