2021-07-16 06:03:34 +00:00
|
|
|
/*
|
2023-01-09 11:22:59 +00:00
|
|
|
FrostFS contract is a contract deployed in FrostFS mainchain.
|
2021-07-16 06:03:34 +00:00
|
|
|
|
2023-01-09 11:22:59 +00:00
|
|
|
FrostFS contract is an entry point to FrostFS users. This contract stores all FrostFS
|
2021-07-16 06:03:34 +00:00
|
|
|
related GAS, registers new Inner Ring candidates and produces notifications
|
2022-04-14 11:56:51 +00:00
|
|
|
to control the sidechain.
|
2021-07-16 06:03:34 +00:00
|
|
|
|
2022-04-14 11:56:51 +00:00
|
|
|
While mainchain committee controls the list of Alphabet nodes in native
|
2023-01-09 11:22:59 +00:00
|
|
|
RoleManagement contract, FrostFS can't change more than 1\3 keys at a time.
|
|
|
|
FrostFS contract contains the actual list of Alphabet nodes in the sidechain.
|
2021-07-16 06:03:34 +00:00
|
|
|
|
2023-01-09 11:22:59 +00:00
|
|
|
Network configuration is also stored in FrostFS contract. All changes in
|
2022-04-14 11:56:51 +00:00
|
|
|
configuration are mirrored in the sidechain with notifications.
|
2021-07-16 06:03:34 +00:00
|
|
|
|
2022-12-12 19:59:13 +00:00
|
|
|
# Contract notifications
|
2021-07-16 06:03:34 +00:00
|
|
|
|
|
|
|
Deposit notification. This notification is produced when user transfers native
|
2023-01-09 11:22:59 +00:00
|
|
|
GAS to the FrostFS contract address. The same amount of FROSTFS token will be
|
2022-04-14 11:56:51 +00:00
|
|
|
minted in Balance contract in the sidechain.
|
2021-07-16 06:03:34 +00:00
|
|
|
|
2022-12-12 19:59:13 +00:00
|
|
|
Deposit:
|
|
|
|
- name: from
|
|
|
|
type: Hash160
|
|
|
|
- name: amount
|
|
|
|
type: Integer
|
|
|
|
- name: receiver
|
|
|
|
type: Hash160
|
|
|
|
- name: txHash
|
|
|
|
type: Hash256
|
2021-07-16 06:03:34 +00:00
|
|
|
|
2022-04-14 11:56:51 +00:00
|
|
|
Withdraw notification. This notification is produced when a user wants to
|
2023-01-09 11:22:59 +00:00
|
|
|
withdraw GAS from the internal FrostFS balance and has paid fee for that.
|
2021-07-16 06:03:34 +00:00
|
|
|
|
2022-12-12 19:59:13 +00:00
|
|
|
Withdraw:
|
|
|
|
- name: user
|
|
|
|
type: Hash160
|
|
|
|
- name: amount
|
|
|
|
type: Integer
|
|
|
|
- name: txHash
|
|
|
|
type: Hash256
|
2021-07-16 06:03:34 +00:00
|
|
|
|
2023-01-09 11:22:59 +00:00
|
|
|
Cheque notification. This notification is produced when FrostFS contract
|
2022-04-14 11:56:51 +00:00
|
|
|
has successfully transferred assets back to the user after withdraw.
|
2021-07-16 06:03:34 +00:00
|
|
|
|
2022-12-12 19:59:13 +00:00
|
|
|
Cheque:
|
|
|
|
- name: id
|
|
|
|
type: ByteArray
|
|
|
|
- name: user
|
|
|
|
type: Hash160
|
|
|
|
- name: amount
|
|
|
|
type: Integer
|
|
|
|
- name: lockAccount
|
|
|
|
type: ByteArray
|
2021-07-16 06:03:34 +00:00
|
|
|
|
2022-04-14 11:56:51 +00:00
|
|
|
Bind notification. This notification is produced when a user wants to bind
|
|
|
|
public keys with the user account (OwnerID). Keys argument is an array of ByteArray.
|
2021-07-16 06:03:34 +00:00
|
|
|
|
2022-12-12 19:59:13 +00:00
|
|
|
Bind:
|
|
|
|
- name: user
|
|
|
|
type: ByteArray
|
|
|
|
- name: keys
|
|
|
|
type: Array
|
2021-07-16 06:03:34 +00:00
|
|
|
|
2022-04-14 11:56:51 +00:00
|
|
|
Unbind notification. This notification is produced when a user wants to unbind
|
|
|
|
public keys with the user account (OwnerID). Keys argument is an array of ByteArray.
|
2021-07-16 06:03:34 +00:00
|
|
|
|
2022-12-12 19:59:13 +00:00
|
|
|
Unbind:
|
|
|
|
- name: user
|
|
|
|
type: ByteArray
|
|
|
|
- name: keys
|
|
|
|
type: Array
|
2021-07-16 06:03:34 +00:00
|
|
|
|
|
|
|
AlphabetUpdate notification. This notification is produced when Alphabet nodes
|
2022-04-14 11:56:51 +00:00
|
|
|
have updated their lists in the contract. Alphabet argument is an array of ByteArray. It
|
2021-07-16 06:03:34 +00:00
|
|
|
contains public keys of new alphabet nodes.
|
|
|
|
|
2022-12-12 19:59:13 +00:00
|
|
|
AlphabetUpdate:
|
|
|
|
- name: id
|
|
|
|
type: ByteArray
|
|
|
|
- name: alphabet
|
|
|
|
type: Array
|
2021-07-16 06:03:34 +00:00
|
|
|
|
|
|
|
SetConfig notification. This notification is produced when Alphabet nodes update
|
2023-01-09 11:22:59 +00:00
|
|
|
FrostFS network configuration value.
|
2021-07-16 06:03:34 +00:00
|
|
|
|
2022-12-12 19:59:13 +00:00
|
|
|
SetConfig
|
|
|
|
- name: id
|
|
|
|
type: ByteArray
|
|
|
|
- name: key
|
|
|
|
type: ByteArray
|
|
|
|
- name: value
|
|
|
|
type: ByteArray
|
2021-07-16 06:03:34 +00:00
|
|
|
*/
|
2023-01-09 11:22:59 +00:00
|
|
|
package frostfs
|