New ram_actions to transfer ram between accounts #112
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Description
Ram Transfer
New RAM system contract action to transfer RAM from one account to another without any fees.
to
&from
usingrequire_recipient
action_return_ramtransfer
Ram Burn
New RAM system contract action to burn RAM from owner account.
eosio.null
accountaction_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
orreceiver
to confirm exact bytes sent/received via notifications.Buy Ram
action_return_buyram
Buy Ram Bytes
action_return_buyram
Buy Ram Self
action_return_buyram
Sell Ram
action_return_sellram
API Changes
require_recipient(receiver)
onbuyram
&buyrambytes
actionsACTION:
ramtransfer
from {name}
to {name}
bytes {int64}
memo {string}
ACTION:
ramburn
owner {name}
bytes {int64}
memo {string}
ACTION:
logbuyram
ACTION:
buyram
buyrambytes
buyramself
return struct
action_return_buyram
ACTION:
ramtransfer
ramburn
returns struct
action_return_ramtransfer
ACTION:
sellram
returns struct
action_return_sellram
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
ram_managed
accountsRam Burn Preconditions
ramtransfer
actionUsecases
Ram Transfer Usecases
Improves EOS account creation:
a. Create
newaccount
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 using
memo
field