EOS System Contracts v3.3.0 Release Notes
This release contains new features.
Usecases
Ram Transfer Usecases
-
Improves EOS account creation:
a. Createnewaccount
usingramtransfer
instead ofbuyram
orbuyrambytes
-
Improves RAM token wrapper development:
a. Receive RAM without buy/sell actions (no fees to transferring RAM)
b. Existing RAM supply can be transferred to existing RAM token wrappers
c. DeFi composability usingmemo
field
New Ram Actions
Ram Transfer
New RAM system contract action to transfer RAM from one account to another without any fees.
- Charges 0% fee to transfer
- Only uncommited RAM can be transferred
- Notify
to
&from
usingrequire_recipient
- Memo cannot exceed 256 bytes
- returns struct
action_return_ramtransfer
Ram Burn
New RAM system contract action to burn RAM from owner account.
- Burned RAM is transferred to
eosio.null
account - Should have no impact on RAM Bancor market, RAM supply should remain unchanged
- returns struct
action_return_ramtransfer
Ram Logging
Add buy RAM logging by including additional inline actions and notifications via the use of require_recipient
.
bytes
& quant
are computed values based on Bancor algorithm market.
This allows payer
or receiver
to confirm exact bytes sent/received via notifications.
Buy Ram
- returns struct
action_return_buyram
Buy Ram Bytes
- returns struct
action_return_buyram
Buy Ram Self
- returns struct
action_return_buyram
Sell Ram
- returns struct
action_return_sellram
API Changes
- Add
require_recipient(receiver)
onbuyram
&buyrambytes
actions
ACTION: ramtransfer
from {name}
to {name}
bytes {int64}
memo {string}
ACTION: ramburn
owner {name}
bytes {int64}
memo {string}
ACTION: logbuyram
/**
* Logging for buyram & buyrambytes action
*
* @param payer - the ram buyer,
* @param receiver - the ram receiver,
* @param quantity - the quantity of tokens to buy ram with.
* @param bytes - the quantity of ram to buy specified in bytes.
* @param ram_bytes - the ram bytes held by receiver after the action.
*/
[[eosio::action]]
void logbuyram( const name& payer, const name& receiver, const asset& quantity, int64_t bytes, int64_t ram_bytes );
ACTION: buyram
buyrambytes
buyramself
return struct action_return_buyram
"name": "action_return_buyram",
"base": "",
"fields": [
{
"name": "payer",
"type": "name"
},
{
"name": "receiver",
"type": "name"
},
{
"name": "quantity",
"type": "asset"
},
{
"name": "bytes_purchased",
"type": "int64"
},
{
"name": "ram_bytes",
"type": "int64"
}
]
ACTION: ramtransfer
ramburn
returns struct action_return_ramtransfer
"name": "action_return_ramtransfer",
"base": "",
"fields": [
{
"name": "from",
"type": "name"
},
{
"name": "to",
"type": "name"
},
{
"name": "bytes",
"type": "int64"
},
{
"name": "from_ram_bytes",
"type": "int64"
},
{
"name": "to_ram_bytes",
"type": "int64"
}
]
ACTION: sellram
returns struct action_return_sellram
"name": "action_return_sellram",
"base": "",
"fields": [
{
"name": "account",
"type": "name"
},
{
"name": "quantity",
"type": "asset"
},
{
"name": "bytes_sold",
"type": "int64"
},
{
"name": "ram_bytes",
"type": "int64"
}
]
Preconditions
Ram Transfer Preconditions
from
must have sufficientram_bytes
prior to transferfrom
decreaseram_bytes
bybytes
to
must existsto
account can be a contractto
account can have zero available RAM bytesto
increaseram_bytes
bybytes
- handle
ram_managed
accounts
Ram Burn Preconditions
- Same conditions as
ramtransfer
action
Further details on changes since last release
Special thanks to the contributors that worked on this release:
Full list of changes since last release
PRs
Set version to rc1 for release of ram_actions by ericpassmore in #114
Bump release to next version v3.3.0-dev by ericpassmore in #94
New ram_actions
functions by DenisCarriere in #112
Full Changelog: v3.2.0...v3.3.0