Commit graph

396 commits

Author SHA1 Message Date
Anna Shaleva
2581146a01 smartcontract: fix wildcard trusts deserialization
If manifest trusts presented as Null stackitem, then they should be
treated as wildcard, not as restricted.

It's not the same problem as described and fixed in
https://github.com/neo-project/neo/pull/2901 and
https://github.com/neo-project/neo/pull/2892, although these
two PRs are related.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-09-25 11:53:47 +03:00
Anna Shaleva
bb2a99d451 smartcontract: disallow Null and non-utf8 String
Follow the https://github.com/neo-project/neo/pull/2810#discussion_r1295900728.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-08-18 16:41:33 +03:00
Anna Shaleva
60795a899f smartcontract: improve invalid notification error text
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-08-18 12:02:43 +03:00
Anna Shaleva
16d1d1e5eb rpcbinding: check duplicating struct fields before binding generation
RPC binding config may be malformed or the source .go contract may contain
structures like this:
```
type Str struct {
    Field int
    field int
}
```
We need to recognise these cases and return error. otherwise the resulting
binding can't be compiled.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-08-11 17:48:54 +03:00
Anna Shaleva
b2f84c83b3 rpcbinding: reuse upperFirst helper where possible
No functional changes.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-08-11 15:32:00 +03:00
Anna Shaleva
1356721862 rpcbinding: export any unexported fields of structures/events
Perform private -> public transformation at the last step of RPC binding
generation so that it works not only with NeoGo contracts, but with any
other contracts.

Close #3083.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-08-11 15:31:08 +03:00
Anna Shaleva
c926d53869 smartcontract: allow to pass nil as parameter to (*Invoker).Call
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-07-21 13:19:25 +03:00
Anna Shaleva
802a2b3879 rpcbinding: call scriptFor* as method
Should be a part of #3035, otherwise generated bindings are failed to
be compiled.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-06-05 18:31:34 +03:00
Anna Shaleva
c7836ed6e7 rpcbinding: convert scriptFor* from function to method
Should be a part of #3012, otherwise generated bindings are failed to
be compiled.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-06-05 17:50:07 +03:00
Anna Shaleva
f97eaddfd1 cli: allow dynamic RPC binding contract hash
Close #3006 and make a light base for #3007.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-06-01 16:06:28 +03:00
Anna Shaleva
9f9cec53bd rpcbinding: provide links to types in comments
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-05-31 15:53:43 +03:00
Anna Shaleva
8ae4a1e957 rpcbinding: adjust comment of FromStackItem template methods
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-05-31 15:53:43 +03:00
Anna Shaleva
2ce1454ef5 cli: improve error message for binding template
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-05-31 15:53:43 +03:00
Anna Shaleva
865bd6c9cc compiler: compare emitted event params if --guess-eventtypes enabled
In this case emitted event parameters should match from invocation to
invocation. It's an error otherwise (and if the type is not Any).

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-05-31 15:53:43 +03:00
Anna Shaleva
a0d991a500 rpcbinding: support map[any]any conversion for extended types
Unfortunately, without pre-set user extended types configuration for events
and without --guess-eventtypes flag set we are allowed to rely only on manifest
information about types. Manifest can't give us a lot of information, but we
still need to be able to generate RPC binding. Arrays and structs are correctly
handled by the current code, but maps always rely on the fact that map's value
type is set. It's not true in the described case, so make the maps type convertor
handle this situation in a similar way how arrays are handled.

