Bonds
The Bonds Layer adds functionality for backing individual items with fungible tokens that can be released at a certain time point, or when an item is consumed or destroyed.
Table Name: bonds
Table Scope: serial
Field Name | Field Type | Description |
backed_amount | asset | 5.0000 TLOS |
release_event | name | Event name containing release time (blank means no release event) |
locked | bool | Prevents changes to backing if true |
If a Bond has no release event then the Bond can only be released when the item is consumed or destroyed.
To create a new Bond call the
newbond()
action. This will draw tokens from the group manager's account balance to fund the bond.Required Auth: group.manager
Name | Type | Example | Description |
serial | uint64_t | 3 | Serial number of item. |
amount | asset | 50.0000 TLOS | Amount of tokens to back item with. |
release_event | name | releasetime | Name of event that contains release time (optional) |
cleos
Marble CLI
cleos push action ...
marble bond ...
To add to an existing Bond call the
addtobond()
action. This allows a bond to be "topped up" with additional funds. Like with newbond()
this action will draw tokens from the manager's account.Required Auth: group.manager
Name | Type | Example | Description |
serial | uint64_t | amount | Serial number of item. |
amount | asset | 5.0000 TLOS | Amount of tokens to add to bond. |
Bond that have been locked cannot be topped up.
cleos
Marble CLI
cleos push action ...
marble bond ...
The release() action can be called to release backed funds from an item if the defined release event time has been reached or exceeded.
Required Auth: contract
Name | Type | Example | Description |
serial | uint64_t | 3 | Serial number of item with Bond to release. |
Cleos
Marble CLI
cleos push action ...
marble bond ...
Bonds can be locked to prevent altering the backed amount.
Required Auth: group.manager
Name | Type | Example | Description |
serial | uint64_t | 3 | Serial number of item with bond to lock. |
Cleos
Marble CLI
cleos push action ...
marble bond ...
Last modified 3yr ago