@gardenfi/swap 0.1.3-beta.13 → 0.1.3-beta.14
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/dist/index100.cjs +1 -1
- package/dist/index100.js +9 -171
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +3 -33
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +7 -51
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +5 -37
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +13 -16
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +171 -12
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +33 -24
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +46 -21
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +37 -4
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +24 -6
- package/dist/index110.cjs +2 -1
- package/dist/index110.js +59 -40
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +20 -32
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +34 -3
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +126 -8
- package/dist/index114.cjs +1 -1
- package/dist/index114.js +55 -116
- package/dist/index115.cjs +2 -1
- package/dist/index115.js +116 -57
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +16 -23
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +8 -36
- package/dist/index118.cjs +1 -1
- package/dist/index118.js +10 -41
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +11 -58
- package/dist/index120.cjs +1 -1
- package/dist/index120.js +12 -39
- package/dist/index121.cjs +1 -1
- package/dist/index121.js +78 -9
- package/dist/index122.cjs +1 -1
- package/dist/index122.js +14 -31
- package/dist/index123.cjs +1 -1
- package/dist/index123.js +18 -36
- package/dist/index124.cjs +1 -1
- package/dist/index124.js +2 -10
- package/dist/index125.cjs +1 -1
- package/dist/index125.js +2 -30
- package/dist/index126.cjs +4 -1
- package/dist/index126.js +194 -50
- package/dist/index127.cjs +1 -1
- package/dist/index127.js +5 -70
- package/dist/index128.cjs +1 -1
- package/dist/index128.js +32 -40
- package/dist/index129.cjs +1 -1
- package/dist/index129.js +3 -77
- package/dist/index130.cjs +1 -1
- package/dist/index130.js +9 -8
- package/dist/index131.cjs +1 -1
- package/dist/index131.js +116 -6
- package/dist/index132.cjs +1 -1
- package/dist/index132.js +61 -17
- package/dist/index133.cjs +1 -1
- package/dist/index133.js +24 -8
- package/dist/index134.cjs +1 -1
- package/dist/index134.js +36 -13
- package/dist/index135.cjs +1 -1
- package/dist/index135.js +41 -7
- package/dist/index136.cjs +1 -1
- package/dist/index136.js +58 -16
- package/dist/index137.cjs +1 -1
- package/dist/index137.js +35 -41
- package/dist/index138.cjs +1 -1
- package/dist/index138.js +9 -13
- package/dist/index139.cjs +1 -1
- package/dist/index139.js +30 -15
- package/dist/index140.cjs +1 -1
- package/dist/index140.js +36 -13
- package/dist/index141.cjs +1 -1
- package/dist/index141.js +8 -5
- package/dist/index142.cjs +1 -1
- package/dist/index142.js +28 -34
- package/dist/index143.cjs +1 -1
- package/dist/index143.js +50 -9
- package/dist/index144.cjs +1 -1
- package/dist/index144.js +70 -8
- package/dist/index145.cjs +1 -1
- package/dist/index145.js +40 -28
- package/dist/index146.cjs +1 -1
- package/dist/index146.js +77 -10
- package/dist/index147.cjs +1 -1
- package/dist/index147.js +7 -13
- package/dist/index148.cjs +1 -1
- package/dist/index148.js +6 -12
- package/dist/index149.cjs +1 -1
- package/dist/index149.js +17 -121
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +29 -29
- package/dist/index150.cjs +1 -1
- package/dist/index150.js +8 -82
- package/dist/index151.cjs +1 -1
- package/dist/index151.js +13 -177
- package/dist/index152.cjs +1 -1
- package/dist/index152.js +7 -44
- package/dist/index153.cjs +1 -1
- package/dist/index153.js +15 -5
- package/dist/index154.cjs +1 -1
- package/dist/index154.js +46 -14
- package/dist/index155.cjs +1 -1
- package/dist/index155.js +13 -14
- package/dist/index156.cjs +1 -1
- package/dist/index156.js +16 -103
- package/dist/index157.cjs +1 -1
- package/dist/index157.js +13 -75
- package/dist/index158.cjs +1 -1
- package/dist/index158.js +6 -89
- package/dist/index159.cjs +1 -1
- package/dist/index159.js +34 -150
- package/dist/index160.cjs +1 -1
- package/dist/index160.js +9 -138
- package/dist/index161.cjs +1 -1
- package/dist/index161.js +8 -69
- package/dist/index162.cjs +1 -1
- package/dist/index162.js +29 -23
- package/dist/index163.cjs +1 -1
- package/dist/index163.js +10 -164
- package/dist/index164.cjs +1 -1
- package/dist/index164.js +14 -6
- package/dist/index165.cjs +1 -1
- package/dist/index165.js +12 -13
- package/dist/index166.cjs +1 -1
- package/dist/index166.js +121 -19
- package/dist/index167.cjs +1 -1
- package/dist/index167.js +80 -104
- package/dist/index168.cjs +1 -1
- package/dist/index168.js +176 -77
- package/dist/index169.cjs +1 -1
- package/dist/index169.js +42 -7
- package/dist/index170.cjs +1 -1
- package/dist/index170.js +6 -28
- package/dist/index171.cjs +1 -1
- package/dist/index171.js +14 -90
- package/dist/index172.cjs +1 -1
- package/dist/index172.js +15 -3
- package/dist/index173.cjs +1 -1
- package/dist/index173.js +104 -2
- package/dist/index174.cjs +1 -2
- package/dist/index174.js +76 -3
- package/dist/index175.cjs +1 -1
- package/dist/index175.js +90 -9
- package/dist/index176.cjs +1 -20
- package/dist/index176.js +150 -325
- package/dist/index177.cjs +1 -1
- package/dist/index177.js +138 -13
- package/dist/index178.cjs +1 -2
- package/dist/index178.js +69 -59
- package/dist/index179.cjs +1 -1
- package/dist/index179.js +24 -2
- package/dist/index180.cjs +1 -1
- package/dist/index180.js +163 -6
- package/dist/index181.cjs +1 -1
- package/dist/index181.js +7 -32
- package/dist/index182.cjs +1 -1
- package/dist/index182.js +13 -21
- package/dist/index183.cjs +1 -1
- package/dist/index183.js +19 -5
- package/dist/index184.cjs +1 -1
- package/dist/index184.js +104 -71
- package/dist/index185.cjs +1 -1
- package/dist/index185.js +78 -5
- package/dist/index186.cjs +1 -1
- package/dist/index186.js +9 -5
- package/dist/index187.cjs +1 -9
- package/dist/index187.js +27 -34
- package/dist/index188.cjs +1 -2
- package/dist/index188.js +88 -118
- package/dist/index189.cjs +1 -1
- package/dist/index189.js +3 -3
- package/dist/index190.cjs +2 -1
- package/dist/index190.js +3 -19
- package/dist/index191.cjs +1 -1
- package/dist/index191.js +9 -34
- package/dist/index192.cjs +20 -1
- package/dist/index192.js +320 -29
- package/dist/index193.cjs +1 -1
- package/dist/index193.js +11 -21
- package/dist/index194.cjs +1 -1
- package/dist/index194.js +6 -7
- package/dist/index195.cjs +1 -4
- package/dist/index195.js +32 -195
- package/dist/index196.cjs +1 -1
- package/dist/index196.js +22 -2
- package/dist/index197.cjs +1 -3
- package/dist/index197.js +5 -451
- package/dist/index198.cjs +1 -1
- package/dist/index198.js +68 -22
- package/dist/index199.cjs +1 -1
- package/dist/index199.js +5 -161
- package/dist/index200.cjs +9 -1
- package/dist/index200.js +34 -126
- package/dist/index201.cjs +1 -1
- package/dist/index201.js +3 -39
- package/dist/index202.cjs +1 -1
- package/dist/index202.js +16 -25
- package/dist/index203.cjs +1 -1
- package/dist/index203.js +29 -51
- package/dist/index204.cjs +1 -1
- package/dist/index204.js +33 -189
- package/dist/index205.cjs +1 -1
- package/dist/index205.js +24 -4
- package/dist/index206.cjs +1 -1
- package/dist/index206.js +6 -71
- package/dist/index207.cjs +1 -1
- package/dist/index207.js +2 -21
- package/dist/index208.cjs +3 -1
- package/dist/index208.js +452 -3
- package/dist/index209.cjs +1 -1
- package/dist/index209.js +26 -15
- package/dist/index210.cjs +1 -1
- package/dist/index210.js +160 -22
- package/dist/index211.cjs +1 -1
- package/dist/index211.js +34 -30
- package/dist/index212.cjs +1 -1
- package/dist/index212.js +28 -3
- package/dist/index213.cjs +1 -1
- package/dist/index213.js +191 -27
- package/dist/index214.cjs +1 -1
- package/dist/index214.js +4 -37
- package/dist/index215.cjs +1 -1
- package/dist/index215.js +73 -8
- package/dist/index216.cjs +1 -1
- package/dist/index216.js +18 -23
- package/dist/index217.cjs +1 -1
- package/dist/index217.js +3 -29
- package/dist/index218.cjs +1 -1
- package/dist/index218.js +16 -75
- package/dist/index219.cjs +1 -1
- package/dist/index219.js +22 -20
- package/dist/index220.cjs +1 -1
- package/dist/index220.js +3 -9
- package/dist/index221.cjs +1 -1
- package/dist/index221.js +26 -9
- package/dist/index222.cjs +1 -1
- package/dist/index222.js +36 -11
- package/dist/index223.cjs +1 -1
- package/dist/index223.js +8 -6
- package/dist/index224.cjs +1 -1
- package/dist/index224.js +25 -6
- package/dist/index225.cjs +1 -1
- package/dist/index225.js +28 -13
- package/dist/index226.cjs +1 -1
- package/dist/index226.js +71 -28
- package/dist/index227.cjs +1 -1
- package/dist/index227.js +7 -5
- package/dist/index228.cjs +1 -1
- package/dist/index228.js +6 -37
- package/dist/index229.cjs +1 -1
- package/dist/index229.js +28 -107
- package/dist/index230.cjs +1 -1
- package/dist/index230.js +5 -50
- package/dist/index231.cjs +1 -1
- package/dist/index231.js +36 -31
- package/dist/index232.cjs +1 -1
- package/dist/index232.js +111 -8
- package/dist/index233.cjs +1 -1
- package/dist/index233.js +49 -7
- package/dist/index234.cjs +1 -1
- package/dist/index234.js +32 -16
- package/dist/index235.cjs +1 -1
- package/dist/index235.js +8 -22
- package/dist/index236.cjs +1 -1
- package/dist/index236.js +7 -104
- package/dist/index237.cjs +1 -1
- package/dist/index237.js +17 -3
- package/dist/index238.cjs +1 -1
- package/dist/index238.js +22 -5
- package/dist/index239.cjs +1 -1
- package/dist/index239.js +102 -29
- package/dist/index240.cjs +1 -1
- package/dist/index240.js +3 -21
- package/dist/index241.cjs +1 -1
- package/dist/index241.js +5 -3
- package/dist/index242.cjs +1 -1
- package/dist/index242.js +31 -17
- package/dist/index243.cjs +1 -1
- package/dist/index243.js +20 -5
- package/dist/index244.cjs +1 -1
- package/dist/index244.js +3 -8
- package/dist/index245.cjs +1 -1
- package/dist/index245.js +16 -102
- package/dist/index246.cjs +1 -1
- package/dist/index246.js +5 -64
- package/dist/index247.cjs +1 -1
- package/dist/index247.js +8 -6
- package/dist/index248.cjs +1 -1
- package/dist/index248.js +103 -27
- package/dist/index249.cjs +1 -1
- package/dist/index249.js +63 -33
- package/dist/index250.cjs +1 -1
- package/dist/index250.js +6 -16
- package/dist/index251.cjs +1 -1
- package/dist/index251.js +25 -76
- package/dist/index252.cjs +1 -1
- package/dist/index252.js +35 -2
- package/dist/index253.cjs +1 -1
- package/dist/index253.js +16 -14
- package/dist/index254.cjs +1 -1
- package/dist/index254.js +2 -19
- package/dist/index255.cjs +1 -1
- package/dist/index255.js +10 -17
- package/dist/index256.cjs +1 -1
- package/dist/index256.js +79 -10
- package/dist/index257.cjs +1 -1
- package/dist/index257.js +3 -80
- package/dist/index258.cjs +1 -1
- package/dist/index258.js +33 -3
- package/dist/index259.cjs +1 -1
- package/dist/index259.js +111 -28
- package/dist/index260.cjs +1 -1
- package/dist/index260.js +4 -116
- package/dist/index261.cjs +1 -1
- package/dist/index261.js +16 -4
- package/dist/index262.cjs +1 -1
- package/dist/index262.js +10 -14
- package/dist/index263.cjs +1 -1
- package/dist/index263.js +18 -11
- package/dist/index264.cjs +1 -1
- package/dist/index264.js +57 -17
- package/dist/index265.cjs +1 -1
- package/dist/index265.js +19 -57
- package/dist/index266.cjs +1 -1
- package/dist/index266.js +14 -21
- package/dist/index267.cjs +1 -1
- package/dist/index267.js +284 -13
- package/dist/index268.cjs +1 -1
- package/dist/index268.js +545 -256
- package/dist/index269.cjs +1 -1
- package/dist/index269.js +37 -570
- package/dist/index270.cjs +1 -1
- package/dist/index270.js +8 -12
- package/dist/index271.cjs +1 -1
- package/dist/index271.js +30 -24
- package/dist/index272.cjs +1 -1
- package/dist/index272.js +2 -13
- package/dist/index273.cjs +1 -1
- package/dist/index273.js +12 -8
- package/dist/index274.cjs +1 -1
- package/dist/index274.js +12 -30
- package/dist/index275.cjs +1 -1
- package/dist/index275.js +48 -2
- package/dist/index276.cjs +1 -1
- package/dist/index276.js +10 -46
- package/dist/index277.cjs +1 -1
- package/dist/index277.js +173 -10
- package/dist/index278.cjs +2 -1
- package/dist/index278.js +71 -154
- package/dist/index279.cjs +1 -2
- package/dist/index279.js +39 -90
- package/dist/index280.cjs +1 -1
- package/dist/index280.js +4 -40
- package/dist/index281.cjs +1 -1
- package/dist/index281.js +163 -4
- package/dist/index282.cjs +1 -1
- package/dist/index282.js +5 -164
- package/dist/index283.cjs +1 -1
- package/dist/index283.js +25 -5
- package/dist/index302.cjs +1 -1
- package/dist/index302.js +1 -1
- package/dist/index304.cjs +1 -1
- package/dist/index304.js +2 -2
- package/dist/index305.cjs +1 -1
- package/dist/index305.js +2 -2
- package/dist/index307.cjs +1 -1
- package/dist/index307.js +3 -3
- package/dist/index308.cjs +1 -1
- package/dist/index308.js +3 -3
- package/dist/index309.cjs +1 -1
- package/dist/index309.js +1 -1
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +1 -1
- package/dist/index312.cjs +1 -1
- package/dist/index312.js +1 -1
- package/dist/index313.cjs +1 -1
- package/dist/index313.js +1 -1
- package/dist/index315.cjs +1 -1
- package/dist/index315.js +2 -2
- package/dist/index316.cjs +1 -1
- package/dist/index316.js +1 -1
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +1 -1
- package/dist/index321.cjs +1 -1
- package/dist/index321.js +2 -2
- package/dist/index323.cjs +1 -1
- package/dist/index323.js +1 -1
- package/dist/index327.cjs +1 -1
- package/dist/index327.js +3 -3
- package/dist/index329.cjs +1 -1
- package/dist/index329.js +2 -2
- package/dist/index330.cjs +1 -1
- package/dist/index330.js +1 -1
- package/dist/index331.cjs +1 -1
- package/dist/index331.js +2 -2
- package/dist/index333.cjs +1 -1
- package/dist/index333.js +2 -2
- package/dist/index336.cjs +1 -1
- package/dist/index336.js +1 -1
- package/dist/index337.cjs +1 -1
- package/dist/index337.js +3 -3
- package/dist/index338.cjs +1 -1
- package/dist/index338.js +1 -1
- package/dist/index339.cjs +1 -1
- package/dist/index339.js +1 -1
- package/dist/index340.cjs +1 -1
- package/dist/index340.js +3 -3
- package/dist/index343.cjs +1 -1
- package/dist/index343.js +2 -2
- package/dist/index344.cjs +1 -1
- package/dist/index344.js +3 -3
- package/dist/index345.cjs +1 -1
- package/dist/index345.js +5 -5
- package/dist/index348.cjs +1 -1
- package/dist/index348.js +2 -2
- package/dist/index349.cjs +1 -1
- package/dist/index349.js +4 -4
- package/dist/index350.cjs +1 -1
- package/dist/index350.js +3 -3
- package/dist/index351.cjs +1 -1
- package/dist/index351.js +1 -1
- package/dist/index352.cjs +1 -1
- package/dist/index352.js +3 -3
- package/dist/index353.cjs +1 -1
- package/dist/index353.js +1 -1
- package/dist/index356.cjs +1 -1
- package/dist/index356.js +1 -1
- package/dist/index357.cjs +1 -1
- package/dist/index357.js +5 -5
- package/dist/index358.cjs +1 -1
- package/dist/index358.js +9 -52
- package/dist/index359.cjs +1 -1
- package/dist/index359.js +52 -9
- package/dist/index362.cjs +1 -1
- package/dist/index362.js +2 -2
- package/dist/index364.cjs +1 -1
- package/dist/index364.js +2 -2
- package/dist/index374.cjs +1 -1
- package/dist/index374.js +72 -274
- package/dist/index375.cjs +1 -1
- package/dist/index375.js +32 -171
- package/dist/index376.cjs +1 -1
- package/dist/index376.js +6 -10
- package/dist/index377.cjs +1 -1
- package/dist/index377.js +273 -105
- package/dist/index378.cjs +1 -1
- package/dist/index378.js +171 -6
- package/dist/index379.cjs +1 -1
- package/dist/index379.js +10 -74
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +2 -2
- package/dist/index380.cjs +1 -1
- package/dist/index380.js +107 -9
- package/dist/index381.cjs +1 -1
- package/dist/index381.js +9 -31
- package/dist/index384.cjs +1 -1
- package/dist/index384.js +1 -1
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +2 -2
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +5 -5
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +1 -1
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +1 -1
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +1 -1
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +2 -2
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +1 -1
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +1 -1
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +1 -1
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +1 -1
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +2 -2
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +2 -2
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +1 -1
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +1 -1
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +1 -1
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +1 -1
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +1 -1
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +1 -1
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +2 -2
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +17 -32
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +9 -14
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +32 -17
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +14 -9
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +6 -6
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +3 -3
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +1 -1
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +1 -1
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +2 -2
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +9 -724
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +11 -521
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +18 -12
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +45 -11
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +40 -16
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +166 -40
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +726 -41
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +516 -166
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +1 -1
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +26 -9
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +4 -156
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +7 -5
- package/dist/index90.cjs +1 -3
- package/dist/index90.js +16 -215
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +12 -18
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +9 -10
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +155 -20
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +5 -10
- package/dist/index95.cjs +3 -1
- package/dist/index95.js +215 -9
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +18 -3
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +10 -7
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +21 -5
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +9 -13
- package/package.json +5 -5
package/dist/index149.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index194.cjs"),f=require("./index80.cjs"),m=require("./index73.cjs");async function B(e,{blockHash:o,blockNumber:r,blockTag:l=e.experimental_blockTag??"latest",includeTransactions:i}={}){var c,s,u;const n=i??!1,a=r!==void 0?f.numberToHex(r):void 0;let t=null;if(o?t=await e.request({method:"eth_getBlockByHash",params:[o,n]},{dedupe:!0}):t=await e.request({method:"eth_getBlockByNumber",params:[a||l,n]},{dedupe:!!a}),!t)throw new d.BlockNotFoundError({blockHash:o,blockNumber:r});return(((u=(s=(c=e.chain)==null?void 0:c.formatters)==null?void 0:s.block)==null?void 0:u.format)||m.formatBlock)(t,"getBlock")}exports.getBlock=B;
|
package/dist/index149.js
CHANGED
|
@@ -1,124 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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;
|
|
1
|
+
import { BlockNotFoundError as d } from "./index194.js";
|
|
2
|
+
import { numberToHex as i } from "./index80.js";
|
|
3
|
+
import { formatBlock as l } from "./index73.js";
|
|
4
|
+
async function h(e, { blockHash: t, blockNumber: r, blockTag: u = e.experimental_blockTag ?? "latest", includeTransactions: c } = {}) {
|
|
5
|
+
var m, s, f;
|
|
6
|
+
const a = c ?? !1, n = r !== void 0 ? i(r) : void 0;
|
|
7
|
+
let o = null;
|
|
8
|
+
if (t ? o = await e.request({
|
|
9
|
+
method: "eth_getBlockByHash",
|
|
10
|
+
params: [t, a]
|
|
11
|
+
}, { dedupe: !0 }) : o = await e.request({
|
|
12
|
+
method: "eth_getBlockByNumber",
|
|
13
|
+
params: [n || u, a]
|
|
14
|
+
}, { dedupe: !!n }), !o)
|
|
15
|
+
throw new d({ blockHash: t, blockNumber: r });
|
|
16
|
+
return (((f = (s = (m = e.chain) == null ? void 0 : m.formatters) == null ? void 0 : s.block) == null ? void 0 : f.format) || l)(o, "getBlock");
|
|
121
17
|
}
|
|
122
18
|
export {
|
|
123
|
-
|
|
19
|
+
h as getBlock
|
|
124
20
|
};
|
package/dist/index15.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),r=require("@gardenfi/garden-book"),o=require("./index34.cjs"),g=require("./index7.cjs"),w=require("react-qr-code"),n=require("@gardenfi/orderbook"),f=require("./index35.cjs"),m=require("./index6.cjs"),h=require("./index36.cjs"),A=require("./index12.cjs"),E=require("./index14.cjs"),y=()=>{const{order:e,setIsOpen:l}=E.orderInProgressStore(),{allAssets:i,currentNetwork:d}=g.assetInfoStore(),{depositAddress:c,inputAsset:s,outputAsset:a}=t.useMemo(()=>({depositAddress:e&&n.isBitcoin(e==null?void 0:e.source_swap.chain)?e.source_swap.swap_id:e&&n.isSpark(e==null?void 0:e.source_swap.chain)?e.source_swap.delegate:"",inputAsset:e&&o.getAssetFromSwap(e.source_swap,i),outputAsset:e&&o.getAssetFromSwap(e.destination_swap,i),btcAddress:e?e.destination_swap.delegate:""}),[i,e]),p=t.useCallback(()=>{l(!1)},[l]),u=()=>{e&&window.open(`${A.getApiEndpoint(d).explorer}/order/${e.order_id}`,"_blank")};return e?t.createElement("div",{className:"animate-fade-out flex flex-col gap-3 w-full "},t.createElement("div",{className:"flex items-center justify-between p-1 px-2"},t.createElement(r.Typography,{size:"h4",weight:"medium"},"Swap in progress"),t.createElement("div",{className:"flex items-center justify-center gap-3"},t.createElement(r.CloseIcon,{className:"m-1 h-3 w-3 cursor-pointer",onClick:p}))),t.createElement("div",{className:"flex cursor-pointer flex-col gap-2 rounded-2xl bg-white/50 p-4 hover:bg-white",onClick:u},t.createElement("div",{className:"flex items-center gap-2"},t.createElement(r.Typography,{size:"h5",weight:"medium"},"Transaction"),t.createElement(r.ArrowNorthEastIcon,{className:"h-[10px] w-[10px]"})),s&&a&&t.createElement(h.SwapInfo,{sendAsset:s,receiveAsset:a,sendAmount:o.formatAmount(e.source_swap.amount,s.decimals,s.symbol.includes(m.BTC.symbol)?s.decimals:void 0),receiveAmount:o.formatAmount(e.destination_swap.amount,a.decimals,a.symbol.includes(m.BTC.symbol)?a.decimals:void 0)})),s&&(n.isBitcoin(s.chain)||n.isSpark(s.chain))&&e.status===n.OrderStatus.Created&&t.createElement("div",{className:"flex justify-between rounded-2xl bg-white p-4"},t.createElement("div",{className:"flex flex-col gap-2"},t.createElement(r.Typography,{size:"h5",weight:"medium"},"Deposit address"),t.createElement("div",{className:"flex items-center gap-2"},t.createElement(r.Typography,{size:"h3",weight:"medium"},o.getTrimmedAddress(c,8,6)),t.createElement(f.CopyToClipboard,{text:c}))),t.createElement(w,{value:c,size:48,fgColor:"#554B6A"}))):t.createElement(t.Fragment,null)};exports.SwapInProgress=y;
|
package/dist/index15.js
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Typography as
|
|
3
|
-
import { getAssetFromSwap as
|
|
4
|
-
import { assetInfoStore as
|
|
5
|
-
import
|
|
6
|
-
import { isBitcoin as
|
|
7
|
-
import { CopyToClipboard as
|
|
1
|
+
import t, { useMemo as g, useCallback as h } from "react";
|
|
2
|
+
import { Typography as a, CloseIcon as E, ArrowNorthEastIcon as x } from "@gardenfi/garden-book";
|
|
3
|
+
import { getAssetFromSwap as m, formatAmount as c, getTrimmedAddress as A } from "./index34.js";
|
|
4
|
+
import { assetInfoStore as v } from "./index7.js";
|
|
5
|
+
import b from "react-qr-code";
|
|
6
|
+
import { isBitcoin as l, isSpark as p, OrderStatus as N } from "@gardenfi/orderbook";
|
|
7
|
+
import { CopyToClipboard as _ } from "./index35.js";
|
|
8
8
|
import { BTC as d } from "./index6.js";
|
|
9
9
|
import { SwapInfo as C } from "./index36.js";
|
|
10
10
|
import { getApiEndpoint as y } from "./index12.js";
|
|
11
|
-
import { orderInProgressStore as
|
|
12
|
-
const
|
|
13
|
-
const { order:
|
|
14
|
-
depositAddress:
|
|
15
|
-
inputAsset:
|
|
16
|
-
outputAsset:
|
|
17
|
-
btcAddress:
|
|
18
|
-
}), [
|
|
19
|
-
|
|
20
|
-
}, [
|
|
21
|
-
|
|
22
|
-
`${y(
|
|
11
|
+
import { orderInProgressStore as k } from "./index14.js";
|
|
12
|
+
const D = () => {
|
|
13
|
+
const { order: e, setIsOpen: n } = k(), { allAssets: o, currentNetwork: u } = v(), { depositAddress: i, inputAsset: s, outputAsset: r } = g(() => ({
|
|
14
|
+
depositAddress: e && l(e == null ? void 0 : e.source_swap.chain) ? e.source_swap.swap_id : e && p(e == null ? void 0 : e.source_swap.chain) ? e.source_swap.delegate : "",
|
|
15
|
+
inputAsset: e && m(e.source_swap, o),
|
|
16
|
+
outputAsset: e && m(e.destination_swap, o),
|
|
17
|
+
btcAddress: e ? e.destination_swap.delegate : ""
|
|
18
|
+
}), [o, e]), f = h(() => {
|
|
19
|
+
n(!1);
|
|
20
|
+
}, [n]), w = () => {
|
|
21
|
+
e && window.open(
|
|
22
|
+
`${y(u).explorer}/order/${e.order_id}`,
|
|
23
23
|
"_blank"
|
|
24
24
|
);
|
|
25
25
|
};
|
|
26
|
-
return
|
|
26
|
+
return e ? /* @__PURE__ */ t.createElement("div", { className: "animate-fade-out flex flex-col gap-3 w-full " }, /* @__PURE__ */ t.createElement("div", { className: "flex items-center justify-between p-1 px-2" }, /* @__PURE__ */ t.createElement(a, { size: "h4", weight: "medium" }, "Swap in progress"), /* @__PURE__ */ t.createElement("div", { className: "flex items-center justify-center gap-3" }, /* @__PURE__ */ t.createElement(E, { className: "m-1 h-3 w-3 cursor-pointer", onClick: f }))), /* @__PURE__ */ t.createElement(
|
|
27
27
|
"div",
|
|
28
28
|
{
|
|
29
29
|
className: "flex cursor-pointer flex-col gap-2 rounded-2xl bg-white/50 p-4 hover:bg-white",
|
|
30
|
-
onClick:
|
|
30
|
+
onClick: w
|
|
31
31
|
},
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
s && r && /* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ t.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ t.createElement(a, { size: "h5", weight: "medium" }, "Transaction"), /* @__PURE__ */ t.createElement(x, { className: "h-[10px] w-[10px]" })),
|
|
33
|
+
s && r && /* @__PURE__ */ t.createElement(
|
|
34
34
|
C,
|
|
35
35
|
{
|
|
36
36
|
sendAsset: s,
|
|
37
37
|
receiveAsset: r,
|
|
38
|
-
sendAmount:
|
|
39
|
-
|
|
38
|
+
sendAmount: c(
|
|
39
|
+
e.source_swap.amount,
|
|
40
40
|
s.decimals,
|
|
41
41
|
s.symbol.includes(d.symbol) ? s.decimals : void 0
|
|
42
42
|
),
|
|
43
|
-
receiveAmount:
|
|
44
|
-
|
|
43
|
+
receiveAmount: c(
|
|
44
|
+
e.destination_swap.amount,
|
|
45
45
|
r.decimals,
|
|
46
46
|
r.symbol.includes(d.symbol) ? r.decimals : void 0
|
|
47
47
|
)
|
|
48
48
|
}
|
|
49
49
|
)
|
|
50
|
-
), s &&
|
|
50
|
+
), s && (l(s.chain) || p(s.chain)) && e.status === N.Created && /* @__PURE__ */ t.createElement("div", { className: "flex justify-between rounded-2xl bg-white p-4" }, /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ t.createElement(a, { size: "h5", weight: "medium" }, "Deposit address"), /* @__PURE__ */ t.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ t.createElement(a, { size: "h3", weight: "medium" }, A(i, 8, 6)), /* @__PURE__ */ t.createElement(_, { text: i }))), /* @__PURE__ */ t.createElement(b, { value: i, size: 48, fgColor: "#554B6A" }))) : /* @__PURE__ */ t.createElement(t.Fragment, null);
|
|
51
51
|
};
|
|
52
52
|
export {
|
|
53
|
-
|
|
53
|
+
D as SwapInProgress
|
|
54
54
|
};
|
package/dist/index150.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index242.cjs"),r=e=>`blockNumber.${e}`;async function u(e,{cacheTime:c=e.cacheTime}={}){const t=await o.withCache(()=>e.request({method:"eth_blockNumber"}),{cacheKey:r(e.uid),cacheTime:c});return BigInt(t)}exports.getBlockNumber=u;
|
package/dist/index150.js
CHANGED
|
@@ -1,85 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { concat as A } from "./index81.js";
|
|
9
|
-
import { numberToHex as _ } from "./index82.js";
|
|
10
|
-
import { getContractError as z } from "./index235.js";
|
|
11
|
-
import { getNodeError as I } from "./index271.js";
|
|
12
|
-
import { formatBlock as L } from "./index73.js";
|
|
13
|
-
import { formatLog as V } from "./index105.js";
|
|
14
|
-
import { formatTransactionRequest as Z } from "./index106.js";
|
|
15
|
-
import { serializeStateOverride as j } from "./index276.js";
|
|
16
|
-
import { assertRequest as G } from "./index250.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
|
-
}
|
|
1
|
+
import { withCache as t } from "./index242.js";
|
|
2
|
+
const r = (e) => `blockNumber.${e}`;
|
|
3
|
+
async function u(e, { cacheTime: c = e.cacheTime } = {}) {
|
|
4
|
+
const o = await t(() => e.request({
|
|
5
|
+
method: "eth_blockNumber"
|
|
6
|
+
}), { cacheKey: r(e.uid), cacheTime: c });
|
|
7
|
+
return BigInt(o);
|
|
82
8
|
}
|
|
83
9
|
export {
|
|
84
|
-
|
|
10
|
+
u as getBlockNumber
|
|
85
11
|
};
|
package/dist/index151.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index72.cjs"),s=require("./index80.cjs");async function c(t,{blockHash:o,blockNumber:n,blockTag:u="latest"}={}){const r=n!==void 0?s.numberToHex(n):void 0;let e;return o?e=await t.request({method:"eth_getBlockTransactionCountByHash",params:[o]},{dedupe:!0}):e=await t.request({method:"eth_getBlockTransactionCountByNumber",params:[r||u]},{dedupe:!!r}),a.hexToNumber(e)}exports.getBlockTransactionCount=c;
|
package/dist/index151.js
CHANGED
|
@@ -1,180 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const { blockNumber: N, blockTag: w, calls: C, stateOverrides: B, traceAssetChanges: a, traceTransfers: P, validation: T } = r, t = r.account ? S(r.account) : void 0;
|
|
14
|
-
if (a && !t)
|
|
15
|
-
throw new Y("`account` is required when `traceAssetChanges` is true");
|
|
16
|
-
const v = t ? K(M("constructor(bytes, bytes)"), {
|
|
17
|
-
bytecode: X,
|
|
18
|
-
args: [
|
|
19
|
-
es,
|
|
20
|
-
Q(c("function getBalance(address)"), [t.address])
|
|
21
|
-
]
|
|
22
|
-
}) : void 0, n = a ? await Promise.all(r.calls.map(async (s) => {
|
|
23
|
-
if (!s.data && !s.abi)
|
|
24
|
-
return;
|
|
25
|
-
const { accessList: e } = await _(O, {
|
|
26
|
-
account: t.address,
|
|
27
|
-
...s,
|
|
28
|
-
data: s.abi ? Z(s) : s.data
|
|
29
|
-
});
|
|
30
|
-
return e.map(({ address: o, storageKeys: d }) => d.length > 0 ? o : null);
|
|
31
|
-
})).then((s) => s.flat().filter(Boolean)) : [], i = await ss(O, {
|
|
32
|
-
blockNumber: N,
|
|
33
|
-
blockTag: w,
|
|
34
|
-
blocks: [
|
|
35
|
-
...a ? [
|
|
36
|
-
// ETH pre balances
|
|
37
|
-
{
|
|
38
|
-
calls: [{ data: v }],
|
|
39
|
-
stateOverrides: B
|
|
40
|
-
},
|
|
41
|
-
// Asset pre balances
|
|
42
|
-
{
|
|
43
|
-
calls: n.map((s, e) => ({
|
|
44
|
-
abi: [
|
|
45
|
-
c("function balanceOf(address) returns (uint256)")
|
|
46
|
-
],
|
|
47
|
-
functionName: "balanceOf",
|
|
48
|
-
args: [t.address],
|
|
49
|
-
to: s,
|
|
50
|
-
from: f,
|
|
51
|
-
nonce: e
|
|
52
|
-
})),
|
|
53
|
-
stateOverrides: [
|
|
54
|
-
{
|
|
55
|
-
address: f,
|
|
56
|
-
nonce: 0
|
|
57
|
-
}
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
] : [],
|
|
61
|
-
{
|
|
62
|
-
calls: [...C, {}].map((s) => ({
|
|
63
|
-
...s,
|
|
64
|
-
from: t == null ? void 0 : t.address
|
|
65
|
-
})),
|
|
66
|
-
stateOverrides: B
|
|
67
|
-
},
|
|
68
|
-
...a ? [
|
|
69
|
-
// ETH post balances
|
|
70
|
-
{
|
|
71
|
-
calls: [{ data: v }]
|
|
72
|
-
},
|
|
73
|
-
// Asset post balances
|
|
74
|
-
{
|
|
75
|
-
calls: n.map((s, e) => ({
|
|
76
|
-
abi: [
|
|
77
|
-
c("function balanceOf(address) returns (uint256)")
|
|
78
|
-
],
|
|
79
|
-
functionName: "balanceOf",
|
|
80
|
-
args: [t.address],
|
|
81
|
-
to: s,
|
|
82
|
-
from: f,
|
|
83
|
-
nonce: e
|
|
84
|
-
})),
|
|
85
|
-
stateOverrides: [
|
|
86
|
-
{
|
|
87
|
-
address: f,
|
|
88
|
-
nonce: 0
|
|
89
|
-
}
|
|
90
|
-
]
|
|
91
|
-
},
|
|
92
|
-
// Decimals
|
|
93
|
-
{
|
|
94
|
-
calls: n.map((s, e) => ({
|
|
95
|
-
to: s,
|
|
96
|
-
abi: [
|
|
97
|
-
c("function decimals() returns (uint256)")
|
|
98
|
-
],
|
|
99
|
-
functionName: "decimals",
|
|
100
|
-
from: f,
|
|
101
|
-
nonce: e
|
|
102
|
-
})),
|
|
103
|
-
stateOverrides: [
|
|
104
|
-
{
|
|
105
|
-
address: f,
|
|
106
|
-
nonce: 0
|
|
107
|
-
}
|
|
108
|
-
]
|
|
109
|
-
},
|
|
110
|
-
// Token URI
|
|
111
|
-
{
|
|
112
|
-
calls: n.map((s, e) => ({
|
|
113
|
-
to: s,
|
|
114
|
-
abi: [
|
|
115
|
-
c("function tokenURI(uint256) returns (string)")
|
|
116
|
-
],
|
|
117
|
-
functionName: "tokenURI",
|
|
118
|
-
args: [0n],
|
|
119
|
-
from: f,
|
|
120
|
-
nonce: e
|
|
121
|
-
})),
|
|
122
|
-
stateOverrides: [
|
|
123
|
-
{
|
|
124
|
-
address: f,
|
|
125
|
-
nonce: 0
|
|
126
|
-
}
|
|
127
|
-
]
|
|
128
|
-
},
|
|
129
|
-
// Symbols
|
|
130
|
-
{
|
|
131
|
-
calls: n.map((s, e) => ({
|
|
132
|
-
to: s,
|
|
133
|
-
abi: [c("function symbol() returns (string)")],
|
|
134
|
-
functionName: "symbol",
|
|
135
|
-
from: f,
|
|
136
|
-
nonce: e
|
|
137
|
-
})),
|
|
138
|
-
stateOverrides: [
|
|
139
|
-
{
|
|
140
|
-
address: f,
|
|
141
|
-
nonce: 0
|
|
142
|
-
}
|
|
143
|
-
]
|
|
144
|
-
}
|
|
145
|
-
] : []
|
|
146
|
-
],
|
|
147
|
-
traceTransfers: P,
|
|
148
|
-
validation: T
|
|
149
|
-
}), I = a ? i[2] : i[0], [l, u, , b, m, p, g, y] = a ? i : [], { calls: D, ...R } = I, U = D.slice(0, -1) ?? [], E = (l == null ? void 0 : l.calls) ?? [], L = (u == null ? void 0 : u.calls) ?? [], q = [...E, ...L].map((s) => s.status === "success" ? A(s.data) : null), z = (b == null ? void 0 : b.calls) ?? [], F = (m == null ? void 0 : m.calls) ?? [], H = [...z, ...F].map((s) => s.status === "success" ? A(s.data) : null), V = ((p == null ? void 0 : p.calls) ?? []).map((s) => s.status === "success" ? s.result : null), $ = ((y == null ? void 0 : y.calls) ?? []).map((s) => s.status === "success" ? s.result : null), j = ((g == null ? void 0 : g.calls) ?? []).map((s) => s.status === "success" ? s.result : null), h = [];
|
|
150
|
-
for (const [s, e] of H.entries()) {
|
|
151
|
-
const o = q[s];
|
|
152
|
-
if (typeof e != "bigint" || typeof o != "bigint")
|
|
153
|
-
continue;
|
|
154
|
-
const d = V[s - 1], x = $[s - 1], G = j[s - 1], k = s === 0 ? {
|
|
155
|
-
address: W,
|
|
156
|
-
decimals: 18,
|
|
157
|
-
symbol: "ETH"
|
|
158
|
-
} : {
|
|
159
|
-
address: n[s - 1],
|
|
160
|
-
decimals: G || d ? Number(d ?? 1) : void 0,
|
|
161
|
-
symbol: x ?? void 0
|
|
162
|
-
};
|
|
163
|
-
h.some((J) => J.token.address === k.address) || h.push({
|
|
164
|
-
token: k,
|
|
165
|
-
value: {
|
|
166
|
-
pre: o,
|
|
167
|
-
post: e,
|
|
168
|
-
diff: e - o
|
|
169
|
-
}
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
return {
|
|
173
|
-
assetChanges: h,
|
|
174
|
-
block: R,
|
|
175
|
-
results: U
|
|
176
|
-
};
|
|
1
|
+
import { hexToNumber as u } from "./index72.js";
|
|
2
|
+
import { numberToHex as m } from "./index80.js";
|
|
3
|
+
async function i(t, { blockHash: o, blockNumber: n, blockTag: a = "latest" } = {}) {
|
|
4
|
+
const r = n !== void 0 ? m(n) : void 0;
|
|
5
|
+
let e;
|
|
6
|
+
return o ? e = await t.request({
|
|
7
|
+
method: "eth_getBlockTransactionCountByHash",
|
|
8
|
+
params: [o]
|
|
9
|
+
}, { dedupe: !0 }) : e = await t.request({
|
|
10
|
+
method: "eth_getBlockTransactionCountByNumber",
|
|
11
|
+
params: [r || a]
|
|
12
|
+
}, { dedupe: !!r }), u(e);
|
|
177
13
|
}
|
|
178
14
|
export {
|
|
179
|
-
|
|
15
|
+
i as getBlockTransactionCount
|
|
180
16
|
};
|
package/dist/index152.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index72.cjs");async function r(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return n.hexToNumber(t)}exports.getChainId=r;
|
package/dist/index152.js
CHANGED
|
@@ -1,47 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
async function R(s, m) {
|
|
8
|
-
const { abi: o, address: n, args: a, dataSuffix: e, functionName: c, ...r } = m, t = r.account ? p(r.account) : s.account, u = x({ abi: o, args: a, functionName: c });
|
|
9
|
-
try {
|
|
10
|
-
const { data: i } = await g(s, A, "call")({
|
|
11
|
-
batch: !1,
|
|
12
|
-
data: `${u}${e ? e.replace("0x", "") : ""}`,
|
|
13
|
-
to: n,
|
|
14
|
-
...r,
|
|
15
|
-
account: t
|
|
16
|
-
}), l = h({
|
|
17
|
-
abi: o,
|
|
18
|
-
args: a,
|
|
19
|
-
functionName: c,
|
|
20
|
-
data: i || "0x"
|
|
21
|
-
}), f = o.filter((d) => "name" in d && d.name === m.functionName);
|
|
22
|
-
return {
|
|
23
|
-
result: l,
|
|
24
|
-
request: {
|
|
25
|
-
abi: f,
|
|
26
|
-
address: n,
|
|
27
|
-
args: a,
|
|
28
|
-
dataSuffix: e,
|
|
29
|
-
functionName: c,
|
|
30
|
-
...r,
|
|
31
|
-
account: t
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
} catch (i) {
|
|
35
|
-
throw b(i, {
|
|
36
|
-
abi: o,
|
|
37
|
-
address: n,
|
|
38
|
-
args: a,
|
|
39
|
-
docsPath: "/docs/contract/simulateContract",
|
|
40
|
-
functionName: c,
|
|
41
|
-
sender: t == null ? void 0 : t.address
|
|
42
|
-
});
|
|
43
|
-
}
|
|
1
|
+
import { hexToNumber as n } from "./index72.js";
|
|
2
|
+
async function o(e) {
|
|
3
|
+
const t = await e.request({
|
|
4
|
+
method: "eth_chainId"
|
|
5
|
+
}, { dedupe: !0 });
|
|
6
|
+
return n(t);
|
|
44
7
|
}
|
|
45
8
|
export {
|
|
46
|
-
|
|
9
|
+
o as getChainId
|
|
47
10
|
};
|