BancorNetworkcontract, Etherscan's web UI makes it quite easy. Additionally, this guide will be helpful for developers looking to interface with Bancor contracts via their own smart contract.
BancorNetworkaddress may change over time. To find the latest address:
Read Contractsection, execute the getAddress function with the following parameter:
contractName: 0x42616e636f724e6574776f726b. This is the bytes32 representation of "BancorNetwork"
BancorNetworkcontract. Save this value for Step #3
getPathAndRatefunction documented on the SDK Github. This API call will provide you with the conversion path and expected exchange rate of the trade. You'll need both of these inputs for Step #3.
conversionPathfunction on the BancorNetwork contract provides a good approximation of the best path. This function is well-documented in the
Trading with Bancorguide in the Developer Quick Start.
pathparameter from Step #2 and you can use the
ratereturn value from
getPathAndRateas a reference point for how to determine the