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
Evgeniy Stratonikov
cbda20aca3
core: fix native method call flags
...
Replace `WriteStates` with `States`.
Follow neo-project/neo#2339.
Close #1775 .
Related #1725 .
2021-02-25 18:07:33 +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
Roman Khimov
476cbbebdc
native: make registering as a candidate cost more
...
Follow neo-project/neo#2252 .
2021-01-21 23:02:59 +03:00
Evgenii Stratonikov
1c0c331e25
core: update System.Contract.Call
syscall
...
1. Remove `System.Contract.CallEx`.
2. Extend number of parameters.
3. Add return value count to `VM.Context`.
2021-01-14 18:23:36 +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
Evgenii Stratonikov
d4723d8e81
cli: use default adress in transfer
2021-01-12 11:14:40 +03:00
Evgenii Stratonikov
d737915843
cli: output nep17 balance using decimals
...
Also fix balance tests to match full line, not just prefix.
2021-01-11 15:02:24 +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
Roman Khimov
e3dfb5d165
cli/wallet: swap name/address checks for token identification
...
Address identification must have a priority, another token can have this
address in its name, but when there is a hash specified we should take the one
with proper hash.
2020-12-14 15:24:15 +03:00
Roman Khimov
8e2df8902c
cli/wallet: don't mangle token symbol in output
...
It's important to show it as is because it identifies token.
2020-12-14 15:24:15 +03:00
Evgenii Stratonikov
56b23b718d
fixedn: allow to parse big decimals
2020-12-09 11:19:25 +03:00
Evgenii Stratonikov
e4c3339c91
util: move Fixed8
to encoding/fixedn package
2020-12-09 11:18:18 +03:00
Evgenii Stratonikov
cd5219086a
wallet: export NewAccountFromPrivateKey()
...
Don't perform back-and-forth conversion, don't handle error
which never occur.
2020-12-04 12:45:53 +03:00
Evgenii Stratonikov
239a8c3de7
cli: fix wallet convert
and add tests
...
Close #1589 .
2020-12-04 12:45:53 +03:00
Evgenii Stratonikov
8be9158e2f
cli: remove explicit client.Init()
calls
...
This is done inside `GetRPCClient()`.
2020-12-03 17:57:18 +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
860d2ca7a7
cli: prettify transfer
error
...
Let the user know what's wrong when cannot find suitable token.
2020-11-13 12:43:56 +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
897c9198f8
cli: allow to send multisig deploy/invoke tx
...
It allows to invoke native contracts as committee
from CLI in privnet, e.g. to set new oracle nodes.
Also don't require `out` flag in `multisig sign`
if tx is to be pushed.
2020-10-07 11:48:06 +03:00
Evgenii Stratonikov
d50a14359a
cli/wallet: save tx only if --out
was provided
...
Also don't print tx hash twice.
2020-10-07 10:04:19 +03:00
Evgenii Stratonikov
b2a3a0851e
emit: accept multiple opcodes in Opcode()
2020-10-06 18:03:25 +03:00
Roman Khimov
eff5f10579
cli: use '--address' instead of '--addr' and allow '-a' everywhere
2020-09-29 12:48:22 +03:00
Roman Khimov
fdcc72dad0
cli/wallet: make 'addr' optional for NEP5 balances query
...
Iterate over all accounts by default.
2020-09-28 18:15:51 +03:00
Roman Khimov
aba9c9c0a8
cli/wallet: print token symbol and name in balance output
...
Make it a bit more user-friendly.
2020-09-28 16:47:47 +03:00
Roman Khimov
c6a9e652b4
cli/wallet: improve token parameter help
2020-09-28 11:28:00 +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
dff2ac1387
cli: add test for candidate register/unregister/vote
...
Also fix a bug with tx signing.
2020-09-18 12:07:02 +03:00
Evgenii Stratonikov
6e5a637da9
cli: add tests for multisig sign
...
This test is also a good example of how to
create and sign multisig transaction from scratch.
2020-09-18 12:07:02 +03:00
Evgenii Stratonikov
9817da7c4e
cli: add tests for nep5 import/remove
...
Also unify `remove` and `import` arguments.
2020-09-18 12:07:02 +03:00
Evgenii Stratonikov
075f353062
cli: add tests for nep5 multitransfer
...
Also fix a bug when token's hash was incorrectly processed.
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
6bdaefcfa4
rpc/client: use CreateTxFromScript
where possible
...
There is substantial overlap between `CreateTxFromScript` and
`SignAndPushInvocationTx`. This commit refactors both of them
to reuse common code.
2020-08-18 11:24:48 +03:00
Roman Khimov
e7d13e6db2
*: fix misspellings found in Go Report Card
2020-08-14 12:16:24 +03:00
Evgenii Stratonikov
78eade24a3
cli/wallet: decrypt account immediately
2020-08-12 16:54:59 +03:00
Evgenii Stratonikov
832ec5eaa0
cli: implement candidate (un)register
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