Commit graph

21 commits

Author SHA1 Message Date
Alex Vanin
6e8bef671a [#74] balance: 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
f884e3d665 [#68] Use unified format for transferX details
Unified format uses transfer type as the first byte
and extra details next. List of transfer types used in
contracts defined in `transfer.go`. It includes:
- mint,
- burn,
- lock,
- unlock,
- container fee.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-04-08 17:04:31 +03:00
Alex Vanin
aa77253d6f [#58] balance: Use alphabet list from chain
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-25 18:19:47 +03:00
Alex Vanin
a1f0919f98 [#61] container: Unify naming for new epoch processing functions
The same name is in network map and balance contracts.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-19 15:04: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
508369be75 [#25] Use go aliases
Change []byte type to interop.*aliasName*
types in contracts where it is suitable to
improve the readability of the contracts.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-03-05 17:13:49 +03:00
Alex Vanin
c6816193d3 [#51] balance: Support notary contract
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-04 11:26:14 +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
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
3395a886fc [#42] Share InnerRingInvoker function between contracts
Define IRNode structure in common package. Replace innerRingInvoker function
in common package and export it. Reuse this function in all contracts.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-02-04 10:31:24 +03:00
Leonard Lyubich
dd0768aaeb [#42] Share InvokeID between contracts
Replace invokeID to common package and export it.

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
Leonard Lyubich
f9f2a03078 [#42] Share ballot structure between contracts
Create common package. Define Ballot struct in common package. Use new type
in all contracts with ballots.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-02-04 10:31:24 +03:00
Alex Vanin
e87765b733 [#44] Fix processing order in voting
Remove old ballots first so there won't be any
interference with votes of the same tx in the
future after `blockDiff` blocks.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-02-02 19:02:56 +03:00
Alex Vanin
3875003b2e [#23] balance: Support NEP-17
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-29 14:15:26 +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