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
Evgenii Stratonikov
9cba25616d
rpc: use raw stack items in invoke*
RPC
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2020-07-31 16:07:16 +03:00
Evgenii Stratonikov
805f746f15
rpc: change NotificationEvent format
...
Name is now a separate field.
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2020-07-31 16:07:16 +03:00
Evgenii Stratonikov
b53f0257f5
stackitem: change ByteArray type to ByteString
...
Adjust only string representation.
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2020-07-31 16:07:16 +03:00
Anna Shaleva
4bf88ba6b0
core: decouple native contracts from interop service
...
Closes #1191 .
2020-07-29 10:33:18 +03:00
fyrchik
0d558ef95e
Merge pull request #1230 from nspcc-dev/feature/multitransfer
...
Generate multitransfer NEP5 transactions on client
2020-07-29 09:50:49 +03:00
Evgenii Stratonikov
e52c39ae7e
manifest: remove EntryPoint from manifest
2020-07-27 11:08:01 +03:00
Evgenii Stratonikov
e013477bc9
rpc,cli: support multitransfer transactions
...
Allow to transfer single asset to multiple recepients
in a single transaction. It is currently a separate command in CLI
and can be merged in future.
2020-07-24 17:01:30 +03:00
Anna Shaleva
889a5d7eb6
rpc: adjust submitblock
RPC-call
...
It should return block hash instead of boolean.
2020-07-22 08:37:53 +03:00
Anna Shaleva
c2534b1a0b
rpc: adjust sendrawtransaction
RPC-call
...
It should return tx has instead of boolean.
2020-07-22 08:37:46 +03:00
Anna Shaleva
2ab23dc56a
rpc: adjust getunclaimedgas
RPC-call
...
Part of #1130
2020-07-15 14:45:51 +03:00
Anna Shaleva
3a3cd0353d
rpc: adjust invokefunction
RPC-call JSON fields names
...
Part of #1130
2020-07-15 14:44:22 +03:00
Anna Shaleva
48ccdb09d4
rpc: adjust getversion
RPC-call JSON fields names
...
Part of #1130
2020-07-15 14:44:22 +03:00
Anna Shaleva
538616e9f8
rpc: adjust getrawtransaction
RPC-call JSON fields names
...
Part of #1130
2020-07-15 14:44:13 +03:00
Anna Shaleva
72a6740717
rpc: adjust getcontractstate
RPC-call JSON fields names
...
Part of #1130
2020-07-09 17:34:53 +03:00
Anna Shaleva
15f7b78a8c
rpc: adjust getnep5transfers
RPC-call JSON fields names
...
Part of #1130
2020-07-09 17:34:53 +03:00
Anna Shaleva
dc273736be
rpc: adjust getnep5balances
RPC-call JSON fields names
...
Part of #1130
2020-07-09 17:34:53 +03:00
Anna Shaleva
e81ccb7deb
rpc: adjust getblock
RPC-call JSON fields names
...
Part of #1130
2020-07-09 17:34:53 +03:00
Anna Shaleva
51576f236d
rpc: adjust getapplicationlog
RPC-call JSON fields names
...
Part of #1130
2020-07-09 17:34:53 +03:00
Anna Shaleva
7b90ad9337
rpc: fix cosigner scope in CreateNEP5TransferTx
...
It should be the same as transaction's cosigner scope.
2020-07-06 11:03:21 +03:00
Anna Shaleva
966ad8a0b1
rpc: fix adding extra network fee to tx
2020-07-06 11:02:57 +03:00
Anna Shaleva
1880e96844
cli: fix contract deploy&invoke
...
We should add cosigners to deplyment and invocation transactions.
2020-07-06 10:01:14 +03:00
Evgenii Stratonikov
27b3054df4
transaction: set feePerByte on tx construction
2020-07-03 17:52:13 +03:00
Roman Khimov
4f8e4628dc
cli/rpc: hide parameter encoding details for Invoke* calls
...
The script is passed as a hex string, but no one should care. The hash is a
hex-encoded LE value, but no one should care either. Hex might change to
base64, LE to BE, no one outside these functions should care about that.
2020-07-02 16:41:34 +03:00
Roman Khimov
17ea6411a2
rpc/client: ensure compatibility with preview2 C# node for invoke*
...
It won't work with proper cosigners and the client must be compatible both
with neo-go and C# node. See neo/neo-modules#260 also.
2020-07-02 16:40:32 +03:00
Roman Khimov
cc95d559cc
rpc/client: unify invoke* functions
2020-07-02 16:40:32 +03:00
Anna Shaleva
73b630db9b
*: switch from fixed8 to int64
...
Follow C# implementation, we have to marshall JSON Fixed8 fields without
taking into account decimals.
2020-06-29 21:39:27 +03:00
Evgenii Stratonikov
35f952e44f
rpc/server: simplify errors handling during parameter parsing
...
Forward-ported from 2.x with some updates.
2020-06-27 12:11:21 +03:00
alexvanin
cfa0c6e0ad
cli: update hardcoded script hashes for neo and gas contracts
...
Use LittleEndian as preferred way to encode script-hashes
2020-06-26 16:22:02 +03:00
Evgenii Stratonikov
f66199c99f
cli: hardcode NEO and GAS token info
...
Don't make extra network queries for already known contracts.
2020-06-25 17:21:26 +03:00
Evgenii Stratonikov
3e3781168d
rpc/client: do not query contract for account if it is in the wallet
2020-06-25 17:21:26 +03:00
Roman Khimov
5251607fb7
transaction: s/txid/hash/ for JSON to match C# implementation
...
It uses `hash` for transactions now, but `txid` for application logs.
2020-06-24 10:43:58 +03:00
Roman Khimov
0fdeafb8f7
Merge pull request #1058 from nspcc-dev/neo3/smartcontract/policy
...
core: add native policy contract
2020-06-24 09:37:29 +03:00
Anna Shaleva
b88863948d
rpc: add native policy API to RPC client
...
part of #904
2020-06-24 07:58:09 +03:00
Anna Shaleva
65c1ce4f6a
rpc: add GetStorageByID RPC client method
...
Should be a part of #1077
2020-06-23 17:31:22 +03:00
Evgenii Stratonikov
3787a8895e
rpc: marshal GasConsumed getapplicationlog
as string
...
Also there is no more decimal point.
2020-06-19 11:38:56 +03:00
Evgenii Stratonikov
c0e482fe6c
rpc: restructure getapplicationlog
response
...
Move VM-related fields to top-level.
2020-06-19 11:38:56 +03:00
Roman Khimov
b483c38593
block/transaction: add network magic into the hash
...
We make it explicit in the appropriate Block/Transaction structures, not via a
singleton as C# node does. I think this approach has a bit more potential and
allows better packages reuse for different purposes.
2020-06-18 12:39:50 +03:00
Roman Khimov
8fda6a3407
block: fix ConsensusData hashing
...
It's DoubleSha256 as with the rest of the structures.
2020-06-18 12:22:49 +03:00
Roman Khimov
5fe8287fbb
rpc: use non-pointer Block and Transaction in results
...
Pointers can be nil and in some cases it's important to always have access to
Block or Transaction fields.
2020-06-18 12:13:35 +03:00
Roman Khimov
d22286cbbc
client/cli: add network option to the RPC client
...
It doesn't affect anything yet, but it's going to be used in the future for
network-specific behavior. It also renames short '--timeout' form to '-s'
avoiding conlict with '-t' used for '--testnet'.
2020-06-18 12:11:13 +03:00
Evgenii Stratonikov
7b4ca57e33
*: change address to the new format
...
NEO3 uses new prefix for address (53 = 0x35), thus string representations as
well as encrypted WIFs should be changed.
2020-06-17 15:58:21 +03:00
Anna Shaleva
3568ab3d6d
core: add json marshaller for Cosigner's scopes
...
Following C# implementation, we should marshal Scopes as a set of
strings instead of single byte.
2020-06-15 13:48:15 +03:00
Roman Khimov
fe31c7ed2d
Merge pull request #1047 from nspcc-dev/neo3/rpc/invoke
...
rpc: update invoke* RPC-calls
2020-06-11 21:39:20 +03:00
Anna Shaleva
9e7fca013e
rpc: update CLI and RPC client invoke* calls
...
part of #1036
2020-06-11 20:32:05 +03:00
Evgenii Stratonikov
df958caf93
core: add Manifest to state.Contract
2020-06-11 10:45:24 +03:00
Anna Shaleva
0af5b9339d
rpc, cli: remove invoke
RPC-call
...
part of #1036
2020-06-10 20:30:55 +03:00
Anna Shaleva
3418e4f7f4
rpc: update getversion
RPC-call
...
closes #1035
2020-06-10 10:47:11 +03:00
Roman Khimov
795523f5cd
Merge pull request #1013 from nspcc-dev/neo3/vm/stackitem_refactoring
...
vm: move StackItem to a separate package
2020-06-08 15:30:44 +03:00
Anna Shaleva
7ca2807875
vm/encoding: move bigint from vm to encoding package
2020-06-08 13:27:13 +03:00