arisen.bios

bios

Type: class

The arisen.bios is the first sample of system contract provided by block.one through the ARISEN platform. It is a minimalist system contract because it only supplies the actions that are absolutely critical to bootstrap a chain and nothing more. This allows for a chain agnostic approach to bootstrapping a chain.

Just like in the arisen.system sample contract implementation, there are a few actions which are not implemented at the contract level (newaccount, updateauth, deleteauth, linkauth, unlinkauth, canceldelay, onerror, setabi, setcode), they are just declared in the contract so they will show in the contract's ABI and users will be able to push those actions to the chain via the account holding the arisen.system contract, but the implementation is at the ARISEN core level. They are referred to as ARISEN native actions.

newaccount

Type: void

New account action, called after a new account is created. This code enforces resource-limits rules for new accounts as well as new account naming conventions.

1.accounts cannot contain '.' symbols which forces all acccounts to be 12 characters long without '.' until a future account auction process is implemented which prevents name squatting.

2.new accounts must stake a minimal number of tokens (as set in system parameters) therefore, this method will execute an inline buyram from receiver for newacnt in an amount equal to the current new account creation fee.

updateauth

Type: void

Update authorization action updates pemission for an account.

Parameter Name

Description

account

  • the account for which the permission is updated,

pemission

  • the permission name which is updated,

parem

  • the permission name which is updated,

aut

  • the json describing the permission authorization.

deleteauth

Type: void

Delete authorization action deletes the authorization for an account's permission.

Parameter Name

Description

account

  • the account for which the permission authorization is deleted,

permission

  • the permission name been deleted.

linkauth

Link authorization action assigns a specific action from a contract to a permission you have created. Five system actions can not be linked updateauth, deleteauth, linkauth, unlinkauth, and canceldelay. This is useful because when doing authorization checks, the ARISEN based blockchain starts with the action needed to be authorized (and the contract belonging to), and looks up which permission is needed to pass authorization validation. If a link is set, that permission is used for authoraization validation otherwise then active is the default, with the exception of arisen.any. arisen.any is an implicit permission which exists on every account; you can link actions to arisen.any and that will make it so linked actions are accessible to any permissions defined for the account.

canceldelay

Parameter Name

Description

canceling_auth

  • the permission that authorizes this action,

trx_id

  • the deferred transaction id to be cancelled.

setcode

Type: void

Set code action sets the contract code for an account.

Parameter Name

Description

account

  • the account for which to set the contract code.

vmtype

  • reserved, set it to zero.

vmversion

  • reserved, set it to zero.

code

  • the code content to be set, in the form of a blob binary
..

setprods

Set producers action, sets a new list of active producers, by proposing a schedule change, once the block that contains the proposal becomes irreversible, the schedule is promoted to "pending" automatically. Once the block that promotes the schedule is irreversible, the schedule will become "active".

Parameter Name

Description

schedule

  • New list of active producers to set

activate

Type: void

Activate action, activates a protocol feature

Parameter Name

Description

feature_digest

  • hash of the protocol feature to activate.

reqactivated

Type: void

Require activated action, asserts that a protocol feature has been activated

Parameter Name

Description

feature_digest

  • hash of the protocol feature to check for activation.