1
 user_stakes.modify(sk,same_payer,[&](auto &s){

The variable same_payer confused me sometime, so, what does the same_payer mean in eosio contract ?

3

It means whomever paid for the RAM originally is still going to be paying for the RAM in the table after this modification. If modification of data consumes more RAM compared to original usage, setting same_payer requires authorization of original ram payer. (Or, you can modify data without original payer's authorization, if ram usage is kept same or decreased.)

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.