Add `// V2 format` comment to V2 specific code
in contracts. In `subnet` contract change comment
to sync with other.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Contract owner entity does exist anymore. Contract migration
now managed by side chain committee which are Alphabet nodes of
the Inner Ring.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Neo Legacy used migration mechanism to update contracts.
N3 provides update method in native management contract.
Therefore, it makes sense to rename `Migrate` to `Update`.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
As soon as migration required changes in memory, we
need bigger scope. Otherwise in requires two step migration
which is unpleasant and annoying.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
There is a number of contracts which return only `true` value.
Also handling `FAULT` on the client is easier then also checking return
value.
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
Even though it is allowed to do so, it can produce
invalid search results if key is less than 10 bytes.
More at https://github.com/nspcc-dev/neo-go/issues/1873
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Delete initializing of R/W context in `init()`
and start using readonly storage context in
methods where it is possible.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Fill in `safemethods` fields in contract config files
with methods that do not change contract storages.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This check was useful when there was a single
entry point in contract. But right now there is
no point in this.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Define InnerRingList function that calls "innerRingList" method of
particular smart contract. Define InnerRingListViaStorage function
that reads address of smart contract from the storage by key, and
calls InnerRingList with the result. Reuse these functions in all
contracts.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Replace vote/remoteVotes functions from all contracts (except alphabet) to
common package. Additionally replace setSerialized and bytesEqual. Create
InitVote function and use it in NeoFS and Netmap contracts.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
In updated audit scheme, contract stores marshalled audit
result structure and provides interface to list them by
epoch, container or exact audit executor.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Sidechain contracts include alphabet contracts for governance
and audit, balance, container, neofsid, netmap, reputation
contracts.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>