Commit graph

374 commits

Author SHA1 Message Date
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
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
2a144d0420 cli: use CalledByEntry as default cosigner's scope 2021-04-19 11:52:28 +03:00
Anna Shaleva
4e66293612 cli: allow to provide 'data' for 'contract deploy' command 2021-04-19 10:52:42 +03:00
Anna Shaleva
1a8ea8e2d6 cli: specify usage text for 'contract deploy' command 2021-04-19 10:50:15 +03:00
Roman Khimov
8f14c61c34
Merge pull request #1906 from nspcc-dev/cli/transfer_param
cli: allow to pass 'data' for nep17 transfer command
2021-04-19 10:43:42 +03:00
Anna Shaleva
db868f033e cli: allow to provide data for nep17 transfer commands 2021-04-19 10:20:29 +03:00
Anna Shaleva
ced90e0510 cli: use AddressFlag for nep17 import 2021-04-16 15:18:33 +03:00
Anna Shaleva
92c6708fa0 cli: use AddressFlag for import-deployed 2021-04-16 15:15:25 +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
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
df24c51262 cli: use AddressFlag for calc-hash 2021-04-16 12:41:28 +03:00
Anna Shaleva
90b054afd0 cli: check address flag is set for validator-related commands 2021-04-16 12:41:02 +03:00
Anna Shaleva
ff2b051646 cli: use AddressFlag for nep17-related commands 2021-04-16 12:41:02 +03:00
Anna Shaleva
2dcc729c47 cli: use AddressFlag for wallet sign 2021-04-16 12:40:01 +03:00
Roman Khimov
26eff7110c cli/smartcontract: allow deploying contracts from multisig accounts
By providing `--out` flag.
2021-04-07 11:50:24 +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
Anna Shaleva
0948d53244 examples: add documentation
And provide the wallet for examples `my_wallet.json` with the owner
address inside.
2021-03-23 16:46:15 +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
e5cdecfa9f core: fix transaction hashes 2021-03-18 17:57:54 +03:00
Roman Khimov
dc980b5847 sc/context: add network magic into the context
See neo-project/neo#2393, we need this to be able to sign multisig
transactions.
2021-03-12 12:59:14 +03:00
Roman Khimov
4462a6a6b7 change block/tx/extensible signing process, fix #1741
Sign [magic, hash], see neo-project/neo#2314.
2021-03-12 11:27:50 +03:00
Anna Shaleva
9015e50847 core: refactor Neo.Crypto.CheckMultisigWithECDsaSecpr1
Rename it to Neo.Crypto.CheckMultisig and remove `message` parameter.
2021-03-10 21:46:05 +03:00
Anna Shaleva
cdaca7be3e core: use Neo.Crypto.CheckSig for standard signature verification 2021-03-10 21:45:58 +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
Roman Khimov
9b0d4e0968
Merge pull request #1792 from nspcc-dev/fix/consensusdata
Remove `ConsensusData` from `Block`
2021-03-10 14:12:38 +03:00
Evgeniy Stratonikov
2f490a3403 block: remove ConsensusData field 2021-03-10 13:38:44 +03:00
Evgeniy Stratonikov
09af8b4fcb cli: allow to dump wallet public keys 2021-03-10 12:37:15 +03:00
Evgeniy Stratonikov
1578a99432 cli/wallet: add test for multiple signers 2021-03-09 15:45:02 +03:00
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