Contract Interface
import
Directly import the bridge interface using the following code.
import "@butternetwork/bridge/contracts/interface/IButterBridgeV3.sol";Make sure to install the package with 'npm install @butternetwork/bridge before usage.
swapOutToken
struct BridgeParam {
uint256 gasLimit;
bytes refundAddress;
bytes swapData;
}
function swapOutToken(
address _sender, // user account send this transation
address _token, // src token
bytes memory _to, // receiver account (if _swapData not empty _to must contract who implement IButterReceiver)
uint256 _amount, // token amount
uint256 _toChain, // target chain id
bytes calldata _swapData
) external payable returns (bytes32 orderId);
getNativeFee
IButterReceiver
Last updated