▫️WebGlide Bridge

Bridge - WebGlide

The WebGlideBridge only moves tokens from one wallet (which might be the user themself) to another wallet on a different chain. No target contract is required because there is no calldata involved.

In this example,Bridge has two functions:

  • WebGTransfer bridges any BEP20 token

  • Before the token can be spent on the Bridge contract, the user must authorise it.

  • RelayerFee is paid in native BNB, hence msg.value MUST be given in equal to the specified relayerFee when WebGTransfer is called. On the page titled "Estimating Fees," information is provided for computing relayer costs.

  • WebGTransferBnb bridges BNB (for origin/destination chains whose native asset is BNB)

  • The flow is a little bit different while sending and receiving native BNB. Since WebGlide doesn't allow native BNB as the bridging asset, BNB must first be wrapped into WBNB on the origin domain before being unwrapped and converted back to BNB at the destination.

  • When sending BNB, msg.value = relayerFee + amount. See example below (note: in Bscscan, the payable field is in bnb while the other fields are specified in wei).

Last updated