Config
The Marble Config is a block of configuration data about the Marble contract itself. It contains information like the contract name, contract version, and admin account.
The Marble Admin account has the following roles:
Role | Description |
Group Creation | Only the Admin account may create new groups. |
Version Updates | The Admin account may call the setversion() action to update the contract to a new version. |
Table Name:
config
Table Scope:
self
Field Name | Field Type | Description |
contract_name | string | Contract Name |
contract_version | string | Contract SemVer version |
admin | name | Contract Admin account |
last_serial | uint64_t | Global Serial counter |
Every Marble contract has a config table created by calling the
init()
action.Required Authority:
self
Name | Type | Example | Description |
contract_name | string | "Marble Sandbox" | The name of the Marble Contract. |
contract_version | string | "v1.0.0" | The SemVer version of the Marble Contract. |
initial_admin | name | testaccount1 | The account name of the admin. |
Cleos
Marble CLI
cleos push action {account} init '[ {params} ]' -p {account}
marble init ...
Set a new contract version number by calling the
setversion()
action.Required Authority:
admin
Name | Type | Example | Description |
new_version | string | "v1.1.0" | The new contract version in SemVer format. |
Cleos
Marble CLi
cleos push action {account} setversion '[ {params} ]' -p {account}
marble modify version ...
Set a new contract admin by calling the
setadmin()
action.Required Authority:
admin
Name | Type | Example | Description |
new_admin | name | testaccount2 | The account name to set as the new admin. |
Cleos
Marble CLI
cleos push action {account} setadmin '[ {params} ]' -p {account}
marble modify admin ...
Last modified 3yr ago