Commit graph

83 commits

Author SHA1 Message Date
Roman Khimov
ce9d0b22cf *: use NEP-XX naming consistently in docs/comments
Standards are NEP-11 and NEP-17, not NEP11, not NEP17, not anything
else. Variable/function names of course can use whatever fits, but documents
and comments should be consistent wrt this.
2021-11-19 12:58:46 +03:00
Roman Khimov
7679a17bc6 cli: provide better error message in case of password read failure 2021-11-03 19:36:11 +03:00
Anna Shaleva
50296975e2 crypto: allow to provide non-default scrypt parameters 2021-06-11 15:22:28 +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
Anna Shaleva
a61a3d5ceb cli: add nep11 import command 2021-04-30 16:23:06 +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
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
Anna Shaleva
92c6708fa0 cli: use AddressFlag for import-deployed 2021-04-16 15:15:25 +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
2dcc729c47 cli: use AddressFlag for wallet sign 2021-04-16 12:40:01 +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
8ef7dd320c cli: rename multisig sign to wallet sign 2021-03-09 15:45:02 +03:00
Evgeniy Stratonikov
b8024dbfa8 cli: support Uint160 hashes with 0x prefix 2021-02-18 14:38:50 +03:00
Anna Shaleva
7896ef0640 rpc: allow client to send nep17 transfer with data 2021-02-11 17:11:36 +03:00
Evgeniy Stratonikov
f6176b30f2 cli: support escape codes 2021-02-11 16:06:11 +03:00
Evgeniy Stratonikov
dd1e2cefe4 core,cli: disallow verify methods with non-bool returns 2021-01-27 12:51:47 +03:00
Evgeniy Stratonikov
73f888f02e core: allow to overload contract methods
Multiple methods with different parameter count can co-exist.
2021-01-27 12:51:07 +03:00
Evgeniy Stratonikov
0b26b46234 state: store NEF instead of script for contract
NEFs for native contracts are set statically, thus
field values are taken from the reference implementation.
2021-01-13 15:34:10 +03:00
Roman Khimov
cf8cf93e7a native: change contract names, move them to separate package
Follow neo-project/neo#2138 and make RPC client's GetNativeContractHash
case-sensitive.
2020-12-14 15:24:15 +03:00
Evgenii Stratonikov
239a8c3de7 cli: fix wallet convert and add tests
Close #1589.
2020-12-04 12:45:53 +03:00
Roman Khimov
1cf1fe5d74 *: introduce stable contract hashes
Follow neo-project/neo#2044.
2020-11-27 21:47:08 +03:00
Evgenii Stratonikov
31eca342eb *: replace all NEP5 occurences to NEP17 2020-11-24 13:08:24 +03:00
Anna Shaleva
2f9d64821f cli: add ExitError where needed 2020-11-05 10:37:06 +03:00
Anna Shaleva
b8a88f9378 rpc: allow to use address, id or name instead of scripthash [Client]
... for getcontractstate RPC client method.
2020-11-03 17:58:24 +03:00
Evgenii Stratonikov
40a24bad64 cli: add tests for wallet import-deployed
Fix bugs with import, allow to sign tx with contract.
2020-09-18 12:07:02 +03:00
Evgenii Stratonikov
583ef546f9 cli: add tests for wallet claim
Fix a NEO contract hash used in tx.
2020-09-18 12:07:02 +03:00
Evgenii Stratonikov
5d7f177811 cli: add tests for wallet/account creation 2020-09-18 12:07:02 +03:00
Evgenii Stratonikov
0dda247719 cli: move input handling to a separate package 2020-09-18 12:05:31 +03:00
Evgenii Stratonikov
911be78cc7 cli: use Writer from app instead of Stdout
It is useful in tests.
2020-09-18 12:05:31 +03:00
Evgenii Stratonikov
cdfb2429f2 cli: allow to create accounts for deployed contracts 2020-08-27 11:32:55 +03:00
Evgenii Stratonikov
78eade24a3 cli/wallet: decrypt account immediately 2020-08-12 16:54:59 +03:00
Evgenii Stratonikov
88e926fbc3 cli: move wallet vote to validator vote 2020-08-12 16:54:58 +03:00
Roman Khimov
c3c88a57cd
Merge pull request #1281 from nspcc-dev/drop-go-1.12-and-fix-some-things
Drop go 1.12 and fix some things
2020-08-07 13:34:54 +03:00
Roman Khimov
0e2784cd2c always wrap errors when creating new ones with fmt.Errorf()
It doesn't really change anything in most of the cases, but it's a useful
habit anyway.

Fix #350.
2020-08-07 12:21:52 +03:00
Evgenii Stratonikov
05c24d9401 cli: support voting
Closes #1206.
2020-08-06 20:39:13 +03:00
alexvanin
642a221e39 cli: update wallet path argument name in cli context
In #1104 wallet path argument has changed from `--path` to `--wallet`
but cli application still getting wallet path with `ctx.String("path")`
instead of `ctx.String("wallet")`.
2020-06-25 18:46:24 +03:00
Evgenii Stratonikov
65cb6dd0ad cli: change name for wallet path flag
`-p` is used for `--privnet`, `-w` is for wallet.
Fix CLI error:
balance flag redefined: p
panic: balance flag redefined: p
2020-06-25 17:21:18 +03:00
Roman Khimov
16ce63e653 cli: unify RPC endpoint flags under options package
This makes rpc flags consistent across all commands, previously some commands
used 'endpoint, e' and some 'rpc, r', some had ability to change timeout and
some hadn't. Now 'rpc-endpoint, r' is used everywhere along with 'timeout, t'.
2020-06-18 12:10:59 +03:00
Evgenii Stratonikov
b3b1137030 cli: allow to convert wallet from NEO2 to NEO3 format
This command may be helpful to have during transition.
2020-06-17 15:49:34 +03:00
Roman Khimov
0a09a20900 transaction: drop Register transaction type
And everything associated like SystemFee configuration.
2020-06-05 19:20:16 +03:00
Roman Khimov
e358c70ecc cli/wallet: drop classic transfer support
We do have 'nep5 transfer' and that's enough for now.
2020-06-05 19:20:16 +03:00
Roman Khimov
d496cc9687 cli/wallet: switch claim command to claim NEP5 GAS 2020-06-05 19:20:16 +03:00