-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Buy RAM for self buyramself
ACTION
#105
Labels
Comments
Adding a return value to indicate the amount of RAM purchased (which is very useful when using the I think we talked about that for the modifications to |
/**
* The buyramself action is designed to enhance the permission security by allowing an account to purchase RAM exclusively for itself.
* This action prevents the potential risk associated with standard actions like buyram and buyrambytes,
* which can transfer EOS tokens out of the account, acting as a proxy for eosio.token::transfer.
*
* @param account - the ram buyer and receiver,
* @param quantity - the quantity of tokens to buy ram with.
*/
[[eosio::action]]
void buyramself( const name& account, const asset& quantity ); |
DenisCarriere
added a commit
to AntelopeIO/reference-contracts
that referenced
this issue
Jan 25, 2024
closed with PR |
ericpassmore
pushed a commit
that referenced
this issue
Aug 9, 2024
use `antelope-spring-dev.deb` instead of `spring-dev.deb`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Purpose
Create
buyramself
ACTION where you can’tbuyram
for someone else.Allows a smart contract to
linkauth
permission tobuyramself
thus preventing sending RAM outside of the custody of the smart contract or personal account, it would only be able to purchase RAM for itself.buyram
andbuyrambytes
can be a risk for contracts since it allows to transfer EOS outside of the account, essentially acting as a proxy foreosio.token::transfer
.Feedback provided by
buyramself
ACTIONPreconditions
require_auth(owner)
quantity
orbytes
bytes
is provided, internally usebuyrambytes
actionquantity
is provided, internally usebuyram
actionThe text was updated successfully, but these errors were encountered: