router.json 221 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525
  1. {
  2. "address": "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0",
  3. "abi": [
  4. {
  5. "inputs": [],
  6. "stateMutability": "nonpayable",
  7. "type": "constructor"
  8. },
  9. {
  10. "anonymous": false,
  11. "inputs": [
  12. {
  13. "indexed": false,
  14. "internalType": "uint16",
  15. "name": "chainId",
  16. "type": "uint16"
  17. },
  18. {
  19. "indexed": false,
  20. "internalType": "bytes",
  21. "name": "srcAddress",
  22. "type": "bytes"
  23. },
  24. {
  25. "indexed": false,
  26. "internalType": "uint256",
  27. "name": "nonce",
  28. "type": "uint256"
  29. },
  30. {
  31. "indexed": false,
  32. "internalType": "address",
  33. "name": "token",
  34. "type": "address"
  35. },
  36. {
  37. "indexed": false,
  38. "internalType": "uint256",
  39. "name": "amountLD",
  40. "type": "uint256"
  41. },
  42. {
  43. "indexed": false,
  44. "internalType": "address",
  45. "name": "to",
  46. "type": "address"
  47. },
  48. {
  49. "indexed": false,
  50. "internalType": "bytes",
  51. "name": "payload",
  52. "type": "bytes"
  53. }
  54. ],
  55. "name": "CachedSwapSaved",
  56. "type": "event"
  57. },
  58. {
  59. "anonymous": false,
  60. "inputs": [
  61. {
  62. "indexed": true,
  63. "internalType": "address",
  64. "name": "previousOwner",
  65. "type": "address"
  66. },
  67. {
  68. "indexed": true,
  69. "internalType": "address",
  70. "name": "newOwner",
  71. "type": "address"
  72. }
  73. ],
  74. "name": "OwnershipTransferred",
  75. "type": "event"
  76. },
  77. {
  78. "anonymous": false,
  79. "inputs": [
  80. {
  81. "indexed": false,
  82. "internalType": "uint16",
  83. "name": "chainId",
  84. "type": "uint16"
  85. },
  86. {
  87. "indexed": false,
  88. "internalType": "bytes",
  89. "name": "srcAddress",
  90. "type": "bytes"
  91. },
  92. {
  93. "indexed": false,
  94. "internalType": "uint256",
  95. "name": "nonce",
  96. "type": "uint256"
  97. },
  98. {
  99. "indexed": false,
  100. "internalType": "address",
  101. "name": "token",
  102. "type": "address"
  103. },
  104. {
  105. "indexed": false,
  106. "internalType": "uint256",
  107. "name": "amountLD",
  108. "type": "uint256"
  109. },
  110. {
  111. "indexed": false,
  112. "internalType": "bytes",
  113. "name": "payload",
  114. "type": "bytes"
  115. },
  116. {
  117. "indexed": false,
  118. "internalType": "string",
  119. "name": "reason",
  120. "type": "string"
  121. }
  122. ],
  123. "name": "ReceiveFailed",
  124. "type": "event"
  125. },
  126. {
  127. "anonymous": false,
  128. "inputs": [
  129. {
  130. "indexed": false,
  131. "internalType": "uint8",
  132. "name": "bridgeFunctionType",
  133. "type": "uint8"
  134. },
  135. {
  136. "indexed": false,
  137. "internalType": "uint16",
  138. "name": "chainId",
  139. "type": "uint16"
  140. },
  141. {
  142. "indexed": false,
  143. "internalType": "bytes",
  144. "name": "srcAddress",
  145. "type": "bytes"
  146. },
  147. {
  148. "indexed": false,
  149. "internalType": "uint256",
  150. "name": "nonce",
  151. "type": "uint256"
  152. }
  153. ],
  154. "name": "Revert",
  155. "type": "event"
  156. },
  157. {
  158. "inputs": [],
  159. "name": "TYPE_REDEEM_LOCAL_CALLBACK_RETRY",
  160. "outputs": [
  161. {
  162. "internalType": "uint8",
  163. "name": "",
  164. "type": "uint8"
  165. }
  166. ],
  167. "stateMutability": "view",
  168. "type": "function"
  169. },
  170. {
  171. "inputs": [],
  172. "name": "TYPE_REDEEM_LOCAL_RESPONSE",
  173. "outputs": [
  174. {
  175. "internalType": "uint8",
  176. "name": "",
  177. "type": "uint8"
  178. }
  179. ],
  180. "stateMutability": "view",
  181. "type": "function"
  182. },
  183. {
  184. "inputs": [],
  185. "name": "TYPE_SWAP_REMOTE_RETRY",
  186. "outputs": [
  187. {
  188. "internalType": "uint8",
  189. "name": "",
  190. "type": "uint8"
  191. }
  192. ],
  193. "stateMutability": "view",
  194. "type": "function"
  195. },
  196. {
  197. "inputs": [
  198. {
  199. "internalType": "uint256",
  200. "name": "_poolId",
  201. "type": "uint256"
  202. },
  203. {
  204. "internalType": "uint16",
  205. "name": "_dstChainId",
  206. "type": "uint16"
  207. },
  208. {
  209. "internalType": "uint256",
  210. "name": "_dstPoolId",
  211. "type": "uint256"
  212. }
  213. ],
  214. "name": "activateChainPath",
  215. "outputs": [],
  216. "stateMutability": "nonpayable",
  217. "type": "function"
  218. },
  219. {
  220. "inputs": [
  221. {
  222. "internalType": "uint256",
  223. "name": "_poolId",
  224. "type": "uint256"
  225. },
  226. {
  227. "internalType": "uint256",
  228. "name": "_amountLD",
  229. "type": "uint256"
  230. },
  231. {
  232. "internalType": "address",
  233. "name": "_to",
  234. "type": "address"
  235. }
  236. ],
  237. "name": "addLiquidity",
  238. "outputs": [],
  239. "stateMutability": "nonpayable",
  240. "type": "function"
  241. },
  242. {
  243. "inputs": [],
  244. "name": "bridge",
  245. "outputs": [
  246. {
  247. "internalType": "contract Bridge",
  248. "name": "",
  249. "type": "address"
  250. }
  251. ],
  252. "stateMutability": "view",
  253. "type": "function"
  254. },
  255. {
  256. "inputs": [
  257. {
  258. "internalType": "uint16",
  259. "name": "",
  260. "type": "uint16"
  261. },
  262. {
  263. "internalType": "bytes",
  264. "name": "",
  265. "type": "bytes"
  266. },
  267. {
  268. "internalType": "uint256",
  269. "name": "",
  270. "type": "uint256"
  271. }
  272. ],
  273. "name": "cachedSwapLookup",
  274. "outputs": [
  275. {
  276. "internalType": "address",
  277. "name": "token",
  278. "type": "address"
  279. },
  280. {
  281. "internalType": "uint256",
  282. "name": "amountLD",
  283. "type": "uint256"
  284. },
  285. {
  286. "internalType": "address",
  287. "name": "to",
  288. "type": "address"
  289. },
  290. {
  291. "internalType": "bytes",
  292. "name": "payload",
  293. "type": "bytes"
  294. }
  295. ],
  296. "stateMutability": "view",
  297. "type": "function"
  298. },
  299. {
  300. "inputs": [
  301. {
  302. "internalType": "uint256",
  303. "name": "_poolId",
  304. "type": "uint256"
  305. },
  306. {
  307. "internalType": "bool",
  308. "name": "_fullMode",
  309. "type": "bool"
  310. }
  311. ],
  312. "name": "callDelta",
  313. "outputs": [],
  314. "stateMutability": "nonpayable",
  315. "type": "function"
  316. },
  317. {
  318. "inputs": [
  319. {
  320. "internalType": "uint16",
  321. "name": "_dstChainId",
  322. "type": "uint16"
  323. },
  324. {
  325. "internalType": "bytes",
  326. "name": "_srcAddress",
  327. "type": "bytes"
  328. },
  329. {
  330. "internalType": "uint256",
  331. "name": "_nonce",
  332. "type": "uint256"
  333. }
  334. ],
  335. "name": "clearCachedSwap",
  336. "outputs": [],
  337. "stateMutability": "nonpayable",
  338. "type": "function"
  339. },
  340. {
  341. "inputs": [
  342. {
  343. "internalType": "uint256",
  344. "name": "_poolId",
  345. "type": "uint256"
  346. },
  347. {
  348. "internalType": "uint16",
  349. "name": "_dstChainId",
  350. "type": "uint16"
  351. },
  352. {
  353. "internalType": "uint256",
  354. "name": "_dstPoolId",
  355. "type": "uint256"
  356. },
  357. {
  358. "internalType": "uint256",
  359. "name": "_weight",
  360. "type": "uint256"
  361. }
  362. ],
  363. "name": "createChainPath",
  364. "outputs": [],
  365. "stateMutability": "nonpayable",
  366. "type": "function"
  367. },
  368. {
  369. "inputs": [
  370. {
  371. "internalType": "uint256",
  372. "name": "_poolId",
  373. "type": "uint256"
  374. },
  375. {
  376. "internalType": "address",
  377. "name": "_token",
  378. "type": "address"
  379. },
  380. {
  381. "internalType": "uint8",
  382. "name": "_sharedDecimals",
  383. "type": "uint8"
  384. },
  385. {
  386. "internalType": "uint8",
  387. "name": "_localDecimals",
  388. "type": "uint8"
  389. },
  390. {
  391. "internalType": "string",
  392. "name": "_name",
  393. "type": "string"
  394. },
  395. {
  396. "internalType": "string",
  397. "name": "_symbol",
  398. "type": "string"
  399. }
  400. ],
  401. "name": "createPool",
  402. "outputs": [
  403. {
  404. "internalType": "address",
  405. "name": "",
  406. "type": "address"
  407. }
  408. ],
  409. "stateMutability": "nonpayable",
  410. "type": "function"
  411. },
  412. {
  413. "inputs": [
  414. {
  415. "internalType": "uint16",
  416. "name": "_dstChainId",
  417. "type": "uint16"
  418. },
  419. {
  420. "internalType": "uint256",
  421. "name": "_dstPoolId",
  422. "type": "uint256"
  423. },
  424. {
  425. "internalType": "uint256",
  426. "name": "_srcPoolId",
  427. "type": "uint256"
  428. },
  429. {
  430. "components": [
  431. {
  432. "internalType": "uint256",
  433. "name": "credits",
  434. "type": "uint256"
  435. },
  436. {
  437. "internalType": "uint256",
  438. "name": "idealBalance",
  439. "type": "uint256"
  440. }
  441. ],
  442. "internalType": "struct Pool.CreditObj",
  443. "name": "_c",
  444. "type": "tuple"
  445. }
  446. ],
  447. "name": "creditChainPath",
  448. "outputs": [],
  449. "stateMutability": "nonpayable",
  450. "type": "function"
  451. },
  452. {
  453. "inputs": [],
  454. "name": "factory",
  455. "outputs": [
  456. {
  457. "internalType": "contract Factory",
  458. "name": "",
  459. "type": "address"
  460. }
  461. ],
  462. "stateMutability": "view",
  463. "type": "function"
  464. },
  465. {
  466. "inputs": [],
  467. "name": "mintFeeOwner",
  468. "outputs": [
  469. {
  470. "internalType": "address",
  471. "name": "",
  472. "type": "address"
  473. }
  474. ],
  475. "stateMutability": "view",
  476. "type": "function"
  477. },
  478. {
  479. "inputs": [],
  480. "name": "owner",
  481. "outputs": [
  482. {
  483. "internalType": "address",
  484. "name": "",
  485. "type": "address"
  486. }
  487. ],
  488. "stateMutability": "view",
  489. "type": "function"
  490. },
  491. {
  492. "inputs": [],
  493. "name": "protocolFeeOwner",
  494. "outputs": [
  495. {
  496. "internalType": "address",
  497. "name": "",
  498. "type": "address"
  499. }
  500. ],
  501. "stateMutability": "view",
  502. "type": "function"
  503. },
  504. {
  505. "inputs": [
  506. {
  507. "internalType": "uint16",
  508. "name": "_dstChainId",
  509. "type": "uint16"
  510. },
  511. {
  512. "internalType": "uint8",
  513. "name": "_functionType",
  514. "type": "uint8"
  515. },
  516. {
  517. "internalType": "bytes",
  518. "name": "_toAddress",
  519. "type": "bytes"
  520. },
  521. {
  522. "internalType": "bytes",
  523. "name": "_transferAndCallPayload",
  524. "type": "bytes"
  525. },
  526. {
  527. "components": [
  528. {
  529. "internalType": "uint256",
  530. "name": "dstGasForCall",
  531. "type": "uint256"
  532. },
  533. {
  534. "internalType": "uint256",
  535. "name": "dstNativeAmount",
  536. "type": "uint256"
  537. },
  538. {
  539. "internalType": "bytes",
  540. "name": "dstNativeAddr",
  541. "type": "bytes"
  542. }
  543. ],
  544. "internalType": "struct Router.lzTxObj",
  545. "name": "_lzTxParams",
  546. "type": "tuple"
  547. }
  548. ],
  549. "name": "quoteLayerZeroFee",
  550. "outputs": [
  551. {
  552. "internalType": "uint256",
  553. "name": "",
  554. "type": "uint256"
  555. }
  556. ],
  557. "stateMutability": "view",
  558. "type": "function"
  559. },
  560. {
  561. "inputs": [
  562. {
  563. "internalType": "uint16",
  564. "name": "_dstChainId",
  565. "type": "uint16"
  566. },
  567. {
  568. "internalType": "uint256",
  569. "name": "_srcPoolId",
  570. "type": "uint256"
  571. },
  572. {
  573. "internalType": "uint256",
  574. "name": "_dstPoolId",
  575. "type": "uint256"
  576. },
  577. {
  578. "internalType": "address payable",
  579. "name": "_refundAddress",
  580. "type": "address"
  581. },
  582. {
  583. "internalType": "uint256",
  584. "name": "_amountLP",
  585. "type": "uint256"
  586. },
  587. {
  588. "internalType": "bytes",
  589. "name": "_to",
  590. "type": "bytes"
  591. },
  592. {
  593. "components": [
  594. {
  595. "internalType": "uint256",
  596. "name": "dstGasForCall",
  597. "type": "uint256"
  598. },
  599. {
  600. "internalType": "uint256",
  601. "name": "dstNativeAmount",
  602. "type": "uint256"
  603. },
  604. {
  605. "internalType": "bytes",
  606. "name": "dstNativeAddr",
  607. "type": "bytes"
  608. }
  609. ],
  610. "internalType": "struct Router.lzTxObj",
  611. "name": "_lzTxParams",
  612. "type": "tuple"
  613. }
  614. ],
  615. "name": "redeemLocal",
  616. "outputs": [],
  617. "stateMutability": "payable",
  618. "type": "function"
  619. },
  620. {
  621. "inputs": [
  622. {
  623. "internalType": "uint16",
  624. "name": "_srcChainId",
  625. "type": "uint16"
  626. },
  627. {
  628. "internalType": "bytes",
  629. "name": "_srcAddress",
  630. "type": "bytes"
  631. },
  632. {
  633. "internalType": "uint256",
  634. "name": "_nonce",
  635. "type": "uint256"
  636. },
  637. {
  638. "internalType": "uint256",
  639. "name": "_srcPoolId",
  640. "type": "uint256"
  641. },
  642. {
  643. "internalType": "uint256",
  644. "name": "_dstPoolId",
  645. "type": "uint256"
  646. },
  647. {
  648. "internalType": "address",
  649. "name": "_to",
  650. "type": "address"
  651. },
  652. {
  653. "internalType": "uint256",
  654. "name": "_amountSD",
  655. "type": "uint256"
  656. },
  657. {
  658. "internalType": "uint256",
  659. "name": "_mintAmountSD",
  660. "type": "uint256"
  661. }
  662. ],
  663. "name": "redeemLocalCallback",
  664. "outputs": [],
  665. "stateMutability": "nonpayable",
  666. "type": "function"
  667. },
  668. {
  669. "inputs": [
  670. {
  671. "internalType": "uint16",
  672. "name": "_srcChainId",
  673. "type": "uint16"
  674. },
  675. {
  676. "internalType": "bytes",
  677. "name": "_srcAddress",
  678. "type": "bytes"
  679. },
  680. {
  681. "internalType": "uint256",
  682. "name": "_nonce",
  683. "type": "uint256"
  684. },
  685. {
  686. "internalType": "uint256",
  687. "name": "_srcPoolId",
  688. "type": "uint256"
  689. },
  690. {
  691. "internalType": "uint256",
  692. "name": "_dstPoolId",
  693. "type": "uint256"
  694. },
  695. {
  696. "internalType": "uint256",
  697. "name": "_amountSD",
  698. "type": "uint256"
  699. },
  700. {
  701. "internalType": "bytes",
  702. "name": "_to",
  703. "type": "bytes"
  704. }
  705. ],
  706. "name": "redeemLocalCheckOnRemote",
  707. "outputs": [],
  708. "stateMutability": "nonpayable",
  709. "type": "function"
  710. },
  711. {
  712. "inputs": [
  713. {
  714. "internalType": "uint16",
  715. "name": "_dstChainId",
  716. "type": "uint16"
  717. },
  718. {
  719. "internalType": "uint256",
  720. "name": "_srcPoolId",
  721. "type": "uint256"
  722. },
  723. {
  724. "internalType": "uint256",
  725. "name": "_dstPoolId",
  726. "type": "uint256"
  727. },
  728. {
  729. "internalType": "address payable",
  730. "name": "_refundAddress",
  731. "type": "address"
  732. },
  733. {
  734. "internalType": "uint256",
  735. "name": "_amountLP",
  736. "type": "uint256"
  737. },
  738. {
  739. "internalType": "uint256",
  740. "name": "_minAmountLD",
  741. "type": "uint256"
  742. },
  743. {
  744. "internalType": "bytes",
  745. "name": "_to",
  746. "type": "bytes"
  747. },
  748. {
  749. "components": [
  750. {
  751. "internalType": "uint256",
  752. "name": "dstGasForCall",
  753. "type": "uint256"
  754. },
  755. {
  756. "internalType": "uint256",
  757. "name": "dstNativeAmount",
  758. "type": "uint256"
  759. },
  760. {
  761. "internalType": "bytes",
  762. "name": "dstNativeAddr",
  763. "type": "bytes"
  764. }
  765. ],
  766. "internalType": "struct Router.lzTxObj",
  767. "name": "_lzTxParams",
  768. "type": "tuple"
  769. }
  770. ],
  771. "name": "redeemRemote",
  772. "outputs": [],
  773. "stateMutability": "payable",
  774. "type": "function"
  775. },
  776. {
  777. "inputs": [],
  778. "name": "renounceOwnership",
  779. "outputs": [],
  780. "stateMutability": "nonpayable",
  781. "type": "function"
  782. },
  783. {
  784. "inputs": [
  785. {
  786. "internalType": "uint16",
  787. "name": "_dstChainId",
  788. "type": "uint16"
  789. },
  790. {
  791. "internalType": "bytes",
  792. "name": "_srcAddress",
  793. "type": "bytes"
  794. },
  795. {
  796. "internalType": "uint256",
  797. "name": "_nonce",
  798. "type": "uint256"
  799. }
  800. ],
  801. "name": "retryRevert",
  802. "outputs": [],
  803. "stateMutability": "payable",
  804. "type": "function"
  805. },
  806. {
  807. "inputs": [
  808. {
  809. "internalType": "uint16",
  810. "name": "_dstChainId",
  811. "type": "uint16"
  812. },
  813. {
  814. "internalType": "bytes",
  815. "name": "_srcAddress",
  816. "type": "bytes"
  817. },
  818. {
  819. "internalType": "uint256",
  820. "name": "_nonce",
  821. "type": "uint256"
  822. },
  823. {
  824. "internalType": "address payable",
  825. "name": "_refundAddress",
  826. "type": "address"
  827. },
  828. {
  829. "components": [
  830. {
  831. "internalType": "uint256",
  832. "name": "dstGasForCall",
  833. "type": "uint256"
  834. },
  835. {
  836. "internalType": "uint256",
  837. "name": "dstNativeAmount",
  838. "type": "uint256"
  839. },
  840. {
  841. "internalType": "bytes",
  842. "name": "dstNativeAddr",
  843. "type": "bytes"
  844. }
  845. ],
  846. "internalType": "struct Router.lzTxObj",
  847. "name": "_lzTxParams",
  848. "type": "tuple"
  849. }
  850. ],
  851. "name": "revertRedeemLocal",
  852. "outputs": [],
  853. "stateMutability": "payable",
  854. "type": "function"
  855. },
  856. {
  857. "inputs": [
  858. {
  859. "internalType": "uint16",
  860. "name": "",
  861. "type": "uint16"
  862. },
  863. {
  864. "internalType": "bytes",
  865. "name": "",
  866. "type": "bytes"
  867. },
  868. {
  869. "internalType": "uint256",
  870. "name": "",
  871. "type": "uint256"
  872. }
  873. ],
  874. "name": "revertLookup",
  875. "outputs": [
  876. {
  877. "internalType": "bytes",
  878. "name": "",
  879. "type": "bytes"
  880. }
  881. ],
  882. "stateMutability": "view",
  883. "type": "function"
  884. },
  885. {
  886. "inputs": [
  887. {
  888. "internalType": "uint16",
  889. "name": "_dstChainId",
  890. "type": "uint16"
  891. },
  892. {
  893. "internalType": "uint256",
  894. "name": "_srcPoolId",
  895. "type": "uint256"
  896. },
  897. {
  898. "internalType": "uint256",
  899. "name": "_dstPoolId",
  900. "type": "uint256"
  901. },
  902. {
  903. "internalType": "address payable",
  904. "name": "_refundAddress",
  905. "type": "address"
  906. }
  907. ],
  908. "name": "sendCredits",
  909. "outputs": [],
  910. "stateMutability": "payable",
  911. "type": "function"
  912. },
  913. {
  914. "inputs": [
  915. {
  916. "internalType": "contract Bridge",
  917. "name": "_bridge",
  918. "type": "address"
  919. },
  920. {
  921. "internalType": "contract Factory",
  922. "name": "_factory",
  923. "type": "address"
  924. }
  925. ],
  926. "name": "setBridgeAndFactory",
  927. "outputs": [],
  928. "stateMutability": "nonpayable",
  929. "type": "function"
  930. },
  931. {
  932. "inputs": [
  933. {
  934. "internalType": "uint256",
  935. "name": "_poolId",
  936. "type": "uint256"
  937. },
  938. {
  939. "internalType": "bool",
  940. "name": "_batched",
  941. "type": "bool"
  942. },
  943. {
  944. "internalType": "uint256",
  945. "name": "_swapDeltaBP",
  946. "type": "uint256"
  947. },
  948. {
  949. "internalType": "uint256",
  950. "name": "_lpDeltaBP",
  951. "type": "uint256"
  952. },
  953. {
  954. "internalType": "bool",
  955. "name": "_defaultSwapMode",
  956. "type": "bool"
  957. },
  958. {
  959. "internalType": "bool",
  960. "name": "_defaultLPMode",
  961. "type": "bool"
  962. }
  963. ],
  964. "name": "setDeltaParam",
  965. "outputs": [],
  966. "stateMutability": "nonpayable",
  967. "type": "function"
  968. },
  969. {
  970. "inputs": [
  971. {
  972. "internalType": "uint256",
  973. "name": "_poolId",
  974. "type": "uint256"
  975. },
  976. {
  977. "internalType": "address",
  978. "name": "_feeLibraryAddr",
  979. "type": "address"
  980. }
  981. ],
  982. "name": "setFeeLibrary",
  983. "outputs": [],
  984. "stateMutability": "nonpayable",
  985. "type": "function"
  986. },
  987. {
  988. "inputs": [
  989. {
  990. "internalType": "uint256",
  991. "name": "_poolId",
  992. "type": "uint256"
  993. },
  994. {
  995. "internalType": "uint256",
  996. "name": "_mintFeeBP",
  997. "type": "uint256"
  998. }
  999. ],
  1000. "name": "setFees",
  1001. "outputs": [],
  1002. "stateMutability": "nonpayable",
  1003. "type": "function"
  1004. },
  1005. {
  1006. "inputs": [
  1007. {
  1008. "internalType": "address",
  1009. "name": "_owner",
  1010. "type": "address"
  1011. }
  1012. ],
  1013. "name": "setMintFeeOwner",
  1014. "outputs": [],
  1015. "stateMutability": "nonpayable",
  1016. "type": "function"
  1017. },
  1018. {
  1019. "inputs": [
  1020. {
  1021. "internalType": "address",
  1022. "name": "_owner",
  1023. "type": "address"
  1024. }
  1025. ],
  1026. "name": "setProtocolFeeOwner",
  1027. "outputs": [],
  1028. "stateMutability": "nonpayable",
  1029. "type": "function"
  1030. },
  1031. {
  1032. "inputs": [
  1033. {
  1034. "internalType": "uint256",
  1035. "name": "_poolId",
  1036. "type": "uint256"
  1037. },
  1038. {
  1039. "internalType": "bool",
  1040. "name": "_swapStop",
  1041. "type": "bool"
  1042. }
  1043. ],
  1044. "name": "setSwapStop",
  1045. "outputs": [],
  1046. "stateMutability": "nonpayable",
  1047. "type": "function"
  1048. },
  1049. {
  1050. "inputs": [
  1051. {
  1052. "internalType": "uint256",
  1053. "name": "_poolId",
  1054. "type": "uint256"
  1055. },
  1056. {
  1057. "internalType": "uint16",
  1058. "name": "_dstChainId",
  1059. "type": "uint16"
  1060. },
  1061. {
  1062. "internalType": "uint256",
  1063. "name": "_dstPoolId",
  1064. "type": "uint256"
  1065. },
  1066. {
  1067. "internalType": "uint16",
  1068. "name": "_weight",
  1069. "type": "uint16"
  1070. }
  1071. ],
  1072. "name": "setWeightForChainPath",
  1073. "outputs": [],
  1074. "stateMutability": "nonpayable",
  1075. "type": "function"
  1076. },
  1077. {
  1078. "inputs": [
  1079. {
  1080. "internalType": "uint16",
  1081. "name": "_dstChainId",
  1082. "type": "uint16"
  1083. },
  1084. {
  1085. "internalType": "uint256",
  1086. "name": "_srcPoolId",
  1087. "type": "uint256"
  1088. },
  1089. {
  1090. "internalType": "uint256",
  1091. "name": "_dstPoolId",
  1092. "type": "uint256"
  1093. },
  1094. {
  1095. "internalType": "address payable",
  1096. "name": "_refundAddress",
  1097. "type": "address"
  1098. },
  1099. {
  1100. "internalType": "uint256",
  1101. "name": "_amountLD",
  1102. "type": "uint256"
  1103. },
  1104. {
  1105. "internalType": "uint256",
  1106. "name": "_minAmountLD",
  1107. "type": "uint256"
  1108. },
  1109. {
  1110. "components": [
  1111. {
  1112. "internalType": "uint256",
  1113. "name": "dstGasForCall",
  1114. "type": "uint256"
  1115. },
  1116. {
  1117. "internalType": "uint256",
  1118. "name": "dstNativeAmount",
  1119. "type": "uint256"
  1120. },
  1121. {
  1122. "internalType": "bytes",
  1123. "name": "dstNativeAddr",
  1124. "type": "bytes"
  1125. }
  1126. ],
  1127. "internalType": "struct Router.lzTxObj",
  1128. "name": "_lzTxParams",
  1129. "type": "tuple"
  1130. },
  1131. {
  1132. "internalType": "bytes",
  1133. "name": "_to",
  1134. "type": "bytes"
  1135. },
  1136. {
  1137. "internalType": "bytes",
  1138. "name": "_payload",
  1139. "type": "bytes"
  1140. }
  1141. ],
  1142. "name": "swap",
  1143. "outputs": [],
  1144. "stateMutability": "payable",
  1145. "type": "function"
  1146. },
  1147. {
  1148. "inputs": [
  1149. {
  1150. "internalType": "uint16",
  1151. "name": "_srcChainId",
  1152. "type": "uint16"
  1153. },
  1154. {
  1155. "internalType": "bytes",
  1156. "name": "_srcAddress",
  1157. "type": "bytes"
  1158. },
  1159. {
  1160. "internalType": "uint256",
  1161. "name": "_nonce",
  1162. "type": "uint256"
  1163. },
  1164. {
  1165. "internalType": "uint256",
  1166. "name": "_srcPoolId",
  1167. "type": "uint256"
  1168. },
  1169. {
  1170. "internalType": "uint256",
  1171. "name": "_dstPoolId",
  1172. "type": "uint256"
  1173. },
  1174. {
  1175. "internalType": "uint256",
  1176. "name": "_dstGasForCall",
  1177. "type": "uint256"
  1178. },
  1179. {
  1180. "internalType": "address",
  1181. "name": "_to",
  1182. "type": "address"
  1183. },
  1184. {
  1185. "components": [
  1186. {
  1187. "internalType": "uint256",
  1188. "name": "amount",
  1189. "type": "uint256"
  1190. },
  1191. {
  1192. "internalType": "uint256",
  1193. "name": "eqFee",
  1194. "type": "uint256"
  1195. },
  1196. {
  1197. "internalType": "uint256",
  1198. "name": "eqReward",
  1199. "type": "uint256"
  1200. },
  1201. {
  1202. "internalType": "uint256",
  1203. "name": "lpFee",
  1204. "type": "uint256"
  1205. },
  1206. {
  1207. "internalType": "uint256",
  1208. "name": "protocolFee",
  1209. "type": "uint256"
  1210. },
  1211. {
  1212. "internalType": "uint256",
  1213. "name": "lkbRemove",
  1214. "type": "uint256"
  1215. }
  1216. ],
  1217. "internalType": "struct Pool.SwapObj",
  1218. "name": "_s",
  1219. "type": "tuple"
  1220. },
  1221. {
  1222. "internalType": "bytes",
  1223. "name": "_payload",
  1224. "type": "bytes"
  1225. }
  1226. ],
  1227. "name": "swapRemote",
  1228. "outputs": [],
  1229. "stateMutability": "nonpayable",
  1230. "type": "function"
  1231. },
  1232. {
  1233. "inputs": [
  1234. {
  1235. "internalType": "address",
  1236. "name": "newOwner",
  1237. "type": "address"
  1238. }
  1239. ],
  1240. "name": "transferOwnership",
  1241. "outputs": [],
  1242. "stateMutability": "nonpayable",
  1243. "type": "function"
  1244. },
  1245. {
  1246. "inputs": [
  1247. {
  1248. "internalType": "uint256",
  1249. "name": "_poolId",
  1250. "type": "uint256"
  1251. },
  1252. {
  1253. "internalType": "address",
  1254. "name": "_to",
  1255. "type": "address"
  1256. }
  1257. ],
  1258. "name": "withdrawMintFee",
  1259. "outputs": [],
  1260. "stateMutability": "nonpayable",
  1261. "type": "function"
  1262. },
  1263. {
  1264. "inputs": [
  1265. {
  1266. "internalType": "uint256",
  1267. "name": "_poolId",
  1268. "type": "uint256"
  1269. },
  1270. {
  1271. "internalType": "address",
  1272. "name": "_to",
  1273. "type": "address"
  1274. }
  1275. ],
  1276. "name": "withdrawProtocolFee",
  1277. "outputs": [],
  1278. "stateMutability": "nonpayable",
  1279. "type": "function"
  1280. }
  1281. ],
  1282. "transactionHash": "0x6db68c2df4a2a73ff4fc18df891e4c9631a832ccf8866f97d86e944420a87b70",
  1283. "receipt": {
  1284. "to": null,
  1285. "from": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
  1286. "contractAddress": "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0",
  1287. "transactionIndex": 0,
  1288. "gasUsed": "4268712",
  1289. "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000040200000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000100000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000002000000000000000000020000000000000000000000000000000000000000000000000400000000000000000",
  1290. "blockHash": "0xab8edf8691faf6ee82bd6b3e836fb6fbfabc907a92831a73eec3fd05b1c8fec3",
  1291. "transactionHash": "0x6db68c2df4a2a73ff4fc18df891e4c9631a832ccf8866f97d86e944420a87b70",
  1292. "logs": [
  1293. {
  1294. "transactionIndex": 0,
  1295. "blockNumber": 3,
  1296. "transactionHash": "0x6db68c2df4a2a73ff4fc18df891e4c9631a832ccf8866f97d86e944420a87b70",
  1297. "address": "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0",
  1298. "topics": [
  1299. "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
  1300. "0x0000000000000000000000000000000000000000000000000000000000000000",
  1301. "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266"
  1302. ],
  1303. "data": "0x",
  1304. "logIndex": 0,
  1305. "blockHash": "0xab8edf8691faf6ee82bd6b3e836fb6fbfabc907a92831a73eec3fd05b1c8fec3"
  1306. }
  1307. ],
  1308. "blockNumber": 3,
  1309. "cumulativeGasUsed": "4268712",
  1310. "status": 1,
  1311. "byzantium": true
  1312. },
  1313. "args": [],
  1314. "numDeployments": 1,
  1315. "solcInputHash": "93695e8f8ff858f44ba540ebbfec827c",
  1316. "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountLD\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"CachedSwapSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountLD\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"reason\",\"type\":\"string\"}],\"name\":\"ReceiveFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"bridgeFunctionType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"chainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"Revert\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"TYPE_REDEEM_LOCAL_CALLBACK_RETRY\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TYPE_REDEEM_LOCAL_RESPONSE\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TYPE_SWAP_REMOTE_RETRY\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_poolId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_dstPoolId\",\"type\":\"uint256\"}],\"name\":\"activateChainPath\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_poolId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amountLD\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"addLiquidity\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract Bridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"cachedSwapLookup\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountLD\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_poolId\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_fullMode\",\"type\":\"bool\"}],\"name\":\"callDelta\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"clearCachedSwap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_poolId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_dstPoolId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_weight\",\"type\":\"uint256\"}],\"name\":\"createChainPath\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_poolId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"_sharedDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"_localDecimals\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"name\":\"createPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_dstPoolId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_srcPoolId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"credits\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"idealBalance\",\"type\":\"uint256\"}],\"internalType\":\"struct Pool.CreditObj\",\"name\":\"_c\",\"type\":\"tuple\"}],\"name\":\"creditChainPath\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"contract Factory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"mintFeeOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"protocolFeeOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"_functionType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"_toAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_transferAndCallPayload\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"dstGasForCall\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dstNativeAmount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"dstNativeAddr\",\"type\":\"bytes\"}],\"internalType\":\"struct Router.lzTxObj\",\"name\":\"_lzTxParams\",\"type\":\"tuple\"}],\"name\":\"quoteLayerZeroFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_srcPoolId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_dstPoolId\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_refundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amountLP\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_to\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"dstGasForCall\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dstNativeAmount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"dstNativeAddr\",\"type\":\"bytes\"}],\"internalType\":\"struct Router.lzTxObj\",\"name\":\"_lzTxParams\",\"type\":\"tuple\"}],\"name\":\"redeemLocal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_srcPoolId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_dstPoolId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amountSD\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_mintAmountSD\",\"type\":\"uint256\"}],\"name\":\"redeemLocalCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_srcPoolId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_dstPoolId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amountSD\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_to\",\"type\":\"bytes\"}],\"name\":\"redeemLocalCheckOnRemote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_srcPoolId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_dstPoolId\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_refundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amountLP\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minAmountLD\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_to\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"dstGasForCall\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dstNativeAmount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"dstNativeAddr\",\"type\":\"bytes\"}],\"internalType\":\"struct Router.lzTxObj\",\"name\":\"_lzTxParams\",\"type\":\"tuple\"}],\"name\":\"redeemRemote\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"retryRevert\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_refundAddress\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"dstGasForCall\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dstNativeAmount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"dstNativeAddr\",\"type\":\"bytes\"}],\"internalType\":\"struct Router.lzTxObj\",\"name\":\"_lzTxParams\",\"type\":\"tuple\"}],\"name\":\"revertRedeemLocal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"revertLookup\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_srcPoolId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_dstPoolId\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_refundAddress\",\"type\":\"address\"}],\"name\":\"sendCredits\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract Bridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract Factory\",\"name\":\"_factory\",\"type\":\"address\"}],\"name\":\"setBridgeAndFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_poolId\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_batched\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_swapDeltaBP\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_lpDeltaBP\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_defaultSwapMode\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_defaultLPMode\",\"type\":\"bool\"}],\"name\":\"setDeltaParam\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_poolId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_feeLibraryAddr\",\"type\":\"address\"}],\"name\":\"setFeeLibrary\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_poolId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_mintFeeBP\",\"type\":\"uint256\"}],\"name\":\"setFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"setMintFeeOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"setProtocolFeeOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_poolId\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_swapStop\",\"type\":\"bool\"}],\"name\":\"setSwapStop\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_poolId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_dstPoolId\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"_weight\",\"type\":\"uint16\"}],\"name\":\"setWeightForChainPath\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_srcPoolId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_dstPoolId\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_refundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amountLD\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minAmountLD\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"dstGasForCall\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dstNativeAmount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"dstNativeAddr\",\"type\":\"bytes\"}],\"internalType\":\"struct Router.lzTxObj\",\"name\":\"_lzTxParams\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"_to\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"swap\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_srcPoolId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_dstPoolId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_dstGasForCall\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"eqFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"eqReward\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lpFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lkbRemove\",\"type\":\"uint256\"}],\"internalType\":\"struct Pool.SwapObj\",\"name\":\"_s\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"swapRemote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_poolId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"withdrawMintFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_poolId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"withdrawProtocolFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Router.sol\":\"Router\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor () {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0x549c5343ad9f7e3f38aa4c4761854403502574bbc15b822db2ce892ff9b79da7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xe22a1fc7400ae196eba2ad1562d0386462b00a6363b742d55a2fd2021a58586f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xbd74f587ab9b9711801baf667db1426e4a03fd2d7f15af33e0e0d0394e7cef76\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.0;\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n constructor () {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0x1153f6dd334c01566417b8c551122450542a2b75a2bbb379d59a8c320ed6da28\",\"license\":\"MIT\"},\"contracts/Bridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.7.6;\\npragma experimental ABIEncoderV2;\\n\\n// imports\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\nimport \\\"./Pool.sol\\\";\\nimport \\\"./Router.sol\\\";\\n// interfaces\\nimport \\\"./interfaces/ILayerZeroReceiver.sol\\\";\\nimport \\\"./interfaces/ILayerZeroEndpoint.sol\\\";\\nimport \\\"./interfaces/ILayerZeroUserApplicationConfig.sol\\\";\\n\\n// libraries\\nimport \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\n\\ncontract Bridge is Ownable, ILayerZeroReceiver, ILayerZeroUserApplicationConfig {\\n using SafeMath for uint256;\\n\\n //---------------------------------------------------------------------------\\n // CONSTANTS\\n uint8 public constant TYPE_SWAP_REMOTE = 1;\\n uint8 public constant TYPE_ADD_LIQUIDITY = 2;\\n uint8 public constant TYPE_REDEEM_LOCAL_CALL_BACK = 3;\\n uint8 public constant TYPE_WITHDRAW_REMOTE = 4;\\n\\n //---------------------------------------------------------------------------\\n // VARIABLES\\n ILayerZeroEndpoint public layerZeroEndpoint;\\n mapping(uint16 => bytes) public bridgeLookup;\\n mapping(uint16 => mapping(uint8 => uint256)) public gasLookup;\\n Router public router;\\n bool public useLayerZeroToken;\\n\\n //---------------------------------------------------------------------------\\n // MODIFIERS\\n modifier onlyRouter() {\\n require(msg.sender == address(router), \\\"Stargate: caller must be Router.\\\");\\n _;\\n }\\n\\n constructor(address _layerZeroEndpoint) {\\n require(_layerZeroEndpoint != address(0x0), \\\"Stargate: _layerZeroEndpoint cannot be 0x0\\\");\\n layerZeroEndpoint = ILayerZeroEndpoint(_layerZeroEndpoint);\\n }\\n\\n //---------------------------------------------------------------------------\\n // EXTERNAL functions\\n\\n function setRouter(Router _router) external onlyOwner {\\n require(address(router) == address(0x0), \\\"router already initialized\\\"); // 1 time only\\n router = _router;\\n }\\n\\n function lzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64 _nonce,\\n bytes memory _payload\\n ) external override {\\n require(msg.sender == address(layerZeroEndpoint), \\\"Stargate: only LayerZero endpoint can call lzReceive\\\");\\n require(\\n _srcAddress.length == bridgeLookup[_srcChainId].length && keccak256(_srcAddress) == keccak256(bridgeLookup[_srcChainId]),\\n \\\"Stargate: bridge does not match\\\"\\n );\\n\\n uint8 functionType;\\n assembly {\\n functionType := mload(add(_payload, 32))\\n }\\n\\n if (functionType == TYPE_SWAP_REMOTE) {\\n (\\n ,\\n uint256 srcPoolId,\\n uint256 dstPoolId,\\n uint256 dstGasForCall,\\n Pool.CreditObj memory c,\\n Pool.SwapObj memory s,\\n bytes memory to,\\n bytes memory payload\\n ) = abi.decode(_payload, (uint8, uint256, uint256, uint256, Pool.CreditObj, Pool.SwapObj, bytes, bytes));\\n address toAddress;\\n assembly {\\n toAddress := mload(add(to, 20))\\n }\\n router.creditChainPath(_srcChainId, srcPoolId, dstPoolId, c);\\n router.swapRemote(_srcChainId, _srcAddress, _nonce, srcPoolId, dstPoolId, dstGasForCall, toAddress, s, payload);\\n } else if (functionType == TYPE_ADD_LIQUIDITY) {\\n (, uint256 srcPoolId, uint256 dstPoolId, Pool.CreditObj memory c) = abi.decode(_payload, (uint8, uint256, uint256, Pool.CreditObj));\\n router.creditChainPath(_srcChainId, srcPoolId, dstPoolId, c);\\n } else if (functionType == TYPE_REDEEM_LOCAL_CALL_BACK) {\\n (, uint256 srcPoolId, uint256 dstPoolId, Pool.CreditObj memory c, uint256 amountSD, uint256 mintAmountSD, bytes memory to) = abi\\n .decode(_payload, (uint8, uint256, uint256, Pool.CreditObj, uint256, uint256, bytes));\\n address toAddress;\\n assembly {\\n toAddress := mload(add(to, 20))\\n }\\n router.creditChainPath(_srcChainId, srcPoolId, dstPoolId, c);\\n router.redeemLocalCallback(_srcChainId, _srcAddress, _nonce, srcPoolId, dstPoolId, toAddress, amountSD, mintAmountSD);\\n } else if (functionType == TYPE_WITHDRAW_REMOTE) {\\n (, uint256 srcPoolId, uint256 dstPoolId, Pool.CreditObj memory c, uint256 amountSD, bytes memory to) = abi.decode(\\n _payload,\\n (uint8, uint256, uint256, Pool.CreditObj, uint256, bytes)\\n );\\n router.creditChainPath(_srcChainId, srcPoolId, dstPoolId, c);\\n router.redeemLocalCheckOnRemote(_srcChainId, _srcAddress, _nonce, srcPoolId, dstPoolId, amountSD, to);\\n }\\n }\\n\\n //---------------------------------------------------------------------------\\n // LOCAL CHAIN FUNCTIONS\\n\\n function swap(\\n uint16 _chainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress,\\n Pool.CreditObj memory _c,\\n Pool.SwapObj memory _s,\\n Router.lzTxObj memory _lzTxParams,\\n bytes calldata _to,\\n bytes calldata _payload\\n ) external payable onlyRouter {\\n bytes memory payload = abi.encode(TYPE_SWAP_REMOTE, _srcPoolId, _dstPoolId, _lzTxParams.dstGasForCall, _c, _s, _to, _payload);\\n _call(_chainId, TYPE_SWAP_REMOTE, _refundAddress, _lzTxParams, payload);\\n }\\n\\n function redeemLocalCallback(\\n uint16 _chainId,\\n address payable _refundAddress,\\n Pool.CreditObj memory _c,\\n Router.lzTxObj memory _lzTxParams,\\n bytes memory _payload\\n ) external payable onlyRouter {\\n bytes memory payload;\\n\\n {\\n (, uint256 srcPoolId, uint256 dstPoolId, uint256 amountSD, uint256 mintAmountSD, bytes memory to) = abi.decode(\\n _payload,\\n (uint8, uint256, uint256, uint256, uint256, bytes)\\n );\\n\\n // swap dst and src because we are headed back\\n payload = abi.encode(TYPE_REDEEM_LOCAL_CALL_BACK, dstPoolId, srcPoolId, _c, amountSD, mintAmountSD, to);\\n }\\n\\n _call(_chainId, TYPE_REDEEM_LOCAL_CALL_BACK, _refundAddress, _lzTxParams, payload);\\n }\\n\\n function redeemLocal(\\n uint16 _chainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress,\\n Pool.CreditObj memory _c,\\n uint256 _amountSD,\\n bytes calldata _to,\\n Router.lzTxObj memory _lzTxParams\\n ) external payable onlyRouter {\\n bytes memory payload = abi.encode(TYPE_WITHDRAW_REMOTE, _srcPoolId, _dstPoolId, _c, _amountSD, _to);\\n _call(_chainId, TYPE_WITHDRAW_REMOTE, _refundAddress, _lzTxParams, payload);\\n }\\n\\n function sendCredits(\\n uint16 _chainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress,\\n Pool.CreditObj memory _c\\n ) external payable onlyRouter {\\n bytes memory payload = abi.encode(TYPE_ADD_LIQUIDITY, _srcPoolId, _dstPoolId, _c);\\n Router.lzTxObj memory lzTxObj = Router.lzTxObj(0, 0, \\\"0x\\\");\\n _call(_chainId, TYPE_ADD_LIQUIDITY, _refundAddress, lzTxObj, payload);\\n }\\n\\n function quoteLayerZeroFee(\\n uint16 _chainId,\\n uint8 _functionType,\\n bytes calldata _toAddress,\\n bytes calldata _transferAndCallPayload,\\n Router.lzTxObj memory _lzTxParams\\n ) external view returns (uint256) {\\n bytes memory payload = \\\"\\\";\\n if (_functionType == TYPE_SWAP_REMOTE) {\\n Pool.SwapObj memory s = Pool.SwapObj(1, 1, 1, 1, 1, 1);\\n payload = abi.encode(TYPE_SWAP_REMOTE, 0, 0, 0, s, _toAddress, _transferAndCallPayload);\\n } else if (_functionType == TYPE_ADD_LIQUIDITY) {\\n payload = abi.encode(TYPE_ADD_LIQUIDITY, 0, 0);\\n } else if (_functionType == TYPE_REDEEM_LOCAL_CALL_BACK) {\\n payload = abi.encode(TYPE_REDEEM_LOCAL_CALL_BACK, 0, 0, 0, 0, _toAddress);\\n } else if (_functionType == TYPE_WITHDRAW_REMOTE) {\\n payload = abi.encode(TYPE_WITHDRAW_REMOTE, 0, 0, 0, _toAddress);\\n }\\n\\n bytes memory lzTxParamBuilt = _txParamBuilder(_chainId, _functionType, _lzTxParams);\\n return layerZeroEndpoint.estimateNativeFees(_chainId, address(this), payload, useLayerZeroToken, lzTxParamBuilt);\\n }\\n\\n //---------------------------------------------------------------------------\\n // dao functions\\n\\n function setBridge(uint16 _chainId, bytes calldata _bridgeAddress) external onlyOwner {\\n require(bridgeLookup[_chainId].length == 0, \\\"Stargate: Bridge already set!\\\");\\n bridgeLookup[_chainId] = _bridgeAddress;\\n }\\n\\n function setGasAmount(\\n uint16 _chainId,\\n uint8 _functionType,\\n uint256 _gasAmount\\n ) external onlyOwner {\\n require(_functionType >= 1 && _functionType <= 4, \\\"Stargate: invalid _functionType\\\");\\n gasLookup[_chainId][_functionType] = _gasAmount;\\n }\\n\\n function approveTokenSpender(\\n address token,\\n address spender,\\n uint256 amount\\n ) external onlyOwner {\\n IERC20(token).approve(spender, amount);\\n }\\n\\n function setUseLayerZeroToken(bool enable) external onlyOwner {\\n useLayerZeroToken = enable;\\n }\\n\\n function setOracle(uint16 _chainId, address payable _oracle) external override onlyOwner {\\n layerZeroEndpoint.setOracle(_chainId, _oracle);\\n }\\n\\n function setRelayer(uint16 _chainId, address payable _relayer) external override onlyOwner {\\n layerZeroEndpoint.setRelayer(_chainId, _relayer);\\n }\\n\\n function setBlockConfirmations(uint16 _chainId, uint256 _blockConfirmations) external override onlyOwner {\\n layerZeroEndpoint.setBlockConfirmations(_chainId, _blockConfirmations);\\n }\\n\\n function setLibraryVersion(uint16 _chainId, uint16 _libraryVersion) external override onlyOwner {\\n layerZeroEndpoint.setLibraryVersion(_chainId, _libraryVersion);\\n }\\n\\n function getOracle(\\n uint16 _chainId,\\n address /*unused*/\\n ) external view override returns (address oracle) {\\n // instead of using the address \\\"unused\\\" , actually want the oracle *this* contract has configured.\\n return layerZeroEndpoint.getOracle(_chainId, address(this));\\n }\\n\\n function getRelayer(\\n uint16 _chainId,\\n address /*unused*/\\n ) external view override returns (address relayer) {\\n // instead of using the address \\\"unused\\\" , actually want the relayer *this* contract has configured.\\n return layerZeroEndpoint.getRelayer(_chainId, address(this));\\n }\\n\\n function getBlockConfirmations(\\n uint16 _chainId,\\n address /*unused*/\\n ) external view override returns (uint256 blockConfirmations) {\\n // instead of using the address \\\"unused\\\" , actually want the block configurations *this* contract has configured.\\n return layerZeroEndpoint.getBlockConfirmations(_chainId, address(this));\\n }\\n\\n function getLibraryVersion(\\n uint16 _chainId,\\n address /*unused*/\\n ) external view override returns (uint16 libraryVersion) {\\n // instead of using the address \\\"unused\\\" , actually want the libraryVersion *this* contract has configured.\\n return layerZeroEndpoint.getLibraryVersion(_chainId, address(this));\\n }\\n\\n function setVersion(uint16 _layerZeroVersion) external override onlyOwner {\\n layerZeroEndpoint.setVersion(_layerZeroVersion);\\n }\\n\\n function getVersion() external override returns (uint16) {\\n return layerZeroEndpoint.getVersion();\\n }\\n\\n //---------------------------------------------------------------------------\\n // INTERNAL functions\\n\\n function txParamBuilderType1(uint256 _gasAmount) internal pure returns (bytes memory) {\\n uint16 txType = 1;\\n return abi.encodePacked(txType, _gasAmount);\\n }\\n\\n function txParamBuilderType2(\\n uint256 _gasAmount,\\n uint256 _dstNativeAmount,\\n bytes memory _dstNativeAddr\\n ) internal pure returns (bytes memory) {\\n uint16 txType = 2;\\n return abi.encodePacked(txType, _gasAmount, _dstNativeAmount, _dstNativeAddr);\\n }\\n\\n function _txParamBuilder(\\n uint16 _chainId,\\n uint8 _type,\\n Router.lzTxObj memory _lzTxParams\\n ) internal view returns (bytes memory) {\\n bytes memory lzTxParam;\\n address dstNativeAddr;\\n {\\n bytes memory dstNativeAddrBytes = _lzTxParams.dstNativeAddr;\\n assembly {\\n dstNativeAddr := mload(add(dstNativeAddrBytes, 20))\\n }\\n }\\n\\n uint256 totalGas = gasLookup[_chainId][_type].add(_lzTxParams.dstGasForCall);\\n if (_lzTxParams.dstNativeAmount > 0 && dstNativeAddr != address(0x0)) {\\n lzTxParam = txParamBuilderType2(totalGas, _lzTxParams.dstNativeAmount, _lzTxParams.dstNativeAddr);\\n } else {\\n lzTxParam = txParamBuilderType1(totalGas);\\n }\\n\\n return lzTxParam;\\n }\\n\\n function _call(\\n uint16 _chainId,\\n uint8 _type,\\n address payable _refundAddress,\\n Router.lzTxObj memory _lzTxParams,\\n bytes memory _payload\\n ) internal {\\n bytes memory lzTxParamBuilt = _txParamBuilder(_chainId, _type, _lzTxParams);\\n layerZeroEndpoint.send{value: msg.value}(_chainId, bridgeLookup[_chainId], _payload, _refundAddress, address(this), lzTxParamBuilt);\\n }\\n\\n function renounceOwnership() public override onlyOwner {}\\n}\\n\",\"keccak256\":\"0xe66ad62440207708b3940556537d16482a216d993594e149460f8b43f7f7299b\",\"license\":\"BUSL-1.1\"},\"contracts/Factory.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.7.6;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"./Pool.sol\\\";\\n\\ncontract Factory is Ownable {\\n using SafeMath for uint256;\\n\\n //---------------------------------------------------------------------------\\n // VARIABLES\\n mapping(uint256 => Pool) public getPool; // poolId -> PoolInfo\\n address[] public allPools;\\n address public router;\\n address public defaultFeeLibrary; // address for retrieving fee params for swaps\\n\\n //---------------------------------------------------------------------------\\n // MODIFIERS\\n modifier onlyRouter() {\\n require(msg.sender == router, \\\"Stargate: caller must be Router.\\\");\\n _;\\n }\\n\\n constructor() {}\\n\\n function setRouter(address _router) external onlyOwner {\\n require(router == address(0x0), \\\"router already intialized\\\"); // 1 time only\\n router = _router;\\n }\\n\\n function setDefaultFeeLibrary(address _defaultFeeLibrary) external onlyOwner {\\n defaultFeeLibrary = _defaultFeeLibrary;\\n }\\n\\n function allPoolsLength() external view returns (uint256) {\\n return allPools.length;\\n }\\n\\n function createPool(\\n uint256 _poolId,\\n address _token,\\n uint8 _sharedDecimals,\\n uint8 _localDecimals,\\n string memory _name,\\n string memory _symbol\\n ) public onlyRouter returns (address poolAddress) {\\n require(address(getPool[_poolId]) == address(0x0), \\\"Stargate: Pool already created\\\");\\n\\n Pool pool = new Pool(_poolId, router, _token, _sharedDecimals, _localDecimals, defaultFeeLibrary, _name, _symbol);\\n getPool[_poolId] = pool;\\n poolAddress = address(pool);\\n allPools.push(poolAddress);\\n }\\n\\n function renounceOwnership() public override onlyOwner {}\\n}\\n\",\"keccak256\":\"0x682f24b8f4581e67c86d50db3ed4fd298f60c2fed9877ff616e98ec7468da2ac\",\"license\":\"BUSL-1.1\"},\"contracts/LPTokenERC20.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.7.6;\\n\\n// libraries\\nimport \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\n\\ncontract LPTokenERC20 {\\n using SafeMath for uint256;\\n\\n //---------------------------------------------------------------------------\\n // CONSTANTS\\n string public name;\\n string public symbol;\\n bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;\\n // set in constructor\\n bytes32 public DOMAIN_SEPARATOR;\\n\\n //---------------------------------------------------------------------------\\n // VARIABLES\\n uint256 public decimals;\\n uint256 public totalSupply;\\n mapping(address => uint256) public balanceOf;\\n mapping(address => mapping(address => uint256)) public allowance;\\n mapping(address => uint256) public nonces;\\n\\n //---------------------------------------------------------------------------\\n // EVENTS\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n constructor(string memory _name, string memory _symbol) {\\n name = _name;\\n symbol = _symbol;\\n uint256 chainId;\\n assembly {\\n chainId := chainid()\\n }\\n DOMAIN_SEPARATOR = keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n keccak256(bytes(name)),\\n keccak256(bytes(\\\"1\\\")),\\n chainId,\\n address(this)\\n )\\n );\\n }\\n\\n function _mint(address to, uint256 value) internal {\\n totalSupply = totalSupply.add(value);\\n balanceOf[to] = balanceOf[to].add(value);\\n emit Transfer(address(0), to, value);\\n }\\n\\n function _burn(address from, uint256 value) internal {\\n balanceOf[from] = balanceOf[from].sub(value);\\n totalSupply = totalSupply.sub(value);\\n emit Transfer(from, address(0), value);\\n }\\n\\n function _approve(\\n address owner,\\n address spender,\\n uint256 value\\n ) private {\\n allowance[owner][spender] = value;\\n emit Approval(owner, spender, value);\\n }\\n\\n function _transfer(\\n address from,\\n address to,\\n uint256 value\\n ) private {\\n balanceOf[from] = balanceOf[from].sub(value);\\n balanceOf[to] = balanceOf[to].add(value);\\n emit Transfer(from, to, value);\\n }\\n\\n function approve(address spender, uint256 value) external returns (bool) {\\n _approve(msg.sender, spender, value);\\n return true;\\n }\\n\\n function transfer(address to, uint256 value) external returns (bool) {\\n _transfer(msg.sender, to, value);\\n return true;\\n }\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 value\\n ) external returns (bool) {\\n if (allowance[from][msg.sender] != uint256(-1)) {\\n allowance[from][msg.sender] = allowance[from][msg.sender].sub(value);\\n }\\n _transfer(from, to, value);\\n return true;\\n }\\n\\n //\\n //\\n //\\n //\\n // function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n // _approve(msg.sender, spender, allowance[msg.sender][spender].add(addedValue));\\n // return true;\\n // }\\n //\\n //\\n //\\n //\\n // function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n // _approve(msg.sender, spender, allowance[msg.sender][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\n // return true;\\n // }\\n\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external {\\n require(deadline >= block.timestamp, \\\"Bridge: EXPIRED\\\");\\n bytes32 digest = keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19\\\\x01\\\",\\n DOMAIN_SEPARATOR,\\n keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline))\\n )\\n );\\n address recoveredAddress = ecrecover(digest, v, r, s);\\n require(recoveredAddress != address(0) && recoveredAddress == owner, \\\"Bridge: INVALID_SIGNATURE\\\");\\n _approve(owner, spender, value);\\n }\\n}\\n\",\"keccak256\":\"0x9a08995ccddfce7f0ba1a08aba80141d3754b0a609a908112dc309739e1f3c1b\",\"license\":\"BUSL-1.1\"},\"contracts/Pool.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.7.6;\\npragma abicoder v2;\\n\\n// imports\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\\\";\\nimport \\\"./LPTokenERC20.sol\\\";\\nimport \\\"./interfaces/IStargateFeeLibrary.sol\\\";\\n\\n// libraries\\nimport \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\n\\n/// Pool contracts on other chains and managed by the Stargate protocol.\\ncontract Pool is LPTokenERC20, ReentrancyGuard {\\n using SafeMath for uint256;\\n\\n //---------------------------------------------------------------------------\\n // CONSTANTS\\n bytes4 private constant SELECTOR = bytes4(keccak256(bytes(\\\"transfer(address,uint256)\\\")));\\n\\n //---------------------------------------------------------------------------\\n // STRUCTS\\n struct ChainPath {\\n uint16 dstChainId;\\n uint256 dstPoolId;\\n uint256 weight;\\n uint256 balance;\\n uint256 lkb;\\n uint256 credits;\\n uint256 idealBalance;\\n bool ready; // indicate if the counter chainPath has been created.\\n }\\n\\n struct SwapObj {\\n uint256 amount;\\n uint256 eqFee;\\n uint256 eqReward;\\n uint256 lpFee;\\n uint256 protocolFee;\\n uint256 lkbRemove;\\n }\\n\\n struct CreditObj {\\n uint256 credits;\\n uint256 idealBalance;\\n }\\n\\n //---------------------------------------------------------------------------\\n // VARIABLES\\n\\n // chainPath\\n ChainPath[] public chainPaths; // list of connected chains with shared pools\\n mapping(uint16 => mapping(uint256 => uint256)) public chainPathIndexLookup; // lookup for chainPath by chainId => poolId =>index\\n\\n // metadata\\n uint256 public poolId; // shared id between chains to represent same pool\\n uint256 public sharedDecimals; // the shared decimals (lowest common decimals between chains)\\n uint256 public localDecimals; // the decimals for the token\\n uint256 public convertRate; // the decimals for the token\\n bool public stopSwap; // flag to stop swapping in extreme cases\\n address public token; // the token for the pool\\n address public router; // the token for the pool\\n\\n // Fee and Liquidity\\n uint256 public totalLiquidity; // the total amount of tokens added on this side of the chain (fees + deposits - withdrawals)\\n uint256 public totalWeight; // total weight for pool percentages\\n uint256 public mintFeeBP; // fee basis points for the mint/deposit\\n uint256 public protocolFeeBalance; // fee balance created from dao fee\\n uint256 public mintFeeBalance; // fee balance created from mint fee\\n uint256 public eqFeePool; // pool rewards in Shared Decimal format. indicate the total budget for reverse swap incentive\\n address public feeLibrary; // address for retrieving fee params for swaps\\n\\n // Delta related\\n uint256 public deltaCredit; // credits accumulated from txn\\n bool public batched; // flag to indicate if we want batch processing.\\n bool public defaultSwapMode; // flag for the default mode for swap\\n bool public defaultLPMode; // flag for the default mode for lp\\n uint256 public swapDeltaBP; // basis points of poolCredits to activate Delta in swap\\n uint256 public lpDeltaBP; // basis points of poolCredits to activate Delta in liquidity events\\n\\n //---------------------------------------------------------------------------\\n // EVENTS\\n event Mint(address to, uint256 amountLP, uint256 amountSD, uint256 mintFeeAmountSD);\\n event Burn(address from, uint256 amountLP, uint256 amountSD);\\n event RedeemLocalCallback(address _to, uint256 _amountSD, uint256 _amountToMintSD);\\n event Swap(\\n uint16 chainId,\\n uint256 dstPoolId,\\n address from,\\n uint256 amountSD,\\n uint256 eqReward,\\n uint256 eqFee,\\n uint256 protocolFee,\\n uint256 lpFee\\n );\\n event SendCredits(uint16 dstChainId, uint256 dstPoolId, uint256 credits, uint256 idealBalance);\\n event RedeemRemote(uint16 chainId, uint256 dstPoolId, address from, uint256 amountLP, uint256 amountSD);\\n event RedeemLocal(address from, uint256 amountLP, uint256 amountSD, uint16 chainId, uint256 dstPoolId, address to);\\n event InstantRedeemLocal(address from, uint256 amountLP, uint256 amountSD, uint16 chainId, uint256 dstPoolId, address to);\\n event CreditChainPath(uint16 chainId, uint256 srcPoolId, uint256 amountSD, uint256 idealBalance);\\n event SwapRemote(address to, uint256 amountSD, uint256 protocolFee, uint256 dstFee);\\n event WithdrawRemote(uint16 srcChainId, uint256 srcPoolId, uint256 swapAmount, uint256 mintAmount);\\n event ChainPathUpdate(uint16 dstChainId, uint256 dstPoolId, uint256 weight);\\n event FeesUpdated(uint256 mintFeeBP);\\n event FeeLibraryUpdated(address feeLibraryAddr);\\n event StopSwapUpdated(bool swapStop);\\n event WithdrawProtocolFeeBalance(address to, uint256 amountSD);\\n event WithdrawMintFeeBalance(address to, uint256 amountSD);\\n event DeltaParamUpdated(bool batched, uint256 swapDeltaBP, uint256 lpDeltaBP, bool defaultSwapMode, bool defaultLPMode);\\n\\n //---------------------------------------------------------------------------\\n // MODIFIERS\\n modifier onlyRouter() {\\n require(msg.sender == router, \\\"Stargate: only the router can call this method\\\");\\n _;\\n }\\n\\n constructor(\\n uint256 _poolId,\\n address _router,\\n address _token,\\n uint256 _sharedDecimals,\\n uint256 _localDecimals,\\n address _feeLibrary,\\n string memory _name,\\n string memory _symbol\\n ) LPTokenERC20(_name, _symbol) {\\n require(_token != address(0x0), \\\"Stargate: _token cannot be 0x0\\\");\\n require(_router != address(0x0), \\\"Stargate: _router cannot be 0x0\\\");\\n poolId = _poolId;\\n router = _router;\\n token = _token;\\n sharedDecimals = _sharedDecimals;\\n decimals = uint8(_sharedDecimals);\\n localDecimals = _localDecimals;\\n convertRate = 10**(uint256(localDecimals).sub(sharedDecimals));\\n totalWeight = 0;\\n feeLibrary = _feeLibrary;\\n\\n //delta algo related\\n batched = false;\\n defaultSwapMode = true;\\n defaultLPMode = true;\\n }\\n\\n //---------------\\n // EXTERNAL\\n\\n //---------------------------------------------------------------------------\\n // LOCAL CHAIN FUNCTIONS\\n // Local Remote\\n // ------- ---------\\n\\n function mint(address _to, uint256 _amountLD) external nonReentrant onlyRouter returns (uint256) {\\n return _mintLocal(_to, _amountLD, true, true);\\n }\\n\\n // Local Remote\\n // ------- ---------\\n // swap -> swapRemote\\n //\\n\\n function swap(\\n uint16 _dstChainId,\\n uint256 _dstPoolId,\\n address _from,\\n uint256 _amountLD,\\n uint256 _minAmountLD,\\n bool newLiquidity\\n ) external nonReentrant onlyRouter returns (SwapObj memory) {\\n require(!stopSwap, \\\"Stargate: swap func stopped\\\");\\n ChainPath storage cp = getAndCheckCP(_dstChainId, _dstPoolId);\\n require(cp.ready == true, \\\"Stargate: counter chainPath is not ready\\\");\\n\\n uint256 amountSD = amountLDtoSD(_amountLD);\\n uint256 minAmountSD = amountLDtoSD(_minAmountLD);\\n\\n // request fee params from library\\n SwapObj memory s = IStargateFeeLibrary(feeLibrary).getFees(poolId, _dstPoolId, _dstChainId, _from, amountSD);\\n\\n // equilibrium fee and reward. note eqFee/eqReward are separated from swap liquidity\\n eqFeePool = eqFeePool.sub(s.eqReward);\\n // users will also get the eqReward\\n require(s.amount.add(s.eqReward) >= minAmountSD, \\\"Stargate: slippage too high\\\");\\n\\n // s.lkbRemove = amountSD.add(s.eqReward).sub(s.lpFee);\\n s.lkbRemove = amountSD.sub(s.lpFee);\\n // check for transfer solvency\\n require(cp.balance >= s.lkbRemove, \\\"Stargate: dst balance too low\\\");\\n cp.balance = cp.balance.sub(s.lkbRemove);\\n\\n // distribute credits on condition.\\n if (newLiquidity) {\\n deltaCredit = deltaCredit.add(amountSD);\\n }\\n if (!batched || deltaCredit >= totalLiquidity.mul(swapDeltaBP).div(10000)) {\\n _delta(defaultSwapMode);\\n }\\n\\n emit Swap(_dstChainId, _dstPoolId, _from, s.amount, s.eqReward, s.eqFee, s.protocolFee, s.lpFee);\\n return s;\\n }\\n\\n // Local Remote\\n // ------- ---------\\n // sendCredits -> creditChainPath\\n\\n function sendCredits(uint16 _dstChainId, uint256 _dstPoolId) external nonReentrant onlyRouter returns (CreditObj memory c) {\\n ChainPath storage cp = getAndCheckCP(_dstChainId, _dstPoolId);\\n require(cp.ready == true, \\\"Stargate: counter chainPath is not ready\\\");\\n cp.lkb = cp.lkb.add(cp.credits);\\n c.idealBalance = totalLiquidity.mul(cp.weight).div(totalWeight);\\n c.credits = cp.credits;\\n cp.credits = 0;\\n emit SendCredits(_dstChainId, _dstPoolId, c.credits, c.idealBalance);\\n }\\n\\n // Local Remote\\n // ------- ---------\\n // redeemRemote -> swapRemote\\n\\n function redeemRemote(\\n uint16 _dstChainId,\\n uint256 _dstPoolId,\\n address _from,\\n uint256 _amountLP\\n ) external nonReentrant onlyRouter returns (uint256 amountLD) {\\n require(_from != address(0x0), \\\"Stargate: _from cannot be 0x0\\\");\\n uint256 amountSD = _burnLocal(_from, _amountLP);\\n //run Delta\\n if (!batched || deltaCredit > totalLiquidity.mul(lpDeltaBP).div(10000)) {\\n _delta(defaultLPMode);\\n }\\n amountLD = amountSDtoLD(amountSD);\\n emit RedeemRemote(_dstChainId, _dstPoolId, _from, _amountLP, amountSD);\\n }\\n\\n // Local Remote\\n // ------- ---------\\n // redeemLocal -> redeemLocalCheckOnRemote\\n // redeemLocalCallback <-\\n\\n function redeemLocal(\\n address _from,\\n uint256 _amountLP,\\n uint16 _dstChainId,\\n uint256 _dstPoolId,\\n address _to\\n ) external nonReentrant onlyRouter returns (uint256 amountSD) {\\n require(_from != address(0x0), \\\"Stargate: _from cannot be 0x0\\\");\\n // safeguard.\\n require(chainPaths[chainPathIndexLookup[_dstChainId][_dstPoolId]].ready == true, \\\"Stargate: counter chainPath is not ready\\\");\\n amountSD = _burnLocal(_from, _amountLP);\\n\\n // run Delta\\n if (!batched || deltaCredit > totalLiquidity.mul(lpDeltaBP).div(10000)) {\\n _delta(false);\\n }\\n\\n // if the amountSD <= unallocated credit, a direct withdrawal would suffice\\n if (amountSD <= deltaCredit) {\\n deltaCredit = deltaCredit.sub(amountSD);\\n uint256 amountLD = amountSDtoLD(amountSD);\\n _safeTransfer(token, _to, amountLD);\\n emit InstantRedeemLocal(_from, _amountLP, amountSD, _dstChainId, _dstPoolId, _to);\\n // no need to get acknowledgement from remote\\n amountSD = 0;\\n } else {\\n emit RedeemLocal(_from, _amountLP, amountSD, _dstChainId, _dstPoolId, _to);\\n }\\n }\\n\\n //---------------------------------------------------------------------------\\n // REMOTE CHAIN FUNCTIONS\\n\\n // Local Remote\\n // ------- ---------\\n // sendCredits -> creditChainPath\\n\\n function creditChainPath(\\n uint16 _dstChainId,\\n uint256 _dstPoolId,\\n CreditObj memory _c\\n ) external nonReentrant onlyRouter {\\n ChainPath storage cp = chainPaths[chainPathIndexLookup[_dstChainId][_dstPoolId]];\\n cp.balance = cp.balance.add(_c.credits);\\n if (cp.idealBalance != _c.idealBalance) {\\n cp.idealBalance = _c.idealBalance;\\n }\\n emit CreditChainPath(_dstChainId, _dstPoolId, _c.credits, _c.idealBalance);\\n }\\n\\n // Local Remote\\n // ------- ---------\\n // swap -> swapRemote\\n\\n function swapRemote(\\n uint16 _srcChainId,\\n uint256 _srcPoolId,\\n address _to,\\n SwapObj memory _s\\n ) external nonReentrant onlyRouter returns (uint256 amountLD) {\\n // booking lpFee\\n totalLiquidity = totalLiquidity.add(_s.lpFee);\\n // booking eqFee\\n eqFeePool = eqFeePool.add(_s.eqFee);\\n // booking stargateFee\\n protocolFeeBalance = protocolFeeBalance.add(_s.protocolFee);\\n\\n // update LKB\\n uint256 chainPathIndex = chainPathIndexLookup[_srcChainId][_srcPoolId];\\n chainPaths[chainPathIndex].lkb = chainPaths[chainPathIndex].lkb.sub(_s.lkbRemove);\\n\\n // user receives the amount + the srcReward\\n amountLD = amountSDtoLD(_s.amount.add(_s.eqReward));\\n _safeTransfer(token, _to, amountLD);\\n emit SwapRemote(_to, _s.amount.add(_s.eqReward), _s.protocolFee, _s.eqFee);\\n }\\n\\n // Local Remote\\n // ------- ---------\\n // redeemLocal -> redeemLocalCheckOnRemote\\n // redeemLocalCallback <-\\n\\n function redeemLocalCallback(\\n uint16 _srcChainId,\\n uint256 _srcPoolId,\\n address _to,\\n uint256 _amountSD,\\n uint256 _amountToMintSD\\n ) external nonReentrant onlyRouter {\\n if (_amountToMintSD > 0) {\\n _mintLocal(_to, amountSDtoLD(_amountToMintSD), false, false);\\n }\\n\\n ChainPath storage cp = getAndCheckCP(_srcChainId, _srcPoolId);\\n cp.lkb = cp.lkb.sub(_amountSD);\\n\\n uint256 amountLD = amountSDtoLD(_amountSD);\\n _safeTransfer(token, _to, amountLD);\\n emit RedeemLocalCallback(_to, _amountSD, _amountToMintSD);\\n }\\n\\n // Local Remote\\n // ------- ---------\\n // redeemLocal(amount) -> withdrawRemote\\n // redeemLocalCallback <-\\n\\n function redeemLocalCheckOnRemote(\\n uint16 _srcChainId,\\n uint256 _srcPoolId,\\n uint256 _amountSD\\n ) external nonReentrant onlyRouter returns (uint256 swapAmount, uint256 mintAmount) {\\n ChainPath storage cp = getAndCheckCP(_srcChainId, _srcPoolId);\\n if (_amountSD > cp.balance) {\\n mintAmount = _amountSD - cp.balance;\\n swapAmount = cp.balance;\\n cp.balance = 0;\\n } else {\\n cp.balance = cp.balance.sub(_amountSD);\\n swapAmount = _amountSD;\\n mintAmount = 0;\\n }\\n emit WithdrawRemote(_srcChainId, _srcPoolId, swapAmount, mintAmount);\\n }\\n\\n //---------------------------------------------------------------------------\\n // DAO Calls\\n\\n function createChainPath(\\n uint16 _dstChainId,\\n uint256 _dstPoolId,\\n uint256 _weight\\n ) external onlyRouter {\\n for (uint256 i = 0; i < chainPaths.length; ++i) {\\n ChainPath memory cp = chainPaths[i];\\n bool exists = cp.dstChainId == _dstChainId && cp.dstPoolId == _dstPoolId;\\n require(!exists, \\\"Stargate: cant createChainPath of existing dstChainId and _dstPoolId\\\");\\n }\\n totalWeight = totalWeight.add(_weight);\\n chainPathIndexLookup[_dstChainId][_dstPoolId] = chainPaths.length;\\n chainPaths.push(ChainPath(_dstChainId, _dstPoolId, _weight, 0, 0, 0, 0, false));\\n emit ChainPathUpdate(_dstChainId, _dstPoolId, _weight);\\n }\\n\\n function setWeightForChainPath(\\n uint16 _dstChainId,\\n uint256 _dstPoolId,\\n uint16 _weight\\n ) external onlyRouter {\\n ChainPath storage cp = getAndCheckCP(_dstChainId, _dstPoolId);\\n totalWeight = totalWeight.sub(cp.weight).add(_weight);\\n cp.weight = _weight;\\n emit ChainPathUpdate(_dstChainId, _dstPoolId, _weight);\\n }\\n\\n function setFee(uint256 _mintFeeBP) external onlyRouter {\\n require(_mintFeeBP <= 10000, \\\"Bridge: cum fees > 100%\\\");\\n mintFeeBP = _mintFeeBP;\\n emit FeesUpdated(mintFeeBP);\\n }\\n\\n function setFeeLibrary(address _feeLibraryAddr) external onlyRouter {\\n feeLibrary = _feeLibraryAddr;\\n emit FeeLibraryUpdated(_feeLibraryAddr);\\n }\\n\\n function setSwapStop(bool _swapStop) external onlyRouter {\\n stopSwap = _swapStop;\\n emit StopSwapUpdated(_swapStop);\\n }\\n\\n function setDeltaParam(\\n bool _batched,\\n uint256 _swapDeltaBP,\\n uint256 _lpDeltaBP,\\n bool _defaultSwapMode,\\n bool _defaultLPMode\\n ) external onlyRouter {\\n require(_swapDeltaBP <= 10000 && _lpDeltaBP <= 10000, \\\"Stargate: wrong Delta param\\\");\\n batched = _batched;\\n swapDeltaBP = _swapDeltaBP;\\n lpDeltaBP = _lpDeltaBP;\\n defaultSwapMode = _defaultSwapMode;\\n defaultLPMode = _defaultLPMode;\\n emit DeltaParamUpdated(_batched, _swapDeltaBP, _lpDeltaBP, _defaultSwapMode, _defaultLPMode);\\n }\\n\\n function callDelta(bool _fullMode) external onlyRouter {\\n _delta(_fullMode);\\n }\\n\\n function activateChainPath(uint16 _dstChainId, uint256 _dstPoolId) external onlyRouter {\\n ChainPath storage cp = getAndCheckCP(_dstChainId, _dstPoolId);\\n require(cp.ready == false, \\\"Stargate: chainPath is already active\\\");\\n // this func will only be called once\\n cp.ready = true;\\n }\\n\\n function withdrawProtocolFeeBalance(address _to) external onlyRouter {\\n if (protocolFeeBalance > 0) {\\n uint256 amountOfLD = amountSDtoLD(protocolFeeBalance);\\n protocolFeeBalance = 0;\\n _safeTransfer(token, _to, amountOfLD);\\n emit WithdrawProtocolFeeBalance(_to, amountOfLD);\\n }\\n }\\n\\n function withdrawMintFeeBalance(address _to) external onlyRouter {\\n if (mintFeeBalance > 0) {\\n uint256 amountOfLD = amountSDtoLD(mintFeeBalance);\\n mintFeeBalance = 0;\\n _safeTransfer(token, _to, amountOfLD);\\n emit WithdrawMintFeeBalance(_to, amountOfLD);\\n }\\n }\\n\\n //---------------------------------------------------------------------------\\n // INTERNAL\\n // Conversion Helpers\\n //---------------------------------------------------------------------------\\n\\n function amountSDtoLD(uint256 _amount) internal view returns (uint256) {\\n return _amount.mul(convertRate);\\n }\\n\\n function amountLDtoSD(uint256 _amount) internal view returns (uint256) {\\n return _amount.div(convertRate);\\n }\\n\\n function getAndCheckCP(uint16 _dstChainId, uint256 _dstPoolId) internal view returns (ChainPath storage) {\\n require(chainPaths.length > 0, \\\"Stargate: no chainpaths exist\\\");\\n ChainPath storage cp = chainPaths[chainPathIndexLookup[_dstChainId][_dstPoolId]];\\n require(cp.dstChainId == _dstChainId && cp.dstPoolId == _dstPoolId, \\\"Stargate: local chainPath does not exist\\\");\\n return cp;\\n }\\n\\n function _burnLocal(address _from, uint256 _amountLP) internal returns (uint256) {\\n uint256 amountOfLPTokens = balanceOf[_from];\\n require(amountOfLPTokens >= _amountLP, \\\"Stargate: not enough LP tokens to burn\\\");\\n\\n uint256 amountSD = _amountLP.mul(totalLiquidity).div(totalSupply);\\n //subtract totalLiquidity accordingly\\n totalLiquidity = totalLiquidity.sub(amountSD);\\n\\n _burn(_from, _amountLP);\\n emit Burn(_from, _amountLP, amountSD);\\n return amountSD;\\n }\\n\\n function _delta(bool fullMode) internal {\\n if (deltaCredit > 0 && totalWeight > 0) {\\n uint256 cpLength = chainPaths.length;\\n uint256[] memory deficit = new uint256[](cpLength);\\n uint256 totalDeficit = 0;\\n\\n // algorithm steps 6-9: calculate the total and the amounts required to get to balance state\\n for (uint256 i = 0; i < cpLength; ++i) {\\n ChainPath storage cp = chainPaths[i];\\n // (liquidity * (weight/totalWeight)) - (lkb+credits)\\n uint256 balLiq = totalLiquidity.mul(cp.weight).div(totalWeight);\\n uint256 currLiq = cp.lkb.add(cp.credits);\\n if (balLiq > currLiq) {\\n // save gas since we know balLiq > currLiq and we know deficit[i] > 0\\n deficit[i] = balLiq - currLiq;\\n totalDeficit = totalDeficit.add(deficit[i]);\\n }\\n }\\n\\n // indicates how much delta credit is distributed\\n uint256 spent;\\n\\n // handle credits with 2 tranches. the [ < totalDeficit] [excessCredit]\\n // run full Delta, allocate all credits\\n if (totalDeficit == 0) {\\n // only fullMode delta will allocate excess credits\\n if (fullMode && deltaCredit > 0) {\\n // credit ChainPath by weights\\n for (uint256 i = 0; i < cpLength; ++i) {\\n ChainPath storage cp = chainPaths[i];\\n // credits = credits + toBalanceChange + remaining allocation based on weight\\n uint256 amtToCredit = deltaCredit.mul(cp.weight).div(totalWeight);\\n spent = spent.add(amtToCredit);\\n cp.credits = cp.credits.add(amtToCredit);\\n }\\n } // else do nth\\n } else if (totalDeficit <= deltaCredit) {\\n if (fullMode) {\\n // algorithm step 13: calculate amount to disperse to bring to balance state or as close as possible\\n uint256 excessCredit = deltaCredit - totalDeficit;\\n // algorithm steps 14-16: calculate credits\\n for (uint256 i = 0; i < cpLength; ++i) {\\n if (deficit[i] > 0) {\\n ChainPath storage cp = chainPaths[i];\\n // credits = credits + deficit + remaining allocation based on weight\\n uint256 amtToCredit = deficit[i].add(excessCredit.mul(cp.weight).div(totalWeight));\\n spent = spent.add(amtToCredit);\\n cp.credits = cp.credits.add(amtToCredit);\\n }\\n }\\n } else {\\n // totalDeficit <= deltaCredit but not running fullMode\\n // credit chainPaths as is if any deficit, not using all deltaCredit\\n for (uint256 i = 0; i < cpLength; ++i) {\\n if (deficit[i] > 0) {\\n ChainPath storage cp = chainPaths[i];\\n uint256 amtToCredit = deficit[i];\\n spent = spent.add(amtToCredit);\\n cp.credits = cp.credits.add(amtToCredit);\\n }\\n }\\n }\\n } else {\\n // totalDeficit > deltaCredit, fullMode or not, normalize the deficit by deltaCredit\\n for (uint256 i = 0; i < cpLength; ++i) {\\n if (deficit[i] > 0) {\\n ChainPath storage cp = chainPaths[i];\\n uint256 proportionalDeficit = deficit[i].mul(deltaCredit).div(totalDeficit);\\n spent = spent.add(proportionalDeficit);\\n cp.credits = cp.credits.add(proportionalDeficit);\\n }\\n }\\n }\\n\\n // deduct the amount of credit sent\\n deltaCredit = deltaCredit.sub(spent);\\n }\\n }\\n\\n function _mintLocal(\\n address _to,\\n uint256 _amountLD,\\n bool _feesEnabled,\\n bool _creditDelta\\n ) internal returns (uint256 amountSD) {\\n require(totalWeight > 0, \\\"Stargate: No ChainPaths exist\\\");\\n amountSD = amountLDtoSD(_amountLD);\\n\\n uint256 mintFeeSD = 0;\\n if (_feesEnabled) {\\n mintFeeSD = amountSD.mul(mintFeeBP).div(10000);\\n amountSD = amountSD.sub(mintFeeSD);\\n mintFeeBalance = mintFeeBalance.add(mintFeeSD);\\n }\\n\\n if (_creditDelta) {\\n deltaCredit = deltaCredit.add(amountSD);\\n }\\n\\n uint256 amountLPTokens = amountSD;\\n if (totalSupply != 0) {\\n amountLPTokens = amountSD.mul(totalSupply).div(totalLiquidity);\\n }\\n totalLiquidity = totalLiquidity.add(amountSD);\\n\\n _mint(_to, amountLPTokens);\\n emit Mint(_to, amountLPTokens, amountSD, mintFeeSD);\\n\\n // add to credits and call delta. short circuit to save gas\\n if (!batched || deltaCredit > totalLiquidity.mul(lpDeltaBP).div(10000)) {\\n _delta(defaultLPMode);\\n }\\n }\\n\\n function _safeTransfer(\\n address _token,\\n address _to,\\n uint256 _value\\n ) private {\\n (bool success, bytes memory data) = _token.call(abi.encodeWithSelector(SELECTOR, _to, _value));\\n require(success && (data.length == 0 || abi.decode(data, (bool))), \\\"Stargate: TRANSFER_FAILED\\\");\\n }\\n}\\n\",\"keccak256\":\"0x2ac96db1979c660fa66dd6edbd4a66ddb926f806a034795bb286ef6935640377\",\"license\":\"BUSL-1.1\"},\"contracts/Router.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.7.6;\\npragma abicoder v2;\\n\\n// imports\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\\\";\\nimport \\\"./Factory.sol\\\";\\nimport \\\"./Pool.sol\\\";\\nimport \\\"./Bridge.sol\\\";\\n\\n// interfaces\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./interfaces/IStargateRouter.sol\\\";\\nimport \\\"./interfaces/IStargateReceiver.sol\\\";\\n\\n// libraries\\nimport \\\"@openzeppelin/contracts/math/SafeMath.sol\\\";\\n\\ncontract Router is IStargateRouter, Ownable, ReentrancyGuard {\\n using SafeMath for uint256;\\n\\n //---------------------------------------------------------------------------\\n // CONSTANTS\\n uint8 public constant TYPE_REDEEM_LOCAL_RESPONSE = 1;\\n uint8 public constant TYPE_REDEEM_LOCAL_CALLBACK_RETRY = 2;\\n uint8 public constant TYPE_SWAP_REMOTE_RETRY = 3;\\n\\n //---------------------------------------------------------------------------\\n // STRUCTS\\n struct CachedSwap {\\n address token;\\n uint256 amountLD;\\n address to;\\n bytes payload;\\n }\\n struct lzTxObj {\\n uint256 dstGasForCall;\\n uint256 dstNativeAmount;\\n bytes dstNativeAddr;\\n }\\n\\n //---------------------------------------------------------------------------\\n // VARIABLES\\n Factory public factory; // used for creating pools\\n address public protocolFeeOwner; // can call methods to pull Stargate fees collected in pools\\n address public mintFeeOwner; // can call methods to pull mint fees collected in pools\\n Bridge public bridge;\\n mapping(uint16 => mapping(bytes => mapping(uint256 => bytes))) public revertLookup; //[chainId][srcAddress][nonce]\\n mapping(uint16 => mapping(bytes => mapping(uint256 => CachedSwap))) public cachedSwapLookup; //[chainId][srcAddress][nonce]\\n\\n //---------------------------------------------------------------------------\\n // EVENTS\\n event Revert(uint8 bridgeFunctionType, uint16 chainId, bytes srcAddress, uint256 nonce);\\n event ReceiveFailed(uint16 chainId, bytes srcAddress, uint256 nonce, address token, uint256 amountLD, bytes payload, string reason);\\n event CachedSwapSaved(uint16 chainId, bytes srcAddress, uint256 nonce, address token, uint256 amountLD, address to, bytes payload);\\n\\n //---------------------------------------------------------------------------\\n // MODIFIERS\\n modifier onlyBridge() {\\n require(msg.sender == address(bridge), \\\"Bridge: caller must be Bridge.\\\");\\n _;\\n }\\n\\n constructor() {}\\n\\n function setBridgeAndFactory(Bridge _bridge, Factory _factory) external onlyOwner {\\n require(address(bridge) == address(0x0), \\\"bridge already initialized\\\"); // 1 time only\\n require(address(factory) == address(0x0), \\\"factory already initialized\\\"); // 1 time only\\n\\n bridge = _bridge;\\n factory = _factory;\\n }\\n\\n //---------------------------------------------------------------------------\\n // VIEWS\\n\\n function _getPool(uint256 _poolId) internal view returns (Pool pool) {\\n pool = factory.getPool(_poolId);\\n require(address(pool) != address(0x0), \\\"Stargate: Pool does not exist\\\");\\n }\\n\\n //---------------------------------------------------------------------------\\n // INTERNAL\\n\\n function _safeTransferFrom(\\n address token,\\n address from,\\n address to,\\n uint256 value\\n ) private {\\n // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));\\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));\\n require(success && (data.length == 0 || abi.decode(data, (bool))), \\\"Stargate: TRANSFER_FROM_FAILED\\\");\\n }\\n\\n //---------------------------------------------------------------------------\\n // LOCAL CHAIN FUNCTIONS\\n\\n function addLiquidity(\\n uint256 _poolId,\\n uint256 _amountLD,\\n address _to\\n ) external override {\\n Pool pool = _getPool(_poolId);\\n _safeTransferFrom(pool.token(), msg.sender, address(pool), _amountLD);\\n pool.mint(_to, _amountLD);\\n }\\n\\n function swap(\\n uint16 _dstChainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress,\\n uint256 _amountLD,\\n uint256 _minAmountLD,\\n lzTxObj memory _lzTxParams,\\n bytes calldata _to,\\n bytes calldata _payload\\n ) external payable override {\\n Pool.SwapObj memory s;\\n Pool.CreditObj memory c;\\n {\\n Pool pool = _getPool(_srcPoolId);\\n _safeTransferFrom(pool.token(), msg.sender, address(pool), _amountLD);\\n s = pool.swap(_dstChainId, _dstPoolId, msg.sender, _amountLD, _minAmountLD, true);\\n c = pool.sendCredits(_dstChainId, _dstPoolId);\\n }\\n bridge.swap{value: msg.value}(_dstChainId, _srcPoolId, _dstPoolId, _refundAddress, c, s, _lzTxParams, _to, _payload);\\n }\\n\\n function redeemRemote(\\n uint16 _dstChainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress,\\n uint256 _amountLP,\\n uint256 _minAmountLD,\\n bytes calldata _to,\\n lzTxObj memory _lzTxParams\\n ) external payable override {\\n Pool.SwapObj memory s;\\n Pool.CreditObj memory c;\\n\\n {\\n Pool pool = _getPool(_srcPoolId);\\n uint256 amountLD = pool.redeemRemote(_dstChainId, _dstPoolId, msg.sender, _amountLP);\\n // perform a swap with no liquidity\\n s = pool.swap(_dstChainId, _dstPoolId, msg.sender, amountLD, _minAmountLD, false);\\n c = pool.sendCredits(_dstChainId, _dstPoolId);\\n }\\n // equal to a swap, with no payload (\\\"0x\\\") no dstGasForCall 0\\n bridge.swap{value: msg.value}(_dstChainId, _srcPoolId, _dstPoolId, _refundAddress, c, s, _lzTxParams, _to, \\\"\\\");\\n }\\n\\n function redeemLocal(\\n uint16 _dstChainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress,\\n uint256 _amountLP,\\n bytes calldata _to,\\n lzTxObj memory _lzTxParams\\n ) external payable override {\\n Pool pool = _getPool(_srcPoolId);\\n\\n address toAddress;\\n {\\n bytes memory to_mem = _to;\\n assembly {\\n toAddress := mload(add(to_mem, 20))\\n }\\n }\\n\\n uint256 amountSD = pool.redeemLocal(msg.sender, _amountLP, _dstChainId, _dstPoolId, toAddress);\\n Pool.CreditObj memory c = pool.sendCredits(_dstChainId, _dstPoolId);\\n if (amountSD == 0) {\\n // full instant withdrawal at local, just send credit\\n bridge.sendCredits{value: msg.value}(_dstChainId, _srcPoolId, _dstPoolId, _refundAddress, c);\\n } else {\\n bridge.redeemLocal{value: msg.value}(_dstChainId, _srcPoolId, _dstPoolId, _refundAddress, c, amountSD, _to, _lzTxParams);\\n }\\n }\\n\\n function sendCredits(\\n uint16 _dstChainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress\\n ) external payable override {\\n require(_refundAddress != address(0x0), \\\"Stargate: _refundAddress cannot be 0x0\\\");\\n Pool pool = _getPool(_srcPoolId);\\n Pool.CreditObj memory c = pool.sendCredits(_dstChainId, _dstPoolId);\\n bridge.sendCredits{value: msg.value}(_dstChainId, _srcPoolId, _dstPoolId, _refundAddress, c);\\n }\\n\\n function quoteLayerZeroFee(\\n uint16 _dstChainId,\\n uint8 _functionType,\\n bytes calldata _toAddress,\\n bytes calldata _transferAndCallPayload,\\n Router.lzTxObj memory _lzTxParams\\n ) external view override returns (uint256) {\\n return bridge.quoteLayerZeroFee(_dstChainId, _functionType, _toAddress, _transferAndCallPayload, _lzTxParams);\\n }\\n\\n function revertRedeemLocal(\\n uint16 _dstChainId,\\n bytes calldata _srcAddress,\\n uint256 _nonce,\\n address payable _refundAddress,\\n lzTxObj memory _lzTxParams\\n ) external payable {\\n bytes memory payload = revertLookup[_dstChainId][_srcAddress][_nonce];\\n require(payload.length > 0, \\\"Stargate: no retry revert\\\");\\n {\\n uint8 functionType;\\n assembly {\\n functionType := mload(add(payload, 32))\\n }\\n require(functionType == TYPE_REDEEM_LOCAL_RESPONSE, \\\"Stargate: invalid function type\\\");\\n }\\n\\n // empty it\\n revertLookup[_dstChainId][_srcAddress][_nonce] = \\\"\\\";\\n\\n uint256 srcPoolId;\\n uint256 dstPoolId;\\n assembly {\\n srcPoolId := mload(add(payload, 64))\\n dstPoolId := mload(add(payload, 96))\\n }\\n\\n Pool.CreditObj memory c;\\n {\\n Pool pool = _getPool(dstPoolId);\\n c = pool.sendCredits(_dstChainId, srcPoolId);\\n }\\n\\n bridge.redeemLocalCallback{value: msg.value}(_dstChainId, _refundAddress, c, _lzTxParams, payload);\\n }\\n\\n function retryRevert(\\n uint16 _dstChainId,\\n bytes calldata _srcAddress,\\n uint256 _nonce\\n ) external payable {\\n bytes memory payload = revertLookup[_dstChainId][_srcAddress][_nonce];\\n require(payload.length > 0, \\\"Stargate: no retry revert\\\");\\n\\n // empty it\\n revertLookup[_dstChainId][_srcAddress][_nonce] = \\\"\\\";\\n\\n uint8 functionType;\\n assembly {\\n functionType := mload(add(payload, 32))\\n }\\n\\n if (functionType == TYPE_REDEEM_LOCAL_CALLBACK_RETRY) {\\n (, uint256 srcPoolId, uint256 dstPoolId, address to, uint256 amountSD, uint256 mintAmountSD) = abi.decode(\\n payload,\\n (uint8, uint256, uint256, address, uint256, uint256)\\n );\\n _redeemLocalCallback(_dstChainId, _srcAddress, _nonce, srcPoolId, dstPoolId, to, amountSD, mintAmountSD);\\n }\\n // for retrying the swapRemote. if it fails again, retry\\n else if (functionType == TYPE_SWAP_REMOTE_RETRY) {\\n (, uint256 srcPoolId, uint256 dstPoolId, uint256 dstGasForCall, address to, Pool.SwapObj memory s, bytes memory p) = abi.decode(\\n payload,\\n (uint8, uint256, uint256, uint256, address, Pool.SwapObj, bytes)\\n );\\n _swapRemote(_dstChainId, _srcAddress, _nonce, srcPoolId, dstPoolId, dstGasForCall, to, s, p);\\n }\\n }\\n\\n function clearCachedSwap(\\n uint16 _dstChainId,\\n bytes calldata _srcAddress,\\n uint256 _nonce\\n ) external {\\n CachedSwap memory cs = cachedSwapLookup[_dstChainId][_srcAddress][_nonce];\\n require(cs.to != address(0x0), \\\"Stargate: cache already cleared\\\");\\n IStargateReceiver(cs.to).sgReceive(_dstChainId, _srcAddress, _nonce, cs.token, cs.amountLD, cs.payload);\\n\\n // clear the data\\n cachedSwapLookup[_dstChainId][_srcAddress][_nonce] = CachedSwap(address(0x0), 0, address(0x0), \\\"\\\");\\n }\\n\\n function creditChainPath(\\n uint16 _dstChainId,\\n uint256 _dstPoolId,\\n uint256 _srcPoolId,\\n Pool.CreditObj memory _c\\n ) external onlyBridge {\\n Pool pool = _getPool(_srcPoolId);\\n pool.creditChainPath(_dstChainId, _dstPoolId, _c);\\n }\\n\\n //---------------------------------------------------------------------------\\n // REMOTE CHAIN FUNCTIONS\\n\\n function redeemLocalCheckOnRemote(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint256 _nonce,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n uint256 _amountSD,\\n bytes calldata _to\\n ) external onlyBridge {\\n Pool pool = _getPool(_dstPoolId);\\n try pool.redeemLocalCheckOnRemote(_srcChainId, _srcPoolId, _amountSD) returns (uint256 swapAmountSD, uint256 mintAmountSD) {\\n revertLookup[_srcChainId][_srcAddress][_nonce] = abi.encode(\\n TYPE_REDEEM_LOCAL_RESPONSE,\\n _srcPoolId,\\n _dstPoolId,\\n swapAmountSD,\\n mintAmountSD,\\n _to\\n );\\n emit Revert(TYPE_REDEEM_LOCAL_RESPONSE, _srcChainId, _srcAddress, _nonce);\\n } catch {\\n // if the func fail, return [swapAmount: 0, mintAMount: _amountSD]\\n revertLookup[_srcChainId][_srcAddress][_nonce] = abi.encode(TYPE_REDEEM_LOCAL_RESPONSE, _srcPoolId, _dstPoolId, 0, _amountSD, _to);\\n emit Revert(TYPE_REDEEM_LOCAL_RESPONSE, _srcChainId, _srcAddress, _nonce);\\n }\\n }\\n\\n function redeemLocalCallback(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint256 _nonce,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address _to,\\n uint256 _amountSD,\\n uint256 _mintAmountSD\\n ) external onlyBridge {\\n _redeemLocalCallback(_srcChainId, _srcAddress, _nonce, _srcPoolId, _dstPoolId, _to, _amountSD, _mintAmountSD);\\n }\\n\\n function _redeemLocalCallback(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint256 _nonce,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address _to,\\n uint256 _amountSD,\\n uint256 _mintAmountSD\\n ) internal {\\n Pool pool = _getPool(_dstPoolId);\\n try pool.redeemLocalCallback(_srcChainId, _srcPoolId, _to, _amountSD, _mintAmountSD) {} catch {\\n revertLookup[_srcChainId][_srcAddress][_nonce] = abi.encode(\\n TYPE_REDEEM_LOCAL_CALLBACK_RETRY,\\n _srcPoolId,\\n _dstPoolId,\\n _to,\\n _amountSD,\\n _mintAmountSD\\n );\\n emit Revert(TYPE_REDEEM_LOCAL_CALLBACK_RETRY, _srcChainId, _srcAddress, _nonce);\\n }\\n }\\n\\n function swapRemote(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint256 _nonce,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n uint256 _dstGasForCall,\\n address _to,\\n Pool.SwapObj memory _s,\\n bytes memory _payload\\n ) external onlyBridge {\\n _swapRemote(_srcChainId, _srcAddress, _nonce, _srcPoolId, _dstPoolId, _dstGasForCall, _to, _s, _payload);\\n }\\n\\n function _swapRemote(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint256 _nonce,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n uint256 _dstGasForCall,\\n address _to,\\n Pool.SwapObj memory _s,\\n bytes memory _payload\\n ) internal {\\n Pool pool = _getPool(_dstPoolId);\\n try pool.swapRemote(_srcChainId, _srcPoolId, _to, _s) returns (uint256 amountLD) {\\n if (_payload.length > 0) {\\n try\\n IStargateReceiver(_to).sgReceive{gas: _dstGasForCall}(_srcChainId, _srcAddress, _nonce, pool.token(), amountLD, _payload)\\n {} catch Error(string memory reason) {\\n // string memory reason is useful to put in the event to see why it failed\\n emit ReceiveFailed(_srcChainId, _srcAddress, _nonce, pool.token(), amountLD, _payload, reason);\\n } catch (\\n bytes memory /*returnData*/ // The call likely ran out of gas\\n ) {\\n cachedSwapLookup[_srcChainId][_srcAddress][_nonce] = CachedSwap(pool.token(), amountLD, _to, _payload);\\n emit CachedSwapSaved(_srcChainId, _srcAddress, _nonce, pool.token(), amountLD, _to, _payload);\\n }\\n }\\n } catch {\\n revertLookup[_srcChainId][_srcAddress][_nonce] = abi.encode(\\n TYPE_SWAP_REMOTE_RETRY,\\n _srcPoolId,\\n _dstPoolId,\\n _dstGasForCall,\\n _to,\\n _s,\\n _payload\\n );\\n emit Revert(TYPE_SWAP_REMOTE_RETRY, _srcChainId, _srcAddress, _nonce);\\n }\\n }\\n\\n //---------------------------------------------------------------------------\\n // DAO Calls\\n\\n function createPool(\\n uint256 _poolId,\\n address _token,\\n uint8 _sharedDecimals,\\n uint8 _localDecimals,\\n string memory _name,\\n string memory _symbol\\n ) external onlyOwner returns (address) {\\n require(_token != address(0x0), \\\"Stargate: _token cannot be 0x0\\\");\\n return factory.createPool(_poolId, _token, _sharedDecimals, _localDecimals, _name, _symbol);\\n }\\n\\n function createChainPath(\\n uint256 _poolId,\\n uint16 _dstChainId,\\n uint256 _dstPoolId,\\n uint256 _weight\\n ) external onlyOwner {\\n Pool pool = _getPool(_poolId);\\n pool.createChainPath(_dstChainId, _dstPoolId, _weight);\\n }\\n\\n function activateChainPath(\\n uint256 _poolId,\\n uint16 _dstChainId,\\n uint256 _dstPoolId\\n ) external onlyOwner {\\n Pool pool = _getPool(_poolId);\\n pool.activateChainPath(_dstChainId, _dstPoolId);\\n }\\n\\n function setWeightForChainPath(\\n uint256 _poolId,\\n uint16 _dstChainId,\\n uint256 _dstPoolId,\\n uint16 _weight\\n ) external onlyOwner {\\n Pool pool = _getPool(_poolId);\\n pool.setWeightForChainPath(_dstChainId, _dstPoolId, _weight);\\n }\\n\\n function setProtocolFeeOwner(address _owner) external onlyOwner {\\n require(_owner != address(0x0), \\\"Stargate: _owner cannot be 0x0\\\");\\n protocolFeeOwner = _owner;\\n }\\n\\n function setMintFeeOwner(address _owner) external onlyOwner {\\n require(_owner != address(0x0), \\\"Stargate: _owner cannot be 0x0\\\");\\n mintFeeOwner = _owner;\\n }\\n\\n function setFees(uint256 _poolId, uint256 _mintFeeBP) external onlyOwner {\\n Pool pool = _getPool(_poolId);\\n pool.setFee(_mintFeeBP);\\n }\\n\\n function setFeeLibrary(uint256 _poolId, address _feeLibraryAddr) external onlyOwner {\\n Pool pool = _getPool(_poolId);\\n pool.setFeeLibrary(_feeLibraryAddr);\\n }\\n\\n function setSwapStop(uint256 _poolId, bool _swapStop) external onlyOwner {\\n Pool pool = _getPool(_poolId);\\n pool.setSwapStop(_swapStop);\\n }\\n\\n function setDeltaParam(\\n uint256 _poolId,\\n bool _batched,\\n uint256 _swapDeltaBP,\\n uint256 _lpDeltaBP,\\n bool _defaultSwapMode,\\n bool _defaultLPMode\\n ) external onlyOwner {\\n Pool pool = _getPool(_poolId);\\n pool.setDeltaParam(_batched, _swapDeltaBP, _lpDeltaBP, _defaultSwapMode, _defaultLPMode);\\n }\\n\\n function callDelta(uint256 _poolId, bool _fullMode) external {\\n Pool pool = _getPool(_poolId);\\n pool.callDelta(_fullMode);\\n }\\n\\n //---------------------------------------------------------------------------\\n\\n function withdrawMintFee(uint256 _poolId, address _to) external {\\n require(mintFeeOwner == msg.sender, \\\"Stargate: only mintFeeOwner\\\");\\n Pool pool = _getPool(_poolId);\\n pool.withdrawMintFeeBalance(_to);\\n }\\n\\n //---------------------------------------------------------------------------\\n\\n function withdrawProtocolFee(uint256 _poolId, address _to) external {\\n require(protocolFeeOwner == msg.sender, \\\"Stargate: only protocolFeeOwner\\\");\\n Pool pool = _getPool(_poolId);\\n pool.withdrawProtocolFeeBalance(_to);\\n }\\n}\\n\",\"keccak256\":\"0x70ee339d2baed1ff98a587868b55cd514cd8b4e63228856b40876b4611e0593c\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ILayerZeroEndpoint.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.7.6;\\n\\nimport \\\"./ILayerZeroUserApplicationConfig.sol\\\";\\n\\ninterface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {\\n function send(\\n uint16 _chainId,\\n bytes calldata _destination,\\n bytes calldata _payload,\\n address payable refundAddress,\\n address _zroPaymentAddress,\\n bytes calldata txParameters\\n ) external payable;\\n\\n function estimateNativeFees(\\n uint16 chainId,\\n address userApplication,\\n bytes calldata payload,\\n bool payInZRO,\\n bytes calldata txParameters\\n ) external view returns (uint256 totalFee);\\n\\n function getEndpointId() external view returns (uint16);\\n}\\n\",\"keccak256\":\"0xddf0a3786cad752f5a457d2159b3dd8b2df4624bed51162b17347416e86631fc\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ILayerZeroReceiver.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.7.6;\\n\\ninterface ILayerZeroReceiver {\\n function lzReceive(\\n uint16 _srcChainId,\\n bytes calldata _srcAddress,\\n uint64 nonce,\\n bytes calldata _payload\\n ) external;\\n}\\n\",\"keccak256\":\"0xbac3dd762e9b9374583d25f533b428667296823d6f773a31474f2fb81fc051ea\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ILayerZeroUserApplicationConfig.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.7.6;\\n\\ninterface ILayerZeroUserApplicationConfig {\\n /* setters */\\n\\n function setOracle(uint16 _chainId, address payable _oracle) external;\\n\\n function setRelayer(uint16 _chainId, address payable _relayer) external;\\n\\n function setBlockConfirmations(uint16 _chainId, uint256 _blockConfirmations) external;\\n\\n function setLibraryVersion(uint16 _chainId, uint16 _libraryVersion) external;\\n\\n function setVersion(uint16 version) external;\\n\\n function getVersion() external returns (uint16);\\n\\n /* getters */\\n\\n function getOracle(uint16 _chainId, address userApplicationAddress) external view returns (address oracle);\\n\\n function getRelayer(uint16 _chainId, address userApplicationAddress) external view returns (address relayer);\\n\\n function getBlockConfirmations(uint16 _chainId, address userApplicationAddress) external view returns (uint256 blockConfirmations);\\n\\n function getLibraryVersion(uint16 _chainId, address userApplicationAddress) external view returns (uint16 libraryVersion);\\n}\\n\",\"keccak256\":\"0xe17dc97ad7c287fe4fe39ab4990f7f5d984b60b227f643745d62c849fc57e21f\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IStargateFeeLibrary.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.7.6;\\npragma abicoder v2;\\nimport \\\"../Pool.sol\\\";\\n\\ninterface IStargateFeeLibrary {\\n function getFees(\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n uint256 _dstChainId,\\n address _from,\\n uint256 _amountSD\\n ) external returns (Pool.SwapObj memory s);\\n}\\n\",\"keccak256\":\"0xe7f93133694f5047221966997010e2b09e567219d175f5c031cd32ed3d36cb8b\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IStargateReceiver.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.7.6;\\n\\ninterface IStargateReceiver {\\n function sgReceive(\\n uint16 _chainId,\\n bytes memory _srcAddress,\\n uint256 _nonce,\\n address _token,\\n uint256 amountLD,\\n bytes memory payload\\n ) external;\\n}\\n\",\"keccak256\":\"0x426e44d3907557a4cc3938894f5c42620d553603900c855ccd7cd417b3a75e79\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IStargateRouter.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity 0.7.6;\\npragma abicoder v2;\\n\\nimport \\\"../Router.sol\\\";\\n\\ninterface IStargateRouter {\\n function addLiquidity(\\n uint256 _poolId,\\n uint256 _amountLD,\\n address _to\\n ) external;\\n\\n function swap(\\n uint16 _dstChainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress,\\n uint256 _amountLD,\\n uint256 _minAmountLD,\\n Router.lzTxObj memory _lzTxParams,\\n bytes calldata _to,\\n bytes calldata _payload\\n ) external payable;\\n\\n function redeemRemote(\\n uint16 _dstChainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress,\\n uint256 _amountLP,\\n uint256 _minAmountLD,\\n bytes calldata _to,\\n Router.lzTxObj memory _lzTxParams\\n ) external payable;\\n\\n function redeemLocal(\\n uint16 _dstChainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress,\\n uint256 _amountLP,\\n bytes calldata _to,\\n Router.lzTxObj memory _lzTxParams\\n ) external payable;\\n\\n function sendCredits(\\n uint16 _dstChainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress\\n ) external payable;\\n\\n function quoteLayerZeroFee(\\n uint16 _dstChainId,\\n uint8 _functionType,\\n bytes calldata _toAddress,\\n bytes calldata _transferAndCallPayload,\\n Router.lzTxObj memory _lzTxParams\\n ) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x62fdddaabba0265ed5c9d5672fc7524b6c97502135b94d8d883a92d72b1d8fe0\",\"license\":\"BUSL-1.1\"}},\"version\":1}",
  1317. "bytecode": "0x60806040523480156200001157600080fd5b5060006200001e62000072565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001805562000076565b3390565b614b6680620000866000396000f3fe6080604052600436106102305760003560e01c80637f7212981161012e578063af640d82116100ab578063cefbdde21161006f578063cefbdde214610611578063da133a0614610631578063e78cea921461065e578063f2fde38b14610673578063fba6e2801461069357610230565b8063af640d8214610587578063c45a01551461059c578063c6a27624146105b1578063c7d968e3146105d1578063c8adf12d146105f157610230565b806398e391a1116100f257806398e391a11461050c5780639ba3aa741461052c5780639fbf10fc1461053f578063a18fa80414610552578063a96fbed41461057257610230565b80637f7212981461049157806384d0dba3146104b157806387b21efc146104c45780638da5cb5b146104e45780638f2e1d18146104f957610230565b806334aba410116101bc5780635500585c116101805780635500585c146103fc57806360a3b95c1461041c578063715018a61461042f5780637af935a1146104445780637b84d2871461047157610230565b806334aba41014610367578063403a9f7a14610387578063424c9119146103a757806343a30630146103c757806351a82035146103e757610230565b806316fb60f51161020357806316fb60f5146102cf57806320ddb8f5146102ef57806323fd4647146103045780632905dd11146103345780632f9255551461034757610230565b80630403bce5146102355780630a512369146102575780630b78f9c01461028d57806314c76351146102ad575b600080fd5b34801561024157600080fd5b50610255610250366004613628565b6106b3565b005b34801561026357600080fd5b506102776102723660046139ac565b6108df565b60405161028491906147ea565b60405180910390f35b34801561029957600080fd5b506102556102a8366004613c6a565b610978565b3480156102b957600080fd5b506102c2610a4b565b6040516102849190614840565b3480156102db57600080fd5b506102556102ea366004613c30565b610a50565b3480156102fb57600080fd5b506102c2610b1e565b34801561031057600080fd5b5061032461031f366004613425565b610b23565b6040516102849493929190613f92565b610255610342366004613392565b610c02565b34801561035357600080fd5b50610255610362366004613507565b610e8d565b34801561037357600080fd5b50610255610382366004613246565b610ec8565b34801561039357600080fd5b506102556103a236600461333b565b610f72565b3480156103b357600080fd5b506102556103c23660046132a1565b6111df565b3480156103d357600080fd5b506102556103e2366004613b51565b6112c1565b3480156103f357600080fd5b506102c26113a0565b34801561040857600080fd5b50610255610417366004613a76565b6113a5565b61025561042a36600461333b565b611409565b34801561043b57600080fd5b5061025561166a565b34801561045057600080fd5b5061046461045f366004613a9a565b611716565b6040516102849190613f0d565b34801561047d57600080fd5b5061025561048c366004613beb565b611839565b34801561049d57600080fd5b506102556104ac366004613479565b6118d9565b6102556104bf3660046137b1565b611913565b3480156104d057600080fd5b506102556104df366004613cae565b611b57565b3480156104f057600080fd5b50610464611c67565b61025561050736600461370c565b611c77565b34801561051857600080fd5b50610255610527366004613b2d565b611efb565b61025561053a3660046136c5565b611f97565b61025561054d366004613850565b61209f565b34801561055e57600080fd5b5061025561056d366004613930565b6122dc565b34801561057e57600080fd5b50610464612344565b34801561059357600080fd5b50610464612353565b3480156105a857600080fd5b50610464612362565b3480156105bd57600080fd5b506102556105cc366004613a76565b612371565b3480156105dd57600080fd5b506102556105ec366004613bb7565b61240d565b3480156105fd57600080fd5b5061025561060c366004613a76565b6124d9565b34801561061d57600080fd5b5061025561062c366004613246565b61253d565b34801561063d57600080fd5b5061065161064c366004613425565b6125e7565b6040516102849190613ff9565b34801561066a57600080fd5b506104646126a4565b34801561067f57600080fd5b5061025561068e366004613246565b6126b3565b34801561069f57600080fd5b506102556106ae366004613b2d565b6127b5565b6005546001600160a01b031633146106e65760405162461bcd60e51b81526004016106dd90614043565b60405180910390fd5b60006106f1856127ef565b604051637544f15560e11b81529091506001600160a01b0382169063ea89e2aa90610724908c908a9089906004016145b7565b6040805180830381600087803b15801561073d57600080fd5b505af192505050801561076d575060408051601f3d908101601f1916820190925261076a91810190613c8b565b60015b6108245760018686600087878760405160200161079097969594939291906148bb565b60408051601f1981840301815282825261ffff8c16600090815260066020529190912090916107c0908b90613ef1565b9081526020016040518091039020600089815260200190815260200160002090805190602001906107f2929190612fbe565b50600080516020614af183398151915260018a8a8a604051610817949392919061484e565b60405180910390a16108d4565b60018888848489896040516020016108429796959493929190614942565b60408051601f1981840301815282825261ffff8e1660009081526006602052919091209091610872908d90613ef1565b908152602001604051809103902060008b815260200190815260200160002090805190602001906108a4929190612fbe565b50600080516020614af183398151915260018c8c8c6040516108c9949392919061484e565b60405180910390a150505b505050505050505050565b600554604051630a51236960e01b81526000916001600160a01b031690630a5123699061091c908b908b908b908b908b908b908b9060040161479c565b60206040518083038186803b15801561093457600080fd5b505afa158015610948573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096c9190613a5e565b98975050505050505050565b61098061289d565b6001600160a01b0316610991611c67565b6001600160a01b0316146109da576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b60006109e5836127ef565b6040516369fe0e2d60e01b81529091506001600160a01b038216906369fe0e2d90610a149085906004016147ea565b600060405180830381600087803b158015610a2e57600080fd5b505af1158015610a42573d6000803e3d6000fd5b50505050505050565b600281565b610a5861289d565b6001600160a01b0316610a69611c67565b6001600160a01b031614610ab2576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b6000610abd856127ef565b6040516320d6bc7560e01b81529091506001600160a01b038216906320d6bc7590610af0908790879087906004016145b7565b600060405180830381600087803b158015610b0a57600080fd5b505af11580156108d4573d6000803e3d6000fd5b600181565b600760209081526000938452604080852084518086018401805192815290840195840195909520945292815290835291819020805460018083015460028085015460038601805488516101009682161596909602600019011692909204601f81018990048902850189019097528684526001600160a01b03948516979296941694939091830182828015610bf85780601f10610bcd57610100808354040283529160200191610bf8565b820191906000526020600020905b815481529060010190602001808311610bdb57829003601f168201915b5050505050905084565b61ffff86166000908152600660205260408082209051610c259088908890613ee1565b90815260408051602092819003830181206000888152908452829020805460026001821615610100026000190190911604601f81018590048502830185019093528282529092909190830182828015610cbf5780601f10610c9457610100808354040283529160200191610cbf565b820191906000526020600020905b815481529060010190602001808311610ca257829003601f168201915b505050505090506000815111610ce75760405162461bcd60e51b81526004016106dd906140b1565b602081015160ff8116600114610d0f5760405162461bcd60e51b81526004016106dd90614232565b506040805160208082018352600080835261ffff8b16815260069091528290209151909190610d419089908990613ee1565b908152602001604051809103902060008681526020019081526020016000209080519060200190610d73929190612fbe565b5060408101516060820151610d8661304a565b6000610d91836127ef565b604051630474ec6160e11b81529091506001600160a01b038216906308e9d8c290610dc2908e908890600401614499565b6040805180830381600087803b158015610ddb57600080fd5b505af1158015610def573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1391906132d9565b6005546040516396aae4af60e01b81529193506001600160a01b031691506396aae4af903490610e4f908e908b9087908c908c906004016142e6565b6000604051808303818588803b158015610e6857600080fd5b505af1158015610e7c573d6000803e3d6000fd5b505050505050505050505050505050565b6005546001600160a01b03163314610eb75760405162461bcd60e51b81526004016106dd90614043565b6108d48989898989898989896128a1565b610ed061289d565b6001600160a01b0316610ee1611c67565b6001600160a01b031614610f2a576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b6001600160a01b038116610f505760405162461bcd60e51b81526004016106dd906141c4565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b61ffff84166000908152600760205260408082209051610f959086908690613ee1565b9081526040805160209281900383018120600086815290845282902060808201835280546001600160a01b039081168352600180830154868501526002808401549092168486015260038301805486516101009382161593909302600019011692909204601f8101879004870282018701909552848152929491936060860193928301828280156110675780601f1061103c57610100808354040283529160200191611067565b820191906000526020600020905b81548152906001019060200180831161104a57829003601f168201915b5050509190925250505060408101519091506001600160a01b031661109e5760405162461bcd60e51b81526004016106dd906141fb565b604080820151825160208401516060850151935163ab8236f360e01b81526001600160a01b039093169363ab8236f3936110e5938b938b938b938b93929190600401614331565b600060405180830381600087803b1580156110ff57600080fd5b505af1158015611113573d6000803e3d6000fd5b5050604080516080810182526000808252602080830182905282840182905283518082018552828152606084015261ffff8b1682526007905282902091519093509091506111649087908790613ee1565b90815260408051602092819003830190206000868152908352819020835181546001600160a01b03199081166001600160a01b03928316178355858501516001840155928501516002830180549094169116179091556060830151805191926111d592600385019290910190612fbe565b5050505050505050565b6111e761289d565b6001600160a01b03166111f8611c67565b6001600160a01b031614611241576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b6005546001600160a01b03161561126a5760405162461bcd60e51b81526004016106dd90614156565b6002546001600160a01b0316156112935760405162461bcd60e51b81526004016106dd9061418d565b600580546001600160a01b039384166001600160a01b03199182161790915560028054929093169116179055565b6112c961289d565b6001600160a01b03166112da611c67565b6001600160a01b031614611323576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b600061132e876127ef565b60405163e065608b60e01b81529091506001600160a01b0382169063e065608b906113659089908990899089908990600401613fd0565b600060405180830381600087803b15801561137f57600080fd5b505af1158015611393573d6000803e3d6000fd5b5050505050505050505050565b600381565b6004546001600160a01b031633146113cf5760405162461bcd60e51b81526004016106dd9061407a565b60006113da836127ef565b60405163011dbbf960e61b81529091506001600160a01b0382169063476efe4090610a14908590600401613f0d565b61ffff8416600090815260066020526040808220905161142c9086908690613ee1565b90815260408051602092819003830181206000868152908452829020805460026001821615610100026000190190911604601f810185900485028301850190935282825290929091908301828280156114c65780601f1061149b576101008083540402835291602001916114c6565b820191906000526020600020905b8154815290600101906020018083116114a957829003601f168201915b5050505050905060008151116114ee5760405162461bcd60e51b81526004016106dd906140b1565b6040805160208082018352600080835261ffff891681526006909152829020915190919061151f9087908790613ee1565b908152602001604051809103902060008481526020019081526020016000209080519060200190611551929190612fbe565b50602081015160ff8116600214156115dc5760008060008060008680602001905181019061157f9190613ce6565b95509550955095509550506115d28b8b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508d92508a9150899050888888612dc2565b5050505050611662565b60ff81166003141561166257600080600080600080878060200190518101906116059190613d45565b9650965096509650965096505061165b8c8c8c8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508e92508b91508a9050898989896128a1565b5050505050505b505050505050565b61167261289d565b6001600160a01b0316611683611c67565b6001600160a01b0316146116cc576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600061172061289d565b6001600160a01b0316611731611c67565b6001600160a01b03161461177a576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b6001600160a01b0386166117a05760405162461bcd60e51b81526004016106dd9061400c565b600254604051637af935a160e01b81526001600160a01b0390911690637af935a1906117da908a908a908a908a908a908a906004016147f3565b602060405180830381600087803b1580156117f457600080fd5b505af1158015611808573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061182c9190613269565b90505b9695505050505050565b61184161289d565b6001600160a01b0316611852611c67565b6001600160a01b03161461189b576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b60006118a6856127ef565b60405163a985565f60e01b81529091506001600160a01b0382169063a985565f90610af090879087908790600401614599565b6005546001600160a01b031633146119035760405162461bcd60e51b81526004016106dd90614043565b6111d58888888888888888612dc2565b61191b613064565b61192361304a565b600061192e8b6127ef565b90506000816001600160a01b0316637298a5dc8e8d338d6040518563ffffffff1660e01b815260040161196494939291906144ad565b602060405180830381600087803b15801561197e57600080fd5b505af1158015611992573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119b69190613a5e565b9050816001600160a01b0316631b7319b68e8d33858d60006040518763ffffffff1660e01b81526004016119ef969594939291906144d7565b60c060405180830381600087803b158015611a0957600080fd5b505af1158015611a1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a419190613320565b9350816001600160a01b03166308e9d8c28e8d6040518363ffffffff1660e01b8152600401611a71929190614499565b6040805180830381600087803b158015611a8a57600080fd5b505af1158015611a9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ac291906132d9565b92505050600560009054906101000a90046001600160a01b03166001600160a01b03166351156e73348d8d8d8d87898b8e8e6040518b63ffffffff1660e01b8152600401611b189998979695949392919061469c565b6000604051808303818588803b158015611b3157600080fd5b505af1158015611b45573d6000803e3d6000fd5b50505050505050505050505050505050565b6000611b62846127ef565b9050611be0816001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ba057600080fd5b505afa158015611bb4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bd89190613269565b338386612ed6565b6040516340c10f1960e01b81526001600160a01b038216906340c10f1990611c0e9085908790600401613f79565b602060405180830381600087803b158015611c2857600080fd5b505af1158015611c3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c609190613a5e565b5050505050565b6000546001600160a01b03165b90565b6000611c82886127ef565b905060008085858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050905060148101519150506000826001600160a01b0316631d43108b33898e8d876040518663ffffffff1660e01b8152600401611d0c959493929190613f21565b602060405180830381600087803b158015611d2657600080fd5b505af1158015611d3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d5e9190613a5e565b90506000836001600160a01b03166308e9d8c28d8c6040518363ffffffff1660e01b8152600401611d90929190614499565b6040805180830381600087803b158015611da957600080fd5b505af1158015611dbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611de191906132d9565b905081611e6957600560009054906101000a90046001600160a01b03166001600160a01b031663be9d40ac348e8e8e8e876040518763ffffffff1660e01b8152600401611e329594939291906145d3565b6000604051808303818588803b158015611e4b57600080fd5b505af1158015611e5f573d6000803e3d6000fd5b505050505061165b565b600560009054906101000a90046001600160a01b03166001600160a01b0316633cef94b9348e8e8e8e87898f8f8f6040518b63ffffffff1660e01b8152600401611ebb99989796959493929190614728565b6000604051808303818588803b158015611ed457600080fd5b505af1158015611ee8573d6000803e3d6000fd5b5050505050505050505050505050505050565b611f0361289d565b6001600160a01b0316611f14611c67565b6001600160a01b031614611f5d576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b6000611f68836127ef565b60405163ac2cc36b60e01b81529091506001600160a01b0382169063ac2cc36b90610a14908590600401613fc5565b6001600160a01b038116611fbd5760405162461bcd60e51b81526004016106dd906142a0565b6000611fc8846127ef565b90506000816001600160a01b03166308e9d8c287866040518363ffffffff1660e01b8152600401611ffa929190614499565b6040805180830381600087803b15801561201357600080fd5b505af1158015612027573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061204b91906132d9565b600554604051632fa7502b60e21b81529192506001600160a01b03169063be9d40ac903490612086908a908a908a908a9089906004016145d3565b6000604051808303818588803b15801561137f57600080fd5b6120a7613064565b6120af61304a565b60006120ba8d6127ef565b9050612138816001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156120f857600080fd5b505afa15801561210c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121309190613269565b33838d612ed6565b806001600160a01b0316631b7319b68f8e338e8e60016040518763ffffffff1660e01b815260040161216f969594939291906144d7565b60c060405180830381600087803b15801561218957600080fd5b505af115801561219d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121c19190613320565b9250806001600160a01b03166308e9d8c28f8e6040518363ffffffff1660e01b81526004016121f1929190614499565b6040805180830381600087803b15801561220a57600080fd5b505af115801561221e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061224291906132d9565b915050600560009054906101000a90046001600160a01b03166001600160a01b03166351156e73348f8f8f8f87898f8f8f8f8f6040518d63ffffffff1660e01b815260040161229b9b9a99989796959493929190614608565b6000604051808303818588803b1580156122b457600080fd5b505af11580156122c8573d6000803e3d6000fd5b505050505050505050505050505050505050565b6005546001600160a01b031633146123065760405162461bcd60e51b81526004016106dd90614043565b6000612311836127ef565b60405163b6addec760e01b81529091506001600160a01b0382169063b6addec790610af09088908890879060040161457a565b6003546001600160a01b031681565b6004546001600160a01b031681565b6002546001600160a01b031681565b61237961289d565b6001600160a01b031661238a611c67565b6001600160a01b0316146123d3576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b60006123de836127ef565b6040516312d72b2f60e21b81529091506001600160a01b03821690634b5cacbc90610a14908590600401613f0d565b61241561289d565b6001600160a01b0316612426611c67565b6001600160a01b03161461246f576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b600061247a846127ef565b6040516345ec368560e11b81529091506001600160a01b03821690638bd86d0a906124ab9086908690600401614499565b600060405180830381600087803b1580156124c557600080fd5b505af11580156111d5573d6000803e3d6000fd5b6003546001600160a01b031633146125035760405162461bcd60e51b81526004016106dd9061411f565b600061250e836127ef565b604051632f8c40a560e21b81529091506001600160a01b0382169063be31029490610a14908590600401613f0d565b61254561289d565b6001600160a01b0316612556611c67565b6001600160a01b03161461259f576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b6001600160a01b0381166125c55760405162461bcd60e51b81526004016106dd906141c4565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6006602090815260009384526040808520845180860184018051928152908401958401959095209452928152908352918190208054825160026001831615610100026000190190921691909104601f81018590048502820185019093528281529290919083018282801561269c5780601f106126715761010080835404028352916020019161269c565b820191906000526020600020905b81548152906001019060200180831161267f57829003601f168201915b505050505081565b6005546001600160a01b031681565b6126bb61289d565b6001600160a01b03166126cc611c67565b6001600160a01b031614612715576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b6001600160a01b03811661275a5760405162461bcd60e51b8152600401808060200182810382526026815260200180614acb6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60006127c0836127ef565b604051637fb6526560e01b81529091506001600160a01b03821690637fb6526590610a14908590600401613fc5565b60025460405163068bcd8d60e01b81526000916001600160a01b03169063068bcd8d906128209085906004016147ea565b60206040518083038186803b15801561283857600080fd5b505afa15801561284c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128709190613269565b90506001600160a01b0381166128985760405162461bcd60e51b81526004016106dd90614269565b919050565b3390565b60006128ac866127ef565b60405163902b8ab760e01b81529091506001600160a01b0382169063902b8ab7906128e1908d908b9089908990600401614510565b602060405180830381600087803b1580156128fb57600080fd5b505af192505050801561292b575060408051601f3d908101601f1916820190925261292891810190613a5e565b60015b6129e157600387878787878760405160200161294d97969594939291906148f3565b60408051601f1981840301815282825261ffff8d166000908152600660205291909120909161297d908c90613ef1565b908152602001604051809103902060008a815260200190815260200160002090805190602001906129af929190612fbe565b50600080516020614af183398151915260038b8b8b6040516129d4949392919061484e565b60405180910390a1612db6565b82511561139357846001600160a01b031663ab8236f3878d8d8d876001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a3457600080fd5b505afa158015612a48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a6c9190613269565b878a6040518863ffffffff1660e01b8152600401612a8f969594939291906143e0565b600060405180830381600088803b158015612aa957600080fd5b5087f193505050508015612abb575060015b61139357612ac76149f1565b80612ad25750612b8b565b7f57bbe9975ae2ee06978860cfd29476cb8cb7e61bd8dcb55148eff883bac1d8fa8c8c8c866001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b2f57600080fd5b505afa158015612b43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b679190613269565b868987604051612b7d9796959493929190614439565b60405180910390a150612db1565b3d808015612bb5576040519150601f19603f3d011682016040523d82523d6000602084013e612bba565b606091505b506040518060800160405280846001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015612bff57600080fd5b505afa158015612c13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c379190613269565b6001600160a01b03168152602001838152602001876001600160a01b0316815260200185815250600760008e61ffff1661ffff1681526020019081526020016000208c604051612c879190613ef1565b908152604080516020928190038301902060008e8152908352819020835181546001600160a01b03199081166001600160a01b0392831617835585850151600184015592850151600283018054909416911617909155606083015180519192612cf892600385019290910190612fbe565b509050507fb384cc81887146668e3e7490de85252fe62d53a265bd499e1009326f611a605f8c8c8c866001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015612d5957600080fd5b505afa158015612d6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d919190613269565b868b8a604051612da7979695949392919061438c565b60405180910390a1505b611393565b50505050505050505050565b6000612dcd856127ef565b604051632cc36bab60e21b81529091506001600160a01b0382169063b30daeac90612e04908c908a90899089908990600401614548565b600060405180830381600087803b158015612e1e57600080fd5b505af1925050508015612e2f575060015b6108d45760028686868686604051602001612e4f96959493929190614885565b60408051601f1981840301815282825261ffff8c1660009081526006602052919091209091612e7f908b90613ef1565b908152602001604051809103902060008981526020019081526020016000209080519060200190612eb1929190612fbe565b50600080516020614af183398151915260028a8a8a604051610817949392919061484e565b600080856001600160a01b03166323b872dd868686604051602401612efd93929190613f55565b6040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051612f369190613ef1565b6000604051808303816000865af19150503d8060008114612f73576040519150601f19603f3d011682016040523d82523d6000602084013e612f78565b606091505b5091509150818015612fa2575080511580612fa2575080806020019051810190612fa29190613285565b6116625760405162461bcd60e51b81526004016106dd906140e8565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282612ff4576000855561303a565b82601f1061300d57805160ff191683800117855561303a565b8280016001018555821561303a579182015b8281111561303a57825182559160200191906001019061301f565b5061304692915061309a565b5090565b604051806040016040528060008152602001600081525090565b6040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b5b80821115613046576000815560010161309b565b803561289881614a95565b60008083601f8401126130cb578182fd5b5081356001600160401b038111156130e1578182fd5b6020830191508360208285010111156130f957600080fd5b9250929050565b600082601f830112613110578081fd5b813561312361311e8261499a565b614977565b818152846020838601011115613137578283fd5b816020850160208301379081016020019190915292915050565b600060c08284031215613162578081fd5b60405160c081018181106001600160401b038211171561317e57fe5b8060405250809150825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a08201525092915050565b6000606082840312156131d4578081fd5b604051606081016001600160401b0382821081831117156131f157fe5b816040528293508435835260208501356020840152604085013591508082111561321a57600080fd5b5061322785828601613100565b6040830152505092915050565b803561ffff8116811461289857600080fd5b600060208284031215613257578081fd5b813561326281614a95565b9392505050565b60006020828403121561327a578081fd5b815161326281614a95565b600060208284031215613296578081fd5b815161326281614aad565b600080604083850312156132b3578081fd5b82356132be81614a95565b915060208301356132ce81614a95565b809150509250929050565b6000604082840312156132ea578081fd5b604051604081018181106001600160401b038211171561330657fe5b604052825181526020928301519281019290925250919050565b600060c08284031215613331578081fd5b6132628383613151565b60008060008060608587031215613350578182fd5b61335985613234565b935060208501356001600160401b03811115613373578283fd5b61337f878288016130ba565b9598909750949560400135949350505050565b60008060008060008060a087890312156133aa578384fd5b6133b387613234565b955060208701356001600160401b03808211156133ce578586fd5b6133da8a838b016130ba565b909750955060408901359450606089013591506133f682614a95565b9092506080880135908082111561340b578283fd5b5061341889828a016131c3565b9150509295509295509295565b600080600060608486031215613439578081fd5b61344284613234565b925060208401356001600160401b0381111561345c578182fd5b61346886828701613100565b925050604084013590509250925092565b600080600080600080600080610100898b031215613495578586fd5b61349e89613234565b975060208901356001600160401b038111156134b8578687fd5b6134c48b828c01613100565b97505060408901359550606089013594506080890135935060a08901356134ea81614a95565b979a969950949793969295929450505060c08201359160e0013590565b6000806000806000806000806000898b036101c0811215613526578384fd5b61352f8b613234565b995060208b01356001600160401b038082111561354a578586fd5b6135568e838f01613100565b9a5060408d0135995060608d0135985060808d0135975060a08d0135965060c08d0135915061358482614a95565b81955060c060df1984011215613598578384fd5b604051925060c08301915082821081831117156135b157fe5b8160405260e08d013583526101008d013560208401526101208d013560408401526101408d013560608401526101608d013560808401526101808d013560a08401528294506101a08d013592508083111561360a578384fd5b50506136188c828d01613100565b9150509295985092959850929598565b60008060008060008060008060e0898b031215613643578182fd5b61364c89613234565b975060208901356001600160401b0380821115613667578384fd5b6136738c838d01613100565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b01359150808211156136a4578384fd5b506136b18b828c016130ba565b999c989b5096995094979396929594505050565b600080600080608085870312156136da578182fd5b6136e385613234565b93506020850135925060408501359150606085013561370181614a95565b939692955090935050565b60008060008060008060008060e0898b031215613727578182fd5b61373089613234565b97506020890135965060408901359550606089013561374e81614a95565b94506080890135935060a08901356001600160401b0380821115613770578384fd5b61377c8c838d016130ba565b909550935060c08b0135915080821115613794578283fd5b506137a18b828c016131c3565b9150509295985092959890939650565b60008060008060008060008060006101008a8c0312156137cf578283fd5b6137d88a613234565b985060208a0135975060408a0135965060608a01356137f681614a95565b955060808a0135945060a08a0135935060c08a01356001600160401b038082111561381f578485fd5b61382b8d838e016130ba565b909550935060e08c0135915080821115613843578283fd5b506136188c828d016131c3565b60008060008060008060008060008060006101208c8e031215613871578485fd5b61387a8c613234565b9a5060208c0135995060408c0135985061389660608d016130af565b975060808c0135965060a08c013595506001600160401b038060c08e013511156138be578586fd5b6138ce8e60c08f01358f016131c3565b95508060e08e013511156138e0578283fd5b6138f08e60e08f01358f016130ba565b90955093506101008d0135811015613906578283fd5b506139188d6101008e01358e016130ba565b81935080925050509295989b509295989b9093969950565b60008060008084860360a0811215613946578283fd5b61394f86613234565b9450602086013593506040808701359350605f198201121561396f578182fd5b50604051604081018181106001600160401b038211171561398c57fe5b604052606086013581526080909501356020860152509194909350909190565b600080600080600080600060a0888a0312156139c6578081fd5b6139cf88613234565b965060208801356139df81614abb565b955060408801356001600160401b03808211156139fa578283fd5b613a068b838c016130ba565b909750955060608a0135915080821115613a1e578283fd5b613a2a8b838c016130ba565b909550935060808a0135915080821115613a42578283fd5b50613a4f8a828b016131c3565b91505092959891949750929550565b600060208284031215613a6f578081fd5b5051919050565b60008060408385031215613a88578182fd5b8235915060208301356132ce81614a95565b60008060008060008060c08789031215613ab2578384fd5b863595506020870135613ac481614a95565b94506040870135613ad481614abb565b93506060870135613ae481614abb565b925060808701356001600160401b0380821115613aff578384fd5b613b0b8a838b01613100565b935060a0890135915080821115613b20578283fd5b5061341889828a01613100565b60008060408385031215613b3f578182fd5b8235915060208301356132ce81614aad565b60008060008060008060c08789031215613b69578384fd5b863595506020870135613b7b81614aad565b945060408701359350606087013592506080870135613b9981614aad565b915060a0870135613ba981614aad565b809150509295509295509295565b600080600060608486031215613bcb578081fd5b83359250613bdb60208501613234565b9150604084013590509250925092565b60008060008060808587031215613c00578182fd5b84359350613c1060208601613234565b925060408501359150613c2560608601613234565b905092959194509250565b60008060008060808587031215613c45578182fd5b84359350613c5560208601613234565b93969395505050506040820135916060013590565b60008060408385031215613c7c578182fd5b50508035926020909101359150565b60008060408385031215613c9d578182fd5b505080516020909101519092909150565b600080600060608486031215613cc2578081fd5b83359250602084013591506040840135613cdb81614a95565b809150509250925092565b60008060008060008060c08789031215613cfe578384fd5b8651613d0981614abb565b8096505060208701519450604087015193506060870151613d2981614a95565b809350506080870151915060a087015190509295509295509295565b6000806000806000806000610180888a031215613d60578081fd5b8751613d6b81614abb565b809750506020880151955060408801519450606088015193506080880151613d9281614a95565b9250613da18960a08a01613151565b91506101608801516001600160401b03811115613dbc578182fd5b8801601f81018a13613dcc578182fd5b8051613dda61311e8261499a565b8181528b6020838501011115613dee578384fd5b613dff8260208301602086016149bb565b80935050505092959891949750929550565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b60008151808452613e538160208601602086016149bb565b601f01601f19169290920160200192915050565b80518252602090810151910152565b805182526020810151602083015260408101516040830152606081015160608301526080810151608083015260a081015160a08301525050565b60008151835260208201516020840152604082015160606040850152613ed96060850182613e3b565b949350505050565b6000828483379101908152919050565b60008251613f038184602087016149bb565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b039586168152602081019490945261ffff9290921660408401526060830152909116608082015260a00190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b038581168252602082018590528316604082015260806060820181905260009061182f90830184613e3b565b901515815260200190565b941515855260208501939093526040840191909152151560608301521515608082015260a00190565b6000602082526132626020830184613e3b565b6020808252601e908201527f53746172676174653a205f746f6b656e2063616e6e6f74206265203078300000604082015260600190565b6020808252601e908201527f4272696467653a2063616c6c6572206d757374206265204272696467652e0000604082015260600190565b6020808252601b908201527f53746172676174653a206f6e6c79206d696e744665654f776e65720000000000604082015260600190565b60208082526019908201527f53746172676174653a206e6f2072657472792072657665727400000000000000604082015260600190565b6020808252601e908201527f53746172676174653a205452414e534645525f46524f4d5f4641494c45440000604082015260600190565b6020808252601f908201527f53746172676174653a206f6e6c792070726f746f636f6c4665654f776e657200604082015260600190565b6020808252601a908201527f62726964676520616c726561647920696e697469616c697a6564000000000000604082015260600190565b6020808252601b908201527f666163746f727920616c726561647920696e697469616c697a65640000000000604082015260600190565b6020808252601e908201527f53746172676174653a205f6f776e65722063616e6e6f74206265203078300000604082015260600190565b6020808252601f908201527f53746172676174653a20636163686520616c726561647920636c656172656400604082015260600190565b6020808252601f908201527f53746172676174653a20696e76616c69642066756e6374696f6e207479706500604082015260600190565b6020808252601d908201527f53746172676174653a20506f6f6c20646f6573206e6f74206578697374000000604082015260600190565b60208082526026908201527f53746172676174653a205f726566756e64416464726573732063616e6e6f742060408201526506265203078360d41b606082015260800190565b61ffff861681526001600160a01b0385166020820152600061430b6040830186613e67565b60c0608083015261431f60c0830185613eb0565b82810360a084015261096c8185613e3b565b600061ffff8916825260c0602083015261434f60c08301888a613e11565b604083018790526001600160a01b03861660608401526080830185905282810360a084015261437e8185613e3b565b9a9950505050505050505050565b600061ffff8916825260e060208301526143a960e0830189613e3b565b604083018890526001600160a01b03878116606085015260808401879052851660a084015282810360c084015261437e8185613e3b565b600061ffff8816825260c060208301526143fd60c0830188613e3b565b604083018790526001600160a01b03861660608401526080830185905282810360a084015261442c8185613e3b565b9998505050505050505050565b600061ffff8916825260e0602083015261445660e0830189613e3b565b604083018890526001600160a01b03871660608401526080830186905282810360a08401526144858186613e3b565b905082810360c084015261437e8185613e3b565b61ffff929092168252602082015260400190565b61ffff94909416845260208401929092526001600160a01b03166040830152606082015260800190565b61ffff96909616865260208601949094526001600160a01b0392909216604085015260608401526080830152151560a082015260c00190565b61ffff85168152602081018490526001600160a01b0383166040820152610120810161453f6060830184613e76565b95945050505050565b61ffff95909516855260208501939093526001600160a01b039190911660408401526060830152608082015260a00190565b61ffff841681526020810183905260808101613ed96040830184613e67565b61ffff93841681526020810192909252909116604082015260600190565b61ffff9390931683526020830191909152604082015260600190565b61ffff8616815260208101859052604081018490526001600160a01b038316606082015260c0810161182f6080830184613e67565b61ffff8c168152602081018b9052604081018a90526001600160a01b038916606082015260006101e061463e608084018b613e67565b61464b60c084018a613e76565b8061018084015261465e81840189613eb0565b90508281036101a0840152614674818789613e11565b90508281036101c084015261468a818587613e11565b9e9d5050505050505050505050505050565b61ffff8a16815260208101899052604081018890526001600160a01b038716606082015260006101e06146d26080840189613e67565b6146df60c0840188613e76565b806101808401526146f281840187613eb0565b90508281036101a0840152614708818587613e11565b8381036101c0909401939093525081526020019998505050505050505050565b61ffff8a16815260208101899052604081018890526001600160a01b0387166060820152600061012061475e6080840189613e67565b8660c08401528060e08401526147778184018688613e11565b905082810361010084015261478c8185613eb0565b9c9b505050505050505050505050565b600061ffff8916825260ff8816602083015260a060408301526147c360a083018789613e11565b82810360608401526147d6818688613e11565b9050828103608084015261437e8185613eb0565b90815260200190565b8681526001600160a01b038616602082015260ff85811660408301528416606082015260c06080820181905260009061482e90830185613e3b565b82810360a084015261442c8185613e3b565b60ff91909116815260200190565b600060ff8616825261ffff85166020830152608060408301526148746080830185613e3b565b905082606083015295945050505050565b60ff969096168652602086019490945260408501929092526001600160a01b03166060840152608083015260a082015260c00190565b600060ff8916825287602083015286604083015260ff8616606083015284608083015260c060a083015261442c60c083018486613e11565b60ff881681526020810187905260408101869052606081018590526001600160a01b0384166080820152600061018061492f60a0840186613e76565b8061016084015261437e81840185613e3b565b600060ff8916825287602083015286604083015285606083015284608083015260c060a083015261442c60c083018486613e11565b6040518181016001600160401b038111828210171561499257fe5b604052919050565b60006001600160401b038211156149ad57fe5b50601f01601f191660200190565b60005b838110156149d65781810151838201526020016149be565b838111156149e5576000848401525b50505050565b60e01c90565b600060443d1015614a0157611c74565b600481823e6308c379a0614a1582516149eb565b14614a1f57611c74565b6040513d600319016004823e80513d6001600160401b038160248401118184111715614a4e5750505050611c74565b82840192508251915080821115614a685750505050611c74565b503d83016020828401011115614a8057505050611c74565b601f01601f1916810160200160405291505090565b6001600160a01b0381168114614aaa57600080fd5b50565b8015158114614aaa57600080fd5b60ff81168114614aaa57600080fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a5d2ba6de30cc2f2e91c5a29ba66b148c27826954217e2f67cb8983541da21cf4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a26469706673582212204a3b63bb845ebaa02c7a65b9c5e33f1cc762b5a660a2185f9670968550a5337d64736f6c63430007060033",
  1318. "deployedBytecode": "0x6080604052600436106102305760003560e01c80637f7212981161012e578063af640d82116100ab578063cefbdde21161006f578063cefbdde214610611578063da133a0614610631578063e78cea921461065e578063f2fde38b14610673578063fba6e2801461069357610230565b8063af640d8214610587578063c45a01551461059c578063c6a27624146105b1578063c7d968e3146105d1578063c8adf12d146105f157610230565b806398e391a1116100f257806398e391a11461050c5780639ba3aa741461052c5780639fbf10fc1461053f578063a18fa80414610552578063a96fbed41461057257610230565b80637f7212981461049157806384d0dba3146104b157806387b21efc146104c45780638da5cb5b146104e45780638f2e1d18146104f957610230565b806334aba410116101bc5780635500585c116101805780635500585c146103fc57806360a3b95c1461041c578063715018a61461042f5780637af935a1146104445780637b84d2871461047157610230565b806334aba41014610367578063403a9f7a14610387578063424c9119146103a757806343a30630146103c757806351a82035146103e757610230565b806316fb60f51161020357806316fb60f5146102cf57806320ddb8f5146102ef57806323fd4647146103045780632905dd11146103345780632f9255551461034757610230565b80630403bce5146102355780630a512369146102575780630b78f9c01461028d57806314c76351146102ad575b600080fd5b34801561024157600080fd5b50610255610250366004613628565b6106b3565b005b34801561026357600080fd5b506102776102723660046139ac565b6108df565b60405161028491906147ea565b60405180910390f35b34801561029957600080fd5b506102556102a8366004613c6a565b610978565b3480156102b957600080fd5b506102c2610a4b565b6040516102849190614840565b3480156102db57600080fd5b506102556102ea366004613c30565b610a50565b3480156102fb57600080fd5b506102c2610b1e565b34801561031057600080fd5b5061032461031f366004613425565b610b23565b6040516102849493929190613f92565b610255610342366004613392565b610c02565b34801561035357600080fd5b50610255610362366004613507565b610e8d565b34801561037357600080fd5b50610255610382366004613246565b610ec8565b34801561039357600080fd5b506102556103a236600461333b565b610f72565b3480156103b357600080fd5b506102556103c23660046132a1565b6111df565b3480156103d357600080fd5b506102556103e2366004613b51565b6112c1565b3480156103f357600080fd5b506102c26113a0565b34801561040857600080fd5b50610255610417366004613a76565b6113a5565b61025561042a36600461333b565b611409565b34801561043b57600080fd5b5061025561166a565b34801561045057600080fd5b5061046461045f366004613a9a565b611716565b6040516102849190613f0d565b34801561047d57600080fd5b5061025561048c366004613beb565b611839565b34801561049d57600080fd5b506102556104ac366004613479565b6118d9565b6102556104bf3660046137b1565b611913565b3480156104d057600080fd5b506102556104df366004613cae565b611b57565b3480156104f057600080fd5b50610464611c67565b61025561050736600461370c565b611c77565b34801561051857600080fd5b50610255610527366004613b2d565b611efb565b61025561053a3660046136c5565b611f97565b61025561054d366004613850565b61209f565b34801561055e57600080fd5b5061025561056d366004613930565b6122dc565b34801561057e57600080fd5b50610464612344565b34801561059357600080fd5b50610464612353565b3480156105a857600080fd5b50610464612362565b3480156105bd57600080fd5b506102556105cc366004613a76565b612371565b3480156105dd57600080fd5b506102556105ec366004613bb7565b61240d565b3480156105fd57600080fd5b5061025561060c366004613a76565b6124d9565b34801561061d57600080fd5b5061025561062c366004613246565b61253d565b34801561063d57600080fd5b5061065161064c366004613425565b6125e7565b6040516102849190613ff9565b34801561066a57600080fd5b506104646126a4565b34801561067f57600080fd5b5061025561068e366004613246565b6126b3565b34801561069f57600080fd5b506102556106ae366004613b2d565b6127b5565b6005546001600160a01b031633146106e65760405162461bcd60e51b81526004016106dd90614043565b60405180910390fd5b60006106f1856127ef565b604051637544f15560e11b81529091506001600160a01b0382169063ea89e2aa90610724908c908a9089906004016145b7565b6040805180830381600087803b15801561073d57600080fd5b505af192505050801561076d575060408051601f3d908101601f1916820190925261076a91810190613c8b565b60015b6108245760018686600087878760405160200161079097969594939291906148bb565b60408051601f1981840301815282825261ffff8c16600090815260066020529190912090916107c0908b90613ef1565b9081526020016040518091039020600089815260200190815260200160002090805190602001906107f2929190612fbe565b50600080516020614af183398151915260018a8a8a604051610817949392919061484e565b60405180910390a16108d4565b60018888848489896040516020016108429796959493929190614942565b60408051601f1981840301815282825261ffff8e1660009081526006602052919091209091610872908d90613ef1565b908152602001604051809103902060008b815260200190815260200160002090805190602001906108a4929190612fbe565b50600080516020614af183398151915260018c8c8c6040516108c9949392919061484e565b60405180910390a150505b505050505050505050565b600554604051630a51236960e01b81526000916001600160a01b031690630a5123699061091c908b908b908b908b908b908b908b9060040161479c565b60206040518083038186803b15801561093457600080fd5b505afa158015610948573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096c9190613a5e565b98975050505050505050565b61098061289d565b6001600160a01b0316610991611c67565b6001600160a01b0316146109da576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b60006109e5836127ef565b6040516369fe0e2d60e01b81529091506001600160a01b038216906369fe0e2d90610a149085906004016147ea565b600060405180830381600087803b158015610a2e57600080fd5b505af1158015610a42573d6000803e3d6000fd5b50505050505050565b600281565b610a5861289d565b6001600160a01b0316610a69611c67565b6001600160a01b031614610ab2576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b6000610abd856127ef565b6040516320d6bc7560e01b81529091506001600160a01b038216906320d6bc7590610af0908790879087906004016145b7565b600060405180830381600087803b158015610b0a57600080fd5b505af11580156108d4573d6000803e3d6000fd5b600181565b600760209081526000938452604080852084518086018401805192815290840195840195909520945292815290835291819020805460018083015460028085015460038601805488516101009682161596909602600019011692909204601f81018990048902850189019097528684526001600160a01b03948516979296941694939091830182828015610bf85780601f10610bcd57610100808354040283529160200191610bf8565b820191906000526020600020905b815481529060010190602001808311610bdb57829003601f168201915b5050505050905084565b61ffff86166000908152600660205260408082209051610c259088908890613ee1565b90815260408051602092819003830181206000888152908452829020805460026001821615610100026000190190911604601f81018590048502830185019093528282529092909190830182828015610cbf5780601f10610c9457610100808354040283529160200191610cbf565b820191906000526020600020905b815481529060010190602001808311610ca257829003601f168201915b505050505090506000815111610ce75760405162461bcd60e51b81526004016106dd906140b1565b602081015160ff8116600114610d0f5760405162461bcd60e51b81526004016106dd90614232565b506040805160208082018352600080835261ffff8b16815260069091528290209151909190610d419089908990613ee1565b908152602001604051809103902060008681526020019081526020016000209080519060200190610d73929190612fbe565b5060408101516060820151610d8661304a565b6000610d91836127ef565b604051630474ec6160e11b81529091506001600160a01b038216906308e9d8c290610dc2908e908890600401614499565b6040805180830381600087803b158015610ddb57600080fd5b505af1158015610def573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1391906132d9565b6005546040516396aae4af60e01b81529193506001600160a01b031691506396aae4af903490610e4f908e908b9087908c908c906004016142e6565b6000604051808303818588803b158015610e6857600080fd5b505af1158015610e7c573d6000803e3d6000fd5b505050505050505050505050505050565b6005546001600160a01b03163314610eb75760405162461bcd60e51b81526004016106dd90614043565b6108d48989898989898989896128a1565b610ed061289d565b6001600160a01b0316610ee1611c67565b6001600160a01b031614610f2a576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b6001600160a01b038116610f505760405162461bcd60e51b81526004016106dd906141c4565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b61ffff84166000908152600760205260408082209051610f959086908690613ee1565b9081526040805160209281900383018120600086815290845282902060808201835280546001600160a01b039081168352600180830154868501526002808401549092168486015260038301805486516101009382161593909302600019011692909204601f8101879004870282018701909552848152929491936060860193928301828280156110675780601f1061103c57610100808354040283529160200191611067565b820191906000526020600020905b81548152906001019060200180831161104a57829003601f168201915b5050509190925250505060408101519091506001600160a01b031661109e5760405162461bcd60e51b81526004016106dd906141fb565b604080820151825160208401516060850151935163ab8236f360e01b81526001600160a01b039093169363ab8236f3936110e5938b938b938b938b93929190600401614331565b600060405180830381600087803b1580156110ff57600080fd5b505af1158015611113573d6000803e3d6000fd5b5050604080516080810182526000808252602080830182905282840182905283518082018552828152606084015261ffff8b1682526007905282902091519093509091506111649087908790613ee1565b90815260408051602092819003830190206000868152908352819020835181546001600160a01b03199081166001600160a01b03928316178355858501516001840155928501516002830180549094169116179091556060830151805191926111d592600385019290910190612fbe565b5050505050505050565b6111e761289d565b6001600160a01b03166111f8611c67565b6001600160a01b031614611241576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b6005546001600160a01b03161561126a5760405162461bcd60e51b81526004016106dd90614156565b6002546001600160a01b0316156112935760405162461bcd60e51b81526004016106dd9061418d565b600580546001600160a01b039384166001600160a01b03199182161790915560028054929093169116179055565b6112c961289d565b6001600160a01b03166112da611c67565b6001600160a01b031614611323576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b600061132e876127ef565b60405163e065608b60e01b81529091506001600160a01b0382169063e065608b906113659089908990899089908990600401613fd0565b600060405180830381600087803b15801561137f57600080fd5b505af1158015611393573d6000803e3d6000fd5b5050505050505050505050565b600381565b6004546001600160a01b031633146113cf5760405162461bcd60e51b81526004016106dd9061407a565b60006113da836127ef565b60405163011dbbf960e61b81529091506001600160a01b0382169063476efe4090610a14908590600401613f0d565b61ffff8416600090815260066020526040808220905161142c9086908690613ee1565b90815260408051602092819003830181206000868152908452829020805460026001821615610100026000190190911604601f810185900485028301850190935282825290929091908301828280156114c65780601f1061149b576101008083540402835291602001916114c6565b820191906000526020600020905b8154815290600101906020018083116114a957829003601f168201915b5050505050905060008151116114ee5760405162461bcd60e51b81526004016106dd906140b1565b6040805160208082018352600080835261ffff891681526006909152829020915190919061151f9087908790613ee1565b908152602001604051809103902060008481526020019081526020016000209080519060200190611551929190612fbe565b50602081015160ff8116600214156115dc5760008060008060008680602001905181019061157f9190613ce6565b95509550955095509550506115d28b8b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508d92508a9150899050888888612dc2565b5050505050611662565b60ff81166003141561166257600080600080600080878060200190518101906116059190613d45565b9650965096509650965096505061165b8c8c8c8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508e92508b91508a9050898989896128a1565b5050505050505b505050505050565b61167261289d565b6001600160a01b0316611683611c67565b6001600160a01b0316146116cc576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600061172061289d565b6001600160a01b0316611731611c67565b6001600160a01b03161461177a576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b6001600160a01b0386166117a05760405162461bcd60e51b81526004016106dd9061400c565b600254604051637af935a160e01b81526001600160a01b0390911690637af935a1906117da908a908a908a908a908a908a906004016147f3565b602060405180830381600087803b1580156117f457600080fd5b505af1158015611808573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061182c9190613269565b90505b9695505050505050565b61184161289d565b6001600160a01b0316611852611c67565b6001600160a01b03161461189b576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b60006118a6856127ef565b60405163a985565f60e01b81529091506001600160a01b0382169063a985565f90610af090879087908790600401614599565b6005546001600160a01b031633146119035760405162461bcd60e51b81526004016106dd90614043565b6111d58888888888888888612dc2565b61191b613064565b61192361304a565b600061192e8b6127ef565b90506000816001600160a01b0316637298a5dc8e8d338d6040518563ffffffff1660e01b815260040161196494939291906144ad565b602060405180830381600087803b15801561197e57600080fd5b505af1158015611992573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119b69190613a5e565b9050816001600160a01b0316631b7319b68e8d33858d60006040518763ffffffff1660e01b81526004016119ef969594939291906144d7565b60c060405180830381600087803b158015611a0957600080fd5b505af1158015611a1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a419190613320565b9350816001600160a01b03166308e9d8c28e8d6040518363ffffffff1660e01b8152600401611a71929190614499565b6040805180830381600087803b158015611a8a57600080fd5b505af1158015611a9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ac291906132d9565b92505050600560009054906101000a90046001600160a01b03166001600160a01b03166351156e73348d8d8d8d87898b8e8e6040518b63ffffffff1660e01b8152600401611b189998979695949392919061469c565b6000604051808303818588803b158015611b3157600080fd5b505af1158015611b45573d6000803e3d6000fd5b50505050505050505050505050505050565b6000611b62846127ef565b9050611be0816001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ba057600080fd5b505afa158015611bb4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bd89190613269565b338386612ed6565b6040516340c10f1960e01b81526001600160a01b038216906340c10f1990611c0e9085908790600401613f79565b602060405180830381600087803b158015611c2857600080fd5b505af1158015611c3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c609190613a5e565b5050505050565b6000546001600160a01b03165b90565b6000611c82886127ef565b905060008085858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050905060148101519150506000826001600160a01b0316631d43108b33898e8d876040518663ffffffff1660e01b8152600401611d0c959493929190613f21565b602060405180830381600087803b158015611d2657600080fd5b505af1158015611d3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d5e9190613a5e565b90506000836001600160a01b03166308e9d8c28d8c6040518363ffffffff1660e01b8152600401611d90929190614499565b6040805180830381600087803b158015611da957600080fd5b505af1158015611dbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611de191906132d9565b905081611e6957600560009054906101000a90046001600160a01b03166001600160a01b031663be9d40ac348e8e8e8e876040518763ffffffff1660e01b8152600401611e329594939291906145d3565b6000604051808303818588803b158015611e4b57600080fd5b505af1158015611e5f573d6000803e3d6000fd5b505050505061165b565b600560009054906101000a90046001600160a01b03166001600160a01b0316633cef94b9348e8e8e8e87898f8f8f6040518b63ffffffff1660e01b8152600401611ebb99989796959493929190614728565b6000604051808303818588803b158015611ed457600080fd5b505af1158015611ee8573d6000803e3d6000fd5b5050505050505050505050505050505050565b611f0361289d565b6001600160a01b0316611f14611c67565b6001600160a01b031614611f5d576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b6000611f68836127ef565b60405163ac2cc36b60e01b81529091506001600160a01b0382169063ac2cc36b90610a14908590600401613fc5565b6001600160a01b038116611fbd5760405162461bcd60e51b81526004016106dd906142a0565b6000611fc8846127ef565b90506000816001600160a01b03166308e9d8c287866040518363ffffffff1660e01b8152600401611ffa929190614499565b6040805180830381600087803b15801561201357600080fd5b505af1158015612027573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061204b91906132d9565b600554604051632fa7502b60e21b81529192506001600160a01b03169063be9d40ac903490612086908a908a908a908a9089906004016145d3565b6000604051808303818588803b15801561137f57600080fd5b6120a7613064565b6120af61304a565b60006120ba8d6127ef565b9050612138816001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156120f857600080fd5b505afa15801561210c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121309190613269565b33838d612ed6565b806001600160a01b0316631b7319b68f8e338e8e60016040518763ffffffff1660e01b815260040161216f969594939291906144d7565b60c060405180830381600087803b15801561218957600080fd5b505af115801561219d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121c19190613320565b9250806001600160a01b03166308e9d8c28f8e6040518363ffffffff1660e01b81526004016121f1929190614499565b6040805180830381600087803b15801561220a57600080fd5b505af115801561221e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061224291906132d9565b915050600560009054906101000a90046001600160a01b03166001600160a01b03166351156e73348f8f8f8f87898f8f8f8f8f6040518d63ffffffff1660e01b815260040161229b9b9a99989796959493929190614608565b6000604051808303818588803b1580156122b457600080fd5b505af11580156122c8573d6000803e3d6000fd5b505050505050505050505050505050505050565b6005546001600160a01b031633146123065760405162461bcd60e51b81526004016106dd90614043565b6000612311836127ef565b60405163b6addec760e01b81529091506001600160a01b0382169063b6addec790610af09088908890879060040161457a565b6003546001600160a01b031681565b6004546001600160a01b031681565b6002546001600160a01b031681565b61237961289d565b6001600160a01b031661238a611c67565b6001600160a01b0316146123d3576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b60006123de836127ef565b6040516312d72b2f60e21b81529091506001600160a01b03821690634b5cacbc90610a14908590600401613f0d565b61241561289d565b6001600160a01b0316612426611c67565b6001600160a01b03161461246f576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b600061247a846127ef565b6040516345ec368560e11b81529091506001600160a01b03821690638bd86d0a906124ab9086908690600401614499565b600060405180830381600087803b1580156124c557600080fd5b505af11580156111d5573d6000803e3d6000fd5b6003546001600160a01b031633146125035760405162461bcd60e51b81526004016106dd9061411f565b600061250e836127ef565b604051632f8c40a560e21b81529091506001600160a01b0382169063be31029490610a14908590600401613f0d565b61254561289d565b6001600160a01b0316612556611c67565b6001600160a01b03161461259f576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b6001600160a01b0381166125c55760405162461bcd60e51b81526004016106dd906141c4565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6006602090815260009384526040808520845180860184018051928152908401958401959095209452928152908352918190208054825160026001831615610100026000190190921691909104601f81018590048502820185019093528281529290919083018282801561269c5780601f106126715761010080835404028352916020019161269c565b820191906000526020600020905b81548152906001019060200180831161267f57829003601f168201915b505050505081565b6005546001600160a01b031681565b6126bb61289d565b6001600160a01b03166126cc611c67565b6001600160a01b031614612715576040805162461bcd60e51b81526020600482018190526024820152600080516020614b11833981519152604482015290519081900360640190fd5b6001600160a01b03811661275a5760405162461bcd60e51b8152600401808060200182810382526026815260200180614acb6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60006127c0836127ef565b604051637fb6526560e01b81529091506001600160a01b03821690637fb6526590610a14908590600401613fc5565b60025460405163068bcd8d60e01b81526000916001600160a01b03169063068bcd8d906128209085906004016147ea565b60206040518083038186803b15801561283857600080fd5b505afa15801561284c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128709190613269565b90506001600160a01b0381166128985760405162461bcd60e51b81526004016106dd90614269565b919050565b3390565b60006128ac866127ef565b60405163902b8ab760e01b81529091506001600160a01b0382169063902b8ab7906128e1908d908b9089908990600401614510565b602060405180830381600087803b1580156128fb57600080fd5b505af192505050801561292b575060408051601f3d908101601f1916820190925261292891810190613a5e565b60015b6129e157600387878787878760405160200161294d97969594939291906148f3565b60408051601f1981840301815282825261ffff8d166000908152600660205291909120909161297d908c90613ef1565b908152602001604051809103902060008a815260200190815260200160002090805190602001906129af929190612fbe565b50600080516020614af183398151915260038b8b8b6040516129d4949392919061484e565b60405180910390a1612db6565b82511561139357846001600160a01b031663ab8236f3878d8d8d876001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a3457600080fd5b505afa158015612a48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a6c9190613269565b878a6040518863ffffffff1660e01b8152600401612a8f969594939291906143e0565b600060405180830381600088803b158015612aa957600080fd5b5087f193505050508015612abb575060015b61139357612ac76149f1565b80612ad25750612b8b565b7f57bbe9975ae2ee06978860cfd29476cb8cb7e61bd8dcb55148eff883bac1d8fa8c8c8c866001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b2f57600080fd5b505afa158015612b43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b679190613269565b868987604051612b7d9796959493929190614439565b60405180910390a150612db1565b3d808015612bb5576040519150601f19603f3d011682016040523d82523d6000602084013e612bba565b606091505b506040518060800160405280846001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015612bff57600080fd5b505afa158015612c13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c379190613269565b6001600160a01b03168152602001838152602001876001600160a01b0316815260200185815250600760008e61ffff1661ffff1681526020019081526020016000208c604051612c879190613ef1565b908152604080516020928190038301902060008e8152908352819020835181546001600160a01b03199081166001600160a01b0392831617835585850151600184015592850151600283018054909416911617909155606083015180519192612cf892600385019290910190612fbe565b509050507fb384cc81887146668e3e7490de85252fe62d53a265bd499e1009326f611a605f8c8c8c866001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b158015612d5957600080fd5b505afa158015612d6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d919190613269565b868b8a604051612da7979695949392919061438c565b60405180910390a1505b611393565b50505050505050505050565b6000612dcd856127ef565b604051632cc36bab60e21b81529091506001600160a01b0382169063b30daeac90612e04908c908a90899089908990600401614548565b600060405180830381600087803b158015612e1e57600080fd5b505af1925050508015612e2f575060015b6108d45760028686868686604051602001612e4f96959493929190614885565b60408051601f1981840301815282825261ffff8c1660009081526006602052919091209091612e7f908b90613ef1565b908152602001604051809103902060008981526020019081526020016000209080519060200190612eb1929190612fbe565b50600080516020614af183398151915260028a8a8a604051610817949392919061484e565b600080856001600160a01b03166323b872dd868686604051602401612efd93929190613f55565b6040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051612f369190613ef1565b6000604051808303816000865af19150503d8060008114612f73576040519150601f19603f3d011682016040523d82523d6000602084013e612f78565b606091505b5091509150818015612fa2575080511580612fa2575080806020019051810190612fa29190613285565b6116625760405162461bcd60e51b81526004016106dd906140e8565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282612ff4576000855561303a565b82601f1061300d57805160ff191683800117855561303a565b8280016001018555821561303a579182015b8281111561303a57825182559160200191906001019061301f565b5061304692915061309a565b5090565b604051806040016040528060008152602001600081525090565b6040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b5b80821115613046576000815560010161309b565b803561289881614a95565b60008083601f8401126130cb578182fd5b5081356001600160401b038111156130e1578182fd5b6020830191508360208285010111156130f957600080fd5b9250929050565b600082601f830112613110578081fd5b813561312361311e8261499a565b614977565b818152846020838601011115613137578283fd5b816020850160208301379081016020019190915292915050565b600060c08284031215613162578081fd5b60405160c081018181106001600160401b038211171561317e57fe5b8060405250809150825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a08201525092915050565b6000606082840312156131d4578081fd5b604051606081016001600160401b0382821081831117156131f157fe5b816040528293508435835260208501356020840152604085013591508082111561321a57600080fd5b5061322785828601613100565b6040830152505092915050565b803561ffff8116811461289857600080fd5b600060208284031215613257578081fd5b813561326281614a95565b9392505050565b60006020828403121561327a578081fd5b815161326281614a95565b600060208284031215613296578081fd5b815161326281614aad565b600080604083850312156132b3578081fd5b82356132be81614a95565b915060208301356132ce81614a95565b809150509250929050565b6000604082840312156132ea578081fd5b604051604081018181106001600160401b038211171561330657fe5b604052825181526020928301519281019290925250919050565b600060c08284031215613331578081fd5b6132628383613151565b60008060008060608587031215613350578182fd5b61335985613234565b935060208501356001600160401b03811115613373578283fd5b61337f878288016130ba565b9598909750949560400135949350505050565b60008060008060008060a087890312156133aa578384fd5b6133b387613234565b955060208701356001600160401b03808211156133ce578586fd5b6133da8a838b016130ba565b909750955060408901359450606089013591506133f682614a95565b9092506080880135908082111561340b578283fd5b5061341889828a016131c3565b9150509295509295509295565b600080600060608486031215613439578081fd5b61344284613234565b925060208401356001600160401b0381111561345c578182fd5b61346886828701613100565b925050604084013590509250925092565b600080600080600080600080610100898b031215613495578586fd5b61349e89613234565b975060208901356001600160401b038111156134b8578687fd5b6134c48b828c01613100565b97505060408901359550606089013594506080890135935060a08901356134ea81614a95565b979a969950949793969295929450505060c08201359160e0013590565b6000806000806000806000806000898b036101c0811215613526578384fd5b61352f8b613234565b995060208b01356001600160401b038082111561354a578586fd5b6135568e838f01613100565b9a5060408d0135995060608d0135985060808d0135975060a08d0135965060c08d0135915061358482614a95565b81955060c060df1984011215613598578384fd5b604051925060c08301915082821081831117156135b157fe5b8160405260e08d013583526101008d013560208401526101208d013560408401526101408d013560608401526101608d013560808401526101808d013560a08401528294506101a08d013592508083111561360a578384fd5b50506136188c828d01613100565b9150509295985092959850929598565b60008060008060008060008060e0898b031215613643578182fd5b61364c89613234565b975060208901356001600160401b0380821115613667578384fd5b6136738c838d01613100565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b01359150808211156136a4578384fd5b506136b18b828c016130ba565b999c989b5096995094979396929594505050565b600080600080608085870312156136da578182fd5b6136e385613234565b93506020850135925060408501359150606085013561370181614a95565b939692955090935050565b60008060008060008060008060e0898b031215613727578182fd5b61373089613234565b97506020890135965060408901359550606089013561374e81614a95565b94506080890135935060a08901356001600160401b0380821115613770578384fd5b61377c8c838d016130ba565b909550935060c08b0135915080821115613794578283fd5b506137a18b828c016131c3565b9150509295985092959890939650565b60008060008060008060008060006101008a8c0312156137cf578283fd5b6137d88a613234565b985060208a0135975060408a0135965060608a01356137f681614a95565b955060808a0135945060a08a0135935060c08a01356001600160401b038082111561381f578485fd5b61382b8d838e016130ba565b909550935060e08c0135915080821115613843578283fd5b506136188c828d016131c3565b60008060008060008060008060008060006101208c8e031215613871578485fd5b61387a8c613234565b9a5060208c0135995060408c0135985061389660608d016130af565b975060808c0135965060a08c013595506001600160401b038060c08e013511156138be578586fd5b6138ce8e60c08f01358f016131c3565b95508060e08e013511156138e0578283fd5b6138f08e60e08f01358f016130ba565b90955093506101008d0135811015613906578283fd5b506139188d6101008e01358e016130ba565b81935080925050509295989b509295989b9093969950565b60008060008084860360a0811215613946578283fd5b61394f86613234565b9450602086013593506040808701359350605f198201121561396f578182fd5b50604051604081018181106001600160401b038211171561398c57fe5b604052606086013581526080909501356020860152509194909350909190565b600080600080600080600060a0888a0312156139c6578081fd5b6139cf88613234565b965060208801356139df81614abb565b955060408801356001600160401b03808211156139fa578283fd5b613a068b838c016130ba565b909750955060608a0135915080821115613a1e578283fd5b613a2a8b838c016130ba565b909550935060808a0135915080821115613a42578283fd5b50613a4f8a828b016131c3565b91505092959891949750929550565b600060208284031215613a6f578081fd5b5051919050565b60008060408385031215613a88578182fd5b8235915060208301356132ce81614a95565b60008060008060008060c08789031215613ab2578384fd5b863595506020870135613ac481614a95565b94506040870135613ad481614abb565b93506060870135613ae481614abb565b925060808701356001600160401b0380821115613aff578384fd5b613b0b8a838b01613100565b935060a0890135915080821115613b20578283fd5b5061341889828a01613100565b60008060408385031215613b3f578182fd5b8235915060208301356132ce81614aad565b60008060008060008060c08789031215613b69578384fd5b863595506020870135613b7b81614aad565b945060408701359350606087013592506080870135613b9981614aad565b915060a0870135613ba981614aad565b809150509295509295509295565b600080600060608486031215613bcb578081fd5b83359250613bdb60208501613234565b9150604084013590509250925092565b60008060008060808587031215613c00578182fd5b84359350613c1060208601613234565b925060408501359150613c2560608601613234565b905092959194509250565b60008060008060808587031215613c45578182fd5b84359350613c5560208601613234565b93969395505050506040820135916060013590565b60008060408385031215613c7c578182fd5b50508035926020909101359150565b60008060408385031215613c9d578182fd5b505080516020909101519092909150565b600080600060608486031215613cc2578081fd5b83359250602084013591506040840135613cdb81614a95565b809150509250925092565b60008060008060008060c08789031215613cfe578384fd5b8651613d0981614abb565b8096505060208701519450604087015193506060870151613d2981614a95565b809350506080870151915060a087015190509295509295509295565b6000806000806000806000610180888a031215613d60578081fd5b8751613d6b81614abb565b809750506020880151955060408801519450606088015193506080880151613d9281614a95565b9250613da18960a08a01613151565b91506101608801516001600160401b03811115613dbc578182fd5b8801601f81018a13613dcc578182fd5b8051613dda61311e8261499a565b8181528b6020838501011115613dee578384fd5b613dff8260208301602086016149bb565b80935050505092959891949750929550565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b60008151808452613e538160208601602086016149bb565b601f01601f19169290920160200192915050565b80518252602090810151910152565b805182526020810151602083015260408101516040830152606081015160608301526080810151608083015260a081015160a08301525050565b60008151835260208201516020840152604082015160606040850152613ed96060850182613e3b565b949350505050565b6000828483379101908152919050565b60008251613f038184602087016149bb565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b039586168152602081019490945261ffff9290921660408401526060830152909116608082015260a00190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b038581168252602082018590528316604082015260806060820181905260009061182f90830184613e3b565b901515815260200190565b941515855260208501939093526040840191909152151560608301521515608082015260a00190565b6000602082526132626020830184613e3b565b6020808252601e908201527f53746172676174653a205f746f6b656e2063616e6e6f74206265203078300000604082015260600190565b6020808252601e908201527f4272696467653a2063616c6c6572206d757374206265204272696467652e0000604082015260600190565b6020808252601b908201527f53746172676174653a206f6e6c79206d696e744665654f776e65720000000000604082015260600190565b60208082526019908201527f53746172676174653a206e6f2072657472792072657665727400000000000000604082015260600190565b6020808252601e908201527f53746172676174653a205452414e534645525f46524f4d5f4641494c45440000604082015260600190565b6020808252601f908201527f53746172676174653a206f6e6c792070726f746f636f6c4665654f776e657200604082015260600190565b6020808252601a908201527f62726964676520616c726561647920696e697469616c697a6564000000000000604082015260600190565b6020808252601b908201527f666163746f727920616c726561647920696e697469616c697a65640000000000604082015260600190565b6020808252601e908201527f53746172676174653a205f6f776e65722063616e6e6f74206265203078300000604082015260600190565b6020808252601f908201527f53746172676174653a20636163686520616c726561647920636c656172656400604082015260600190565b6020808252601f908201527f53746172676174653a20696e76616c69642066756e6374696f6e207479706500604082015260600190565b6020808252601d908201527f53746172676174653a20506f6f6c20646f6573206e6f74206578697374000000604082015260600190565b60208082526026908201527f53746172676174653a205f726566756e64416464726573732063616e6e6f742060408201526506265203078360d41b606082015260800190565b61ffff861681526001600160a01b0385166020820152600061430b6040830186613e67565b60c0608083015261431f60c0830185613eb0565b82810360a084015261096c8185613e3b565b600061ffff8916825260c0602083015261434f60c08301888a613e11565b604083018790526001600160a01b03861660608401526080830185905282810360a084015261437e8185613e3b565b9a9950505050505050505050565b600061ffff8916825260e060208301526143a960e0830189613e3b565b604083018890526001600160a01b03878116606085015260808401879052851660a084015282810360c084015261437e8185613e3b565b600061ffff8816825260c060208301526143fd60c0830188613e3b565b604083018790526001600160a01b03861660608401526080830185905282810360a084015261442c8185613e3b565b9998505050505050505050565b600061ffff8916825260e0602083015261445660e0830189613e3b565b604083018890526001600160a01b03871660608401526080830186905282810360a08401526144858186613e3b565b905082810360c084015261437e8185613e3b565b61ffff929092168252602082015260400190565b61ffff94909416845260208401929092526001600160a01b03166040830152606082015260800190565b61ffff96909616865260208601949094526001600160a01b0392909216604085015260608401526080830152151560a082015260c00190565b61ffff85168152602081018490526001600160a01b0383166040820152610120810161453f6060830184613e76565b95945050505050565b61ffff95909516855260208501939093526001600160a01b039190911660408401526060830152608082015260a00190565b61ffff841681526020810183905260808101613ed96040830184613e67565b61ffff93841681526020810192909252909116604082015260600190565b61ffff9390931683526020830191909152604082015260600190565b61ffff8616815260208101859052604081018490526001600160a01b038316606082015260c0810161182f6080830184613e67565b61ffff8c168152602081018b9052604081018a90526001600160a01b038916606082015260006101e061463e608084018b613e67565b61464b60c084018a613e76565b8061018084015261465e81840189613eb0565b90508281036101a0840152614674818789613e11565b90508281036101c084015261468a818587613e11565b9e9d5050505050505050505050505050565b61ffff8a16815260208101899052604081018890526001600160a01b038716606082015260006101e06146d26080840189613e67565b6146df60c0840188613e76565b806101808401526146f281840187613eb0565b90508281036101a0840152614708818587613e11565b8381036101c0909401939093525081526020019998505050505050505050565b61ffff8a16815260208101899052604081018890526001600160a01b0387166060820152600061012061475e6080840189613e67565b8660c08401528060e08401526147778184018688613e11565b905082810361010084015261478c8185613eb0565b9c9b505050505050505050505050565b600061ffff8916825260ff8816602083015260a060408301526147c360a083018789613e11565b82810360608401526147d6818688613e11565b9050828103608084015261437e8185613eb0565b90815260200190565b8681526001600160a01b038616602082015260ff85811660408301528416606082015260c06080820181905260009061482e90830185613e3b565b82810360a084015261442c8185613e3b565b60ff91909116815260200190565b600060ff8616825261ffff85166020830152608060408301526148746080830185613e3b565b905082606083015295945050505050565b60ff969096168652602086019490945260408501929092526001600160a01b03166060840152608083015260a082015260c00190565b600060ff8916825287602083015286604083015260ff8616606083015284608083015260c060a083015261442c60c083018486613e11565b60ff881681526020810187905260408101869052606081018590526001600160a01b0384166080820152600061018061492f60a0840186613e76565b8061016084015261437e81840185613e3b565b600060ff8916825287602083015286604083015285606083015284608083015260c060a083015261442c60c083018486613e11565b6040518181016001600160401b038111828210171561499257fe5b604052919050565b60006001600160401b038211156149ad57fe5b50601f01601f191660200190565b60005b838110156149d65781810151838201526020016149be565b838111156149e5576000848401525b50505050565b60e01c90565b600060443d1015614a0157611c74565b600481823e6308c379a0614a1582516149eb565b14614a1f57611c74565b6040513d600319016004823e80513d6001600160401b038160248401118184111715614a4e5750505050611c74565b82840192508251915080821115614a685750505050611c74565b503d83016020828401011115614a8057505050611c74565b601f01601f1916810160200160405291505090565b6001600160a01b0381168114614aaa57600080fd5b50565b8015158114614aaa57600080fd5b60ff81168114614aaa57600080fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a5d2ba6de30cc2f2e91c5a29ba66b148c27826954217e2f67cb8983541da21cf4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a26469706673582212204a3b63bb845ebaa02c7a65b9c5e33f1cc762b5a660a2185f9670968550a5337d64736f6c63430007060033",
  1319. "devdoc": {
  1320. "kind": "dev",
  1321. "methods": {
  1322. "owner()": {
  1323. "details": "Returns the address of the current owner."
  1324. },
  1325. "renounceOwnership()": {
  1326. "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."
  1327. },
  1328. "transferOwnership(address)": {
  1329. "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
  1330. }
  1331. },
  1332. "version": 1
  1333. },
  1334. "userdoc": {
  1335. "kind": "user",
  1336. "methods": {},
  1337. "version": 1
  1338. },
  1339. "storageLayout": {
  1340. "storage": [
  1341. {
  1342. "astId": 7,
  1343. "contract": "contracts/Router.sol:Router",
  1344. "label": "_owner",
  1345. "offset": 0,
  1346. "slot": "0",
  1347. "type": "t_address"
  1348. },
  1349. {
  1350. "astId": 2080,
  1351. "contract": "contracts/Router.sol:Router",
  1352. "label": "_status",
  1353. "offset": 0,
  1354. "slot": "1",
  1355. "type": "t_uint256"
  1356. },
  1357. {
  1358. "astId": 7312,
  1359. "contract": "contracts/Router.sol:Router",
  1360. "label": "factory",
  1361. "offset": 0,
  1362. "slot": "2",
  1363. "type": "t_contract(Factory)3392"
  1364. },
  1365. {
  1366. "astId": 7314,
  1367. "contract": "contracts/Router.sol:Router",
  1368. "label": "protocolFeeOwner",
  1369. "offset": 0,
  1370. "slot": "3",
  1371. "type": "t_address"
  1372. },
  1373. {
  1374. "astId": 7316,
  1375. "contract": "contracts/Router.sol:Router",
  1376. "label": "mintFeeOwner",
  1377. "offset": 0,
  1378. "slot": "4",
  1379. "type": "t_address"
  1380. },
  1381. {
  1382. "astId": 7318,
  1383. "contract": "contracts/Router.sol:Router",
  1384. "label": "bridge",
  1385. "offset": 0,
  1386. "slot": "5",
  1387. "type": "t_contract(Bridge)3235"
  1388. },
  1389. {
  1390. "astId": 7326,
  1391. "contract": "contracts/Router.sol:Router",
  1392. "label": "revertLookup",
  1393. "offset": 0,
  1394. "slot": "6",
  1395. "type": "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint256,t_bytes_storage)))"
  1396. },
  1397. {
  1398. "astId": 7334,
  1399. "contract": "contracts/Router.sol:Router",
  1400. "label": "cachedSwapLookup",
  1401. "offset": 0,
  1402. "slot": "7",
  1403. "type": "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint256,t_struct(CachedSwap)7303_storage)))"
  1404. }
  1405. ],
  1406. "types": {
  1407. "t_address": {
  1408. "encoding": "inplace",
  1409. "label": "address",
  1410. "numberOfBytes": "20"
  1411. },
  1412. "t_bytes_memory_ptr": {
  1413. "encoding": "bytes",
  1414. "label": "bytes",
  1415. "numberOfBytes": "32"
  1416. },
  1417. "t_bytes_storage": {
  1418. "encoding": "bytes",
  1419. "label": "bytes",
  1420. "numberOfBytes": "32"
  1421. },
  1422. "t_contract(Bridge)3235": {
  1423. "encoding": "inplace",
  1424. "label": "contract Bridge",
  1425. "numberOfBytes": "20"
  1426. },
  1427. "t_contract(Factory)3392": {
  1428. "encoding": "inplace",
  1429. "label": "contract Factory",
  1430. "numberOfBytes": "20"
  1431. },
  1432. "t_mapping(t_bytes_memory_ptr,t_mapping(t_uint256,t_bytes_storage))": {
  1433. "encoding": "mapping",
  1434. "key": "t_bytes_memory_ptr",
  1435. "label": "mapping(bytes => mapping(uint256 => bytes))",
  1436. "numberOfBytes": "32",
  1437. "value": "t_mapping(t_uint256,t_bytes_storage)"
  1438. },
  1439. "t_mapping(t_bytes_memory_ptr,t_mapping(t_uint256,t_struct(CachedSwap)7303_storage))": {
  1440. "encoding": "mapping",
  1441. "key": "t_bytes_memory_ptr",
  1442. "label": "mapping(bytes => mapping(uint256 => struct Router.CachedSwap))",
  1443. "numberOfBytes": "32",
  1444. "value": "t_mapping(t_uint256,t_struct(CachedSwap)7303_storage)"
  1445. },
  1446. "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint256,t_bytes_storage)))": {
  1447. "encoding": "mapping",
  1448. "key": "t_uint16",
  1449. "label": "mapping(uint16 => mapping(bytes => mapping(uint256 => bytes)))",
  1450. "numberOfBytes": "32",
  1451. "value": "t_mapping(t_bytes_memory_ptr,t_mapping(t_uint256,t_bytes_storage))"
  1452. },
  1453. "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint256,t_struct(CachedSwap)7303_storage)))": {
  1454. "encoding": "mapping",
  1455. "key": "t_uint16",
  1456. "label": "mapping(uint16 => mapping(bytes => mapping(uint256 => struct Router.CachedSwap)))",
  1457. "numberOfBytes": "32",
  1458. "value": "t_mapping(t_bytes_memory_ptr,t_mapping(t_uint256,t_struct(CachedSwap)7303_storage))"
  1459. },
  1460. "t_mapping(t_uint256,t_bytes_storage)": {
  1461. "encoding": "mapping",
  1462. "key": "t_uint256",
  1463. "label": "mapping(uint256 => bytes)",
  1464. "numberOfBytes": "32",
  1465. "value": "t_bytes_storage"
  1466. },
  1467. "t_mapping(t_uint256,t_struct(CachedSwap)7303_storage)": {
  1468. "encoding": "mapping",
  1469. "key": "t_uint256",
  1470. "label": "mapping(uint256 => struct Router.CachedSwap)",
  1471. "numberOfBytes": "32",
  1472. "value": "t_struct(CachedSwap)7303_storage"
  1473. },
  1474. "t_struct(CachedSwap)7303_storage": {
  1475. "encoding": "inplace",
  1476. "label": "struct Router.CachedSwap",
  1477. "members": [
  1478. {
  1479. "astId": 7296,
  1480. "contract": "contracts/Router.sol:Router",
  1481. "label": "token",
  1482. "offset": 0,
  1483. "slot": "0",
  1484. "type": "t_address"
  1485. },
  1486. {
  1487. "astId": 7298,
  1488. "contract": "contracts/Router.sol:Router",
  1489. "label": "amountLD",
  1490. "offset": 0,
  1491. "slot": "1",
  1492. "type": "t_uint256"
  1493. },
  1494. {
  1495. "astId": 7300,
  1496. "contract": "contracts/Router.sol:Router",
  1497. "label": "to",
  1498. "offset": 0,
  1499. "slot": "2",
  1500. "type": "t_address"
  1501. },
  1502. {
  1503. "astId": 7302,
  1504. "contract": "contracts/Router.sol:Router",
  1505. "label": "payload",
  1506. "offset": 0,
  1507. "slot": "3",
  1508. "type": "t_bytes_storage"
  1509. }
  1510. ],
  1511. "numberOfBytes": "128"
  1512. },
  1513. "t_uint16": {
  1514. "encoding": "inplace",
  1515. "label": "uint16",
  1516. "numberOfBytes": "2"
  1517. },
  1518. "t_uint256": {
  1519. "encoding": "inplace",
  1520. "label": "uint256",
  1521. "numberOfBytes": "32"
  1522. }
  1523. }
  1524. }
  1525. }