eosnetworkfoundation/eos-evm-contract

Bridge message receiver can specify alternative contract account to receive messages

Closed this issue · 0 comments

The bridgereg should take another argument that specifies the account name hosting the contract that will receive the onbridgemsg action.

This decoupling is important because we may wish to transition the account on which the ERC20 contract on the EOS side is deployed but without needing to change the receiver name that is specified in the bridgeMsgV0 call by the Solidity ERC20 contract on the EVM side. More specifically, we want the Solidity contract to continue to send to the eosio.erc2o receiver. However, we may wish to deploy the ERC20 EOS Contract to another account name, e.g. eosio.evmtok. This allows us to later split the functions specific to ERC20 into a contract deployed to the eosio.erc2o account and keep all the other convenience functionality (e.g. paying the bridge fee in the same token being transferred) to allow sending tokens across the advanced trustless bridge in the proxy contract deployed on the eosio.evmtok account. This allows people to continue using the same eosio.evmtok account name as the destination when they, for example, withdraw USDT from exchanges directly into the EVM.