Last updated
Last updated
sending ETH to bridge address 0x00000000000007736e2F9aA5630B8c812E1F3fc9
, and make sure the value endswith confirm code 8000 + dest internalId
(8004
to Linea for example)
version
: update time
chains
: supported chains
type
currently we support evm, evm_erc20 and starknet
internalId
same as id
, the id we use internally, part of confirm code in transfer value
bridge
bridge address
routes
: chain to chain config, including fee and min/max amount
from_id
to_id
interalId
bridge
= chains[from_id][”bridge”]
fee_fixed
fee amount
fee_percentage
currently all 0
amount_min
amount_max
Example config from Arbitrum to Linea
For example, if you want to receive 0.01 ETH from Arbitrum to Linea, you can learn from the config that:
from_id Arbitrum = 1
to_id Linea = 4
the current fee is 0.00045 ETH (without considering discount)
simply transfer ETH to bridge address 0x00000000000007736e2F9aA5630B8c812E1F3fc9
with transfer value set to expected receive amount
+ fee amount
+ 8000 + destination chain interalId
No API request needed, our server will process your bridge request automatically.
For example, if you want to bridge from Arbitrum to Linea and receive 0.01 ETH on Linea, you should set the transfer value to: 0.01*10**18 + 0.00045*10**18 + 8000 + 4
= 10450000000008004
Normally your bridge request will be finished in less than 1 minute, you don’t have to query the status, simply querying your destination chain wallet balance should be enough.
You can use this API to query the status of your bridge requests:
Replace the address to your own address which send ETH to bridge, and make sure use lowercase address.
Possible status:
pending: we have synced your src chain tx
locked: we have allocated destination nonce for your bridge request
sent: the destination chain tx has been sent, you can find totx in the API response
finished: we have confirmed the destination chain tx
failed: different fail status, see the status text for reason
retrying: please wait longer
Replace the address to your own address.
This API returns:
pETH and pMNB balance, and history
discount
ratio (85% in this example), discount reason
invite count
If your address have available discount, you can multiple it to the fee_fixed
to calculate the real fee. Or you can simply ignore it, and you’ll receive more ETH on destination chain than expected.
How to bridge to Starknet?
MiniBridge allows you to change destination chain ETH receive address, and this is a must if you’re bridging across EVM and non-EVM chains.
simply transfer ETH token to bridge address, using the same value mechainism (last 4 digits set to 8000+ dest chain internalId)
Starknet support bundle multiple txs into a transaction, so we have a BridgeTo contract to help set destination address without requiring ETH approval.
To start a bridge request, you need to call 2 functions in a single transaction: BridgeTo.setBridgeTo(felt252) and ETH.transfer(felt252, uint256)
The ETH transfer value is the same mechanism as illustrated above.
add 0.005 ETH, change the confirm code to 8500+dest chain internalId
For example, if you want to bridge from Arbitrum to Mantle (id=11), and want to receive 0.01 ETH on Mantle with about $1 MNT, and assuming the fee is 0.00065
ETH, you need to send:
0.01*10**18 + 0.00065*10**18 + 0.0005*10**18 + 8500 + 11
= 11150000000008511
Note: zksync era is currently unsupported
Use our helper contract to send ETH, you can call it in a contract internal call
helper address: 0x000000000000Bd696655814b68C2f67e399ab4e5
, also in chains conf file
call Helper.transferETH(uint256 to)
Notice: Helper address can be different on different blockchains, please confirm it in the configure file. If you cannot find the helper address for a specific chain, which means that chain doesn't support using a contract to bridge.
example tx:
corresponding destination tx:
If your bridge tx do not show up in this API response, please check your src tx status first, and wait for 5 minutes, if it repeat, you can contact us in Telegram group
For EVM chain: use calldata as dest user address, example tx:
For evm_erc20 chain: append dest user address to the calldata, example tx:
example tx:
example tx:
Example tx: