@gardenfi/swap 0.0.1 → 0.0.2-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -44
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +157 -25
- package/dist/index100.cjs +1 -0
- package/dist/index100.js +6 -0
- package/dist/index101.cjs +1 -0
- package/dist/index101.js +10 -0
- package/dist/index102.cjs +1 -0
- package/dist/index102.js +8 -0
- package/dist/index103.cjs +1 -0
- package/dist/index103.js +16 -0
- package/dist/index104.cjs +1 -0
- package/dist/index104.js +174 -0
- package/dist/index105.cjs +1 -0
- package/dist/index105.js +36 -0
- package/dist/index106.cjs +1 -0
- package/dist/index106.js +54 -0
- package/dist/index107.cjs +1 -0
- package/dist/index107.js +40 -0
- package/dist/index108.cjs +1 -0
- package/dist/index108.js +27 -0
- package/dist/index109.cjs +1 -0
- package/dist/index109.js +82 -0
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +23 -33
- package/dist/index110.cjs +1 -0
- package/dist/index110.js +5 -0
- package/dist/index111.cjs +1 -0
- package/dist/index111.js +35 -0
- package/dist/index112.cjs +1 -0
- package/dist/index112.js +118 -0
- package/dist/index113.cjs +1 -0
- package/dist/index113.js +6 -0
- package/dist/index114.cjs +1 -0
- package/dist/index114.js +18 -0
- package/dist/index115.cjs +1 -0
- package/dist/index115.js +14 -0
- package/dist/index116.cjs +1 -0
- package/dist/index116.js +21 -0
- package/dist/index117.cjs +1 -0
- package/dist/index117.js +61 -0
- package/dist/index118.cjs +1 -0
- package/dist/index118.js +23 -0
- package/dist/index119.cjs +1 -0
- package/dist/index119.js +16 -0
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +67 -63
- package/dist/index120.cjs +1 -0
- package/dist/index120.js +287 -0
- package/dist/index121.cjs +1 -0
- package/dist/index121.js +576 -0
- package/dist/index122.cjs +1 -0
- package/dist/index122.js +36 -0
- package/dist/index123.cjs +1 -0
- package/dist/index123.js +6 -0
- package/dist/index124.cjs +1 -0
- package/dist/index124.js +12 -0
- package/dist/index125.cjs +1 -0
- package/dist/index125.js +119 -0
- package/dist/index126.cjs +1 -0
- package/dist/index126.js +64 -0
- package/dist/index127.cjs +1 -0
- package/dist/index127.js +27 -0
- package/dist/index128.cjs +1 -0
- package/dist/index128.js +39 -0
- package/dist/index129.cjs +1 -0
- package/dist/index129.js +44 -0
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +28 -29
- package/dist/index130.cjs +1 -0
- package/dist/index130.js +61 -0
- package/dist/index131.cjs +1 -0
- package/dist/index131.js +43 -0
- package/dist/index132.cjs +1 -0
- package/dist/index132.js +12 -0
- package/dist/index133.cjs +1 -0
- package/dist/index133.js +34 -0
- package/dist/index134.cjs +1 -0
- package/dist/index134.js +39 -0
- package/dist/index135.cjs +1 -0
- package/dist/index135.js +12 -0
- package/dist/index136.cjs +1 -0
- package/dist/index136.js +32 -0
- package/dist/index137.cjs +1 -0
- package/dist/index137.js +53 -0
- package/dist/index138.cjs +1 -0
- package/dist/index138.js +73 -0
- package/dist/index139.cjs +1 -0
- package/dist/index139.js +44 -0
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +13 -186
- package/dist/index140.cjs +1 -0
- package/dist/index140.js +80 -0
- package/dist/index141.cjs +1 -0
- package/dist/index141.js +11 -0
- package/dist/index142.cjs +1 -0
- package/dist/index142.js +9 -0
- package/dist/index143.cjs +1 -0
- package/dist/index143.js +20 -0
- package/dist/index144.cjs +1 -0
- package/dist/index144.js +11 -0
- package/dist/index145.cjs +1 -0
- package/dist/index145.js +16 -0
- package/dist/index146.cjs +1 -0
- package/dist/index146.js +10 -0
- package/dist/index147.cjs +1 -0
- package/dist/index147.js +19 -0
- package/dist/index148.cjs +1 -0
- package/dist/index148.js +49 -0
- package/dist/index149.cjs +1 -0
- package/dist/index149.js +16 -0
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +49 -46
- package/dist/index150.cjs +1 -0
- package/dist/index150.js +19 -0
- package/dist/index151.cjs +1 -0
- package/dist/index151.js +16 -0
- package/dist/index152.cjs +1 -0
- package/dist/index152.js +9 -0
- package/dist/index153.cjs +1 -0
- package/dist/index153.js +38 -0
- package/dist/index154.cjs +1 -0
- package/dist/index154.js +12 -0
- package/dist/index155.cjs +1 -0
- package/dist/index155.js +11 -0
- package/dist/index156.cjs +1 -0
- package/dist/index156.js +32 -0
- package/dist/index157.cjs +1 -0
- package/dist/index157.js +13 -0
- package/dist/index158.cjs +1 -0
- package/dist/index158.js +17 -0
- package/dist/index159.cjs +1 -0
- package/dist/index159.js +15 -0
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +8 -311
- package/dist/index160.cjs +1 -0
- package/dist/index160.js +124 -0
- package/dist/index161.cjs +1 -0
- package/dist/index161.js +85 -0
- package/dist/index162.cjs +1 -0
- package/dist/index162.js +180 -0
- package/dist/index163.cjs +1 -0
- package/dist/index163.js +47 -0
- package/dist/index164.cjs +1 -0
- package/dist/index164.js +9 -0
- package/dist/index165.cjs +1 -0
- package/dist/index165.js +17 -0
- package/dist/index166.cjs +1 -0
- package/dist/index166.js +17 -0
- package/dist/index167.cjs +1 -0
- package/dist/index167.js +106 -0
- package/dist/index168.cjs +1 -0
- package/dist/index168.js +78 -0
- package/dist/index169.cjs +1 -0
- package/dist/index169.js +92 -0
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +59 -27
- package/dist/index170.cjs +1 -0
- package/dist/index170.js +154 -0
- package/dist/index171.cjs +1 -0
- package/dist/index171.js +141 -0
- package/dist/index172.cjs +1 -0
- package/dist/index172.js +72 -0
- package/dist/index173.cjs +1 -0
- package/dist/index173.js +26 -0
- package/dist/index174.cjs +1 -0
- package/dist/index174.js +167 -0
- package/dist/index175.cjs +1 -0
- package/dist/index175.js +9 -0
- package/dist/index176.cjs +1 -0
- package/dist/index176.js +16 -0
- package/dist/index177.cjs +1 -0
- package/dist/index177.js +22 -0
- package/dist/index178.cjs +1 -0
- package/dist/index178.js +109 -0
- package/dist/index179.cjs +1 -0
- package/dist/index179.js +81 -0
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +74 -14
- package/dist/index180.cjs +1 -0
- package/dist/index180.js +12 -0
- package/dist/index181.cjs +1 -0
- package/dist/index181.js +31 -0
- package/dist/index182.cjs +1 -0
- package/dist/index182.js +93 -0
- package/dist/index183.cjs +1 -0
- package/dist/index183.js +5 -0
- package/dist/index184.cjs +1 -0
- package/dist/index184.js +4 -0
- package/dist/index185.cjs +2 -0
- package/dist/index185.js +5 -0
- package/dist/index186.cjs +1 -0
- package/dist/index186.js +11 -0
- package/dist/index187.cjs +20 -0
- package/dist/index187.js +329 -0
- package/dist/index188.cjs +1 -0
- package/dist/index188.js +16 -0
- package/dist/index189.cjs +2 -0
- package/dist/index189.js +62 -0
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +76 -224
- package/dist/index190.cjs +1 -0
- package/dist/index190.js +4 -0
- package/dist/index191.cjs +1 -0
- package/dist/index191.js +10 -0
- package/dist/index192.cjs +1 -0
- package/dist/index192.js +34 -0
- package/dist/index193.cjs +1 -0
- package/dist/index193.js +24 -0
- package/dist/index194.cjs +1 -0
- package/dist/index194.js +8 -0
- package/dist/index195.cjs +1 -0
- package/dist/index195.js +76 -0
- package/dist/index196.cjs +1 -0
- package/dist/index196.js +8 -0
- package/dist/index197.cjs +1 -0
- package/dist/index197.js +8 -0
- package/dist/index198.cjs +9 -0
- package/dist/index198.js +38 -0
- package/dist/index199.cjs +2 -0
- package/dist/index199.js +123 -0
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +58 -13
- package/dist/index200.cjs +1 -0
- package/dist/index200.js +5 -0
- package/dist/index201.cjs +1 -0
- package/dist/index201.js +21 -0
- package/dist/index202.cjs +1 -0
- package/dist/index202.js +36 -0
- package/dist/index203.cjs +1 -0
- package/dist/index203.js +38 -0
- package/dist/index204.cjs +1 -0
- package/dist/index204.js +26 -0
- package/dist/index205.cjs +1 -0
- package/dist/index205.js +11 -0
- package/dist/index206.cjs +4 -0
- package/dist/index206.js +197 -0
- package/dist/index207.cjs +1 -0
- package/dist/index207.js +4 -0
- package/dist/index208.cjs +3 -0
- package/dist/index208.js +454 -0
- package/dist/index209.cjs +1 -0
- package/dist/index209.js +30 -0
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +146 -85
- package/dist/index210.cjs +1 -0
- package/dist/index210.js +164 -0
- package/dist/index211.cjs +1 -0
- package/dist/index211.js +130 -0
- package/dist/index212.cjs +1 -0
- package/dist/index212.js +41 -0
- package/dist/index213.cjs +1 -0
- package/dist/index213.js +30 -0
- package/dist/index214.cjs +1 -0
- package/dist/index214.js +58 -0
- package/dist/index215.cjs +1 -0
- package/dist/index215.js +194 -0
- package/dist/index216.cjs +1 -0
- package/dist/index216.js +6 -0
- package/dist/index217.cjs +1 -0
- package/dist/index217.js +76 -0
- package/dist/index218.cjs +1 -0
- package/dist/index218.js +23 -0
- package/dist/index219.cjs +1 -0
- package/dist/index219.js +5 -0
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +67 -137
- package/dist/index220.cjs +1 -0
- package/dist/index220.js +19 -0
- package/dist/index221.cjs +1 -0
- package/dist/index221.js +26 -0
- package/dist/index222.cjs +1 -0
- package/dist/index222.js +37 -0
- package/dist/index223.cjs +1 -0
- package/dist/index223.js +5 -0
- package/dist/index224.cjs +1 -0
- package/dist/index224.js +30 -0
- package/dist/index225.cjs +1 -0
- package/dist/index225.js +39 -0
- package/dist/index226.cjs +1 -0
- package/dist/index226.js +11 -0
- package/dist/index227.cjs +1 -0
- package/dist/index227.js +28 -0
- package/dist/index228.cjs +1 -0
- package/dist/index228.js +31 -0
- package/dist/index229.cjs +1 -0
- package/dist/index229.js +78 -0
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +63 -20
- package/dist/index230.cjs +1 -0
- package/dist/index230.js +24 -0
- package/dist/index231.cjs +1 -0
- package/dist/index231.js +11 -0
- package/dist/index232.cjs +1 -0
- package/dist/index232.js +13 -0
- package/dist/index233.cjs +1 -0
- package/dist/index233.js +14 -0
- package/dist/index234.cjs +1 -0
- package/dist/index234.js +9 -0
- package/dist/index235.cjs +1 -0
- package/dist/index235.js +9 -0
- package/dist/index236.cjs +1 -0
- package/dist/index236.js +16 -0
- package/dist/index237.cjs +1 -0
- package/dist/index237.js +35 -0
- package/dist/index238.cjs +1 -0
- package/dist/index238.js +7 -0
- package/dist/index239.cjs +1 -0
- package/dist/index239.js +40 -0
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +31 -17
- package/dist/index240.cjs +1 -0
- package/dist/index240.js +114 -0
- package/dist/index241.cjs +1 -0
- package/dist/index241.js +52 -0
- package/dist/index242.cjs +1 -0
- package/dist/index242.js +35 -0
- package/dist/index243.cjs +1 -0
- package/dist/index243.js +11 -0
- package/dist/index244.cjs +1 -0
- package/dist/index244.js +10 -0
- package/dist/index245.cjs +1 -0
- package/dist/index245.js +19 -0
- package/dist/index246.cjs +1 -0
- package/dist/index246.js +25 -0
- package/dist/index247.cjs +1 -0
- package/dist/index247.js +107 -0
- package/dist/index248.cjs +1 -0
- package/dist/index248.js +5 -0
- package/dist/index249.cjs +1 -0
- package/dist/index249.js +8 -0
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +23 -104
- package/dist/index250.cjs +1 -0
- package/dist/index250.js +34 -0
- package/dist/index251.cjs +1 -0
- package/dist/index251.js +23 -0
- package/dist/index252.cjs +1 -0
- package/dist/index252.js +6 -0
- package/dist/index253.cjs +1 -0
- package/dist/index253.js +20 -0
- package/dist/index254.cjs +1 -0
- package/dist/index254.js +8 -0
- package/dist/index255.cjs +1 -0
- package/dist/index255.js +11 -0
- package/dist/index256.cjs +1 -0
- package/dist/index256.js +106 -0
- package/dist/index257.cjs +1 -0
- package/dist/index257.js +67 -0
- package/dist/index258.cjs +1 -0
- package/dist/index258.js +9 -0
- package/dist/index259.cjs +1 -0
- package/dist/index259.js +30 -0
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +173 -75
- package/dist/index260.cjs +1 -0
- package/dist/index260.js +37 -0
- package/dist/index261.cjs +1 -0
- package/dist/index261.js +19 -0
- package/dist/index262.cjs +1 -0
- package/dist/index262.js +81 -0
- package/dist/index263.cjs +1 -0
- package/dist/index263.js +4 -0
- package/dist/index264.cjs +1 -0
- package/dist/index264.js +17 -0
- package/dist/index265.cjs +1 -0
- package/dist/index265.js +21 -0
- package/dist/index266.cjs +1 -0
- package/dist/index266.js +20 -0
- package/dist/index267.cjs +1 -0
- package/dist/index267.js +13 -0
- package/dist/index268.cjs +1 -0
- package/dist/index268.js +43 -0
- package/dist/index269.cjs +1 -0
- package/dist/index269.js +16 -0
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +34 -9
- package/dist/index270.cjs +1 -0
- package/dist/index270.js +27 -0
- package/dist/index271.cjs +1 -0
- package/dist/index271.js +15 -0
- package/dist/index272.cjs +1 -0
- package/dist/index272.js +12 -0
- package/dist/index273.cjs +1 -0
- package/dist/index273.js +33 -0
- package/dist/index274.cjs +1 -0
- package/dist/index274.js +4 -0
- package/dist/index275.cjs +1 -0
- package/dist/index275.js +50 -0
- package/dist/index276.cjs +1 -0
- package/dist/index276.js +14 -0
- package/dist/index277.cjs +1 -0
- package/dist/index277.js +177 -0
- package/dist/index278.cjs +2 -0
- package/dist/index278.js +94 -0
- package/dist/index279.cjs +1 -0
- package/dist/index279.js +43 -0
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +332 -47
- package/dist/index280.cjs +1 -0
- package/dist/index280.js +7 -0
- package/dist/index281.cjs +1 -0
- package/dist/index281.js +166 -0
- package/dist/index282.cjs +1 -0
- package/dist/index282.js +7 -0
- package/dist/index283.cjs +2 -0
- package/dist/index283.js +44 -0
- package/dist/index284.cjs +1 -0
- package/dist/index284.js +4 -0
- package/dist/index285.cjs +1 -0
- package/dist/index285.js +8 -0
- package/dist/index286.cjs +1 -0
- package/dist/index286.js +13 -0
- package/dist/index287.cjs +1 -0
- package/dist/index287.js +22 -0
- package/dist/index288.cjs +1 -0
- package/dist/index288.js +11 -0
- package/dist/index289.cjs +1 -0
- package/dist/index289.js +75 -0
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +4 -61
- package/dist/index290.cjs +1 -0
- package/dist/index290.js +68 -0
- package/dist/index291.cjs +1 -0
- package/dist/index291.js +191 -0
- package/dist/index292.cjs +1 -0
- package/dist/index292.js +25 -0
- package/dist/index293.cjs +1 -0
- package/dist/index293.js +45 -0
- package/dist/index294.cjs +1 -0
- package/dist/index294.js +28 -0
- package/dist/index295.cjs +1 -0
- package/dist/index295.js +93 -0
- package/dist/index296.cjs +1 -0
- package/dist/index296.js +43 -0
- package/dist/index297.cjs +1 -0
- package/dist/index297.js +19 -0
- package/dist/index298.cjs +1 -0
- package/dist/index298.js +16 -0
- package/dist/index299.cjs +1 -0
- package/dist/index299.js +40 -0
- package/dist/index3.cjs +1 -1
- package/dist/index3.js +9 -5
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +271 -35
- package/dist/index300.cjs +1 -0
- package/dist/index300.js +18 -0
- package/dist/index301.cjs +1 -0
- package/dist/index301.js +11 -0
- package/dist/index302.cjs +1 -0
- package/dist/index302.js +10 -0
- package/dist/index303.cjs +1 -0
- package/dist/index303.js +45 -0
- package/dist/index304.cjs +1 -0
- package/dist/index304.js +323 -0
- package/dist/index305.cjs +1 -0
- package/dist/index305.js +608 -0
- package/dist/index306.cjs +1 -0
- package/dist/index306.js +112 -0
- package/dist/index307.cjs +1 -0
- package/dist/index307.js +170 -0
- package/dist/index308.cjs +1 -0
- package/dist/index308.js +304 -0
- package/dist/index309.cjs +1 -0
- package/dist/index309.js +96 -0
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +19 -41
- package/dist/index310.cjs +1 -0
- package/dist/index310.js +59 -0
- package/dist/index311.cjs +1 -0
- package/dist/index311.js +56 -0
- package/dist/index312.cjs +1 -0
- package/dist/index312.js +47 -0
- package/dist/index313.cjs +1 -0
- package/dist/index313.js +18 -0
- package/dist/index314.cjs +1 -0
- package/dist/index314.js +320 -0
- package/dist/index315.cjs +1 -0
- package/dist/index315.js +62 -0
- package/dist/index316.cjs +1 -0
- package/dist/index316.js +22 -0
- package/dist/index317.cjs +1 -0
- package/dist/index317.js +32 -0
- package/dist/index318.cjs +1 -0
- package/dist/index318.js +6 -0
- package/dist/index319.cjs +7 -0
- package/dist/index319.js +240 -0
- package/dist/index32.cjs +1 -0
- package/dist/index32.js +22 -0
- package/dist/index320.cjs +1 -0
- package/dist/index320.js +50 -0
- package/dist/index321.cjs +1 -0
- package/dist/index321.js +215 -0
- package/dist/index322.cjs +1 -0
- package/dist/index322.js +84 -0
- package/dist/index323.cjs +1 -0
- package/dist/index323.js +32 -0
- package/dist/index324.cjs +1 -0
- package/dist/index324.js +79 -0
- package/dist/index325.cjs +1 -0
- package/dist/index325.js +12 -0
- package/dist/index326.cjs +1 -0
- package/dist/index326.js +19 -0
- package/dist/index327.cjs +1 -0
- package/dist/index327.js +25 -0
- package/dist/index328.cjs +1 -0
- package/dist/index328.js +16 -0
- package/dist/index329.cjs +1 -0
- package/dist/index329.js +16 -0
- package/dist/index33.cjs +1 -0
- package/dist/index33.js +6 -0
- package/dist/index330.cjs +1 -0
- package/dist/index330.js +17 -0
- package/dist/index331.cjs +1 -0
- package/dist/index331.js +12 -0
- package/dist/index332.cjs +1 -0
- package/dist/index332.js +18 -0
- package/dist/index333.cjs +1 -0
- package/dist/index333.js +28 -0
- package/dist/index334.cjs +1 -0
- package/dist/index334.js +34 -0
- package/dist/index335.cjs +2 -0
- package/dist/index335.js +21 -0
- package/dist/index336.cjs +1 -0
- package/dist/index336.js +17 -0
- package/dist/index337.cjs +1 -0
- package/dist/index337.js +14 -0
- package/dist/index338.cjs +1 -0
- package/dist/index338.js +15 -0
- package/dist/index339.cjs +1 -0
- package/dist/index339.js +36 -0
- package/dist/index34.cjs +1 -0
- package/dist/index34.js +28 -0
- package/dist/index340.cjs +1 -0
- package/dist/index340.js +118 -0
- package/dist/index341.cjs +1 -0
- package/dist/index341.js +106 -0
- package/dist/index342.cjs +1 -0
- package/dist/index342.js +9 -0
- package/dist/index343.cjs +1 -0
- package/dist/index343.js +9 -0
- package/dist/index344.cjs +1 -0
- package/dist/index344.js +29 -0
- package/dist/index345.cjs +1 -0
- package/dist/index345.js +19 -0
- package/dist/index346.cjs +1 -0
- package/dist/index346.js +217 -0
- package/dist/index347.cjs +1 -0
- package/dist/index347.js +10 -0
- package/dist/index348.cjs +1 -0
- package/dist/index348.js +122 -0
- package/dist/index349.cjs +1 -0
- package/dist/index349.js +7 -0
- package/dist/index35.cjs +1 -0
- package/dist/index35.js +13 -0
- package/dist/index350.cjs +2 -0
- package/dist/index350.js +196 -0
- package/dist/index351.cjs +1 -0
- package/dist/index351.js +80 -0
- package/dist/index352.cjs +1 -0
- package/dist/index352.js +346 -0
- package/dist/index353.cjs +1 -0
- package/dist/index353.js +163 -0
- package/dist/index354.cjs +1 -0
- package/dist/index354.js +7 -0
- package/dist/index355.cjs +1 -0
- package/dist/index355.js +17 -0
- package/dist/index356.cjs +1 -0
- package/dist/index356.js +19 -0
- package/dist/index357.cjs +1 -0
- package/dist/index357.js +12 -0
- package/dist/index358.cjs +1 -0
- package/dist/index358.js +55 -0
- package/dist/index359.cjs +1 -0
- package/dist/index359.js +209 -0
- package/dist/index36.cjs +1 -0
- package/dist/index36.js +44 -0
- package/dist/index360.cjs +1 -0
- package/dist/index360.js +71 -0
- package/dist/index361.cjs +1 -0
- package/dist/index361.js +97 -0
- package/dist/index362.cjs +1 -0
- package/dist/index362.js +31 -0
- package/dist/index363.cjs +1 -0
- package/dist/index363.js +151 -0
- package/dist/index364.cjs +1 -0
- package/dist/index364.js +357 -0
- package/dist/index365.cjs +1 -0
- package/dist/index365.js +6 -0
- package/dist/index366.cjs +1 -0
- package/dist/index366.js +143 -0
- package/dist/index367.cjs +1 -0
- package/dist/index367.js +76 -0
- package/dist/index368.cjs +1 -0
- package/dist/index368.js +34 -0
- package/dist/index369.cjs +1 -0
- package/dist/index369.js +8 -0
- package/dist/index37.cjs +1 -0
- package/dist/index37.js +90 -0
- package/dist/index370.cjs +1 -0
- package/dist/index370.js +278 -0
- package/dist/index371.cjs +1 -0
- package/dist/index371.js +173 -0
- package/dist/index372.cjs +1 -0
- package/dist/index372.js +12 -0
- package/dist/index373.cjs +1 -0
- package/dist/index373.js +110 -0
- package/dist/index374.cjs +1 -0
- package/dist/index374.js +12 -0
- package/dist/index375.cjs +1 -0
- package/dist/index375.js +136 -0
- package/dist/index376.cjs +1 -0
- package/dist/index376.js +81 -0
- package/dist/index377.cjs +1 -0
- package/dist/index377.js +4 -0
- package/dist/index378.cjs +1 -0
- package/dist/index378.js +45 -0
- package/dist/index379.cjs +1 -0
- package/dist/index379.js +660 -0
- package/dist/index38.cjs +1 -0
- package/dist/index38.js +153 -0
- package/dist/index380.cjs +1 -0
- package/dist/index380.js +180 -0
- package/dist/index381.cjs +1 -0
- package/dist/index381.js +4 -0
- package/dist/index382.cjs +1 -0
- package/dist/index382.js +24 -0
- package/dist/index383.cjs +1 -0
- package/dist/index383.js +112 -0
- package/dist/index384.cjs +1 -0
- package/dist/index384.js +5 -0
- package/dist/index385.cjs +1 -0
- package/dist/index385.js +65 -0
- package/dist/index386.cjs +1 -0
- package/dist/index386.js +134 -0
- package/dist/index387.cjs +1 -0
- package/dist/index387.js +262 -0
- package/dist/index39.cjs +1 -0
- package/dist/index39.js +90 -0
- package/dist/index4.cjs +1 -1
- package/dist/index4.js +33 -23
- package/dist/index40.cjs +1 -0
- package/dist/index40.js +16 -0
- package/dist/index41.cjs +1 -0
- package/dist/index41.js +31 -0
- package/dist/index42.cjs +1 -0
- package/dist/index42.js +20 -0
- package/dist/index43.cjs +1 -0
- package/dist/index43.js +110 -0
- package/dist/index44.cjs +1 -0
- package/dist/index44.js +14 -0
- package/dist/index45.cjs +1 -0
- package/dist/index45.js +61 -0
- package/dist/index46.cjs +1 -0
- package/dist/index46.js +524 -0
- package/dist/index47.cjs +1 -0
- package/dist/index47.js +32 -0
- package/dist/index48.cjs +1 -0
- package/dist/index48.js +28 -0
- package/dist/index49.cjs +1 -0
- package/dist/index49.js +28 -0
- package/dist/index50.cjs +1 -0
- package/dist/index50.js +51 -0
- package/dist/index51.cjs +1 -0
- package/dist/index51.js +30 -0
- package/dist/index52.cjs +1 -0
- package/dist/index52.js +30 -0
- package/dist/index53.cjs +1 -0
- package/dist/index53.js +33 -0
- package/dist/index54.cjs +1 -0
- package/dist/index54.js +32 -0
- package/dist/index55.cjs +1 -0
- package/dist/index55.js +58 -0
- package/dist/index56.cjs +1 -0
- package/dist/index56.js +56 -0
- package/dist/index57.cjs +1 -0
- package/dist/index57.js +38 -0
- package/dist/index58.cjs +1 -0
- package/dist/index58.js +39 -0
- package/dist/index59.cjs +1 -0
- package/dist/index59.js +32 -0
- package/dist/index6.cjs +1 -1
- package/dist/index6.js +273 -91
- package/dist/index60.cjs +1 -0
- package/dist/index60.js +30 -0
- package/dist/index61.cjs +1 -0
- package/dist/index61.js +30 -0
- package/dist/index62.cjs +1 -0
- package/dist/index62.js +17 -0
- package/dist/index63.cjs +1 -0
- package/dist/index63.js +16 -0
- package/dist/index64.cjs +1 -0
- package/dist/index64.js +20 -0
- package/dist/index65.cjs +1 -0
- package/dist/index65.js +12 -0
- package/dist/index66.cjs +1 -0
- package/dist/index66.js +35 -0
- package/dist/index67.cjs +1 -0
- package/dist/index67.js +17 -0
- package/dist/index68.cjs +1 -0
- package/dist/index68.js +15 -0
- package/dist/index69.cjs +1 -0
- package/dist/index69.js +39 -0
- package/dist/index7.cjs +1 -1
- package/dist/index7.js +237 -47
- package/dist/index70.cjs +1 -0
- package/dist/index70.js +44 -0
- package/dist/index71.cjs +1 -0
- package/dist/index71.js +45 -0
- package/dist/index72.cjs +1 -0
- package/dist/index72.js +27 -0
- package/dist/index73.cjs +1 -0
- package/dist/index73.js +57 -0
- package/dist/index74.cjs +1 -0
- package/dist/index74.js +30 -0
- package/dist/index75.cjs +1 -0
- package/dist/index75.js +22 -0
- package/dist/index76.cjs +1 -0
- package/dist/index76.js +730 -0
- package/dist/index77.cjs +1 -0
- package/dist/index77.js +524 -0
- package/dist/index78.cjs +1 -0
- package/dist/index78.js +15 -0
- package/dist/index79.cjs +1 -0
- package/dist/index79.js +14 -0
- package/dist/index8.cjs +1 -1
- package/dist/index8.js +42 -46
- package/dist/index80.cjs +1 -0
- package/dist/index80.js +21 -0
- package/dist/index81.cjs +1 -0
- package/dist/index81.js +48 -0
- package/dist/index82.cjs +1 -0
- package/dist/index82.js +45 -0
- package/dist/index83.cjs +1 -0
- package/dist/index83.js +174 -0
- package/dist/index84.cjs +1 -0
- package/dist/index84.js +23 -0
- package/dist/index85.cjs +1 -0
- package/dist/index85.js +33 -0
- package/dist/index86.cjs +1 -0
- package/dist/index86.js +29 -0
- package/dist/index87.cjs +1 -0
- package/dist/index87.js +7 -0
- package/dist/index88.cjs +1 -0
- package/dist/index88.js +9 -0
- package/dist/index89.cjs +1 -0
- package/dist/index89.js +19 -0
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +69 -93
- package/dist/index90.cjs +1 -0
- package/dist/index90.js +15 -0
- package/dist/index91.cjs +1 -0
- package/dist/index91.js +12 -0
- package/dist/index92.cjs +1 -0
- package/dist/index92.js +159 -0
- package/dist/index93.cjs +1 -0
- package/dist/index93.js +7 -0
- package/dist/index94.cjs +3 -0
- package/dist/index94.js +218 -0
- package/dist/index95.cjs +1 -0
- package/dist/index95.js +21 -0
- package/dist/index96.cjs +1 -0
- package/dist/index96.js +13 -0
- package/dist/index97.cjs +1 -0
- package/dist/index97.js +24 -0
- package/dist/index98.cjs +1 -0
- package/dist/index98.js +12 -0
- package/dist/index99.cjs +1 -0
- package/dist/index99.js +12 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/lib/GardenSwapWidget.d.ts +5 -0
- package/dist/src/lib/common/BottomSheet.d.ts +7 -0
- package/dist/src/lib/common/CopyToClipboard.d.ts +7 -0
- package/dist/src/lib/common/GardenBranding.d.ts +3 -0
- package/dist/src/lib/common/Header.d.ts +3 -0
- package/dist/src/lib/common/Modal.d.ts +0 -2
- package/dist/src/lib/common/Sidebar.d.ts +9 -0
- package/dist/src/lib/common/SwapWidgetBase.d.ts +7 -0
- package/dist/src/lib/components/CreateSwap.d.ts +1 -2
- package/dist/src/lib/components/SwapSavingsAndAddresses.d.ts +1 -1
- package/dist/src/lib/components/SwapWidget.d.ts +4 -2
- package/dist/src/lib/components/swapInProgress/SwapInProgress.d.ts +3 -0
- package/dist/src/lib/components/swapInProgress/SwapInProgressSkeleton.d.ts +3 -0
- package/dist/src/lib/components/transactions/TransactionHistory.d.ts +2 -2
- package/dist/src/lib/components/transactions/Transactions.d.ts +1 -2
- package/dist/src/lib/constants/constants.d.ts +25 -0
- package/dist/src/lib/constants/wagmiConfig.d.ts +1548 -0
- package/dist/src/lib/hooks/useAddresses.d.ts +8 -0
- package/dist/src/lib/hooks/useSwap.d.ts +1 -0
- package/dist/src/lib/store/assetStore.d.ts +11 -0
- package/dist/src/lib/store/heightStore.d.ts +10 -0
- package/dist/src/lib/store/orderInProgressStore.d.ts +10 -0
- package/dist/src/lib/store/swapStore.d.ts +22 -4
- package/dist/src/lib/store/transactionHistoryStore.d.ts +2 -2
- package/dist/src/lib/store/widgetConfigStore.d.ts +8 -0
- package/dist/src/lib/types/types.d.ts +19 -2
- package/dist/src/lib/utils/balance/getBalanceMulticall.d.ts +5 -0
- package/dist/src/lib/utils/balance/getNativeTokenFee.d.ts +7 -0
- package/dist/src/lib/utils/balance/getNetworkFees.d.ts +5 -0
- package/dist/src/lib/utils/balance/getTokenBalance.d.ts +8 -0
- package/dist/src/lib/utils/balance/getmaxBtc.d.ts +3 -0
- package/dist/src/lib/utils/balance/rpcUtils.d.ts +17 -0
- package/dist/src/lib/utils/utils.d.ts +1 -0
- package/dist/style.css +1 -1
- package/package.json +17 -8
- package/dist/index5.cjs +0 -1
- package/dist/index5.js +0 -250
- package/dist/src/lib/GardenComponent.d.ts +0 -6
- package/dist/src/lib/common/Navbar.d.ts +0 -10
package/dist/index16.js
CHANGED
|
@@ -1,313 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import P from "bignumber.js";
|
|
9
|
-
import { formatAmount as et } from "./index17.js";
|
|
10
|
-
const _t = () => {
|
|
11
|
-
var z;
|
|
12
|
-
const {
|
|
13
|
-
inputAmount: c,
|
|
14
|
-
outputAmount: A,
|
|
15
|
-
inputAsset: t,
|
|
16
|
-
outputAsset: n,
|
|
17
|
-
isSwapping: N,
|
|
18
|
-
isApproving: nt,
|
|
19
|
-
rate: ot,
|
|
20
|
-
error: I,
|
|
21
|
-
btcAddress: b,
|
|
22
|
-
tokenPrices: it,
|
|
23
|
-
isFetchingQuote: ut,
|
|
24
|
-
isEditBTCAddress: st,
|
|
25
|
-
networkFees: U,
|
|
26
|
-
setIsSwapping: B,
|
|
27
|
-
setAmount: l,
|
|
28
|
-
setRate: W,
|
|
29
|
-
setError: u,
|
|
30
|
-
swapAssets: ct,
|
|
31
|
-
setAsset: lt,
|
|
32
|
-
setIsFetchingQuote: g,
|
|
33
|
-
isComparisonVisible: Q,
|
|
34
|
-
setIsValidBitcoinAddress: T,
|
|
35
|
-
// setIsApproving,
|
|
36
|
-
setTokenPrices: d,
|
|
37
|
-
clearSwapState: V,
|
|
38
|
-
setBtcAddress: x,
|
|
39
|
-
setIsComparisonVisible: at,
|
|
40
|
-
currentNetwork: j
|
|
41
|
-
} = ht(), { swap: q, getQuote: L, garden: e } = vt(), f = dt(null), y = S(() => !!(t && n && (M(t.chain) || M(n.chain))), [t, n]), G = S(() => y ? b ? rt(b, j) : !1 : !0, [b, y]), R = S(() => !!(t && A && c && n && G && !I.inputError && !I.outputError && !I.liquidityError && !I.insufficientBalanceError), [
|
|
42
|
-
t,
|
|
43
|
-
A,
|
|
44
|
-
c,
|
|
45
|
-
n,
|
|
46
|
-
I,
|
|
47
|
-
G
|
|
48
|
-
]), H = S(() => y ? !!(R && b) : R, [R, y, b]), { minAmount: E, maxAmount: w } = S(() => {
|
|
49
|
-
const r = {
|
|
50
|
-
minAmount: 0,
|
|
51
|
-
maxAmount: 0
|
|
52
|
-
};
|
|
53
|
-
return !t || !n || !t.min_amount || !t.max_amount ? r : {
|
|
54
|
-
minAmount: et(
|
|
55
|
-
t.min_amount,
|
|
56
|
-
t.decimals,
|
|
57
|
-
t.decimals
|
|
58
|
-
),
|
|
59
|
-
maxAmount: et(
|
|
60
|
-
t.max_amount,
|
|
61
|
-
t.decimals,
|
|
62
|
-
t.decimals
|
|
63
|
-
)
|
|
64
|
-
};
|
|
65
|
-
}, [t, n]), v = S(
|
|
66
|
-
() => wt(
|
|
67
|
-
async (r, s, a, i) => {
|
|
68
|
-
var X, Y, Z, $, O;
|
|
69
|
-
if (!L || N) return;
|
|
70
|
-
g({ input: i, output: !i }), f.current && f.current.abort(), f.current = new AbortController();
|
|
71
|
-
const D = i ? a.decimals : s.decimals, h = new P(r).multipliedBy(
|
|
72
|
-
10 ** D
|
|
73
|
-
), o = await L({
|
|
74
|
-
fromAsset: s,
|
|
75
|
-
toAsset: a,
|
|
76
|
-
amount: h.toNumber(),
|
|
77
|
-
isExactOut: i,
|
|
78
|
-
options: {
|
|
79
|
-
request: {
|
|
80
|
-
signal: f.current.signal
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
if (!o || !o.ok) {
|
|
85
|
-
if ((X = o == null ? void 0 : o.error) != null && X.includes("AbortError")) {
|
|
86
|
-
u({ liquidityError: p.none }), g({ input: !1, output: !1 });
|
|
87
|
-
return;
|
|
88
|
-
} else (Y = o == null ? void 0 : o.error) != null && Y.includes("insufficient liquidity") ? (u({ liquidityError: p.insufficientLiquidity }), l(i ? m.input : m.output, "")) : (Z = o == null ? void 0 : o.error) != null && Z.includes("output amount too less") ? (u({ outputError: p.outLow }), l(m.input, "")) : ($ = o == null ? void 0 : o.error) != null && $.includes("output amount too high") ? (u({ outputError: p.outHigh }), l(m.input, "")) : (O = o == null ? void 0 : o.error) != null && O.includes("invalid from_asset") ? (u({ outputError: p.invalidFomAssset }), l(m.input, "")) : l(i ? m.input : m.output, "");
|
|
89
|
-
g({ input: !1, output: !1 }), d({ input: "0", output: "0" });
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
const F = i ? o.val[0].source.display : o.val[0].destination.display;
|
|
93
|
-
let J = Number(F);
|
|
94
|
-
s.symbol === "USDC" && a.symbol === "USDC" && (J = Number(F) + U);
|
|
95
|
-
const ft = J / Number(r);
|
|
96
|
-
W(ft), l(i ? m.input : m.output, F), g({ input: !1, output: !1 }), d({
|
|
97
|
-
input: o.val[0].source.value.toString(),
|
|
98
|
-
output: o.val[0].destination.value.toString()
|
|
99
|
-
}), u({
|
|
100
|
-
liquidityError: p.none
|
|
101
|
-
});
|
|
102
|
-
},
|
|
103
|
-
500
|
|
104
|
-
),
|
|
105
|
-
[
|
|
106
|
-
L,
|
|
107
|
-
g,
|
|
108
|
-
W,
|
|
109
|
-
l,
|
|
110
|
-
d,
|
|
111
|
-
u,
|
|
112
|
-
N,
|
|
113
|
-
U
|
|
114
|
-
]
|
|
115
|
-
), C = tt(
|
|
116
|
-
async (r, s, a, i) => {
|
|
117
|
-
v(r, s, a, i);
|
|
118
|
-
},
|
|
119
|
-
[v]
|
|
120
|
-
), _ = tt(
|
|
121
|
-
async (r) => {
|
|
122
|
-
l(m.input, r);
|
|
123
|
-
const s = Number(r);
|
|
124
|
-
if (!s) {
|
|
125
|
-
v.cancel(), f.current && f.current.abort(), l(m.output, ""), d({ input: "0", output: "0" }), u({ inputError: p.none, liquidityError: p.none });
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
if (t && E && s < E) {
|
|
129
|
-
u({
|
|
130
|
-
inputError: p.minError(E.toString(), t == null ? void 0 : t.symbol)
|
|
131
|
-
}), l(m.output, ""), d({ input: "0", output: "0" }), v.cancel(), f.current && f.current.abort();
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
if (t && w && s > w) {
|
|
135
|
-
u({
|
|
136
|
-
inputError: p.maxError(w.toString(), t == null ? void 0 : t.symbol)
|
|
137
|
-
}), l(m.output, ""), v.cancel(), f.current && f.current.abort();
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
u({ inputError: p.none }), !(!t || !n || !Number(r)) && C(r, t, n, !1);
|
|
141
|
-
},
|
|
142
|
-
[
|
|
143
|
-
t,
|
|
144
|
-
n,
|
|
145
|
-
E,
|
|
146
|
-
w,
|
|
147
|
-
C,
|
|
148
|
-
v,
|
|
149
|
-
l,
|
|
150
|
-
u,
|
|
151
|
-
d
|
|
152
|
-
]
|
|
153
|
-
), mt = async (r) => {
|
|
154
|
-
l(m.output, r);
|
|
155
|
-
const s = Number(r);
|
|
156
|
-
if (!s) {
|
|
157
|
-
v.cancel(), f.current && f.current.abort(), l(m.input, ""), u({ outputError: p.none });
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
u({ outputError: p.none }), !(!t || !n || !s) && C(r, t, n, !0);
|
|
161
|
-
}, K = S(() => {
|
|
162
|
-
var s, a, i, D;
|
|
163
|
-
if (!t || !n || !c || c === "0" || !A || A === "0")
|
|
164
|
-
return null;
|
|
165
|
-
const r = {
|
|
166
|
-
evm: {
|
|
167
|
-
check: (h) => Et(h),
|
|
168
|
-
address: (s = e == null ? void 0 : e.htlcs.evm) == null ? void 0 : s.htlcActorAddress
|
|
169
|
-
},
|
|
170
|
-
starknet: {
|
|
171
|
-
check: (h) => yt(h),
|
|
172
|
-
address: (a = e == null ? void 0 : e.htlcs.starknet) == null ? void 0 : a.htlcActorAddress
|
|
173
|
-
},
|
|
174
|
-
solana: {
|
|
175
|
-
check: (h) => bt(h),
|
|
176
|
-
address: (i = e == null ? void 0 : e.htlcs.solana) == null ? void 0 : i.htlcActorAddress
|
|
177
|
-
},
|
|
178
|
-
sui: {
|
|
179
|
-
check: (h) => At(h),
|
|
180
|
-
address: (D = e == null ? void 0 : e.htlcs.sui) == null ? void 0 : D.htlcActorAddress
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
for (const [h, { check: o, address: F }] of Object.entries(
|
|
184
|
-
r
|
|
185
|
-
))
|
|
186
|
-
if ((o(t.chain) || o(n.chain)) && !F)
|
|
187
|
-
return h;
|
|
188
|
-
return null;
|
|
189
|
-
}, [t, n, c, A, e]), pt = async () => {
|
|
190
|
-
if (K || !H || !q || !t || !n) return;
|
|
191
|
-
B(!0);
|
|
192
|
-
const r = new P(c).multipliedBy(10 ** t.decimals).toFixed(), s = new P(A).multipliedBy(10 ** n.decimals).toFixed();
|
|
193
|
-
try {
|
|
194
|
-
const a = await q({
|
|
195
|
-
fromAsset: t,
|
|
196
|
-
toAsset: n,
|
|
197
|
-
sendAmount: r,
|
|
198
|
-
receiveAmount: s,
|
|
199
|
-
...y && { addresses: { bitcoin: b } }
|
|
200
|
-
});
|
|
201
|
-
if (!a.ok) {
|
|
202
|
-
a.error.includes("destination amount too high") ? C(c, t, n, !1) : console.error("failed to create order ❌", a.error), B(!1);
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
if (console.log("orderCreated ✅", a.val), M(t.chain)) {
|
|
206
|
-
const i = await (e == null ? void 0 : e.getOrder(a.val));
|
|
207
|
-
if (!(i != null && i.val) || i != null && i.error) {
|
|
208
|
-
console.error("failed to get order ❌", i == null ? void 0 : i.error), B(!1);
|
|
209
|
-
return;
|
|
210
|
-
}
|
|
211
|
-
if (e) {
|
|
212
|
-
V();
|
|
213
|
-
return;
|
|
214
|
-
}
|
|
215
|
-
B(!1), V();
|
|
216
|
-
return;
|
|
217
|
-
}
|
|
218
|
-
B(!1), V();
|
|
219
|
-
} catch (a) {
|
|
220
|
-
throw console.error("failed to create order ❌", a), B(!1), a;
|
|
221
|
-
}
|
|
222
|
-
};
|
|
223
|
-
return k(() => {
|
|
224
|
-
if (!t || !n || !c || N || Q)
|
|
225
|
-
return;
|
|
226
|
-
const r = setInterval(() => {
|
|
227
|
-
C(c, t, n, !1);
|
|
228
|
-
}, 5e3);
|
|
229
|
-
return () => clearInterval(r);
|
|
230
|
-
}, [
|
|
231
|
-
c,
|
|
232
|
-
t,
|
|
233
|
-
n,
|
|
234
|
-
C,
|
|
235
|
-
N,
|
|
236
|
-
Q
|
|
237
|
-
]), k(() => {
|
|
238
|
-
!t || !n || (u({ inputError: "" }), _(c));
|
|
239
|
-
}, [t, _, u]), k(() => {
|
|
240
|
-
if (A == "0" || !A || c == "0" || !c) {
|
|
241
|
-
d({ input: "0", output: "0" });
|
|
242
|
-
return;
|
|
243
|
-
}
|
|
244
|
-
}, [c, A, d, u]), k(() => {
|
|
245
|
-
if (!c || !E || !w) return;
|
|
246
|
-
const r = Number(c);
|
|
247
|
-
if (r) {
|
|
248
|
-
if (r < E && t) {
|
|
249
|
-
u({
|
|
250
|
-
inputError: p.minError(E.toString(), t.symbol)
|
|
251
|
-
}), d({ input: "0", output: "0" }), l(m.output, "");
|
|
252
|
-
return;
|
|
253
|
-
}
|
|
254
|
-
if (r > w && t) {
|
|
255
|
-
u({
|
|
256
|
-
inputError: p.maxError(w.toString(), t.symbol)
|
|
257
|
-
}), d({ input: "0", output: "0" }), l(m.output, "");
|
|
258
|
-
return;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}, [
|
|
262
|
-
c,
|
|
263
|
-
E,
|
|
264
|
-
w,
|
|
265
|
-
t,
|
|
266
|
-
u,
|
|
267
|
-
d,
|
|
268
|
-
_,
|
|
269
|
-
l
|
|
270
|
-
]), k(() => {
|
|
271
|
-
u({ insufficientBalanceError: p.none });
|
|
272
|
-
}, [u, t, n, c]), k(() => {
|
|
273
|
-
var r, s;
|
|
274
|
-
(r = e == null ? void 0 : e.htlcs.bitcoin) != null && r.htlcActorAddress && x((s = e == null ? void 0 : e.htlcs.bitcoin) == null ? void 0 : s.htlcActorAddress);
|
|
275
|
-
}, [(z = e == null ? void 0 : e.htlcs.bitcoin) == null ? void 0 : z.htlcActorAddress, x]), k(() => {
|
|
276
|
-
if (!y) {
|
|
277
|
-
T(!0);
|
|
278
|
-
return;
|
|
279
|
-
}
|
|
280
|
-
const r = b ? rt(b, j) : !1;
|
|
281
|
-
T(r);
|
|
282
|
-
}, [b, y, T]), {
|
|
283
|
-
inputAmount: c,
|
|
284
|
-
outputAmount: A,
|
|
285
|
-
inputAsset: t,
|
|
286
|
-
outputAsset: n,
|
|
287
|
-
tokenPrices: it,
|
|
288
|
-
rate: ot,
|
|
289
|
-
error: I,
|
|
290
|
-
isEditBTCAddress: st,
|
|
291
|
-
loading: ut,
|
|
292
|
-
validSwap: H,
|
|
293
|
-
isSwapping: N,
|
|
294
|
-
isApproving: nt,
|
|
295
|
-
isBitcoinSwap: y,
|
|
296
|
-
// inputTokenBalance,
|
|
297
|
-
needsWalletConnection: K,
|
|
298
|
-
btcAddress: b,
|
|
299
|
-
controller: f,
|
|
300
|
-
isComparisonVisible: Q,
|
|
301
|
-
setBtcAddress: x,
|
|
302
|
-
swapAssets: ct,
|
|
303
|
-
handleInputAmountChange: _,
|
|
304
|
-
handleOutputAmountChange: mt,
|
|
305
|
-
handleSwapClick: pt,
|
|
306
|
-
setAsset: lt,
|
|
307
|
-
clearSwapState: V,
|
|
308
|
-
setIsComparisonVisible: at
|
|
309
|
-
};
|
|
310
|
-
};
|
|
1
|
+
import { create as o } from "zustand";
|
|
2
|
+
const s = o((t) => ({
|
|
3
|
+
styles: void 0,
|
|
4
|
+
setStyles: (e) => {
|
|
5
|
+
t({ styles: e });
|
|
6
|
+
}
|
|
7
|
+
}));
|
|
311
8
|
export {
|
|
312
|
-
|
|
9
|
+
s as widgetConfigStore
|
|
313
10
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index46.cjs"),O=require("./index93.cjs"),x=require("./index187.cjs"),B=require("./index189.cjs"),T=require("./index94.cjs"),$=require("./index221.cjs"),L=require("./index96.cjs"),M=require("./index84.cjs"),S=require("./index246.cjs"),Z=require("./index101.cjs"),G=require("./index105.cjs");async function H(i,o){var y;const{account:m,authorizationList:j,allowFailure:d=!0,blockNumber:w,blockOverrides:R,blockTag:v,stateOverride:z}=o,h=o.contracts,{batchSize:C=o.batchSize??1024,deployless:N=o.deployless??!1}=typeof((y=i.batch)==null?void 0:y.multicall)=="object"?i.batch.multicall:{},q=(()=>{if(o.multicallAddress)return o.multicallAddress;if(N)return null;if(i.chain)return M.getChainContractAddress({blockNumber:w,chain:i.chain,contract:"multicall3"});throw new Error("client chain not configured. multicallAddress is required.")})(),r=[[]];let c=0,f=0;for(let t=0;t<h.length;t++){const{abi:a,address:s,args:e,functionName:u}=h[t];try{const n=L.encodeFunctionData({abi:a,args:e,functionName:u});f+=(n.length-2)/2,C>0&&f>C&&r[c].length>0&&(c++,f=(n.length-2)/2,r[c]=[]),r[c]=[...r[c],{allowFailure:!0,callData:n,target:s}]}catch(n){const b=S.getContractError(n,{abi:a,address:s,args:e,docsPath:"/docs/contract/multicall",functionName:u,sender:m});if(!d)throw b;r[c]=[...r[c],{allowFailure:!0,callData:"0x",target:s}]}}const A=await Promise.allSettled(r.map(t=>Z.getAction(i,G.readContract,"readContract")({...q===null?{code:O.multicall3Bytecode}:{address:q},abi:p.multicall3Abi,account:m,args:[t],authorizationList:j,blockNumber:w,blockOverrides:R,blockTag:v,functionName:"aggregate3",stateOverride:z}))),l=[];for(let t=0;t<A.length;t++){const a=A[t];if(a.status==="rejected"){if(!d)throw a.reason;for(let e=0;e<r[t].length;e++)l.push({status:"failure",error:a.reason,result:void 0});continue}const s=a.value;for(let e=0;e<s.length;e++){const{returnData:u,success:n}=s[e],{callData:b}=r[t][e],{abi:D,address:P,functionName:E,args:F}=h[l.length];try{if(b==="0x")throw new x.AbiDecodingZeroDataError;if(!n)throw new T.RawContractError({data:u});const g=$.decodeFunctionResult({abi:D,args:F,data:u,functionName:E});l.push(d?{result:g,status:"success"}:g)}catch(g){const k=S.getContractError(g,{abi:D,address:P,args:F,docsPath:"/docs/contract/multicall",functionName:E});if(!d)throw k;l.push({error:k,result:void 0,status:"failure"})}}}if(l.length!==h.length)throw new B.BaseError("multicall results mismatch");return l}exports.multicall=H;
|
package/dist/index160.js
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { multicall3Abi as P } from "./index46.js";
|
|
2
|
+
import { multicall3Bytecode as B } from "./index93.js";
|
|
3
|
+
import { AbiDecodingZeroDataError as O } from "./index187.js";
|
|
4
|
+
import { BaseError as q } from "./index189.js";
|
|
5
|
+
import { RawContractError as L } from "./index94.js";
|
|
6
|
+
import { decodeFunctionResult as T } from "./index221.js";
|
|
7
|
+
import { encodeFunctionData as Z } from "./index96.js";
|
|
8
|
+
import { getChainContractAddress as G } from "./index84.js";
|
|
9
|
+
import { getContractError as j } from "./index246.js";
|
|
10
|
+
import { getAction as H } from "./index101.js";
|
|
11
|
+
import { readContract as I } from "./index105.js";
|
|
12
|
+
async function tt(i, c) {
|
|
13
|
+
var y;
|
|
14
|
+
const { account: w, authorizationList: z, allowFailure: d = !0, blockNumber: b, blockOverrides: N, blockTag: R, stateOverride: S } = c, h = c.contracts, { batchSize: p = c.batchSize ?? 1024, deployless: v = c.deployless ?? !1 } = typeof ((y = i.batch) == null ? void 0 : y.multicall) == "object" ? i.batch.multicall : {}, C = (() => {
|
|
15
|
+
if (c.multicallAddress)
|
|
16
|
+
return c.multicallAddress;
|
|
17
|
+
if (v)
|
|
18
|
+
return null;
|
|
19
|
+
if (i.chain)
|
|
20
|
+
return G({
|
|
21
|
+
blockNumber: b,
|
|
22
|
+
chain: i.chain,
|
|
23
|
+
contract: "multicall3"
|
|
24
|
+
});
|
|
25
|
+
throw new Error("client chain not configured. multicallAddress is required.");
|
|
26
|
+
})(), e = [[]];
|
|
27
|
+
let o = 0, f = 0;
|
|
28
|
+
for (let t = 0; t < h.length; t++) {
|
|
29
|
+
const { abi: a, address: s, args: r, functionName: u } = h[t];
|
|
30
|
+
try {
|
|
31
|
+
const l = Z({ abi: a, args: r, functionName: u });
|
|
32
|
+
f += (l.length - 2) / 2, // Check if batching is enabled.
|
|
33
|
+
p > 0 && // Check if the current size of the batch exceeds the size limit.
|
|
34
|
+
f > p && // Check if the current chunk is not already empty.
|
|
35
|
+
e[o].length > 0 && (o++, f = (l.length - 2) / 2, e[o] = []), e[o] = [
|
|
36
|
+
...e[o],
|
|
37
|
+
{
|
|
38
|
+
allowFailure: !0,
|
|
39
|
+
callData: l,
|
|
40
|
+
target: s
|
|
41
|
+
}
|
|
42
|
+
];
|
|
43
|
+
} catch (l) {
|
|
44
|
+
const g = j(l, {
|
|
45
|
+
abi: a,
|
|
46
|
+
address: s,
|
|
47
|
+
args: r,
|
|
48
|
+
docsPath: "/docs/contract/multicall",
|
|
49
|
+
functionName: u,
|
|
50
|
+
sender: w
|
|
51
|
+
});
|
|
52
|
+
if (!d)
|
|
53
|
+
throw g;
|
|
54
|
+
e[o] = [
|
|
55
|
+
...e[o],
|
|
56
|
+
{
|
|
57
|
+
allowFailure: !0,
|
|
58
|
+
callData: "0x",
|
|
59
|
+
target: s
|
|
60
|
+
}
|
|
61
|
+
];
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
const A = await Promise.allSettled(e.map((t) => H(i, I, "readContract")({
|
|
65
|
+
...C === null ? { code: B } : { address: C },
|
|
66
|
+
abi: P,
|
|
67
|
+
account: w,
|
|
68
|
+
args: [t],
|
|
69
|
+
authorizationList: z,
|
|
70
|
+
blockNumber: b,
|
|
71
|
+
blockOverrides: N,
|
|
72
|
+
blockTag: R,
|
|
73
|
+
functionName: "aggregate3",
|
|
74
|
+
stateOverride: S
|
|
75
|
+
}))), n = [];
|
|
76
|
+
for (let t = 0; t < A.length; t++) {
|
|
77
|
+
const a = A[t];
|
|
78
|
+
if (a.status === "rejected") {
|
|
79
|
+
if (!d)
|
|
80
|
+
throw a.reason;
|
|
81
|
+
for (let r = 0; r < e[t].length; r++)
|
|
82
|
+
n.push({
|
|
83
|
+
status: "failure",
|
|
84
|
+
error: a.reason,
|
|
85
|
+
result: void 0
|
|
86
|
+
});
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
const s = a.value;
|
|
90
|
+
for (let r = 0; r < s.length; r++) {
|
|
91
|
+
const { returnData: u, success: l } = s[r], { callData: g } = e[t][r], { abi: D, address: x, functionName: k, args: E } = h[n.length];
|
|
92
|
+
try {
|
|
93
|
+
if (g === "0x")
|
|
94
|
+
throw new O();
|
|
95
|
+
if (!l)
|
|
96
|
+
throw new L({ data: u });
|
|
97
|
+
const m = T({
|
|
98
|
+
abi: D,
|
|
99
|
+
args: E,
|
|
100
|
+
data: u,
|
|
101
|
+
functionName: k
|
|
102
|
+
});
|
|
103
|
+
n.push(d ? { result: m, status: "success" } : m);
|
|
104
|
+
} catch (m) {
|
|
105
|
+
const F = j(m, {
|
|
106
|
+
abi: D,
|
|
107
|
+
address: x,
|
|
108
|
+
args: E,
|
|
109
|
+
docsPath: "/docs/contract/multicall",
|
|
110
|
+
functionName: k
|
|
111
|
+
});
|
|
112
|
+
if (!d)
|
|
113
|
+
throw F;
|
|
114
|
+
n.push({ error: F, result: void 0, status: "failure" });
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
if (n.length !== h.length)
|
|
119
|
+
throw new q("multicall results mismatch");
|
|
120
|
+
return n;
|
|
121
|
+
}
|
|
122
|
+
export {
|
|
123
|
+
tt as multicall
|
|
124
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./index273.cjs"),B=require("./index123.cjs"),D=require("./index187.cjs"),F=require("./index94.cjs"),C=require("./index206.cjs"),H=require("./index221.cjs"),A=require("./index96.cjs"),U=require("./index80.cjs"),_=require("./index81.cjs"),j=require("./index246.cjs"),z=require("./index270.cjs"),I=require("./index72.cjs"),L=require("./index90.cjs"),M=require("./index108.cjs"),P=require("./index275.cjs"),V=require("./index261.cjs");async function Z(m,v){const{blockNumber:q,blockTag:O=m.experimental_blockTag??"latest",blocks:g,returnFullTransactions:w,traceTransfers:N,validation:R}=v;try{const a=[];for(const t of g){const f=t.blockOverrides?y.toRpc(t.blockOverrides):void 0,r=t.calls.map(c=>{const e=c,o=e.account?B.parseAccount(e.account):void 0,i=e.abi?A.encodeFunctionData(e):e.data,s={...e,account:o,data:e.dataSuffix?U.concat([i||"0x",e.dataSuffix]):i,from:e.from??(o==null?void 0:o.address)};return V.assertRequest(s),M.formatTransactionRequest(s)}),b=t.stateOverrides?P.serializeStateOverride(t.stateOverrides):void 0;a.push({blockOverrides:f,calls:r,stateOverrides:b})}const u=(typeof q=="bigint"?_.numberToHex(q):void 0)||O;return(await m.request({method:"eth_simulateV1",params:[{blockStateCalls:a,returnFullTransactions:w,traceTransfers:N,validation:R},u]})).map((t,f)=>({...I.formatBlock(t),calls:t.calls.map((r,b)=>{var k,p;const{abi:c,args:e,functionName:o,to:i}=g[f].calls[b],s=((k=r.error)==null?void 0:k.data)??r.returnData,E=BigInt(r.gasUsed),T=(p=r.logs)==null?void 0:p.map(n=>L.formatLog(n)),d=r.status==="0x1"?"success":"failure",h=c&&d==="success"&&s!=="0x"?H.decodeFunctionResult({abi:c,data:s,functionName:o}):null,S=(()=>{var x;if(d==="success")return;let n;if(((x=r.error)==null?void 0:x.data)==="0x"?n=new D.AbiDecodingZeroDataError:r.error&&(n=new F.RawContractError(r.error)),!!n)return j.getContractError(n,{abi:c??[],address:i??"0x",args:e,functionName:o??"<unknown>"})})();return{data:s,gasUsed:E,logs:T,status:d,...d==="success"?{result:h}:{error:S}}})}))}catch(a){const l=a,u=z.getNodeError(l,{});throw u instanceof C.UnknownNodeError?l:u}}exports.simulateBlocks=Z;
|
package/dist/index161.js
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { toRpc as S } from "./index273.js";
|
|
2
|
+
import { parseAccount as y } from "./index123.js";
|
|
3
|
+
import { AbiDecodingZeroDataError as B } from "./index187.js";
|
|
4
|
+
import { RawContractError as C } from "./index94.js";
|
|
5
|
+
import { UnknownNodeError as F } from "./index206.js";
|
|
6
|
+
import { decodeFunctionResult as H } from "./index221.js";
|
|
7
|
+
import { encodeFunctionData as U } from "./index96.js";
|
|
8
|
+
import { concat as A } from "./index80.js";
|
|
9
|
+
import { numberToHex as _ } from "./index81.js";
|
|
10
|
+
import { getContractError as z } from "./index246.js";
|
|
11
|
+
import { getNodeError as I } from "./index270.js";
|
|
12
|
+
import { formatBlock as L } from "./index72.js";
|
|
13
|
+
import { formatLog as V } from "./index90.js";
|
|
14
|
+
import { formatTransactionRequest as Z } from "./index108.js";
|
|
15
|
+
import { serializeStateOverride as j } from "./index275.js";
|
|
16
|
+
import { assertRequest as G } from "./index261.js";
|
|
17
|
+
async function ir(p, w) {
|
|
18
|
+
const { blockNumber: b, blockTag: N = p.experimental_blockTag ?? "latest", blocks: k, returnFullTransactions: O, traceTransfers: h, validation: T } = w;
|
|
19
|
+
try {
|
|
20
|
+
const c = [];
|
|
21
|
+
for (const o of k) {
|
|
22
|
+
const d = o.blockOverrides ? S(o.blockOverrides) : void 0, t = o.calls.map((a) => {
|
|
23
|
+
const r = a, e = r.account ? y(r.account) : void 0, m = r.abi ? U(r) : r.data, s = {
|
|
24
|
+
...r,
|
|
25
|
+
account: e,
|
|
26
|
+
data: r.dataSuffix ? A([m || "0x", r.dataSuffix]) : m,
|
|
27
|
+
from: r.from ?? (e == null ? void 0 : e.address)
|
|
28
|
+
};
|
|
29
|
+
return G(s), Z(s);
|
|
30
|
+
}), l = o.stateOverrides ? j(o.stateOverrides) : void 0;
|
|
31
|
+
c.push({
|
|
32
|
+
blockOverrides: d,
|
|
33
|
+
calls: t,
|
|
34
|
+
stateOverrides: l
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
const i = (typeof b == "bigint" ? _(b) : void 0) || N;
|
|
38
|
+
return (await p.request({
|
|
39
|
+
method: "eth_simulateV1",
|
|
40
|
+
params: [
|
|
41
|
+
{ blockStateCalls: c, returnFullTransactions: O, traceTransfers: h, validation: T },
|
|
42
|
+
i
|
|
43
|
+
]
|
|
44
|
+
})).map((o, d) => ({
|
|
45
|
+
...L(o),
|
|
46
|
+
calls: o.calls.map((t, l) => {
|
|
47
|
+
var g, x;
|
|
48
|
+
const { abi: a, args: r, functionName: e, to: m } = k[d].calls[l], s = ((g = t.error) == null ? void 0 : g.data) ?? t.returnData, E = BigInt(t.gasUsed), R = (x = t.logs) == null ? void 0 : x.map((n) => V(n)), u = t.status === "0x1" ? "success" : "failure", q = a && u === "success" && s !== "0x" ? H({
|
|
49
|
+
abi: a,
|
|
50
|
+
data: s,
|
|
51
|
+
functionName: e
|
|
52
|
+
}) : null, D = (() => {
|
|
53
|
+
var v;
|
|
54
|
+
if (u === "success")
|
|
55
|
+
return;
|
|
56
|
+
let n;
|
|
57
|
+
if (((v = t.error) == null ? void 0 : v.data) === "0x" ? n = new B() : t.error && (n = new C(t.error)), !!n)
|
|
58
|
+
return z(n, {
|
|
59
|
+
abi: a ?? [],
|
|
60
|
+
address: m ?? "0x",
|
|
61
|
+
args: r,
|
|
62
|
+
functionName: e ?? "<unknown>"
|
|
63
|
+
});
|
|
64
|
+
})();
|
|
65
|
+
return {
|
|
66
|
+
data: s,
|
|
67
|
+
gasUsed: E,
|
|
68
|
+
logs: R,
|
|
69
|
+
status: u,
|
|
70
|
+
...u === "success" ? {
|
|
71
|
+
result: q
|
|
72
|
+
} : {
|
|
73
|
+
error: D
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
})
|
|
77
|
+
}));
|
|
78
|
+
} catch (c) {
|
|
79
|
+
const f = c, i = I(f, {});
|
|
80
|
+
throw i instanceof F ? f : i;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
export {
|
|
84
|
+
ir as simulateBlocks
|
|
85
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("./index333.cjs"),a=require("./index334.cjs"),K=require("./index123.cjs"),t=require("./index183.cjs"),Q=require("./index93.cjs"),W=require("./index189.cjs"),X=require("./index96.cjs"),Y=require("./index131.cjs"),Z=require("./index161.cjs"),v=require("./index71.cjs"),$="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function _(h,r){const{blockNumber:k,blockTag:C,calls:N,stateOverrides:q,traceAssetChanges:f,traceTransfers:T,validation:w}=r,n=r.account?K.parseAccount(r.account):void 0;if(f&&!n)throw new W.BaseError("`account` is required when `traceAssetChanges` is true");const B=n?z.encode(z.from("constructor(bytes, bytes)"),{bytecode:Q.deploylessCallViaBytecodeBytecode,args:[$,a.encodeData(a.from("function getBalance(address)"),[n.address])]}):void 0,c=f?await Promise.all(r.calls.map(async s=>{if(!s.data&&!s.abi)return;const{accessList:e}=await Y.createAccessList(h,{account:n.address,...s,data:s.abi?X.encodeFunctionData(s):s.data});return e.map(({address:o,storageKeys:d})=>d.length>0?o:null)})).then(s=>s.flat().filter(Boolean)):[],i=await Z.simulateBlocks(h,{blockNumber:k,blockTag:C,blocks:[...f?[{calls:[{data:B}],stateOverrides:q},{calls:c.map((s,e)=>({abi:[a.from("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[n.address],to:s,from:t.zeroAddress,nonce:e})),stateOverrides:[{address:t.zeroAddress,nonce:0}]}]:[],{calls:[...N,{}].map(s=>({...s,from:n==null?void 0:n.address})),stateOverrides:q},...f?[{calls:[{data:B}]},{calls:c.map((s,e)=>({abi:[a.from("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[n.address],to:s,from:t.zeroAddress,nonce:e})),stateOverrides:[{address:t.zeroAddress,nonce:0}]},{calls:c.map((s,e)=>({to:s,abi:[a.from("function decimals() returns (uint256)")],functionName:"decimals",from:t.zeroAddress,nonce:e})),stateOverrides:[{address:t.zeroAddress,nonce:0}]},{calls:c.map((s,e)=>({to:s,abi:[a.from("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:t.zeroAddress,nonce:e})),stateOverrides:[{address:t.zeroAddress,nonce:0}]},{calls:c.map((s,e)=>({to:s,abi:[a.from("function symbol() returns (string)")],functionName:"symbol",from:t.zeroAddress,nonce:e})),stateOverrides:[{address:t.zeroAddress,nonce:0}]}]:[]],traceTransfers:T,validation:w}),P=f?i[2]:i[0],[l,u,,b,m,g,A,p]=f?i:[],{calls:I,...D}=P,F=I.slice(0,-1)??[],L=(l==null?void 0:l.calls)??[],R=(u==null?void 0:u.calls)??[],U=[...L,...R].map(s=>s.status==="success"?v.hexToBigInt(s.data):null),E=(b==null?void 0:b.calls)??[],H=(m==null?void 0:m.calls)??[],S=[...E,...H].map(s=>s.status==="success"?v.hexToBigInt(s.data):null),j=((g==null?void 0:g.calls)??[]).map(s=>s.status==="success"?s.result:null),x=((p==null?void 0:p.calls)??[]).map(s=>s.status==="success"?s.result:null),M=((A==null?void 0:A.calls)??[]).map(s=>s.status==="success"?s.result:null),y=[];for(const[s,e]of S.entries()){const o=U[s];if(typeof e!="bigint"||typeof o!="bigint")continue;const d=j[s-1],V=x[s-1],G=M[s-1],O=s===0?{address:t.ethAddress,decimals:18,symbol:"ETH"}:{address:c[s-1],decimals:G||d?Number(d??1):void 0,symbol:V??void 0};y.some(J=>J.token.address===O.address)||y.push({token:O,value:{pre:o,post:e,diff:e-o}})}return{assetChanges:y,block:D,results:F}}exports.simulateCalls=_;
|