No description
Find a file
2026-09-24 18:29:26 +03:00
.github go.mod: update to Go 1.26 min, use it for tests 2026-08-26 12:39:04 +03:00
cmd/dump audit: drop this contract 2025-07-08 17:53:01 +03:00
common common: bump version to 0.27.0 2026-09-24 16:57:22 +03:00
contracts common: bump version to 0.27.0 2026-09-24 16:57:22 +03:00
debian audit: drop this contract 2025-07-08 17:53:01 +03:00
deploy deploy: use errors.AsType instead of errors.As 2026-08-26 12:42:37 +03:00
docs audit: drop this contract 2025-07-08 17:53:01 +03:00
internal container: Support NEP-11 2025-11-26 14:58:05 +03:00
rpc container: drop methods deprecated since v0.22.0 released 2026-09-18 17:20:42 +03:00
scripts build(deps): bump google.golang.org/grpc in /scripts/compare-deposits 2026-09-09 00:42:18 +00:00
testdata testdata: update migration dumps 2026-02-18 18:26:14 +03:00
tests container: set container default revision to 1 2026-09-24 16:47:47 +03:00
.gitignore Makefile: add lint target for local linting 2024-09-10 16:21:43 +03:00
CHANGELOG.md CHANGELOG: release 0.27.0 2026-09-24 16:57:23 +03:00
go.mod build(deps): bump google.golang.org/grpc from 1.83.1 to 1.83.2 2026-09-09 01:56:33 +00:00
go.sum build(deps): bump google.golang.org/grpc from 1.83.1 to 1.83.2 2026-09-09 01:56:33 +00:00
LICENSE LICENSE: fix pkg.go.dev compatibility, fix #424 2024-08-01 17:55:40 +03:00
LICENSE-APACHE LICENSE: rename Apache license file 2024-06-14 12:39:14 +03:00
LICENSE.2.md LICENSE: fix pkg.go.dev compatibility, fix #424 2024-08-01 17:55:40 +03:00
Makefile *: upgrade to NeoGo 0.123.0 (and SDK RC22) 2026-09-04 13:13:26 +03:00
README.md audit: drop this contract 2025-07-08 17:53:01 +03:00
VERSION CHANGELOG: release 0.27.0 2026-09-24 16:57:23 +03:00

NeoFS

NeoFS related smart contracts.


codecov GithubWorkflows Tests Report GitHub release (latest SemVer) License

Overview

neofs-contract contains all NeoFS-related contracts written for neo-go compiler. There are contracts both for the main and FS chains.

Main chain (mainnet) contracts:

  • neofs
  • processing

FS chain contracts:

  • alphabet
  • balance
  • container
  • netmap
  • nns
  • proxy
  • reputation

Getting started

Compilation

To build and compile smart contract, run make all command. Compiled contracts contract.nef and manifest manifest.json files are placed in the corresponding directories. Generated RPC binding files rpcbinding.go are placed in the corresponding rpc directories.

$ make all
/home/user/go/bin/cli contract compile -i contracts/alphabet -c contracts/alphabet/config.yml -m contracts/alphabet/manifest.json -o contracts/alphabet/contract.nef --bindings contracts/alphabet/bindings_config.yml
mkdir -p rpc/alphabet
/home/user/go/bin/cli contract generate-rpcwrapper -o rpc/alphabet/rpcbinding.go -m contracts/alphabet/manifest.json --config contracts/alphabet/bindings_config.yml
...

You can specify path to the neo-go binary with NEOGO environment variable:

$ NEOGO=/home/user/neo-go/bin/neo-go make all

Remove compiled files with make clean command.

Building Debian package

To build Debian package containing compiled contracts, run make debpackage command. Package will install compiled contracts contract.nef and manifest manifest.json with corresponding directories to /var/lib/neofs/contract for further usage. It will download and build neo-go, if needed.

To clean package-related files, use make debclean.

Testing

Smartcontract tests reside in tests/ directory. To execute test suite after applying changes, simply run make test.

$ make test
ok      github.com/nspcc-dev/neofs-contract/tests       0.462s

Comparing contracts content of NeoFS chains

scripts directory contains CLI utilities to compare some of the NeoFS contract contents between two RPC nodes:

  • compare-fscontent performs comparison of container blobs and NetMap contract entries.
  • compare-deposits performs comparison of mainnet deposits and FS chain balance mints.

License

Contracts are licensed under the GPLv3 license, bindings and other integration code is provided under the Apache 2.0 license - see LICENSE.md for details.