1.命令行中输入:
./cleos get table eosio eosio rammarket
返回:
response:{"rows":[{"supply":"10000000000.0000 RAMCORE","base":{"balance":"68626470312 RAM","weight":"0.50000000000000000"},"quote":{"balance":"1001355.2562 SYS","weight":"0.50000000000000000"}}],"more":false}
{
"rows": [{
"supply": "10000000000.0000 RAMCORE",
"base": {
"balance": "68626470312 RAM",
"weight": "0.50000000000000000"
},
"quote": {
"balance": "1001355.2562 SYS",
"weight": "0.50000000000000000"
}
}
],
"more": false
}
2.使用Bancor算法,计算出需要nKB
的RAM的价格:
RAM价格 = (n * quote.balance) / (n + base.balance / 1024)