Conversation
866b45b to
9f6b6a1
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3799 +/- ##
==========================================
- Coverage 25.52% 25.41% -0.12%
==========================================
Files 660 662 +2
Lines 42636 42822 +186
==========================================
- Hits 10884 10883 -1
- Misses 30749 30937 +188
+ Partials 1003 1002 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
9f6b6a1 to
fccb48d
Compare
Instead of several `neo-go` commands to create update contract transaction in the main chain and sign them, it allows using a single `adm` command. Closes #3464. Signed-off-by: Andrey Butusov <andrey@nspcc.io>
|
|
||
| gasWalletPath, _ := cmd.Flags().GetString(gasWalletFlag) | ||
| if gasWalletPath == "" { | ||
| return errors.New("gas wallet is required (use --gas-wallet flag)") |
There was a problem hiding this comment.
can be a flag const and fmt.Errorf
| } | ||
|
|
||
| w := io2.NewBufBinWriter() | ||
| emit.AppCall(w.BinWriter, contractHash, "update", callflag.All, nefBytes, manifestBytes, data) |
There was a problem hiding this comment.
@roman-khimov , @AnnaShaleva, cant this be simpler to update a contract? rpc bingings or smth. likely, no emit package and manual invocation scripts should be used, and most of the things should be done much easier, try to look at https://github.com/nspcc-dev/neofs-contract/blob/f228d5018923fa9d6d14bf363670e9159c0e79c7/rpc/neofs/rpcbinding.go#L106
| cmd.Printf("Transaction sent successfully!\n") | ||
| cmd.Printf("Transaction hash: %s\n", txHash.StringLE()) | ||
|
|
||
| await, _ := cmd.Flags().GetBool(awaitFlag) |
There was a problem hiding this comment.
i feel like any update should be in await mode always, no need for this to be flag'ed
|
|
||
| func waitForTxMainChain(c fschain.Client, hash util.Uint256, vub uint32) error { | ||
| for range maxAttemptsTxWait { | ||
| time.Sleep(time.Second) |
There was a problem hiding this comment.
no Waiter functionality used? manual for and sleep? i think we need to try to use the new neo-go API for such things
Closes #3464.