@gardenfi/swap 0.1.1 → 0.1.2
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/index102.cjs +1 -1
- package/dist/index102.js +2 -2
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +2 -2
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +6 -6
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +2 -2
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +76 -37
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +3 -34
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +32 -3
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +115 -9
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +4 -117
- package/dist/index114.cjs +1 -1
- package/dist/index114.js +14 -60
- package/dist/index115.cjs +1 -1
- package/dist/index115.js +11 -24
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +17 -35
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +58 -41
- package/dist/index118.cjs +1 -1
- package/dist/index118.js +19 -57
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +14 -41
- package/dist/index120.cjs +1 -1
- package/dist/index120.js +283 -8
- package/dist/index121.cjs +1 -1
- package/dist/index121.js +569 -27
- package/dist/index122.cjs +1 -1
- package/dist/index122.js +32 -35
- package/dist/index123.cjs +1 -1
- package/dist/index123.js +3 -9
- package/dist/index124.cjs +1 -1
- package/dist/index124.js +8 -28
- package/dist/index125.cjs +1 -1
- package/dist/index125.js +114 -48
- package/dist/index126.cjs +1 -1
- package/dist/index126.js +58 -67
- package/dist/index127.cjs +1 -1
- package/dist/index127.js +20 -37
- package/dist/index128.cjs +1 -1
- package/dist/index128.js +32 -73
- package/dist/index129.cjs +1 -1
- package/dist/index129.js +40 -7
- package/dist/index130.cjs +1 -1
- package/dist/index130.js +58 -6
- package/dist/index131.cjs +1 -1
- package/dist/index131.js +40 -17
- package/dist/index132.cjs +1 -1
- package/dist/index132.js +9 -8
- package/dist/index133.cjs +1 -1
- package/dist/index133.js +31 -13
- package/dist/index134.cjs +1 -1
- package/dist/index134.js +36 -7
- package/dist/index135.cjs +1 -1
- package/dist/index135.js +8 -15
- package/dist/index136.cjs +1 -1
- package/dist/index136.js +25 -42
- package/dist/index137.cjs +1 -1
- package/dist/index137.js +50 -13
- package/dist/index138.cjs +1 -1
- package/dist/index138.js +70 -16
- package/dist/index139.cjs +1 -1
- package/dist/index139.js +41 -13
- package/dist/index140.cjs +1 -1
- package/dist/index140.js +77 -6
- package/dist/index141.cjs +1 -1
- package/dist/index141.js +7 -34
- package/dist/index142.cjs +1 -1
- package/dist/index142.js +5 -8
- package/dist/index143.cjs +1 -1
- package/dist/index143.js +17 -8
- package/dist/index144.cjs +1 -1
- package/dist/index144.js +8 -29
- package/dist/index145.cjs +1 -1
- package/dist/index145.js +13 -10
- package/dist/index146.cjs +1 -1
- package/dist/index146.js +7 -14
- package/dist/index147.cjs +1 -1
- package/dist/index147.js +16 -12
- package/dist/index148.cjs +1 -1
- package/dist/index148.js +45 -120
- package/dist/index149.cjs +1 -1
- package/dist/index149.js +13 -82
- package/dist/index150.cjs +1 -1
- package/dist/index150.js +16 -177
- package/dist/index151.cjs +1 -1
- package/dist/index151.js +13 -44
- package/dist/index152.cjs +1 -1
- package/dist/index152.js +5 -5
- package/dist/index153.cjs +1 -1
- package/dist/index153.js +34 -13
- package/dist/index154.cjs +1 -1
- package/dist/index154.js +8 -13
- package/dist/index155.cjs +1 -1
- package/dist/index155.js +8 -103
- package/dist/index156.cjs +1 -1
- package/dist/index156.js +28 -74
- package/dist/index157.cjs +1 -1
- package/dist/index157.js +10 -89
- package/dist/index158.cjs +1 -1
- package/dist/index158.js +14 -151
- package/dist/index159.cjs +1 -1
- package/dist/index159.js +12 -138
- package/dist/index160.cjs +1 -1
- package/dist/index160.js +116 -64
- package/dist/index161.cjs +1 -1
- package/dist/index161.js +82 -23
- package/dist/index162.cjs +1 -1
- package/dist/index162.js +174 -161
- package/dist/index163.cjs +1 -1
- package/dist/index163.js +44 -6
- package/dist/index164.cjs +1 -1
- package/dist/index164.js +6 -13
- package/dist/index165.cjs +1 -1
- package/dist/index165.js +14 -19
- package/dist/index166.cjs +1 -1
- package/dist/index166.js +14 -106
- package/dist/index167.cjs +1 -1
- package/dist/index167.js +103 -78
- package/dist/index168.cjs +1 -1
- package/dist/index168.js +74 -8
- package/dist/index169.cjs +1 -1
- package/dist/index169.js +87 -26
- package/dist/index170.cjs +1 -1
- package/dist/index170.js +146 -85
- package/dist/index171.cjs +1 -1
- package/dist/index171.js +139 -3
- package/dist/index172.cjs +1 -1
- package/dist/index172.js +70 -2
- package/dist/index173.cjs +1 -2
- package/dist/index173.js +24 -3
- package/dist/index174.cjs +1 -1
- package/dist/index174.js +165 -9
- package/dist/index175.cjs +1 -20
- package/dist/index175.js +6 -326
- package/dist/index176.cjs +1 -1
- package/dist/index176.js +13 -13
- package/dist/index177.cjs +1 -2
- package/dist/index177.js +19 -59
- package/dist/index178.cjs +1 -1
- package/dist/index178.js +107 -2
- package/dist/index179.cjs +1 -1
- package/dist/index179.js +77 -6
- package/dist/index180.cjs +1 -1
- package/dist/index180.js +10 -32
- package/dist/index181.cjs +1 -1
- package/dist/index181.js +25 -18
- package/dist/index182.cjs +1 -1
- package/dist/index182.js +90 -5
- package/dist/index183.cjs +1 -1
- package/dist/index183.js +3 -74
- package/dist/index184.cjs +1 -1
- package/dist/index184.js +2 -6
- package/dist/index185.cjs +2 -1
- package/dist/index185.js +3 -6
- package/dist/index186.cjs +1 -9
- package/dist/index186.js +9 -36
- package/dist/index187.cjs +20 -2
- package/dist/index187.js +296 -90
- package/dist/index188.cjs +1 -1
- package/dist/index188.js +14 -3
- package/dist/index189.cjs +2 -1
- package/dist/index189.js +56 -15
- package/dist/index190.cjs +1 -1
- package/dist/index190.js +2 -34
- package/dist/index191.cjs +1 -1
- package/dist/index191.js +6 -34
- package/dist/index192.cjs +1 -1
- package/dist/index192.js +32 -24
- package/dist/index193.cjs +1 -1
- package/dist/index193.js +20 -7
- package/dist/index194.cjs +1 -4
- package/dist/index194.js +5 -194
- package/dist/index195.cjs +1 -1
- package/dist/index195.js +74 -2
- package/dist/index196.cjs +1 -3
- package/dist/index196.js +5 -451
- package/dist/index197.cjs +1 -1
- package/dist/index197.js +5 -27
- package/dist/index198.cjs +9 -1
- package/dist/index198.js +28 -154
- package/dist/index199.cjs +2 -1
- package/dist/index199.js +119 -126
- package/dist/index200.cjs +1 -1
- package/dist/index200.js +3 -39
- package/dist/index201.cjs +1 -1
- package/dist/index201.js +16 -25
- package/dist/index202.cjs +1 -1
- package/dist/index202.js +29 -51
- package/dist/index203.cjs +1 -1
- package/dist/index203.js +33 -189
- package/dist/index204.cjs +1 -1
- package/dist/index204.js +24 -4
- package/dist/index205.cjs +1 -1
- package/dist/index205.js +6 -71
- package/dist/index206.cjs +4 -1
- package/dist/index206.js +188 -14
- package/dist/index207.cjs +1 -1
- package/dist/index207.js +2 -3
- package/dist/index208.cjs +3 -1
- package/dist/index208.js +451 -16
- package/dist/index209.cjs +1 -1
- package/dist/index209.js +26 -22
- package/dist/index210.cjs +1 -1
- package/dist/index210.js +158 -31
- package/dist/index211.cjs +1 -1
- package/dist/index211.js +128 -3
- package/dist/index212.cjs +1 -1
- package/dist/index212.js +38 -27
- package/dist/index213.cjs +1 -1
- package/dist/index213.js +26 -35
- package/dist/index214.cjs +1 -1
- package/dist/index214.js +55 -8
- package/dist/index215.cjs +1 -1
- package/dist/index215.js +186 -20
- package/dist/index216.cjs +1 -1
- package/dist/index216.js +4 -29
- package/dist/index217.cjs +1 -1
- package/dist/index217.js +70 -72
- package/dist/index218.cjs +1 -1
- package/dist/index218.js +17 -18
- package/dist/index219.cjs +1 -1
- package/dist/index219.js +3 -9
- package/dist/index220.cjs +1 -1
- package/dist/index220.js +16 -10
- package/dist/index221.cjs +1 -1
- package/dist/index221.js +23 -11
- package/dist/index222.cjs +1 -1
- package/dist/index222.js +34 -6
- package/dist/index223.cjs +1 -1
- package/dist/index223.js +3 -7
- package/dist/index224.cjs +1 -1
- package/dist/index224.js +27 -13
- package/dist/index225.cjs +1 -1
- package/dist/index225.js +35 -31
- package/dist/index226.cjs +1 -1
- package/dist/index226.js +9 -5
- package/dist/index227.cjs +1 -1
- package/dist/index227.js +23 -35
- package/dist/index228.cjs +1 -1
- package/dist/index228.js +27 -110
- package/dist/index229.cjs +1 -1
- package/dist/index229.js +73 -47
- package/dist/index230.cjs +1 -1
- package/dist/index230.js +20 -31
- package/dist/index231.cjs +1 -1
- package/dist/index231.js +8 -8
- package/dist/index232.cjs +1 -1
- package/dist/index232.js +10 -7
- package/dist/index233.cjs +1 -1
- package/dist/index233.js +11 -16
- package/dist/index234.cjs +1 -1
- package/dist/index234.js +6 -22
- package/dist/index235.cjs +1 -1
- package/dist/index235.js +6 -104
- package/dist/index236.cjs +1 -1
- package/dist/index236.js +14 -3
- package/dist/index237.cjs +1 -1
- package/dist/index237.js +32 -5
- package/dist/index238.cjs +1 -1
- package/dist/index238.js +5 -32
- package/dist/index239.cjs +1 -1
- package/dist/index239.js +37 -20
- package/dist/index240.cjs +1 -1
- package/dist/index240.js +111 -3
- package/dist/index241.cjs +1 -1
- package/dist/index241.js +49 -17
- package/dist/index242.cjs +1 -1
- package/dist/index242.js +32 -5
- package/dist/index243.cjs +1 -1
- package/dist/index243.js +8 -8
- package/dist/index244.cjs +1 -1
- package/dist/index244.js +7 -103
- package/dist/index245.cjs +1 -1
- package/dist/index245.js +15 -63
- package/dist/index246.cjs +1 -1
- package/dist/index246.js +22 -6
- package/dist/index247.cjs +1 -1
- package/dist/index247.js +102 -25
- package/dist/index248.cjs +1 -1
- package/dist/index248.js +3 -35
- package/dist/index249.cjs +1 -1
- package/dist/index249.js +5 -16
- package/dist/index250.cjs +1 -1
- package/dist/index250.js +29 -76
- package/dist/index251.cjs +1 -1
- package/dist/index251.js +21 -2
- package/dist/index252.cjs +1 -1
- package/dist/index252.js +3 -14
- package/dist/index253.cjs +1 -1
- package/dist/index253.js +17 -18
- package/dist/index254.cjs +1 -1
- package/dist/index254.js +5 -17
- package/dist/index255.cjs +1 -1
- package/dist/index255.js +8 -10
- package/dist/index256.cjs +1 -1
- package/dist/index256.js +100 -76
- package/dist/index257.cjs +1 -1
- package/dist/index257.js +65 -3
- package/dist/index258.cjs +1 -1
- package/dist/index258.js +6 -32
- package/dist/index259.cjs +1 -1
- package/dist/index259.js +26 -114
- package/dist/index260.cjs +1 -1
- package/dist/index260.js +35 -4
- package/dist/index261.cjs +1 -1
- package/dist/index261.js +16 -15
- package/dist/index262.cjs +1 -1
- package/dist/index262.js +77 -10
- package/dist/index263.cjs +1 -1
- package/dist/index263.js +2 -19
- package/dist/index264.cjs +1 -1
- package/dist/index264.js +14 -58
- package/dist/index265.cjs +1 -1
- package/dist/index265.js +17 -19
- package/dist/index266.cjs +1 -1
- package/dist/index266.js +18 -14
- package/dist/index267.cjs +1 -1
- package/dist/index267.js +10 -284
- package/dist/index268.cjs +1 -1
- package/dist/index268.js +37 -570
- package/dist/index269.cjs +1 -1
- package/dist/index269.js +1 -1
- package/dist/index270.cjs +1 -1
- package/dist/index270.js +2 -2
- package/dist/index275.cjs +1 -1
- package/dist/index275.js +2 -2
- package/dist/index300.cjs +1 -1
- package/dist/index300.js +1 -1
- package/dist/index303.cjs +1 -1
- package/dist/index303.js +43 -10
- package/dist/index304.cjs +1 -1
- package/dist/index304.js +320 -16
- package/dist/index305.cjs +1 -1
- package/dist/index305.js +604 -21
- package/dist/index306.cjs +1 -1
- package/dist/index306.js +110 -14
- package/dist/index307.cjs +1 -1
- package/dist/index307.js +167 -13
- package/dist/index308.cjs +1 -1
- package/dist/index308.js +300 -13
- package/dist/index309.cjs +1 -1
- package/dist/index309.js +93 -9
- package/dist/index310.cjs +1 -1
- package/dist/index310.js +54 -13
- package/dist/index311.cjs +1 -1
- package/dist/index311.js +51 -23
- package/dist/index312.cjs +1 -1
- package/dist/index312.js +43 -30
- package/dist/index313.cjs +1 -2
- package/dist/index313.js +15 -18
- package/dist/index314.cjs +1 -1
- package/dist/index314.js +317 -14
- package/dist/index315.cjs +1 -1
- package/dist/index315.js +59 -11
- package/dist/index316.cjs +1 -1
- package/dist/index316.js +19 -12
- package/dist/index317.cjs +1 -1
- package/dist/index317.js +27 -31
- package/dist/index318.cjs +1 -1
- package/dist/index318.js +3 -115
- package/dist/index319.cjs +7 -1
- package/dist/index319.js +229 -95
- package/dist/index320.cjs +1 -1
- package/dist/index320.js +48 -7
- package/dist/index321.cjs +1 -1
- package/dist/index321.js +213 -7
- package/dist/index322.cjs +1 -1
- package/dist/index322.js +76 -21
- package/dist/index323.cjs +1 -1
- package/dist/index323.js +28 -15
- package/dist/index324.cjs +1 -1
- package/dist/index324.js +71 -209
- package/dist/index325.cjs +1 -1
- package/dist/index325.js +10 -43
- package/dist/index326.cjs +1 -1
- package/dist/index326.js +16 -320
- package/dist/index327.cjs +1 -1
- package/dist/index327.js +21 -604
- package/dist/index328.cjs +1 -1
- package/dist/index328.js +14 -110
- package/dist/index329.cjs +1 -1
- package/dist/index329.js +13 -167
- package/dist/index330.cjs +1 -1
- package/dist/index330.js +13 -300
- package/dist/index331.cjs +1 -1
- package/dist/index331.js +9 -93
- package/dist/index332.cjs +1 -1
- package/dist/index332.js +13 -54
- package/dist/index333.cjs +1 -1
- package/dist/index333.js +23 -51
- package/dist/index334.cjs +1 -1
- package/dist/index334.js +30 -43
- package/dist/index335.cjs +2 -1
- package/dist/index335.js +18 -15
- package/dist/index336.cjs +1 -1
- package/dist/index336.js +14 -317
- package/dist/index337.cjs +1 -1
- package/dist/index337.js +11 -59
- package/dist/index338.cjs +1 -1
- package/dist/index338.js +12 -19
- package/dist/index339.cjs +1 -1
- package/dist/index339.js +31 -27
- package/dist/index340.cjs +1 -1
- package/dist/index340.js +115 -3
- package/dist/index341.cjs +1 -7
- package/dist/index341.js +95 -229
- package/dist/index342.cjs +1 -1
- package/dist/index342.js +7 -48
- package/dist/index343.cjs +1 -1
- package/dist/index343.js +7 -213
- package/dist/index344.cjs +1 -1
- package/dist/index344.js +21 -76
- package/dist/index345.cjs +1 -1
- package/dist/index345.js +15 -28
- package/dist/index346.cjs +1 -1
- package/dist/index346.js +209 -71
- package/dist/index347.cjs +1 -1
- package/dist/index347.js +1 -1
- package/dist/index356.cjs +1 -1
- package/dist/index356.js +2 -2
- package/dist/index361.cjs +1 -1
- package/dist/index361.js +94 -3
- package/dist/index362.cjs +1 -1
- package/dist/index362.js +25 -137
- package/dist/index363.cjs +1 -1
- package/dist/index363.js +144 -129
- package/dist/index364.cjs +1 -1
- package/dist/index364.js +350 -74
- package/dist/index365.cjs +1 -1
- package/dist/index365.js +74 -2
- package/dist/index366.cjs +1 -1
- package/dist/index366.js +29 -40
- package/dist/index367.cjs +1 -1
- package/dist/index367.js +5 -657
- package/dist/index368.cjs +1 -1
- package/dist/index368.js +3 -177
- package/dist/index369.cjs +1 -1
- package/dist/index369.js +137 -91
- package/dist/index370.cjs +1 -1
- package/dist/index370.js +273 -26
- package/dist/index371.cjs +1 -1
- package/dist/index371.js +170 -148
- package/dist/index372.cjs +1 -1
- package/dist/index372.js +10 -355
- package/dist/index373.cjs +1 -1
- package/dist/index373.js +104 -70
- package/dist/index374.cjs +1 -1
- package/dist/index374.js +9 -31
- package/dist/index375.cjs +1 -1
- package/dist/index375.js +133 -5
- package/dist/index376.cjs +1 -1
- package/dist/index376.js +75 -272
- package/dist/index377.cjs +1 -1
- package/dist/index377.js +2 -171
- package/dist/index378.cjs +1 -1
- package/dist/index378.js +43 -10
- package/dist/index379.cjs +1 -1
- package/dist/index379.js +649 -99
- package/dist/index380.cjs +1 -1
- package/dist/index380.js +176 -8
- package/dist/index383.cjs +1 -1
- package/dist/index383.js +106 -59
- package/dist/index384.cjs +1 -1
- package/dist/index384.js +3 -110
- package/dist/index385.cjs +1 -1
- package/dist/index385.js +63 -3
- package/dist/index386.cjs +1 -1
- package/dist/index386.js +2 -2
- 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/index67.cjs +1 -1
- package/dist/index67.js +1 -1
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +10 -10
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +15 -15
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +1 -1
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +1 -1
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +1 -1
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +3 -3
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +9 -9
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +1 -1
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +1 -1
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +13 -13
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +2 -2
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +2 -2
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +3 -3
- package/dist/src/lib/store/swapStore.d.ts +1 -1
- package/package.json +4 -4
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 o=require("./index81.cjs"),a=require("./index331.cjs");async function y(r,{blockCount:i,blockNumber:e,blockTag:n="latest",rewardPercentiles:s}){const t=typeof e=="bigint"?o.numberToHex(e):void 0,u=await r.request({method:"eth_feeHistory",params:[o.numberToHex(i),t||n,s]},{dedupe:!!t});return a.formatFeeHistory(u)}exports.getFeeHistory=y;
|
package/dist/index149.js
CHANGED
|
@@ -1,85 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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 "./index249.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 { numberToHex as o } from "./index81.js";
|
|
2
|
+
import { formatFeeHistory as f } from "./index331.js";
|
|
3
|
+
async function u(r, { blockCount: i, blockNumber: e, blockTag: n = "latest", rewardPercentiles: s }) {
|
|
4
|
+
const t = typeof e == "bigint" ? o(e) : void 0, a = await r.request({
|
|
5
|
+
method: "eth_feeHistory",
|
|
6
|
+
params: [
|
|
7
|
+
o(i),
|
|
8
|
+
t || n,
|
|
9
|
+
s
|
|
10
|
+
]
|
|
11
|
+
}, { dedupe: !!t });
|
|
12
|
+
return f(a);
|
|
82
13
|
}
|
|
83
14
|
export {
|
|
84
|
-
|
|
15
|
+
u as getFeeHistory
|
|
85
16
|
};
|
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 r=require("./index229.cjs"),a=require("./index90.cjs");async function i(g,{filter:t}){const n="strict"in t&&t.strict,e=await t.request({method:"eth_getFilterChanges",params:[t.id]});if(typeof e[0]=="string")return e;const s=e.map(o=>a.formatLog(o));return!("abi"in t)||!t.abi?s:r.parseEventLogs({abi:t.abi,logs:s,strict:n})}exports.getFilterChanges=i;
|
package/dist/index150.js
CHANGED
|
@@ -1,180 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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 { parseEventLogs as a } from "./index229.js";
|
|
2
|
+
import { formatLog as i } from "./index90.js";
|
|
3
|
+
async function m(e, { filter: t }) {
|
|
4
|
+
const n = "strict" in t && t.strict, o = await t.request({
|
|
5
|
+
method: "eth_getFilterChanges",
|
|
6
|
+
params: [t.id]
|
|
7
|
+
});
|
|
8
|
+
if (typeof o[0] == "string")
|
|
9
|
+
return o;
|
|
10
|
+
const s = o.map((r) => i(r));
|
|
11
|
+
return !("abi" in t) || !t.abi ? s : a({
|
|
12
|
+
abi: t.abi,
|
|
13
|
+
logs: s,
|
|
14
|
+
strict: n
|
|
15
|
+
});
|
|
177
16
|
}
|
|
178
17
|
export {
|
|
179
|
-
|
|
18
|
+
m as getFilterChanges
|
|
180
19
|
};
|
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 r=require("./index229.cjs"),a=require("./index90.cjs");async function g(n,{filter:t}){const o=t.strict??!1,e=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(s=>a.formatLog(s));return t.abi?r.parseEventLogs({abi:t.abi,logs:e,strict:o}):e}exports.getFilterLogs=g;
|
package/dist/index151.js
CHANGED
|
@@ -1,47 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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 { parseEventLogs as a } from "./index229.js";
|
|
2
|
+
import { formatLog as e } from "./index90.js";
|
|
3
|
+
async function c(g, { filter: t }) {
|
|
4
|
+
const s = t.strict ?? !1, o = (await t.request({
|
|
5
|
+
method: "eth_getFilterLogs",
|
|
6
|
+
params: [t.id]
|
|
7
|
+
})).map((r) => e(r));
|
|
8
|
+
return t.abi ? a({
|
|
9
|
+
abi: t.abi,
|
|
10
|
+
logs: o,
|
|
11
|
+
strict: s
|
|
12
|
+
}) : o;
|
|
44
13
|
}
|
|
45
14
|
export {
|
|
46
|
-
|
|
15
|
+
c as getFilterLogs
|
|
47
16
|
};
|
package/dist/index152.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});async function e
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});async function r(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}exports.getGasPrice=r;
|
package/dist/index152.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
async function e
|
|
2
|
-
|
|
3
|
-
method: "
|
|
4
|
-
params: [t.id]
|
|
1
|
+
async function r(e) {
|
|
2
|
+
const t = await e.request({
|
|
3
|
+
method: "eth_gasPrice"
|
|
5
4
|
});
|
|
5
|
+
return BigInt(t);
|
|
6
6
|
}
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
r as getGasPrice
|
|
9
9
|
};
|
package/dist/index153.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 l=require("./index225.cjs"),q=require("./index229.cjs"),m=require("./index81.cjs"),y=require("./index90.cjs");async function T(i,{address:a,blockHash:g,fromBlock:o,toBlock:s,event:n,events:c,args:u,strict:L}={}){const b=L??!1,t=c??(n?[n]:void 0);let e=[];t&&(e=[t.flatMap(p=>l.encodeEventTopics({abi:[p],eventName:p.name,args:c?void 0:u}))],n&&(e=e[0]));let r;g?r=await i.request({method:"eth_getLogs",params:[{address:a,topics:e,blockHash:g}]}):r=await i.request({method:"eth_getLogs",params:[{address:a,topics:e,fromBlock:typeof o=="bigint"?m.numberToHex(o):o,toBlock:typeof s=="bigint"?m.numberToHex(s):s}]});const d=r.map(f=>y.formatLog(f));return t?q.parseEventLogs({abi:t,args:u,logs:d,strict:b}):d}exports.getLogs=T;
|
package/dist/index153.js
CHANGED
|
@@ -1,17 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { encodeEventTopics as h } from "./index225.js";
|
|
2
|
+
import { parseEventLogs as l } from "./index229.js";
|
|
3
|
+
import { numberToHex as u } from "./index81.js";
|
|
4
|
+
import { formatLog as y } from "./index90.js";
|
|
5
|
+
async function T(n, { address: a, blockHash: m, fromBlock: o, toBlock: i, event: r, events: f, args: g, strict: L } = {}) {
|
|
6
|
+
const b = L ?? !1, e = f ?? (r ? [r] : void 0);
|
|
7
|
+
let t = [];
|
|
8
|
+
e && (t = [e.flatMap((c) => h({
|
|
9
|
+
abi: [c],
|
|
10
|
+
eventName: c.name,
|
|
11
|
+
args: f ? void 0 : g
|
|
12
|
+
}))], r && (t = t[0]));
|
|
13
|
+
let s;
|
|
14
|
+
m ? s = await n.request({
|
|
15
|
+
method: "eth_getLogs",
|
|
16
|
+
params: [{ address: a, topics: t, blockHash: m }]
|
|
17
|
+
}) : s = await n.request({
|
|
18
|
+
method: "eth_getLogs",
|
|
19
|
+
params: [
|
|
20
|
+
{
|
|
21
|
+
address: a,
|
|
22
|
+
topics: t,
|
|
23
|
+
fromBlock: typeof o == "bigint" ? u(o) : o,
|
|
24
|
+
toBlock: typeof i == "bigint" ? u(i) : i
|
|
25
|
+
}
|
|
26
|
+
]
|
|
13
27
|
});
|
|
28
|
+
const p = s.map((d) => y(d));
|
|
29
|
+
return e ? l({
|
|
30
|
+
abi: e,
|
|
31
|
+
args: g,
|
|
32
|
+
logs: p,
|
|
33
|
+
strict: b
|
|
34
|
+
}) : p;
|
|
14
35
|
}
|
|
15
36
|
export {
|
|
16
|
-
|
|
37
|
+
T as getLogs
|
|
17
38
|
};
|
package/dist/index154.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 s=require("./index81.cjs"),u=require("./index332.cjs");async function i(o,{address:t,blockNumber:e,blockTag:r,storageKeys:n}){const a=r??"latest",c=e!==void 0?s.numberToHex(e):void 0,f=await o.request({method:"eth_getProof",params:[t,n,c||a]});return u.formatProof(f)}exports.getProof=i;
|
package/dist/index154.js
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
address: r,
|
|
8
|
-
factory: e,
|
|
9
|
-
factoryData: o,
|
|
10
|
-
hash: n,
|
|
11
|
-
signature: s,
|
|
12
|
-
...m
|
|
1
|
+
import { numberToHex as c } from "./index81.js";
|
|
2
|
+
import { formatProof as s } from "./index332.js";
|
|
3
|
+
async function d(t, { address: e, blockNumber: o, blockTag: r, storageKeys: n }) {
|
|
4
|
+
const f = r ?? "latest", a = o !== void 0 ? c(o) : void 0, m = await t.request({
|
|
5
|
+
method: "eth_getProof",
|
|
6
|
+
params: [e, n, a || f]
|
|
13
7
|
});
|
|
8
|
+
return s(m);
|
|
14
9
|
}
|
|
15
10
|
export {
|
|
16
|
-
|
|
11
|
+
d as getProof
|
|
17
12
|
};
|
package/dist/index155.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 u=require("./index81.cjs");async function d(t,{address:a,blockNumber:e,blockTag:n="latest",slot:o}){const r=e!==void 0?u.numberToHex(e):void 0;return await t.request({method:"eth_getStorageAt",params:[a,o,r||n]})}exports.getStorageAt=d;
|
package/dist/index155.js
CHANGED
|
@@ -1,106 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { getBlock as J } from "./index131.js";
|
|
9
|
-
import { getTransaction as K } from "./index144.js";
|
|
10
|
-
import { getTransactionReceipt as y } from "./index147.js";
|
|
11
|
-
import { watchBlockNumber as L } from "./index156.js";
|
|
12
|
-
async function er(t, b) {
|
|
13
|
-
const {
|
|
14
|
-
checkReplacement: F = !0,
|
|
15
|
-
confirmations: a = 1,
|
|
16
|
-
hash: m,
|
|
17
|
-
onReplaced: I,
|
|
18
|
-
retryCount: N = 6,
|
|
19
|
-
retryDelay: R = ({ count: e }) => ~~(1 << e) * 200,
|
|
20
|
-
// exponential backoff
|
|
21
|
-
timeout: h = 18e4
|
|
22
|
-
} = b, E = H(["waitForTransactionReceipt", t.uid, m]), j = (() => {
|
|
23
|
-
var e;
|
|
24
|
-
return b.pollingInterval ? b.pollingInterval : (e = t.chain) != null && e.experimental_preconfirmationTime ? t.chain.experimental_preconfirmationTime : t.pollingInterval;
|
|
25
|
-
})();
|
|
26
|
-
let l, i, r, s = !1, o, c;
|
|
27
|
-
const { promise: x, resolve: A, reject: v } = G(), w = h ? setTimeout(() => {
|
|
28
|
-
c == null || c(), o == null || o(), v(new O({ hash: m }));
|
|
29
|
-
}, h) : void 0;
|
|
30
|
-
return o = z(E, { onReplaced: I, resolve: A, reject: v }, async (e) => {
|
|
31
|
-
if (r = await u(t, y, "getTransactionReceipt")({ hash: m }).catch(() => {
|
|
32
|
-
}), r && a <= 1) {
|
|
33
|
-
clearTimeout(w), e.resolve(r), o == null || o();
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
c = u(t, L, "watchBlockNumber")({
|
|
37
|
-
emitMissed: !0,
|
|
38
|
-
emitOnBegin: !0,
|
|
39
|
-
poll: !0,
|
|
40
|
-
pollingInterval: j,
|
|
41
|
-
async onBlockNumber(C) {
|
|
42
|
-
const p = (T) => {
|
|
43
|
-
clearTimeout(w), c == null || c(), T(), o == null || o();
|
|
44
|
-
};
|
|
45
|
-
let d = C;
|
|
46
|
-
if (!s)
|
|
47
|
-
try {
|
|
48
|
-
if (r) {
|
|
49
|
-
if (a > 1 && (!r.blockNumber || d - r.blockNumber + 1n < a))
|
|
50
|
-
return;
|
|
51
|
-
p(() => e.resolve(r));
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
if (F && !l && (s = !0, await B(async () => {
|
|
55
|
-
l = await u(t, K, "getTransaction")({ hash: m }), l.blockNumber && (d = l.blockNumber);
|
|
56
|
-
}, {
|
|
57
|
-
delay: R,
|
|
58
|
-
retryCount: N
|
|
59
|
-
}), s = !1), r = await u(t, y, "getTransactionReceipt")({ hash: m }), a > 1 && (!r.blockNumber || d - r.blockNumber + 1n < a))
|
|
60
|
-
return;
|
|
61
|
-
p(() => e.resolve(r));
|
|
62
|
-
} catch (T) {
|
|
63
|
-
if (T instanceof W || T instanceof q) {
|
|
64
|
-
if (!l) {
|
|
65
|
-
s = !1;
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
try {
|
|
69
|
-
i = l, s = !0;
|
|
70
|
-
const k = await B(() => u(t, J, "getBlock")({
|
|
71
|
-
blockNumber: d,
|
|
72
|
-
includeTransactions: !0
|
|
73
|
-
}), {
|
|
74
|
-
delay: R,
|
|
75
|
-
retryCount: N,
|
|
76
|
-
shouldRetry: ({ error: f }) => f instanceof M
|
|
77
|
-
});
|
|
78
|
-
s = !1;
|
|
79
|
-
const n = k.transactions.find(({ from: f, nonce: D }) => f === i.from && D === i.nonce);
|
|
80
|
-
if (!n || (r = await u(t, y, "getTransactionReceipt")({
|
|
81
|
-
hash: n.hash
|
|
82
|
-
}), a > 1 && (!r.blockNumber || d - r.blockNumber + 1n < a)))
|
|
83
|
-
return;
|
|
84
|
-
let g = "replaced";
|
|
85
|
-
n.to === i.to && n.value === i.value && n.input === i.input ? g = "repriced" : n.from === n.to && n.value === 0n && (g = "cancelled"), p(() => {
|
|
86
|
-
var f;
|
|
87
|
-
(f = e.onReplaced) == null || f.call(e, {
|
|
88
|
-
reason: g,
|
|
89
|
-
replacedTransaction: i,
|
|
90
|
-
transaction: n,
|
|
91
|
-
transactionReceipt: r
|
|
92
|
-
}), e.resolve(r);
|
|
93
|
-
});
|
|
94
|
-
} catch (k) {
|
|
95
|
-
p(() => e.reject(k));
|
|
96
|
-
}
|
|
97
|
-
} else
|
|
98
|
-
p(() => e.reject(T));
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
}), x;
|
|
1
|
+
import { numberToHex as d } from "./index81.js";
|
|
2
|
+
async function i(e, { address: a, blockNumber: t, blockTag: n = "latest", slot: o }) {
|
|
3
|
+
const r = t !== void 0 ? d(t) : void 0;
|
|
4
|
+
return await e.request({
|
|
5
|
+
method: "eth_getStorageAt",
|
|
6
|
+
params: [a, o, r || n]
|
|
7
|
+
});
|
|
103
8
|
}
|
|
104
9
|
export {
|
|
105
|
-
|
|
10
|
+
i as getStorageAt
|
|
106
11
|
};
|
package/dist/index156.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 p=require("./index199.cjs"),r=require("./index81.cjs"),y=require("./index73.cjs");async function l(t,{blockHash:n,blockNumber:o,blockTag:g,hash:s,index:a,sender:u,nonce:i}){var m,f,T;const c=g||"latest",d=o!==void 0?r.numberToHex(o):void 0;let e=null;if(s?e=await t.request({method:"eth_getTransactionByHash",params:[s]},{dedupe:!0}):n?e=await t.request({method:"eth_getTransactionByBlockHashAndIndex",params:[n,r.numberToHex(a)]},{dedupe:!0}):typeof a=="number"?e=await t.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[d||c,r.numberToHex(a)]},{dedupe:!!d}):u&&typeof i=="number"&&(e=await t.request({method:"eth_getTransactionBySenderAndNonce",params:[u,r.numberToHex(i)]},{dedupe:!0})),!e)throw new p.TransactionNotFoundError({blockHash:n,blockNumber:o,blockTag:c,hash:s,index:a});return(((T=(f=(m=t.chain)==null?void 0:m.formatters)==null?void 0:f.transaction)==null?void 0:T.format)||y.formatTransaction)(e,"getTransaction")}exports.getTransaction=l;
|