Skip to content

Commit

Permalink
removed ram bump for actions that dont need it and adjusted ram incre…
Browse files Browse the repository at this point in the history
…ase for listdomain
  • Loading branch information
tvl83 committed Feb 7, 2022
1 parent d3c6596 commit 2cf1336
Showing 1 changed file with 2 additions and 29 deletions.
31 changes: 2 additions & 29 deletions contracts/fio.escrow/fio.escrow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,12 @@ namespace fioio {
fio_fees(actor, asset(fee_amount, FIOSYMBOL), LIST_DOMAIN_ENDPOINT);
processbucketrewards(tpid, fee_amount, get_self(), actor);

if (FIOESCROWRAM > 0) {
if (LISTDOMAINRAM > 0) {
action(
permission_level{SYSTEMACCOUNT, "active"_n},
"eosio"_n,
"incram"_n,
std::make_tuple(actor, FIOESCROWRAM)
std::make_tuple(actor, LISTDOMAINRAM)
).send();
}

Expand Down Expand Up @@ -257,15 +257,6 @@ namespace fioio {
fio_fees(actor, asset(fee_amount, FIOSYMBOL), CANCEL_LIST_DOMAIN_ENDPOINT);
processbucketrewards(tpid, fee_amount, get_self(), actor);

if (FIOESCROWRAM > 0) {
action(
permission_level{SYSTEMACCOUNT, "active"_n},
"eosio"_n,
"incram"_n,
std::make_tuple(actor, FIOESCROWRAM)
).send();
}

const string response_string = string("{\"status\": \"OK\",\"fee_collected\":") +
to_string(fee_amount) + string("}");

Expand Down Expand Up @@ -390,15 +381,6 @@ namespace fioio {
fio_fees(actor, asset(fee_amount, FIOSYMBOL), BUY_DOMAIN_ENDPOINT);
processbucketrewards(tpid, fee_amount, get_self(), actor);

if (FIOESCROWRAM > 0) {
action(
permission_level{SYSTEMACCOUNT, "active"_n},
"eosio"_n,
"incram"_n,
std::make_tuple(actor, FIOESCROWRAM)
).send();
}

// if tx is too large, throw an error.
fio_400_assert(transaction_size() <= MAX_TRX_SIZE, "transaction_size",
std::to_string(transaction_size()),
Expand Down Expand Up @@ -514,15 +496,6 @@ namespace fioio {

fio_fees(actor, asset(fee_amount, FIOSYMBOL), SET_MARKETPLACE_CONFIG_ENDPOINT);
processbucketrewards("", fee_amount, get_self(), actor);

if (FIOESCROWRAM > 0) {
action(
permission_level{SYSTEMACCOUNT, "active"_n},
"eosio"_n,
"incram"_n,
std::make_tuple(actor, FIOESCROWRAM)
).send();
}
}

// if tx is too large, throw an error.
Expand Down

0 comments on commit 2cf1336

Please sign in to comment.