droplets-system / drops

Core Drops smart contract
3 stars 2 forks source link

add read-only actions #41

Closed DenisCarriere closed 9 months ago

DenisCarriere commented 9 months ago

Add read-only actions

[[eosio::action, eosio::read_only]]
asset dropssystem::drops::ramcost(const int64_t bytes)
{
   return eosiosystem::ram_cost_with_fee(bytes, EOS);
}

[[eosio::action, eosio::read_only]]
int64_t dropssystem::drops::bytescost(const asset quantity)
{
   return eosiosystem::bytes_cost_with_fee(quantity);
}
DenisCarriere commented 9 months ago

LGTM