Closed DenisCarriere closed 10 months ago
int64_t to_number(str)
const
_self
get_self()
[eosio::action]
[[eosio::action]] void drops::enable(const bool enabled) { require_auth(get_self());
[x] rename modify_drop_binding => modify_ram_payer
modify_drop_binding
modify_ram_payer
[x] update method params of check_drop_ownership & check_drop_bound
check_drop_ownership
check_drop_bound
void modify_ram_payer( const uint64_t drop_id, const name ram_payer ); void check_drop_ownership( const uint64_t drop_id, const name owner ); void check_drop_bound( const uint64_t drop_id, const bool bound );
[x] rename ram.hpp methods to snake case (add "_")
ram.hpp
_
ramcost
ram_cost
ramcostwithfee
ram_cost_with_fee
ramproceedstminusfee
ram_proceeds_minus_fee
[x] define standard ERROR_* messages
ERROR_*
ERROR_INVALID_MEMO
Invalid transfer memo. (ex: "<amount>,<data>")
ERROR_DROP_NOT_FOUND
Drop not found.
ERROR_SYSTEM_DISABLED
Drops system is disabled.
[x] add comments for actions @user & @admin
@user
@admin
[x] modify .find() using .get()
.find()
.get()
auto & drop = drops.get(drop_id, ERROR_DROP_NOT_FOUND.c_str());
unbind
bind
cancelunbind
on_transfer
What's changed
int64_t to_number(str)
method to parse number from memoconst
to methods_self
toget_self()
(ref: eosio.system)[eosio::action]
on top of method (ref: eosio.system)~[x] rename
modify_drop_binding
=>modify_ram_payer
[x] update method params of
check_drop_ownership
&check_drop_bound
[x] rename
ram.hpp
methods to snake case (add "_
")ramcost
to =>ram_cost
ramcostwithfee
to =>ram_cost_with_fee
ramproceedstminusfee
to =>ram_proceeds_minus_fee
[x] define standard
ERROR_*
messagesERROR_INVALID_MEMO
=>Invalid transfer memo. (ex: "<amount>,<data>")
ERROR_DROP_NOT_FOUND
=>Drop not found.
ERROR_SYSTEM_DISABLED
=>Drops system is disabled.
[x] add comments for actions
@user
&@admin
[x] modify
.find()
using.get()
New Tests
unbind
testsbind
testscancelunbind
testson_transfer
error tests