Comments (1)
There may be an argument for the system contract handler of new account to create a zero-balance table row in eosio.token
for the core token symbol. To do this safely would require adding an open
action to eosio.token
to complement the existing close
action, and have the system contract send an inline action to open that new table row.
The advantage of doing this is that it simplifies the initialization process to make an account a valid recipient of "safetransfers" of the core token, which I imagine nearly all accounts would want to receive since it is needed for staking and buying RAM. The disadvantage is that it increases the minimum amount of RAM necessary to create an account, including accounts that may never need to receive any of the core tokens at all (for example RAM may be gifted to them, stake delegated to them, and they just have no need to deal with the core token at all for some reason).
Either way, initializing zero-balances on account creation is not a solution for any other token other than the core token, because there is an unbounded number of potential tokens a user might be interested in receiving via "safetransfer" / "proxy transfer" for example.
Adding eosio.token::open
(see #61) allows users to to pay for the RAM of the zero-balance table row for a particular token, so that future eosio.token::transfer
s of that token do not incur any additional RAM costs.
Changing eosio.token::transfer
behavior (see #62) to never create a table row if one does not already exist (which necessitates the eosio.token::open
action being available so that there exists a way to actually transfer a new token to a user for the first time) would mean that eosio.token::transfer
would by default become safe from the perspective of the sender not incurring unexpected RAM costs. With that change, there would be no need for the "safetransfer" and proxy contract workarounds.
So the path forward seems to be to implement eosio.token::open
(#61) as soon as possible and then some time later change the behavior of eosio.token::transfer
(#62). With eosio.token::open
implemented, there is also the possibly of updating the system contract to automatically open a zero-balance table row for the core token symbol when a new account is created.
from eosio.contracts.
Related Issues (20)
- [email protected]
- Tiny typo correction[docs] Suggestion / Change Request HOT 1
- Small typo in table correction[docs] Suggestion / Change Request HOT 1
- Tiny typo correction in a table[docs] Suggestion / Change Request HOT 1
- NRM modelling: decay_secs has no effect? HOT 4
- [docs] buyram description seems to be wrong
- cant Borrow CPU/NET
- Luckyangie12
- [docs] Suggestion / Invalid parameter name in the issue action. HOT 1
- eosio newaccount ACTION might has an issue. HOT 1
- [eosio.wrap] Use inline action instead of deferred trx
- Unable to build tests HOT 19
- [docs] Suggestion / Change Request
- [docs] Suggestion / Change Request - Fix Description for 2nd Argument of setabi()
- Error 3070003: Serialization Error Processing WASM HOT 1
- build.sh does not detect newer Darwin versions HOT 2
- stod causes access violation error
- [docs] I think the replenish algorithm description is wrong
- Calling actions of deployed smart-contract HOT 1
- eosio powerup ABI type is invalid
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eosio.contracts.