Evgeniy Stratonikov
5eaa34c75f
cli/smartcontract: do not print dot on a separate line
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-07-04 11:06:06 +03:00
Evgeniy Stratonikov
0dc606f50e
cli/smartcontract: print proper error message on failed testinvoke
...
Do not print info about `--force` flag if we don't send or save a transaction.
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-06-29 15:12:35 +03:00
Evgeniy Stratonikov
ec21c14ca9
gomod: upgrade yaml package from v2 to v3
...
Close #2085 .
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-05-30 15:26:17 +03:00
Erik van den Brink
c2f9986714
cli: update generate-wrapper usage text
2022-03-22 15:33:54 +01:00
Anna Shaleva
2096ad6e81
*: remove io/ioutil uses
...
Close #1764 .
2022-03-17 19:39:18 +03:00
Evgeniy Stratonikov
a2cef15932
compiler: emit bindings configuration
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-02-28 15:36:14 +03:00
Evgeniy Stratonikov
42c1e8b0e3
cli/smartcontract: allow to use 0x-prefixed hashes in generate
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-02-25 10:28:14 +03:00
Roman Khimov
870fd024c9
Merge pull request #2367 from nspcc-dev/rpc/thread-safe
...
rpc: take care of RPC clients
2022-02-24 20:11:15 +03:00
Evgeniy Stratonikov
da03d895de
cli/smartcontract: generate bindings to an existing contract
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-02-23 15:40:06 +03:00
AnnaShaleva
0092330fe1
rpc: carefully review places where Client.cache.initDone is used
...
1. Keep initDone check only for the places where cache is directly accessed.
We don't need to check it in other places, otherwise we have a mess of
duplicating checks.
2. Fix bug in code related to block deserialisation. There's no magic, so
checking that initialisation is done is not enough for proper block
deserialisation. We need to manually fill StateRootEnabled field.
3. Since transaction doesn't need network magic to compute its hash, we don't
need to perform Client initialisation before transaction-related requests.
4. Check that cache is initialised before accessing network magic.
5. Refactor the way Policy contract hash is fetched for Client requests.
We don't really need Client initialisation for that, it's OK to fetch Policy
hash on-the-fly.
2022-02-22 12:52:14 +03:00
Anna Shaleva
590f86aa2c
cli: add tests for smartcontract-related commands
...
Fixes:
* Improve error handling.
2022-02-02 11:28:29 +03:00
Anna Shaleva
b88f2b389f
cli: check execution state while saving invoked tx
2022-02-02 11:28:29 +03:00
Evgeniy Stratonikov
945b56e350
cli/smartcontract: set correct version for pkg/interop
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-01-20 13:52:58 +03:00
Evgeniy Stratonikov
25583f9aeb
compiler: make pkg/interop a separate module
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-01-20 13:21:26 +03:00
Evgeniy Stratonikov
9871dc8f5a
compiler: update x/tools package
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-01-20 13:21:26 +03:00
AnnaShaleva
aefb6f9fee
*: fix tests failing due to path.Join usage
...
Solution:
Use `file/filepath` package to construct expected path. This package is OS-aware, see https://github.com/golang/go/issues/30616 .
2021-11-29 11:11:09 +03:00
Roman Khimov
49149afecf
Merge pull request #2244 from nspcc-dev/dont-panic-on-stdin-ioctl-issues
...
Dont panic on stdin ioctl issues
2021-11-04 20:36:54 +03:00
Roman Khimov
7679a17bc6
cli: provide better error message in case of password read failure
2021-11-03 19:36:11 +03:00
Evgeniy Stratonikov
7758378d28
compiler: allow to overload methods in manifest
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-10-29 20:15:21 +03:00
Evgeniy Stratonikov
0db5dd5fd7
cli/smartcontract: allow to deploy contracts with scope
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-10-13 15:55:42 +03:00
Roman Khimov
42a9d3d7b8
nef: add Source field
...
Follow neo-project/neo#2605 .
2021-09-24 00:19:37 +03:00
Evgeniy Stratonikov
2a78ec8003
cli/wallet: show tx fee before relaying
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-09-21 11:31:56 +03:00
Roman Khimov
6d074a96e9
*: make tests use TempDir(), fix #1319
...
Simplify things, drop TempFile at the same time (refs. #1764 )
2021-08-26 17:29:40 +03:00
Evgeniy Stratonikov
adcae12331
cli/smartcontract: reuse read functions in contractDeploy
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-08-06 12:05:36 +03:00
Evgeniy Stratonikov
868198a36e
cli/smartcontract: add manifest add-group
command
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-08-06 12:05:32 +03:00
Evgeniy Stratonikov
6fe2ace43b
cli/smartcontract: refactor contract deploy a bit
...
Provide cosigners explicitly during deploy and don't read wallet twice.
This is needed because manifest validation requires valid sender address.
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-08-06 12:05:32 +03:00
Roman Khimov
2a57e48897
cli/sc: add sysgas option to add some gas
...
Sometimes on-chain invocations need a bit more GAS than expected after test
invocations, so let the user compensate for that. 2.x has similar option since
483fefbb62
.
2021-07-02 11:57:47 +03:00
Evgeniy Stratonikov
4249674ddc
compiler: check for contract permissions
...
On many occassions we can determine at compile-time if contract config lacks
some properties it needs. This includes all native contract invocations
through stdlib, as both hashes and methods are known at compile-time
there.
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-06-28 11:49:29 +03:00
Anna Shaleva
50296975e2
crypto: allow to provide non-default scrypt parameters
2021-06-11 15:22:28 +03:00
Evgeniy Stratonikov
4467e2cbfd
cli,compiler: allow to specify manifest permissions
2021-06-04 11:16:22 +03:00
Evgeniy Stratonikov
e3e0e2a8a8
cli: allow to specify CustomContracts/Groups signer
...
The syntax is `CalledByEntry,CustomContracts:hash1:hash2`.
2021-05-28 15:46:33 +03:00
Roman Khimov
9d2712573f
*: enable godot linter and fix all its warnings
...
It's important for NeoGo to have clean documentation. No functional changes.
2021-05-12 23:17:03 +03:00
Roman Khimov
e9cefc4bfc
*: fix all errcheck warnings in testing code
2021-05-12 21:45:12 +03:00
Anna Shaleva
e48eb10522
cli: unify 'contract deploy' and 'contract invoke*' commands
...
These commands share a lot of code.
2021-04-23 12:40:13 +03:00
Anna Shaleva
16fa191ccb
cli: move combining signers and accounts to a separate package
...
This code will be reused in other packages.
2021-04-23 10:27:43 +03:00
Anna Shaleva
94316fa36d
cli: move GetDataFromContext and ParseParams to a helpers
package
2021-04-23 10:26:09 +03:00
Anna Shaleva
d12ae0998f
cli: return numWordsRead from GetDataFromContext
...
It's needed when we have extra args after the 'data' argument. Then
these args are started right from numWordsRead offset.
2021-04-23 10:23:06 +03:00
Anna Shaleva
2ab420ed18
cli: move cosigners parsing to a separate function
...
We have a lot of common code which is shared between `smartcontract` and
`wallet` cli packages. It's convinient to keep it in a separate helper
package in order to avoid functional cli packages dependencies.
2021-04-23 10:11:01 +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
df24c51262
cli: use AddressFlag for calc-hash
2021-04-16 12:41:28 +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
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
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