https://github.com/bancorprotocol/contracts
https://github.com/bancorprotocol/contracts/blob/master/solidity/contracts/converter/BancorConverter.sol
Bancor协议数学公式在该文件中
https://github.com/bancorprotocol/contracts/blob/master/solidity/contracts/converter/BancorFormula.sol
创建连接器
https://github.com/bancorprotocol/contracts/blob/master/solidity/contracts/converter/interfaces/IBancorConverterFactory.sol
contract IBancorConverterFactory{
function createConverter(ISmartToken _token,IContractRegistry _registry,uint32_maxConversionFee,IERC20Token _connectorToken,uint32 _connectorWeight) }
这是Bancor部署在以太网上的所有智能合约
https://etherscan.io/accounts?l=Bancor
211个, BancorConverter有198个
这是1号连接器https://etherscan.io/address/0x3839416bd0095d97be9b354cbfb0f6807d4d609e#code
https://etherscan.io/tx/0x5a6805ba441357c9cf3c14657c184c9bdb404d0ae6caee184a10d7412b577cbe
这是1号连接器的第一笔交易细节
注:https://etherscan.io/tokens安装了web scraper之后,可以很方便的把tokens的所有地址抓下来,具体使用规则可以搜索到,比如EOS的token地址是:https://etherscan.io/token/0x86fa049857e0209aa7d9e616f7eb3b3b78ecfdb0那么EOS的合约地址就是https://etherscan.io/address/0x86fa049857e0209aa7d9e616f7eb3b3b78ecfdb0#code
https://etherscan.io/address/0x3839416bd0095d97be9b354cbfb0f6807d4d609e#events只能看到最近25个,所以不得不用python自己趴etherscan.io里的event log了,search github发现有两个project
https://github.com/corpetty/py-etherscan-api 但还不支持event log
另一个是https://github.com/Marto32/pyetherscan(pip install pyetherscan即可运行)
bancor中文电报群
Chinese: https://t.me/bancor_cn