IPyth.json 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702
  1. [
  2. {
  3. "anonymous": false,
  4. "inputs": [
  5. {
  6. "indexed": true,
  7. "internalType": "bytes32",
  8. "name": "id",
  9. "type": "bytes32"
  10. },
  11. {
  12. "indexed": false,
  13. "internalType": "uint64",
  14. "name": "publishTime",
  15. "type": "uint64"
  16. },
  17. {
  18. "indexed": false,
  19. "internalType": "int64",
  20. "name": "price",
  21. "type": "int64"
  22. },
  23. {
  24. "indexed": false,
  25. "internalType": "uint64",
  26. "name": "conf",
  27. "type": "uint64"
  28. }
  29. ],
  30. "name": "PriceFeedUpdate",
  31. "type": "event"
  32. },
  33. {
  34. "anonymous": false,
  35. "inputs": [
  36. {
  37. "indexed": true,
  38. "internalType": "bytes32",
  39. "name": "id",
  40. "type": "bytes32"
  41. },
  42. {
  43. "indexed": false,
  44. "internalType": "uint64",
  45. "name": "startTime",
  46. "type": "uint64"
  47. },
  48. {
  49. "indexed": false,
  50. "internalType": "uint64",
  51. "name": "endTime",
  52. "type": "uint64"
  53. },
  54. {
  55. "indexed": false,
  56. "internalType": "int64",
  57. "name": "twapPrice",
  58. "type": "int64"
  59. },
  60. {
  61. "indexed": false,
  62. "internalType": "uint64",
  63. "name": "twapConf",
  64. "type": "uint64"
  65. },
  66. {
  67. "indexed": false,
  68. "internalType": "uint32",
  69. "name": "downSlotsRatio",
  70. "type": "uint32"
  71. }
  72. ],
  73. "name": "TwapPriceFeedUpdate",
  74. "type": "event"
  75. },
  76. {
  77. "inputs": [
  78. {
  79. "internalType": "bytes32",
  80. "name": "id",
  81. "type": "bytes32"
  82. },
  83. {
  84. "internalType": "uint256",
  85. "name": "age",
  86. "type": "uint256"
  87. }
  88. ],
  89. "name": "getEmaPriceNoOlderThan",
  90. "outputs": [
  91. {
  92. "components": [
  93. {
  94. "internalType": "int64",
  95. "name": "price",
  96. "type": "int64"
  97. },
  98. {
  99. "internalType": "uint64",
  100. "name": "conf",
  101. "type": "uint64"
  102. },
  103. {
  104. "internalType": "int32",
  105. "name": "expo",
  106. "type": "int32"
  107. },
  108. {
  109. "internalType": "uint256",
  110. "name": "publishTime",
  111. "type": "uint256"
  112. }
  113. ],
  114. "internalType": "struct PythStructs.Price",
  115. "name": "price",
  116. "type": "tuple"
  117. }
  118. ],
  119. "stateMutability": "view",
  120. "type": "function"
  121. },
  122. {
  123. "inputs": [
  124. {
  125. "internalType": "bytes32",
  126. "name": "id",
  127. "type": "bytes32"
  128. }
  129. ],
  130. "name": "getEmaPriceUnsafe",
  131. "outputs": [
  132. {
  133. "components": [
  134. {
  135. "internalType": "int64",
  136. "name": "price",
  137. "type": "int64"
  138. },
  139. {
  140. "internalType": "uint64",
  141. "name": "conf",
  142. "type": "uint64"
  143. },
  144. {
  145. "internalType": "int32",
  146. "name": "expo",
  147. "type": "int32"
  148. },
  149. {
  150. "internalType": "uint256",
  151. "name": "publishTime",
  152. "type": "uint256"
  153. }
  154. ],
  155. "internalType": "struct PythStructs.Price",
  156. "name": "price",
  157. "type": "tuple"
  158. }
  159. ],
  160. "stateMutability": "view",
  161. "type": "function"
  162. },
  163. {
  164. "inputs": [
  165. {
  166. "internalType": "bytes32",
  167. "name": "id",
  168. "type": "bytes32"
  169. },
  170. {
  171. "internalType": "uint256",
  172. "name": "age",
  173. "type": "uint256"
  174. }
  175. ],
  176. "name": "getPriceNoOlderThan",
  177. "outputs": [
  178. {
  179. "components": [
  180. {
  181. "internalType": "int64",
  182. "name": "price",
  183. "type": "int64"
  184. },
  185. {
  186. "internalType": "uint64",
  187. "name": "conf",
  188. "type": "uint64"
  189. },
  190. {
  191. "internalType": "int32",
  192. "name": "expo",
  193. "type": "int32"
  194. },
  195. {
  196. "internalType": "uint256",
  197. "name": "publishTime",
  198. "type": "uint256"
  199. }
  200. ],
  201. "internalType": "struct PythStructs.Price",
  202. "name": "price",
  203. "type": "tuple"
  204. }
  205. ],
  206. "stateMutability": "view",
  207. "type": "function"
  208. },
  209. {
  210. "inputs": [
  211. {
  212. "internalType": "bytes32",
  213. "name": "id",
  214. "type": "bytes32"
  215. }
  216. ],
  217. "name": "getPriceUnsafe",
  218. "outputs": [
  219. {
  220. "components": [
  221. {
  222. "internalType": "int64",
  223. "name": "price",
  224. "type": "int64"
  225. },
  226. {
  227. "internalType": "uint64",
  228. "name": "conf",
  229. "type": "uint64"
  230. },
  231. {
  232. "internalType": "int32",
  233. "name": "expo",
  234. "type": "int32"
  235. },
  236. {
  237. "internalType": "uint256",
  238. "name": "publishTime",
  239. "type": "uint256"
  240. }
  241. ],
  242. "internalType": "struct PythStructs.Price",
  243. "name": "price",
  244. "type": "tuple"
  245. }
  246. ],
  247. "stateMutability": "view",
  248. "type": "function"
  249. },
  250. {
  251. "inputs": [
  252. {
  253. "internalType": "bytes[]",
  254. "name": "updateData",
  255. "type": "bytes[]"
  256. }
  257. ],
  258. "name": "getTwapUpdateFee",
  259. "outputs": [
  260. {
  261. "internalType": "uint256",
  262. "name": "feeAmount",
  263. "type": "uint256"
  264. }
  265. ],
  266. "stateMutability": "view",
  267. "type": "function"
  268. },
  269. {
  270. "inputs": [
  271. {
  272. "internalType": "bytes[]",
  273. "name": "updateData",
  274. "type": "bytes[]"
  275. }
  276. ],
  277. "name": "getUpdateFee",
  278. "outputs": [
  279. {
  280. "internalType": "uint256",
  281. "name": "feeAmount",
  282. "type": "uint256"
  283. }
  284. ],
  285. "stateMutability": "view",
  286. "type": "function"
  287. },
  288. {
  289. "inputs": [
  290. {
  291. "internalType": "bytes[]",
  292. "name": "updateData",
  293. "type": "bytes[]"
  294. },
  295. {
  296. "internalType": "bytes32[]",
  297. "name": "priceIds",
  298. "type": "bytes32[]"
  299. },
  300. {
  301. "internalType": "uint64",
  302. "name": "minPublishTime",
  303. "type": "uint64"
  304. },
  305. {
  306. "internalType": "uint64",
  307. "name": "maxPublishTime",
  308. "type": "uint64"
  309. }
  310. ],
  311. "name": "parsePriceFeedUpdates",
  312. "outputs": [
  313. {
  314. "components": [
  315. {
  316. "internalType": "bytes32",
  317. "name": "id",
  318. "type": "bytes32"
  319. },
  320. {
  321. "components": [
  322. {
  323. "internalType": "int64",
  324. "name": "price",
  325. "type": "int64"
  326. },
  327. {
  328. "internalType": "uint64",
  329. "name": "conf",
  330. "type": "uint64"
  331. },
  332. {
  333. "internalType": "int32",
  334. "name": "expo",
  335. "type": "int32"
  336. },
  337. {
  338. "internalType": "uint256",
  339. "name": "publishTime",
  340. "type": "uint256"
  341. }
  342. ],
  343. "internalType": "struct PythStructs.Price",
  344. "name": "price",
  345. "type": "tuple"
  346. },
  347. {
  348. "components": [
  349. {
  350. "internalType": "int64",
  351. "name": "price",
  352. "type": "int64"
  353. },
  354. {
  355. "internalType": "uint64",
  356. "name": "conf",
  357. "type": "uint64"
  358. },
  359. {
  360. "internalType": "int32",
  361. "name": "expo",
  362. "type": "int32"
  363. },
  364. {
  365. "internalType": "uint256",
  366. "name": "publishTime",
  367. "type": "uint256"
  368. }
  369. ],
  370. "internalType": "struct PythStructs.Price",
  371. "name": "emaPrice",
  372. "type": "tuple"
  373. }
  374. ],
  375. "internalType": "struct PythStructs.PriceFeed[]",
  376. "name": "priceFeeds",
  377. "type": "tuple[]"
  378. }
  379. ],
  380. "stateMutability": "payable",
  381. "type": "function"
  382. },
  383. {
  384. "inputs": [
  385. {
  386. "internalType": "bytes[]",
  387. "name": "updateData",
  388. "type": "bytes[]"
  389. },
  390. {
  391. "internalType": "bytes32[]",
  392. "name": "priceIds",
  393. "type": "bytes32[]"
  394. },
  395. {
  396. "internalType": "uint64",
  397. "name": "minPublishTime",
  398. "type": "uint64"
  399. },
  400. {
  401. "internalType": "uint64",
  402. "name": "maxPublishTime",
  403. "type": "uint64"
  404. }
  405. ],
  406. "name": "parsePriceFeedUpdatesUnique",
  407. "outputs": [
  408. {
  409. "components": [
  410. {
  411. "internalType": "bytes32",
  412. "name": "id",
  413. "type": "bytes32"
  414. },
  415. {
  416. "components": [
  417. {
  418. "internalType": "int64",
  419. "name": "price",
  420. "type": "int64"
  421. },
  422. {
  423. "internalType": "uint64",
  424. "name": "conf",
  425. "type": "uint64"
  426. },
  427. {
  428. "internalType": "int32",
  429. "name": "expo",
  430. "type": "int32"
  431. },
  432. {
  433. "internalType": "uint256",
  434. "name": "publishTime",
  435. "type": "uint256"
  436. }
  437. ],
  438. "internalType": "struct PythStructs.Price",
  439. "name": "price",
  440. "type": "tuple"
  441. },
  442. {
  443. "components": [
  444. {
  445. "internalType": "int64",
  446. "name": "price",
  447. "type": "int64"
  448. },
  449. {
  450. "internalType": "uint64",
  451. "name": "conf",
  452. "type": "uint64"
  453. },
  454. {
  455. "internalType": "int32",
  456. "name": "expo",
  457. "type": "int32"
  458. },
  459. {
  460. "internalType": "uint256",
  461. "name": "publishTime",
  462. "type": "uint256"
  463. }
  464. ],
  465. "internalType": "struct PythStructs.Price",
  466. "name": "emaPrice",
  467. "type": "tuple"
  468. }
  469. ],
  470. "internalType": "struct PythStructs.PriceFeed[]",
  471. "name": "priceFeeds",
  472. "type": "tuple[]"
  473. }
  474. ],
  475. "stateMutability": "payable",
  476. "type": "function"
  477. },
  478. {
  479. "inputs": [
  480. {
  481. "internalType": "bytes[]",
  482. "name": "updateData",
  483. "type": "bytes[]"
  484. },
  485. {
  486. "internalType": "bytes32[]",
  487. "name": "priceIds",
  488. "type": "bytes32[]"
  489. },
  490. {
  491. "internalType": "uint64",
  492. "name": "minAllowedPublishTime",
  493. "type": "uint64"
  494. },
  495. {
  496. "internalType": "uint64",
  497. "name": "maxAllowedPublishTime",
  498. "type": "uint64"
  499. },
  500. {
  501. "internalType": "bool",
  502. "name": "checkUniqueness",
  503. "type": "bool"
  504. },
  505. {
  506. "internalType": "bool",
  507. "name": "checkUpdateDataIsMinimal",
  508. "type": "bool"
  509. },
  510. {
  511. "internalType": "bool",
  512. "name": "storeUpdatesIfFresh",
  513. "type": "bool"
  514. }
  515. ],
  516. "name": "parsePriceFeedUpdatesWithConfig",
  517. "outputs": [
  518. {
  519. "components": [
  520. {
  521. "internalType": "bytes32",
  522. "name": "id",
  523. "type": "bytes32"
  524. },
  525. {
  526. "components": [
  527. {
  528. "internalType": "int64",
  529. "name": "price",
  530. "type": "int64"
  531. },
  532. {
  533. "internalType": "uint64",
  534. "name": "conf",
  535. "type": "uint64"
  536. },
  537. {
  538. "internalType": "int32",
  539. "name": "expo",
  540. "type": "int32"
  541. },
  542. {
  543. "internalType": "uint256",
  544. "name": "publishTime",
  545. "type": "uint256"
  546. }
  547. ],
  548. "internalType": "struct PythStructs.Price",
  549. "name": "price",
  550. "type": "tuple"
  551. },
  552. {
  553. "components": [
  554. {
  555. "internalType": "int64",
  556. "name": "price",
  557. "type": "int64"
  558. },
  559. {
  560. "internalType": "uint64",
  561. "name": "conf",
  562. "type": "uint64"
  563. },
  564. {
  565. "internalType": "int32",
  566. "name": "expo",
  567. "type": "int32"
  568. },
  569. {
  570. "internalType": "uint256",
  571. "name": "publishTime",
  572. "type": "uint256"
  573. }
  574. ],
  575. "internalType": "struct PythStructs.Price",
  576. "name": "emaPrice",
  577. "type": "tuple"
  578. }
  579. ],
  580. "internalType": "struct PythStructs.PriceFeed[]",
  581. "name": "priceFeeds",
  582. "type": "tuple[]"
  583. },
  584. {
  585. "internalType": "uint64[]",
  586. "name": "slots",
  587. "type": "uint64[]"
  588. }
  589. ],
  590. "stateMutability": "payable",
  591. "type": "function"
  592. },
  593. {
  594. "inputs": [
  595. {
  596. "internalType": "bytes[]",
  597. "name": "updateData",
  598. "type": "bytes[]"
  599. },
  600. {
  601. "internalType": "bytes32[]",
  602. "name": "priceIds",
  603. "type": "bytes32[]"
  604. }
  605. ],
  606. "name": "parseTwapPriceFeedUpdates",
  607. "outputs": [
  608. {
  609. "components": [
  610. {
  611. "internalType": "bytes32",
  612. "name": "id",
  613. "type": "bytes32"
  614. },
  615. {
  616. "internalType": "uint64",
  617. "name": "startTime",
  618. "type": "uint64"
  619. },
  620. {
  621. "internalType": "uint64",
  622. "name": "endTime",
  623. "type": "uint64"
  624. },
  625. {
  626. "components": [
  627. {
  628. "internalType": "int64",
  629. "name": "price",
  630. "type": "int64"
  631. },
  632. {
  633. "internalType": "uint64",
  634. "name": "conf",
  635. "type": "uint64"
  636. },
  637. {
  638. "internalType": "int32",
  639. "name": "expo",
  640. "type": "int32"
  641. },
  642. {
  643. "internalType": "uint256",
  644. "name": "publishTime",
  645. "type": "uint256"
  646. }
  647. ],
  648. "internalType": "struct PythStructs.Price",
  649. "name": "twap",
  650. "type": "tuple"
  651. },
  652. {
  653. "internalType": "uint32",
  654. "name": "downSlotsRatio",
  655. "type": "uint32"
  656. }
  657. ],
  658. "internalType": "struct PythStructs.TwapPriceFeed[]",
  659. "name": "twapPriceFeeds",
  660. "type": "tuple[]"
  661. }
  662. ],
  663. "stateMutability": "payable",
  664. "type": "function"
  665. },
  666. {
  667. "inputs": [
  668. {
  669. "internalType": "bytes[]",
  670. "name": "updateData",
  671. "type": "bytes[]"
  672. }
  673. ],
  674. "name": "updatePriceFeeds",
  675. "outputs": [],
  676. "stateMutability": "payable",
  677. "type": "function"
  678. },
  679. {
  680. "inputs": [
  681. {
  682. "internalType": "bytes[]",
  683. "name": "updateData",
  684. "type": "bytes[]"
  685. },
  686. {
  687. "internalType": "bytes32[]",
  688. "name": "priceIds",
  689. "type": "bytes32[]"
  690. },
  691. {
  692. "internalType": "uint64[]",
  693. "name": "publishTimes",
  694. "type": "uint64[]"
  695. }
  696. ],
  697. "name": "updatePriceFeedsIfNecessary",
  698. "outputs": [],
  699. "stateMutability": "payable",
  700. "type": "function"
  701. }
  702. ]