polux
polux

Reputation: 98

EOS custom token transfer?

I know that this isn't the best place to place a question like this, but I have to design project in short time line and would greatly appreciate quick answer. According to @walnutown ( https://github.com/walnutown in ), issue https://github.com/EOSIO/eos/issues/4173 You'd be charged for RAM for transfer of custom EOS tokens. I just need to know if this is true.

Thanks in advance, enjoy : )

Upvotes: 0

Views: 331

Answers (2)

Muhzin
Muhzin

Reputation: 410

Yes. RAM is used to store changes in states of the contract. Balance of a token to a particular account will be saved in RAM. As per the default eosio.token contract, this state will be saved in the RAM of "from" user who is pushing the transaction. In issuing case also, RAM of issuer will be consumed.

Upvotes: 2

conr2d
conr2d

Reputation: 239

Yes, but the amount of RAM spend depends on whether recipient of custom token has accounts table or not.

token::transfer(...) action invokes token::add_balance(..., ram_payer), but the third argument ram_payer would be sender.

If recipient has accounts table (already has custom token), transfer only consumes 128 bytes of sender's RAM, or transfer will consumes 368 bytes for allocating new accounts table and adding new item (recipient's balance for custom token).

Upvotes: 2

Related Questions