@gardenfi/utils 2.1.3-beta.2 → 2.1.3-beta.21
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/index104.cjs +1 -1
- package/dist/index104.js +1 -1
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +75 -46
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +4 -4
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +1 -1
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +1 -1
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +1 -1
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +1 -1
- package/dist/index125.cjs +1 -1
- package/dist/index125.js +1 -1
- package/dist/index166.cjs +1 -1
- package/dist/index166.js +36 -34
- package/dist/index192.cjs +1 -1
- package/dist/index192.js +27 -25
- package/dist/index203.cjs +1 -1
- package/dist/index203.js +16 -16
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +6 -6
- package/dist/index222.cjs +1 -1
- package/dist/index222.js +2 -2
- package/dist/index225.cjs +1 -1
- package/dist/index225.js +43 -43
- package/dist/index226.cjs +1 -1
- package/dist/index226.js +3 -113
- package/dist/index228.cjs +1 -1
- package/dist/index228.js +14 -14
- package/dist/index230.cjs +1 -1
- package/dist/index230.js +10 -25
- package/dist/index231.cjs +1 -1
- package/dist/index231.js +16 -13
- package/dist/index232.cjs +1 -1
- package/dist/index232.js +21 -14
- package/dist/index233.cjs +1 -1
- package/dist/index233.js +30 -5
- package/dist/index234.cjs +1 -1
- package/dist/index234.js +2 -14
- package/dist/index235.cjs +1 -1
- package/dist/index235.js +12 -9
- package/dist/index236.cjs +1 -1
- package/dist/index236.js +12 -16
- package/dist/index237.cjs +1 -1
- package/dist/index237.js +47 -10
- package/dist/index238.cjs +1 -1
- package/dist/index238.js +10 -15
- package/dist/index239.cjs +1 -1
- package/dist/index239.js +7 -22
- package/dist/index240.cjs +1 -1
- package/dist/index240.js +9 -30
- package/dist/index241.cjs +1 -1
- package/dist/index241.js +14 -2
- package/dist/index242.cjs +1 -1
- package/dist/index242.js +14 -13
- package/dist/index243.cjs +1 -1
- package/dist/index243.js +9 -12
- package/dist/index244.cjs +1 -1
- package/dist/index244.js +24 -47
- package/dist/index245.cjs +1 -1
- package/dist/index245.js +12 -11
- package/dist/index246.cjs +1 -1
- package/dist/index246.js +24 -7
- package/dist/index247.cjs +1 -1
- package/dist/index247.js +12 -8
- package/dist/index248.cjs +1 -1
- package/dist/index248.js +15 -13
- package/dist/index249.cjs +2 -1
- package/dist/index249.js +21 -11
- package/dist/index250.cjs +1 -1
- package/dist/index250.js +52 -9
- package/dist/index251.cjs +1 -1
- package/dist/index251.js +25 -24
- package/dist/index252.cjs +1 -1
- package/dist/index252.js +13 -12
- package/dist/index253.cjs +1 -1
- package/dist/index253.js +15 -24
- package/dist/index254.cjs +1 -2
- package/dist/index254.js +5 -24
- package/dist/index255.cjs +1 -1
- package/dist/index255.js +12 -12
- package/dist/index256.cjs +1 -1
- package/dist/index256.js +10 -15
- package/dist/index257.cjs +1 -1
- package/dist/index257.js +16 -52
- package/dist/index266.cjs +1 -1
- package/dist/index266.js +1 -1
- package/dist/index277.cjs +1 -1
- package/dist/index277.js +103 -16
- package/dist/index278.cjs +1 -1
- package/dist/index278.js +5 -222
- package/dist/index279.cjs +1 -1
- package/dist/index279.js +224 -6
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +2 -2
- package/dist/index280.cjs +1 -1
- package/dist/index280.js +7 -7
- package/dist/index281.cjs +1 -1
- package/dist/index281.js +7 -27
- package/dist/index282.cjs +1 -1
- package/dist/index282.js +26 -34
- package/dist/index283.cjs +1 -1
- package/dist/index283.js +13 -12
- package/dist/index284.cjs +1 -1
- package/dist/index284.js +124 -48
- package/dist/index285.cjs +1 -1
- package/dist/index285.js +3 -67
- package/dist/index286.cjs +1 -1
- package/dist/index286.js +137 -37
- package/dist/index287.cjs +1 -1
- package/dist/index287.js +156 -2
- package/dist/index288.cjs +1 -1
- package/dist/index288.js +8 -205
- package/dist/index289.cjs +1 -1
- package/dist/index289.js +113 -3
- package/dist/index290.cjs +2 -1
- package/dist/index290.js +122 -128
- package/dist/index291.cjs +1 -1
- package/dist/index291.js +137 -153
- package/dist/index292.cjs +1 -1
- package/dist/index292.js +42 -9
- package/dist/index293.cjs +1 -1
- package/dist/index293.js +72 -107
- package/dist/index294.cjs +1 -2
- package/dist/index294.js +2 -135
- package/dist/index295.cjs +1 -1
- package/dist/index295.js +68 -11
- package/dist/index296.cjs +1 -1
- package/dist/index296.js +696 -17
- package/dist/index297.cjs +1 -1
- package/dist/index297.js +200 -67
- package/dist/index298.cjs +2 -1
- package/dist/index298.js +63 -639
- package/dist/index299.cjs +1 -1
- package/dist/index299.js +4 -172
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +1 -1
- package/dist/index300.cjs +1 -2
- package/dist/index300.js +39 -65
- package/dist/index301.cjs +1 -1
- package/dist/index301.js +7 -4
- package/dist/index302.cjs +1 -1
- package/dist/index302.js +60 -38
- package/dist/index303.cjs +1 -1
- package/dist/index303.js +77 -7
- package/dist/index304.cjs +1 -1
- package/dist/index304.js +4 -63
- package/dist/index305.cjs +1 -1
- package/dist/index305.js +181 -64
- package/dist/index306.cjs +1 -1
- package/dist/index306.js +12 -4
- package/dist/index307.cjs +1 -1
- package/dist/index307.js +19 -194
- package/dist/index308.cjs +1 -1
- package/dist/index308.js +3 -3
- package/dist/index310.cjs +1 -1
- package/dist/index310.js +1 -1
- package/dist/index311.cjs +1 -1
- package/dist/index311.js +5 -105
- package/dist/index312.cjs +1 -1
- package/dist/index312.js +2 -5
- package/dist/index313.cjs +1 -1
- package/dist/index313.js +22 -2
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +41 -41
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +1 -1
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +29 -24
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +40 -21
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +24 -24
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +2 -2
- 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 +1 -1
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +2 -2
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +98 -97
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +2 -2
- 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 +4 -4
- 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/index79.cjs +1 -1
- package/dist/index79.js +1 -1
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +53 -51
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +56 -55
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +55 -59
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +1 -1
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +1 -1
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +44 -42
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +41 -41
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +35 -34
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +28 -28
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +26 -26
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +1 -1
- package/package.json +1 -1
- package/dist/index314.cjs +0 -1
- package/dist/index314.js +0 -22
- package/dist/index315.cjs +0 -1
- package/dist/index315.js +0 -74
- package/dist/index316.cjs +0 -1
- package/dist/index316.js +0 -24
package/dist/index55.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index21.cjs"),C=require("./index214.cjs"),h=require("./index150.cjs"),A=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index21.cjs"),C=require("./index214.cjs"),h=require("./index150.cjs"),A=require("./index230.cjs"),f=require("./index231.cjs"),q=require("./index29.cjs"),w=require("./index33.cjs");async function R(r,{address:s,blockNumber:n,blockTag:i,gatewayUrls:o,strict:c,universalResolverAddress:d}){let t=d;if(!t){if(!r.chain)throw new Error("client chain not configured. universalResolverAddress is required.");t=C.getChainContractAddress({blockNumber:n,chain:r.chain,contract:"ensUniversalResolver"})}const u=`${s.toLowerCase().substring(2)}.addr.reverse`;try{const e={address:t,abi:g.universalResolverReverseAbi,functionName:"reverse",args:[h.toHex(f.packetToBytes(u))],blockNumber:n,blockTag:i},a=q.getAction(r,w.readContract,"readContract"),[l,v]=o?await a({...e,args:[...e.args,o]}):await a(e);return s.toLowerCase()!==v.toLowerCase()?null:l}catch(e){if(c)throw e;if(A.isNullUniversalResolverError(e,"reverse"))return null;throw e}}exports.getEnsName=R;
|
package/dist/index55.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { universalResolverReverseAbi as f } from "./index21.js";
|
|
2
2
|
import { getChainContractAddress as u } from "./index214.js";
|
|
3
3
|
import { toHex as h } from "./index150.js";
|
|
4
|
-
import { isNullUniversalResolverError as p } from "./
|
|
5
|
-
import { packetToBytes as C } from "./
|
|
4
|
+
import { isNullUniversalResolverError as p } from "./index230.js";
|
|
5
|
+
import { packetToBytes as C } from "./index231.js";
|
|
6
6
|
import { getAction as w } from "./index29.js";
|
|
7
7
|
import { readContract as A } from "./index33.js";
|
|
8
8
|
async function b(e, { address: t, blockNumber: s, blockTag: i, gatewayUrls: a, strict: c, universalResolverAddress: d }) {
|
package/dist/index56.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index214.cjs"),l=require("./index150.cjs"),v=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index214.cjs"),l=require("./index150.cjs"),v=require("./index231.cjs"),y=require("./index29.cjs"),f=require("./index33.cjs");async function g(n,t){const{blockNumber:o,blockTag:i,name:s}=t,{chain:e}=n,a=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!e)throw new Error("client chain not configured. universalResolverAddress is required.");return u.getChainContractAddress({blockNumber:o,chain:e,contract:"ensUniversalResolver"})})(),r=e==null?void 0:e.ensTlds;if(r&&!r.some(d=>s.endsWith(d)))throw new Error(`${s} is not a valid ENS TLD (${r==null?void 0:r.join(", ")}) for chain "${e.name}" (id: ${e.id}).`);const[c]=await y.getAction(n,f.readContract,"readContract")({address:a,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[l.toHex(v.packetToBytes(s))],blockNumber:o,blockTag:i});return c}exports.getEnsResolver=g;
|
package/dist/index56.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getChainContractAddress as l } from "./index214.js";
|
|
2
2
|
import { toHex as u } from "./index150.js";
|
|
3
|
-
import { packetToBytes as v } from "./
|
|
3
|
+
import { packetToBytes as v } from "./index231.js";
|
|
4
4
|
import { getAction as f } from "./index29.js";
|
|
5
5
|
import { readContract as m } from "./index33.js";
|
|
6
6
|
async function g(t, o) {
|
package/dist/index57.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index21.cjs"),q=require("./index170.cjs"),A=require("./index177.cjs"),R=require("./index214.cjs"),b=require("./index150.cjs"),f=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index21.cjs"),q=require("./index170.cjs"),A=require("./index177.cjs"),R=require("./index214.cjs"),b=require("./index150.cjs"),f=require("./index230.cjs"),y=require("./index203.cjs"),C=require("./index153.cjs"),x=require("./index231.cjs"),m=require("./index29.cjs"),w=require("./index33.cjs");async function T(s,r){const{blockNumber:a,blockTag:u,key:d,name:n,gatewayUrls:v,strict:g}=r,{chain:t}=s,h=(()=>{if(r.universalResolverAddress)return r.universalResolverAddress;if(!t)throw new Error("client chain not configured. universalResolverAddress is required.");return R.getChainContractAddress({blockNumber:a,chain:t,contract:"ensUniversalResolver"})})(),c=t==null?void 0:t.ensTlds;if(c&&!c.some(e=>n.endsWith(e)))return null;try{const e={address:h,abi:o.universalResolverResolveAbi,functionName:"resolve",args:[b.toHex(x.packetToBytes(n)),A.encodeFunctionData({abi:o.textResolverAbi,functionName:"text",args:[C.namehash(n),d]}),v??[y.localBatchGatewayUrl]],blockNumber:a,blockTag:u},i=await m.getAction(s,w.readContract,"readContract")(e);if(i[0]==="0x")return null;const l=q.decodeFunctionResult({abi:o.textResolverAbi,functionName:"text",data:i[0]});return l===""?null:l}catch(e){if(g)throw e;if(f.isNullUniversalResolverError(e,"resolve"))return null;throw e}}exports.getEnsText=T;
|
package/dist/index57.js
CHANGED
|
@@ -3,10 +3,10 @@ import { decodeFunctionResult as A } from "./index170.js";
|
|
|
3
3
|
import { encodeFunctionData as R } from "./index177.js";
|
|
4
4
|
import { getChainContractAddress as h } from "./index214.js";
|
|
5
5
|
import { toHex as b } from "./index150.js";
|
|
6
|
-
import { isNullUniversalResolverError as g } from "./
|
|
6
|
+
import { isNullUniversalResolverError as g } from "./index230.js";
|
|
7
7
|
import { localBatchGatewayUrl as w } from "./index203.js";
|
|
8
8
|
import { namehash as x } from "./index153.js";
|
|
9
|
-
import { packetToBytes as C } from "./
|
|
9
|
+
import { packetToBytes as C } from "./index231.js";
|
|
10
10
|
import { getAction as y } from "./index29.js";
|
|
11
11
|
import { readContract as N } from "./index33.js";
|
|
12
12
|
async function j(n, t) {
|
package/dist/index58.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 X=require("./index233.cjs"),Y=require("./index45.cjs"),z=require("./index21.cjs"),Z=require("./index234.cjs"),j=require("./index118.cjs"),A=require("./index38.cjs"),R=require("./index139.cjs"),L=require("./index127.cjs"),ee=require("./index170.cjs"),$=require("./index174.cjs"),te=require("./index177.cjs"),ae=require("./index214.cjs"),G=require("./index150.cjs"),re=require("./index235.cjs"),oe=require("./index236.cjs"),ce=require("./index184.cjs"),ne=require("./index49.cjs"),se=require("./index237.cjs"),ie=require("./index197.cjs"),M=require("./index238.cjs");async function ue(e,t){var O,P,H,T;const{account:a=e.account,authorizationList:i,batch:r=!!((O=e.batch)!=null&&O.multicall),blockNumber:h,blockTag:C="latest",accessList:k,blobs:v,blockOverrides:f,code:y,data:n,factory:b,factoryData:u,gas:x,gasPrice:w,maxFeePerBlobGas:m,maxFeePerGas:p,maxPriorityFeePerGas:g,nonce:q,to:o,value:I,stateOverride:J,...K}=t,D=a?Y.parseAccount(a):void 0;if(y&&(b||u))throw new A.BaseError("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(y&&o)throw new A.BaseError("Cannot provide both `code` & `to` as parameters.");const E=y&&n,N=b&&u&&o&&n,S=E||N,Q=E?fe({code:y,data:n}):N?be({data:n,factory:b,factoryData:u,to:o}):n;try{ie.assertRequest(t);const c=(typeof h=="bigint"?G.numberToHex(h):void 0)||C,l=f?X.toRpc(f):void 0,d=se.serializeStateOverride(J),V=(T=(H=(P=e.chain)==null?void 0:P.formatters)==null?void 0:H.transactionRequest)==null?void 0:T.format,F=(V||ce.formatTransactionRequest)({...oe.extract(K,{format:V}),from:D==null?void 0:D.address,accessList:k,authorizationList:i,blobs:v,data:Q,gas:x,gasPrice:w,maxFeePerBlobGas:m,maxFeePerGas:p,maxPriorityFeePerGas:g,nonce:q,to:S?void 0:o,value:I});if(r&&le({request:F})&&!d&&!l)try{return await de(e,{...F,blockNumber:h,blockTag:C})}catch(s){if(!(s instanceof R.ClientChainNotConfiguredError)&&!(s instanceof R.ChainDoesNotSupportContract))throw s}const U=(()=>{const s=[F,c];return d&&l?[...s,d,l]:d?[...s,d]:l?[...s,{},l]:s})(),_=await e.request({method:"eth_call",params:U});return _==="0x"?{data:void 0}:{data:_}}catch(B){const c=W(B),{offchainLookup:l,offchainLookupSignature:d}=await Promise.resolve().then(()=>require("./index201.cjs"));if(e.ccipRead!==!1&&(c==null?void 0:c.slice(0,10))===d&&o)return{data:await l(e,{data:c,to:o})};throw S&&(c==null?void 0:c.slice(0,10))==="0x101bb98d"?new L.CounterfactualDeploymentFailedError({factory:b}):re.getCallError(B,{...t,account:D,chain:e.chain})}}function le({request:e}){const{data:t,to:a,...i}=e;return!(!t||t.startsWith(Z.aggregate3Signature)||!a||Object.values(i).filter(r=>typeof r<"u").length>0)}async function de(e,t){var w;const{batchSize:a=1024,wait:i=0}=typeof((w=e.batch)==null?void 0:w.multicall)=="object"?e.batch.multicall:{},{blockNumber:r,blockTag:h="latest",data:C,multicallAddress:k,to:v}=t;let f=k;if(!f){if(!e.chain)throw new R.ClientChainNotConfiguredError;f=ae.getChainContractAddress({blockNumber:r,chain:e.chain,contract:"multicall3"})}const n=(typeof r=="bigint"?G.numberToHex(r):void 0)||h,{schedule:b}=ne.createBatchScheduler({id:`${e.uid}.${n}`,wait:i,shouldSplitBatch(m){return m.reduce((g,{data:q})=>g+(q.length-2),0)>a*2},fn:async m=>{const p=m.map(o=>({allowFailure:!0,callData:o.data,target:o.to})),g=te.encodeFunctionData({abi:z.multicall3Abi,args:[p],functionName:"aggregate3"}),q=await e.request({method:"eth_call",params:[{data:g,to:f},n]});return ee.decodeFunctionResult({abi:z.multicall3Abi,args:[p],functionName:"aggregate3",data:q||"0x"})}}),[{returnData:u,success:x}]=await b({data:C,to:v});if(!x)throw new L.RawContractError({data:u});return u==="0x"?{data:void 0}:{data:u}}function fe(e){const{code:t,data:a}=e;return $.encodeDeployData({abi:M.parseAbi(["constructor(bytes, bytes)"]),bytecode:j.deploylessCallViaBytecodeBytecode,args:[t,a]})}function be(e){const{data:t,factory:a,factoryData:i,to:r}=e;return $.encodeDeployData({abi:M.parseAbi(["constructor(address, bytes, address, bytes)"]),bytecode:j.deploylessCallViaFactoryBytecode,args:[r,t,a,i]})}function W(e){var a;if(!(e instanceof A.BaseError))return;const t=e.walk();return typeof(t==null?void 0:t.data)=="object"?(a=t.data)==null?void 0:a.data:t.data}exports.call=ue;exports.getRevertErrorData=W;
|
package/dist/index58.js
CHANGED
|
@@ -1,84 +1,85 @@
|
|
|
1
|
-
import { toRpc as
|
|
2
|
-
import { parseAccount as
|
|
3
|
-
import { multicall3Abi as
|
|
4
|
-
import { aggregate3Signature as
|
|
5
|
-
import { deploylessCallViaBytecodeBytecode as
|
|
1
|
+
import { toRpc as K } from "./index233.js";
|
|
2
|
+
import { parseAccount as Q } from "./index45.js";
|
|
3
|
+
import { multicall3Abi as H } from "./index21.js";
|
|
4
|
+
import { aggregate3Signature as U } from "./index234.js";
|
|
5
|
+
import { deploylessCallViaBytecodeBytecode as X, deploylessCallViaFactoryBytecode as Y } from "./index118.js";
|
|
6
6
|
import { BaseError as R } from "./index38.js";
|
|
7
|
-
import { ClientChainNotConfiguredError as
|
|
8
|
-
import { CounterfactualDeploymentFailedError as
|
|
9
|
-
import { decodeFunctionResult as
|
|
10
|
-
import { encodeDeployData as
|
|
11
|
-
import { encodeFunctionData as
|
|
12
|
-
import { getChainContractAddress as
|
|
13
|
-
import { numberToHex as
|
|
14
|
-
import { getCallError as
|
|
15
|
-
import { extract as
|
|
16
|
-
import { formatTransactionRequest as
|
|
17
|
-
import { createBatchScheduler as
|
|
18
|
-
import { serializeStateOverride as
|
|
19
|
-
import { assertRequest as
|
|
20
|
-
import { parseAbi as
|
|
21
|
-
async function
|
|
7
|
+
import { ClientChainNotConfiguredError as L, ChainDoesNotSupportContract as Z } from "./index139.js";
|
|
8
|
+
import { CounterfactualDeploymentFailedError as tt, RawContractError as at } from "./index127.js";
|
|
9
|
+
import { decodeFunctionResult as et } from "./index170.js";
|
|
10
|
+
import { encodeDeployData as T } from "./index174.js";
|
|
11
|
+
import { encodeFunctionData as rt } from "./index177.js";
|
|
12
|
+
import { getChainContractAddress as ot } from "./index214.js";
|
|
13
|
+
import { numberToHex as j } from "./index150.js";
|
|
14
|
+
import { getCallError as ct } from "./index235.js";
|
|
15
|
+
import { extract as nt } from "./index236.js";
|
|
16
|
+
import { formatTransactionRequest as st } from "./index184.js";
|
|
17
|
+
import { createBatchScheduler as it } from "./index49.js";
|
|
18
|
+
import { serializeStateOverride as lt } from "./index237.js";
|
|
19
|
+
import { assertRequest as ut } from "./index197.js";
|
|
20
|
+
import { parseAbi as G } from "./index238.js";
|
|
21
|
+
async function zt(t, a) {
|
|
22
22
|
var E, O, P, V;
|
|
23
|
-
const { account: e = t.account,
|
|
24
|
-
if (
|
|
23
|
+
const { account: e = t.account, authorizationList: i, batch: r = !!((E = t.batch) != null && E.multicall), blockNumber: p, blockTag: C = "latest", accessList: x, blobs: B, blockOverrides: f, code: b, data: n, factory: m, factoryData: l, gas: F, gasPrice: k, maxFeePerBlobGas: h, maxFeePerGas: y, maxPriorityFeePerGas: g, nonce: w, to: o, value: M, stateOverride: $, ...W } = a, D = e ? Q(e) : void 0;
|
|
24
|
+
if (b && (m || l))
|
|
25
25
|
throw new R("Cannot provide both `code` & `factory`/`factoryData` as parameters.");
|
|
26
|
-
if (
|
|
26
|
+
if (b && o)
|
|
27
27
|
throw new R("Cannot provide both `code` & `to` as parameters.");
|
|
28
|
-
const S =
|
|
29
|
-
code:
|
|
30
|
-
data:
|
|
31
|
-
}) : A ?
|
|
32
|
-
data:
|
|
33
|
-
factory:
|
|
34
|
-
factoryData:
|
|
28
|
+
const S = b && n, A = m && l && o && n, q = S || A, I = S ? mt({
|
|
29
|
+
code: b,
|
|
30
|
+
data: n
|
|
31
|
+
}) : A ? pt({
|
|
32
|
+
data: n,
|
|
33
|
+
factory: m,
|
|
34
|
+
factoryData: l,
|
|
35
35
|
to: o
|
|
36
|
-
}) :
|
|
36
|
+
}) : n;
|
|
37
37
|
try {
|
|
38
|
-
|
|
39
|
-
const c = (typeof
|
|
38
|
+
ut(a);
|
|
39
|
+
const c = (typeof p == "bigint" ? j(p) : void 0) || C, u = f ? K(f) : void 0, d = lt($), _ = (V = (P = (O = t.chain) == null ? void 0 : O.formatters) == null ? void 0 : P.transactionRequest) == null ? void 0 : V.format, N = (_ || st)({
|
|
40
40
|
// Pick out extra data that might exist on the chain's transaction request type.
|
|
41
|
-
...
|
|
41
|
+
...nt(W, { format: _ }),
|
|
42
42
|
from: D == null ? void 0 : D.address,
|
|
43
43
|
accessList: x,
|
|
44
|
+
authorizationList: i,
|
|
44
45
|
blobs: B,
|
|
45
|
-
data:
|
|
46
|
-
gas:
|
|
47
|
-
gasPrice:
|
|
48
|
-
maxFeePerBlobGas:
|
|
49
|
-
maxFeePerGas:
|
|
50
|
-
maxPriorityFeePerGas:
|
|
51
|
-
nonce:
|
|
46
|
+
data: I,
|
|
47
|
+
gas: F,
|
|
48
|
+
gasPrice: k,
|
|
49
|
+
maxFeePerBlobGas: h,
|
|
50
|
+
maxFeePerGas: y,
|
|
51
|
+
maxPriorityFeePerGas: g,
|
|
52
|
+
nonce: w,
|
|
52
53
|
to: q ? void 0 : o,
|
|
53
|
-
value:
|
|
54
|
+
value: M
|
|
54
55
|
});
|
|
55
|
-
if (
|
|
56
|
+
if (r && dt({ request: N }) && !d && !u)
|
|
56
57
|
try {
|
|
57
|
-
return await
|
|
58
|
+
return await ft(t, {
|
|
58
59
|
...N,
|
|
59
|
-
blockNumber:
|
|
60
|
-
blockTag:
|
|
60
|
+
blockNumber: p,
|
|
61
|
+
blockTag: C
|
|
61
62
|
});
|
|
62
63
|
} catch (s) {
|
|
63
|
-
if (!(s instanceof
|
|
64
|
+
if (!(s instanceof L) && !(s instanceof Z))
|
|
64
65
|
throw s;
|
|
65
66
|
}
|
|
66
|
-
const
|
|
67
|
+
const J = (() => {
|
|
67
68
|
const s = [
|
|
68
69
|
N,
|
|
69
70
|
c
|
|
70
71
|
];
|
|
71
|
-
return
|
|
72
|
-
})(),
|
|
72
|
+
return d && u ? [...s, d, u] : d ? [...s, d] : u ? [...s, {}, u] : s;
|
|
73
|
+
})(), z = await t.request({
|
|
73
74
|
method: "eth_call",
|
|
74
|
-
params:
|
|
75
|
+
params: J
|
|
75
76
|
});
|
|
76
|
-
return
|
|
77
|
+
return z === "0x" ? { data: void 0 } : { data: z };
|
|
77
78
|
} catch (v) {
|
|
78
|
-
const c =
|
|
79
|
-
if (t.ccipRead !== !1 && (c == null ? void 0 : c.slice(0, 10)) ===
|
|
80
|
-
return { data: await
|
|
81
|
-
throw q && (c == null ? void 0 : c.slice(0, 10)) === "0x101bb98d" ? new
|
|
79
|
+
const c = bt(v), { offchainLookup: u, offchainLookupSignature: d } = await import("./index201.js");
|
|
80
|
+
if (t.ccipRead !== !1 && (c == null ? void 0 : c.slice(0, 10)) === d && o)
|
|
81
|
+
return { data: await u(t, { data: c, to: o }) };
|
|
82
|
+
throw q && (c == null ? void 0 : c.slice(0, 10)) === "0x101bb98d" ? new tt({ factory: m }) : ct(v, {
|
|
82
83
|
...a,
|
|
83
84
|
account: D,
|
|
84
85
|
chain: t.chain
|
|
@@ -87,75 +88,75 @@ async function _t(t, a) {
|
|
|
87
88
|
}
|
|
88
89
|
function dt({ request: t }) {
|
|
89
90
|
const { data: a, to: e, ...i } = t;
|
|
90
|
-
return !(!a || a.startsWith(
|
|
91
|
+
return !(!a || a.startsWith(U) || !e || Object.values(i).filter((r) => typeof r < "u").length > 0);
|
|
91
92
|
}
|
|
92
|
-
async function
|
|
93
|
-
var
|
|
94
|
-
const { batchSize: e = 1024, wait: i = 0 } = typeof ((
|
|
95
|
-
let
|
|
96
|
-
if (!
|
|
93
|
+
async function ft(t, a) {
|
|
94
|
+
var k;
|
|
95
|
+
const { batchSize: e = 1024, wait: i = 0 } = typeof ((k = t.batch) == null ? void 0 : k.multicall) == "object" ? t.batch.multicall : {}, { blockNumber: r, blockTag: p = "latest", data: C, multicallAddress: x, to: B } = a;
|
|
96
|
+
let f = x;
|
|
97
|
+
if (!f) {
|
|
97
98
|
if (!t.chain)
|
|
98
|
-
throw new
|
|
99
|
-
|
|
99
|
+
throw new L();
|
|
100
|
+
f = ot({
|
|
100
101
|
blockNumber: r,
|
|
101
102
|
chain: t.chain,
|
|
102
103
|
contract: "multicall3"
|
|
103
104
|
});
|
|
104
105
|
}
|
|
105
|
-
const
|
|
106
|
-
id: `${t.uid}.${
|
|
106
|
+
const n = (typeof r == "bigint" ? j(r) : void 0) || p, { schedule: m } = it({
|
|
107
|
+
id: `${t.uid}.${n}`,
|
|
107
108
|
wait: i,
|
|
108
|
-
shouldSplitBatch(
|
|
109
|
-
return
|
|
109
|
+
shouldSplitBatch(h) {
|
|
110
|
+
return h.reduce((g, { data: w }) => g + (w.length - 2), 0) > e * 2;
|
|
110
111
|
},
|
|
111
|
-
fn: async (
|
|
112
|
-
const
|
|
112
|
+
fn: async (h) => {
|
|
113
|
+
const y = h.map((o) => ({
|
|
113
114
|
allowFailure: !0,
|
|
114
|
-
callData:
|
|
115
|
-
target:
|
|
116
|
-
})),
|
|
117
|
-
abi:
|
|
118
|
-
args: [
|
|
115
|
+
callData: o.data,
|
|
116
|
+
target: o.to
|
|
117
|
+
})), g = rt({
|
|
118
|
+
abi: H,
|
|
119
|
+
args: [y],
|
|
119
120
|
functionName: "aggregate3"
|
|
120
|
-
}),
|
|
121
|
+
}), w = await t.request({
|
|
121
122
|
method: "eth_call",
|
|
122
123
|
params: [
|
|
123
124
|
{
|
|
124
|
-
data:
|
|
125
|
-
to:
|
|
125
|
+
data: g,
|
|
126
|
+
to: f
|
|
126
127
|
},
|
|
127
|
-
|
|
128
|
+
n
|
|
128
129
|
]
|
|
129
130
|
});
|
|
130
|
-
return
|
|
131
|
-
abi:
|
|
132
|
-
args: [
|
|
131
|
+
return et({
|
|
132
|
+
abi: H,
|
|
133
|
+
args: [y],
|
|
133
134
|
functionName: "aggregate3",
|
|
134
|
-
data:
|
|
135
|
+
data: w || "0x"
|
|
135
136
|
});
|
|
136
137
|
}
|
|
137
|
-
}), [{ returnData:
|
|
138
|
+
}), [{ returnData: l, success: F }] = await m({ data: C, to: B });
|
|
138
139
|
if (!F)
|
|
139
|
-
throw new
|
|
140
|
-
return
|
|
140
|
+
throw new at({ data: l });
|
|
141
|
+
return l === "0x" ? { data: void 0 } : { data: l };
|
|
141
142
|
}
|
|
142
|
-
function
|
|
143
|
+
function mt(t) {
|
|
143
144
|
const { code: a, data: e } = t;
|
|
144
|
-
return
|
|
145
|
-
abi:
|
|
146
|
-
bytecode:
|
|
145
|
+
return T({
|
|
146
|
+
abi: G(["constructor(bytes, bytes)"]),
|
|
147
|
+
bytecode: X,
|
|
147
148
|
args: [a, e]
|
|
148
149
|
});
|
|
149
150
|
}
|
|
150
|
-
function
|
|
151
|
+
function pt(t) {
|
|
151
152
|
const { data: a, factory: e, factoryData: i, to: r } = t;
|
|
152
|
-
return
|
|
153
|
-
abi:
|
|
154
|
-
bytecode:
|
|
153
|
+
return T({
|
|
154
|
+
abi: G(["constructor(address, bytes, address, bytes)"]),
|
|
155
|
+
bytecode: Y,
|
|
155
156
|
args: [r, a, e, i]
|
|
156
157
|
});
|
|
157
158
|
}
|
|
158
|
-
function
|
|
159
|
+
function bt(t) {
|
|
159
160
|
var e;
|
|
160
161
|
if (!(t instanceof R))
|
|
161
162
|
return;
|
|
@@ -163,6 +164,6 @@ function pt(t) {
|
|
|
163
164
|
return typeof (a == null ? void 0 : a.data) == "object" ? (e = a.data) == null ? void 0 : e.data : a.data;
|
|
164
165
|
}
|
|
165
166
|
export {
|
|
166
|
-
|
|
167
|
-
|
|
167
|
+
zt as call,
|
|
168
|
+
bt as getRevertErrorData
|
|
168
169
|
};
|
package/dist/index59.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./index45.cjs"),R=require("./index150.cjs"),F=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./index45.cjs"),R=require("./index150.cjs"),F=require("./index235.cjs"),H=require("./index236.cjs"),T=require("./index184.cjs"),G=require("./index197.cjs");async function N(e,s){var c,o,n;const{account:r=e.account,blockNumber:a,blockTag:b="latest",blobs:l,data:q,gas:d,gasPrice:f,maxFeePerBlobGas:g,maxFeePerGas:x,maxPriorityFeePerGas:h,to:p,value:y,...P}=s,t=r?L.parseAccount(r):void 0;try{G.assertRequest(s);const k=(typeof a=="bigint"?R.numberToHex(a):void 0)||b,i=(n=(o=(c=e.chain)==null?void 0:c.formatters)==null?void 0:o.transactionRequest)==null?void 0:n.format,A=(i||T.formatTransactionRequest)({...H.extract(P,{format:i}),from:t==null?void 0:t.address,blobs:l,data:q,gas:d,gasPrice:f,maxFeePerBlobGas:g,maxFeePerGas:x,maxPriorityFeePerGas:h,to:p,value:y}),m=await e.request({method:"eth_createAccessList",params:[A,k]});return{accessList:m.accessList,gasUsed:BigInt(m.gasUsed)}}catch(u){throw F.getCallError(u,{...s,account:t,chain:e.chain})}}exports.createAccessList=N;
|
package/dist/index59.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { parseAccount as L } from "./index45.js";
|
|
2
2
|
import { numberToHex as A } from "./index150.js";
|
|
3
|
-
import { getCallError as G } from "./
|
|
4
|
-
import { extract as H } from "./
|
|
3
|
+
import { getCallError as G } from "./index235.js";
|
|
4
|
+
import { extract as H } from "./index236.js";
|
|
5
5
|
import { formatTransactionRequest as N } from "./index184.js";
|
|
6
6
|
import { assertRequest as R } from "./index197.js";
|
|
7
7
|
async function E(t, r) {
|
package/dist/index60.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index239.cjs");async function o(e){const r=c.createFilterRequestScope(e,{method:"eth_newBlockFilter"}),t=await e.request({method:"eth_newBlockFilter"});return{id:t,request:r(t),type:"block"}}exports.createBlockFilter=o;
|
package/dist/index60.js
CHANGED
package/dist/index61.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index176.cjs"),u=require("./index150.cjs"),q=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index176.cjs"),u=require("./index150.cjs"),q=require("./index239.cjs");async function f(o,{address:d,args:s,event:e,events:p,fromBlock:n,strict:b,toBlock:i}={}){const r=p??(e?[e]:void 0),l=q.createFilterRequestScope(o,{method:"eth_newFilter"});let t=[];r&&(t=[r.flatMap(a=>m.encodeEventTopics({abi:[a],eventName:a.name,args:s}))],e&&(t=t[0]));const c=await o.request({method:"eth_newFilter",params:[{address:d,fromBlock:typeof n=="bigint"?u.numberToHex(n):n,toBlock:typeof i=="bigint"?u.numberToHex(i):i,...t.length?{topics:t}:{}}]});return{abi:r,args:s,eventName:e?e.name:void 0,fromBlock:n,id:c,request:l(c),strict:!!b,toBlock:i,type:"event"}}exports.createEventFilter=f;
|
package/dist/index61.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { encodeEventTopics as b } from "./index176.js";
|
|
2
2
|
import { numberToHex as m } from "./index150.js";
|
|
3
|
-
import { createFilterRequestScope as h } from "./
|
|
3
|
+
import { createFilterRequestScope as h } from "./index239.js";
|
|
4
4
|
async function l(r, { address: p, args: a, event: e, events: c, fromBlock: n, strict: f, toBlock: i } = {}) {
|
|
5
5
|
const o = c ?? (e ? [e] : void 0), u = h(r, {
|
|
6
6
|
method: "eth_newFilter"
|
package/dist/index62.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index239.cjs");async function i(e){const n=r.createFilterRequestScope(e,{method:"eth_newPendingTransactionFilter"}),t=await e.request({method:"eth_newPendingTransactionFilter"});return{id:t,request:n(t),type:"transaction"}}exports.createPendingTransactionFilter=i;
|
package/dist/index62.js
CHANGED
package/dist/index64.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./index45.cjs"),N=require("./index38.cjs"),_=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./index45.cjs"),N=require("./index38.cjs"),_=require("./index240.cjs"),y=require("./index150.cjs"),I=require("./index241.cjs"),V=require("./index236.cjs"),j=require("./index184.cjs"),C=require("./index237.cjs"),M=require("./index197.cjs"),$=require("./index96.cjs"),D=require("./index66.cjs");async function J(r,n){var m,f,q;const{account:d=r.account}=n,e=d?L.parseAccount(d):void 0;try{let w=function(u){const{block:o,request:t,rpcStateOverride:s}=u;return r.request({method:"eth_estimateGas",params:s?[t,o??"latest",s]:o?[t,o]:[t]})};const{accessList:i,authorizationList:a,blobs:G,blobVersionedHashes:z,blockNumber:b,blockTag:H,data:l,gas:O,gasPrice:P,maxFeePerBlobGas:R,maxFeePerGas:T,maxPriorityFeePerGas:k,nonce:A,value:B,stateOverride:E,...c}=await $.prepareTransactionRequest(r,{...n,parameters:(e==null?void 0:e.type)==="local"?void 0:["blobVersionedHashes"]}),h=(typeof b=="bigint"?y.numberToHex(b):void 0)||H,p=C.serializeStateOverride(E),S=await(async()=>{if(c.to)return c.to;if(a&&a.length>0)return await _.recoverAuthorizationAddress({authorization:a[0]}).catch(()=>{throw new N.BaseError("`to` is required. Could not infer from `authorizationList`")})})();M.assertRequest(n);const v=(q=(f=(m=r.chain)==null?void 0:m.formatters)==null?void 0:f.transactionRequest)==null?void 0:q.format,g=(v||j.formatTransactionRequest)({...V.extract(c,{format:v}),from:e==null?void 0:e.address,accessList:i,authorizationList:a,blobs:G,blobVersionedHashes:z,data:l,gas:O,gasPrice:P,maxFeePerBlobGas:R,maxFeePerGas:T,maxPriorityFeePerGas:k,nonce:A,to:S,value:B});let x=BigInt(await w({block:h,request:g,rpcStateOverride:p}));if(a){const u=await D.getBalance(r,{address:g.from}),o=await Promise.all(a.map(async t=>{const{address:s}=t,F=await w({block:h,request:{authorizationList:void 0,data:l,from:e==null?void 0:e.address,to:s,value:y.numberToHex(u)},rpcStateOverride:p}).catch(()=>100000n);return 2n*BigInt(F)}));x+=o.reduce((t,s)=>t+s,0n)}return x}catch(i){throw I.getEstimateGasError(i,{...n,account:e,chain:r.chain})}}exports.estimateGas=J;
|
package/dist/index64.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { parseAccount as N } from "./index45.js";
|
|
2
2
|
import { BaseError as S } from "./index38.js";
|
|
3
|
-
import { recoverAuthorizationAddress as _ } from "./
|
|
3
|
+
import { recoverAuthorizationAddress as _ } from "./index240.js";
|
|
4
4
|
import { numberToHex as G } from "./index150.js";
|
|
5
|
-
import { getEstimateGasError as I } from "./
|
|
6
|
-
import { extract as V } from "./
|
|
5
|
+
import { getEstimateGasError as I } from "./index241.js";
|
|
6
|
+
import { extract as V } from "./index236.js";
|
|
7
7
|
import { formatTransactionRequest as C } from "./index184.js";
|
|
8
|
-
import { serializeStateOverride as j } from "./
|
|
8
|
+
import { serializeStateOverride as j } from "./index237.js";
|
|
9
9
|
import { assertRequest as D } from "./index197.js";
|
|
10
10
|
import { prepareTransactionRequest as J } from "./index96.js";
|
|
11
11
|
import { getBalance as K } from "./index66.js";
|
package/dist/index73.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index242.cjs"),d=require("./index29.cjs"),f=require("./index33.cjs");async function g(a,i){const{address:n,factory:r,factoryData:o}=i;try{const[e,t,c,s,u,m,y]=await d.getAction(a,f.readContract,"readContract")({abi:l,address:n,functionName:"eip712Domain",factory:r,factoryData:o});return{domain:{name:t,version:c,chainId:Number(s),verifyingContract:u,salt:m},extensions:y,fields:e}}catch(e){const t=e;throw t.name==="ContractFunctionExecutionError"&&t.cause.name==="ContractFunctionZeroDataError"?new p.Eip712DomainNotFoundError({address:n}):t}}const l=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];exports.getEip712Domain=g;
|
package/dist/index73.js
CHANGED
package/dist/index74.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index150.cjs"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index150.cjs"),a=require("./index243.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/index74.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { numberToHex as o } from "./index150.js";
|
|
2
|
-
import { formatFeeHistory as f } from "./
|
|
2
|
+
import { formatFeeHistory as f } from "./index243.js";
|
|
3
3
|
async function u(r, { blockCount: i, blockNumber: e, blockTag: n = "latest", rewardPercentiles: s }) {
|
|
4
4
|
const t = typeof e == "bigint" ? o(e) : void 0, a = await r.request({
|
|
5
5
|
method: "eth_feeHistory",
|
package/dist/index79.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index150.cjs"),u=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index150.cjs"),u=require("./index248.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/index79.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { numberToHex as c } from "./index150.js";
|
|
2
|
-
import { formatProof as s } from "./
|
|
2
|
+
import { formatProof as s } from "./index248.js";
|
|
3
3
|
async function d(t, { address: e, blockNumber: o, blockTag: r, storageKeys: n }) {
|
|
4
4
|
const f = r ?? "latest", a = o !== void 0 ? c(o) : void 0, m = await t.request({
|
|
5
5
|
method: "eth_getProof",
|
package/dist/index84.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("./index21.cjs"),v=require("./index122.cjs"),_=require("./index38.cjs"),x=require("./index127.cjs"),O=require("./index170.cjs"),T=require("./index177.cjs"),B=require("./index214.cjs"),j=require("./index221.cjs"),M=require("./index29.cjs"),Z=require("./index33.cjs");async function $(l,m){var D;const{account:w,allowFailure:u=!0,batchSize:k,blockNumber:C,blockTag:p,multicallAddress:z,stateOverride:R}=m,d=m.contracts,q=k??(typeof((D=l.batch)==null?void 0:D.multicall)=="object"&&l.batch.multicall.batchSize||1024);let g=z;if(!g){if(!l.chain)throw new Error("client chain not configured. multicallAddress is required.");g=B.getChainContractAddress({blockNumber:C,chain:l.chain,contract:"multicall3"})}const r=[[]];let a=0,f=0;for(let t=0;t<d.length;t++){const{abi:c,address:s,args:e,functionName:i}=d[t];try{const n=T.encodeFunctionData({abi:c,args:e,functionName:i});f+=(n.length-2)/2,q>0&&f>q&&r[a].length>0&&(a++,f=(n.length-2)/2,r[a]=[]),r[a]=[...r[a],{allowFailure:!0,callData:n,target:s}]}catch(n){const b=j.getContractError(n,{abi:c,address:s,args:e,docsPath:"/docs/contract/multicall",functionName:i,sender:w});if(!u)throw b;r[a]=[...r[a],{allowFailure:!0,callData:"0x",target:s}]}}const A=await Promise.allSettled(r.map(t=>M.getAction(l,Z.readContract,"readContract")({abi:P.multicall3Abi,account:w,address:g,args:[t],blockNumber:C,blockTag:p,functionName:"aggregate3",stateOverride:R}))),o=[];for(let t=0;t<A.length;t++){const c=A[t];if(c.status==="rejected"){if(!u)throw c.reason;for(let e=0;e<r[t].length;e++)o.push({status:"failure",error:c.reason,result:void 0});continue}const s=c.value;for(let e=0;e<s.length;e++){const{returnData:i,success:n}=s[e],{callData:b}=r[t][e],{abi:S,address:N,functionName:E,args:F}=d[o.length];try{if(b==="0x")throw new v.AbiDecodingZeroDataError;if(!n)throw new x.RawContractError({data:i});const h=O.decodeFunctionResult({abi:S,args:F,data:i,functionName:E});o.push(u?{result:h,status:"success"}:h)}catch(h){const y=j.getContractError(h,{abi:S,address:N,args:F,docsPath:"/docs/contract/multicall",functionName:E});if(!u)throw y;o.push({error:y,result:void 0,status:"failure"})}}}if(o.length!==d.length)throw new _.BaseError("multicall results mismatch");return o}exports.multicall=$;
|