1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,664409,e=>{"use strict";var t=e.i(473444);class r extends t.BaseError{constructor({docsPath:e}={}){super("Could not find an Account to execute with this Action.\nPlease provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client.",{docsPath:e,docsSlug:"account",name:"AccountNotFoundError"})}}class a extends t.BaseError{constructor({docsPath:e,metaMessages:t,type:r}){super(`Account type "${r}" is not supported.`,{docsPath:e,metaMessages:t,name:"AccountTypeNotSupportedError"})}}e.s(["AccountNotFoundError",()=>r,"AccountTypeNotSupportedError",()=>a])},436081,985759,826396,e=>{"use strict";var t=e.i(225605),r=e.i(502395),a=e.i(421675);async function i({hash:e,signature:i}){var n;let s;return n=await (0,a.recoverPublicKey)({hash:e,signature:i}),s=(0,r.keccak256)(`0x${n.substring(4)}`).substring(26),(0,t.checksumAddress)(`0x${s}`)}e.s(["recoverAddress",()=>i],985759);var n=e.i(9402),s=e.i(461730),o=e.i(283591),c=e.i(473444),u=e.i(903079);function l(e,t="hex"){let r=function e(t){var r,a;let i,n,o,c;return Array.isArray(t)?(n=m(i=(r=t.map(t=>e(t))).reduce((e,t)=>e+t.length,0)),{length:i<=55?1+i:1+n+i,encode(e){for(let{encode:t}of(i<=55?e.pushByte(192+i):(e.pushByte(247+n),1===n?e.pushUint8(i):2===n?e.pushUint16(i):3===n?e.pushUint24(i):e.pushUint32(i)),r))t(e)}}):(c=m((o="string"==typeof(a=t)?(0,s.hexToBytes)(a):a).length),{length:1===o.length&&o[0]<128?1:o.length<=55?1+o.length:1+c+o.length,encode(e){1===o.length&&o[0]<128||(o.length<=55?e.pushByte(128+o.length):(e.pushByte(183+c),1===c?e.pushUint8(o.length):2===c?e.pushUint16(o.length):3===c?e.pushUint24(o.length):e.pushUint32(o.length))),e.pushBytes(o)}})}(e),a=(0,u.createCursor)(new Uint8Array(r.length));return(r.encode(a),"hex"===t)?(0,o.bytesToHex)(a.bytes):a.bytes}function d(e,t="bytes"){return l(e,t)}function p(e,t="hex"){return l(e,t)}function m(e){if(e<256)return 1;if(e<65536)return 2;if(e<0x1000000)return 3;if(e<0x100000000)return 4;throw new c.BaseError("Length is too large.")}async function y(e){let{authorization:t,signature:a}=e;return i({hash:function(e){let{chainId:t,nonce:a,to:i}=e,c=e.contractAddress??e.address,u=(0,r.keccak256)((0,n.concatHex)(["0x05",l([t?(0,o.numberToHex)(t):"0x",c,a?(0,o.numberToHex)(a):"0x"])]));return"bytes"===i?(0,s.hexToBytes)(u):u}(t),signature:a??t})}e.s(["bytesToRlp",()=>d,"hexToRlp",()=>p,"toRlp",()=>l],826396),e.s(["recoverAuthorizationAddress",()=>y],436081)},867584,e=>{"use strict";var t=e.i(320794);function r({chain:e,currentChainId:r}){if(!e)throw new t.ChainNotFoundError;if(r!==e.id)throw new t.ChainMismatchError({chain:e,currentChainId:r})}e.s(["assertCurrentChain",()=>r])},411997,894666,e=>{"use strict";var t=e.i(86228),r=e.i(705987),a=e.i(397257);function i(e,{docsPath:i,...n}){let s,o=(s=(0,a.getNodeError)(e,n))instanceof t.UnknownNodeError?e:s;return new r.TransactionExecutionError(o,{docsPath:i,...n})}e.s(["getTransactionError",()=>i],411997);var n=e.i(811005);async function s(e){let t=await e.request({method:"eth_chainId"},{dedupe:!0});return(0,n.hexToNumber)(t)}e.s(["getChainId",()=>s],894666)},453864,26596,548828,36093,376062,57814,493419,990672,e=>{"use strict";var t=e.i(329809),r=e.i(473444);class a extends r.BaseError{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class i extends r.BaseError{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class n extends r.BaseError{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${(0,t.formatGwei)(e)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}e.s(["BaseFeeScalarError",()=>a,"Eip1559FeesNotSupportedError",()=>i,"MaxFeePerGasTooLowError",()=>n],26596);var s=e.i(708249),o=e.i(811005),c=r;class u extends c.BaseError{constructor({blockHash:e,blockNumber:t}){let r="Block";e&&(r=`Block at hash "${e}"`),t&&(r=`Block at number "${t}"`),super(`${r} could not be found.`,{name:"BlockNotFoundError"})}}e.s(["BlockNotFoundError",()=>u],548828);var l=e.i(283591),d=e.i(32988);let p={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function m(e,t){let r={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,...null!=e.blockTimestamp&&{blockTimestamp:BigInt(e.blockTimestamp)},chainId:e.chainId?(0,o.hexToNumber)(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?(0,o.hexToNumber)(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?p[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(r.authorizationList=e.authorizationList.map(e=>({address:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:e.r,s:e.s,yParity:Number(e.yParity)}))),r.yParity=(()=>
1{if(e.yParity)return Number(e.yParity);if("bigint"==typeof r.v){if(0n===r.v||27n===r.v)return 0;if(1n===r.v||28n===r.v)return 1;if(r.v>=35n)return+(r.v%2n===0n)}})(),"legacy"===r.type&&(delete r.accessList,delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas,delete r.yParity),"eip2930"===r.type&&(delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas),"eip1559"===r.type&&delete r.maxFeePerBlobGas,r}let y=(0,d.defineFormatter)("transaction",m);function f(e,t){let r=(e.transactions??[]).map(e=>"string"==typeof e?e:m(e));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:r,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}e.s(["defineTransaction",0,y,"formatTransaction",()=>m,"transactionType",0,p],36093);let h=(0,d.defineFormatter)("block",f);async function g(e,{blockHash:t,blockNumber:r,blockTag:a=e.experimental_blockTag??"latest",includeTransactions:i}={}){let n=i??!1,s=void 0!==r?(0,l.numberToHex)(r):void 0,o=null;if(!(o=t?await e.request({method:"eth_getBlockByHash",params:[t,n]},{dedupe:!0}):await e.request({method:"eth_getBlockByNumber",params:[s||a,n]},{dedupe:!!s})))throw new u({blockHash:t,blockNumber:r});return(e.chain?.formatters?.block?.format||f)(o,"getBlock")}async function b(e){return BigInt(await e.request({method:"eth_gasPrice"}))}async function P(e,t){return v(e,t)}async function v(e,t){let{block:r,chain:a=e.chain,request:n}=t||{};try{let t=a?.fees?.maxPriorityFeePerGas??a?.fees?.defaultPriorityFee;if("function"==typeof t){let a=r||await (0,s.getAction)(e,g,"getBlock")({}),i=await t({block:a,client:e,request:n});if(null===i)throw Error();return i}if(void 0!==t)return t;let i=await e.request({method:"eth_maxPriorityFeePerGas"});return(0,o.hexToBigInt)(i)}catch{let[t,a]=await Promise.all([r?Promise.resolve(r):(0,s.getAction)(e,g,"getBlock")({}),(0,s.getAction)(e,b,"getGasPrice")({})]);if("bigint"!=typeof t.baseFeePerGas)throw new i;let n=a-t.baseFeePerGas;if(n<0n)return 0n;return n}}async function x(e,t){return w(e,t)}async function w(e,t){let{block:r,chain:n=e.chain,request:o,type:c="eip1559"}=t||{},u=await (async()=>"function"==typeof n?.fees?.baseFeeMultiplier?n.fees.baseFeeMultiplier({block:r,client:e,request:o}):n?.fees?.baseFeeMultiplier??1.2)();if(u<1)throw new a;let l=u.toString().split(".")[1]?.length??0,d=10**l,p=e=>e*BigInt(Math.ceil(u*d))/BigInt(d),m=r||await (0,s.getAction)(e,g,"getBlock")({});if("function"==typeof n?.fees?.estimateFeesPerGas){let t=await n.fees.estimateFeesPerGas({block:r,client:e,multiply:p,request:o,type:c});if(null!==t)return t}if("eip1559"===c){if("bigint"!=typeof m.baseFeePerGas)throw new i;let t="bigint"==typeof o?.maxPriorityFeePerGas?o.maxPriorityFeePerGas:await v(e,{block:m,chain:n,request:o}),r=p(m.baseFeePerGas);return{maxFeePerGas:o?.maxFeePerGas??r+t,maxPriorityFeePerGas:t}}return{gasPrice:o?.gasPrice??p(await (0,s.getAction)(e,b,"getGasPrice")({}))}}e.s(["defineBlock",0,h,"formatBlock",()=>f],376062),e.s(["getBlock",()=>g],57814),e.s(["getGasPrice",()=>b],493419),e.s(["estimateMaxPriorityFeePerGas",()=>P,"internal_estimateMaxPriorityFeePerGas",()=>v],990672),e.s(["estimateFeesPerGas",()=>x,"internal_estimateFeesPerGas",()=>w],453864)},702112,832367,e=>{"use strict";var t=e.i(113593),r=e.i(329809),a=e.i(473444),i=e.i(705987);class n extends a.BaseError{constructor(e,{account:a,docsPath:n,chain:s,data:o,gas:c,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:p,to:m,value:y}){const f=(0,i.prettyPrint)({from:a?.address,to:m,value:void 0!==y&&`${(0,t.formatEther)(y)} ${s?.nativeCurrency?.symbol||"ETH"}`,data:o,gas:c,gasPrice:void 0!==u&&`${(0,r.formatGwei)(u)} gwei`,maxFeePerGas:void 0!==l&&`${(0,r.formatGwei)(l)} gwei`,maxPriorityFeePerGas:void 0!==d&&`${(0,r.formatGwei)(d)} gwei`,nonce:p});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",f].filter(
1Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}e.s(["EstimateGasExecutionError",()=>n],832367);var s=e.i(86228),o=e.i(397257);function c(e,{docsPath:t,...r}){let a;return new n((a=(0,o.getNodeError)(e,r))instanceof s.UnknownNodeError?e:a,{docsPath:t,...r})}e.s(["getEstimateGasError",()=>c],702112)},180935,e=>{"use strict";e.s(["estimateGas",()=>d]);var t=e.i(103886),r=e.i(473444),a=e.i(436081),i=e.i(283591),n=e.i(702112),s=e.i(650338),o=e.i(310381),c=e.i(272642),u=e.i(853685),l=e.i(650936);async function d(e,d){let{account:p=e.account,prepare:m=!0}=d,y=p?(0,t.parseAccount)(p):void 0,f=Array.isArray(m)?m:y?.type!=="local"?["blobVersionedHashes"]:void 0;try{let t=await (async()=>d.to?d.to:d.authorizationList&&d.authorizationList.length>0?await (0,a.recoverAuthorizationAddress)({authorization:d.authorizationList[0]}).catch(()=>{throw new r.BaseError("`to` is required. Could not infer from `authorizationList`")}):void 0)(),{accessList:n,authorizationList:p,blobs:h,blobVersionedHashes:g,blockNumber:b,blockTag:P,data:v,gas:x,gasPrice:w,maxFeePerBlobGas:T,maxFeePerGas:E,maxPriorityFeePerGas:B,nonce:F,value:G,stateOverride:I,...k}=m?await (0,l.prepareTransactionRequest)(e,{...d,parameters:f,to:t}):d;if(x&&d.gas!==x)return x;let A=("bigint"==typeof b?(0,i.numberToHex)(b):void 0)||P,z=(0,c.serializeStateOverride)(I);(0,u.assertRequest)(d);let S=e.chain?.formatters?.transactionRequest?.format,C=(S||o.formatTransactionRequest)({...(0,s.extract)(k,{format:S}),account:y,accessList:n,authorizationList:p,blobs:h,blobVersionedHashes:g,data:v,gasPrice:w,maxFeePerBlobGas:T,maxFeePerGas:E,maxPriorityFeePerGas:B,nonce:F,to:t,value:G},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:z?[C,A??e.experimental_blockTag??"latest",z]:A?[C,A]:[C]}))}catch(t){throw(0,n.getEstimateGasError)(t,{...d,account:y,chain:e.chain})}}},302128,806205,484668,444204,975812,869997,29917,902764,369207,335258,196965,e=>{"use strict";var t=e.i(811005),r=e.i(283591);async function a(e,{address:a,blockTag:i="latest",blockNumber:n}){let s=await e.request({method:"eth_getTransactionCount",params:[a,"bigint"==typeof n?(0,r.numberToHex)(n):i]},{dedupe:!!n});return(0,t.hexToNumber)(s)}e.s(["getTransactionCount",()=>a],302128);var i=e.i(461730);function n(e){let{kzg:t}=e,a=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),n="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,i.hexToBytes)(e)):e.blobs,s=[];for(let e of n)s.push(Uint8Array.from(t.blobToKzgCommitment(e)));return"bytes"===a?s:s.map(e=>(0,r.bytesToHex)(e))}function s(e){let{kzg:t}=e,a=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),n="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,i.hexToBytes)(e)):e.blobs,s="string"==typeof e.commitments[0]?e.commitments.map(e=>(0,i.hexToBytes)(e)):e.commitments,o=[];for(let e=0;e<n.length;e++){let r=n[e],a=s[e];o.push(Uint8Array.from(t.computeBlobKzgProof(r,a)))}return"bytes"===a?o:o.map(e=>(0,r.bytesToHex)(e))}e.s(["blobsToCommitments",()=>n],806205),e.s(["blobsToProofs",()=>s],484668);var o=e.i(403893),c=e.i(236299);function u(e,t){let a=(0,o.sha256)((0,c.isHex)(e,{strict:!1})?(0,i.toBytes)(e):e);return"bytes"===(t||"hex")?a:(0,r.toHex)(a)}function l(e){let{commitment:t,version:a=1}=e,i=e.to??("string"==typeof t?"hex":"bytes"),n=u(t,"bytes");return n.set([a],0),"bytes"===i?n:(0,r.bytesToHex)(n)}function d(e){let{commitments:t,version:r}=e,a=e.to??("string"==typeof t[0]?"hex":"bytes"),i=[];for(let e of t)i.push(l({commitment:e,to:a,version:r}));return i}e.s(["sha256",()=>u],444204),e.s(["commitmentToVersionedHash",()=>l],975812),e.s(["commitmentsToVersionedHashes",()=>d],869997);e.s(["versionedHashVersionKzg",0,1],29917);var p=e.i(473444);class m extends p.BaseError{constructor({maxSize:e,size:t}){super("Blob size is too large.",{metaMessages:[`Max: ${e} bytes`,`Given: ${t} bytes`],name:"BlobSizeTooLargeError"})}}class y extends p.BaseError{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class f extends p.BaseError{constructor({hash:e,size:t}){super(`Versioned hash "${e}
1" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${t}`],name:"InvalidVersionedHashSizeError"})}}class h extends p.BaseError{constructor({hash:e,version:t}){super(`Versioned hash "${e}" version is invalid.`,{metaMessages:["Expected: 1",`Received: ${t}`],name:"InvalidVersionedHashVersionError"})}}e.s(["BlobSizeTooLargeError",()=>m,"EmptyBlobError",()=>y,"InvalidVersionedHashSizeError",()=>f,"InvalidVersionedHashVersionError",()=>h],902764);var g=e.i(903079),b=e.i(386350);function P(e){let t=e.to??("string"==typeof e.data?"hex":"bytes"),a="string"==typeof e.data?(0,i.hexToBytes)(e.data):e.data,n=(0,b.size)(a);if(!n)throw new y;if(n>761855)throw new m({maxSize:761855,size:n});let s=[],o=!0,c=0;for(;o;){let e=(0,g.createCursor)(new Uint8Array(131072)),t=0;for(;t<4096;){let r=a.slice(c,c+31);if(e.pushByte(0),e.pushBytes(r),r.length<31){e.pushByte(128),o=!1;break}t++,c+=31}s.push(e)}return"bytes"===t?s.map(e=>e.bytes):s.map(e=>(0,r.bytesToHex)(e.bytes))}function v(e){let{data:t,kzg:r,to:a}=e,i=e.blobs??P({data:t,to:a}),o=e.commitments??n({blobs:i,kzg:r,to:a}),c=e.proofs??s({blobs:i,commitments:o,kzg:r,to:a}),u=[];for(let e=0;e<i.length;e++)u.push({blob:i[e],commitment:o[e],proof:c[e]});return u}e.s(["toBlobs",()=>P],369207),e.s(["toBlobSidecars",()=>v],335258);var x=e.i(705987);function w(e){if(e.type)return e.type;if(void 0!==e.authorizationList)return"eip7702";if(void 0!==e.blobs||void 0!==e.blobVersionedHashes||void 0!==e.maxFeePerBlobGas||void 0!==e.sidecars)return"eip4844";if(void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas)return"eip1559";if(void 0!==e.gasPrice)return void 0!==e.accessList?"eip2930":"legacy";throw new x.InvalidSerializableTransactionError({transaction:e})}e.s(["getTransactionType",()=>w],196965)},650936,847232,e=>{"use strict";e.s(["defaultParameters",()=>x,"prepareTransactionRequest",()=>E],650936);var t=e.i(103886),r=e.i(453864),a=e.i(180935),i=e.i(57814),n=e.i(302128),s=e.i(26596),o=e.i(806205),c=e.i(484668),u=e.i(869997),l=e.i(335258),d=e.i(708249),p=e.i(296542),m=e.i(853685),y=e.i(196965),f=e.i(411997),h=e.i(650338),g=e.i(36093),b=e.i(310381),P=e.i(894666);async function v(e,r){let{account:a=e.account,accessList:n,authorizationList:o,chain:c=e.chain,blobVersionedHashes:u,blobs:l,data:p,gas:y,gasPrice:v,maxFeePerBlobGas:x,maxFeePerGas:w,maxPriorityFeePerGas:T,nonce:E,nonceManager:B,to:F,type:G,value:I,...k}=r,A=await (async()=>{if(!a||!B||void 0!==E)return E;let r=(0,t.parseAccount)(a),i=c?c.id:await (0,d.getAction)(e,P.getChainId,"getChainId")({});return await B.consume({address:r.address,chainId:i,client:e})})();(0,m.assertRequest)(r);let z=c?.formatters?.transactionRequest?.format,S=(z||b.formatTransactionRequest)({...(0,h.extract)(k,{format:z}),account:a?(0,t.parseAccount)(a):void 0,accessList:n,authorizationList:o,blobs:l,blobVersionedHashes:u,data:p,gas:y,gasPrice:v,maxFeePerBlobGas:x,maxFeePerGas:w,maxPriorityFeePerGas:T,nonce:A,to:F,type:G,value:I},"fillTransaction");try{let t=await e.request({method:"eth_fillTransaction",params:[S]}),a=(c?.formatters?.transaction?.format||g.formatTransaction)(t.tx);delete a.blockHash,delete a.blockNumber,delete a.r,delete a.s,delete a.transactionIndex,delete a.v,delete a.yParity,a.data=a.input,a.gas&&(a.gas=r.gas??a.gas),a.gasPrice&&(a.gasPrice=r.gasPrice??a.gasPrice),a.maxFeePerBlobGas&&(a.maxFeePerBlobGas=r.maxFeePerBlobGas??a.maxFeePerBlobGas),a.maxFeePerGas&&(a.maxFeePerGas=r.maxFeePerGas??a.maxFeePerGas),a.maxPriorityFeePerGas&&(a.maxPriorityFeePerGas=r.maxPriorityFeePerGas??a.maxPriorityFeePerGas),void 0!==a.nonce&&(a.nonce=r.nonce??a.nonce);let n=await (async()=>{if("function"==typeof c?.fees?.baseFeeMultiplier){let t=await (0,d.getAction)(e,i.getBlock,"getBlock")({});return c.fees.baseFeeMultiplier({block:t,client:e,request:r})}return c?.fees?.baseFeeMultiplier??1.2})();if(n<1)throw new s.BaseFeeScalarError;let o=n.toString().split(".")[1]?.length??0,u=10**o,l=e=>e*BigInt(Math.ceil(n*u))/BigInt(u);return a.feePayerSignature||(a.maxFeePerGas&&!r.maxFeePerGas&&(a.maxFeePerGas=l(a.maxFeePerGas)),a.gasPrice&&!r.gasPrice&&(a.gasPrice=l(a.gasPrice))),{raw:t.raw,transaction:{from:S.from,...a},...t.capabilities?{capabilities:t.capabilities}:{}}}catch(t){throw(0,f.getTransactionError)(t,{...r,chain:e.chain})}}e.s(["fillTransaction",()=>v],847232);let x=["blobVersionedHashes","chainId","fees","gas","nonce","type"],w=new Map,T=new p.LruMap(128);async function E(e,p){let f,h,g=p;g.account??=e.account,g.parameters??=x;let{account:b,chain:E=e.chain,nonceManager:B,parameters:F}=g,G="function"==typeof E?.prepareTransactionRequest?{fn:E.prepareTransactionRequest,runAt:["beforeFillTransaction"]}:Array.isArray(E?.prepareTransactionRequest)?{fn:E.prepareTransactionRequest[0],runAt:E.prepareTransactionRequest[1].runAt}:void 0;async function I(){return f?f:void 0!==g.chainId?g.chainId:E?E.id:f=await (0,d.getAction)(e,P.getChainId,"getChainId")({})}let k=b?(0,t.parseAccount)(b):b,A=g.nonce;if(F.includes("nonce")&&void 0===A&&k&&B){let t=await I();A=await B.consume({address:k.address,chainId:t,client:e})}G?.fn&&G.runAt?.includes("beforeFillTransaction")&&(g=await G.fn({...g,chain:E},{phase:"beforeFillTransaction"}),A??=g.nonce);let z=(!(F.includes("blobVersionedHashes")||F.includes("sidecars"))||!g.kzg||!g.blobs)&&!1!==T.get(e.uid)&&["fees","gas"].some(e=>F.includes(e))&&(F.includes("chainId")&&"number"!=typeof g.chainId||F.includes("nonce")&&"number"!=typeof A||F.includes("fees")&&"bigint"!=typeof g.gasPrice&&("bigint"!=typeof g.maxFeePerGas||"bigint"!=typeof g.maxPriorityFeePerGas)||F.includes("gas")&&"bigint"!=typeof g.gas)?await (0,d.getAction)(e,v,"fillTransaction")({...g,nonce:A}).then(t=>{let{chainId:r,from:a,gas:i,gasPrice:n,nonce:s,maxFeePerBlobGas:o,maxFeePerGas:c,maxPriorityFeePerGas:u,type:l,...d}=t.transaction;
1return T.set(e.uid,!0),{...g,...a?{from:a}:{},...l&&!g.type?{type:l}:{},...void 0!==r?{chainId:r}:{},...void 0!==i?{gas:i}:{},...void 0!==n?{gasPrice:n}:{},...void 0!==s?{nonce:s}:{},...void 0!==o&&"legacy"!==g.type&&"eip2930"!==g.type?{maxFeePerBlobGas:o}:{},...void 0!==c&&"legacy"!==g.type&&"eip2930"!==g.type?{maxFeePerGas:c}:{},...void 0!==u&&"legacy"!==g.type&&"eip2930"!==g.type?{maxPriorityFeePerGas:u}:{},..."nonceKey"in d&&void 0!==d.nonceKey?{nonceKey:d.nonceKey}:{},..."keyAuthorization"in d&&void 0!==d.keyAuthorization&&null!==d.keyAuthorization&&!("keyAuthorization"in g)?{keyAuthorization:d.keyAuthorization}:{},..."feePayerSignature"in d&&void 0!==d.feePayerSignature&&null!==d.feePayerSignature?{feePayerSignature:d.feePayerSignature}:{},..."feeToken"in d&&void 0!==d.feeToken&&null!==d.feeToken&&!("feeToken"in g)?{feeToken:d.feeToken}:{},...t.capabilities?{_capabilities:t.capabilities}:{}}}).catch(t=>{if("TransactionExecutionError"!==t.name)return g;if(t.walk?.(e=>"ExecutionRevertedError"===e.name))throw t;return t.walk?.(e=>"MethodNotFoundRpcError"===e.name||"MethodNotSupportedRpcError"===e.name||e.message?.includes("eth_fillTransaction is not available"))&&T.set(e.uid,!1),g}):g;A??=z.nonce;let{blobs:S,gas:C,kzg:N,type:M}=g={...z,...k?{from:k?.address}:{},...void 0!==A?{nonce:A}:{}};async function R(){return h||(h=await (0,d.getAction)(e,i.getBlock,"getBlock")({blockTag:"latest"}))}if(G?.fn&&G.runAt?.includes("beforeFillParameters")&&(g=await G.fn({...g,chain:E},{phase:"beforeFillParameters"})),F.includes("nonce")&&void 0===A&&k&&!B&&(g.nonce=await (0,d.getAction)(e,n.getTransactionCount,"getTransactionCount")({address:k.address,blockTag:"pending"})),(F.includes("blobVersionedHashes")||F.includes("sidecars"))&&S&&N){let e=(0,o.blobsToCommitments)({blobs:S,kzg:N});if(F.includes("blobVersionedHashes")){let t=(0,u.commitmentsToVersionedHashes)({commitments:e,to:"hex"});g.blobVersionedHashes=t}if(F.includes("sidecars")){let t=(0,c.blobsToProofs)({blobs:S,commitments:e,kzg:N}),r=(0,l.toBlobSidecars)({blobs:S,commitments:e,proofs:t,to:"hex"});g.sidecars=r}}if(F.includes("chainId")&&(g.chainId=await I()),(F.includes("fees")||F.includes("type"))&&void 0===M)try{g.type=(0,y.getTransactionType)(g)}catch{let t=w.get(e.uid);if(void 0===t){let r=await R();t="bigint"==typeof r?.baseFeePerGas,w.set(e.uid,t)}g.type=t?"eip1559":"legacy"}if(F.includes("fees"))if("legacy"!==g.type&&"eip2930"!==g.type){if(void 0===g.maxFeePerGas||void 0===g.maxPriorityFeePerGas){let t=await R(),{maxFeePerGas:a,maxPriorityFeePerGas:i}=await (0,r.internal_estimateFeesPerGas)(e,{block:t,chain:E,request:g});if(void 0===g.maxPriorityFeePerGas&&g.maxFeePerGas&&g.maxFeePerGas<i)throw new s.MaxFeePerGasTooLowError({maxPriorityFeePerGas:i});g.maxPriorityFeePerGas=i,g.maxFeePerGas=a}}else{if(void 0!==g.maxFeePerGas||void 0!==g.maxPriorityFeePerGas)throw new s.Eip1559FeesNotSupportedError;if(void 0===g.gasPrice){let t=await R(),{gasPrice:a}=await (0,r.internal_estimateFeesPerGas)(e,{block:t,chain:E,request:g,type:"legacy"});g.gasPrice=a}}return F.includes("gas")&&void 0===C&&(g.gas=await (0,d.getAction)(e,a.estimateGas,"estimateGas")({...g,account:k,prepare:k?.type==="local"?[]:["blobVersionedHashes"]})),G?.fn&&G.runAt?.includes("afterFillParameters")&&(g=await G.fn({...g,chain:E},{phase:"afterFillParameters"})),(0,m.assertRequest)(g),delete g.parameters,g}},519865,638854,e=>{"use strict";var t=e.i(103886),r=e.i(664409),a=e.i(473444),i=e.i(436081),n=e.i(867584),s=e.i(9402),o=e.i(411997),c=e.i(650338),u=e.i(310381),l=e.i(708249),d=e.i(296542),p=e.i(853685),m=e.i(894666),y=e.i(650936);async function f(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}e.s(["sendRawTransaction",()=>f],638854);let h=new d.LruMap(128);async function g(e,d){let{account:g=e.account,assertChainId:b=!0,chain:P=e.chain,accessList:v,authorizationList:x,blobs:w,data:T,dataSuffix:E="string"==typeof e.dataSuffix?e.dataSuffix:e.dataSuffix?.value,gas:B,gasPrice:F,maxFeePerBlobGas:G,maxFeePerGas:I,maxPriorityFeePerGas:k,nonce:A,type:z,value:S,...C}=d;if(void 0===g)throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransaction"});let N=g?(0,t.parseAccount)(g):null;try{(0,p.assertRequest)(d);let t=await (async()=>d.to?d.to:null!==d.to&&x&&x.length>0?await (0,i.recoverAuthorizationAddress)({authorization:x[0]}).catch(()=>{throw new a.BaseError("`to` is required. Could not infer from `authorizationList`.")}):void 0)();if(N?.type==="json-rpc"||null===N){let r;null!==P&&(r=await (0,l.getAction)(e,m.getChainId,"getChainId")({}),b&&(0,n.assertCurrentChain)({currentChainId:r,chain:P}));let a=e.chain?.formatters?.transactionRequest?.format,i=(a||u.formatTransactionRequest)({...(0,c.extract)(C,{format:a}),accessList:v,account:N,authorizationList:x,blobs:w,chainId:r,data:E?(0,s.concat)([T??"0x",E]):T,gas:B,gasPrice:F,maxFeePerBlobGas:G,maxFeePerGas:I,maxPriorityFeePerGas:k,nonce:A,to:t,type:z,value:S},"sendTransaction"),o=h.get(e.uid);try{return await e.request({method:o?"wallet_sendTransaction":"eth_sendTransaction",params:[i]},{retryCount:0})}catch(t){if(!1===o)throw t;if("InvalidInputRpcError"===t.name||"InvalidParamsRpcError"===t.name||"MethodNotFoundRpcError"===t.name||"MethodNotSupportedRpcError"===t.name)return await e.request({method:"wallet_sendTransaction",params:[i]},{retryCount:0}).then(t=>(h.set(e.uid,!0),t)).catch(r=>{if("MethodNotFoundRpcError"===r.name||"MethodNotSupportedRpcError"===r.name)throw h.set(e.uid,!1),t;throw r});throw t}}if(N?.type==="local"){let r=await (0,l.getAction)(e,y.prepareTransactionRequest,"prepareTransactionRequest")({account:N,accessList:v,authorizationList:x,blobs:w,chain:P,data:E?(0,s.concat)([T??"0x",E]):T,gas:B,gasPrice:F,maxFeePerBlobGas:G,maxFeePerGas:I,maxPriorityFeePerGas:k,nonce:A,nonceManager:N.nonceManager,parameters:[...y.defaultParameters,"sidecars"],type:z,value:S,...C,to:t}),a=P?.serializers?.transaction,i=await N.signTransaction(r,{serializer:a});return await (0,l.getAction)(e,f,"sendRawTransaction")({serializedTransaction:i})}if(N?.type==="smart")throw new r.AccountTypeNotSupportedError({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"});throw new r.AccountTypeNotSupportedError({docsPath:"/docs/actions/wallet/sendTransaction",type:N?.type})}catch(e){if(e instanceof r.AccountTypeNotSupportedError)throw e;throw(0,o.getTransactionError)(e,{...d,account:N,chain:d.chain||void 0})}}e.s(["sendTransaction",()=>g],519865)},67933,e=>{"use strict";var t=e.i(418622);function r(e,a={}){let{key:i="custom",methods:n,name:s="Custom Provider",retryDelay:o}=a;return({retryCount:r})=>(0,t.createTransport)({key:i,methods:n,name:s,request:e.request.bind(e),retryCount:a.retryCount??r,retryDelay:o,type:"custom"})}e.s(["custom",()=>r])},889666,e=>{"use strict";var t=e.i(473494),r=e.i(473444);class a extends r.BaseError{constructor({domain:e}){super(`Invalid domain "${(0,t.stringify)(e)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class i extends r.BaseError{constructor({primaryType:e,types:t}){super(`Invalid primary type \`${e}\` must be one of \`${JSON.stringify(Object.keys(t))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class n extends r.BaseError{constructor({type:e}){super(`Struct type "${e}
1" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}e.s(["InvalidDomainError",()=>a,"InvalidPrimaryTypeError",()=>i,"InvalidStructTypeError",()=>n])},414165,e=>{"use strict";e.s(["hashDomain",()=>o,"hashStruct",()=>c,"hashTypedData",()=>s]);var t=e.i(434014),r=e.i(9402),a=e.i(283591),i=e.i(502395),n=e.i(971568);function s(e){let{domain:t={},message:a,primaryType:s}=e,u={EIP712Domain:(0,n.getTypesForEIP712Domain)({domain:t}),...e.types};(0,n.validateTypedData)({domain:t,message:a,primaryType:s,types:u});let l=["0x1901"];return t&&l.push(o({domain:t,types:u})),"EIP712Domain"!==s&&l.push(c({data:a,primaryType:s,types:u})),(0,i.keccak256)((0,r.concat)(l))}function o({domain:e,types:t}){return c({data:e,primaryType:"EIP712Domain",types:t})}function c({data:e,primaryType:r,types:n}){let s=function e({data:r,primaryType:n,types:s}){let o=[{type:"bytes32"}],c=[function({primaryType:e,types:t}){let r=(0,a.toHex)(function({primaryType:e,types:t}){let r="",a=function e({primaryType:t,types:r},a=new Set){let i=t.match(/^\w*/u),n=i?.[0];if(a.has(n)||void 0===r[n])return a;for(let t of(a.add(n),r[n]))e({primaryType:t.type,types:r},a);return a}({primaryType:e,types:t});for(let i of(a.delete(e),[e,...Array.from(a).sort()]))r+=`${i}(${t[i].map(({name:e,type:t})=>`${t} ${e}`).join(",")})`;return r}({primaryType:e,types:t}));return(0,i.keccak256)(r)}({primaryType:n,types:s})];for(let u of s[n]){let[n,l]=function r({types:n,name:s,type:o,value:c}){if(void 0!==n[o])return[{type:"bytes32"},(0,i.keccak256)(e({data:c,primaryType:o,types:n}))];if("bytes"===o)return[{type:"bytes32"},(0,i.keccak256)(c)];if("string"===o)return[{type:"bytes32"},(0,i.keccak256)((0,a.toHex)(c))];if(o.lastIndexOf("]")===o.length-1){let e=o.slice(0,o.lastIndexOf("[")),a=c.map(t=>r({name:s,type:e,types:n,value:t}));return[{type:"bytes32"},(0,i.keccak256)((0,t.encodeAbiParameters)(a.map(([e])=>e),a.map(([,e])=>e)))]}return[{type:o},c]}({types:s,name:u.name,type:u.type,value:r[u.name]});o.push(n),c.push(l)}return(0,t.encodeAbiParameters)(o,c)}({data:e,primaryType:r,types:n});return(0,i.keccak256)(s)}},971568,e=>{"use strict";e.s(["domainSeparator",()=>m,"getTypesForEIP712Domain",()=>p,"serializeTypedData",()=>l,"validateTypedData",()=>d]);var t=e.i(665343),r=e.i(4135),a=e.i(889666),i=e.i(14832),n=e.i(386350),s=e.i(283591),o=e.i(40774),c=e.i(414165),u=e.i(473494);function l(e){let{domain:t,message:r,primaryType:a,types:i}=e,n=(e,t)=>{let r={...t};for(let t of e){let{name:e,type:a}=t;"address"===a&&(r[e]=r[e].toLowerCase())}return r},s=i.EIP712Domain&&t?n(i.EIP712Domain,t):{},o=(()=>{if("EIP712Domain"!==a)return n(i[a],r)})();return(0,u.stringify)({domain:s,message:o,primaryType:a,types:i})}function d(e){let{domain:c,message:u,primaryType:l,types:d}=e,p=(e,c)=>{for(let u of e){let{name:e,type:l}=u,m=c[e],y=l.match(o.integerRegex);if(y&&("number"==typeof m||"bigint"==typeof m)){let[e,t,r]=y;(0,s.numberToHex)(m,{signed:"int"===t,size:Number.parseInt(r,10)/8})}if("address"===l&&"string"==typeof m&&!(0,i.isAddress)(m))throw new r.InvalidAddressError({address:m});let f=l.match(o.bytesRegex);if(f){let[e,r]=f;if(r&&(0,n.size)(m)!==Number.parseInt(r,10))throw new t.BytesSizeMismatchError({expectedSize:Number.parseInt(r,10),givenSize:(0,n.size)(m)})}let h=d[l];h&&(function(e){if("address"===e||"bool"===e||"string"===e||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new a.InvalidStructTypeError({type:e})}(l),p(h,m))}};if(d.EIP712Domain&&c){if("object"!=typeof c)throw new a.InvalidDomainError({domain:c});p(d.EIP712Domain,c)}if("EIP712Domain"!==l)if(d[l])p(d[l],u);else throw new a.InvalidPrimaryTypeError({primaryType:l,types:d})}function p({domain:e}){return["string"==typeof e?.name&&{name:"name",type:"string"},e?.version&&{name:"version",type:"string"},("number"==typeof e?.chainId||"bigint"==typeof e?.chainId)&&{name:"chainId",type:"uint256"},e?.verifyingContract&&{name:"verifyingContract",type:"address"},e?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}function m({domain:e}){return(0,c.hashDomain)({domain:e,types:{EIP712Domain:p({domain:e})}})}},354047,e=>{"use strict";var t=e.i(103886),r=e.i(664409),a=e.i(971568);async function i(e,i){let{account:n=e.account,domain:s,message:o,primaryType:c}=i;
1if(!n)throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTypedData"});let u=(0,t.parseAccount)(n),l={EIP712Domain:(0,a.getTypesForEIP712Domain)({domain:s}),...i.types};if((0,a.validateTypedData)({domain:s,message:o,primaryType:c,types:l}),u.signTypedData)return u.signTypedData({domain:s,message:o,primaryType:c,types:l});let d=(0,a.serializeTypedData)({domain:s,message:o,primaryType:c,types:l});return e.request({method:"eth_signTypedData_v4",params:[u.address,d]},{retryCount:0})}e.s(["signTypedData",()=>i])}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.