Skip to content

Commit

Permalink
Merge branch 'release/0.6' into yarkin/merge-non-eos-transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
yarkinwho committed Dec 19, 2023
2 parents d6ea964 + 182354a commit c271591
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/actions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,11 +588,13 @@ void evm_contract::handle_evm_transfer(eosio::asset quantity, const std::string&

void evm_contract::transfer(eosio::name from, eosio::name to, eosio::asset quantity, std::string memo) {
assert_unfrozen();
eosio::check(get_code() == token_account && quantity.symbol == token_symbol, "received unexpected token");


// Allow transfer non-EOS tokens out.
if(to != get_self() || from == get_self())
return;

eosio::check(get_code() == token_account && quantity.symbol == token_symbol, "received unexpected token");

if(memo.size() == 42 && memo[0] == '0' && memo[1] == 'x')
handle_evm_transfer(quantity, memo);
else if(!memo.empty() && memo.size() <= 13)
Expand Down

0 comments on commit c271591

Please sign in to comment.