Skip to content

Commit

Permalink
ignore eosio incoming transfers
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed May 3, 2024
1 parent 6ef4ba3 commit 65aaa4f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@

## Overview

The `eosio.bpay` contract handles system block pay distribution.
The `eosio.bpay` contract handles system block pay distribution earned by fees.

```mermaid
stateDiagram-v2
[*] --> eosio
eosio --> eosio.fees
eosio.fees --> eosio.bpay
eosio.bpay --> [*]
```

## Development and Testing

Expand Down
2 changes: 2 additions & 0 deletions eosio.bpay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ void bpay::on_transfer( const name from, const name to, const asset quantity, co
if (from == get_self() || to != get_self()) {
return;
}
// ignore eosio system incoming transfers (caused by bpay income transfers eosio => eosio.bpay => producer)
if ( from == "eosio"_n) return;

check( get_first_receiver() == "eosio.token"_n, "only eosio.token allowed") ;
check( quantity.symbol == eosio::symbol("EOS", 4), "only EOS token allowed" );
Expand Down

0 comments on commit 65aaa4f

Please sign in to comment.