Roman Khimov
c4e084b0d8
*: fix whitespace errors
...
leading/trailing newlines
2021-05-12 22:51:41 +03:00
Roman Khimov
0500c8f9d7
cli/wallet: fix error handling
...
cli/wallet/wallet.go:527:19: Error return value of `cli.NewExitError` is not checked (errcheck)
cli.NewExitError("valid account address must be provided", 1)
2021-05-12 20:19:24 +03:00
Roman Khimov
ec50bb4041
cli/wallet: fix error handling
...
ineffectual assignment to err (ineffassign)
`err` is shadowed at `tx, err = c.CreateNEP11TransferTx()` line.
2021-05-12 19:34:12 +03:00
Anna Shaleva
d0c64347ab
*: add data
to NEP11 Transfer
2021-05-05 19:44:29 +03:00
Anna Shaleva
f61ab6bd11
cli: add nep11 properties
command
2021-04-30 16:23:06 +03:00
Anna Shaleva
ba7ebc2390
cli: add nep11 [tokens | tokensOf | ownerOf]
commands
2021-04-30 16:23:06 +03:00
Anna Shaleva
4e55b1a9ed
cli: add nep11 ownerOf
command
2021-04-30 16:23:06 +03:00
Anna Shaleva
946e940ce0
cli: adjust nep17 transfer
command usage text
...
Token name or hash can be used.
2021-04-30 16:23:06 +03:00
Anna Shaleva
7ea15f02c6
cli: add nep11 transfer
command
2021-04-30 16:23:06 +03:00
Anna Shaleva
3eefda7f1a
cli: add nep11 balance
command
2021-04-30 16:23:06 +03:00
Anna Shaleva
3742e38399
cli: add nep11 remove
command
2021-04-30 16:23:06 +03:00
Anna Shaleva
5fdb8e2a01
cli: add nep11 info
command
2021-04-30 16:23:06 +03:00
Anna Shaleva
ba8b0fd7b0
cli: reuse existing token flag for nep17-related commands
2021-04-30 16:23:06 +03:00
Anna Shaleva
a61a3d5ceb
cli: add nep11 import
command
2021-04-30 16:23:06 +03:00
Anna Shaleva
4b8d814ee8
cli: move common NEP17 flags to package variables
...
These flags will be reused for NEP11 commands.
2021-04-30 16:23:06 +03:00
Anna Shaleva
40ae78cb88
wallet: add Standard
field to Token
...
We need to distinguish NEP11 and NEP17 tokens preesnted in the wallet.
2021-04-30 15:58:27 +03:00
Anna Shaleva
d98abd75d2
cli: refactor handleVote method
...
Reuse existing RPC client method for transaction sending.
2021-04-23 10:45:15 +03:00
Anna Shaleva
e43ab642d1
cli: refactor handleCandidate method
...
Reuse existing RPC client method for transaction sending.
2021-04-23 10:45:15 +03:00
Anna Shaleva
14c2d7d25a
cli: allow to provide cosigners for 'wallet nep17 multitransfer'
2021-04-23 10:45:15 +03:00
Anna Shaleva
f848783d5d
cli: allow to provide cosigners for 'wallet nep17 transfer'
2021-04-23 10:45:15 +03:00
Anna Shaleva
49c35dec20
rpc: allow to provide cosigners for NEP17-transfer-related commands
2021-04-23 10:29:40 +03:00
Anna Shaleva
94316fa36d
cli: move GetDataFromContext and ParseParams to a helpers
package
2021-04-23 10:26:09 +03:00
Anna Shaleva
d12ae0998f
cli: return numWordsRead from GetDataFromContext
...
It's needed when we have extra args after the 'data' argument. Then
these args are started right from numWordsRead offset.
2021-04-23 10:23:06 +03:00
Anna Shaleva
70fc78b768
cli: update usage text for 'wallet sign' command
...
RPC endpoint can be provided.
2021-04-21 15:51:19 +03:00
Anna Shaleva
a348347fe8
cli: refactor readAccountInfo method
...
It doesn't require binwriter.
2021-04-21 15:51:19 +03:00
Anna Shaleva
2daae43eaf
cli: add optional 'name' argument to 'wallet import-deployed' command
...
If the provided WIF is encrypted then we have no way to set the
account name. Fixed.
2021-04-21 15:51:19 +03:00
Anna Shaleva
0ccced2274
cli: add usage description to 'wallet import' command
2021-04-21 15:51:19 +03:00
Anna Shaleva
08e88ce5b2
cli: handle 'name' named argument in 'wallet import-multisig'
...
If the provided WIF is encrypted, then we won't get account name from
readAccountInfo.
2021-04-21 15:51:19 +03:00
Anna Shaleva
6af2f3fdec
cli: use AddressFlag for 'wallet remove' command
2021-04-21 15:51:13 +03:00
Anna Shaleva
42bfd413e3
cli: fix UsageText for 'wallet import-deployed' command
2021-04-19 16:23:53 +03:00
Roman Khimov
8f14c61c34
Merge pull request #1906 from nspcc-dev/cli/transfer_param
...
cli: allow to pass 'data' for nep17 transfer command
2021-04-19 10:43:42 +03:00
Anna Shaleva
db868f033e
cli: allow to provide data
for nep17 transfer commands
2021-04-19 10:20:29 +03:00
Anna Shaleva
ced90e0510
cli: use AddressFlag for nep17 import
2021-04-16 15:18:33 +03:00
Anna Shaleva
92c6708fa0
cli: use AddressFlag for import-deployed
2021-04-16 15:15:25 +03:00
Anna Shaleva
1d3a297a6b
rpc: add Data field to NEP17 TransferTarget
...
It's a part of transfer, thus it should be passed along with the other
transfer parameters.
2021-04-16 13:54:23 +03:00
Anna Shaleva
87f950a719
cli: format error message
2021-04-16 12:41:02 +03:00
Anna Shaleva
4edc62148b
cli: use AddressFlag for dump-keys
2021-04-16 12:41:42 +03:00
Anna Shaleva
90b054afd0
cli: check address flag is set for validator-related commands
2021-04-16 12:41:02 +03:00
Anna Shaleva
ff2b051646
cli: use AddressFlag for nep17-related commands
2021-04-16 12:41:02 +03:00
Anna Shaleva
2dcc729c47
cli: use AddressFlag for wallet sign
2021-04-16 12:40:01 +03:00
Roman Khimov
d314f82db3
transaction: drop Network from Transaction
...
We only need it when signing/verifying.
2021-03-26 13:45:18 +03:00
Roman Khimov
19a23a36e4
Merge pull request #1807 from nspcc-dev/feature/walletsign
...
cli: allow to sign dumped transaction by several non-multisig signers
2021-03-10 14:13:20 +03:00
Evgeniy Stratonikov
09af8b4fcb
cli: allow to dump wallet public keys
2021-03-10 12:37:15 +03:00
Evgeniy Stratonikov
106c27782e
cli/wallet: allow to cosign with a contract
...
Contracts have empty verification script and their hash is
calculated differently.
2021-03-09 15:45:02 +03:00
Evgeniy Stratonikov
8a4b97171a
cli/wallet: fail if signer is missing in tx
2021-03-09 15:45:02 +03:00
Evgeniy Stratonikov
7553c1ac96
cli/wallet: process signers in order
2021-03-09 15:45:02 +03:00
Evgeniy Stratonikov
b9136dbfc0
smartcontract: use hash in GetWitness()
...
All necessary info must already be in context.
2021-03-09 15:45:02 +03:00
Evgeniy Stratonikov
8ef7dd320c
cli: rename multisig sign
to wallet sign
2021-03-09 15:45:02 +03:00
Anna Shaleva
6c0faa4ea3
rpc: provide cosigners accounts to CreateTxFromScript
...
We need to define network fee for each of cosigners, and the only way to
do it is to access the cosigner's script.
2021-03-04 10:37:35 +03:00
Anna Shaleva
b1b9a8cf66
rpc: refactor CreateTxFromScript signature
...
Make cosigners non-variadic.
2021-03-03 13:42:15 +03:00