Forum

approveAndCall for tokens on xDAI

Does ERC20 to ERC20 Bridge Mode support tokens using approveAndCall?

If not, possible to support?

Are there immediate workarounds if not supported?

1 Like

All tokens created by the OmniBridge factory supports the transferAndCall method. We have found that is is more safe with respect to the relay operations. The tokens contract are not upgradable so the functionality cannot be extended for existing tokens.

The bridge ERC20-to-ERC677 for a dedicated token pair can be deployed with modified version of the token contract on the xDai side as so it supports approveAndCall but this code is not there.

Could you bring more light on the case when approveAndCall is more preferable than transferAndCall?

2 Likes

Appreciate the the quick response and the explanation!

approveAndCall preference is for legacy support only.

Thanks again :pray: