Commit graph

269 commits

Author SHA1 Message Date
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
Alex Vanin
5fc9ed999d [#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
bd45e50480 [#23] alphabet: Add OnPayment method
Without OnPayment method alphabet contracts won't be able
to receive NEO and produce GAS.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-29 14:15:26 +03:00
Alex Vanin
37d8905d55 [#23] neofs: Implement OnPayment method for asset deposit
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-29 14:15:26 +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
29f2f0ef17 [#23] *: Support NEP-17 in native asset transfers
Now `transfer()` requires 4 arguments.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-29 14:15:26 +03:00
Alex Vanin
806dbbb487 [#23] *: Update notification types
- rename ByteString to ByteArray type
- use Hash256 on transaction hashes

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
e17d0f4d97 [#23] Update neo-go version
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-29 14:15:26 +03:00
Alex Vanin
62448ecdd6 [#29] container: Return all available containers in List(nil)
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-29 14:13:14 +03:00
Alex Vanin
6abe334676 [#33] netmap: Do not save ballots for invalid epoch
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-25 14:49:12 +03:00
Alex Vanin
76f5943c14 [#24] neofs: Fix for iterator on updated inner ring list
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-14 10:59:49 +03:00
Alex Vanin
a8d55d9166 [#19] alphabet: Check epoch value in Vote method
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-09 10:50:45 +03:00
Alex Vanin
24b7bc5c77 [#19] alphabet: Add signature collection in Vote method
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-09 10:50:45 +03:00
Alex Vanin
2a509ebbee [#19] alphabet: Add log on voting
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-09 10:50:45 +03:00
Alex Vanin
f8190f7a91 [#19] alphabet: Add vote method
Alphabet contracts are holders of NEO token in sidechain.
Inner ring nodes control sidechain validators list through
voting of alphabet contracts.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-09 10:50:45 +03:00
Alex Vanin
72574e56eb [#18] Update README file
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-27 17:33:56 +03:00
Alex Vanin
a0d897d173 [#18] Update Makefile
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-27 17:33:56 +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
Alex Vanin
dab74aeec7 [#18] Ignore contracts config.json files
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-27 17:33:56 +03:00
Alex Vanin
df27e859c9 [#18] Move neofs contract to separate dir
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-27 17:33:56 +03:00
Alex Vanin
6a881a2baa Set max amount for Withdraw and Deposit methods
These methods initiate `transfer` call on internal
balance method that have Fixed12 precision. With this
limit it will not overflow JSON integer bound 2**53-1

Actual limit is 9007, but it was floored.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-26 18:26:04 +03:00
Alex Vanin
332e1ceca9 [#16] Verify initial inner ring size and keys
closes #16

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-17 19:09:50 +03:00
Alex Vanin
33802137ee [#15] Specify type of interface typed arguments
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-08-28 09:55:02 +03:00
Alex Vanin
47eb73ad67 [#15] Update native gas script hash
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-08-28 09:55:02 +03:00
Alex Vanin
ff83e7fe78 [#15] Fix AppCall invocations
There is no need in single array for all arguments now.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-08-28 09:55:02 +03:00
Alex Vanin
a2479a3ade [#15] Add notifications list in config
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-08-28 09:55:02 +03:00
Alex Vanin
9041bb77d4 [#15] Update inline docs
Since all contract methods have separated function,
method descriptions were moved from global comment
section to the function definitions (go-way).

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-08-28 09:55:02 +03:00
Alex Vanin
d75c11c897 [#15] Check amount value in withdraw method
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-08-28 09:55:02 +03:00
Alex Vanin
7a275a3c4b [#15] Refactor contract body for neo-go v0.91
In neo-go v0.91.0 manifest file should contain info
about all contract methods. To do that neo-go compiler
uses public function defined in contract file. This
commit splits entire Main function into smaller
independent contract methods.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-08-28 09:55:02 +03:00
Alex Vanin
da3c75465b [#15] Update neo-go to v0.91.0
Neo-go v0.91.0 supports neo3-preview-3.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-08-28 09:55:02 +03:00
alexvanin
751daf328b Merge branch 'release/0.2.0' 2020-07-23 21:14:35 +03:00
Alex Vanin
5c2d82a0b6
Merge pull request #14 from nspcc-dev/neo3/docs
Remove unused functions and update docs
2020-07-21 18:23:16 +03:00
alexvanin
8460ab01e4 Remove tests and update readme file 2020-07-21 12:42:14 +03:00
alexvanin
013a70f3bf Remove unused functions and fix lint errors 2020-07-21 12:42:14 +03:00
Alex Vanin
1cfbd19e9e
Merge pull request #13 from nspcc-dev/neo3/config
Add neofs install configuration
2020-07-21 12:40:38 +03:00
alexvanin
8c7bcea436 Add system config methods
NeoFS contract will contain installation parameters
for storage network such as max object size, epoch
duration, etc.
2020-07-21 12:39:22 +03:00
Alex Vanin
058e39dcf1
Merge pull request #12 from nspcc-dev/neo3/ir-candidates
Update inner ring candidate methods
2020-07-20 14:49:26 +03:00
alexvanin
7a806bd550 Update "InnerRingUpdate" method 2020-07-16 17:54:06 +03:00
alexvanin
abdbe6b9dc Update methods for inner ring candidate managing
This commit:
- increases default candidate fee,
- adds function to list inner ring candidates,
- updates add and remove candidate methods.
2020-07-16 15:09:54 +03:00
Alex Vanin
f5d2e96063
Merge pull request #11 from nspcc-dev/neo3/bind
Add "Bind" and "Unbind" methods
2020-07-16 14:11:49 +03:00
alexvanin
8ef70e70d7 Add "Bind" and "Unbind" methods
New methods allow to bind and unbind public keys
with the owner, therefore the user can store and
access data with the key, that does not related
to the wallet.
2020-07-16 12:50:24 +03:00
Alex Vanin
f33622d155
Merge pull request #10 from nspcc-dev/neo3/init-deposit-withdraw
Update Deploy, Deposit, Withdraw and Cheque methods
2020-07-16 12:33:43 +03:00
alexvanin
6797c7c1a7 Update "Cheque" method 2020-07-16 10:49:41 +03:00
alexvanin
62d5d863f4 Rename "Deploy" method to "Init"
There was a bit of confusion between contract deploying
and calling "Deploy" method. Also new "Init" method
uses generic setter to initialize contract storage.
2020-07-15 20:00:05 +03:00
alexvanin
209740f060 Use generic setter and type defined getters
With NEO3.0 there is a null pointers in VM, so we
can use it to check if value was stored in cotnract
storage or not.
2020-07-15 19:58:31 +03:00
alexvanin
2f86e8f5d0 Rename check structure to cheque
Cheque is widely used in neofs as a definition
of structure that connected with configuration
changing or asset withdraw. This name is used
to avoid confusion with 'check' with
verification meaning.
2020-07-15 19:57:14 +03:00
alexvanin
bf8b6f91d7 Fix withdraw log message 2020-07-15 19:55:10 +03:00
alexvanin
ca54f71d30 Update "Deposit" method
Deposit method now takes script hashes instead of public keys and
uses native gas token.
2020-07-15 19:02:40 +03:00