cyber.bios
smart contract is used as a link between operations, executed both directly in smart contracts and the node core.newaccount
action is used when creating new accounts in the system.creator
— new account creator.name
— the account name that is created in the system.owner
— structure of type authority
containing owner public key
for the new account.active
— structure of type authority
containing active public key
for the new account.cyber
can expanded it to the name cyber.anyname
). newaccount
action must be signed by the new account creator.setprods
is used when creating a block production schedule. This schedule contains a list of validators in accordance with their rating. This action is not accessible to a user and is called by the system. This action takes the following form:schedule
parameter is a list of validator keys.cyber
account signature is required to execute a transaction containing the setprods
action (cyber
is account of cyber.bios
smart contract).setparams
action is used to configure system parameters. This action is not accessible to a user and is called by the system. This action takes the following form:params
parameter is a structure containing settable system parameters.cyber
account signature is required to execute a transaction containing the setparams
action.reqauth
action is used to verify the user's signature in a transaction. This action takes the following form:from
parameter is the account whose signature is verified.from
account signature is required to execute a transaction containing the reqauth
operation.setabi
action is used to upload ABI-description to an account. This action takes the following form:account
— the account to which ABI-description will be downloaded.abi
— an array of bytes containing ABI-description.setcode
action is used to upload smart contract code to an account. The signature of this action is:account
— the account to which smart contract code will be downloaded.vmtype
— type of contract (type of virtual machine). In this release, the parameter is set to «0».vmversion
— version of contract (version of virtual machine). In this release, the parameter is set to «0».code
— an array of bytes containing smart contract code.onblock
action is inaccessible to a user and is called by the system each time after creation of a new block. Inside onblock
, the cyber.govern
smart contract code is called. This action takes the following form:header
parameter is a block header.checkwin
is used to register a name owner (a winner) at auction. This action has no parameters and is called implicitly.bidder
— an account which bids at the action. newname
— betting name (a name on which the bid is done).bid
— a bet on the name (a structure value specified the bid). Bets are accepted only in system tokens (CYBER).bidder
account will be announced as an owner (a winner) of newname
, if:bid
is the highest in the name newname;bid
remains the highest after 24 hours.bid
is beaten within 24 hours, it will be returned back to the bidder
(in this release, the bid is not automatically refunded; a call of bidrefund
is required to refund it). bidrefund
action is used to refund a non-winning (not the highest) bid to an auction participantbidder
parameter is an auction participant to whom the bid is returned.bidder
if the bidder
does not become a winner. The bidder should create a transaction with the bidrefund operation to refund the bid. One calling bidrefund
is enough to return all of non-winning bids in case the bidder put several bids on different names and neither of these bids (or part of them) were non-winning.canceldelay
action cancels a deferred transaction.canceling_auth
— value containing an account of the transaction creator and its permission (permission name takes the value active
).trx_id
— a deferred transaction identifier.canceling_auth
account signature is required to execute a transaction containing the canceldelay
operation.updateauth
action is used to add or change authorization for an account. This action takes the following form:account
— an account name whose authorization changes.permission
— a permission name (for example: owner, active, posting, etc.) to be changed.parent
— a name of parent permission (for example: owner
is the parent permission to active
; active
is the parent permission to posting
. Child permissions cannot exceed parental permissions). In most cases, this parameter is set to `active'. auth
— structure of the form authority
, the new values of which should match the permission
. account
signature is required to execute a transaction containing the updateauth
operation.deleteauth
is used to delete authorization of an account. This action takes the following form:account
— account name whose authorization is being deleted. permission
— permission name that is deleted. account
signature is required to execute a transaction containing the deleteauth
operation.linkauth
action allows the permission
to execute some action in a specific contract.account
— account name for which permission is changed.code
— an account name of the contract in which some action will be executed.type
— type of permission. Any action can be performed in the contract if this parameter is empty, otherwise only one operation specified in the parameter can be performed (parameter value matches the name of the action). requirement
— name of permission
, which is allowed to perform the operation. This parameter cannot be empty. account
andrequirement
specify permission_level
.
The parameters code
andtype
specify the contract account and action, respectively.Notes: Any set ofaccount
,code
, andtype
parameters must correspond to only onerequirement
value. This means that one account cannot have two or more different permissions related to the same contract's account and action.If the sameaccount
,code
andtype
values are passed to the action again, but with a differentrequirement
, its previous value will be replaced by the last passed.
account
signature is required to execute a transaction containing the linkauth
operation.unlinkauth
action removes the name of permission
provided by the linkauth
action in a specific contractaccount
— a name of the account whose permission is removed.code
— an account name of the contract in which some action was allowed to execute. type
— type of permission..account
signature is required to execute the transaction containing the unlinkauth
operation.