Skip to content

Cross Chain CAKE Bridging

Contract info

CAKE Bridging Contract

Contract name: CakeProxyOFT
Contract address: 0xb274202daBA6AE180c665B4fbE59857b7c3a8091

View on BscScan

Example of CAKE bridging to Aptos

sendFrom
function sendFrom(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, uint _minAmount, LzCallParams calldata _callParams) external payable;
NameTypeDescription
_fromaddressFrom address. This should be the address calling the CakeProxyOFT
_dstChainIduint16108 for Aptos mainnet
_toAddressbytes32The destination address on Aptos
_amountuint256Amount of CAKE in WEI. Please note that amounts less than 1e-8 will get dusted
_minAmountuint256Minimum receiving amount. We do not charge any fee in CAKE. But this should not be larger than _amount after being rounded down to 8 decimals
_callParamstupleA set of call parameters used to define bridging behaviours. Continue reading for more detail.
How to form `_callParams`
{
    refundAddress,
    zroPaymentAddress,
    adapterParams
}
NameTypeDescription
refundAddressaddressExcess fee (BNB) will be returned to this address
zroPaymentAddressaddress0x0000000000000000000000000000000000000000
adapterParamsbytesA set of parameters to define destination gas airdropping. Continue reading for more detail.
How to form `adapterParams`
{
    version,
    dstGasLimit,
    dstNativeGasTransferAmount,
    dstNativeGasTransferAddress
}
NameTypeDescription
versionuint16Default is 2
dstGasLimituintDefault is 200000
dstNativeGasTransferAmountuintAmount destination native gas token to airdrop. Use 0 if you don't need the bridge to convert BNB and airdrop you APT
dstNativeGasTransferAddressbytesThe destination address that receives native gas tokens on destination chain.
const adapterParams = utils.solidityPack(
    ["uint16", "uint", "uint", "bytes"],
    [2, 200000, 0, "0xYourAptosAddress"]
)

Utilities

Audits

OtterSec's PancakeSwap CAKE OFT (Bridging) security audit