Commit graph

64 commits

Author SHA1 Message Date
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
6e9c770142 [#50] Drop notaryless deploy parameter
All checks were successful
DCO action / DCO (pull_request) Successful in 1m20s
Tests / Tests (1.20) (pull_request) Successful in 3m13s
Tests / Tests (1.19) (pull_request) Successful in 4m11s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-11-07 14:56:21 +03:00
e834a66117 [#45] balance: Fix inconsistent fee of transfer operations
All checks were successful
DCO action / DCO (pull_request) Successful in 1m58s
Tests / Tests (1.19) (pull_request) Successful in 2m5s
Tests / Tests (1.20) (pull_request) Successful in 2m5s
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2023-10-24 13:42:30 +03:00
6e8ae742ae *: Use multiline lists in yaml config
It is quite hard to navigate in a single-line list of length 10.
Viewing diffs is also more pleasant when a single line has added.
Also, sort everything by alphabet.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-08-10 17:13:07 +00: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
b9be2ac036 [#7] Refactor common.CheckAlphabetWitness()
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2023-03-14 12:09:24 +03:00
d8530284fd [#7] Remove notary disabled code
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2023-03-14 12:09:22 +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
4052e4873b [TrueCloudLab#3] balance: Rename neofs to frostfs
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
03afb80a14 [#222] *: Replace IRNode with raw public keys
Only leave `IRNode` in neofs contract because it is public.
The newly added conversion in `AlphabetList` shouldn't be a problem
because this is a read method.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-03-23 11:33:27 +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
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
27c97237cf [#184] *: Delete method prefix from runtime.Log()
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-11-30 12:14:19 +03:00
Pavel Karpy
2ee2344e5f [#184] *: Move all panics on witness checks in common
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-11-30 12:14:19 +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
a1a04f8a87 [#105] balance: Add docs and fix naming
`CreateToken` method should not be public.
Fixed notification field names in `Mint` and `Burn`.

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
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
Alex Vanin
cfecb093a0 [#75] Remove unused code
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-05-19 11:54:17 +03:00
Alex Vanin
4585f96acf [#75] Fix typos
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-05-19 11:54:17 +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
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
d8031f8f59 [#26] balance: Update safemethods field
Add "version" to `safemethods` balance contract field.

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
c6816193d3 [#51] balance: Support notary contract
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-04 11:26:14 +03:00