Commit graph

439 commits

Author SHA1 Message Date
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
Evgeniy Stratonikov
55009153a9 vm/emit: emit Boolean values correctly
We should convert both `true` and `false` values.
2021-03-09 13:34:22 +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
Roman Khimov
c9212f29e6
Merge pull request #1744 from nspcc-dev/fix/nativecall
Update `CallNative` to post-preview5
2021-03-02 15:28:00 +03:00
Anna Shaleva
2c81fc8b8e *: upgrade tests to use T.Cleanup() 2021-03-01 17:08:00 +03:00
Evgeniy Stratonikov
f9f1fe03b2 core: refactor native call
1. `System.Contract.CallNative` expects version on stack.
2. Actual method is determined based on current
   instruction pointer.
3. Native hashes don't longer depend on NEF checksum.
2021-02-26 10:59:09 +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
Roman Khimov
c58dc7e453
Merge pull request #1758 from nspcc-dev/cli/0x
cli: support Uint160 hashes with 0x prefix
2021-02-19 16:23:56 +03:00
Anna Shaleva
488e75a246 cli: add filebytes parameter type 2021-02-19 10:52:45 +03:00
Evgeniy Stratonikov
b8024dbfa8 cli: support Uint160 hashes with 0x prefix 2021-02-18 14:38:50 +03:00
Evgeniy Stratonikov
3f7bea4e99 cli/flags: allow to use hashes in address flag 2021-02-18 12:50:20 +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
Roman Khimov
dc3967ae7b manifest: add manifest validity checks
Refs. #1699.
2021-02-09 22:31:26 +03:00
Roman Khimov
7bef87e2ef cli: use base64 for state dump
See neo-project/neo-modules/#499.
2021-02-07 22:07:30 +03:00
Roman Khimov
a442e1530d native: rename onPayment into onNEP17Payment
Follow neo-project/neo#2287.
2021-02-05 16:09:51 +03:00
Roman Khimov
ac527650eb native: add Ledger contract, fix #1696
But don't change the way we process/store transactions and blocks. Effectively
it's just an interface for smart contracts that replaces old syscalls.

