diff --git a/examples/engine/go.mod b/examples/engine/go.mod index 63147e5cc..b8c1f57b6 100644 --- a/examples/engine/go.mod +++ b/examples/engine/go.mod @@ -2,4 +2,4 @@ module github.com/nspcc-dev/neo-go/examples/engine go 1.20 -require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c +require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 diff --git a/examples/engine/go.sum b/examples/engine/go.sum index b2feac237..84d8058e4 100644 --- a/examples/engine/go.sum +++ b/examples/engine/go.sum @@ -1,2 +1,2 @@ -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c h1:0IEfyqW25ugbxVI04l8nB1elDe3g5I7QARU2i1LZkWw= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 h1:wULMfaNToxlinz9cYWyZA4kAy6CTUBtJ1yFHjCSgs10= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= diff --git a/examples/events/go.mod b/examples/events/go.mod index 9689e2e16..b0bda4b37 100644 --- a/examples/events/go.mod +++ b/examples/events/go.mod @@ -2,4 +2,4 @@ module github.com/nspcc-dev/neo-go/examples/events go 1.20 -require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c +require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 diff --git a/examples/events/go.sum b/examples/events/go.sum index b2feac237..84d8058e4 100644 --- a/examples/events/go.sum +++ b/examples/events/go.sum @@ -1,2 +1,2 @@ -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c h1:0IEfyqW25ugbxVI04l8nB1elDe3g5I7QARU2i1LZkWw= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 h1:wULMfaNToxlinz9cYWyZA4kAy6CTUBtJ1yFHjCSgs10= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= diff --git a/examples/iterator/go.mod b/examples/iterator/go.mod index 4cb6adae0..2b3d13d3e 100644 --- a/examples/iterator/go.mod +++ b/examples/iterator/go.mod @@ -2,4 +2,4 @@ module github.com/nspcc-dev/neo-go/examples/iterator go 1.20 -require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c +require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 diff --git a/examples/iterator/go.sum b/examples/iterator/go.sum index b2feac237..84d8058e4 100644 --- a/examples/iterator/go.sum +++ b/examples/iterator/go.sum @@ -1,2 +1,2 @@ -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c h1:0IEfyqW25ugbxVI04l8nB1elDe3g5I7QARU2i1LZkWw= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 h1:wULMfaNToxlinz9cYWyZA4kAy6CTUBtJ1yFHjCSgs10= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= diff --git a/examples/nft-d/go.mod b/examples/nft-d/go.mod index 52ed01d08..42df68efc 100644 --- a/examples/nft-d/go.mod +++ b/examples/nft-d/go.mod @@ -2,4 +2,4 @@ module github.com/nspcc-dev/neo-go/examples/nft go 1.20 -require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c +require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 diff --git a/examples/nft-d/go.sum b/examples/nft-d/go.sum index b2feac237..84d8058e4 100644 --- a/examples/nft-d/go.sum +++ b/examples/nft-d/go.sum @@ -1,2 +1,2 @@ -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c h1:0IEfyqW25ugbxVI04l8nB1elDe3g5I7QARU2i1LZkWw= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 h1:wULMfaNToxlinz9cYWyZA4kAy6CTUBtJ1yFHjCSgs10= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= diff --git a/examples/nft-nd-nns/go.mod b/examples/nft-nd-nns/go.mod index 8fc9eb7a4..78522923e 100644 --- a/examples/nft-nd-nns/go.mod +++ b/examples/nft-nd-nns/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/nspcc-dev/neo-go v0.102.1-0.20231020181554-d89c8801d689 - github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c + github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 github.com/stretchr/testify v1.8.4 ) diff --git a/examples/nft-nd-nns/go.sum b/examples/nft-nd-nns/go.sum index 2fd5921dd..bb122c9db 100644 --- a/examples/nft-nd-nns/go.sum +++ b/examples/nft-nd-nns/go.sum @@ -200,8 +200,8 @@ github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22/go.mod h github.com/nspcc-dev/hrw v1.0.9 h1:17VcAuTtrstmFppBjfRiia4K2wA/ukXZhLFS8Y8rz5Y= github.com/nspcc-dev/neo-go v0.102.1-0.20231020181554-d89c8801d689 h1:WnEdGAQwaW0C8wnNnQZ+rM/JfFKZDSTOqwm8cS0TOdk= github.com/nspcc-dev/neo-go v0.102.1-0.20231020181554-d89c8801d689/go.mod h1:x+wmcYqpZYJwLp1l/pHZrqNp3RSWlkMymWGDij3/OPo= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c h1:0IEfyqW25ugbxVI04l8nB1elDe3g5I7QARU2i1LZkWw= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 h1:wULMfaNToxlinz9cYWyZA4kAy6CTUBtJ1yFHjCSgs10= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= github.com/nspcc-dev/neofs-api-go/v2 v2.14.0 h1:jhuN8Ldqz7WApvUJRFY0bjRXE1R3iCkboMX5QVZhHVk= github.com/nspcc-dev/neofs-crypto v0.4.0 h1:5LlrUAM5O0k1+sH/sktBtrgfWtq1pgpDs09fZo+KYi4= github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.11 h1:QOc8ZRN5DXlAeRPh5QG9u8rMLgoeRNiZF5/vL7QupWg= diff --git a/examples/nft-nd/go.mod b/examples/nft-nd/go.mod index 8fde8face..e9f47c373 100644 --- a/examples/nft-nd/go.mod +++ b/examples/nft-nd/go.mod @@ -2,4 +2,4 @@ module github.com/nspcc-dev/neo-go/examples/nft-nd go 1.20 -require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c +require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 diff --git a/examples/nft-nd/go.sum b/examples/nft-nd/go.sum index b2feac237..84d8058e4 100644 --- a/examples/nft-nd/go.sum +++ b/examples/nft-nd/go.sum @@ -1,2 +1,2 @@ -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c h1:0IEfyqW25ugbxVI04l8nB1elDe3g5I7QARU2i1LZkWw= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 h1:wULMfaNToxlinz9cYWyZA4kAy6CTUBtJ1yFHjCSgs10= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= diff --git a/examples/oracle/go.mod b/examples/oracle/go.mod index 2ff833b20..cf5e26961 100644 --- a/examples/oracle/go.mod +++ b/examples/oracle/go.mod @@ -2,4 +2,4 @@ module github.com/nspcc-dev/neo-go/examples/oracle go 1.20 -require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c +require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 diff --git a/examples/oracle/go.sum b/examples/oracle/go.sum index b2feac237..84d8058e4 100644 --- a/examples/oracle/go.sum +++ b/examples/oracle/go.sum @@ -1,2 +1,2 @@ -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c h1:0IEfyqW25ugbxVI04l8nB1elDe3g5I7QARU2i1LZkWw= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 h1:wULMfaNToxlinz9cYWyZA4kAy6CTUBtJ1yFHjCSgs10= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= diff --git a/examples/runtime/go.mod b/examples/runtime/go.mod index de925e556..d49e669e2 100644 --- a/examples/runtime/go.mod +++ b/examples/runtime/go.mod @@ -2,4 +2,4 @@ module github.com/nspcc-dev/neo-go/examples/runtime go 1.20 -require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c +require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 diff --git a/examples/runtime/go.sum b/examples/runtime/go.sum index b2feac237..84d8058e4 100644 --- a/examples/runtime/go.sum +++ b/examples/runtime/go.sum @@ -1,2 +1,2 @@ -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c h1:0IEfyqW25ugbxVI04l8nB1elDe3g5I7QARU2i1LZkWw= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 h1:wULMfaNToxlinz9cYWyZA4kAy6CTUBtJ1yFHjCSgs10= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= diff --git a/examples/storage/go.mod b/examples/storage/go.mod index e37a90207..786d4d324 100644 --- a/examples/storage/go.mod +++ b/examples/storage/go.mod @@ -2,4 +2,4 @@ module github.com/nspcc-dev/neo-go/examples/storage go 1.20 -require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c +require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 diff --git a/examples/storage/go.sum b/examples/storage/go.sum index b2feac237..84d8058e4 100644 --- a/examples/storage/go.sum +++ b/examples/storage/go.sum @@ -1,2 +1,2 @@ -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c h1:0IEfyqW25ugbxVI04l8nB1elDe3g5I7QARU2i1LZkWw= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 h1:wULMfaNToxlinz9cYWyZA4kAy6CTUBtJ1yFHjCSgs10= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= diff --git a/examples/timer/go.mod b/examples/timer/go.mod index 1b6f42c43..e00b24175 100644 --- a/examples/timer/go.mod +++ b/examples/timer/go.mod @@ -2,4 +2,4 @@ module github.com/nspcc-dev/neo-go/examples/timer go 1.20 -require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c +require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 diff --git a/examples/timer/go.sum b/examples/timer/go.sum index b2feac237..84d8058e4 100644 --- a/examples/timer/go.sum +++ b/examples/timer/go.sum @@ -1,2 +1,2 @@ -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c h1:0IEfyqW25ugbxVI04l8nB1elDe3g5I7QARU2i1LZkWw= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 h1:wULMfaNToxlinz9cYWyZA4kAy6CTUBtJ1yFHjCSgs10= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= diff --git a/examples/token/go.mod b/examples/token/go.mod index 043902eb3..64494aad8 100644 --- a/examples/token/go.mod +++ b/examples/token/go.mod @@ -2,4 +2,4 @@ module github.com/nspcc-dev/neo-go/examples/token go 1.20 -require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c +require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 diff --git a/examples/token/go.sum b/examples/token/go.sum index b2feac237..84d8058e4 100644 --- a/examples/token/go.sum +++ b/examples/token/go.sum @@ -1,2 +1,2 @@ -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c h1:0IEfyqW25ugbxVI04l8nB1elDe3g5I7QARU2i1LZkWw= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 h1:wULMfaNToxlinz9cYWyZA4kAy6CTUBtJ1yFHjCSgs10= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= diff --git a/examples/zkp/cubic_circuit/go.mod b/examples/zkp/cubic_circuit/go.mod index 9d1a86be5..54702a26a 100644 --- a/examples/zkp/cubic_circuit/go.mod +++ b/examples/zkp/cubic_circuit/go.mod @@ -33,7 +33,7 @@ require ( github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/mr-tron/base58 v1.2.0 // indirect github.com/nspcc-dev/go-ordered-json v0.0.0-20231123160306-3374ff1e7a3c // indirect - github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c // indirect + github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 // indirect github.com/nspcc-dev/rfc6979 v0.2.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.13.0 // indirect diff --git a/examples/zkp/cubic_circuit/go.sum b/examples/zkp/cubic_circuit/go.sum index 1947c8e17..59d49427b 100644 --- a/examples/zkp/cubic_circuit/go.sum +++ b/examples/zkp/cubic_circuit/go.sum @@ -216,8 +216,8 @@ github.com/nspcc-dev/go-ordered-json v0.0.0-20231123160306-3374ff1e7a3c/go.mod h github.com/nspcc-dev/hrw v1.0.9 h1:17VcAuTtrstmFppBjfRiia4K2wA/ukXZhLFS8Y8rz5Y= github.com/nspcc-dev/neo-go v0.103.1 h1:BfRBceHUu8jSc1KQy7CzmQ/pa+xzAmgcyteGf0/IGgM= github.com/nspcc-dev/neo-go v0.103.1/go.mod h1:MD7MPiyshUwrE5n1/LzxeandbItaa/iLW/bJb6gNs/U= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c h1:0IEfyqW25ugbxVI04l8nB1elDe3g5I7QARU2i1LZkWw= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 h1:wULMfaNToxlinz9cYWyZA4kAy6CTUBtJ1yFHjCSgs10= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= github.com/nspcc-dev/neofs-api-go/v2 v2.14.0 h1:jhuN8Ldqz7WApvUJRFY0bjRXE1R3iCkboMX5QVZhHVk= github.com/nspcc-dev/neofs-crypto v0.4.0 h1:5LlrUAM5O0k1+sH/sktBtrgfWtq1pgpDs09fZo+KYi4= github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.11 h1:QOc8ZRN5DXlAeRPh5QG9u8rMLgoeRNiZF5/vL7QupWg= diff --git a/examples/zkp/xor_compat/go.mod b/examples/zkp/xor_compat/go.mod index ea35c1847..a605846d1 100644 --- a/examples/zkp/xor_compat/go.mod +++ b/examples/zkp/xor_compat/go.mod @@ -2,4 +2,4 @@ module github.com/nspcc-dev/neo-go/examples/zkp/xor go 1.20 -require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c +require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 diff --git a/examples/zkp/xor_compat/go.sum b/examples/zkp/xor_compat/go.sum index b2feac237..84d8058e4 100644 --- a/examples/zkp/xor_compat/go.sum +++ b/examples/zkp/xor_compat/go.sum @@ -1,2 +1,2 @@ -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c h1:0IEfyqW25ugbxVI04l8nB1elDe3g5I7QARU2i1LZkWw= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 h1:wULMfaNToxlinz9cYWyZA4kAy6CTUBtJ1yFHjCSgs10= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= diff --git a/go.mod b/go.mod index 497d41513..84f8d3782 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/mr-tron/base58 v1.2.0 github.com/nspcc-dev/dbft v0.0.0-20230515113611-25db6ba61d5c github.com/nspcc-dev/go-ordered-json v0.0.0-20240301084351-0246b013f8b2 - github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c + github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.11 github.com/nspcc-dev/rfc6979 v0.2.1 github.com/pierrec/lz4 v2.6.1+incompatible diff --git a/go.sum b/go.sum index 91f7a6808..e3f168b05 100644 --- a/go.sum +++ b/go.sum @@ -94,8 +94,8 @@ github.com/nspcc-dev/go-ordered-json v0.0.0-20240301084351-0246b013f8b2 h1:mD9hU github.com/nspcc-dev/go-ordered-json v0.0.0-20240301084351-0246b013f8b2/go.mod h1:U5VfmPNM88P4RORFb6KSUVBdJBDhlqggJZYGXGPxOcc= github.com/nspcc-dev/hrw v1.0.9 h1:17VcAuTtrstmFppBjfRiia4K2wA/ukXZhLFS8Y8rz5Y= github.com/nspcc-dev/hrw v1.0.9/go.mod h1:l/W2vx83vMQo6aStyx2AuZrJ+07lGv2JQGlVkPG06MU= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c h1:0IEfyqW25ugbxVI04l8nB1elDe3g5I7QARU2i1LZkWw= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 h1:wULMfaNToxlinz9cYWyZA4kAy6CTUBtJ1yFHjCSgs10= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= github.com/nspcc-dev/neofs-api-go/v2 v2.14.0 h1:jhuN8Ldqz7WApvUJRFY0bjRXE1R3iCkboMX5QVZhHVk= github.com/nspcc-dev/neofs-api-go/v2 v2.14.0/go.mod h1:DRIr0Ic1s+6QgdqmNFNLIqMqd7lNMJfYwkczlm1hDtM= github.com/nspcc-dev/neofs-crypto v0.4.0 h1:5LlrUAM5O0k1+sH/sktBtrgfWtq1pgpDs09fZo+KYi4= diff --git a/internal/contracts/oracle_contract/go.mod b/internal/contracts/oracle_contract/go.mod index 9142ab6bc..2fe0af1fd 100644 --- a/internal/contracts/oracle_contract/go.mod +++ b/internal/contracts/oracle_contract/go.mod @@ -2,4 +2,4 @@ module github.com/nspcc-dev/neo-go/internal/examples/oracle go 1.20 -require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c +require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 diff --git a/internal/contracts/oracle_contract/go.sum b/internal/contracts/oracle_contract/go.sum index b2feac237..84d8058e4 100644 --- a/internal/contracts/oracle_contract/go.sum +++ b/internal/contracts/oracle_contract/go.sum @@ -1,2 +1,2 @@ -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c h1:0IEfyqW25ugbxVI04l8nB1elDe3g5I7QARU2i1LZkWw= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322134659-72484a33eb4c/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7 h1:wULMfaNToxlinz9cYWyZA4kAy6CTUBtJ1yFHjCSgs10= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240322141543-1840c057bdd7/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY= diff --git a/pkg/compiler/native_test.go b/pkg/compiler/native_test.go index c7a78c606..e9d45a347 100644 --- a/pkg/compiler/native_test.go +++ b/pkg/compiler/native_test.go @@ -240,6 +240,7 @@ func TestNativeHelpersCompile(t *testing.T) { {"bls12381Add", []string{"crypto.Bls12381Point{}", "crypto.Bls12381Point{}"}}, {"bls12381Mul", []string{"crypto.Bls12381Point{}", "[]byte{1, 2, 3}", "true"}}, {"bls12381Pairing", []string{"crypto.Bls12381Point{}", "crypto.Bls12381Point{}"}}, + {"keccak256", []string{"[]byte{1, 2, 3}"}}, }) runNativeTestCases(t, cs.Std.ContractMD, "std", []nativeTestCase{ {"serialize", []string{"[]byte{1, 2, 3}"}}, diff --git a/pkg/core/native/crypto.go b/pkg/core/native/crypto.go index dc025d54a..fb9d91bd8 100644 --- a/pkg/core/native/crypto.go +++ b/pkg/core/native/crypto.go @@ -20,6 +20,7 @@ import ( "github.com/nspcc-dev/neo-go/pkg/smartcontract/manifest" "github.com/nspcc-dev/neo-go/pkg/vm/stackitem" "github.com/twmb/murmur3" + "golang.org/x/crypto/sha3" ) // Crypto represents CryptoLib contract. @@ -101,6 +102,10 @@ func newCrypto() *Crypto { md = newMethodAndPrice(c.bls12381Pairing, 1<<23, callflag.NoneFlag) c.AddMethod(md, desc) + desc = newDescriptor("keccak256", smartcontract.ByteArrayType, + manifest.NewParameter("data", smartcontract.ByteArrayType)) + md = newMethodAndPrice(c.keccak256, 1<<15, callflag.NoneFlag) + c.AddMethod(md, desc) return c } @@ -285,6 +290,20 @@ func (c *Crypto) bls12381Pairing(_ *interop.Context, args []stackitem.Item) stac return stackitem.NewInterop(p) } +func (c *Crypto) keccak256(_ *interop.Context, args []stackitem.Item) stackitem.Item { + bs, err := args[0].TryBytes() + if err != nil { + panic(err) + } + + digest := sha3.NewLegacyKeccak256() + _, err = digest.Write(bs) + if err != nil { + panic(err) + } + return stackitem.NewByteArray(digest.Sum(nil)) +} + // Metadata implements the Contract interface. func (c *Crypto) Metadata() *interop.ContractMD { return &c.ContractMD diff --git a/pkg/core/native/crypto_test.go b/pkg/core/native/crypto_test.go index 47688e2c2..d5d79355e 100644 --- a/pkg/core/native/crypto_test.go +++ b/pkg/core/native/crypto_test.go @@ -30,6 +30,58 @@ func TestSha256(t *testing.T) { }) } +// TestKeccak256_Compat is a C# node compatibility test with data taken from https://github.com/Jim8y/neo/blob/560d35783e428d31e3681eaa7ee9ed00a8a50d09/tests/Neo.UnitTests/SmartContract/Native/UT_CryptoLib.cs#L340 +func TestKeccak256_Compat(t *testing.T) { + c := newCrypto() + ic := &interop.Context{VM: vm.New()} + + t.Run("good", func(t *testing.T) { + testCases := []struct { + name string + input []byte + expectedHash string + }{ + {"good", []byte{1, 0}, "628bf3596747d233f1e6533345700066bf458fa48daedaf04a7be6c392902476"}, + {"hello world", []byte("Hello, World!"), "acaf3289d7b601cbd114fb36c4d29c85bbfd5e133f14cb355c3fd8d99367964f"}, + {"keccak", []byte("Keccak"), "868c016b666c7d3698636ee1bd023f3f065621514ab61bf26f062c175fdbe7f2"}, + {"cryptography", []byte("Cryptography"), "53d49d225dd2cfe77d8c5e2112bcc9efe77bea1c7aa5e5ede5798a36e99e2d29"}, + {"testing123", []byte("Testing123"), "3f82db7b16b0818a1c6b2c6152e265f682d5ebcf497c9aad776ad38bc39cb6ca"}, + {"long string", []byte("This is a longer string for Keccak256 testing purposes."), "24115e5c2359f85f6840b42acd2f7ea47bc239583e576d766fa173bf711bdd2f"}, + {"blank string", []byte(""), "c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"}, + } + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + result := c.keccak256(ic, []stackitem.Item{stackitem.NewByteArray(tc.input)}).Value().([]byte) + outputHashHex := hex.EncodeToString(result) + require.Equal(t, tc.expectedHash, outputHashHex) + }) + } + }) + t.Run("errors", func(t *testing.T) { + errCases := []struct { + name string + item stackitem.Item + }{ + { + name: "Null item", + item: stackitem.Null{}, + }, + { + name: "not a byte array", + item: stackitem.NewArray([]stackitem.Item{stackitem.NewBool(true)}), + }, + } + + for _, tc := range errCases { + t.Run(tc.name, func(t *testing.T) { + require.Panics(t, func() { + _ = c.keccak256(ic, []stackitem.Item{tc.item}) + }, "keccak256 should panic with incorrect argument types") + }) + } + }) +} + func TestRIPEMD160(t *testing.T) { c := newCrypto() ic := &interop.Context{VM: vm.New()} diff --git a/pkg/core/native/native_test/cryptolib_test.go b/pkg/core/native/native_test/cryptolib_test.go index 8c4210810..1982f26da 100644 --- a/pkg/core/native/native_test/cryptolib_test.go +++ b/pkg/core/native/native_test/cryptolib_test.go @@ -115,6 +115,25 @@ func TestCryptolib_TestBls12381Add_Compat(t *testing.T) { hex.EncodeToString(arr[:])) } +func TestKeccak256_Compat(t *testing.T) { + c := newCryptolibClient(t) + + in := []byte("Keccak") + + expected := "868c016b666c7d3698636ee1bd023f3f065621514ab61bf26f062c175fdbe7f2" + + script := io.NewBufBinWriter() + emit.AppCall(script.BinWriter, c.Hash, "keccak256", callflag.All, in) + stack, err := c.TestInvokeScript(t, script.Bytes(), c.Signers) + + require.NoError(t, err) + require.Equal(t, 1, stack.Len()) + itm := stack.Pop().Item() + require.Equal(t, stackitem.ByteArrayT, itm.Type()) + actual := hex.EncodeToString(itm.Value().([]byte)) + require.Equal(t, expected, actual) +} + func TestCryptolib_TestBls12381Mul_Compat(t *testing.T) { c := newCryptolibClient(t) diff --git a/pkg/interop/native/crypto/crypto.go b/pkg/interop/native/crypto/crypto.go index 2d82357c0..db0c3d750 100644 --- a/pkg/interop/native/crypto/crypto.go +++ b/pkg/interop/native/crypto/crypto.go @@ -92,3 +92,9 @@ func Bls12381Mul(x Bls12381Point, mul []byte, neg bool) Bls12381Point { func Bls12381Pairing(g1, g2 Bls12381Point) Bls12381Point { return neogointernal.CallWithToken(Hash, "bls12381Pairing", int(contract.NoneFlag), g1, g2).(Bls12381Point) } + +// Keccak256 calls `keccak256` method of native CryptoLib contract and +// computes Keccak256 hash of b. +func Keccak256(b []byte) interop.Hash256 { + return neogointernal.CallWithToken(Hash, "keccak256", int(contract.NoneFlag), b).(interop.Hash256) +} diff --git a/pkg/services/rpcsrv/server_test.go b/pkg/services/rpcsrv/server_test.go index b76fed157..cf28d862c 100644 --- a/pkg/services/rpcsrv/server_test.go +++ b/pkg/services/rpcsrv/server_test.go @@ -89,7 +89,7 @@ const ( faultedTxHashLE = "82279bfe9bada282ca0f8cb8e0bb124b921af36f00c69a518320322c6f4fef60" faultedTxBlock uint32 = 23 invokescriptContractAVM = "VwIADBQBDAMOBQYMDQIODw0DDgcJAAAAAErZMCQE2zBwaEH4J+yMqiYEEUAMFA0PAwIJAAIBAwcDBAUCAQAOBgwJStkwJATbMHFpQfgn7IyqJgQSQBNA" - block20StateRootLE = "c62594479ffdfd24dfa27f862313858c0dc197cc7289aa91b78617b1d47c8d98" + block20StateRootLE = "637aac452ef781dee7ac5e898a1edf4d3c5b6420288ea5232dad620f39d2152a" ) var (