@gardenfi/utils 3.1.0-beta.3 → 3.1.1-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/dist/index100.cjs +2 -1
- package/dist/index100.js +114 -119
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +14 -5
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +24 -21
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +31 -43
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +43 -37
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +6 -6
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +101 -88
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +37 -14
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +8 -3
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +20 -26
- package/dist/index110.cjs +1 -2
- package/dist/index110.js +2 -25
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +75 -9
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +15 -8
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +151 -10
- package/dist/index114.cjs +20 -1
- package/dist/index114.js +326 -11
- package/dist/index115.cjs +3 -1
- package/dist/index115.js +451 -13
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +71 -19
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +16 -14
- package/dist/index118.cjs +1 -1
- package/dist/index118.js +10 -4
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +125 -6
- package/dist/index120.cjs +1 -1
- package/dist/index120.js +5 -18
- package/dist/index121.cjs +1 -1
- package/dist/index121.js +45 -10
- package/dist/index122.cjs +1 -1
- package/dist/index122.js +36 -56
- package/dist/index123.cjs +1 -1
- package/dist/index123.js +6 -6
- package/dist/index124.cjs +1 -1
- package/dist/index124.js +90 -13
- package/dist/index125.cjs +1 -1
- package/dist/index125.js +14 -7
- package/dist/index126.cjs +1 -1
- package/dist/index126.js +3 -138
- package/dist/index127.cjs +1 -1
- package/dist/index127.js +26 -7
- package/dist/index128.cjs +2 -1
- package/dist/index128.js +22 -19
- package/dist/index129.cjs +1 -1
- package/dist/index129.js +9 -17
- package/dist/index130.cjs +1 -1
- package/dist/index130.js +8 -43
- package/dist/index131.cjs +1 -1
- package/dist/index131.js +10 -21
- package/dist/index132.cjs +1 -1
- package/dist/index132.js +11 -80
- package/dist/index133.cjs +1 -1
- package/dist/index133.js +13 -11
- package/dist/index134.cjs +1 -1
- package/dist/index134.js +15 -7
- package/dist/index135.cjs +1 -1
- package/dist/index135.js +14 -6
- package/dist/index136.cjs +1 -1
- package/dist/index136.js +4 -41
- package/dist/index137.cjs +1 -1
- package/dist/index137.js +6 -5
- package/dist/index138.cjs +1 -1
- package/dist/index138.js +18 -13
- package/dist/index139.cjs +1 -1
- package/dist/index139.js +10 -34
- package/dist/index140.cjs +1 -1
- package/dist/index140.js +56 -53
- package/dist/index141.cjs +1 -1
- package/dist/index141.js +6 -25
- package/dist/index142.cjs +1 -1
- package/dist/index142.js +13 -6
- package/dist/index143.cjs +1 -1
- package/dist/index143.js +7 -18
- package/dist/index144.cjs +1 -1
- package/dist/index144.js +138 -15
- package/dist/index145.cjs +1 -1
- package/dist/index145.js +7 -5
- package/dist/index146.cjs +1 -1
- package/dist/index146.js +21 -13
- package/dist/index147.cjs +1 -1
- package/dist/index147.js +17 -10
- package/dist/index148.cjs +1 -1
- package/dist/index148.js +42 -11
- package/dist/index149.cjs +1 -1
- package/dist/index149.js +21 -11
- package/dist/index150.cjs +1 -1
- package/dist/index150.js +80 -8
- package/dist/index151.cjs +1 -1
- package/dist/index151.js +11 -3
- package/dist/index152.cjs +1 -1
- package/dist/index152.js +13 -16
- package/dist/index153.cjs +1 -1
- package/dist/index153.js +6 -5
- package/dist/index154.cjs +1 -1
- package/dist/index154.js +38 -168
- package/dist/index155.cjs +1 -1
- package/dist/index155.js +5 -103
- package/dist/index156.cjs +1 -1
- package/dist/index156.js +1 -1
- package/dist/index158.cjs +1 -1
- package/dist/index158.js +28 -28
- package/dist/index160.cjs +1 -1
- package/dist/index160.js +5 -5
- package/dist/index161.cjs +1 -1
- package/dist/index161.js +2 -2
- package/dist/index162.cjs +1 -1
- package/dist/index162.js +1 -1
- package/dist/index163.cjs +1 -1
- package/dist/index163.js +1 -1
- package/dist/index166.cjs +1 -1
- package/dist/index166.js +1 -1
- package/dist/index167.cjs +1 -1
- package/dist/index167.js +1 -1
- package/dist/index170.cjs +1 -1
- package/dist/index170.js +2 -2
- package/dist/index171.cjs +1 -1
- package/dist/index171.js +1 -1
- package/dist/index174.cjs +1 -1
- package/dist/index174.js +1 -1
- package/dist/index176.cjs +1 -1
- package/dist/index176.js +1 -1
- package/dist/index177.cjs +1 -1
- package/dist/index177.js +1 -1
- package/dist/index178.cjs +1 -1
- package/dist/index178.js +2 -2
- package/dist/index179.cjs +1 -1
- package/dist/index179.js +1 -1
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +8 -8
- package/dist/index180.cjs +1 -1
- package/dist/index180.js +1 -1
- package/dist/index181.cjs +1 -1
- package/dist/index181.js +2 -2
- package/dist/index182.cjs +1 -1
- package/dist/index182.js +6 -6
- package/dist/index184.cjs +1 -1
- package/dist/index184.js +3 -3
- package/dist/index185.cjs +1 -1
- package/dist/index185.js +7 -7
- package/dist/index186.cjs +1 -1
- package/dist/index186.js +1 -1
- package/dist/index187.cjs +1 -1
- package/dist/index187.js +1 -1
- package/dist/index189.cjs +1 -1
- package/dist/index189.js +2 -2
- package/dist/index192.cjs +1 -1
- package/dist/index192.js +3 -3
- package/dist/index193.cjs +1 -1
- package/dist/index193.js +2 -2
- package/dist/index194.cjs +1 -1
- package/dist/index194.js +2 -2
- package/dist/index195.cjs +1 -1
- package/dist/index195.js +1 -1
- package/dist/index196.cjs +1 -1
- package/dist/index196.js +2 -2
- package/dist/index197.cjs +1 -1
- package/dist/index197.js +2 -2
- package/dist/index199.cjs +1 -1
- package/dist/index199.js +1 -1
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +2 -2
- package/dist/index200.cjs +1 -1
- package/dist/index200.js +2 -2
- package/dist/index203.cjs +1 -1
- package/dist/index203.js +3 -3
- package/dist/index204.cjs +1 -1
- package/dist/index204.js +1 -1
- package/dist/index205.cjs +1 -1
- package/dist/index205.js +1 -1
- package/dist/index209.cjs +1 -1
- package/dist/index209.js +2 -2
- package/dist/index210.cjs +1 -1
- package/dist/index210.js +1 -1
- package/dist/index211.cjs +1 -1
- package/dist/index211.js +4 -4
- package/dist/index212.cjs +1 -1
- package/dist/index212.js +6 -6
- package/dist/index214.cjs +1 -1
- package/dist/index214.js +3 -3
- package/dist/index215.cjs +1 -1
- package/dist/index215.js +2 -2
- package/dist/index217.cjs +1 -1
- package/dist/index217.js +213 -23
- package/dist/index218.cjs +1 -1
- package/dist/index218.js +105 -43
- package/dist/index219.cjs +1 -1
- package/dist/index219.js +205 -8
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +9 -9
- package/dist/index220.cjs +1 -1
- package/dist/index220.js +101 -212
- package/dist/index221.cjs +1 -1
- package/dist/index221.js +16 -108
- package/dist/index222.cjs +1 -1
- package/dist/index222.js +39 -203
- package/dist/index223.cjs +1 -1
- package/dist/index223.js +72 -97
- package/dist/index224.cjs +1 -1
- package/dist/index224.js +2 -17
- package/dist/index225.cjs +1 -1
- package/dist/index225.js +24 -42
- package/dist/index226.cjs +1 -1
- package/dist/index226.js +42 -74
- package/dist/index227.cjs +1 -1
- package/dist/index227.js +10 -2
- package/dist/index242.cjs +1 -1
- package/dist/index242.js +1 -1
- package/dist/index245.cjs +1 -1
- package/dist/index245.js +2 -2
- package/dist/index247.cjs +1 -1
- package/dist/index247.js +1 -1
- package/dist/index248.cjs +1 -1
- package/dist/index248.js +1 -1
- package/dist/index250.cjs +1 -2
- package/dist/index250.js +654 -88
- package/dist/index251.cjs +1 -1
- package/dist/index251.js +177 -14
- package/dist/index252.cjs +2 -1
- package/dist/index252.js +88 -654
- package/dist/index253.cjs +1 -1
- package/dist/index253.js +14 -177
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +1 -1
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +1 -1
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +13 -171
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +32 -109
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +32 -30
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +55 -3
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +46 -2
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +26 -4
- package/dist/index35.cjs +1 -2
- package/dist/index35.js +6 -59
- package/dist/index36.cjs +1 -2
- package/dist/index36.js +18 -54
- package/dist/index37.cjs +1 -3
- package/dist/index37.js +15 -215
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +5 -23
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +13 -18
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +10 -10
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +11 -19
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +11 -45
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +3 -13
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +21 -12
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +8 -24
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +3 -28
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +16 -47
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +5 -16
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +170 -10
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +102 -30
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +169 -34
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +111 -7
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +30 -29
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +2 -23
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +4 -8
- package/dist/index56.cjs +2 -1
- package/dist/index56.js +58 -69
- package/dist/index57.cjs +2 -1
- package/dist/index57.js +51 -43
- package/dist/index58.cjs +3 -1
- package/dist/index58.js +208 -16
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +22 -36
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +18 -17
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +10 -6
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +20 -9
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +10 -10
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +12 -164
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +23 -31
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +25 -74
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +47 -13
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +16 -51
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +11 -7
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +31 -7
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +36 -21
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +7 -8
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +27 -29
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +21 -15
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +7 -73
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +70 -35
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +46 -16
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +21 -73
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +37 -12
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +17 -29
- package/dist/index81.cjs +1 -2
- package/dist/index81.js +6 -120
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +8 -13
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +13 -24
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +162 -31
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +72 -39
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +12 -5
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +50 -102
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +7 -37
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +7 -8
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +21 -20
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +9 -2
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +31 -75
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +16 -15
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +72 -150
- package/dist/index95.cjs +1 -20
- package/dist/index95.js +35 -326
- package/dist/index96.cjs +1 -3
- package/dist/index96.js +16 -451
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +72 -70
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +12 -16
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +29 -10
- package/package.json +1 -1
package/dist/index100.cjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index172.cjs"),c=require("./index173.cjs"),i=require("./index56.cjs");function d(a){const e=Object.entries(a).map(([t,r])=>r===void 0||r===!1?null:[t,r]).filter(Boolean),o=e.reduce((t,[r])=>Math.max(t,r.length),0);return e.map(([t,r])=>` ${`${t}:`.padEnd(o+1)} ${r}`).join(`
|
|
2
|
+
`)}class y extends i.BaseError{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class b extends i.BaseError{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",d(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class v extends i.BaseError{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}class w extends i.BaseError{constructor(e,{account:o,docsPath:t,chain:r,data:n,gas:s,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:f,nonce:p,to:T,value:m}){var E;const h=d({chain:r&&`${r==null?void 0:r.name} (id: ${r==null?void 0:r.id})`,from:o==null?void 0:o.address,to:T,value:typeof m<"u"&&`${g.formatEther(m)} ${((E=r==null?void 0:r.nativeCurrency)==null?void 0:E.symbol)||"ETH"}`,data:n,gas:s,gasPrice:typeof u<"u"&&`${c.formatGwei(u)} gwei`,maxFeePerGas:typeof l<"u"&&`${c.formatGwei(l)} gwei`,maxPriorityFeePerGas:typeof f<"u"&&`${c.formatGwei(f)} gwei`,nonce:p});super(e.shortMessage,{cause:e,docsPath:t,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",h].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class $ extends i.BaseError{constructor({blockHash:e,blockNumber:o,blockTag:t,hash:r,index:n}){let s="Transaction";t&&n!==void 0&&(s=`Transaction at block time "${t}" at index "${n}"`),e&&n!==void 0&&(s=`Transaction at block hash "${e}" at index "${n}"`),o&&n!==void 0&&(s=`Transaction at block number "${o}" at index "${n}"`),r&&(s=`Transaction with hash "${r}"`),super(`${s} could not be found.`,{name:"TransactionNotFoundError"})}}class x extends i.BaseError{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class I extends i.BaseError{constructor({receipt:e}){super(`Transaction with hash "${e.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.receipt=e}}class P extends i.BaseError{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}exports.InvalidLegacyVError=y;exports.InvalidSerializableTransactionError=b;exports.InvalidStorageKeySizeError=v;exports.TransactionExecutionError=w;exports.TransactionNotFoundError=$;exports.TransactionReceiptNotFoundError=x;exports.TransactionReceiptRevertedError=I;exports.WaitForTransactionReceiptTimeoutError=P;exports.prettyPrint=d;
|
package/dist/index100.js
CHANGED
|
@@ -1,128 +1,123 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { BaseError as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
import { prepareTransactionRequest as Q, defaultParameters as V } from "./index64.js";
|
|
14
|
-
import { sendRawTransaction as X } from "./index123.js";
|
|
15
|
-
const h = new H(128);
|
|
16
|
-
async function mr(t, o) {
|
|
17
|
-
var M, z, A, F;
|
|
18
|
-
const { account: d = t.account, assertChainId: S = !0, chain: e = t.chain, accessList: w, authorizationList: s, blobs: l, data: y, gas: T, gasPrice: g, maxFeePerBlobGas: R, maxFeePerGas: E, maxPriorityFeePerGas: q, nonce: C, type: P, value: N, ...I } = o;
|
|
19
|
-
if (typeof d > "u")
|
|
20
|
-
throw new B({
|
|
21
|
-
docsPath: "/docs/actions/wallet/sendTransaction"
|
|
1
|
+
import { formatEther as g } from "./index172.js";
|
|
2
|
+
import { formatGwei as c } from "./index173.js";
|
|
3
|
+
import { BaseError as i } from "./index56.js";
|
|
4
|
+
function p(a) {
|
|
5
|
+
const e = Object.entries(a).map(([r, t]) => t === void 0 || t === !1 ? null : [r, t]).filter(Boolean), n = e.reduce((r, [t]) => Math.max(r, t.length), 0);
|
|
6
|
+
return e.map(([r, t]) => ` ${`${r}:`.padEnd(n + 1)} ${t}`).join(`
|
|
7
|
+
`);
|
|
8
|
+
}
|
|
9
|
+
class v extends i {
|
|
10
|
+
constructor({ v: e }) {
|
|
11
|
+
super(`Invalid \`v\` value "${e}". Expected 27 or 28.`, {
|
|
12
|
+
name: "InvalidLegacyVError"
|
|
22
13
|
});
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return o.to;
|
|
29
|
-
if (o.to !== null && s && s.length > 0)
|
|
30
|
-
return await U({
|
|
31
|
-
authorization: s[0]
|
|
32
|
-
}).catch(() => {
|
|
33
|
-
throw new O("`to` is required. Could not infer from `authorizationList`.");
|
|
34
|
-
});
|
|
35
|
-
})();
|
|
36
|
-
if ((r == null ? void 0 : r.type) === "json-rpc" || r === null) {
|
|
37
|
-
let i;
|
|
38
|
-
e !== null && (i = await f(t, K, "getChainId")({}), S && W({
|
|
39
|
-
currentChainId: i,
|
|
40
|
-
chain: e
|
|
41
|
-
}));
|
|
42
|
-
const c = (A = (z = (M = t.chain) == null ? void 0 : M.formatters) == null ? void 0 : z.transactionRequest) == null ? void 0 : A.format, b = (c || D)({
|
|
43
|
-
// Pick out extra data that might exist on the chain's transaction request type.
|
|
44
|
-
...k(I, { format: c }),
|
|
45
|
-
accessList: w,
|
|
46
|
-
account: r,
|
|
47
|
-
authorizationList: s,
|
|
48
|
-
blobs: l,
|
|
49
|
-
chainId: i,
|
|
50
|
-
data: y,
|
|
51
|
-
gas: T,
|
|
52
|
-
gasPrice: g,
|
|
53
|
-
maxFeePerBlobGas: R,
|
|
54
|
-
maxFeePerGas: E,
|
|
55
|
-
maxPriorityFeePerGas: q,
|
|
56
|
-
nonce: C,
|
|
57
|
-
to: a,
|
|
58
|
-
type: P,
|
|
59
|
-
value: N
|
|
60
|
-
}, "sendTransaction"), v = h.get(t.uid), _ = v ? "wallet_sendTransaction" : "eth_sendTransaction";
|
|
61
|
-
try {
|
|
62
|
-
return await t.request({
|
|
63
|
-
method: _,
|
|
64
|
-
params: [b]
|
|
65
|
-
}, { retryCount: 0 });
|
|
66
|
-
} catch (L) {
|
|
67
|
-
if (v === !1)
|
|
68
|
-
throw L;
|
|
69
|
-
const n = L;
|
|
70
|
-
if (n.name === "InvalidInputRpcError" || n.name === "InvalidParamsRpcError" || n.name === "MethodNotFoundRpcError" || n.name === "MethodNotSupportedRpcError")
|
|
71
|
-
return await t.request({
|
|
72
|
-
method: "wallet_sendTransaction",
|
|
73
|
-
params: [b]
|
|
74
|
-
}, { retryCount: 0 }).then((u) => (h.set(t.uid, !0), u)).catch((u) => {
|
|
75
|
-
const m = u;
|
|
76
|
-
throw m.name === "MethodNotFoundRpcError" || m.name === "MethodNotSupportedRpcError" ? (h.set(t.uid, !1), n) : m;
|
|
77
|
-
});
|
|
78
|
-
throw n;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
if ((r == null ? void 0 : r.type) === "local") {
|
|
82
|
-
const i = await f(t, Q, "prepareTransactionRequest")({
|
|
83
|
-
account: r,
|
|
84
|
-
accessList: w,
|
|
85
|
-
authorizationList: s,
|
|
86
|
-
blobs: l,
|
|
87
|
-
chain: e,
|
|
88
|
-
data: y,
|
|
89
|
-
gas: T,
|
|
90
|
-
gasPrice: g,
|
|
91
|
-
maxFeePerBlobGas: R,
|
|
92
|
-
maxFeePerGas: E,
|
|
93
|
-
maxPriorityFeePerGas: q,
|
|
94
|
-
nonce: C,
|
|
95
|
-
nonceManager: r.nonceManager,
|
|
96
|
-
parameters: [...V, "sidecars"],
|
|
97
|
-
type: P,
|
|
98
|
-
value: N,
|
|
99
|
-
...I,
|
|
100
|
-
to: a
|
|
101
|
-
}), c = (F = e == null ? void 0 : e.serializers) == null ? void 0 : F.transaction, x = await r.signTransaction(i, {
|
|
102
|
-
serializer: c
|
|
103
|
-
});
|
|
104
|
-
return await f(t, X, "sendRawTransaction")({
|
|
105
|
-
serializedTransaction: x
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
throw (r == null ? void 0 : r.type) === "smart" ? new p({
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
class w extends i {
|
|
17
|
+
constructor({ transaction: e }) {
|
|
18
|
+
super("Cannot infer a transaction type from provided transaction.", {
|
|
109
19
|
metaMessages: [
|
|
110
|
-
"
|
|
20
|
+
"Provided Transaction:",
|
|
21
|
+
"{",
|
|
22
|
+
p(e),
|
|
23
|
+
"}",
|
|
24
|
+
"",
|
|
25
|
+
"To infer the type, either provide:",
|
|
26
|
+
"- a `type` to the Transaction, or",
|
|
27
|
+
"- an EIP-1559 Transaction with `maxFeePerGas`, or",
|
|
28
|
+
"- an EIP-2930 Transaction with `gasPrice` & `accessList`, or",
|
|
29
|
+
"- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or",
|
|
30
|
+
"- an EIP-7702 Transaction with `authorizationList`, or",
|
|
31
|
+
"- a Legacy Transaction with `gasPrice`"
|
|
111
32
|
],
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
33
|
+
name: "InvalidSerializableTransactionError"
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
class x extends i {
|
|
38
|
+
constructor({ storageKey: e }) {
|
|
39
|
+
super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length - 2) / 2)} bytes.`, { name: "InvalidStorageKeySizeError" });
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
class I extends i {
|
|
43
|
+
constructor(e, { account: n, docsPath: r, chain: t, data: o, gas: s, gasPrice: d, maxFeePerGas: u, maxPriorityFeePerGas: l, nonce: h, to: T, value: m }) {
|
|
44
|
+
var f;
|
|
45
|
+
const E = p({
|
|
46
|
+
chain: t && `${t == null ? void 0 : t.name} (id: ${t == null ? void 0 : t.id})`,
|
|
47
|
+
from: n == null ? void 0 : n.address,
|
|
48
|
+
to: T,
|
|
49
|
+
value: typeof m < "u" && `${g(m)} ${((f = t == null ? void 0 : t.nativeCurrency) == null ? void 0 : f.symbol) || "ETH"}`,
|
|
50
|
+
data: o,
|
|
51
|
+
gas: s,
|
|
52
|
+
gasPrice: typeof d < "u" && `${c(d)} gwei`,
|
|
53
|
+
maxFeePerGas: typeof u < "u" && `${c(u)} gwei`,
|
|
54
|
+
maxPriorityFeePerGas: typeof l < "u" && `${c(l)} gwei`,
|
|
55
|
+
nonce: h
|
|
56
|
+
});
|
|
57
|
+
super(e.shortMessage, {
|
|
58
|
+
cause: e,
|
|
59
|
+
docsPath: r,
|
|
60
|
+
metaMessages: [
|
|
61
|
+
...e.metaMessages ? [...e.metaMessages, " "] : [],
|
|
62
|
+
"Request Arguments:",
|
|
63
|
+
E
|
|
64
|
+
].filter(Boolean),
|
|
65
|
+
name: "TransactionExecutionError"
|
|
66
|
+
}), Object.defineProperty(this, "cause", {
|
|
67
|
+
enumerable: !0,
|
|
68
|
+
configurable: !0,
|
|
69
|
+
writable: !0,
|
|
70
|
+
value: void 0
|
|
71
|
+
}), this.cause = e;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
class P extends i {
|
|
75
|
+
constructor({ blockHash: e, blockNumber: n, blockTag: r, hash: t, index: o }) {
|
|
76
|
+
let s = "Transaction";
|
|
77
|
+
r && o !== void 0 && (s = `Transaction at block time "${r}" at index "${o}"`), e && o !== void 0 && (s = `Transaction at block hash "${e}" at index "${o}"`), n && o !== void 0 && (s = `Transaction at block number "${n}" at index "${o}"`), t && (s = `Transaction with hash "${t}"`), super(`${s} could not be found.`, {
|
|
78
|
+
name: "TransactionNotFoundError"
|
|
117
79
|
});
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
class R extends i {
|
|
83
|
+
constructor({ hash: e }) {
|
|
84
|
+
super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`, {
|
|
85
|
+
name: "TransactionReceiptNotFoundError"
|
|
123
86
|
});
|
|
124
87
|
}
|
|
125
88
|
}
|
|
89
|
+
class M extends i {
|
|
90
|
+
constructor({ receipt: e }) {
|
|
91
|
+
super(`Transaction with hash "${e.transactionHash}" reverted.`, {
|
|
92
|
+
metaMessages: [
|
|
93
|
+
'The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.',
|
|
94
|
+
" ",
|
|
95
|
+
"You can attempt to extract the revert reason by:",
|
|
96
|
+
"- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract",
|
|
97
|
+
"- using the `call` Action with raw `data`"
|
|
98
|
+
],
|
|
99
|
+
name: "TransactionReceiptRevertedError"
|
|
100
|
+
}), Object.defineProperty(this, "receipt", {
|
|
101
|
+
enumerable: !0,
|
|
102
|
+
configurable: !0,
|
|
103
|
+
writable: !0,
|
|
104
|
+
value: void 0
|
|
105
|
+
}), this.receipt = e;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
class F extends i {
|
|
109
|
+
constructor({ hash: e }) {
|
|
110
|
+
super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`, { name: "WaitForTransactionReceiptTimeoutError" });
|
|
111
|
+
}
|
|
112
|
+
}
|
|
126
113
|
export {
|
|
127
|
-
|
|
114
|
+
v as InvalidLegacyVError,
|
|
115
|
+
w as InvalidSerializableTransactionError,
|
|
116
|
+
x as InvalidStorageKeySizeError,
|
|
117
|
+
I as TransactionExecutionError,
|
|
118
|
+
P as TransactionNotFoundError,
|
|
119
|
+
R as TransactionReceiptNotFoundError,
|
|
120
|
+
M as TransactionReceiptRevertedError,
|
|
121
|
+
F as WaitForTransactionReceiptTimeoutError,
|
|
122
|
+
p as prettyPrint
|
|
128
123
|
};
|
package/dist/index101.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("./index31.cjs"),u=require("./index33.cjs");async function i(e,{address:n,blockTag:o="latest",blockNumber:t}){const r=await e.request({method:"eth_getTransactionCount",params:[n,typeof t=="bigint"?u.numberToHex(t):o]},{dedupe:!!t});return a.hexToNumber(r)}exports.getTransactionCount=i;
|
package/dist/index101.js
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { hexToNumber as r } from "./index31.js";
|
|
2
|
+
import { numberToHex as i } from "./index33.js";
|
|
3
|
+
async function m(o, { address: e, blockTag: n = "latest", blockNumber: t }) {
|
|
4
|
+
const a = await o.request({
|
|
5
|
+
method: "eth_getTransactionCount",
|
|
6
|
+
params: [
|
|
7
|
+
e,
|
|
8
|
+
typeof t == "bigint" ? i(t) : n
|
|
9
|
+
]
|
|
10
|
+
}, {
|
|
11
|
+
dedupe: !!t
|
|
12
|
+
});
|
|
13
|
+
return r(a);
|
|
5
14
|
}
|
|
6
15
|
export {
|
|
7
|
-
|
|
16
|
+
m as getTransactionCount
|
|
8
17
|
};
|
package/dist/index102.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 b=require("./index31.cjs"),d=require("./index98.cjs"),r=require("./index87.cjs"),u={"0x0":"reverted","0x1":"success"};function o(l,g){const s={...l,blockNumber:l.blockNumber?BigInt(l.blockNumber):null,contractAddress:l.contractAddress?l.contractAddress:null,cumulativeGasUsed:l.cumulativeGasUsed?BigInt(l.cumulativeGasUsed):null,effectiveGasPrice:l.effectiveGasPrice?BigInt(l.effectiveGasPrice):null,gasUsed:l.gasUsed?BigInt(l.gasUsed):null,logs:l.logs?l.logs.map(e=>d.formatLog(e)):null,to:l.to?l.to:null,transactionIndex:l.transactionIndex?b.hexToNumber(l.transactionIndex):null,status:l.status?u[l.status]:null,type:l.type?r.transactionType[l.type]||l.type:null};return l.blobGasPrice&&(s.blobGasPrice=BigInt(l.blobGasPrice)),l.blobGasUsed&&(s.blobGasUsed=BigInt(l.blobGasUsed)),s}exports.formatTransactionReceipt=o;exports.receiptStatuses=u;
|
package/dist/index102.js
CHANGED
|
@@ -1,24 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import { hexToNumber as b } from "./index31.js";
|
|
2
|
+
import { formatLog as d } from "./index98.js";
|
|
3
|
+
import { transactionType as m } from "./index87.js";
|
|
4
|
+
const f = {
|
|
5
|
+
"0x0": "reverted",
|
|
6
|
+
"0x1": "success"
|
|
7
|
+
};
|
|
8
|
+
function I(l, g) {
|
|
9
|
+
const u = {
|
|
10
|
+
...l,
|
|
11
|
+
blockNumber: l.blockNumber ? BigInt(l.blockNumber) : null,
|
|
12
|
+
contractAddress: l.contractAddress ? l.contractAddress : null,
|
|
13
|
+
cumulativeGasUsed: l.cumulativeGasUsed ? BigInt(l.cumulativeGasUsed) : null,
|
|
14
|
+
effectiveGasPrice: l.effectiveGasPrice ? BigInt(l.effectiveGasPrice) : null,
|
|
15
|
+
gasUsed: l.gasUsed ? BigInt(l.gasUsed) : null,
|
|
16
|
+
logs: l.logs ? l.logs.map((s) => d(s)) : null,
|
|
17
|
+
to: l.to ? l.to : null,
|
|
18
|
+
transactionIndex: l.transactionIndex ? b(l.transactionIndex) : null,
|
|
19
|
+
status: l.status ? f[l.status] : null,
|
|
20
|
+
type: l.type ? m[l.type] || l.type : null
|
|
21
|
+
};
|
|
22
|
+
return l.blobGasPrice && (u.blobGasPrice = BigInt(l.blobGasPrice)), l.blobGasUsed && (u.blobGasUsed = BigInt(l.blobGasUsed)), u;
|
|
20
23
|
}
|
|
21
24
|
export {
|
|
22
|
-
|
|
23
|
-
|
|
25
|
+
I as formatTransactionReceipt,
|
|
26
|
+
f as receiptStatuses
|
|
24
27
|
};
|
package/dist/index103.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 i=require("./index59.cjs"),u=require("./index61.cjs"),l=require("./index74.cjs"),g=require("./index75.cjs"),q=require("./index51.cjs");async function C(a,n){const{abi:t,address:o,args:e,functionName:r,...d}=n,s=u.encodeFunctionData({abi:t,args:e,functionName:r});try{const{data:c}=await g.getAction(a,q.call,"call")({...d,data:s,to:o});return i.decodeFunctionResult({abi:t,args:e,functionName:r,data:c||"0x"})}catch(c){throw l.getContractError(c,{abi:t,address:o,args:e,docsPath:"/docs/contract/readContract",functionName:r})}}exports.readContract=C;
|
package/dist/index103.js
CHANGED
|
@@ -1,48 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
async function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import { decodeFunctionResult as m } from "./index59.js";
|
|
2
|
+
import { encodeFunctionData as s } from "./index61.js";
|
|
3
|
+
import { getContractError as f } from "./index74.js";
|
|
4
|
+
import { getAction as l } from "./index75.js";
|
|
5
|
+
import { call as p } from "./index51.js";
|
|
6
|
+
async function x(n, e) {
|
|
7
|
+
const { abi: t, address: c, args: o, functionName: r, ...d } = e, i = s({
|
|
8
|
+
abi: t,
|
|
9
|
+
args: o,
|
|
10
|
+
functionName: r
|
|
11
|
+
});
|
|
12
|
+
try {
|
|
13
|
+
const { data: a } = await l(n, p, "call")({
|
|
14
|
+
...d,
|
|
15
|
+
data: i,
|
|
16
|
+
to: c
|
|
17
|
+
});
|
|
18
|
+
return m({
|
|
19
|
+
abi: t,
|
|
20
|
+
args: o,
|
|
21
|
+
functionName: r,
|
|
22
|
+
data: a || "0x"
|
|
23
|
+
});
|
|
24
|
+
} catch (a) {
|
|
25
|
+
throw f(a, {
|
|
26
|
+
abi: t,
|
|
27
|
+
address: c,
|
|
28
|
+
args: o,
|
|
29
|
+
docsPath: "/docs/contract/readContract",
|
|
30
|
+
functionName: r
|
|
24
31
|
});
|
|
25
32
|
}
|
|
26
|
-
const { atomic: l = !1, chainId: r, receipts: n, version: d = "2.0.0", ...i } = await m(f.id), [p, g] = (() => {
|
|
27
|
-
const t = i.status;
|
|
28
|
-
return t >= 100 && t < 200 ? ["pending", t] : t >= 200 && t < 300 ? ["success", t] : t >= 300 && t < 700 ? ["failure", t] : t === "CONFIRMED" ? ["success", 200] : t === "PENDING" ? ["pending", 100] : [void 0, t];
|
|
29
|
-
})();
|
|
30
|
-
return {
|
|
31
|
-
...i,
|
|
32
|
-
atomic: l,
|
|
33
|
-
// @ts-expect-error: for backwards compatibility
|
|
34
|
-
chainId: r ? u(r) : void 0,
|
|
35
|
-
receipts: (n == null ? void 0 : n.map((t) => ({
|
|
36
|
-
...t,
|
|
37
|
-
blockNumber: c(t.blockNumber),
|
|
38
|
-
gasUsed: c(t.gasUsed),
|
|
39
|
-
status: N[t.status]
|
|
40
|
-
}))) ?? [],
|
|
41
|
-
statusCode: g,
|
|
42
|
-
status: p,
|
|
43
|
-
version: d
|
|
44
|
-
};
|
|
45
33
|
}
|
|
46
34
|
export {
|
|
47
|
-
|
|
35
|
+
x as readContract
|
|
48
36
|
};
|
package/dist/index104.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 q=require("./index43.cjs"),g=require("./index59.cjs"),b=require("./index61.cjs"),A=require("./index74.cjs"),C=require("./index75.cjs"),h=require("./index51.cjs");async function y(u,i){const{abi:e,address:o,args:c,dataSuffix:r,functionName:a,...n}=i,t=n.account?q.parseAccount(n.account):u.account,l=b.encodeFunctionData({abi:e,args:c,functionName:a});try{const{data:s}=await C.getAction(u,h.call,"call")({batch:!1,data:`${l}${r?r.replace("0x",""):""}`,to:o,...n,account:t}),f=g.decodeFunctionResult({abi:e,args:c,functionName:a,data:s||"0x"}),m=e.filter(d=>"name"in d&&d.name===i.functionName);return{result:f,request:{abi:m,address:o,args:c,dataSuffix:r,functionName:a,...n,account:t}}}catch(s){throw A.getContractError(s,{abi:e,address:o,args:c,docsPath:"/docs/contract/simulateContract",functionName:a,sender:t==null?void 0:t.address})}}exports.simulateContract=y;
|
package/dist/index104.js
CHANGED
|
@@ -1,41 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
import { parseAccount as p } from "./index43.js";
|
|
2
|
+
import { decodeFunctionResult as h } from "./index59.js";
|
|
3
|
+
import { encodeFunctionData as x } from "./index61.js";
|
|
4
|
+
import { getContractError as b } from "./index74.js";
|
|
5
|
+
import { getAction as g } from "./index75.js";
|
|
6
|
+
import { call as A } from "./index51.js";
|
|
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
|
|
25
42
|
});
|
|
26
|
-
}
|
|
27
|
-
function m(e, f, i, { strict: o } = {}) {
|
|
28
|
-
s(e, f);
|
|
29
|
-
const n = e.slice(f, i);
|
|
30
|
-
return o && c(n, f, i), n;
|
|
31
|
-
}
|
|
32
|
-
function u(e, f, i, { strict: o } = {}) {
|
|
33
|
-
s(e, f);
|
|
34
|
-
const n = `0x${e.replace("0x", "").slice((f ?? 0) * 2, (i ?? e.length) * 2)}`;
|
|
35
|
-
return o && c(n, f, i), n;
|
|
43
|
+
}
|
|
36
44
|
}
|
|
37
45
|
export {
|
|
38
|
-
|
|
39
|
-
m as sliceBytes,
|
|
40
|
-
u as sliceHex
|
|
46
|
+
R as simulateContract
|
|
41
47
|
};
|
package/dist/index105.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});async function e(n,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}exports.uninstallFilter=e;
|
package/dist/index105.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
async function e(n, { filter: t }) {
|
|
2
|
+
return t.request({
|
|
3
|
+
method: "eth_uninstallFilter",
|
|
4
|
+
params: [t.id]
|
|
5
|
+
});
|
|
6
6
|
}
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
e as uninstallFilter
|
|
9
9
|
};
|
package/dist/index106.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("./index89.cjs"),k=require("./index100.cjs"),f=require("./index75.cjs"),$=require("./index107.cjs"),C=require("./index108.cjs"),B=require("./index109.cjs"),D=require("./index110.cjs"),P=require("./index80.cjs"),W=require("./index99.cjs"),y=require("./index20.cjs"),z=require("./index111.cjs");async function G(r,b){const{checkReplacement:A=!0,confirmations:c=1,hash:p,onReplaced:F,retryCount:h=6,retryDelay:N=({count:t})=>~~(1<<t)*200,timeout:w=18e4}=b,I=D.stringify(["waitForTransactionReceipt",r.uid,p]),j=(()=>{var t;return b.pollingInterval?b.pollingInterval:(t=r.chain)!=null&&t.experimental_preconfirmationTime?r.chain.experimental_preconfirmationTime:r.pollingInterval})();let s,i,e,l=!1,n,a;const{promise:E,resolve:x,reject:v}=C.withResolvers(),q=w?setTimeout(()=>{a==null||a(),n==null||n(),v(new k.WaitForTransactionReceiptTimeoutError({hash:p}))},w):void 0;return n=$.observe(I,{onReplaced:F,resolve:x,reject:v},async t=>{if(e=await f.getAction(r,y.getTransactionReceipt,"getTransactionReceipt")({hash:p}).catch(()=>{}),e&&c<=1){clearTimeout(q),t.resolve(e),n==null||n();return}a=f.getAction(r,z.watchBlockNumber,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:j,async onBlockNumber(M){const g=d=>{clearTimeout(q),a==null||a(),d(),n==null||n()};let T=M;if(!l)try{if(e){if(c>1&&(!e.blockNumber||T-e.blockNumber+1n<c))return;g(()=>t.resolve(e));return}if(A&&!s&&(l=!0,await B.withRetry(async()=>{s=await f.getAction(r,W.getTransaction,"getTransaction")({hash:p}),s.blockNumber&&(T=s.blockNumber)},{delay:N,retryCount:h}),l=!1),e=await f.getAction(r,y.getTransactionReceipt,"getTransactionReceipt")({hash:p}),c>1&&(!e.blockNumber||T-e.blockNumber+1n<c))return;g(()=>t.resolve(e))}catch(d){if(d instanceof k.TransactionNotFoundError||d instanceof k.TransactionReceiptNotFoundError){if(!s){l=!1;return}try{i=s,l=!0;const m=await B.withRetry(()=>f.getAction(r,P.getBlock,"getBlock")({blockNumber:T,includeTransactions:!0}),{delay:N,retryCount:h,shouldRetry:({error:u})=>u instanceof S.BlockNotFoundError});l=!1;const o=m.transactions.find(({from:u,nonce:O})=>u===i.from&&O===i.nonce);if(!o||(e=await f.getAction(r,y.getTransactionReceipt,"getTransactionReceipt")({hash:o.hash}),c>1&&(!e.blockNumber||T-e.blockNumber+1n<c)))return;let R="replaced";o.to===i.to&&o.value===i.value&&o.input===i.input?R="repriced":o.from===o.to&&o.value===0n&&(R="cancelled"),g(()=>{var u;(u=t.onReplaced)==null||u.call(t,{reason:R,replacedTransaction:i,transaction:o,transactionReceipt:e}),t.resolve(e)})}catch(m){g(()=>t.reject(m))}}else g(()=>t.reject(d))}}})}),E}exports.waitForTransactionReceipt=G;
|