Transaction definition is moved temporarily to runtime package and Block
definition is removed (till we solve #1691 properly).
2021-02-04 13:12:11 +03:00
Evgeniy Stratonikov
c1cc7e6f9d native: add additional parameters to deploy
1. Management contract has 2 overloads of `deploy` method.
2. Normal contracts should have `_deploy` with 2 parameters.
2021-01-29 12:19:08 +03:00
Roman Khimov
9a99054e6b
Merge pull request #1427 from nspcc-dev/oracle/module
network: implement Oracle module
2021-01-28 15:24:36 +03:00
Roman Khimov
02d1411c0e
Merge pull request #1690 from nspcc-dev/usability-improvements
Compiler/CLI usability improvements
2021-01-28 14:44:53 +03:00
Evgenii Stratonikov
43e4d3af88 oracle: integrate module in core and RPC
1. Initialization is performed via `Blockchain` methods.
2. Native Oracle contract updates list of oracle nodes
  and in-fly requests in `PostPersist`.
3. RPC uses Oracle module directly.
2021-01-28 13:00:58 +03:00
Roman Khimov
79e11c93a1 cli: allow to specify cosigners with Neo addresses
Make it a bit more usable.
2021-01-27 22:32:29 +03:00
Roman Khimov
48e3a41133 cli: remove outdated contract deploy comment
It's relevant for Neo 2.0, but not 3.0.
2021-01-27 21:45:44 +03:00
Roman Khimov
fac2a0d7e3 cli: provide -m flag for manifest when deploying a contract
It's a bit easier to use. Previously we couldn't have it because it was used
for '--mainnet', but we no longer specify the network, so it can be used for
'--manifest'.
2021-01-27 21:39:14 +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
054ca27e9c state: use checksums and names to calculate contract hashes
It allows to deploy the same NEF using one sender and get different contract
hashes. See neo-project/neo#2240.
2021-01-22 12:22:48 +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
Evgeniy Stratonikov
0bbdee2ce1 nef: add Reserved bytes 2021-01-19 11:19:28 +03:00
Evgeniy Stratonikov
52843fc1bf nef: add Tokens field 2021-01-19 11:19:24 +03:00
Roman Khimov
6ecc6f0422 native: call native contracts by ID instead of name
Fix #1666.
2021-01-18 00:38:23 +03:00
Roman Khimov
f39ede9869 opcode: add CALLT opcode, move ABORT/ASSERT
Refs. #1644. Hash compatibility test temporarily disabled, to be enabled when
it's up to date with current C# master.
2021-01-18 00:14:52 +03:00
Evgeniy Stratonikov
50d515a3e5 cli: add tests for Storage.Find invocations
It returns values of different types we better be sure that
compiler emits correct code.
2021-01-15 21:12:10 +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
a8bb040558 *: fix ineffassign goreportcard warnings 2020-12-28 17:31:50 +03:00
Evgenii Stratonikov
c49eb86a2e cli: allow to calculate contract hash before deployment 2020-12-17 15:44:42 +03:00
Evgenii Stratonikov
1ffa1f9ade native: fix contract hashes 2020-12-15 12:58:04 +03:00
Evgenii Stratonikov
5310c7f3ce native: fix NEP17.Transfer cost
It was increased with the introducion of `postTransfer`.
2020-12-15 12:04: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
Roman Khimov
aff1469482 native: uppercase token symbols
Follow neo-project/neo#2136.
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
Roman Khimov
1e9253f1f0 interop: rename Neo.Native.Call to System.Contract.CallNative 2020-12-14 15:24:13 +03:00
Roman Khimov
ab12eee346 native: move contract deployment to management contract
See neo-project/neo#2119.
2020-12-14 15:23:46 +03:00
Roman Khimov
ad3547783d native: drop Neo.Native.Deploy, move contract init to management contract
The contract is almost a stub at the moment, though it does deploy other
contracts.
2020-12-14 13:33:41 +03:00
Evgenii Stratonikov
2341ae0c53 compiler: specify safe methods in config 2020-12-10 18:00:43 +03:00
Evgenii Stratonikov
1fee268f95 cli/smartcontract: return error if deploy script failed to run 2020-12-10 14:41:02 +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
4cd5747ab7 cli/test: add test for wallet dump --decrypt 2020-12-04 11:05:49 +03:00
Evgenii Stratonikov
f4cbb1ae74 cli/test: clean input buffer after execution 2020-12-04 11:05:49 +03:00
Evgenii Stratonikov
66402923b9 cli/server: remove unused readBlock()
It became obsolete after 6f7284906a.
2020-12-04 11:05:49 +03:00
Evgenii Stratonikov
573d1d10c0 cli: add tests for contract command 2020-12-04 11:05:48 +03:00
Evgenii Stratonikov
bb316f4652 cli/test: trim newline char in checkNextLine 2020-12-04 11:04:02 +03:00
Evgenii Stratonikov
d71e45bcc5 cli/contract: make --force flag bool 2020-12-04 11:00:03 +03:00
Evgenii Stratonikov
8be9158e2f cli: remove explicit client.Init() calls
This is done inside `GetRPCClient()`.
2020-12-03 17:57:18 +03:00
Evgenii Stratonikov
2f39701d76 vm: provide writer in PrintOps()
Make it more flexible and testable. Fallback to using
stdout if no writer is provided.
2020-12-02 10:49:37 +03:00
Roman Khimov
9a4183abb9
Merge pull request #1583 from nspcc-dev/tests/dump
cli: add tests for `db dump/restore`
2020-12-01 19:36:24 +03:00
Evgenii Stratonikov
99bdee676a cli: add tests for db dump/restore 2020-12-01 18:38:09 +03:00
Roman Khimov
1672887123 nef: increase version field to 32 bytes
Follow recent C# changes.
2020-11-30 11:26:29 +03:00
Roman Khimov
470e1592d9 request: make CreateDeploymentScript work with NEFs
And use it in testing code.
2020-11-27 21:53:39 +03:00
Roman Khimov
e12c52f588 nef: change checksum calculation scheme
It's now being calculated for whole file, not just header.
2020-11-27 21:47:08 +03:00
Roman Khimov
0c7e727859 nef: drop scripthash
It's no longer a part of the file.
2020-11-27 21:47:08 +03:00
Roman Khimov
1cf1fe5d74 *: introduce stable contract hashes
Follow neo-project/neo#2044.
2020-11-27 21:47:08 +03:00
Evgenii Stratonikov
75a9a42403 compiler: check emitted event names
Check that all `Notify` invocations in source correspond to some event
in manifest.
Helpful for typos such as `transfer` instead of `Transfer`.
2020-11-26 13:49:58 +03:00
Evgenii Stratonikov
25f1db6de0 compiler: check supported standards
Check that emitted manifest complies with supported standards.
This can be made a separate flag.
2020-11-26 12:51:39 +03:00
Evgenii Stratonikov
6f7284906a blockchainer: allow to dump/restore chain 2020-11-24 16:43:11 +03:00
Evgenii Stratonikov
31eca342eb *: replace all NEP5 occurences to NEP17 2020-11-24 13:08:24 +03:00
Evgenii Stratonikov
b97dfae8d8 native: replace NEP-5 with NEP-17 2020-11-24 13:08:23 +03:00
Evgenii Stratonikov
c849176be7 manifest: include contract Name 2020-11-24 11:23:44 +03:00
Evgenii Stratonikov
1869d6d460 core: allow to use state root in header 2020-11-20 17:16:32 +03:00
Roman Khimov
88cee80a58
Merge pull request #1543 from nspcc-dev/compatibility-fixes
rpc, cli: tiny compatibility fixes
2020-11-16 15:53:42 +03:00
Anna Shaleva
083879838c rpc: adjust getrawtransaction and gettransactionheight RPC call
We should return verbose transaction in case if it is in the mempool
from `getrawtransaction`. We also shouldn't return height from
`gettransactionheight` in case if transaction is in the mempool.
2020-11-16 13:25:42 +03:00
Roman Khimov
286d9185f4 smartcontract: remove contract features
We're featureless now, all contracts have access to storage and payable status
is to be determined via new NEP. Follow neo-project/neo#2060.
2020-11-13 21:26:23 +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
7ca93e76ac core, rpc: allow to store several AppExecResult for a single hash
It is required for we have several executions per block.
2020-11-12 16:24:39 +03:00
Roman Khimov
a5b6598024
Merge pull request #1533 from nspcc-dev/examples/itoa
examples: add an example of binary.Itoa usage
2020-11-10 16:39:53 +03:00
Evgenii Stratonikov
54992ad4f3 core: provide account in calculate claimable
`getunclaimedgas` RPC should return all GAS available to claim.
2020-11-10 16:08:21 +03:00
Anna Shaleva
a86bd2cd08 cli: set ctl.ErrWriter
We did not have it set, however we use it in the several places which
results with the following panic:
```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x4ddf0d]

goroutine 1 [running]:
fmt.Fprintln(0x0, 0x0, 0xc0001d7c08, 0x1, 0x1, 0x10376c0, 0xc0002051c0, 0x0)
	fmt/print.go:265 +0x5d
github.com/nspcc-dev/neo-go/cli/wallet.transferNEP5(0xc0000a9080, 0x0, 0x0)
	github.com/nspcc-dev/neo-go/cli/wallet/nep5.go:445 +0x9eb
github.com/urfave/cli.HandleAction(0xc837c0, 0xf26198, 0xc0000a9080, 0xc00007f600, 0x0)
	github.com/urfave/cli@v1.20.0/app.go:490 +0xc8
github.com/urfave/cli.Command.Run(0xdc66a3, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0xdd0b0d, 0x14, 0xdf6c25, ...)
	github.com/urfave/cli@v1.20.0/command.go:210 +0x9e8
github.com/urfave/cli.(*App).RunAsSubcommand(0xc0001aa340, 0xc0000a8dc0, 0x0, 0x0)
	github.com/urfave/cli@v1.20.0/app.go:379 +0x88b
github.com/urfave/cli.Command.startApp(0xdc23e4, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0xdd546a, 0x18, 0x0, ...)
	github.com/urfave/cli@v1.20.0/command.go:298 +0x81a
github.com/urfave/cli.Command.Run(0xdc23e4, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0xdd546a, 0x18, 0x0, ...)
	github.com/urfave/cli@v1.20.0/command.go:98 +0x1219
github.com/urfave/cli.(*App).RunAsSubcommand(0xc0001aa1a0, 0xc0000a8c60, 0x0, 0x0)
	github.com/urfave/cli@v1.20.0/app.go:379 +0x88b
github.com/urfave/cli.Command.startApp(0xdc45bf, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0xde1d28, 0x24, 0x0, ...)
	github.com/urfave/cli@v1.20.0/command.go:298 +0x81a
github.com/urfave/cli.Command.Run(0xdc45bf, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0xde1d28, 0x24, 0x0, ...)
	github.com/urfave/cli@v1.20.0/command.go:98 +0x1219
github.com/urfave/cli.(*App).Run(0xc0001aa000, 0xc000030120, 0x12, 0x12, 0x0, 0x0)
	github.com/urfave/cli@v1.20.0/app.go:255 +0x741
main.main()
	command-line-arguments/main.go:18 +0x4b

```
2020-11-10 15:20:03 +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
Anna Shaleva
795823ee3b cli: fixed removed network arguments
Should be done in 590be7a58d. I removed
network flags from RPC, but we still need them for server-related
cli commands.
2020-10-21 17:41:23 +03:00
Anna Shaleva
590be7a58d rpc, cli: remove Network from RPC client and cli 2020-10-19 16:11:11 +03:00
Anna Shaleva
c50f3db6ad rpc, cli: encode script in base64 for Invoke* 2020-10-19 11:51:27 +03:00
Anna Shaleva
659fb89beb cli: warn about bad VM state during invokefunction 2020-10-13 19:14:36 +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
945e9410e4 cli: add test for testinvokefunction
Check that contract can be properly deployed
and invoked.
2020-10-06 19:12:38 +03:00
Evgenii Stratonikov
b2a3a0851e emit: accept multiple opcodes in Opcode() 2020-10-06 18:03:25 +03:00
Evgenii Stratonikov
fa09b9af7b transaction: rename FeeOnly to None
Follow missed change from neo-project/neo#1816 .
`None` may be used for any signer. Currently it is used
for sender to only pay fees, or to sign tx attributes.
2020-10-01 15:28:19 +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
fd98a9194a cli: add tests for wallet dump 2020-09-18 12:07:02 +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
59157724e3 cli: add tests for wallet remove 2020-09-18 12:07:02 +03:00
Evgenii Stratonikov
4c00b26fb8 cli: add tests for wallet import-multisig 2020-09-18 12:07:02 +03:00
Evgenii Stratonikov
0a5fe84589 cli: add tests for wallet export 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
d30c7db49a cli: add tests for NEP5 transfer 2020-09-18 12:07:02 +03:00
Evgenii Stratonikov
468f7ee650 cli: add tests for NEP5 balance querying 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
758a88a813 rpc: exit from Start after Listener is running
If port is dynamically allocated, `(*Server).Addr` will contain
0 port. This commit executes listener before exiting from `Start()`
and sets Addr to the actual address.
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
Roman Khimov
9e0c13b69d
Merge pull request #1362 from nspcc-dev/feature/verification
Allow to use account with contracts on client
2020-08-27 17:30:29 +03:00
Evgenii Stratonikov
cdfb2429f2 cli: allow to create accounts for deployed contracts 2020-08-27 11:32:55 +03:00
Anna Shaleva
e4150da9ea cli: add support for nested arrays parameters 2020-08-26 19:01:36 +03:00
Anna Shaleva
cab767dafe cli: add tests to cli packages
Closes #1336
2020-08-26 10:14:55 +03:00
Anna Shaleva
d6e7d9c281 cli: invoke configureAddresses with pointer
Otherwise configuration remains untouched outside of the method scope.
2020-08-25 16:11:54 +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
Roman Khimov
7bf0ae11db
Merge pull request #1309 from nspcc-dev/fix-yaml-import-path
*: use proper YAML library import path, fix #1306
2020-08-12 17:15:37 +03:00
Roman Khimov
1487365ca8
Merge pull request #1286 from nspcc-dev/feature/register
Support (un)registering candidate in CLI
2020-08-12 17:14:28 +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
Roman Khimov
292c186665 *: use proper YAML library import path, fix #1306 2020-08-12 16:31:06 +03:00
Anna Shaleva
478efee0bc cli: fix inspect command
There was an empty byte array while trying to restore .nef from bytes
after a34ba92d4.
2020-08-12 12:34:33 +03:00
Roman Khimov
c3f7a419a0
Merge pull request #1296 from nspcc-dev/smartcontract/examples
examples: update examples
2020-08-11 19:09:13 +03:00
Anna Shaleva
b5494320f9 compiler, cli: support events from .yml config file
We currently can't process events in codegen, so we have to provide
them via .yml config file. Do not delete the rest of the code connected
with conversion of MethodDebugInfo.Event into manifest.Event as we have
issue #1038.
2020-08-11 13:42:06 +03:00
Anna Shaleva
52275bcd9c cli: update default smart-contract template 2020-08-11 13:42:06 +03:00
Evgenii Stratonikov
a34ba92d46 compiler: allow to split main package across multiple files 2020-08-11 11:12:55 +03:00
Evgenii Stratonikov
057e1c6e3c compiler: provide filename to Compile() 2020-08-11 11:10:45 +03:00
Roman Khimov
98888def16 cli/server: drop key mangler from dumper
It's no longer needed (yay!)
2020-08-10 16:58:38 +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
Roman Khimov
5ef08f60ae remove github.com/pkg/errors from dependencies
It's not needed any more with Go 1.13 as we have wrapping/unwrapping in base
packages. All errors.Wrap calls are replaced with fmt.Errorf, some strings are
improved along the way.
2020-08-07 12:21:52 +03:00
Evgenii Stratonikov
05c24d9401 cli: support voting
Closes #1206.
2020-08-06 20:39:13 +03:00
Roman Khimov
b0f0dc5352 cli/util: fix lint error introduced by 227c6a2ca 2020-08-05 13:17:23 +03:00
Evgenii Stratonikov
227c6a2caa cli: allow to use vm parse directly 2020-08-05 09:40:50 +03:00
Roman Khimov
ef53a45e7a
Merge pull request #1264 from nspcc-dev/smartcontract/manifest/supported_standards
smartcontract: add list of supported standards to manifest
2020-08-04 22:17:00 +03:00
Roman Khimov
49688de75c
Merge pull request #1260 from nspcc-dev/feature/sendmany
cli: allow to transfer multiple tokens in `multitransfer`
2020-08-04 19:35:03 +03:00
Anna Shaleva
90825efa16 core: move transaction's sender to cosigners
Closes #1184

Ported changes from https://github.com/neo-project/neo/pull/1752
2020-08-04 17:33:50 +03:00
Anna Shaleva
66ceaa6b75 smartcontract: add list of supported standards to manifest
Closes #1204
2020-08-04 17:29:44 +03:00