Skip to content

EOS System Contracts v3.3.0 Release Notes

Compare
Choose a tag to compare
@ericpassmore ericpassmore released this 06 Mar 16:24
9ce19b3

This release contains new features.

Usecases

Ram Transfer Usecases

  1. Improves EOS account creation:
    a. Create newaccount using ramtransfer instead of buyram or buyrambytes

  2. 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 using memo field

New Ram Actions

PRs


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 using require_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) on buyram & 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 sufficient ram_bytes prior to transfer
  • from decrease ram_bytes by bytes
  • to must exists
  • to account can be a contract
  • to account can have zero available RAM bytes
  • to increase ram_bytes by bytes
  • 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