We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rex_system_initialized
rex_available
Methods to expose if REX is available or not.
Needed for contracts that want to implement donatetorex action which require REX to be active.
donatetorex
static bool rex_system_initialized() { eosiosystem::rex_pool_table _rexpool( "eosio"_n, "eosio"_n.value ); return _rexpool.begin() != _rexpool.end(); } static bool rex_available() { eosiosystem::rex_pool_table _rexpool( "eosio"_n, "eosio"_n.value ); return rex_system_initialized() && _rexpool.begin()->total_rex.amount > 0; }
if (rex_available()) { eosiosystem::system_contract::donatetorex_action donatetorex( "eosio"_n, { get_self(), "active"_n }); donatetorex.send(get_self(), quantity, memo); }
The text was updated successfully, but these errors were encountered:
Implemented via AntelopeIO/reference-contracts#70
Sorry, something went wrong.
No branches or pull requests
Methods to expose if REX is available or not.
Needed for contracts that want to implement
donatetorex
action which require REX to be active.Example code
The text was updated successfully, but these errors were encountered: