Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contracts/fio.common/fio.common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#define SECONDSPERDAY 86400
#define DOMAINWAITFORBURNDAYS 90 * SECONDSPERDAY
#define ADDRESSWAITFORBURNDAYS 365 * SECONDSPERDAY
#define MAXBOUNTYTOKENSTOMINT 125000000000000000
#define MAXBOUNTYTOKENSTOMINT 75000000000000000
//#define MINVOTEDFIO 10'000'000'000000000 //TESTNET ONLY
#define MINVOTEDFIO 65'000'000'000000000
#define MINUTE 60
Expand Down
7 changes: 7 additions & 0 deletions contracts/fio.token/include/fio.token/fio.token.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ static const vector<fip48datainfo> fip48reallocationlist = {
static const uint64_t fip48expectedtotaltransferamount = 38505959400000000;
static const name fip48recevingaccount = name("pkfbwyi2qzii");

static const uint64_t fip53mintamount = 50000000000000000; // 50,000,000 FIO in SUFs
static const name fip53receivingaccount = name("pkfbwyi2qzii");

//FIP-38 begin
struct bind2eosio {
name accountName;
Expand Down Expand Up @@ -114,6 +117,10 @@ namespace eosio {
[[eosio::action]]
void fipxlviii();

//fip53
[[eosio::action]]
void fipliii();

[[eosio::action]]
void trnsloctoks(const string &payee_public_key,
const int32_t &can_vote,
Expand Down
35 changes: 34 additions & 1 deletion contracts/fio.token/src/fio.token.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,39 @@ namespace eosio {
send_response(response_string.c_str());
}

//fip53
void token::fipliii() {
// Authorization: only callable by eosio (BP msig)
eosio_assert(has_auth(SYSTEMACCOUNT),
"missing required authority of eosio");

// Contract account validation
eosio_assert(get_self() == TokenContract,
"fipliii must be called on fio.token contract");

// Recipient account validation
check(is_account(fip53receivingaccount),
"fip53 receiving account does not exist");

// Bounty capacity check
bounties_table bounties(TPIDContract, TPIDContract.value);
check(bounties.exists(), "fip53 bounties table not found");
check(fip53mintamount <= MAXBOUNTYTOKENSTOMINT - bounties.get().tokensminted,
"quantity exceeds available bounty tokens supply");

// Mint and transfer via "issue" action (includes 1B supply cap validation)
action(
permission_level{SYSTEMACCOUNT, "active"_n},
TokenContract, "issue"_n,
make_tuple(fip53receivingaccount,
asset(fip53mintamount, FIOSYMBOL),
string("minted tokens for fip53"))
).send();

const string response_string = string("{\"status\": \"OK\"}");
send_response(response_string.c_str());
}

void token::trnsloctoks(const string &payee_public_key,
const int32_t &can_vote,
const vector<eosiosystem::lockperiodv2> periods,
Expand Down Expand Up @@ -816,4 +849,4 @@ namespace eosio {
}
} /// namespace eosio

EOSIO_DISPATCH( eosio::token, (create)(issue)(mintfio)(transfer)(trnsfiopubky)(trnsloctoks)(retire)(fipxlviii))
EOSIO_DISPATCH( eosio::token, (create)(issue)(mintfio)(transfer)(trnsfiopubky)(trnsloctoks)(retire)(fipxlviii)(fipliii))