Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Add eosio.token::open action #61

Closed
arhag opened this issue Aug 31, 2018 · 1 comment
Closed

Add eosio.token::open action #61

arhag opened this issue Aug 31, 2018 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@arhag
Copy link
Contributor

arhag commented Aug 31, 2018

An open action is needed to complement the existing close action in the eosio.token contract.

Action signature:

void open( account_name owner, symbol_type symbol, account_name ram_payer );

If a table row for that symbol already exists for the owner, then the open action would do nothing. Otherwise, it will create a zero-balance table row for that symbol and charge the RAM to ram_payer.

This action allows contracts or wallet clients to easily replicate the current behavior of eosio.token::transfer even after its behavior is modified (see #62). The current behavior is that the token transfer action succeeds (assuming the sender and recipient contracts that are notified do not fail) even if there is no existing row for that symbol in the recipient's table. Contracts and wallet clients can simply package the two actions (eosio.token::open action followed by the eosio.token::transfer action) and get the same behavior they are used to at the risk of having to pay for the RAM if the recipient's tables need a new table row.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant