XRP

EVM ChainX to XRP bridging guide

  • function requestSwap(address tokenAddress, string calldata toChain, bytes calldata toAddr, uint amount, bytes calldata data) external payable

    • oXRP tokenAddress : link

    • toChain : XRP

    • toAddress : xrp hex address format

    • minAmount for Bridging : 20.03 oXRP

    • data : XRP destination tag ( hex format )

      • ex) 1234 -> 0x4d2

  • chainFee : link

toAddress format

// "ripple-address-codec": "4.2.3"
const addressCodec = require('ripple-address-codec');

// xrpAddress
const xrpAddress = "r~";

// hexAddress for toAddress
const hexAddress = '0x' + Buffer.from(addressCodec.codec.codec.decode(xrpAddress)).toString('hex');
  • example

    • XRP address : rLcxBUrZESqHnruY4fX7GQthRjDCDSAWia

    • Hex address : 0x00d73701c4123236e2d61d372052eadcc3ede48b06e617b033

Last updated