Commit graph

41 commits

Author SHA1 Message Date
074a241272 [#74] proxy: Allow to own NNS domains
All checks were successful
DCO action / DCO (pull_request) Successful in 1m15s
Tests / Tests (1.19) (pull_request) Successful in 1m38s
Tests / Tests (1.20) (pull_request) Successful in 1m37s
Because `Verify` is flexible enough, any funds transferred to the proxy
contract can be moved out with the help of the committee. Thus,
implementing onNEP11Payment() is enough.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-01-29 14:03:06 +03:00
23e85d11c4 [#53] proxy: Allow using proxy by trusted accounts
All checks were successful
Tests / Tests (1.19) (pull_request) Successful in 1m27s
DCO action / DCO (pull_request) Successful in 1m36s
Tests / Tests (1.20) (pull_request) Successful in 1m26s
It was reverted because `Verify` with arguments was not well supported
by the client software. Thanks to recent `System.Runtime.CurrentSigners`
call from neo-go v0.104.0 we can take the best of both worlds.

Verify with argument still looks better (less overhead), but this
implementation should work too. Sadly, `overloads` are not of much use
here because verification routines take the _first_ method from the
manifest, albeit with arbitrary number of arguments.

This reverts commit a0b73150c6 with some
changes on-top.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-12-15 14:34:26 +03:00
a0b73150c6 Revert "[#53] proxy: Allow using proxy by trusted accounts"
Some checks failed
DCO action / DCO (pull_request) Failing after 1m2s
Tests / Tests (1.19) (pull_request) Successful in 1m32s
Tests / Tests (1.20) (pull_request) Successful in 1m32s
This reverts commit bc3186575f.
2023-12-08 11:10:00 +03:00
bc3186575f [#53] proxy: Allow using proxy by trusted accounts
All checks were successful
DCO action / DCO (pull_request) Successful in 1m4s
Tests / Tests (1.20) (pull_request) Successful in 1m25s
Tests / Tests (1.19) (pull_request) Successful in 1m30s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-12-07 10:22:47 +03:00
d890a7eba4 [#50] Replace interface{} with any
All checks were successful
DCO action / DCO (pull_request) Successful in 1m6s
Tests / Tests (1.19) (pull_request) Successful in 1m17s
Tests / Tests (1.20) (pull_request) Successful in 1m12s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-11-07 15:18:48 +03:00
dacac0b53d [#50] Makefile: Add code formatting targets
All checks were successful
Tests / Tests (1.19) (pull_request) Successful in 2m48s
DCO action / DCO (pull_request) Successful in 2m53s
Tests / Tests (1.20) (pull_request) Successful in 2m52s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-11-07 15:00:05 +03:00
bcf22c50a1 [#10] Use UpdateWithData call wrapper in Update methods
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2023-06-19 11:17:51 +03:00
a8029c71cd [#21] Document contract storage schemes
Signed-off-by: Airat Arifullin a.arifullin@yadro.com
2023-05-12 14:51:21 +03:00
d626660c1a [#12] Use non-specific contract names
Allows easier project name updates in the future.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2023-03-09 19:56:33 +00:00
19a8ef2d02 Rename package name
Due to source code relocation from GitHub.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2023-03-07 14:06:21 +03:00
4077921794 [TrueCloudLab#3] *: Use frostfs in docs
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-01-11 17:19:35 +03:00
Evgenii Stratonikov
6c805c1b4e Move from nspcc-dev to TrueCloudLab
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
2022-12-13 11:12:48 +03:00
Evgenii Stratonikov
8ca71d22b2 *: goimports -w
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
2022-12-13 11:12:48 +03:00
Elizaveta Chichindaeva
335b04d9a6 [#240] English Check
Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
2022-04-26 23:22:06 +03:00
Evgenii Stratonikov
b0872bb54c *: remove update migration code
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-02-07 17:49:07 +03:00
Evgenii Stratonikov
74cc2d0aea [#204] *: check contract version during update
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-01-11 11:55:04 +03:00
Evgenii Stratonikov
1944a4332b [#202] *: remove owner from contract storage
It is no longer used and should've be removed on update.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-12-28 13:32:28 +03:00
Evgenii Stratonikov
c1adea2484 [#205] proxy: do not store netmap hash
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-12-27 14:24:32 +03:00
Pavel Karpy
a2f5f7a74a [#184] *: Change panic to Log+ABORT in OnNEP17Payment
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-12-02 13:09:50 +03:00
Pavel Karpy
23d9799e51 [#185] *: Use neo-go's interop constants instead of local
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-12-02 13:09:50 +03:00
Pavel Karpy
f78a0e32b8 [#185] *: Cast args of _deploy method to struct
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-12-02 13:09:50 +03:00
Pavel Karpy
ac89694eeb [#184] *: Remove method prefix in panic messages
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-11-30 12:14:19 +03:00
Evgenii Stratonikov
da7f7eb88f [#164] *: provide version as the last argument
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-11-19 13:38:15 +03:00
Alex Vanin
6d0c5d110c [#107] Remove contract owner argument at contract deploy
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>
2021-09-22 11:06:48 +03:00
Alex Vanin
edd4864e39 [#130] Panic at contract update failures
There is no practical cases not to panic at contract
update routine.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-09-22 09:54:52 +03:00
Alex Vanin
b555e200f4 [#128] Rename migrate methods to update
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>
2021-09-21 12:28:35 +03:00
Alex Vanin
8bd25230fa [#118] *: Encode semver in version number
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-07-29 15:01:50 +03:00
Alex Vanin
18cc26f8c4 [#105] proxy: Add docs
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-07-22 14:59:05 +03:00
Alex Vanin
b6b3f17cd1 [#105] *: Add doc.go files for each contract
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-07-22 14:59:05 +03:00
Alex Vanin
8b7d08cb08 [#105] *: Remove contract from package names
`contract` postfix is redundant and makes autogenerated
docs looks ugly.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-07-22 14:59:05 +03:00
Alex Vanin
af21f33657 [#100] *: Use full scope in migration
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>
2021-07-01 14:13:36 +03:00
Alex Vanin
01b12bcd56 [#96] *: Specify permissions in contract manifests
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-06-24 16:16:02 +03:00
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
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
b387171187 [#74] proxy: Fix typo
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-05-05 12:27:24 +03:00
Alex Vanin
24fe1573c1 [#58] proxy: Use alphabet list from chain
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-25 18:19:47 +03:00
Alex Vanin
7ba5d50fd4 [#59] proxy: Check committee address in Verify function
For committee operations in side chain we can't use 5\7 multi
address, instead we should use 4\7 for this case.

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
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
7fbf6d73b0 [#51] proxy: Add proxy contract
Proxy contract used by notary contract as a main tx
payment provider. `Verify` function verifies if
main tx contains multisig of 5\7 inner ring
nodes. If so, then contract pays for transaction.
This is easier than support multisig wallet with
GAS assets, because inner ring can change, therefore
multisig wallet can change periodically.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-04 11:26:14 +03:00