Note: The following second commit has been reverted. leave it for independent branch and PR in future.
Second commit
The whole storage management logic upgrades to storage_used way to trace real usage of storage of each user;
Now, all register_token, add/remove liquidity, register mft, add_pool and swap are recorded by storage_used and cause an Account creation if necessary;
The side-effects is now, In-tx-refund is not supported in add_pool, add/remove_liquidity, mft_register actions.
Cause, all attached deposit would be added into account.near_amount, user can storage_withdraw leftover amount later.
First commit
Note: The following second commit has been reverted. leave it for independent branch and PR in future.
Second commit
storage_used
way to trace real usage of storage of each user;register_token
,add/remove liquidity
,register mft
,add_pool
andswap
are recorded bystorage_used
and cause anAccount creation
if necessary;add_pool
,add/remove_liquidity
,mft_register
actions. Cause, all attached deposit would be added intoaccount.near_amount
, user canstorage_withdraw
leftover amount later.