Skip to content
New issue

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

Tokenomics - eosio.bpay #98

Merged
merged 3 commits into from
Jun 5, 2024
Merged

Tokenomics - eosio.bpay #98

merged 3 commits into from
Jun 5, 2024

Conversation

nsjames
Copy link
Contributor

@nsjames nsjames commented Jun 4, 2024

Change Description

eosio.bpay is a contract that collects network fees allocated to block producers and allows them to claim them as rewards.

Deployment Changes

  • Deployment of the eosio.bpay contract

API Changes

  • new ACTION claimrewards
/**
 * Claim rewards for a block producer.
 *
 * @param owner - block producer owner account
 */
[[eosio::action]]
void claimrewards( const name owner);
  • new TABLE rewards
struct [[eosio::table("rewards")]] rewards_row {
    name                owner;
    asset               quantity;

    uint64_t primary_key() const { return owner.value; }
};

Documentation Additions

  • Documentation Additions

@nsjames nsjames requested a review from DenisCarriere June 4, 2024 15:13

eosiosystem::global_state_singleton _global("eosio"_n, "eosio"_n.value);
check( _global.exists(), "global state does not exist");
uint16_t producer_count = _global.get().last_producer_schedule_size;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is handy, makes it more flexible 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm not sure what savanna might do to prod count, so...

Copy link
Member

@DenisCarriere DenisCarriere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new eosio.bpay code and unit tests looks good to me 👍

@nsjames nsjames merged commit 47599f0 into tokenomics Jun 5, 2024
1 check passed
@nsjames nsjames deleted the eosio.bpay branch June 5, 2024 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants