What is the best practice to do erc20 token transfer

If I want to do erc20 transfer between Ethereum and xDai without implementing a token mediator, which extension is the best practice? Is Omni multi token online now? Or I should follow erc20-erc20 guide to implement our own token mediator?

another question, what version of Solidity supports now?

OmniBridge is a choice when you bridge token from Mainnet to xDai

there a work in progress for UI

wondering which one is correct mediator contract address on sokol
0x40CdfF886715A4012fAD0219D15C98bB149AeF0e or

Here is what I did,
created a PERP erc20 token on Kovan, transfer some token to sokol, and then the bridge creates a PERP on xDai(0x14A3cbE5dC71dD99159e6382D358A2ffb027735D). Next step,
tried to transfer some tokens back to Kovan by calling ‘transferAndCall’ here with contract address, 0x40CdfF886715A4012fAD0219D15C98bB149AeF0e, it shows the following errors.

the EVM: { "blockHash": "0x0c0f487c62cf0c80e14f6ca3049dee3483d84ae75e11655a07090a61166bec5c", "blockNumber": 16715253, "contractAddress": null, "cumulativeGasUsed": 72143, "from": "0x9602686bf53a17baed60c48ba34ed4219a532381", "gasUsed": 72143, "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "status": false, "to": "0x14a3cbe5dc71dd99159e6382d358a2ffb027735d", "transactionHash": "0xb44cc5996b6b5961e88534344a26f3072f9d44041f46cd12ae561ffa1e0db335", "transactionIndex": 0, "events": {} }

If the address is 0xf6A78083ca3e2a662D6dd1703c939c8aCE2e268d, transact successfully, but my account on Kovan doesn’t get anything. Wondering what happened? I did the same steps last night. In the beginning, it failed like above description, but suddenly it works, I get some token on Kovan. Here is my account on Kovan. thanks.

Hi @KimiWu123, I see that eventually you were able to transfer tokens back from Sokol to Kovan:

The transaction you are referring tries to send the value (0.2 tokens) which is less than the min value per tx (1 token). This is the reason of the revert.


@akolotov, got it. Thanks for your answer! BTW, is OmniBridge production ready? We don’t need UI, our contract would call their contract directly.

Yes, we consider it as “ready to be used” but the security audit is still in progress. Two weeks ago this bridge had locked assets with total value >200 thousands USD.

1 Like