Commit graph

714 commits

Author SHA1 Message Date
Anna Shaleva
6d59689d9c core: rename Neo.Crypto.CheckMultisig interop 2021-05-11 18:38:14 +03:00
Anna Shaleva
366e79b9b8 core: rename Neo.Crypto.CheckSig interop 2021-05-11 18:37:55 +03:00
Evgeniy Stratonikov
23a4e25436 interop: remove System.Iterator.Create, fix #1935
There are now only storage iterators. Related #1933.
2021-05-11 12:13:30 +03:00
Anna Shaleva
d0c64347ab *: add data to NEP11 Transfer 2021-05-05 19:44:29 +03:00
Evgeniy Stratonikov
bb039ef035 manifest: add features field 2021-05-04 13:10:46 +03:00
Anna Shaleva
e27c894338 rpc: add NEP11 commands which return iterator
These are Tokens (optional), TokensOf and OwnerOf (divisible).
2021-04-30 16:23:06 +03:00
Anna Shaleva
9eeebf481c rpc: allow to marshal Iterators for invoke* results 2021-04-30 16:23:06 +03:00
Anna Shaleva
35ba3d97e6 rpc: export createNEP11TransferTx
It'll be used from cli package.
2021-04-30 16:23:06 +03:00
Anna Shaleva
c3264c065d rpc: check token standard in nepTokenInfo 2021-04-30 16:23:04 +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
bc3a3d103e rpc: fix (*Client)TransferNEP11D
Four args should be specified: from, to, amount and tokenID.
2021-04-30 11:38:11 +03:00
Anna Shaleva
2fb083bd37 rpc: add NEP11TokenInfo method 2021-04-30 11:38:11 +03:00
Roman Khimov
438eb0c43a rpc: rename magic to network in JSON
Follow neo-modules/neo-core changes. We don't rename structure fields though
to stay compatible with current code (and we do have netmode.Magic to justify
that also).
2021-04-28 23:41:31 +03:00
Evgeniy Stratonikov
da360be5b1 rpc/request: allow to provide bool parameters, fix #1919 2021-04-28 16:44:19 +03:00
Anna Shaleva
127d0ad2ba rpc: allow to provide cosigners for NEP11-transfer-related commands 2021-04-23 10:45:11 +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
1d6ba389c9 rpc: split SignAndPushInvocationTx in two parts
There are several places where constructed transaction need to be
signed and sent. Thus, we definitely need a separate method for signing
and sending constructed transaction to avoid code duplication.
2021-04-23 10:27:47 +03:00
Anna Shaleva
48ae1cc486 rpc: refactor SignAndPushInvocationTx
We have a set of accounts provided via `cosigners` argument, so we
should fill all transaction witnesses in (not only sender's witness).
If we can't properly construct witnesses for all of the signers then an
error should be returned.
2021-04-21 18:52:32 +03:00
Roman Khimov
881ed3065e
Merge pull request #1909 from nspcc-dev/cli/default-cosigner-scope
cli, rpc: use CalledByEntry as a default cosigner's scope
2021-04-19 14:43:31 +03:00
Anna Shaleva
8f4257639e rpc: use CalledByEntry as default cosigner's scope 2021-04-19 12:06:13 +03:00
Anna Shaleva
ae36523a61 rpc, internal: fix CodeQL int conversions warnings
```
Incorrect conversion of an integer with architecture-dependent bit
size from to a lower bit size type int32 without an upper bound
check.
```
2021-04-19 11:30:28 +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
Roman Khimov
13619a0e77 rpc/server: improve submitblock and submitnotaryrequest also 2021-04-10 22:47:24 +03:00
Roman Khimov
274f2c0408 rpc/server: be more specific in some sendrawtransaction error cases
Refs. #1894.
2021-04-10 00:31:42 +03:00
Roman Khimov
973ed8c1f6 rpc/server: fix ineffassign warning 2021-04-08 15:52:57 +03:00
Roman Khimov
d3ea720afb result: gofmt -s 2021-04-08 15:49:14 +03:00
Anna Shaleva
7f038bd465 mpt: split HashNode in two types
First type is non-empty HashNode, and the second one is an Empty node.
2021-04-01 10:19:57 +03:00
Anna Shaleva
b9927c39ee mpt: refactor nodes serialisation
It should be serialised with type in case if it's a children node.
The type can be either HashT or EmptyT.
2021-04-01 10:19:57 +03:00
Anna Shaleva
1ba7338b07 rpc: fix mpt-related responses serialisation
MPT structures should be serialized in base64.
2021-04-01 10:17:03 +03:00
Roman Khimov
5b4f6d255f
Merge pull request #1857 from nspcc-dev/rpc/nep11
rpc: add NEP11 and NNS interfaces to RPC Client
2021-03-27 18:27:29 +03:00
Anna Shaleva
ffc2ad3cc3 rpc: check RPC client is initialised where appropriate
We don't need magic to create tx anymore, but we need it to sign tx.
2021-03-26 20:51:17 +03:00
Anna Shaleva
626ec8a82b rpc: add resolve and isAvailable NNS API to RPC client 2021-03-26 20:48:07 +03:00
Anna Shaleva
f955589370 rpc: add NEP11 API support to the RPC client 2021-03-26 20:48:01 +03:00
Anna Shaleva
ad9ede455e rpc: add NNS-connected transactions to the test chain
It is needed for RPC client integration tests.
2021-03-26 20:44:32 +03:00
Anna Shaleva
347f7ed576 rpc: move all top*FromStack client functions to a separate file
Some of them are shared between multiple RPC client APIs, so let's keep
them in a separate place for better maintainability.
2021-03-26 20:44:32 +03:00
Anna Shaleva
30e7d9a8b0 rpc: remove duplicated code from CreateNEP17MultiTransferTx 2021-03-26 20:44:32 +03:00
Anna Shaleva
bcc5c055de rpc: allow to calculatenetworkfee for verify with args
We can load invocation script for those contract-based witnesses which
requires arguments for `verify` methods.
2021-03-26 19:16:00 +03:00
Anna Shaleva
252e03bc34 rpc: add CalculateNetworkFee RPC method 2021-03-26 19:14:46 +03:00
Anna Shaleva
d2a81daf57 rpc: refactor TestCalculateNetworkFee
We need to ensure that we don't add extra network fee during
calculation.
2021-03-26 19:12:43 +03:00
Roman Khimov
6989769f2c rpc/server: fix getversion reply for staterootinheader extension
Proper network should have it set to `true` and client should know about it.
2021-03-26 18:38:46 +03:00
Roman Khimov
c789431402 payload: drop Network from P2PNotaryRequest
It's not needed now.
2021-03-26 13:45:18 +03:00
Roman Khimov
8c110a6147 state: drop Network from MPTRoot structure
It's only needed to verify/sign.
2021-03-26 13:45:18 +03:00
Roman Khimov
95c279325a block: drop Network from the Header
It's not network-tied any more, network is only needed to
sign/verify. Unfortunately we still have to keep network in consensus data
structures because of dbft library interface.
2021-03-26 13:45:18 +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
0248e2c0d2 state: add network to MPTRoot, change hashing
Fix RC1 incompatibility.
2021-03-25 22:37:30 +03:00
Anna Shaleva
10fb86c0b2 rpc: add (*Client).GetDesignatedByRole method 2021-03-23 13:56:39 +03:00
Anna Shaleva
1e649bc9a0 core: move NotaryVerificationPrice to a separate package
It is needed to avoid `native` dependency in RPC client.
2021-03-23 13:56:39 +03:00
Roman Khimov
28da00f057
Merge pull request #1852 from nspcc-dev/tests/fix-rubles-contract
rpc: refactor Rubl test contract
2021-03-22 15:55:51 +03:00
Anna Shaleva
0a5072a1da core: allow to compile test contracts with yaml config
And refactored Rubl test contract (it should support NEP-17 and
onNEP17Payment).
2021-03-22 15:32:26 +03:00
Anna Shaleva
ee76db9ff2 rpc: refactor (*Client).AddNetworkFee errors handling
core.ErrVerificationFailed is not very informative. Also removing it
from RPC client allows to get rid of `core` dependency in the `client`
package, which is needed for the next commit.
2021-03-22 13:28:22 +03:00