How can I programatically get the current(last) RAM price inside an EOS smart contract in C++? I need to handle the data inside the smart contract for an experiment.
1 Answer
You can go to eosio.system and find the exchange_state.hpp, there's a table rammarket for the information, but I can't give you the formula now, you can investigate into it.
-
1I need the code example to accept this answer, it will also help others Commented Jul 11, 2018 at 20:03
-
1
-
1I'm a c++ noob just like many other who learn it just for eos so I need a more complete answer. I'll post the solution as soon as I find it though. Commented Jul 12, 2018 at 4:15