Skip to content

Commit

Permalink
Merge pull request #233 from tvl83/escrow-ram-adjust
Browse files Browse the repository at this point in the history
Escrow ram adjust
  • Loading branch information
ericbutz authored Feb 7, 2022
2 parents 6ff2151 + 2cf1336 commit 50e09da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 30 deletions.
2 changes: 1 addition & 1 deletion contracts/fio.common/fio.common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ namespace fioio {
static const uint64_t BUNDLEVOTERAM = 0; //integrated.
static const uint64_t ADDNFTRAMBASE = 512;
static const uint64_t ADDNFTRAM = 2048;
static const uint64_t FIOESCROWRAM = 512; // FIOESCROW
static const uint64_t LISTDOMAINRAM = 1536; // FIOESCROW - List Domain 1140 bytes round to 512 x 3

static const uint64_t BASECONTENTAMOUNT = 1000; // base amount for content on newfundsreq and obt transactions

Expand Down
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 50e09da

Please sign in to comment.