Commit graph

19 commits

Author SHA1 Message Date
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
5015372135 [#58] alphabet: Use alphabet and IR lists from chain
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-25 18:19:47 +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
299c888266 [#51] alphabet: 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
59d11af046 [#49] Revert "Do not read context in init with OnNEP17Payment"
This reverts commit 76c63b7d

It was workaround for neo-go#1725 but now it is fixed
so we don't need that anymore.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-02-12 18:33:55 +03:00
Alex Vanin
79e42fc31b [#47] Use native GAS and NEO contract wrappers
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-02-11 15:31:57 +03:00
Alex Vanin
76c63b7d5c [#47] Do not read context in init with OnNEP17Payment
There is an issue with native contract callback functions
and getting storage context: nspcc-dev/neo-go#1725.

This should fix it for now.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-02-11 15:31:57 +03:00
Alex Vanin
8abdf796f3 [#47] Update native contract hashes
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-02-11 15:31:57 +03:00
Alex Vanin
27ca675869 [#47] Update contract.Call invocations
Now contract calls require call flags.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-02-11 15:31:57 +03:00
Alex Vanin
75c696a555 [#47] Rename onPayment to onNEP17Payment
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
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
c6fd4dc77c [#23] *: Update script hashes of native contracts
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-29 14:15:26 +03:00
Alex Vanin
1dcfb59a1f [#23] alphabet: Use single contract instead of template
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-29 14:15:26 +03:00
Renamed from alphabet/dobro/dobro_contract.go (Browse further)