Commit graph

50 commits

Author SHA1 Message Date
Anna Shaleva
856edcca39 *: bump min supported go version from 1.17 to 1.18 2023-03-31 09:59:24 +03:00
Roman Khimov
4ce968e4d0 *: update interops, add tests for new management methods 2022-12-02 10:57:05 +03:00
Roman Khimov
07e32e221d *: update interops, add System.Runtime.LoadScript wrapper check 2022-11-25 15:16:27 +03:00
Anna Shaleva
08e2511676 *: update interop dependency 2022-09-27 15:34:20 +03:00
Anna Shaleva
ae511447f9 *: update interop dependency 2022-09-23 08:58:55 +03:00
Anna Shaleva
25667914fa *: update interop dependency 2022-09-21 17:40:34 +03:00
Anna Shaleva
0477f83ea8 *: update interop version 2022-09-20 09:43:37 +03:00
Anna Shaleva
119b40c378 *: update interop deps 2022-08-09 15:40:15 +03:00
Anna Shaleva
bb751535d3 *: bump minimum supported go version
Close #2497.
2022-08-08 13:59:32 +03:00
Roman Khimov
3e406c3779 go.mod: update interops, just in case 2022-07-28 17:03:43 +03:00
Roman Khimov
55f910777e Revert "native/interop: revert management.hasMethod()"
This reverts commit 6c7a401f77, introducing
changes from #2598 again.
2022-07-28 17:00:34 +03:00
Roman Khimov
c7b12f8d4c Revert "go.mod: update interop dependencies"
This reverts commit 1a8bff5bbf to simplify
subsequent reverts.
2022-07-28 17:00:19 +03:00
Roman Khimov
1a8bff5bbf go.mod: update interop dependencies
Just to make sure we're not missing something and using the latest ones.
2022-07-27 23:30:01 +03:00
Roman Khimov
6c7a401f77 native/interop: revert management.hasMethod()
This reverts commits
 * f50bcf617a
 * 4f184498bc
 * ab3330564a