Without this commit the following panic occurs on attempt to generate RPC binding:
```
    --- FAIL: TestAssistedRPCBindings/testdata/notifications (0.01s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7f7c0e]

goroutine 190 [running]:
testing.tRunner.func1.2({0x109cb40, 0x1d58760})
	/usr/local/go/src/testing/testing.go:1396 +0x24e
testing.tRunner.func1()
	/usr/local/go/src/testing/testing.go:1399 +0x39f
panic({0x109cb40, 0x1d58760})
	/usr/local/go/src/runtime/panic.go:884 +0x212
github.com/nspcc-dev/neo-go/pkg/smartcontract/rpcbinding.extendedTypeToGo({0x22, {0x0, 0x0}, {0x0, 0x0}, 0x0, 0x0, {0x0, 0x0, 0x0}}, ...)
	/home/anna/Documents/GitProjects/nspcc-dev/neo-go/pkg/smartcontract/rpcbinding/binding.go:515 +0x36e
github.com/nspcc-dev/neo-go/pkg/smartcontract/rpcbinding.scTypeToGo({0xc000206d92?, 0xc000206d80?}, 0x22, 0xc0005d70e0)
	/home/anna/Documents/GitProjects/nspcc-dev/neo-go/pkg/smartcontract/rpcbinding/binding.go:643 +0x138
github.com/nspcc-dev/neo-go/pkg/smartcontract/rpcbinding.scTemplateToRPC({{0xc00049bb07, 0x7}, 0xc0004c89c0, {0x33, 0x22, 0x11, 0x0, 0xff, 0xee, 0xdd, ...}, ...}, ...)
	/home/anna/Documents/GitProjects/nspcc-dev/neo-go/pkg/smartcontract/rpcbinding/binding.go:686 +0xbc4
github.com/nspcc-dev/neo-go/pkg/smartcontract/rpcbinding.Generate({{0xc00049bb07, 0x7}, 0xc0004c89c0, {0x33, 0x22, 0x11, 0x0, 0xff, 0xee, 0xdd, ...}, ...})
	/home/anna/Documents/GitProjects/nspcc-dev/neo-go/pkg/smartcontract/rpcbinding/binding.go:421 +0x387
github.com/nspcc-dev/neo-go/cli/smartcontract.contractGenerateSomething(0xc00043e2c0, 0x137cd00)
	/home/anna/Documents/GitProjects/nspcc-dev/neo-go/cli/smartcontract/generate.go:99 +0x855
github.com/nspcc-dev/neo-go/cli/smartcontract.contractGenerateRPCWrapper(0xc00043e2c0?)
	/home/anna/Documents/GitProjects/nspcc-dev/neo-go/cli/smartcontract/generate.go:60 +0x25
github.com/urfave/cli.HandleAction({0x1048380?, 0x137c660?}, 0x13?)
	/home/anna/go/pkg/mod/github.com/urfave/cli@v1.22.5/app.go:524 +0x50
github.com/urfave/cli.Command.Run({{0x123539d, 0x13}, {0x0, 0x0}, {0x0, 0x0, 0x0}, {0x12577ad, 0x2a}, {0x127ad35, ...}, ...}, ...)
	/home/anna/go/pkg/mod/github.com/urfave/cli@v1.22.5/command.go:173 +0x65b
github.com/urfave/cli.(*App).RunAsSubcommand(0xc0001f4000, 0xc00043e000)
	/home/anna/go/pkg/mod/github.com/urfave/cli@v1.22.5/app.go:405 +0x91b
github.com/urfave/cli.Command.startApp({{0x12281e1, 0x8}, {0x0, 0x0}, {0x0, 0x0, 0x0}, {0x1254d8a, 0x28}, {0x0, ...}, ...}, ...)
	/home/anna/go/pkg/mod/github.com/urfave/cli@v1.22.5/command.go:372 +0x6e7
github.com/urfave/cli.Command.Run({{0x12281e1, 0x8}, {0x0, 0x0}, {0x0, 0x0, 0x0}, {0x1254d8a, 0x28}, {0x0, ...}, ...}, ...)
	/home/anna/go/pkg/mod/github.com/urfave/cli@v1.22.5/command.go:102 +0x825
github.com/urfave/cli.(*App).Run(0xc00024e000, {0xc0004f6420, 0xb, 0xb})
	/home/anna/go/pkg/mod/github.com/urfave/cli@v1.22.5/app.go:277 +0x8a7
github.com/nspcc-dev/neo-go/cli/smartcontract.TestAssistedRPCBindings.func1.1(0x9f8829?)
	/home/anna/Documents/GitProjects/nspcc-dev/neo-go/cli/smartcontract/generate_test.go:395 +0x5fc
testing.tRunner(0xc0006824e0, 0xc0004a3680)
	/usr/local/go/src/testing/testing.go:1446 +0x10b
created by testing.(*T).Run
	/usr/local/go/src/testing/testing.go:1493 +0x35f
```

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-05-31 15:53:43 +03:00
Anna Shaleva
37af2031bb rpcbinding: properly add imports for simple types of event parameters
There are two ways of doing this: first one is to emit all notifications
parameter data into rpcbindings configuration on compile time (event if
the parameter has a simple type), and the second one is to fetch parameter
type from the manifest on rpcbinding file generation if needed (we always
have manifest at this stage, thus it's not a problem to retrieve necessary
information). The latter case is chosen to reduce the bindings configuration
file size.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-05-31 15:53:43 +03:00
Anna Shaleva
19cc6c6369 compiler: store ready-to-use notification names in bindings config
Notification and its parameters may have any UTF8-compatible name
which is inappropriate for bindings configuration and for the resulting
RPC bindings file. This commit stores the prettified version of
notification's name and parameters that are ready to be used in the
resulting RPC binding without any changes.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-05-31 15:53:43 +03:00
Anna Shaleva
41938ffa78 smartcontract: drop standard events before RPC binging generation
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-05-31 15:53:43 +03:00
Anna Shaleva
2c36802e23 binding: fix comment to the extended type field
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-05-31 15:53:43 +03:00
Anna Shaleva
044ae477ca smartconract: generate RPC binding wrappers for events
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-05-31 15:52:39 +03:00
Anna Shaleva
ae52b2c2fa rpcbinding: fix binding indentation
New rule for writing blocks of code to our template: new line before
the block starts and new line after the block ends. This rule is the
same as the one we use during manual typing.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-05-30 17:37:06 +03:00
Anna Shaleva
0f0f7b364f rpcbinding: use typed return err value in etTypeConverter
Otherwise the resulting code can't be compiled.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-05-25 16:41:23 +03:00
Anna Shaleva
8beb9f23c3 smartcontract: add comments to binding config fields
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-05-25 16:41:23 +03:00
Anna Shaleva
36af361c2b smartcontract: add FromStackItem wrapper for RPC bindings
Make it exported and reusable from the user's code.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-05-24 11:27:49 +03:00
Anna Shaleva
15138b2004 vm: allow to emit convertible
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-05-17 12:47:31 +03:00
Roman Khimov
433275265f *: use require.ErrorIs instead of require.True(t, error.Is())
This is just a much better way to do the same thing. Inspired by
nspcc-dev/neofs-sdk-go#407.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-05-04 17:03:47 +03:00
Roman Khimov
c053f1a4af
Merge pull request #2957 from nspcc-dev/rm-go-17
*: drop go 1.17 support
2023-04-04 15:25:14 +03:00
Anna Shaleva
6b21ad9922 *: replace interface{} with any keyword
Everywhere including examples, external interop APIs, bindings generators
code and in other valuable places. A couple of `interface{}` usages are
intentionally left in the CHANGELOG.md, documentation and tests.
2023-04-04 13:22:42 +03:00
ZhangTao1596
d36df15878 ci: fix lint issues (fix #2948) 2023-03-29 11:19:23 +08:00
Roman Khimov
b1e7f40226 rpcbinding: fix wrappers for Any type, fix #2898 2023-02-18 00:06:45 +03:00
Roman Khimov
cad0fab704
Merge pull request #2828 from nspcc-dev/rpcwrapper-structures
Handle structures in the RPC wrapper generator
2022-12-06 21:40:16 +07:00
Roman Khimov
e5aa5ca294 rpcbinding: improve error reporting in generated code 2022-12-06 13:15:10 +03:00
Roman Khimov
ec5ebc8c18 rpcbinding: improve indentation for internal unwrappers 2022-12-06 13:15:10 +03:00
Roman Khimov
c058ab5604 rpcbinding: handle more complex non-structured types 2022-12-06 13:15:10 +03:00
Roman Khimov
ce67e6795e rpcbinding: properly support maps
I'm not sure that map with a `*big.Int` key is a good one, but it can work
this way.
2022-12-06 13:15:10 +03:00
Roman Khimov
8e0be6e7a5 rpcbinding: improve indentation for internal array code 2022-12-06 13:15:10 +03:00
Roman Khimov
0214628127 rpcbinding: generate bindings using new extended type data 2022-12-06 13:15:10 +03:00
Roman Khimov
b9d20b32e9 compiler: push additional type data into the bindings file
Structures/arrays and maps.
2022-12-06 13:15:10 +03:00
Anna Shaleva
1250e82c2a vm: add PUSHT and PUSHF opcodes
Port https://github.com/neo-project/neo-vm/pull/497.
2022-12-02 10:02:33 +03:00
Roman Khimov
82c6ce218b rpcbinding: use binding condig to generate code for simple arrays
Part of #2767.
2022-11-14 13:01:13 +03:00
Roman Khimov
145ebad90e binding: drop the only error condition from TemplateFromManifest
Simplify the interface, we do IsValid() check anyway in the CLI and it covers
this condition as well.
2022-11-09 18:13:45 +03:00
Roman Khimov
be02eea7b1 binding: precompile template, remove useless error condition 2022-11-09 18:13:45 +03:00
Roman Khimov
a7f86dcb7f rpcbinding: generate Expanded methods for iterators
Refs. #2768.
2022-11-09 18:13:45 +03:00
Roman Khimov
d569fe01e6 rpcbinding: initial support for iterators, see #2768
Already better than stackitem.Item.
2022-11-09 18:13:45 +03:00
Roman Khimov
69d8905ad9 rpcbinding: exclude onNEPXXPayment methods from wrappers
They make no sense there.
2022-11-08 17:01:36 +03:00
Roman Khimov
130608ac67 rpcbinding: support writer-only wrappers
"verify" contract doesn't have any safe methods.
2022-11-08 17:01:36 +03:00
Roman Khimov
df29008a50 rpcbinding: add GAS testcase, fix methodless wrappers
* strip NEP-XX methods before going into generator to avoid unused imports
 * nepXX.Invoker types already include Call
 * always import util, it's used for Hash
2022-11-08 17:01:36 +03:00
Roman Khimov
aeb61fb61d rpcbinding: generate ASSERT for bool-returning methods
It's a common pattern.
2022-11-08 17:01:36 +03:00
Roman Khimov
2a4a5ab479 rpcbinding: support simple wrappers for writer methods
Fixes #2769.
2022-11-08 17:01:36 +03:00
Roman Khimov
b590d4ca04
Merge pull request #2766 from nspcc-dev/rpc-wrapper-autogen
Rpc wrapper autogeneration
2022-10-28 11:54:47 +07:00
Roman Khimov
02ce59cfd5 binding: avoid name conflicts with Go keywords
And clashing one name on another after rename.
2022-10-27 22:57:49 +03:00
Roman Khimov
617c31093f smartcontract: initial rpcbinding implementation, fix #2705
It can do some unwrapping and reuse nepXX packages. It only uses manifest data
at the moment, see #2767, #2768, #2769.
2022-10-27 22:57:49 +03:00
Roman Khimov
e0eff94094 standard: correct Comply* comments 2022-10-27 18:32:00 +03:00
Roman Khimov
64b603b056 standard: export standard definitions
Make Comply* functions useful and expose standard definitions for some reuse.
2022-10-27 18:32:00 +03:00
Roman Khimov
396f56f792 binding: drop unused lowerFirst 2022-10-26 12:47:39 +03:00
Roman Khimov
4191b18728 binding: make TemplateFromManifest more reusable
Other template generators can make use of it.
2022-10-26 12:43:48 +03:00
Roman Khimov
d6d4f07280 binding: always import some packages and do it outside
If the contract has no methods, it's probably a broken one.
2022-10-26 12:40:59 +03:00
Roman Khimov
5d43367082 emit: optimize Bool GAS cost
NOT is 1 byte shorter and 2048 times cheaper than CONVERT. Inspired by
neo-project/neo-vm#493.
2022-10-25 13:08:33 +03:00
Anna Shaleva
4dbaf2a123 smartcontract: add comment to GetCompleteTransaction 2022-10-13 16:07:34 +03:00
Anna Shaleva
af658bc3e5 cli: support Null as an argument for invocation-related commands 2022-10-13 16:07:31 +03:00
Anna Shaleva
7eb87afab8 cli: unify parameters parsing
Share parameters parsing code between 'contract invokefunction' and
'vm run' commands. It allows VM CLI to parse more complicated parameter
types including arrays and file-backed bytestrings.
2022-10-13 08:20:27 +03:00
Anna Shaleva
641abd4d1c smartcontract: fix underlying PublicKey parameter value
Value of PublicKey parameter always stores public key bytes, not the
deserialized representation. All other code (CLI parameters parsing with
its NewParameterFromString, Parameter unmarshaller, etc.) is based on
the idea that value of PublicKey is []byte.
2022-10-11 13:50:32 +03:00
Anna Shaleva
4a46001746 smartcontract: fix error message for CreateMultiSigRedeemScript 2022-10-07 15:56:34 +03:00
Roman Khimov
8893163803 smartcontract: define parameter lengths as constants and use them 2022-10-05 10:46:21 +03:00
Roman Khimov
317dd42513 *: use uint*Size and SignatureLen constants where appropriate 2022-10-05 10:45:52 +03:00
Roman Khimov
79887f9d78 runtime: check notifications against ABI
Related to #2703, just a logged thing for now.
2022-10-04 17:52:38 +03:00
Anna Shaleva
554e48e7b7 compiler: enforce runtime.Notify parameters cast
If notification parameters type can be defined in a compile time then enforce
parameter cast to the desired type got from manifest.
2022-09-30 14:42:43 +03:00
Roman Khimov
18ed26194f smartcontract: add Len to Builder
Which is useful in some cases.
2022-09-14 10:25:10 +03:00
Roman Khimov
541d4b49e1 context: define a constant for transaction context type 2022-09-08 14:33:04 +03:00
Roman Khimov
4fb4f5a1ac smartcontract: make *util.Uint160 and *util.Uint256 usable for parameters
Use Any type for NULL.
2022-09-08 14:33:04 +03:00
Roman Khimov
ea92f3d716 smartcontract: add some notes on API limitations 2022-09-08 13:27:07 +03:00
Roman Khimov
69176168c3 smartcontract: modernize Builder example
And make it a bit more useful.
2022-09-07 22:40:25 +03:00
Roman Khimov
58dc8d0c9b *: always close the wallet after use
Fix #2631.
2022-09-02 14:44:32 +03:00
Roman Khimov
411ebdf51e cli: add complete support for offline signing, fix #2662
See documentation update for an example. Some code is made generic as well,
GetCompleteTransaction can now be used directly on ParameterContext.
2022-09-01 15:30:34 +03:00
Roman Khimov
773bcc3a59 context: make error messages a bit less cryptic
Refs. #2664.
2022-09-01 15:30:33 +03:00
Roman Khimov
58707c2b1e context: handle the case when we have more sigs than needed
We can technically have more signatures in the file than we need and it's OK,
this case should be handled.
2022-09-01 15:30:33 +03:00
Roman Khimov
bf06b32278
Merge pull request #2658 from nspcc-dev/calculate-network-fee-fixes
calculatenetworkfee improvements
2022-08-24 10:24:53 +03:00
Roman Khimov
03cc9b2762 rpcsrv: execute all witnesses for calculatenetworkfee
Try to get as much data as possible, fix #2654.
2022-08-23 15:34:18 +03:00
Anna Shaleva
fb8a3973f1 smartcontract: remove empty method parameter handling
It's prohibited by the manifest validness checker, thus should not be
supported by bindings generator.
2022-08-22 15:01:38 +03:00
Anna Shaleva
15732580eb smartcontract: improve manifest validness errors
It should be clear from error what's wrong with ABI
(specify bad method/event/parameter identifier).
2022-08-22 14:59:28 +03:00
Roman Khimov
593fa4cac8
Merge pull request #2632 from nspcc-dev/rpcclient-actor
RPC client Actor interface
2022-08-09 17:21:24 +03:00
Anna Shaleva
916f2293b8 *: apply go 1.19 formatter heuristics
And make manual corrections where needed. See the "Common mistakes
and pitfalls" section of https://tip.golang.org/doc/comment.
2022-08-09 15:37:52 +03:00
Roman Khimov
afef8b85d9 rpcclient: add deprecation warnings 2022-08-08 09:51:51 +03:00
Roman Khimov
aa2dbe9caf smartcontract: accept Parameter in NewParameterFromValue
While it makes little sense, there can be a situation where this function will
get predefined Parameters in some way.
2022-08-07 22:33:56 +03:00
Roman Khimov
25bd941d6f
Merge pull request #2601 from nspcc-dev/disallow-unnamed-parameters
compiler: disallow unnamed parameters for exported methods of the main package
2022-08-02 18:04:11 +03:00
Anna Shaleva
725e8779a1 compiler: always ensure manifest passes base check 2022-08-02 17:37:43 +03:00
Roman Khimov
55164132df smartcontract: provide NewParametersFromValues for convenience as well 2022-08-01 21:31:23 +03:00
Roman Khimov
92a931c145 smartcontract: provide interface{}->Parameter conversion
Which is almost like a NeoFS's toStackParameter() on steroids (except it
doesn't mess with noderoles package, it can be casted to int). RPC client's
Invoke* functions expect Parameters, so make it easy to create them.
2022-08-01 21:31:23 +03:00
Roman Khimov
a8a2f2ed5a smartcontract: make CreateCallAndUnwrapIteratorScript accept Go types
Parameter is for the RPC client, all other CreateXXXScript functions deal with
regular types.
2022-08-01 21:31:23 +03:00
Roman Khimov
848d68fba8 smartcontract: improve package documentation 2022-08-01 21:31:23 +03:00
Roman Khimov
3c5a720e3a smartcontract: drop Params type and TryParse methods
They were first introduced in a058598ecc and
then carefully moved in 648e0bb242, but it looks
like they were never used by any external code. This code can be useful on the
server, but the server has its own params package to deal with
parameters. Clients usually create Parameters and then get results as
stackitem.Items, so they don't use this code either. So there is zero point in
keeping it.
2022-08-01 21:31:23 +03:00
Roman Khimov
f749aaff3c *: reuse smartcontract package to create standard entry scripts 2022-07-26 12:19:49 +03:00
Roman Khimov
32ebb4a90d smartcontract: add Builder, method invocation helpers and doc
Move the last remaining script-related things out of the rpcclient.
2022-07-25 22:49:47 +03:00
Roman Khimov
1b6f4051d8 smartcontract: move CreateCallAndUnwrapIteratorScript there
RPC client shouldn't build scripts and this function can be useful as a
reusable building block.
2022-07-25 15:46:20 +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
Elizaveta Chichindaeva
28908aa3cf [#2442] English Check
Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
2022-05-04 19:48:27 +03:00
Evgeniy Stratonikov
739db259e3 smartcontract: remove unused ParameterFromStackItem
It is exists from the times we used `smartcontract.Parameter` somewhere
in the `NotificationEvent`/`ApplicationLog`. `stackitem.ToJSON` now
handles this.

Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-04-01 08:38:35 +03:00
Evgeniy Stratonikov
fe0cd5fe32 smartcontract: remove EncodeBinary for Parameter
It seems, we don't use it anywhere.

Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-04-01 08:38:35 +03:00
Evgeniy Stratonikov
0b0d39f797 smartcontract: allow to use *big.Int numbers for integers
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-04-01 08:38:34 +03:00
Anna Shaleva
2096ad6e81 *: remove io/ioutil uses
Close #1764.
2022-03-17 19:39:18 +03:00