OffchainOracle.abi.json 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. [
  2. {
  3. "inputs": [
  4. { "internalType": "contract MultiWrapper", "name": "_multiWrapper", "type": "address" },
  5. { "internalType": "contract IOracle[]", "name": "existingOracles", "type": "address[]" },
  6. { "internalType": "enum OffchainOracle.OracleType[]", "name": "oracleTypes", "type": "uint8[]" },
  7. { "internalType": "contract IERC20[]", "name": "existingConnectors", "type": "address[]" },
  8. { "internalType": "contract IERC20", "name": "wBase", "type": "address" }
  9. ],
  10. "stateMutability": "nonpayable",
  11. "type": "constructor"
  12. },
  13. {
  14. "anonymous": false,
  15. "inputs": [
  16. { "indexed": false, "internalType": "contract IERC20", "name": "connector", "type": "address" }
  17. ],
  18. "name": "ConnectorAdded",
  19. "type": "event"
  20. },
  21. {
  22. "anonymous": false,
  23. "inputs": [
  24. { "indexed": false, "internalType": "contract IERC20", "name": "connector", "type": "address" }
  25. ],
  26. "name": "ConnectorRemoved",
  27. "type": "event"
  28. },
  29. {
  30. "anonymous": false,
  31. "inputs": [
  32. { "indexed": false, "internalType": "contract MultiWrapper", "name": "multiWrapper", "type": "address" }
  33. ],
  34. "name": "MultiWrapperUpdated",
  35. "type": "event"
  36. },
  37. {
  38. "anonymous": false,
  39. "inputs": [
  40. { "indexed": false, "internalType": "contract IOracle", "name": "oracle", "type": "address" },
  41. {
  42. "indexed": false,
  43. "internalType": "enum OffchainOracle.OracleType",
  44. "name": "oracleType",
  45. "type": "uint8"
  46. }
  47. ],
  48. "name": "OracleAdded",
  49. "type": "event"
  50. },
  51. {
  52. "anonymous": false,
  53. "inputs": [
  54. { "indexed": false, "internalType": "contract IOracle", "name": "oracle", "type": "address" },
  55. {
  56. "indexed": false,
  57. "internalType": "enum OffchainOracle.OracleType",
  58. "name": "oracleType",
  59. "type": "uint8"
  60. }
  61. ],
  62. "name": "OracleRemoved",
  63. "type": "event"
  64. },
  65. {
  66. "anonymous": false,
  67. "inputs": [
  68. { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" },
  69. { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" }
  70. ],
  71. "name": "OwnershipTransferred",
  72. "type": "event"
  73. },
  74. {
  75. "inputs": [{ "internalType": "contract IERC20", "name": "connector", "type": "address" }],
  76. "name": "addConnector",
  77. "outputs": [],
  78. "stateMutability": "nonpayable",
  79. "type": "function"
  80. },
  81. {
  82. "inputs": [
  83. { "internalType": "contract IOracle", "name": "oracle", "type": "address" },
  84. { "internalType": "enum OffchainOracle.OracleType", "name": "oracleKind", "type": "uint8" }
  85. ],
  86. "name": "addOracle",
  87. "outputs": [],
  88. "stateMutability": "nonpayable",
  89. "type": "function"
  90. },
  91. {
  92. "inputs": [],
  93. "name": "connectors",
  94. "outputs": [{ "internalType": "contract IERC20[]", "name": "allConnectors", "type": "address[]" }],
  95. "stateMutability": "view",
  96. "type": "function"
  97. },
  98. {
  99. "inputs": [
  100. { "internalType": "contract IERC20", "name": "srcToken", "type": "address" },
  101. { "internalType": "contract IERC20", "name": "dstToken", "type": "address" },
  102. { "internalType": "bool", "name": "useWrappers", "type": "bool" }
  103. ],
  104. "name": "getRate",
  105. "outputs": [{ "internalType": "uint256", "name": "weightedRate", "type": "uint256" }],
  106. "stateMutability": "view",
  107. "type": "function"
  108. },
  109. {
  110. "inputs": [
  111. { "internalType": "contract IERC20", "name": "srcToken", "type": "address" },
  112. { "internalType": "bool", "name": "useSrcWrappers", "type": "bool" }
  113. ],
  114. "name": "getRateToEth",
  115. "outputs": [{ "internalType": "uint256", "name": "weightedRate", "type": "uint256" }],
  116. "stateMutability": "view",
  117. "type": "function"
  118. },
  119. {
  120. "inputs": [],
  121. "name": "multiWrapper",
  122. "outputs": [{ "internalType": "contract MultiWrapper", "name": "", "type": "address" }],
  123. "stateMutability": "view",
  124. "type": "function"
  125. },
  126. {
  127. "inputs": [],
  128. "name": "oracles",
  129. "outputs": [
  130. { "internalType": "contract IOracle[]", "name": "allOracles", "type": "address[]" },
  131. { "internalType": "enum OffchainOracle.OracleType[]", "name": "oracleTypes", "type": "uint8[]" }
  132. ],
  133. "stateMutability": "view",
  134. "type": "function"
  135. },
  136. {
  137. "inputs": [],
  138. "name": "owner",
  139. "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
  140. "stateMutability": "view",
  141. "type": "function"
  142. },
  143. {
  144. "inputs": [{ "internalType": "contract IERC20", "name": "connector", "type": "address" }],
  145. "name": "removeConnector",
  146. "outputs": [],
  147. "stateMutability": "nonpayable",
  148. "type": "function"
  149. },
  150. {
  151. "inputs": [
  152. { "internalType": "contract IOracle", "name": "oracle", "type": "address" },
  153. { "internalType": "enum OffchainOracle.OracleType", "name": "oracleKind", "type": "uint8" }
  154. ],
  155. "name": "removeOracle",
  156. "outputs": [],
  157. "stateMutability": "nonpayable",
  158. "type": "function"
  159. },
  160. {
  161. "inputs": [],
  162. "name": "renounceOwnership",
  163. "outputs": [],
  164. "stateMutability": "nonpayable",
  165. "type": "function"
  166. },
  167. {
  168. "inputs": [{ "internalType": "contract MultiWrapper", "name": "_multiWrapper", "type": "address" }],
  169. "name": "setMultiWrapper",
  170. "outputs": [],
  171. "stateMutability": "nonpayable",
  172. "type": "function"
  173. },
  174. {
  175. "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }],
  176. "name": "transferOwnership",
  177. "outputs": [],
  178. "stateMutability": "nonpayable",
  179. "type": "function"
  180. }
  181. ]