Calling APIs

Note : Before the assets are transferred across the chain, The Rangers Protocol team would need to review these assets. If the transferred assets are FT, the quantity approved in the contract address must be larger than or equal to the quantity of cross-chain FTs.

The cross-chain smart contract of Rangers Protocol can support cross-chain operations under Rangers Bridge. Additionally, any person or organization can invoke an interface to perform cross-chain operations as long as it meets the cross-chain specification:

getcrosslist

Get all cross-chain pairs

{"type": "erc20"} or {"type": "erc721"}

getcrosscontract

Get the cross-chain contract address

/

getpoolsize

Get cross-chain pool size

{
    "Chain": "ETH",
    "FromContract":"0x0a98D1304c2DAD3c85EA06588996CeBB63Efb403",
    "ToChain": "BSC",
    "ToContract":"0x440dAcfd04e058c730C4B0fBc63BDDB0CA6e4F81"
}

getfee

Get the cross-chain gas fee, and then when initiating a cross-chain transaction, the amount of coins to be traded needs to be filled in.

{
    "Chain":"Rangers",
    "FromContract":"0x71d9CFd1b7AdB1E8eb4c193CE6FFbe19B4aeE0dB",
    "ToChain":"BSC",
    "ToContract":"0xc2098a8938119A52B1F7661893c0153A6CB116d5"
}

getbridgeinfo

Get cross-chain record

{
    "Chain":"RPG",
    "Type":"erc20",
    "Addr":"0xf44ce46191380afb962460d3db9417d7d70e0dd6"
}

getcrossstatus

Get cross-chain status

{
    "Hash":"0x7993c254a4fcbc3c7823cbb97e0fdea319c9ff0793d9661894942f84a66f1457"
}

Last updated