because they're 3.4.0-compatible while we need 3.3.1.
2022-07-27 23:26:24 +03:00
Roman Khimov
f50bcf617a compiler: add test for hasMethod, update all go.mods 2022-07-13 18:22:05 +03:00
Anna Shaleva
079f68a8c3 examples: use interop equality helpers where possible 2022-07-11 18:23:46 +03:00
Anna Shaleva
3594c4f760 examples: update interop deps 2022-07-11 16:01:19 +03:00
Anna Shaleva
3c2fc165b6 gomod: update interop dependency 2022-06-01 15:10:43 +03:00
Anna Shaleva
1cc107d461 gomod: update interop dependency 2022-05-23 14:05:00 +03:00
Anna Shaleva
bb5cffc4a8 gomod: update interop dependency 2022-05-12 14:32:28 +03:00
Anna Shaleva
8802dcf054 gomod: update interop dependency 2022-05-06 13:44:21 +03:00
Elizaveta Chichindaeva
28908aa3cf [#2442] English Check
Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
2022-05-04 19:48:27 +03:00
Anna Shaleva
69b70c5e93 gomod: update interop dependency 2022-04-29 11:23:43 +03:00
Anna Shaleva
3463d7292f gomod: update interop dependency 2022-04-21 19:27:30 +03:00
Anna Shaleva
7b5ff25a40 gomod: update interop dependency 2022-04-05 10:49:10 +03:00
Anna Shaleva
5388c895d2 gomod: update interop version 2022-04-05 10:39:58 +03:00
Roman Khimov
a5979f6d64 examples: add defer/recover to OnNEP17Payment handlers
Transaction must be ABORTed, exceptions are not sufficient.
2022-03-23 11:58:07 +03:00
Roman Khimov
3b639f518e *: update go.* for the previous change 2022-03-21 17:44:33 +03:00
Roman Khimov
25d72db8b0 *: update go.sum/go.mod wrt previous change 2022-03-21 14:39:05 +03:00
AnnaShaleva
7a8dc11791 examples: update dependencies version 2022-03-18 13:44:33 +03:00
Evgeniy Stratonikov
4960766019 go.mod: update pkg/interop dependency
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-03-15 17:15:40 +03:00
AnnaShaleva
992d74d193 examples: update version of neo-go 2022-03-01 19:08:22 +03:00
AnnaShaleva
abf719dcde gomod: update version of interop package 2022-03-01 19:08:22 +03:00
Anna Shaleva
3c75f047c1 cli: refactor nep11-related commands and add tests
Specify tokenID via hex-encoded string.
2022-02-09 11:47:27 +03:00
Roman Khimov
7945097543 native: fix ContractManagement's call flags for update/deploy
See neo-project/neo#2653.
2022-02-01 12:21:00 +03:00
Evgeniy Stratonikov
1154eae3cd examples: use proper interop version in go.mod
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-01-25 12:37:26 +03:00
Evgeniy Stratonikov
ad65d1fa1f compiler: implement custom logic for go1.15
For some reason `foo.go` is interpreted as an http URL, and even if we
replace it with `./foo.go` there is an errors with file missing on disk.
Because `CompileWithOptions` should be able to compile file under any
circumstances, we allocate temporary directory base on version used to
compile a binary.

Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-01-21 17:43:28 +03:00
Evgeniy Stratonikov
d19c0492d4 examples: use a separate go.mod for each contract
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-01-21 10:22:29 +03:00
Roman Khimov
ce9d0b22cf *: use NEP-XX naming consistently in docs/comments
Standards are NEP-11 and NEP-17, not NEP11, not NEP17, not anything
else. Variable/function names of course can use whatever fits, but documents
and comments should be consistent wrt this.
2021-11-19 12:58:46 +03:00
Roman Khimov
42a9d3d7b8 nef: add Source field
Follow neo-project/neo#2605.
2021-09-24 00:19:37 +03:00
Alex Vanin
90400d951a examples: add missing permission methods in manifests 2021-06-24 16:00:45 +03:00
Alex Vanin
5fa000cbae examples: rename onNEP11Transfer to onNEP11Payment in manifests
There is no such thing as `onNEP11Transfer` in NEP-11.
2021-06-23 20:48:04 +03:00
Anna Shaleva
39e096da64 examples: use base64 to encode HASHY token ID
Base58 does not preserve one-to-one byte correspondence with the
original data, so different combinations of the same number of bytes
might have different encoded string length. We use GAS transfer to mint
HASHY token, where the token hash is Base58Encode(Ripemd160(data + txHash)).

The problem is that `invokescript` RPC call is used to define transfer tx
sysfee, thus, txHash during testinvoke differs from the actual one, that's
why resulting token ID may have different length during testinvoke and
real invoke. As far as we use token ID as a key to store contract
values, the storage price may also differ. The result is failing
TestNEP11_OwnerOf_BalanceOf_Transfer test due to `gas limit exceeded`
error:

```
    logger.go:130: 2021-06-10T21:09:08.984+0300	WARN	contract invocation failed	{"tx": "45a0220b19725eaa0a4d01fa7a6cdaac8498592e8f3b43bdde27aae7d9ecf635", "block": 5, "error": "error encountered at instruction 36 (SYSCALL): error during call from native: error encountered at instruction 22 (SYSCALL): failed to invoke syscall 1736177434: gas limit exceeded"}
    executor_test.go:219:
        	Error Trace:	executor_test.go:219
        	            				nep11_test.go:132
        	            				nep11_test.go:235
        	Error:      	Not equal:
        	            	expected: 0x2
        	            	actual  : 0x4
        	Test:       	TestNEP11_OwnerOf_BalanceOf_Transfer
```

Fixed by using base64 instead of base58 (base64 preserves the resulting
encoded string length for the same input length).
2021-06-11 13:57:59 +03:00
Evgeniy Stratonikov
4467e2cbfd cli,compiler: allow to specify manifest permissions 2021-06-04 11:16:22 +03:00
Anna Shaleva
366e79b9b8 core: rename Neo.Crypto.CheckSig interop 2021-05-11 18:37:55 +03:00
Evgeniy Stratonikov
721748acfd examples: change NFT contract to use storage iterators 2021-05-11 12:13:30 +03:00
Anna Shaleva
d0c64347ab *: add data to NEP11 Transfer 2021-05-05 19:44:29 +03:00
Anna Shaleva
f61ab6bd11 cli: add nep11 properties command 2021-04-30 16:23:06 +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
Roman Khimov
f21f506493 examples: add NFT example, fix #1845 2021-04-08 12:36:02 +03:00