Commit graph

22 commits

Author SHA1 Message Date
Alex Vanin
2e2eb15729 [#88] *: Provide data in migrate method of the contracts
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-06-03 14:09:40 +03:00
Evgenii Stratonikov
db2b1be746 [#79] Panic instead of returning bool value
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>
2021-06-01 12:10:28 +03:00
Evgenii Stratonikov
dd98bee590 [#72] Replace Init() methods with _deploy
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-05-12 16:56:52 +03:00
Alex Vanin
e4ba936f50 [#74] Log notary disabled flag at init
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-05-05 12:27:24 +03:00
Alex Vanin
07617dd083 [#74] audit: Support notary disabled work flow
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-05-05 12:27:24 +03:00
Alex Vanin
622a83e014 [#74] Add notary disabled option to contracts
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-05-05 12:27:24 +03:00
Alex Vanin
6ff45edbc9 [#65] Do not use integer as a search prefix
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>
2021-04-06 10:50:00 +03:00
Alex Vanin
2f55ae715d [#58] audit: Use IR list from chain
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-25 18:19:47 +03:00
Alex Vanin
97a5e27403 [#59] Update to pre-released version of neo-go v0.94.0
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-17 11:23:11 +03:00
Pavel Karpy
8af80e67aa [#37] Use readonly context
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>
2021-03-12 10:36:15 +03:00
Pavel Karpy
8d8482a88e [#26] Add safemethods fields
Fill in `safemethods` fields in contract config files
with methods that do not change contract storages.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-03-09 19:25:47 +03:00
Alex Vanin
88c738b736 [#49] Support contract migration
At initialization contract saves master script hash
that allows to re-initialize or migrate contract.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-02-12 18:33:55 +03:00
Alex Vanin
a4a9a49a76 [#49] Remove trigger check from contracts
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>
2021-02-12 18:33:55 +03:00
Alex Vanin
9cdfcd438e [#48] Add contract names
It is required field in contract config for deployment.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-02-11 15:50:01 +03:00
Alex Vanin
cff7688486 [#47] Remove legacy config records
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-02-11 15:31:57 +03:00
Alex Vanin
fd803ef639 [#47] Update iterator interface
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-02-11 15:31:57 +03:00
Leonard Lyubich
8ceba2a7c2 [#42] Share InnerRingList function between contracts
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>
2021-02-04 10:31:24 +03:00
Leonard Lyubich
c3efe152d6 [#42] Share Vote/RemoteVotes between contracts
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>
2021-02-04 10:31:24 +03:00
Alex Vanin
e6fc97810b [#28] audit: Add version offset in AuditResult binary
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-29 14:24:52 +03:00
Alex Vanin
dbf1149f3a [#28] audit: Update audit contract
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>
2020-12-29 14:24:52 +03:00
Alex Vanin
189a83d9d6 [#23] *: Replace engine.AppCall with contract.Call 2020-12-29 14:15:26 +03:00
Alex Vanin
bf391b57dd [#18] Add sidechain contracts
Sidechain contracts include alphabet contracts for governance
and audit, balance, container, neofsid, netmap, reputation
contracts.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-27 17:33:56 +03:00