@latticexyz/explorer 2.2.15-entrykit-a877ba6af0cdb570e41dbc27197c4403130394a2 → 2.2.15-entrykit-c9413176891b246d2ca7a7e061a6414f34770349
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/.next/standalone/packages/explorer/.next/BUILD_ID +1 -1
- package/.next/standalone/packages/explorer/.next/app-build-manifest.json +34 -34
- package/.next/standalone/packages/explorer/.next/app-path-routes-manifest.json +1 -1
- package/.next/standalone/packages/explorer/.next/build-manifest.json +2 -2
- package/.next/standalone/packages/explorer/.next/prerender-manifest.json +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/(explorer)/[chainName]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/(explorer)/[chainName]/worlds/[worldAddress]/explore/page.js +3 -3
- package/.next/standalone/packages/explorer/.next/server/app/(explorer)/[chainName]/worlds/[worldAddress]/explore/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/(explorer)/[chainName]/worlds/[worldAddress]/interact/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/(explorer)/[chainName]/worlds/[worldAddress]/observe/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/(explorer)/[chainName]/worlds/[worldAddress]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/(explorer)/[chainName]/worlds/page.js +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/(explorer)/[chainName]/worlds/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/(explorer)/api/world-abi/route.js +8 -11
- package/.next/standalone/packages/explorer/.next/server/app/(explorer)/api/world-abi/route.js.nft.json +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/(explorer)/page.js +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/(explorer)/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/_not-found.rsc +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/internal/observer-relay/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/internal/observer-relay.html +1 -1
- package/.next/standalone/packages/explorer/.next/server/app/internal/observer-relay.rsc +1 -1
- package/.next/standalone/packages/explorer/.next/server/app-paths-manifest.json +4 -4
- package/.next/standalone/packages/explorer/.next/server/chunks/6561.js +1 -1
- package/.next/standalone/packages/explorer/.next/server/chunks/7555.js +3 -3
- package/.next/standalone/packages/explorer/.next/server/chunks/965.js +2 -2
- package/.next/standalone/packages/explorer/.next/server/middleware-build-manifest.js +1 -1
- package/.next/standalone/packages/explorer/.next/server/pages/404.html +1 -1
- package/.next/standalone/packages/explorer/.next/server/pages/500.html +1 -1
- package/.next/standalone/packages/explorer/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/packages/explorer/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/packages/explorer/.next/static/chunks/app/(explorer)/[chainName]/worlds/[worldAddress]/interact/page-045170dd7214f0c7.js +1 -0
- package/.next/standalone/packages/explorer/.next/static/chunks/app/(explorer)/[chainName]/worlds/[worldAddress]/{layout-016ae5b2f5a5e2da.js → layout-ae2b94d38f489df9.js} +1 -1
- package/package.json +10 -10
- package/.next/standalone/packages/explorer/.next/server/chunks/555.js +0 -1
- package/.next/standalone/packages/explorer/.next/static/chunks/app/(explorer)/[chainName]/worlds/[worldAddress]/interact/page-c49d20af32aa3b94.js +0 -1
- /package/.next/standalone/packages/explorer/.next/static/{xsq1PKEysTn4U_riu8Gw_ → ToJx50TTKB8PuQMpY2Yhk}/_buildManifest.js +0 -0
- /package/.next/standalone/packages/explorer/.next/static/{xsq1PKEysTn4U_riu8Gw_ → ToJx50TTKB8PuQMpY2Yhk}/_ssgManifest.js +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";exports.id=965,exports.ids=[965],exports.modules={20080:(e,t,s)=>{function n(e){if(!Number.isSafeInteger(e)||e<0)throw Error(`positive integer expected, not ${e}`)}function i(e,...t){if(!(e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function r(e){if("function"!=typeof e||"function"!=typeof e.create)throw Error("Hash should be wrapped by utils.wrapConstructor");n(e.outputLen),n(e.blockLen)}function o(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function a(e,t){i(e);let s=t.outputLen;if(e.length<s)throw Error(`digestInto() expects output buffer of length at least ${s}`)}s.d(t,{Gg:()=>o,J8:()=>a,Rx:()=>n,aI:()=>i,vp:()=>r})},11120:(e,t,s)=>{s.d(t,{JQ:()=>d});var n=s(20080),i=s(31916);let r=(e,t,s)=>e&t^~e&s,o=(e,t,s)=>e&t^e&s^t&s;class a extends i.kb{constructor(e,t,s,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=s,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,i.GL)(this.buffer)}update(e){(0,n.Gg)(this);let{view:t,buffer:s,blockLen:r}=this,o=(e=(0,i.O0)(e)).length;for(let n=0;n<o;){let a=Math.min(r-this.pos,o-n);if(a===r){let t=(0,i.GL)(e);for(;r<=o-n;n+=r)this.process(t,n);continue}s.set(e.subarray(n,n+a),this.pos),this.pos+=a,n+=a,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,n.Gg)(this),(0,n.J8)(e,this),this.finished=!0;let{buffer:t,view:s,blockLen:r,isLE:o}=this,{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>r-a&&(this.process(s,0),a=0);for(let e=a;e<r;e++)t[e]=0;(function(e,t,s,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,s,n);let i=BigInt(32),r=BigInt(4294967295),o=Number(s>>i&r),a=Number(s&r),l=n?4:0,c=n?0:4;e.setUint32(t+l,o,n),e.setUint32(t+c,a,n)})(s,r-8,BigInt(8*this.length),o),this.process(s,0);let l=(0,i.GL)(e),c=this.outputLen;if(c%4)throw Error("_sha2: outputLen should be aligned to 32bit");let u=c/4,h=this.get();if(u>h.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<u;e++)l.setUint32(4*e,h[e],o)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let s=e.slice(0,t);return this.destroy(),s}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:s,length:n,finished:i,destroyed:r,pos:o}=this;return e.length=n,e.pos=o,e.finished=i,e.destroyed=r,n%t&&e.buffer.set(s),e}}let l=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),c=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint32Array(64);class h extends a{constructor(){super(64,32,8,!1),this.A=0|c[0],this.B=0|c[1],this.C=0|c[2],this.D=0|c[3],this.E=0|c[4],this.F=0|c[5],this.G=0|c[6],this.H=0|c[7]}get(){let{A:e,B:t,C:s,D:n,E:i,F:r,G:o,H:a}=this;return[e,t,s,n,i,r,o,a]}set(e,t,s,n,i,r,o,a){this.A=0|e,this.B=0|t,this.C=0|s,this.D=0|n,this.E=0|i,this.F=0|r,this.G=0|o,this.H=0|a}process(e,t){for(let s=0;s<16;s++,t+=4)u[s]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=u[e-15],s=u[e-2],n=(0,i.np)(t,7)^(0,i.np)(t,18)^t>>>3,r=(0,i.np)(s,17)^(0,i.np)(s,19)^s>>>10;u[e]=r+u[e-7]+n+u[e-16]|0}let{A:s,B:n,C:a,D:c,E:h,F:d,G:f,H:p}=this;for(let e=0;e<64;e++){let t=p+((0,i.np)(h,6)^(0,i.np)(h,11)^(0,i.np)(h,25))+r(h,d,f)+l[e]+u[e]|0,g=((0,i.np)(s,2)^(0,i.np)(s,13)^(0,i.np)(s,22))+o(s,n,a)|0;p=f,f=d,d=h,h=c+t|0,c=a,a=n,n=s,s=t+g|0}s=s+this.A|0,n=n+this.B|0,a=a+this.C|0,c=c+this.D|0,h=h+this.E|0,d=d+this.F|0,f=f+this.G|0,p=p+this.H|0,this.set(s,n,a,c,h,d,f,p)}roundClean(){u.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}let d=(0,i.hE)(()=>new h)},31916:(e,t,s)=>{s.d(t,{kb:()=>g,l1:()=>d,eV:()=>p,GL:()=>l,iA:()=>u,O6:()=>m,np:()=>c,O0:()=>f,Jq:()=>a,hE:()=>b});var n=s(6005),i=s.t(n,2);let r=i&&"object"==typeof i&&"webcrypto"in i?n.webcrypto:i&&"object"==typeof i&&"randomBytes"in i?i:void 0;var o=s(20080);let a=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),l=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),c=(e,t)=>e<<32-t|e>>>t,u=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],h=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255;function d(e){for(let t=0;t<e.length;t++)e[t]=h(e[t])}function f(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}(e)),(0,o.aI)(e),e}function p(...e){let t=0;for(let s=0;s<e.length;s++){let n=e[s];(0,o.aI)(n),t+=n.length}let s=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){let i=e[t];s.set(i,n),n+=i.length}return s}class g{clone(){return this._cloneInto()}}function b(e){let t=t=>e().update(f(t)).digest(),s=e();return t.outputLen=s.outputLen,t.blockLen=s.blockLen,t.create=()=>e(),t}function m(e=32){if(r&&"function"==typeof r.getRandomValues)return r.getRandomValues(new Uint8Array(e));if(r&&"function"==typeof r.randomBytes)return r.randomBytes(e);throw Error("crypto.getRandomValues must be defined")}},89272:(e,t,s)=>{s.d(t,{O:()=>n});let n=(0,s(38596).a)({id:31337,name:"Anvil",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"],webSocket:["ws://127.0.0.1:8545"]}}})},7769:(e,t,s)=>{s.d(t,{t:()=>n});let n=(0,s(38596).a)({id:31337,name:"Foundry",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"],webSocket:["ws://127.0.0.1:8545"]}}})},18061:(e,t,s)=>{s.d(t,{T:()=>i});var n=s(23272);let i=(0,s(38596).a)({...n.i,name:"Garnet Testnet",testnet:!0,id:17069,sourceId:17e3,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.garnetchain.com"],webSocket:["wss://rpc.garnetchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.garnetchain.com"}},contracts:{...n.i.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{17e3:{address:"0x57ee40586fbE286AfC75E67cb69511A6D9aF5909",blockCreated:1274684}},l2OutputOracle:{17e3:{address:"0xCb8E7AC561b8EF04F2a15865e9fbc0766FEF569B",blockCreated:1274684}},l1StandardBridge:{17e3:{address:"0x09bcDd311FE398F80a78BE37E489f5D440DB95DE",blockCreated:1274684}}}})},27094:(e,t,s)=>{s.d(t,{g:()=>i});var n=s(23272);let i=(0,s(38596).a)({...n.i,name:"Redstone",id:690,sourceId:1,nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.redstonechain.com"],webSocket:["wss://rpc.redstonechain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.redstone.xyz"}},contracts:{...n.i.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{1:{address:"0xC7bCb0e8839a28A1cFadd1CF716de9016CdA51ae",blockCreated:19578329}},l2OutputOracle:{1:{address:"0xa426A052f657AEEefc298b3B5c35a470e4739d69",blockCreated:19578337}},l1StandardBridge:{1:{address:"0xc473ca7E02af24c129c2eEf51F2aDf0411c1Df69",blockCreated:19578331}}}})},968:(e,t,s)=>{s.d(t,{l:()=>n});let n=1},2380:(e,t,s)=>{s.d(t,{zL:()=>n});let n=2n**256n-1n},19612:(e,t,s)=>{s.d(t,{Zn:()=>i,ez:()=>n});let n={gwei:9,wei:18},i={ether:-9,wei:9}},35130:(e,t,s)=>{s.d(t,{b:()=>i});var n=s(44357);class i extends n.G{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}},44357:(e,t,s)=>{s.d(t,{G:()=>r});let n="2.21.19",i={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:s})=>t?`${e??"https://viem.sh"}${t}${s?`#${s}`:""}`:void 0,version:n};class r extends Error{constructor(e,t={}){let s=t.cause instanceof r?t.cause.details:t.cause?.message?t.cause.message:t.details,o=t.cause instanceof r&&t.cause.docsPath||t.docsPath,a=i.getDocsUrl?.({...t,docsPath:o});super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...a?[`Docs: ${a}`]:[],...s?[`Details: ${s}`]:[],...i.version?[`Version: ${i.version}`]:[]].join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=s,this.docsPath=o,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=e,this.version=n}walk(e){return function e(t,s){return s?.(t)?t:t&&"object"==typeof t&&"cause"in t?e(t.cause,s):s?null:t}(this,e)}}},26279:(e,t,s)=>{s.d(t,{RX:()=>o,cJ:()=>l,m7:()=>r,xd:()=>a});var n=s(968),i=s(44357);class r extends i.G{constructor({maxSize:e,size:t}){super("Blob size is too large.",{metaMessages:[`Max: ${e} bytes`,`Given: ${t} bytes`],name:"BlobSizeTooLargeError"})}}class o extends i.G{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class a extends i.G{constructor({hash:e,size:t}){super(`Versioned hash "${e}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${t}`],name:"InvalidVersionedHashSizeError"})}}class l extends i.G{constructor({hash:e,version:t}){super(`Versioned hash "${e}" version is invalid.`,{metaMessages:[`Expected: ${n.l}`,`Received: ${t}`],name:"InvalidVersionedHashVersionError"})}}},96316:(e,t,s)=>{s.d(t,{Bk:()=>r,Yl:()=>i,hJ:()=>o});var n=s(44357);class i extends n.G{constructor({chain:e,currentChainId:t}){super(`The current chain of the wallet (id: ${t}) does not match the target chain for the transaction (id: ${e.id} – ${e.name}).`,{metaMessages:[`Current Chain ID: ${t}`,`Expected Chain ID: ${e.id} – ${e.name}`],name:"ChainMismatchError"})}}class r extends n.G{constructor(){super("No chain was provided to the request.\nPlease provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient.",{name:"ChainNotFoundError"})}}class o extends n.G{constructor({chainId:e}){super("number"==typeof e?`Chain ID "${e}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}},69535:(e,t,s)=>{s.d(t,{KD:()=>o,T_:()=>i,lQ:()=>r});var n=s(44357);class i extends n.G{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class r extends n.G{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`,{name:"PositionOutOfBoundsError"})}}class o extends n.G{constructor({count:e,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`,{name:"RecursiveReadLimitExceededError"})}}},36180:(e,t,s)=>{s.d(t,{$s:()=>r,W_:()=>o,mV:()=>i});var n=s(44357);class i extends n.G{constructor({offset:e,position:t,size:s}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${s}).`,{name:"SliceOffsetOutOfBoundsError"})}}class r extends n.G{constructor({size:e,targetSize:t,type:s}){super(`${s.charAt(0).toUpperCase()}${s.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}class o extends n.G{constructor({size:e,targetSize:t,type:s}){super(`${s.charAt(0).toUpperCase()}${s.slice(1).toLowerCase()} is expected to be ${t} ${s} long, but is ${e} ${s} long.`,{name:"InvalidBytesLengthError"})}}},12322:(e,t,s)=>{s.d(t,{Cd:()=>o,J5:()=>i,M6:()=>a,yr:()=>r});var n=s(44357);class i extends n.G{constructor({max:e,min:t,signed:s,size:n,value:i}){super(`Number "${i}" is not in safe ${n?`${8*n}-bit ${s?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`,{name:"IntegerOutOfRangeError"})}}class r extends n.G{constructor(e){super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}class o extends n.G{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}class a extends n.G{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}},75908:(e,t,s)=>{s.d(t,{C_:()=>h,G$:()=>a,Hh:()=>o,M_:()=>r,WF:()=>d,ZI:()=>l,cj:()=>b,cs:()=>g,dR:()=>f,pZ:()=>p,se:()=>u,vU:()=>c});var n=s(68087),i=s(44357);class r extends i.G{constructor({cause:e,message:t}={}){let s=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${s?`with reason: ${s}`:"for an unknown reason"}.`,{cause:e,name:"ExecutionRevertedError"})}}Object.defineProperty(r,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(r,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class o extends i.G{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,n.o)(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}}Object.defineProperty(o,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class a extends i.G{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,n.o)(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e,name:"FeeCapTooLowError"})}}Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class l extends i.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e,name:"NonceTooHighError"})}}Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class c extends i.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.
|
|
2
|
-
Try increasing the nonce or find the latest nonce with \`getTransactionCount\`.`,{cause:e,name:"NonceTooLowError"})}}Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class u extends i.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e,name:"NonceMaxValueError"})}}Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class h extends i.G{constructor({cause:e}={}){super("The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.",{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class d extends i.G{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class f extends i.G{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class p extends i.G{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class g extends i.G{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:s}={}){super(`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${(0,n.o)(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${s?` = ${(0,n.o)(s)} gwei`:""}).`,{cause:e,name:"TipAboveFeeCapError"})}}Object.defineProperty(g,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class b extends i.G{constructor({cause:e}){super(`An error occurred while executing: ${e?.shortMessage}`,{cause:e,name:"UnknownNodeError"})}}},22435:(e,t,s)=>{s.d(t,{JC:()=>u,j3:()=>c,mk:()=>h,vl:()=>l,xY:()=>a,xr:()=>o});var n=s(21809),i=s(68087),r=s(44357);function o(e){let t=Object.entries(e).map(([e,t])=>void 0===t||!1===t?null:[e,t]).filter(Boolean),s=t.reduce((e,[t])=>Math.max(e,t.length),0);return t.map(([e,t])=>` ${`${e}:`.padEnd(s+1)} ${t}`).join("\n")}class a extends r.G{constructor(){super("Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.\nUse `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others.",{name:"FeeConflictError"})}}class l extends r.G{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class c extends r.G{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",o(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 u extends r.G{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 h extends r.G{constructor(e,{account:t,docsPath:s,chain:r,data:a,gas:l,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:h,nonce:d,to:f,value:p}){super(e.shortMessage,{cause:e,docsPath:s,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",o({chain:r&&`${r?.name} (id: ${r?.id})`,from:t?.address,to:f,value:void 0!==p&&`${(0,n.d)(p)} ${r?.nativeCurrency?.symbol||"ETH"}`,data:a,gas:l,gasPrice:void 0!==c&&`${(0,i.o)(c)} gwei`,maxFeePerGas:void 0!==u&&`${(0,i.o)(u)} gwei`,maxPriorityFeePerGas:void 0!==h&&`${(0,i.o)(h)} gwei`,nonce:d})].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}},23272:(e,t,s)=>{s.d(t,{i:()=>L});var n=s(1504),i=s(98707),r=s(88328),o=s(73308),a=s(8297);let l={"0x0":"reverted","0x1":"success"},c=(0,o.$)("transactionReceipt",function(e){let t={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(e=>(0,a.U)(e)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,n.ly)(e.transactionIndex):null,status:e.status?l[e.status]:null,type:e.type?r.c8[e.type]||e.type:null};return e.blobGasPrice&&(t.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(t.blobGasUsed=BigInt(e.blobGasUsed)),t}),u={block:(0,i.G)({format:e=>({transactions:e.transactions?.map(e=>{if("string"==typeof e)return e;let t=r.Tr(e);return"0x7e"===t.typeHex&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?n.y_(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}),stateRoot:e.stateRoot})}),transaction:(0,r.y_)({format(e){let t={};return"0x7e"===e.type&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?(0,n.y_)(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:c({format:e=>({l1GasPrice:e.l1GasPrice?(0,n.y_)(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?(0,n.y_)(e.l1GasUsed):null,l1Fee:e.l1Fee?(0,n.y_)(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null})})};var h=s(35130),d=s(99487),f=s(68095),p=s(88090),g=s(7573),b=s(22435),m=s(88897),y=s(23678),x=s(56655),v=s(44353),w=s(65484),P=s(968),$=s(2380),G=s(44357),I=s(26279),B=s(96316),C=s(75908),E=s(41399),U=s(19611);function z(e){let{chainId:t,maxPriorityFeePerGas:s,maxFeePerGas:n,to:i}=e;if(t<=0)throw new B.hJ({chainId:t});if(i&&!(0,d.U)(i))throw new h.b({address:i});if(n&&n>$.zL)throw new C.Hh({maxFeePerGas:n});if(s&&n&&s>n)throw new C.cs({maxFeePerGas:n,maxPriorityFeePerGas:s})}var N=s(98793);function k(e){if(!e||0===e.length)return[];let t=[];for(let s=0;s<e.length;s++){let{address:n,storageKeys:i}=e[s];for(let e=0;e<i.length;e++)if(i[e].length-2!=64)throw new b.JC({storageKey:i[e]});if(!(0,d.U)(n,{strict:!1}))throw new h.b({address:n});t.push([n,i])}return t}function F(e,t){let s=t??e,{v:n,yParity:i}=s;if(void 0===s.r||void 0===s.s||void 0===n&&void 0===i)return[];let r=(0,w.f)(s.r),o=(0,w.f)(s.s);return["number"==typeof i?i?(0,p.NC)(1):"0x":0n===n?"0x":1n===n?(0,p.NC)(1):27n===n?"0x":(0,p.NC)(1),"0x00"===r?"0x":r,"0x00"===o?"0x":o]}let L={contracts:{gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},formatters:u,serializers:{transaction:function(e,t){return"deposit"===e.type||void 0!==e.sourceHash?function(e){(function(e){let{from:t,to:s}=e;if(t&&!(0,d.U)(t))throw new h.b({address:t});if(s&&!(0,d.U)(s))throw new h.b({address:s})})(e);let{sourceHash:t,data:s,from:n,gas:i,isSystemTx:r,mint:o,to:a,value:l}=e,c=[t,n,a??"0x",o?(0,p.NC)(o):"0x",l?(0,p.NC)(l):"0x",i?(0,p.NC)(i):"0x",r?"0x1":"0x",s??"0x"];return(0,f.SM)(["0x7e",(0,g.LV)(c)])}(e):function(e,t){let s=(0,N.l)(e);return"eip1559"===s?function(e,t){let{chainId:s,gas:n,nonce:i,to:r,value:o,maxFeePerGas:a,maxPriorityFeePerGas:l,accessList:c,data:u}=e;z(e);let h=k(c),d=[(0,p.NC)(s),i?(0,p.NC)(i):"0x",l?(0,p.NC)(l):"0x",a?(0,p.NC)(a):"0x",n?(0,p.NC)(n):"0x",r??"0x",o?(0,p.NC)(o):"0x",u??"0x",h,...F(e,t)];return(0,f.SM)(["0x02",(0,g.LV)(d)])}(e,t):"eip2930"===s?function(e,t){let{chainId:s,gas:n,data:i,nonce:r,to:o,value:a,accessList:l,gasPrice:c}=e;!function(e){let{chainId:t,maxPriorityFeePerGas:s,gasPrice:n,maxFeePerGas:i,to:r}=e;if(t<=0)throw new B.hJ({chainId:t});if(r&&!(0,d.U)(r))throw new h.b({address:r});if(s||i)throw new G.G("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(n&&n>$.zL)throw new C.Hh({maxFeePerGas:n})}(e);let u=k(l),b=[(0,p.NC)(s),r?(0,p.NC)(r):"0x",c?(0,p.NC)(c):"0x",n?(0,p.NC)(n):"0x",o??"0x",a?(0,p.NC)(a):"0x",i??"0x",u,...F(e,t)];return(0,f.SM)(["0x01",(0,g.LV)(b)])}(e,t):"eip4844"===s?function(e,t){let{chainId:s,gas:i,nonce:r,to:o,value:a,maxFeePerBlobGas:l,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:h,data:d}=e;!function(e){let{blobVersionedHashes:t}=e;if(t){if(0===t.length)throw new I.RX;for(let e of t){let t=(0,E.d)(e),s=(0,n.ly)((0,U.tP)(e,0,1));if(32!==t)throw new I.xd({hash:e,size:t});if(s!==P.l)throw new I.cJ({hash:e,version:s})}}z(e)}(e);let b=e.blobVersionedHashes,w=e.sidecars;if(e.blobs&&(void 0===b||void 0===w)){let t="string"==typeof e.blobs[0]?e.blobs:e.blobs.map(e=>(0,p.ci)(e)),s=e.kzg,n=(0,m.P)({blobs:t,kzg:s});if(void 0===b&&(b=(0,x.C)({commitments:n})),void 0===w){let e=(0,y.y)({blobs:t,commitments:n,kzg:s});w=(0,v.j)({blobs:t,commitments:n,proofs:e})}}let $=k(h),G=[(0,p.NC)(s),r?(0,p.NC)(r):"0x",u?(0,p.NC)(u):"0x",c?(0,p.NC)(c):"0x",i?(0,p.NC)(i):"0x",o??"0x",a?(0,p.NC)(a):"0x",d??"0x",$,l?(0,p.NC)(l):"0x",b??[],...F(e,t)],B=[],C=[],N=[];if(w)for(let e=0;e<w.length;e++){let{blob:t,commitment:s,proof:n}=w[e];B.push(t),C.push(s),N.push(n)}return(0,f.SM)(["0x03",w?(0,g.LV)([G,B,C,N]):(0,g.LV)(G)])}(e,t):"eip7702"===s?function(e,t){let{authorizationList:s,chainId:n,gas:i,nonce:r,to:o,value:a,maxFeePerGas:l,maxPriorityFeePerGas:c,accessList:u,data:b}=e;!function(e){let{authorizationList:t}=e;if(t)for(let e of t){let{contractAddress:t,chainId:s}=e;if(!(0,d.U)(t))throw new h.b({address:t});if(s<=0)throw new B.hJ({chainId:s})}z(e)}(e);let m=k(u),y=function(e){if(!e||0===e.length)return[];let t=[];for(let s of e){let{contractAddress:e,chainId:n,nonce:i,...r}=s;t.push([(0,p.NC)(n),e,i?(0,p.NC)(i):"0x",...F({},r)])}return t}(s);return(0,f.SM)(["0x04",(0,g.LV)([(0,p.NC)(n),r?(0,p.NC)(r):"0x",c?(0,p.NC)(c):"0x",l?(0,p.NC)(l):"0x",i?(0,p.NC)(i):"0x",o??"0x",a?(0,p.NC)(a):"0x",b??"0x",m,y,...F(e,t)])])}(e,t):function(e,t){let{chainId:s=0,gas:n,data:i,nonce:r,to:o,value:a,gasPrice:l}=e;!function(e){let{chainId:t,maxPriorityFeePerGas:s,gasPrice:n,maxFeePerGas:i,to:r}=e;if(r&&!(0,d.U)(r))throw new h.b({address:r});if(void 0!==t&&t<=0)throw new B.hJ({chainId:t});if(s||i)throw new G.G("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(n&&n>$.zL)throw new C.Hh({maxFeePerGas:n})}(e);let c=[r?(0,p.NC)(r):"0x",l?(0,p.NC)(l):"0x",n?(0,p.NC)(n):"0x",o??"0x",a?(0,p.NC)(a):"0x",i??"0x"];if(t){let e=(()=>{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(35n===t.v?0n:1n);if(s>0)return BigInt(2*s)+BigInt(35n+t.v-27n);let e=27n+(27n===t.v?0n:1n);if(t.v!==e)throw new b.vl({v:t.v});return e})(),n=(0,w.f)(t.r),i=(0,w.f)(t.s);c=[...c,(0,p.NC)(e),"0x00"===n?"0x":n,"0x00"===i?"0x":i]}else s>0&&(c=[...c,(0,p.NC)(s),"0x","0x"]);return(0,g.LV)(c)}(e,t)}(e,t)}}}},76670:(e,t,s)=>{s.d(t,{K:()=>u,x:()=>c});var n=s(35130),i=s(35217),r=s(50916),o=s(5898),a=s(99487);let l=new o.k(8192);function c(e,t){if(l.has(`${e}.${t}`))return l.get(`${e}.${t}`);let s=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),n=(0,r.w)((0,i.qX)(s),"bytes"),o=(t?s.substring(`${t}0x`.length):s).split("");for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&o[e]&&(o[e]=o[e].toUpperCase()),(15&n[e>>1])>=8&&o[e+1]&&(o[e+1]=o[e+1].toUpperCase());let a=`0x${o.join("")}`;return l.set(`${e}.${t}`,a),a}function u(e,t){if(!(0,a.U)(e,{strict:!1}))throw new n.b({address:e});return c(e,t)}},99487:(e,t,s)=>{s.d(t,{U:()=>a});var n=s(5898),i=s(76670);let r=/^0x[a-fA-F0-9]{40}$/,o=new n.k(8192);function a(e,t){let{strict:s=!0}=t??{},n=`${e}.${s}`;if(o.has(n))return o.get(n);let a=!!r.test(e)&&(e.toLowerCase()===e||!s||(0,i.x)(e)===e);return o.set(n,a),a}},88897:(e,t,s)=>{s.d(t,{P:()=>r});var n=s(35217),i=s(88090);function r(e){let{kzg:t}=e,s=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),r="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,n.nr)(e)):e.blobs,o=[];for(let e of r)o.push(Uint8Array.from(t.blobToKzgCommitment(e)));return"bytes"===s?o:o.map(e=>(0,i.ci)(e))}},23678:(e,t,s)=>{s.d(t,{y:()=>r});var n=s(35217),i=s(88090);function r(e){let{kzg:t}=e,s=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),r="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,n.nr)(e)):e.blobs,o="string"==typeof e.commitments[0]?e.commitments.map(e=>(0,n.nr)(e)):e.commitments,a=[];for(let e=0;e<r.length;e++){let s=r[e],n=o[e];a.push(Uint8Array.from(t.computeBlobKzgProof(s,n)))}return"bytes"===s?a:a.map(e=>(0,i.ci)(e))}},56655:(e,t,s)=>{s.d(t,{C:()=>a});var n=s(88090),i=s(11120),r=s(56928),o=s(35217);function a(e){let{commitments:t,version:s}=e,a=e.to??("string"==typeof t[0]?"hex":"bytes"),l=[];for(let e of t)l.push(function(e){let{commitment:t,version:s=1}=e,a=e.to??("string"==typeof t?"hex":"bytes"),l=function(e,t){let s=(0,i.JQ)((0,r.v)(e,{strict:!1})?(0,o.O0)(e):e);return"bytes"===(t||"hex")?s:(0,n.NC)(s)}(t,"bytes");return l.set([s],0),"bytes"===a?l:(0,n.ci)(l)}({commitment:e,to:a,version:s}));return l}},44353:(e,t,s)=>{s.d(t,{j:()=>u});var n=s(88897),i=s(23678),r=s(26279),o=s(16272),a=s(41399),l=s(35217),c=s(88090);function u(e){let{data:t,kzg:s,to:u}=e,h=e.blobs??function(e){let t=e.to??("string"==typeof e.data?"hex":"bytes"),s="string"==typeof e.data?(0,l.nr)(e.data):e.data,n=(0,a.d)(s);if(!n)throw new r.RX;if(n>761855)throw new r.m7({maxSize:761855,size:n});let i=[],u=!0,h=0;for(;u;){let e=(0,o.q)(new Uint8Array(131072)),t=0;for(;t<4096;){let n=s.slice(h,h+31);if(e.pushByte(0),e.pushBytes(n),n.length<31){e.pushByte(128),u=!1;break}t++,h+=31}i.push(e)}return"bytes"===t?i.map(e=>e.bytes):i.map(e=>(0,c.ci)(e.bytes))}({data:t,to:u}),d=e.commitments??(0,n.P)({blobs:h,kzg:s,to:u}),f=e.proofs??(0,i.y)({blobs:h,commitments:d,kzg:s,to:u}),p=[];for(let e=0;e<h.length;e++)p.push({blob:h[e],commitment:d[e],proof:f[e]});return p}},38596:(e,t,s)=>{s.d(t,{a:()=>n});function n(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}},16272:(e,t,s)=>{s.d(t,{q:()=>r});var n=s(69535);let i={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new n.KD({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new n.lQ({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new n.T_({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new n.T_({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let s=t??this.position;return this.assertPosition(s+e-1),this.bytes.subarray(s,s+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let s=this.inspectBytes(e);return this.position+=t??e,s},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function r(e,{recursiveReadLimit:t=8192}={}){let s=Object.create(i);return s.bytes=e,s.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),s.positionReadCount=new Map,s.recursiveReadLimit=t,s}},68095:(e,t,s)=>{function n(e){return"string"==typeof e[0]?i(e):function(e){let t=0;for(let s of e)t+=s.length;let s=new Uint8Array(t),n=0;for(let t of e)s.set(t,n),n+=t.length;return s}(e)}function i(e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}s.d(t,{SM:()=>i,zo:()=>n})},56928:(e,t,s)=>{s.d(t,{v:()=>n});function n(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}},77157:(e,t,s)=>{s.d(t,{gc:()=>r,vk:()=>i});var n=s(36180);function i(e,{dir:t,size:s=32}={}){return"string"==typeof e?r(e,{dir:t,size:s}):function(e,{dir:t,size:s=32}={}){if(null===s)return e;if(e.length>s)throw new n.$s({size:e.length,targetSize:s,type:"bytes"});let i=new Uint8Array(s);for(let n=0;n<s;n++){let r="right"===t;i[r?n:s-n-1]=e[r?n:e.length-n-1]}return i}(e,{dir:t,size:s})}function r(e,{dir:t,size:s=32}={}){if(null===s)return e;let i=e.replace("0x","");if(i.length>2*s)throw new n.$s({size:Math.ceil(i.length/2),targetSize:s,type:"hex"});return`0x${i["right"===t?"padEnd":"padStart"](2*s,"0")}`}},41399:(e,t,s)=>{s.d(t,{d:()=>i});var n=s(56928);function i(e){return(0,n.v)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}},19611:(e,t,s)=>{s.d(t,{T4:()=>c,p5:()=>u,tP:()=>o});var n=s(36180),i=s(56928),r=s(41399);function o(e,t,s,{strict:n}={}){return(0,i.v)(e,{strict:!1})?u(e,t,s,{strict:n}):c(e,t,s,{strict:n})}function a(e,t){if("number"==typeof t&&t>0&&t>(0,r.d)(e)-1)throw new n.mV({offset:t,position:"start",size:(0,r.d)(e)})}function l(e,t,s){if("number"==typeof t&&"number"==typeof s&&(0,r.d)(e)!==s-t)throw new n.mV({offset:s,position:"end",size:(0,r.d)(e)})}function c(e,t,s,{strict:n}={}){a(e,t);let i=e.slice(t,s);return n&&l(i,t,s),i}function u(e,t,s,{strict:n}={}){a(e,t);let i=`0x${e.replace("0x","").slice((t??0)*2,(s??e.length)*2)}`;return n&&l(i,t,s),i}},65484:(e,t,s)=>{s.d(t,{f:()=>n});function n(e,{dir:t="left"}={}){let s="string"==typeof e?e.replace("0x",""):e,n=0;for(let e=0;e<s.length-1&&"0"===s["left"===t?e:s.length-e-1].toString();e++)n++;return(s="left"===t?s.slice(n):s.slice(0,s.length-n),"string"==typeof e)?(1===s.length&&"right"===t&&(s=`${s}0`),`0x${s.length%2==1?`0${s}`:s}`):s}},1504:(e,t,s)=>{s.d(t,{XA:()=>c,Yf:()=>a,ly:()=>u,rR:()=>h,y_:()=>l});var n=s(12322),i=s(41399),r=s(65484),o=s(35217);function a(e,{size:t}){if((0,i.d)(e)>t)throw new n.M6({givenSize:(0,i.d)(e),maxSize:t})}function l(e,t={}){let{signed:s}=t;t.size&&a(e,{size:t.size});let n=BigInt(e);if(!s)return n;let i=(e.length-2)/2;return n<=(1n<<8n*BigInt(i)-1n)-1n?n:n-BigInt(`0x${"f".padStart(2*i,"f")}`)-1n}function c(e,t={}){let s=e;if(t.size&&(a(s,{size:t.size}),s=(0,r.f)(s)),"0x00"===(0,r.f)(s))return!1;if("0x01"===(0,r.f)(s))return!0;throw new n.Cd(s)}function u(e,t={}){return Number(l(e,t))}function h(e,t={}){let s=(0,o.nr)(e);return t.size&&(a(s,{size:t.size}),s=(0,r.f)(s,{dir:"right"})),new TextDecoder().decode(s)}},35217:(e,t,s)=>{s.d(t,{O0:()=>c,nr:()=>d,qX:()=>f});var n=s(44357),i=s(56928),r=s(77157),o=s(1504),a=s(88090);let l=new TextEncoder;function c(e,t={}){return"number"==typeof e||"bigint"==typeof e?d((0,a.eC)(e,t)):"boolean"==typeof e?function(e,t={}){let s=new Uint8Array(1);return(s[0]=Number(e),"number"==typeof t.size)?((0,o.Yf)(s,{size:t.size}),(0,r.vk)(s,{size:t.size})):s}(e,t):(0,i.v)(e)?d(e,t):f(e,t)}let u={zero:48,nine:57,A:65,F:70,a:97,f:102};function h(e){return e>=u.zero&&e<=u.nine?e-u.zero:e>=u.A&&e<=u.F?e-(u.A-10):e>=u.a&&e<=u.f?e-(u.a-10):void 0}function d(e,t={}){let s=e;t.size&&((0,o.Yf)(s,{size:t.size}),s=(0,r.vk)(s,{dir:"right",size:t.size}));let i=s.slice(2);i.length%2&&(i=`0${i}`);let a=i.length/2,l=new Uint8Array(a);for(let e=0,t=0;e<a;e++){let s=h(i.charCodeAt(t++)),r=h(i.charCodeAt(t++));if(void 0===s||void 0===r)throw new n.G(`Invalid byte sequence ("${i[t-2]}${i[t-1]}" in "${i}").`);l[e]=16*s+r}return l}function f(e,t={}){let s=l.encode(e);return"number"==typeof t.size?((0,o.Yf)(s,{size:t.size}),(0,r.vk)(s,{dir:"right",size:t.size})):s}},88090:(e,t,s)=>{s.d(t,{$G:()=>d,C4:()=>l,NC:()=>a,ci:()=>c,eC:()=>u});var n=s(12322),i=s(77157),r=s(1504);let o=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function a(e,t={}){return"number"==typeof e||"bigint"==typeof e?u(e,t):"string"==typeof e?d(e,t):"boolean"==typeof e?l(e,t):c(e,t)}function l(e,t={}){let s=`0x${Number(e)}`;return"number"==typeof t.size?((0,r.Yf)(s,{size:t.size}),(0,i.vk)(s,{size:t.size})):s}function c(e,t={}){let s="";for(let t=0;t<e.length;t++)s+=o[e[t]];let n=`0x${s}`;return"number"==typeof t.size?((0,r.Yf)(n,{size:t.size}),(0,i.vk)(n,{dir:"right",size:t.size})):n}function u(e,t={}){let s;let{signed:r,size:o}=t,a=BigInt(e);o?s=r?(1n<<8n*BigInt(o)-1n)-1n:2n**(8n*BigInt(o))-1n:"number"==typeof e&&(s=BigInt(Number.MAX_SAFE_INTEGER));let l="bigint"==typeof s&&r?-s-1n:0;if(s&&a>s||a<l){let t="bigint"==typeof e?"n":"";throw new n.J5({max:s?`${s}${t}`:void 0,min:`${l}${t}`,signed:r,size:o,value:`${e}${t}`})}let c=`0x${(r&&a<0?(1n<<BigInt(8*o))+BigInt(a):a).toString(16)}`;return o?(0,i.vk)(c,{size:o}):c}let h=new TextEncoder;function d(e,t={}){return c(h.encode(e),t)}},7573:(e,t,s)=>{s.d(t,{LV:()=>a});var n=s(44357),i=s(16272),r=s(35217),o=s(88090);function a(e,t="hex"){let s=function e(t){return Array.isArray(t)?function(e){let t=e.reduce((e,t)=>e+t.length,0),s=l(t);return{length:t<=55?1+t:1+s+t,encode(n){for(let{encode:i}of(t<=55?n.pushByte(192+t):(n.pushByte(247+s),1===s?n.pushUint8(t):2===s?n.pushUint16(t):3===s?n.pushUint24(t):n.pushUint32(t)),e))i(n)}}}(t.map(t=>e(t))):function(e){let t="string"==typeof e?(0,r.nr)(e):e,s=l(t.length);return{length:1===t.length&&t[0]<128?1:t.length<=55?1+t.length:1+s+t.length,encode(e){1===t.length&&t[0]<128||(t.length<=55?e.pushByte(128+t.length):(e.pushByte(183+s),1===s?e.pushUint8(t.length):2===s?e.pushUint16(t.length):3===s?e.pushUint24(t.length):e.pushUint32(t.length))),e.pushBytes(t)}}}(t)}(e),n=(0,i.q)(new Uint8Array(s.length));return(s.encode(n),"hex"===t)?(0,o.ci)(n.bytes):n.bytes}function l(e){if(e<256)return 1;if(e<65536)return 2;if(e<16777216)return 3;if(e<4294967296)return 4;throw new n.G("Length is too large.")}},98707:(e,t,s)=>{s.d(t,{G:()=>o,Z:()=>r});var n=s(73308),i=s(88328);function r(e){let t=e.transactions?.map(e=>"string"==typeof e?e:i.Tr(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:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}let o=(0,n.$)("block",r)},73308:(e,t,s)=>{s.d(t,{$:()=>n});function n(e,t){return({exclude:s,format:n})=>({exclude:s,format:e=>{let i=t(e);if(s)for(let e of s)delete i[e];return{...i,...n(e)}},type:e})}},8297:(e,t,s)=>{s.d(t,{U:()=>n});function n(e,{args:t,eventName:s}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...s?{args:t,eventName:s}:{}}}},88328:(e,t,s)=>{s.d(t,{Tr:()=>o,c8:()=>r,y_:()=>a});var n=s(1504),i=s(73308);let r={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function o(e){let t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?(0,n.ly)(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,n.ly)(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?r[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&&(t.authorizationList=e.authorizationList.map(e=>({contractAddress:e.address,r:e.r,s:e.s,chainId:Number(e.chainId),nonce:Number(e.nonce),...void 0!==e.yParity?{yParity:Number(e.yParity)}:{},...void 0!==e.v&&void 0===e.yParity?{v:Number(e.v)}:{}}))),t.yParity=(()=>{if(e.yParity)return Number(e.yParity);if("bigint"==typeof t.v){if(0n===t.v||27n===t.v)return 0;if(1n===t.v||28n===t.v)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),"legacy"===t.type&&(delete t.accessList,delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),"eip2930"===t.type&&(delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),"eip1559"===t.type&&delete t.maxFeePerBlobGas,t}let a=(0,i.$)("transaction",o)},50916:(e,t,s)=>{s.d(t,{w:()=>U});var n=s(20080);let i=BigInt(4294967296-1),r=BigInt(32),o=(e,t,s)=>e<<s|t>>>32-s,a=(e,t,s)=>t<<s|e>>>32-s,l=(e,t,s)=>t<<s-32|e>>>64-s,c=(e,t,s)=>e<<s-32|t>>>64-s;var u=s(31916);let h=[],d=[],f=[],p=BigInt(0),g=BigInt(1),b=BigInt(2),m=BigInt(7),y=BigInt(256),x=BigInt(113);for(let e=0,t=g,s=1,n=0;e<24;e++){[s,n]=[n,(2*s+3*n)%5],h.push(2*(5*n+s)),d.push((e+1)*(e+2)/2%64);let i=p;for(let e=0;e<7;e++)(t=(t<<g^(t>>m)*x)%y)&b&&(i^=g<<(g<<BigInt(e))-g);f.push(i)}let[v,w]=function(e,t=!1){let s=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;o<e.length;o++){let{h:a,l}=function(e,t=!1){return t?{h:Number(e&i),l:Number(e>>r&i)}:{h:0|Number(e>>r&i),l:0|Number(e&i)}}(e[o],t);[s[o],n[o]]=[a,l]}return[s,n]}(f,!0),P=(e,t,s)=>s>32?l(e,t,s):o(e,t,s),$=(e,t,s)=>s>32?c(e,t,s):a(e,t,s);class G extends u.kb{constructor(e,t,s,i=!1,r=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=s,this.enableXOF=i,this.rounds=r,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.Rx)(s),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,u.Jq)(this.state)}keccak(){u.iA||(0,u.l1)(this.state32),function(e,t=24){let s=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)s[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let n=(t+8)%10,i=(t+2)%10,r=s[i],o=s[i+1],a=P(r,o,1)^s[n],l=$(r,o,1)^s[n+1];for(let s=0;s<50;s+=10)e[t+s]^=a,e[t+s+1]^=l}let t=e[2],i=e[3];for(let s=0;s<24;s++){let n=d[s],r=P(t,i,n),o=$(t,i,n),a=h[s];t=e[a],i=e[a+1],e[a]=r,e[a+1]=o}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)s[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~s[(n+2)%10]&s[(n+4)%10]}e[0]^=v[n],e[1]^=w[n]}s.fill(0)}(this.state32,this.rounds),u.iA||(0,u.l1)(this.state32),this.posOut=0,this.pos=0}update(e){(0,n.Gg)(this);let{blockLen:t,state:s}=this,i=(e=(0,u.O0)(e)).length;for(let n=0;n<i;){let r=Math.min(t-this.pos,i-n);for(let t=0;t<r;t++)s[this.pos++]^=e[n++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:s,blockLen:n}=this;e[s]^=t,(128&t)!=0&&s===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){(0,n.Gg)(this,!1),(0,n.aI)(e),this.finish();let t=this.state,{blockLen:s}=this;for(let n=0,i=e.length;n<i;){this.posOut>=s&&this.keccak();let r=Math.min(s-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+r),n),this.posOut+=r,n+=r}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,n.Rx)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.J8)(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:t,suffix:s,outputLen:n,rounds:i,enableXOF:r}=this;return e||(e=new G(t,s,n,r,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=s,e.outputLen=n,e.enableXOF=r,e.destroyed=this.destroyed,e}}let I=(0,u.hE)(()=>new G(136,1,32));var B=s(56928),C=s(35217),E=s(88090);function U(e,t){let s=I((0,B.v)(e,{strict:!1})?(0,C.O0)(e):e);return"bytes"===(t||"hex")?s:(0,E.NC)(s)}},5898:(e,t,s)=>{s.d(t,{k:()=>n});class n extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){let e=this.keys().next().value;e&&this.delete(e)}return this}}},98793:(e,t,s)=>{s.d(t,{l:()=>i});var n=s(22435);function i(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 n.j3({transaction:e})}},21809:(e,t,s)=>{s.d(t,{d:()=>r});var n=s(19612),i=s(16131);function r(e,t="wei"){return(0,i.b)(e,n.ez[t])}},68087:(e,t,s)=>{s.d(t,{o:()=>r});var n=s(19612),i=s(16131);function r(e,t="wei"){return(0,i.b)(e,n.Zn[t])}},16131:(e,t,s)=>{s.d(t,{b:()=>n});function n(e,t){let s=e.toString(),n=s.startsWith("-");n&&(s=s.slice(1));let[i,r]=[(s=s.padStart(t,"0")).slice(0,s.length-t),s.slice(s.length-t)];return r=r.replace(/(0+)$/,""),`${n?"-":""}${i||"0"}${r?`.${r}`:""}`}}};
|
|
1
|
+
"use strict";exports.id=965,exports.ids=[965],exports.modules={20080:(e,t,s)=>{function i(e){if(!Number.isSafeInteger(e)||e<0)throw Error(`positive integer expected, not ${e}`)}function n(e,...t){if(!(e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function r(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function o(e,t){n(e);let s=t.outputLen;if(e.length<s)throw Error(`digestInto() expects output buffer of length at least ${s}`)}s.d(t,{Gg:()=>r,J8:()=>o,Rx:()=>i,aI:()=>n})},37290:(e,t,s)=>{s.d(t,{GL:()=>r,Jq:()=>n,O0:()=>u,hE:()=>d,iA:()=>a,kb:()=>h,l1:()=>c,np:()=>o});var i=s(20080);let n=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),r=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),o=(e,t)=>e<<32-t|e>>>t,a=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],l=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255;function c(e){for(let t=0;t<e.length;t++)e[t]=l(e[t])}function u(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}(e)),(0,i.aI)(e),e}class h{clone(){return this._cloneInto()}}function d(e){let t=t=>e().update(u(t)).digest(),s=e();return t.outputLen=s.outputLen,t.blockLen=s.blockLen,t.create=()=>e(),t}},89272:(e,t,s)=>{s.d(t,{O:()=>i});let i=(0,s(38596).a)({id:31337,name:"Anvil",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"],webSocket:["ws://127.0.0.1:8545"]}}})},7769:(e,t,s)=>{s.d(t,{t:()=>i});let i=(0,s(38596).a)({id:31337,name:"Foundry",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"],webSocket:["ws://127.0.0.1:8545"]}}})},18061:(e,t,s)=>{s.d(t,{T:()=>n});var i=s(21322);let n=(0,s(38596).a)({...i.i,name:"Garnet Testnet",testnet:!0,id:17069,sourceId:17e3,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.garnetchain.com"],webSocket:["wss://rpc.garnetchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.garnetchain.com"}},contracts:{...i.i.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{17e3:{address:"0x57ee40586fbE286AfC75E67cb69511A6D9aF5909",blockCreated:1274684}},l2OutputOracle:{17e3:{address:"0xCb8E7AC561b8EF04F2a15865e9fbc0766FEF569B",blockCreated:1274684}},l1StandardBridge:{17e3:{address:"0x09bcDd311FE398F80a78BE37E489f5D440DB95DE",blockCreated:1274684}}}})},27094:(e,t,s)=>{s.d(t,{g:()=>n});var i=s(21322);let n=(0,s(38596).a)({...i.i,name:"Redstone",id:690,sourceId:1,nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.redstonechain.com"],webSocket:["wss://rpc.redstonechain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.redstone.xyz"}},contracts:{...i.i.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{1:{address:"0xC7bCb0e8839a28A1cFadd1CF716de9016CdA51ae",blockCreated:19578329}},l2OutputOracle:{1:{address:"0xa426A052f657AEEefc298b3B5c35a470e4739d69",blockCreated:19578337}},l1StandardBridge:{1:{address:"0xc473ca7E02af24c129c2eEf51F2aDf0411c1Df69",blockCreated:19578331}}}})},35130:(e,t,s)=>{s.d(t,{b:()=>n});var i=s(44357);class n extends i.G{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}},44357:(e,t,s)=>{s.d(t,{G:()=>r});let i="2.21.19",n={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:s})=>t?`${e??"https://viem.sh"}${t}${s?`#${s}`:""}`:void 0,version:i};class r extends Error{constructor(e,t={}){let s=t.cause instanceof r?t.cause.details:t.cause?.message?t.cause.message:t.details,o=t.cause instanceof r&&t.cause.docsPath||t.docsPath,a=n.getDocsUrl?.({...t,docsPath:o});super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...a?[`Docs: ${a}`]:[],...s?[`Details: ${s}`]:[],...n.version?[`Version: ${n.version}`]:[]].join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=s,this.docsPath=o,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=e,this.version=i}walk(e){return function e(t,s){return s?.(t)?t:t&&"object"==typeof t&&"cause"in t?e(t.cause,s):s?null:t}(this,e)}}},69535:(e,t,s)=>{s.d(t,{KD:()=>o,T_:()=>n,lQ:()=>r});var i=s(44357);class n extends i.G{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class r extends i.G{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`,{name:"PositionOutOfBoundsError"})}}class o extends i.G{constructor({count:e,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`,{name:"RecursiveReadLimitExceededError"})}}},36180:(e,t,s)=>{s.d(t,{$s:()=>r,mV:()=>n});var i=s(44357);class n extends i.G{constructor({offset:e,position:t,size:s}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${s}).`,{name:"SliceOffsetOutOfBoundsError"})}}class r extends i.G{constructor({size:e,targetSize:t,type:s}){super(`${s.charAt(0).toUpperCase()}${s.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}},12322:(e,t,s)=>{s.d(t,{Cd:()=>o,J5:()=>n,M6:()=>a,yr:()=>r});var i=s(44357);class n extends i.G{constructor({max:e,min:t,signed:s,size:i,value:n}){super(`Number "${n}" is not in safe ${i?`${8*i}-bit ${s?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`,{name:"IntegerOutOfRangeError"})}}class r extends i.G{constructor(e){super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}class o extends i.G{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}class a extends i.G{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}},21322:(e,t,s)=>{s.d(t,{i:()=>ec});var i=s(1504);function n(e,t){return({exclude:s,format:i})=>({exclude:s,format:e=>{let n=t(e);if(s)for(let e of s)delete n[e];return{...n,...i(e)}},type:e})}let r={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function o(e){let t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?(0,i.ly)(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,i.ly)(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?r[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&&(t.authorizationList=e.authorizationList.map(e=>({contractAddress:e.address,r:e.r,s:e.s,chainId:Number(e.chainId),nonce:Number(e.nonce),...void 0!==e.yParity?{yParity:Number(e.yParity)}:{},...void 0!==e.v&&void 0===e.yParity?{v:Number(e.v)}:{}}))),t.yParity=(()=>{if(e.yParity)return Number(e.yParity);if("bigint"==typeof t.v){if(0n===t.v||27n===t.v)return 0;if(1n===t.v||28n===t.v)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),"legacy"===t.type&&(delete t.accessList,delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),"eip2930"===t.type&&(delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),"eip1559"===t.type&&delete t.maxFeePerBlobGas,t}let a=n("transaction",o),l=n("block",function(e){let t=e.transactions?.map(e=>"string"==typeof e?e:o(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:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}});var c=s(8297);let u={"0x0":"reverted","0x1":"success"},h=n("transactionReceipt",function(e){let t={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(e=>(0,c.U)(e)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,i.ly)(e.transactionIndex):null,status:e.status?u[e.status]:null,type:e.type?r[e.type]||e.type:null};return e.blobGasPrice&&(t.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(t.blobGasUsed=BigInt(e.blobGasUsed)),t}),d={block:l({format:e=>({transactions:e.transactions?.map(e=>{if("string"==typeof e)return e;let t=o(e);return"0x7e"===t.typeHex&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?i.y_(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}),stateRoot:e.stateRoot})}),transaction:a({format(e){let t={};return"0x7e"===e.type&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?(0,i.y_)(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:h({format:e=>({l1GasPrice:e.l1GasPrice?(0,i.y_)(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?(0,i.y_)(e.l1GasUsed):null,l1Fee:e.l1Fee?(0,i.y_)(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null})})};var f=s(35130),p=s(99487),b=s(68095),g=s(88090),m=s(44357),y=s(16272),x=s(35217);function v(e,t="hex"){let s=function e(t){return Array.isArray(t)?function(e){let t=e.reduce((e,t)=>e+t.length,0),s=w(t);return{length:t<=55?1+t:1+s+t,encode(i){for(let{encode:n}of(t<=55?i.pushByte(192+t):(i.pushByte(247+s),1===s?i.pushUint8(t):2===s?i.pushUint16(t):3===s?i.pushUint24(t):i.pushUint32(t)),e))n(i)}}}(t.map(t=>e(t))):function(e){let t="string"==typeof e?(0,x.nr)(e):e,s=w(t.length);return{length:1===t.length&&t[0]<128?1:t.length<=55?1+t.length:1+s+t.length,encode(e){1===t.length&&t[0]<128||(t.length<=55?e.pushByte(128+t.length):(e.pushByte(183+s),1===s?e.pushUint8(t.length):2===s?e.pushUint16(t.length):3===s?e.pushUint24(t.length):e.pushUint32(t.length))),e.pushBytes(t)}}}(t)}(e),i=(0,y.q)(new Uint8Array(s.length));return(s.encode(i),"hex"===t)?(0,g.ci)(i.bytes):i.bytes}function w(e){if(e<256)return 1;if(e<65536)return 2;if(e<16777216)return 3;if(e<4294967296)return 4;throw new m.G("Length is too large.")}let P={ether:-9,wei:9};function I(e,t="wei"){return function(e,t){let s=e.toString(),i=s.startsWith("-");i&&(s=s.slice(1));let[n,r]=[(s=s.padStart(t,"0")).slice(0,s.length-t),s.slice(s.length-t)];return r=r.replace(/(0+)$/,""),`${i?"-":""}${n||"0"}${r?`.${r}`:""}`}(e,P[t])}class $ extends m.G{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class G extends m.G{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",function(e){let t=Object.entries(e).map(([e,t])=>void 0===t||!1===t?null:[e,t]).filter(Boolean),s=t.reduce((e,[t])=>Math.max(e,t.length),0);return t.map(([e,t])=>` ${`${e}:`.padEnd(s+1)} ${t}`).join("\n")}(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 B extends m.G{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}function U(e){let{kzg:t}=e,s=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),i="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,x.nr)(e)):e.blobs,n=[];for(let e of i)n.push(Uint8Array.from(t.blobToKzgCommitment(e)));return"bytes"===s?n:n.map(e=>(0,g.ci)(e))}function E(e){let{kzg:t}=e,s=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),i="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,x.nr)(e)):e.blobs,n="string"==typeof e.commitments[0]?e.commitments.map(e=>(0,x.nr)(e)):e.commitments,r=[];for(let e=0;e<i.length;e++){let s=i[e],o=n[e];r.push(Uint8Array.from(t.computeBlobKzgProof(s,o)))}return"bytes"===s?r:r.map(e=>(0,g.ci)(e))}var C=s(20080),N=s(37290);let z=(e,t,s)=>e&t^~e&s,k=(e,t,s)=>e&t^e&s^t&s;class F extends N.kb{constructor(e,t,s,i){super(),this.blockLen=e,this.outputLen=t,this.padOffset=s,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,N.GL)(this.buffer)}update(e){(0,C.Gg)(this);let{view:t,buffer:s,blockLen:i}=this,n=(e=(0,N.O0)(e)).length;for(let r=0;r<n;){let o=Math.min(i-this.pos,n-r);if(o===i){let t=(0,N.GL)(e);for(;i<=n-r;r+=i)this.process(t,r);continue}s.set(e.subarray(r,r+o),this.pos),this.pos+=o,r+=o,this.pos===i&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,C.Gg)(this),(0,C.J8)(e,this),this.finished=!0;let{buffer:t,view:s,blockLen:i,isLE:n}=this,{pos:r}=this;t[r++]=128,this.buffer.subarray(r).fill(0),this.padOffset>i-r&&(this.process(s,0),r=0);for(let e=r;e<i;e++)t[e]=0;(function(e,t,s,i){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,s,i);let n=BigInt(32),r=BigInt(4294967295),o=Number(s>>n&r),a=Number(s&r),l=i?4:0,c=i?0:4;e.setUint32(t+l,o,i),e.setUint32(t+c,a,i)})(s,i-8,BigInt(8*this.length),n),this.process(s,0);let o=(0,N.GL)(e),a=this.outputLen;if(a%4)throw Error("_sha2: outputLen should be aligned to 32bit");let l=a/4,c=this.get();if(l>c.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<l;e++)o.setUint32(4*e,c[e],n)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let s=e.slice(0,t);return this.destroy(),s}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:s,length:i,finished:n,destroyed:r,pos:o}=this;return e.length=i,e.pos=o,e.finished=n,e.destroyed=r,i%t&&e.buffer.set(s),e}}let A=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),O=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),L=new Uint32Array(64);class T extends F{constructor(){super(64,32,8,!1),this.A=0|O[0],this.B=0|O[1],this.C=0|O[2],this.D=0|O[3],this.E=0|O[4],this.F=0|O[5],this.G=0|O[6],this.H=0|O[7]}get(){let{A:e,B:t,C:s,D:i,E:n,F:r,G:o,H:a}=this;return[e,t,s,i,n,r,o,a]}set(e,t,s,i,n,r,o,a){this.A=0|e,this.B=0|t,this.C=0|s,this.D=0|i,this.E=0|n,this.F=0|r,this.G=0|o,this.H=0|a}process(e,t){for(let s=0;s<16;s++,t+=4)L[s]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=L[e-15],s=L[e-2],i=(0,N.np)(t,7)^(0,N.np)(t,18)^t>>>3,n=(0,N.np)(s,17)^(0,N.np)(s,19)^s>>>10;L[e]=n+L[e-7]+i+L[e-16]|0}let{A:s,B:i,C:n,D:r,E:o,F:a,G:l,H:c}=this;for(let e=0;e<64;e++){let t=c+((0,N.np)(o,6)^(0,N.np)(o,11)^(0,N.np)(o,25))+z(o,a,l)+A[e]+L[e]|0,u=((0,N.np)(s,2)^(0,N.np)(s,13)^(0,N.np)(s,22))+k(s,i,n)|0;c=l,l=a,a=o,o=r+t|0,r=n,n=i,i=s,s=t+u|0}s=s+this.A|0,i=i+this.B|0,n=n+this.C|0,r=r+this.D|0,o=o+this.E|0,a=a+this.F|0,l=l+this.G|0,c=c+this.H|0,this.set(s,i,n,r,o,a,l,c)}roundClean(){L.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}let S=(0,N.hE)(()=>new T);var M=s(56928);class R extends m.G{constructor({maxSize:e,size:t}){super("Blob size is too large.",{metaMessages:[`Max: ${e} bytes`,`Given: ${t} bytes`],name:"BlobSizeTooLargeError"})}}class H extends m.G{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class V extends m.G{constructor({hash:e,size:t}){super(`Versioned hash "${e}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${t}`],name:"InvalidVersionedHashSizeError"})}}class j extends m.G{constructor({hash:e,version:t}){super(`Versioned hash "${e}" version is invalid.`,{metaMessages:["Expected: 1",`Received: ${t}`],name:"InvalidVersionedHashVersionError"})}}var D=s(41399),_=s(65484);let q=2n**256n-1n;class X extends m.G{constructor({chainId:e}){super("number"==typeof e?`Chain ID "${e}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}class Y extends m.G{constructor({cause:e,message:t}={}){let s=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${s?`with reason: ${s}`:"for an unknown reason"}.`,{cause:e,name:"ExecutionRevertedError"})}}Object.defineProperty(Y,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(Y,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class J extends m.G{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${I(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}}Object.defineProperty(J,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class K extends m.G{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${I(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e,name:"FeeCapTooLowError"})}}Object.defineProperty(K,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class Q extends m.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e,name:"NonceTooHighError"})}}Object.defineProperty(Q,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class W extends m.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.
|
|
2
|
+
Try increasing the nonce or find the latest nonce with \`getTransactionCount\`.`,{cause:e,name:"NonceTooLowError"})}}Object.defineProperty(W,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class Z extends m.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e,name:"NonceMaxValueError"})}}Object.defineProperty(Z,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class ee extends m.G{constructor({cause:e}={}){super("The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.",{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(ee,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class et extends m.G{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(et,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class es extends m.G{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(es,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class ei extends m.G{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(ei,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class en extends m.G{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:s}={}){super(`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${I(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${s?` = ${I(s)} gwei`:""}).`,{cause:e,name:"TipAboveFeeCapError"})}}Object.defineProperty(en,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});var er=s(19611);function eo(e){let{chainId:t,maxPriorityFeePerGas:s,maxFeePerGas:i,to:n}=e;if(t<=0)throw new X({chainId:t});if(n&&!(0,p.U)(n))throw new f.b({address:n});if(i&&i>q)throw new J({maxFeePerGas:i});if(s&&i&&s>i)throw new en({maxFeePerGas:i,maxPriorityFeePerGas:s})}function ea(e){if(!e||0===e.length)return[];let t=[];for(let s=0;s<e.length;s++){let{address:i,storageKeys:n}=e[s];for(let e=0;e<n.length;e++)if(n[e].length-2!=64)throw new B({storageKey:n[e]});if(!(0,p.U)(i,{strict:!1}))throw new f.b({address:i});t.push([i,n])}return t}function el(e,t){let s=t??e,{v:i,yParity:n}=s;if(void 0===s.r||void 0===s.s||void 0===i&&void 0===n)return[];let r=(0,_.f)(s.r),o=(0,_.f)(s.s);return["number"==typeof n?n?(0,g.NC)(1):"0x":0n===i?"0x":1n===i?(0,g.NC)(1):27n===i?"0x":(0,g.NC)(1),"0x00"===r?"0x":r,"0x00"===o?"0x":o]}let ec={contracts:{gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},formatters:d,serializers:{transaction:function(e,t){return"deposit"===e.type||void 0!==e.sourceHash?function(e){(function(e){let{from:t,to:s}=e;if(t&&!(0,p.U)(t))throw new f.b({address:t});if(s&&!(0,p.U)(s))throw new f.b({address:s})})(e);let{sourceHash:t,data:s,from:i,gas:n,isSystemTx:r,mint:o,to:a,value:l}=e,c=[t,i,a??"0x",o?(0,g.NC)(o):"0x",l?(0,g.NC)(l):"0x",n?(0,g.NC)(n):"0x",r?"0x1":"0x",s??"0x"];return(0,b.SM)(["0x7e",v(c)])}(e):function(e,t){let s=function(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 G({transaction:e})}(e);return"eip1559"===s?function(e,t){let{chainId:s,gas:i,nonce:n,to:r,value:o,maxFeePerGas:a,maxPriorityFeePerGas:l,accessList:c,data:u}=e;eo(e);let h=ea(c),d=[(0,g.NC)(s),n?(0,g.NC)(n):"0x",l?(0,g.NC)(l):"0x",a?(0,g.NC)(a):"0x",i?(0,g.NC)(i):"0x",r??"0x",o?(0,g.NC)(o):"0x",u??"0x",h,...el(e,t)];return(0,b.SM)(["0x02",v(d)])}(e,t):"eip2930"===s?function(e,t){let{chainId:s,gas:i,data:n,nonce:r,to:o,value:a,accessList:l,gasPrice:c}=e;!function(e){let{chainId:t,maxPriorityFeePerGas:s,gasPrice:i,maxFeePerGas:n,to:r}=e;if(t<=0)throw new X({chainId:t});if(r&&!(0,p.U)(r))throw new f.b({address:r});if(s||n)throw new m.G("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(i&&i>q)throw new J({maxFeePerGas:i})}(e);let u=ea(l),h=[(0,g.NC)(s),r?(0,g.NC)(r):"0x",c?(0,g.NC)(c):"0x",i?(0,g.NC)(i):"0x",o??"0x",a?(0,g.NC)(a):"0x",n??"0x",u,...el(e,t)];return(0,b.SM)(["0x01",v(h)])}(e,t):"eip4844"===s?function(e,t){let{chainId:s,gas:n,nonce:r,to:o,value:a,maxFeePerBlobGas:l,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:h,data:d}=e;!function(e){let{blobVersionedHashes:t}=e;if(t){if(0===t.length)throw new H;for(let e of t){let t=(0,D.d)(e),s=(0,i.ly)((0,er.tP)(e,0,1));if(32!==t)throw new V({hash:e,size:t});if(1!==s)throw new j({hash:e,version:s})}}eo(e)}(e);let f=e.blobVersionedHashes,p=e.sidecars;if(e.blobs&&(void 0===f||void 0===p)){let t="string"==typeof e.blobs[0]?e.blobs:e.blobs.map(e=>(0,g.ci)(e)),s=e.kzg,i=U({blobs:t,kzg:s});if(void 0===f&&(f=function(e){let{commitments:t,version:s}=e,i=e.to??("string"==typeof t[0]?"hex":"bytes"),n=[];for(let e of t)n.push(function(e){let{commitment:t,version:s=1}=e,i=e.to??("string"==typeof t?"hex":"bytes"),n=function(e,t){let s=S((0,M.v)(e,{strict:!1})?(0,x.O0)(e):e);return"bytes"===(t||"hex")?s:(0,g.NC)(s)}(t,"bytes");return n.set([s],0),"bytes"===i?n:(0,g.ci)(n)}({commitment:e,to:i,version:s}));return n}({commitments:i})),void 0===p){let e=E({blobs:t,commitments:i,kzg:s});p=function(e){let{data:t,kzg:s,to:i}=e,n=e.blobs??function(e){let t=e.to??("string"==typeof e.data?"hex":"bytes"),s="string"==typeof e.data?(0,x.nr)(e.data):e.data,i=(0,D.d)(s);if(!i)throw new H;if(i>761855)throw new R({maxSize:761855,size:i});let n=[],r=!0,o=0;for(;r;){let e=(0,y.q)(new Uint8Array(131072)),t=0;for(;t<4096;){let i=s.slice(o,o+31);if(e.pushByte(0),e.pushBytes(i),i.length<31){e.pushByte(128),r=!1;break}t++,o+=31}n.push(e)}return"bytes"===t?n.map(e=>e.bytes):n.map(e=>(0,g.ci)(e.bytes))}({data:t,to:i}),r=e.commitments??U({blobs:n,kzg:s,to:i}),o=e.proofs??E({blobs:n,commitments:r,kzg:s,to:i}),a=[];for(let e=0;e<n.length;e++)a.push({blob:n[e],commitment:r[e],proof:o[e]});return a}({blobs:t,commitments:i,proofs:e})}}let m=ea(h),w=[(0,g.NC)(s),r?(0,g.NC)(r):"0x",u?(0,g.NC)(u):"0x",c?(0,g.NC)(c):"0x",n?(0,g.NC)(n):"0x",o??"0x",a?(0,g.NC)(a):"0x",d??"0x",m,l?(0,g.NC)(l):"0x",f??[],...el(e,t)],P=[],I=[],$=[];if(p)for(let e=0;e<p.length;e++){let{blob:t,commitment:s,proof:i}=p[e];P.push(t),I.push(s),$.push(i)}return(0,b.SM)(["0x03",p?v([w,P,I,$]):v(w)])}(e,t):"eip7702"===s?function(e,t){let{authorizationList:s,chainId:i,gas:n,nonce:r,to:o,value:a,maxFeePerGas:l,maxPriorityFeePerGas:c,accessList:u,data:h}=e;!function(e){let{authorizationList:t}=e;if(t)for(let e of t){let{contractAddress:t,chainId:s}=e;if(!(0,p.U)(t))throw new f.b({address:t});if(s<=0)throw new X({chainId:s})}eo(e)}(e);let d=ea(u),m=function(e){if(!e||0===e.length)return[];let t=[];for(let s of e){let{contractAddress:e,chainId:i,nonce:n,...r}=s;t.push([(0,g.NC)(i),e,n?(0,g.NC)(n):"0x",...el({},r)])}return t}(s);return(0,b.SM)(["0x04",v([(0,g.NC)(i),r?(0,g.NC)(r):"0x",c?(0,g.NC)(c):"0x",l?(0,g.NC)(l):"0x",n?(0,g.NC)(n):"0x",o??"0x",a?(0,g.NC)(a):"0x",h??"0x",d,m,...el(e,t)])])}(e,t):function(e,t){let{chainId:s=0,gas:i,data:n,nonce:r,to:o,value:a,gasPrice:l}=e;!function(e){let{chainId:t,maxPriorityFeePerGas:s,gasPrice:i,maxFeePerGas:n,to:r}=e;if(r&&!(0,p.U)(r))throw new f.b({address:r});if(void 0!==t&&t<=0)throw new X({chainId:t});if(s||n)throw new m.G("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(i&&i>q)throw new J({maxFeePerGas:i})}(e);let c=[r?(0,g.NC)(r):"0x",l?(0,g.NC)(l):"0x",i?(0,g.NC)(i):"0x",o??"0x",a?(0,g.NC)(a):"0x",n??"0x"];if(t){let e=(()=>{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(35n===t.v?0n:1n);if(s>0)return BigInt(2*s)+BigInt(35n+t.v-27n);let e=27n+(27n===t.v?0n:1n);if(t.v!==e)throw new $({v:t.v});return e})(),i=(0,_.f)(t.r),n=(0,_.f)(t.s);c=[...c,(0,g.NC)(e),"0x00"===i?"0x":i,"0x00"===n?"0x":n]}else s>0&&(c=[...c,(0,g.NC)(s),"0x","0x"]);return v(c)}(e,t)}(e,t)}}}},76670:(e,t,s)=>{s.d(t,{K:()=>u,x:()=>c});var i=s(35130),n=s(35217),r=s(50916),o=s(5898),a=s(99487);let l=new o.k(8192);function c(e,t){if(l.has(`${e}.${t}`))return l.get(`${e}.${t}`);let s=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),i=(0,r.w)((0,n.qX)(s),"bytes"),o=(t?s.substring(`${t}0x`.length):s).split("");for(let e=0;e<40;e+=2)i[e>>1]>>4>=8&&o[e]&&(o[e]=o[e].toUpperCase()),(15&i[e>>1])>=8&&o[e+1]&&(o[e+1]=o[e+1].toUpperCase());let a=`0x${o.join("")}`;return l.set(`${e}.${t}`,a),a}function u(e,t){if(!(0,a.U)(e,{strict:!1}))throw new i.b({address:e});return c(e,t)}},99487:(e,t,s)=>{s.d(t,{U:()=>a});var i=s(5898),n=s(76670);let r=/^0x[a-fA-F0-9]{40}$/,o=new i.k(8192);function a(e,t){let{strict:s=!0}=t??{},i=`${e}.${s}`;if(o.has(i))return o.get(i);let a=!!r.test(e)&&(e.toLowerCase()===e||!s||(0,n.x)(e)===e);return o.set(i,a),a}},38596:(e,t,s)=>{s.d(t,{a:()=>i});function i(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}},16272:(e,t,s)=>{s.d(t,{q:()=>r});var i=s(69535);let n={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new i.KD({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new i.lQ({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new i.T_({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new i.T_({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let s=t??this.position;return this.assertPosition(s+e-1),this.bytes.subarray(s,s+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let s=this.inspectBytes(e);return this.position+=t??e,s},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function r(e,{recursiveReadLimit:t=8192}={}){let s=Object.create(n);return s.bytes=e,s.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),s.positionReadCount=new Map,s.recursiveReadLimit=t,s}},68095:(e,t,s)=>{function i(e){return"string"==typeof e[0]?n(e):function(e){let t=0;for(let s of e)t+=s.length;let s=new Uint8Array(t),i=0;for(let t of e)s.set(t,i),i+=t.length;return s}(e)}function n(e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}s.d(t,{SM:()=>n,zo:()=>i})},56928:(e,t,s)=>{s.d(t,{v:()=>i});function i(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}},77157:(e,t,s)=>{s.d(t,{gc:()=>r,vk:()=>n});var i=s(36180);function n(e,{dir:t,size:s=32}={}){return"string"==typeof e?r(e,{dir:t,size:s}):function(e,{dir:t,size:s=32}={}){if(null===s)return e;if(e.length>s)throw new i.$s({size:e.length,targetSize:s,type:"bytes"});let n=new Uint8Array(s);for(let i=0;i<s;i++){let r="right"===t;n[r?i:s-i-1]=e[r?i:e.length-i-1]}return n}(e,{dir:t,size:s})}function r(e,{dir:t,size:s=32}={}){if(null===s)return e;let n=e.replace("0x","");if(n.length>2*s)throw new i.$s({size:Math.ceil(n.length/2),targetSize:s,type:"hex"});return`0x${n["right"===t?"padEnd":"padStart"](2*s,"0")}`}},41399:(e,t,s)=>{s.d(t,{d:()=>n});var i=s(56928);function n(e){return(0,i.v)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}},19611:(e,t,s)=>{s.d(t,{T4:()=>c,p5:()=>u,tP:()=>o});var i=s(36180),n=s(56928),r=s(41399);function o(e,t,s,{strict:i}={}){return(0,n.v)(e,{strict:!1})?u(e,t,s,{strict:i}):c(e,t,s,{strict:i})}function a(e,t){if("number"==typeof t&&t>0&&t>(0,r.d)(e)-1)throw new i.mV({offset:t,position:"start",size:(0,r.d)(e)})}function l(e,t,s){if("number"==typeof t&&"number"==typeof s&&(0,r.d)(e)!==s-t)throw new i.mV({offset:s,position:"end",size:(0,r.d)(e)})}function c(e,t,s,{strict:i}={}){a(e,t);let n=e.slice(t,s);return i&&l(n,t,s),n}function u(e,t,s,{strict:i}={}){a(e,t);let n=`0x${e.replace("0x","").slice((t??0)*2,(s??e.length)*2)}`;return i&&l(n,t,s),n}},65484:(e,t,s)=>{s.d(t,{f:()=>i});function i(e,{dir:t="left"}={}){let s="string"==typeof e?e.replace("0x",""):e,i=0;for(let e=0;e<s.length-1&&"0"===s["left"===t?e:s.length-e-1].toString();e++)i++;return(s="left"===t?s.slice(i):s.slice(0,s.length-i),"string"==typeof e)?(1===s.length&&"right"===t&&(s=`${s}0`),`0x${s.length%2==1?`0${s}`:s}`):s}},1504:(e,t,s)=>{s.d(t,{XA:()=>c,Yf:()=>a,ly:()=>u,rR:()=>h,y_:()=>l});var i=s(12322),n=s(41399),r=s(65484),o=s(35217);function a(e,{size:t}){if((0,n.d)(e)>t)throw new i.M6({givenSize:(0,n.d)(e),maxSize:t})}function l(e,t={}){let{signed:s}=t;t.size&&a(e,{size:t.size});let i=BigInt(e);if(!s)return i;let n=(e.length-2)/2;return i<=(1n<<8n*BigInt(n)-1n)-1n?i:i-BigInt(`0x${"f".padStart(2*n,"f")}`)-1n}function c(e,t={}){let s=e;if(t.size&&(a(s,{size:t.size}),s=(0,r.f)(s)),"0x00"===(0,r.f)(s))return!1;if("0x01"===(0,r.f)(s))return!0;throw new i.Cd(s)}function u(e,t={}){return Number(l(e,t))}function h(e,t={}){let s=(0,o.nr)(e);return t.size&&(a(s,{size:t.size}),s=(0,r.f)(s,{dir:"right"})),new TextDecoder().decode(s)}},35217:(e,t,s)=>{s.d(t,{O0:()=>c,nr:()=>d,qX:()=>f});var i=s(44357),n=s(56928),r=s(77157),o=s(1504),a=s(88090);let l=new TextEncoder;function c(e,t={}){return"number"==typeof e||"bigint"==typeof e?d((0,a.eC)(e,t)):"boolean"==typeof e?function(e,t={}){let s=new Uint8Array(1);return(s[0]=Number(e),"number"==typeof t.size)?((0,o.Yf)(s,{size:t.size}),(0,r.vk)(s,{size:t.size})):s}(e,t):(0,n.v)(e)?d(e,t):f(e,t)}let u={zero:48,nine:57,A:65,F:70,a:97,f:102};function h(e){return e>=u.zero&&e<=u.nine?e-u.zero:e>=u.A&&e<=u.F?e-(u.A-10):e>=u.a&&e<=u.f?e-(u.a-10):void 0}function d(e,t={}){let s=e;t.size&&((0,o.Yf)(s,{size:t.size}),s=(0,r.vk)(s,{dir:"right",size:t.size}));let n=s.slice(2);n.length%2&&(n=`0${n}`);let a=n.length/2,l=new Uint8Array(a);for(let e=0,t=0;e<a;e++){let s=h(n.charCodeAt(t++)),r=h(n.charCodeAt(t++));if(void 0===s||void 0===r)throw new i.G(`Invalid byte sequence ("${n[t-2]}${n[t-1]}" in "${n}").`);l[e]=16*s+r}return l}function f(e,t={}){let s=l.encode(e);return"number"==typeof t.size?((0,o.Yf)(s,{size:t.size}),(0,r.vk)(s,{dir:"right",size:t.size})):s}},88090:(e,t,s)=>{s.d(t,{$G:()=>d,C4:()=>l,NC:()=>a,ci:()=>c,eC:()=>u});var i=s(12322),n=s(77157),r=s(1504);let o=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function a(e,t={}){return"number"==typeof e||"bigint"==typeof e?u(e,t):"string"==typeof e?d(e,t):"boolean"==typeof e?l(e,t):c(e,t)}function l(e,t={}){let s=`0x${Number(e)}`;return"number"==typeof t.size?((0,r.Yf)(s,{size:t.size}),(0,n.vk)(s,{size:t.size})):s}function c(e,t={}){let s="";for(let t=0;t<e.length;t++)s+=o[e[t]];let i=`0x${s}`;return"number"==typeof t.size?((0,r.Yf)(i,{size:t.size}),(0,n.vk)(i,{dir:"right",size:t.size})):i}function u(e,t={}){let s;let{signed:r,size:o}=t,a=BigInt(e);o?s=r?(1n<<8n*BigInt(o)-1n)-1n:2n**(8n*BigInt(o))-1n:"number"==typeof e&&(s=BigInt(Number.MAX_SAFE_INTEGER));let l="bigint"==typeof s&&r?-s-1n:0;if(s&&a>s||a<l){let t="bigint"==typeof e?"n":"";throw new i.J5({max:s?`${s}${t}`:void 0,min:`${l}${t}`,signed:r,size:o,value:`${e}${t}`})}let c=`0x${(r&&a<0?(1n<<BigInt(8*o))+BigInt(a):a).toString(16)}`;return o?(0,n.vk)(c,{size:o}):c}let h=new TextEncoder;function d(e,t={}){return c(h.encode(e),t)}},8297:(e,t,s)=>{s.d(t,{U:()=>i});function i(e,{args:t,eventName:s}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...s?{args:t,eventName:s}:{}}}},50916:(e,t,s)=>{s.d(t,{w:()=>C});var i=s(20080);let n=BigInt(4294967296-1),r=BigInt(32),o=(e,t,s)=>e<<s|t>>>32-s,a=(e,t,s)=>t<<s|e>>>32-s,l=(e,t,s)=>t<<s-32|e>>>64-s,c=(e,t,s)=>e<<s-32|t>>>64-s;var u=s(37290);let h=[],d=[],f=[],p=BigInt(0),b=BigInt(1),g=BigInt(2),m=BigInt(7),y=BigInt(256),x=BigInt(113);for(let e=0,t=b,s=1,i=0;e<24;e++){[s,i]=[i,(2*s+3*i)%5],h.push(2*(5*i+s)),d.push((e+1)*(e+2)/2%64);let n=p;for(let e=0;e<7;e++)(t=(t<<b^(t>>m)*x)%y)&g&&(n^=b<<(b<<BigInt(e))-b);f.push(n)}let[v,w]=function(e,t=!1){let s=new Uint32Array(e.length),i=new Uint32Array(e.length);for(let o=0;o<e.length;o++){let{h:a,l}=function(e,t=!1){return t?{h:Number(e&n),l:Number(e>>r&n)}:{h:0|Number(e>>r&n),l:0|Number(e&n)}}(e[o],t);[s[o],i[o]]=[a,l]}return[s,i]}(f,!0),P=(e,t,s)=>s>32?l(e,t,s):o(e,t,s),I=(e,t,s)=>s>32?c(e,t,s):a(e,t,s);class $ extends u.kb{constructor(e,t,s,n=!1,r=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=s,this.enableXOF=n,this.rounds=r,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,i.Rx)(s),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,u.Jq)(this.state)}keccak(){u.iA||(0,u.l1)(this.state32),function(e,t=24){let s=new Uint32Array(10);for(let i=24-t;i<24;i++){for(let t=0;t<10;t++)s[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let i=(t+8)%10,n=(t+2)%10,r=s[n],o=s[n+1],a=P(r,o,1)^s[i],l=I(r,o,1)^s[i+1];for(let s=0;s<50;s+=10)e[t+s]^=a,e[t+s+1]^=l}let t=e[2],n=e[3];for(let s=0;s<24;s++){let i=d[s],r=P(t,n,i),o=I(t,n,i),a=h[s];t=e[a],n=e[a+1],e[a]=r,e[a+1]=o}for(let t=0;t<50;t+=10){for(let i=0;i<10;i++)s[i]=e[t+i];for(let i=0;i<10;i++)e[t+i]^=~s[(i+2)%10]&s[(i+4)%10]}e[0]^=v[i],e[1]^=w[i]}s.fill(0)}(this.state32,this.rounds),u.iA||(0,u.l1)(this.state32),this.posOut=0,this.pos=0}update(e){(0,i.Gg)(this);let{blockLen:t,state:s}=this,n=(e=(0,u.O0)(e)).length;for(let i=0;i<n;){let r=Math.min(t-this.pos,n-i);for(let t=0;t<r;t++)s[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:s,blockLen:i}=this;e[s]^=t,(128&t)!=0&&s===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){(0,i.Gg)(this,!1),(0,i.aI)(e),this.finish();let t=this.state,{blockLen:s}=this;for(let i=0,n=e.length;i<n;){this.posOut>=s&&this.keccak();let r=Math.min(s-this.posOut,n-i);e.set(t.subarray(this.posOut,this.posOut+r),i),this.posOut+=r,i+=r}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,i.Rx)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,i.J8)(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:t,suffix:s,outputLen:i,rounds:n,enableXOF:r}=this;return e||(e=new $(t,s,i,r,n)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=n,e.suffix=s,e.outputLen=i,e.enableXOF=r,e.destroyed=this.destroyed,e}}let G=(0,u.hE)(()=>new $(136,1,32));var B=s(56928),U=s(35217),E=s(88090);function C(e,t){let s=G((0,B.v)(e,{strict:!1})?(0,U.O0)(e):e);return"bytes"===(t||"hex")?s:(0,E.NC)(s)}},5898:(e,t,s)=>{s.d(t,{k:()=>i});class i extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){let e=this.keys().next().value;e&&this.delete(e)}return this}}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
self.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-78c92fac7aa8fdd8.js"],devFiles:[],ampDevFiles:[],lowPriorityFiles:["static/
|
|
1
|
+
self.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-78c92fac7aa8fdd8.js"],devFiles:[],ampDevFiles:[],lowPriorityFiles:["static/ToJx50TTKB8PuQMpY2Yhk/_buildManifest.js","static/ToJx50TTKB8PuQMpY2Yhk/_ssgManifest.js"],rootMainFiles:["static/chunks/webpack-a0d592effc1fc533.js","static/chunks/daf1f047-a3c28a0a13479669.js","static/chunks/8781-7ab719d89e190972.js","static/chunks/main-app-462ae4cbda6f025a.js"],pages:{"/_app":["static/chunks/webpack-a0d592effc1fc533.js","static/chunks/framework-af9b1d45774ad36d.js","static/chunks/main-35b856a9841ab2f4.js","static/chunks/pages/_app-e16cc7beb342f9a1.js"],"/_error":["static/chunks/webpack-a0d592effc1fc533.js","static/chunks/framework-af9b1d45774ad36d.js","static/chunks/main-35b856a9841ab2f4.js","static/chunks/pages/_error-59031a98aa832252.js"]},ampFirstPages:[]};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-a0d592effc1fc533.js"/><script src="/_next/static/chunks/daf1f047-a3c28a0a13479669.js" async=""></script><script src="/_next/static/chunks/8781-7ab719d89e190972.js" async=""></script><script src="/_next/static/chunks/main-app-462ae4cbda6f025a.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js" noModule=""></script></head><body><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/_next/static/chunks/webpack-a0d592effc1fc533.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:I[32216,[],\"\"]\n3:I[16022,[],\"\"]\n4:I[86321,[],\"\"]\na:I[50641,[],\"\"]\n5:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n6:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n7:{\"display\":\"inline-block\"}\n8:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nb:[]\n"])</script><script>self.__next_f.push([1,"0:[null,[\"$\",\"$L1\",null,{\"buildId\":\"
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-a0d592effc1fc533.js"/><script src="/_next/static/chunks/daf1f047-a3c28a0a13479669.js" async=""></script><script src="/_next/static/chunks/8781-7ab719d89e190972.js" async=""></script><script src="/_next/static/chunks/main-app-462ae4cbda6f025a.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js" noModule=""></script></head><body><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/_next/static/chunks/webpack-a0d592effc1fc533.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:I[32216,[],\"\"]\n3:I[16022,[],\"\"]\n4:I[86321,[],\"\"]\na:I[50641,[],\"\"]\n5:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n6:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n7:{\"display\":\"inline-block\"}\n8:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nb:[]\n"])</script><script>self.__next_f.push([1,"0:[null,[\"$\",\"$L1\",null,{\"buildId\":\"ToJx50TTKB8PuQMpY2Yhk\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/_not-found\",\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L2\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]]],null],null]},[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[[\"$\",\"html\",null,{\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$5\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$6\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$8\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[],\"styles\":null}]}]}],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$L9\"],\"globalErrorComponent\":\"$a\",\"missingSlots\":\"$Wb\"}]]\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"2\",{\"name\":\"next-size-adjust\"}]]\n2:null\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-a0d592effc1fc533.js" defer=""></script><script src="/_next/static/chunks/framework-af9b1d45774ad36d.js" defer=""></script><script src="/_next/static/chunks/main-35b856a9841ab2f4.js" defer=""></script><script src="/_next/static/chunks/pages/_app-e16cc7beb342f9a1.js" defer=""></script><script src="/_next/static/chunks/pages/_error-59031a98aa832252.js" defer=""></script><script src="/_next/static/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-a0d592effc1fc533.js" defer=""></script><script src="/_next/static/chunks/framework-af9b1d45774ad36d.js" defer=""></script><script src="/_next/static/chunks/main-35b856a9841ab2f4.js" defer=""></script><script src="/_next/static/chunks/pages/_app-e16cc7beb342f9a1.js" defer=""></script><script src="/_next/static/chunks/pages/_error-59031a98aa832252.js" defer=""></script><script src="/_next/static/ToJx50TTKB8PuQMpY2Yhk/_buildManifest.js" defer=""></script><script src="/_next/static/ToJx50TTKB8PuQMpY2Yhk/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"ToJx50TTKB8PuQMpY2Yhk","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
self.__RSC_SERVER_MANIFEST="{\"node\":{},\"edge\":{},\"encryptionKey\":\"
|
|
1
|
+
self.__RSC_SERVER_MANIFEST="{\"node\":{},\"edge\":{},\"encryptionKey\":\"+zlATRXg/RgziDvsOMNccElE39m6Azu5FpHNvnyoeGo=\"}"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"node":{},"edge":{},"encryptionKey":"
|
|
1
|
+
{"node":{},"edge":{},"encryptionKey":"+zlATRXg/RgziDvsOMNccElE39m6Azu5FpHNvnyoeGo="}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3027],{85814:function(e,t,r){Promise.resolve().then(r.bind(r,81930))},81930:function(e,t,r){"use strict";r.d(t,{InteractForm:function(){return C}});var n,a,s=r(25418),i=r(16790),o=r(5166),l=r(3191),c=r(59662),u=r(46760),d=r(69616),m=r(15579),f=r(71874),p=r(26559),h=r(34219),x=r(64254),b=r(52045),y=r(50215),v=r(16898),g=r(59419),j=r(75609),w=r(42564),N=r(97617),I=r(76206),F=r(26448),E=r(24143),M=r(22521),P=r(88414),k=r(98470),R=r(86655),z=r(28103),S=r(24869);(n=a||(a={}))[n.READ=0]="READ",n[n.WRITE=1]="WRITE";let A=v.z.object({inputs:v.z.array(v.z.string()),value:v.z.string().optional()});function O(e){let{worldAbi:t,functionAbi:r}=e,n="view"===r.stateMutability||"pure"===r.stateMutability?0:1,[c,f]=(0,u.useState)(null),{openConnectModal:p}=(0,w.We)(),x=function(e){let{worldAbi:t,functionAbi:r,operationType:n}=e,{worldAddress:s}=(0,h.useParams)(),{id:i}=(0,S.A)(),o=(0,R.NL)(),l=(0,E.Z)(),c=(0,y.m)();return(0,z.D)({mutationFn:async e=>{let{inputs:o,value:c}=e;if(n===a.READ)return{result:await (0,M.L)(l,{abi:t,address:s,functionName:r.name,args:o,chainId:i})};{let e=await (0,P.n)(l,{abi:t,address:s,functionName:r.name,args:o,...c&&{value:BigInt(c)},chainId:i}),n=await (0,k.e)(l,{hash:e});return{txHash:e,receipt:n}}},onMutate:()=>{if(n===a.WRITE)return{toastId:F.A.loading("Transaction submitted")}},onSuccess:(e,t,r)=>{n===a.WRITE&&"txHash"in e&&F.A.success("Transaction successful with hash: ".concat(e.txHash),{id:null==r?void 0:r.toastId}),o.invalidateQueries({queryKey:["balance",{address:c,chainId:i}]})},onError:(e,t,r)=>{console.error("Error:",e),F.A.error(e.message||"Something went wrong. Please try again.",{id:null==r?void 0:r.toastId})}})}({worldAbi:t,functionAbi:r,operationType:n}),b=(0,y.m)(),v=(0,g.cI)({resolver:(0,j.F)(A),defaultValues:{inputs:[]}});async function O(e){if(!b.isConnected)return null==p?void 0:p();let t=await x.mutateAsync({inputs:e.inputs,value:e.value});0===n&&"result"in t&&f(JSON.stringify(t.result,null,2))}let C=null==r?void 0:r.inputs.map(e=>e.type).join(", ");return(0,s.jsxs)(I.l0,{...v,children:[(0,s.jsxs)("form",{onSubmit:v.handleSubmit(O),id:r.name,className:"space-y-4 pb-4",children:[(0,s.jsxs)("h3",{className:"pt-4 font-semibold",children:[(0,s.jsx)("span",{className:"text-orange-500",children:null==r?void 0:r.name}),(0,s.jsx)("span",{className:"opacity-50",children:C&&" (".concat(C,")")}),(0,s.jsxs)("span",{className:"ml-2 opacity-50",children:["payable"===r.stateMutability&&(0,s.jsx)(i.Z,{className:"mr-2 inline-block h-4 w-4"}),("view"===r.stateMutability||"pure"===r.stateMutability)&&(0,s.jsx)(o.Z,{className:"mr-2 inline-block h-4 w-4"}),"nonpayable"===r.stateMutability&&(0,s.jsx)(l.Z,{className:"mr-2 inline-block h-4 w-4"})]})]}),null==r?void 0:r.inputs.map((e,t)=>(0,s.jsx)(I.Wi,{control:v.control,name:"inputs.".concat(t),render:t=>{let{field:r}=t;return(0,s.jsxs)(I.xJ,{children:[(0,s.jsx)(I.lX,{children:e.name}),(0,s.jsx)(I.NI,{children:(0,s.jsx)(d.I,{placeholder:e.type,...r})}),(0,s.jsx)(I.zG,{})]})}},t)),"payable"===r.stateMutability&&(0,s.jsx)(I.Wi,{control:v.control,name:"value",render:e=>{let{field:t}=e;return(0,s.jsxs)(I.xJ,{children:[(0,s.jsx)(I.lX,{children:"ETH value"}),(0,s.jsx)(I.NI,{children:(0,s.jsx)(d.I,{placeholder:"uint256",...t})}),(0,s.jsx)(I.zG,{})]})}}),(0,s.jsxs)(N.z,{type:"submit",disabled:x.isPending,children:[("view"===r.stateMutability||"pure"===r.stateMutability)&&"Read",("payable"===r.stateMutability||"nonpayable"===r.stateMutability)&&"Write"]}),c&&(0,s.jsx)("pre",{className:"text-md rounded border p-3 text-sm",children:c})]}),(0,s.jsx)(m.Z,{})]})}function C(){let[e]=function(){let e=(0,u.useMemo)(()=>()=>window.location.hash.replace(/^#!?/,""),[]),t=(0,h.useRouter)(),r=(0,h.useParams)(),[n,a]=(0,u.useState)(e());(0,u.useEffect)(()=>{a(e())},[r]);let s=()=>{a(e())};return(0,u.useEffect)(()=>(window.addEventListener("hashchange",s),()=>{window.removeEventListener("hashchange",s)}),[]),[n,e=>{var r;let n=window.location.href;n=x.Z.stringifyUrl({url:null!==(r=n.split("#")[0])&&void 0!==r?r:"",fragmentIdentifier:e}),a(e),t.replace(n)}]}(),{data:t,isFetched:r}=(0,b.b)(),[n,a]=(0,c.v1)("function",{defaultValue:""}),y=(0,u.useDeferredValue)(n),v=(0,u.useMemo)(()=>(null==t?void 0:t.abi)?t.abi.filter(e=>"function"===e.type&&e.name.toLowerCase().includes(y.toLowerCase())):[],[null==t?void 0:t.abi,y]);return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{className:"-mr-1g -ml-1 flex gap-x-4 overflow-y-hidden",children:[(0,s.jsxs)("div",{className:"w-[320px] flex-shrink-0 overflow-y-auto border-r pl-1",children:[(0,s.jsxs)("div",{className:"pr-4",children:[(0,s.jsx)("h4",{className:"py-4 text-xs font-semibold uppercase opacity-70",children:"Jump to:"}),(0,s.jsx)(d.I,{type:"text",placeholder:"Filter functions...",value:y,onChange:e=>{a(e.target.value)}})]}),(0,s.jsxs)("ul",{className:"mt-4 max-h-max space-y-2 overflow-y-auto pb-4",children:[!r&&Array.from({length:10}).map((e,t)=>(0,s.jsx)("li",{className:"pt-2",children:(0,s.jsx)(f.O,{className:"h-[25px]"})},t)),null==v?void 0:v.map((t,r)=>(0,s.jsx)("li",{children:(0,s.jsxs)("a",{href:"#".concat(t.name),className:(0,p.cn)("whitespace-nowrap text-sm hover:text-orange-500 hover:underline",t.name===e?"text-orange-500":null),children:[(0,s.jsxs)("span",{className:"opacity-50",children:["payable"===t.stateMutability&&(0,s.jsx)(i.Z,{className:"mr-2 inline-block h-4 w-4"}),("view"===t.stateMutability||"pure"===t.stateMutability)&&(0,s.jsx)(o.Z,{className:"mr-2 inline-block h-4 w-4"}),"nonpayable"===t.stateMutability&&(0,s.jsx)(l.Z,{className:"mr-2 inline-block h-4 w-4"})]}),(0,s.jsx)("span",{children:t.name}),t.inputs.length>0&&(0,s.jsxs)("span",{className:"opacity-50",children:[" (",t.inputs.length,")"]})]})},r))]})]}),(0,s.jsxs)("div",{className:"w-full overflow-y-auto pl-1 pr-1",children:[!r&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(f.O,{className:"h-[100px]"}),(0,s.jsx)(m.Z,{className:"my-4"}),(0,s.jsx)(f.O,{className:"h-[100px]"}),(0,s.jsx)(m.Z,{className:"my-4"}),(0,s.jsx)(f.O,{className:"h-[100px]"}),(0,s.jsx)(m.Z,{className:"my-4"}),(0,s.jsx)(f.O,{className:"h-[100px]"})]}),(null==t?void 0:t.abi)&&v.map(e=>(0,s.jsx)(O,{worldAbi:t.abi,functionAbi:e},JSON.stringify(e)))]})]})})}},24869:function(e,t,r){"use strict";r.d(t,{A:function(){return s}});var n=r(34219),a=r(7867);function s(){let{chainName:e}=(0,n.useParams)();return(0,a.Yx)(e),a.df[e]}},52045:function(e,t,r){"use strict";r.d(t,{b:function(){return i}});var n=r(34219),a=r(59485),s=r(7867);function i(){let{chainName:e,worldAddress:t}=(0,n.useParams)();(0,s.Yx)(e);let{id:r}=s.df[e];return(0,a.a)({queryKey:["worldAbi",e,t],queryFn:async()=>{let e=await fetch("/api/world-abi?".concat(new URLSearchParams({chainId:r.toString(),worldAddress:t})));return await e.json()},select:e=>({abi:e.abi||[],isWorldDeployed:e.isWorldDeployed}),refetchInterval:5e3})}},7867:function(e,t,r){"use strict";r.d(t,{is:function(){return p},M0:function(){return m},oK:function(){return h},df:function(){return f},wG:function(){return x},Yx:function(){return b}});var n=r(40975),a=r(48010),s=r(30246),i=r(90337),o=r(39994);({...a.t});var l={...s.g,iconUrls:["https://redstone.xyz/chain-icons/redstone.png"],indexerUrl:"https://indexer.mud.redstonechain.com",fees:{estimateFeesPerGas:async()=>({maxFeePerGas:100000n,maxPriorityFeePerGas:0n})}},c={...i.T,iconUrls:["https://redstone.xyz/chain-icons/garnet.png"],indexerUrl:"https://indexer.mud.garnetchain.com",fees:{estimateFeesPerGas:async()=>({maxFeePerGas:100000n,maxPriorityFeePerGas:0n})}},u={http:["https://rpc.rhodolitechain.com"],webSocket:["wss://rpc.rhodolitechain.com"]},d={...o.i,name:"Rhodolite Devnet",testnet:!0,id:17420,sourceId:17001,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:u,bundler:u,quarryPassIssuer:u,wiresaw:u},contracts:{...o.i.contracts,quarryPaymaster:{address:"0x61f22c3827d90c390e0e2aaf220971524ac0a68d",blockCreated:11262}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.rhodolitechain.com"},worldsExplorer:{name:"MUD Worlds Explorer",url:"https://explorer.mud.dev/rhodolite/worlds"}},iconUrls:["https://redstone.xyz/chain-icons/rhodolite.png"],indexerUrl:"https://indexer.mud.rhodolitechain.com",mudIdUrl:"https://id.mud.dev",fees:{estimateFeesPerGas:async()=>({maxFeePerGas:100000n,maxPriorityFeePerGas:0n})}};let m=["world","store","metadata","puppet","erc20-puppet","erc721-puppet"],f={anvil:n.O,rhodolite:d,garnet:c,redstone:l},p=Object.fromEntries(Object.entries(f).map(e=>{let[t,r]=e;return[r.id,t]}));function h(e){return"string"==typeof e&&e in f}function x(e){if(!("number"==typeof e&&e in p))throw Error("Invalid chain ID. Supported chains are: ".concat(Object.keys(p).join(", "),"."))}function b(e){if(!h(e))throw Error("Invalid chain name. Supported chains are: ".concat(Object.keys(f).join(", "),"."))}},97617:function(e,t,r){"use strict";r.d(t,{z:function(){return c}});var n=r(25418),a=r(4460),s=r(46760),i=r(85767),o=r(26559);let l=(0,a.j)((0,o.cn)("inline-flex items-center justify-center rounded-md","whitespace-nowrap text-sm font-medium","ring-offset-background transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50"),{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),c=s.forwardRef((e,t)=>{let{className:r,variant:a,size:s,type:c="button",asChild:u=!1,...d}=e,m=u?i.g7:"button";return(0,n.jsx)(m,{className:(0,o.cn)(l({variant:a,size:s,className:r})),ref:t,type:c,...d})});c.displayName="Button"},76206:function(e,t,r){"use strict";r.d(t,{l0:function(){return m},NI:function(){return v},Wi:function(){return p},xJ:function(){return b},lX:function(){return y},zG:function(){return g}});var n=r(25418),a=r(46760),s=r(59419),i=r(85767),o=r(4460),l=r(61690),c=r(26559);let u=(0,o.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,n.jsx)(l.f,{ref:t,className:(0,c.cn)(u(),r),...a})});d.displayName=l.f.displayName;let m=s.RV,f=a.createContext({}),p=e=>{let{...t}=e;return(0,n.jsx)(f.Provider,{value:{name:t.name},children:(0,n.jsx)(s.Qr,{...t})})},h=()=>{let e=a.useContext(f),t=a.useContext(x),{getFieldState:r,formState:n}=(0,s.Gc)(),i=r(e.name,n);if(!e)throw Error("useFormField should be used within <FormField>");let{id:o}=t;return{id:o,name:e.name,formItemId:"".concat(o,"-form-item"),formDescriptionId:"".concat(o,"-form-item-description"),formMessageId:"".concat(o,"-form-item-message"),...i}},x=a.createContext({}),b=a.forwardRef((e,t)=>{let{className:r,...s}=e,i=a.useId();return(0,n.jsx)(x.Provider,{value:{id:i},children:(0,n.jsx)("div",{ref:t,className:(0,c.cn)("space-y-2",r),...s})})});b.displayName="FormItem";let y=a.forwardRef((e,t)=>{let{className:r,...a}=e,{error:s,formItemId:i}=h();return(0,n.jsx)(d,{ref:t,className:(0,c.cn)(s&&"text-destructive",r),htmlFor:i,...a})});y.displayName="FormLabel";let v=a.forwardRef((e,t)=>{let{...r}=e,{error:a,formItemId:s,formDescriptionId:o,formMessageId:l}=h();return(0,n.jsx)(i.g7,{ref:t,id:s,"aria-describedby":a?"".concat(o," ").concat(l):"".concat(o),"aria-invalid":!!a,...r})});v.displayName="FormControl",a.forwardRef((e,t)=>{let{className:r,...a}=e,{formDescriptionId:s}=h();return(0,n.jsx)("p",{ref:t,id:s,className:(0,c.cn)("text-sm text-muted-foreground",r),...a})}).displayName="FormDescription";let g=a.forwardRef((e,t)=>{let{className:r,children:a,...s}=e,{error:i,formMessageId:o}=h(),l=i?String(null==i?void 0:i.message):a;return l?(0,n.jsx)("p",{ref:t,id:o,className:(0,c.cn)("text-sm font-medium text-destructive",r),...s,children:l}):null});g.displayName="FormMessage"},69616:function(e,t,r){"use strict";r.d(t,{I:function(){return i}});var n=r(25418),a=r(46760),s=r(26559);let i=a.forwardRef((e,t)=>{let{className:r,type:a,...i}=e;return(0,n.jsx)("input",{type:a,className:(0,s.cn)("flex h-10 w-full rounded-md px-3 py-2 text-sm","border border-input bg-background ring-offset-background","file:border-0 file:bg-transparent file:text-sm file:font-medium","placeholder:text-muted-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50",r),ref:t,...i})});i.displayName="Input"},15579:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(25418),a=r(46760),s=r(32525),i=r(26559);let o=a.forwardRef((e,t)=>{let{className:r,orientation:a="horizontal",decorative:o=!0,...l}=e;return(0,n.jsx)(s.f,{ref:t,decorative:o,orientation:a,className:(0,i.cn)("shrink-0 bg-border","horizontal"===a?"h-[1px] w-full":"h-full w-[1px]",r),...l})});o.displayName=s.f.displayName},71874:function(e,t,r){"use strict";r.d(t,{O:function(){return s}});var n=r(25418),a=r(26559);function s(e){let{className:t,...r}=e;return(0,n.jsx)("div",{className:(0,a.cn)("animate-pulse rounded-md bg-muted",t),...r})}},26559:function(e,t,r){"use strict";r.d(t,{az:function(){return l},cn:function(){return i},fu:function(){return o},r8:function(){return c}});var n=r(73662),a=r(22830),s=r(95359);function i(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,s.m)((0,a.W)(t))}function o(e){return e.replace(/[A-Z]/g,e=>"_".concat(e.toLowerCase())).replace(/^_/,"")}function l(e){let t=(0,n.d)(e),r=Math.floor(parseFloat(t)).toString().length;return parseFloat(t).toLocaleString("en-US",{maximumFractionDigits:Math.max(0,6-r)})}function c(e){return"fulfilled"===e.status}}},function(e){e.O(0,[1734,8866,3823,8444,3442,3787,4296,5308,6448,1212,183,2710,8781,1744],function(){return e(e.s=85814)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1667],{47629:function(e,t,n){Promise.resolve().then(n.bind(n,23168))},23168:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return eO}});var a=n(25418),r=n(34219),s=n(7867),i=n(264),c=n(55056),o=n(31491),l=n(52045),d=n(52724),u=n(24869),f=n(71874);function p(){let{id:e}=(0,u.A)(),{data:t}=(0,d.O)({watch:!0,chainId:e,query:{refetchInterval:1e3}});return(0,a.jsx)("div",{className:"inline-block w-[50px]",children:t?(0,a.jsxs)("div",{className:"flex items-center justify-end gap-x-2 text-xs font-extrabold text-green-600",children:[(0,a.jsx)("span",{className:"inline-block h-[8px] w-[8px] animate-pulse rounded-full bg-success"}),(0,a.jsx)("span",{className:"opacity-70",children:t.toString()})]}):(0,a.jsx)(f.O,{className:"h-[10px]"})})}var m=n(15579),h=n(26559),x=n(64541),b=n(12010),y=n(40975),v=n(42564),g=n(21805),j=n(65845),w=n(50215),N=n(11603),k=n(87031),C=n(46760),O=n(57015),z=n(85598),P=n(87288);let U=["0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80","0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d","0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a","0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6","0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a","0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba","0x92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e","0x4bbbf85ce3377467afe5d46f804f221813b2bb87f24d81f60f1fcdbf7cbf4356","0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97","0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6"].map(e=>(0,z.L)(e)),F=e=>{let t=e!==y.O.id;return U.map((e,n)=>(function(e){let{id:t,name:n,accounts:a,disabled:r}=e;if(!a.length)throw Error("missing accounts");let s=!1;return(0,P.K)(()=>({id:t,name:n,type:"anvil",accounts:a,connect:async()=>(s=!0,{accounts:a.map(e=>e.address),chainId:y.O.id}),async disconnect(){s=!1},getAccounts:async()=>a.map(e=>e.address),getChainId:async()=>y.O.id,getProvider:async()=>(0,O.d)()({chain:y.O}),async isAuthorized(){return!r&&!!s&&!!(await this.getAccounts()).length},async onAccountsChanged(){},async onDisconnect(){},onChainChanged(){}}))})({id:"anvil-".concat(n),name:"Anvil #".concat(n+1),accounts:[e],disabled:t}))};function I(e){return"anvil"===e.type}var E=n(97617),Z=n(84321),_=n(76081),A=n(41766),R=n(93284);let G=R.fC;R.ZA;let S=R.B4,K=C.forwardRef((e,t)=>{let{className:n,children:r,...s}=e;return(0,a.jsxs)(R.xz,{ref:t,className:(0,h.cn)("flex h-10 w-full items-center justify-between px-3 py-2 text-sm","rounded-md border border-input bg-background ring-offset-background","placeholder:text-muted-foreground","focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",n),...s,children:[r,(0,a.jsx)(R.JO,{asChild:!0,children:(0,a.jsx)(Z.Z,{className:"h-4 w-4 opacity-50"})})]})});K.displayName=R.xz.displayName;let M=C.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,a.jsx)(R.u_,{ref:t,className:(0,h.cn)("flex cursor-default items-center justify-center py-1",n),...r,children:(0,a.jsx)(_.Z,{className:"h-4 w-4"})})});M.displayName=R.u_.displayName;let B=C.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,a.jsx)(R.$G,{ref:t,className:(0,h.cn)("flex cursor-default items-center justify-center py-1",n),...r,children:(0,a.jsx)(Z.Z,{className:"h-4 w-4"})})});B.displayName=R.$G.displayName;let D=C.forwardRef((e,t)=>{let{className:n,children:r,position:s="popper",...i}=e;return(0,a.jsx)(R.h_,{children:(0,a.jsxs)(R.VY,{ref:t,className:(0,h.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden","rounded-md border bg-popover text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2","data-[side=top]:slide-in-from-bottom-2","popper"===s&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:s,...i,children:[(0,a.jsx)(M,{}),(0,a.jsx)(R.l_,{className:(0,h.cn)("p-1","popper"===s&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),(0,a.jsx)(B,{})]})})});D.displayName=R.VY.displayName,C.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,a.jsx)(R.__,{ref:t,className:(0,h.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",n),...r})}).displayName=R.__.displayName;let H=C.forwardRef((e,t)=>{let{className:n,children:r,...s}=e;return(0,a.jsxs)(R.ck,{ref:t,className:(0,h.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),...s,children:[(0,a.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,a.jsx)(R.wU,{children:(0,a.jsx)(A.Z,{className:"h-4 w-4"})})}),(0,a.jsx)(R.eT,{children:r})]})});H.displayName=R.ck.displayName,C.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,a.jsx)(R.Z0,{ref:t,className:(0,h.cn)("-mx-1 my-1 h-px bg-muted",n),...r})}).displayName=R.Z0.displayName;var T=n(39482);function W(e){var t;let{connector:n}=e,r=null===(t=n.accounts[0])||void 0===t?void 0:t.address,{data:s}=(0,j.K)({address:r,query:{refetchInterval:15e3,select:e=>null==e?void 0:e.value,enabled:!!r}});return(0,a.jsxs)(H,{value:n.id,className:"font-mono",children:[n.name,void 0!==s&&" (".concat((0,h.az)(s)," ETH)")," ",r&&(0,a.jsxs)("span",{className:"opacity-70",children:["(",(0,a.jsx)(T.a,{hex:r}),")"]})]},r)}function L(){let[e,t]=(0,C.useState)(!1),{connector:n}=(0,w.m)(),{connect:r}=(0,N.$)(),{openConnectModal:s}=(0,v.We)(),i=[...(0,k.Y)().filter(I)];return(0,a.jsxs)(G,{open:e,onOpenChange:t,value:null==n?void 0:n.id,onValueChange:e=>{let t=i.find(t=>t.id===e);t&&r({connector:t})},children:[(0,a.jsx)(E.z,{size:"sm",asChild:!0,children:(0,a.jsxs)(K,{children:[(0,a.jsx)(x.Z,{className:"mr-2 inline-block h-4 w-4"}),(0,a.jsx)(S,{placeholder:"Connect"})]})}),(0,a.jsxs)(D,{children:[i.map(e=>(0,a.jsx)(W,{connector:e},e.id)),(0,a.jsxs)(E.z,{size:"sm",className:"mt-2 w-full font-mono",onClick:()=>{t(!1),null==s||s()},children:[(0,a.jsx)(g.Z,{className:"mr-2 inline-block h-4 w-4"}),"Add wallet"]})]})]})}function q(){let{id:e}=(0,u.A)();return(0,a.jsx)(v.NL.Custom,{children:t=>{let{account:n,chain:r,openAccountModal:s,openChainModal:i,openConnectModal:c,mounted:o}=t;return(0,a.jsx)("div",{className:(0,h.cn)({"pointer-events-none select-none opacity-0":!o}),children:o&&n&&r?r.unsupported?(0,a.jsxs)(E.z,{type:"button",size:"sm",onClick:i,children:[(0,a.jsx)(b.Z,{className:"mr-2 inline-block h-4 w-4"}),"Wrong network"]}):(0,a.jsx)("div",{className:"flex-wrap gap-2",children:(0,a.jsxs)(E.z,{type:"button",size:"sm",onClick:s,variant:"secondary",children:[(0,a.jsx)(x.Z,{className:"mr-2 inline-block h-4 w-4"}),n.displayName,(0,a.jsx)("span",{className:"ml-2 font-normal opacity-70",children:n.displayBalance?" (".concat(n.displayBalance,")"):""})]})}):e===y.O.id?(0,a.jsx)(L,{}):(0,a.jsxs)(E.z,{type:"button",size:"sm",onClick:c,children:[(0,a.jsx)(x.Z,{className:"mr-2 inline-block h-4 w-4"})," Connect"]})})}})}function V(e){let{href:t,children:n}=e,s=(0,r.usePathname)(),i=(0,o.g)();return(0,a.jsx)(c.default,{href:i(t),className:"group px-3 text-sm font-semibold uppercase",children:(0,a.jsx)("span",{className:(0,h.cn)("flex border-b-4 border-transparent pb-3 pt-4 transition group-hover:border-orange-500/30",s===i(t)?"border-orange-500 group-hover:border-orange-400":null),children:n})})}function Y(){let{data:e,isFetched:t}=(0,l.b)();return(0,a.jsxs)("div",{className:"pb-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"-mx-3 flex",children:[(0,a.jsx)(V,{href:"explore",children:"Explore"}),(0,a.jsx)(V,{href:"interact",children:"Interact"}),(0,a.jsx)(V,{href:"observe",children:"Observe"})]}),t&&!(null==e?void 0:e.isWorldDeployed)&&(0,a.jsxs)("h4",{className:"font-mono text-sm font-bold uppercase opacity-70",children:["Waiting for world deploy ",(0,a.jsx)(i.Z,{className:"inline-block h-4 w-4 animate-spin"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-x-4",children:[(0,a.jsx)(p,{}),(0,a.jsx)(q,{})]})]}),(0,a.jsx)(m.Z,{})]})}var $=n(32226),J=n(65835),Q=n(32932),X=n(17019),ee=n(89821),et=n(87244),en=n(62856),ea=n(1130);n(90966);var er=n(10286),es=n(86655);let ei=new er.S;function ec(e){let{children:t}=e,n=(0,u.A)(),r=(0,C.useMemo)(()=>(0,$._)({chains:[n],connectors:[(0,ee.L)(),(0,et.O)({dappMetadata:{name:"World Explorer"}}),(0,en.T)(),...F(n.id)],transports:{[n.id]:n.rpcUrls.default.webSocket?(0,J.t)([(0,Q.j)(n.rpcUrls.default.webSocket[0]),(0,O.d)(n.rpcUrls.default.http[0])]):(0,O.d)(n.rpcUrls.default.http[0])},ssr:!0,pollingInterval:{[n.id]:31337===n.id?100:500}}),[n]);return(0,a.jsx)(X.F,{config:r,children:(0,a.jsx)(es.aH,{client:ei,children:(0,a.jsx)(v.pj,{theme:(0,ea.$)(),children:t})})})}var eo=n(47268),el=n(31038),ed=n(46812),eu=n(68943),ef=n(54472),ep=n(74334),em=n(24143),eh=n(39854),ex=n(98470),eb=n(59450),ey=n(30393),ev=n(7168),eg=n(88620),ej=n(87182),ew=n(51049);let eN={type:"event",name:"UserOperationEvent",inputs:[{type:"bytes32",name:"userOpHash",indexed:!0},{type:"address",name:"sender",indexed:!0},{type:"address",name:"paymaster",indexed:!0},{type:"uint256",name:"nonce",indexed:!1},{type:"bool",name:"success",indexed:!1},{type:"uint256",name:"actualGasCost",indexed:!1},{type:"uint256",name:"actualGasUsed",indexed:!1}]};function ek(e){let t,n,a,{abi:r,target:s,data:i,value:c}=e;try{let e=(0,eo.p)({abi:r,data:i});if(t=e.functionName,n=e.args,"callFrom"===t){let[e,,s]=n,i=(0,eo.p)({abi:r,data:s});t=i.functionName,n=i.args,a=e}}catch(e){t=i.length>10?i.slice(0,10):"unknown"}return{to:s,from:a,functionName:t,args:n,value:c}}function eC(){let{id:e}=(0,u.A)(),{worldAddress:t}=(0,r.useParams)(),n=(0,em.Z)(),{data:a}=(0,l.b)(),s=null==a?void 0:a.abi,{transactions:i,setTransaction:c,updateTransaction:o}=(0,eg.oR)(ew.h),d=(0,eg.oR)(ej.store,e=>e.writes),f=(0,C.useCallback)(e=>{var n,a;let{hash:r,writeId:i,timestamp:o,receipt:l,transaction:d,userOperation:u}=e;if(!s)return;let{functionName:f,args:p}=(0,eo.p)({abi:(0,el.V)(["function execute(address target, uint256 value, bytes calldata data)","function executeBatch((address target,uint256 value,bytes data)[])"]),data:u.callData}),m=(function(e){let{abi:t,functionName:n,decodedArgs:a}=e;if("execute"===n){let e=a[0],n=a[1];return[ek({abi:t,target:e,data:a[2],value:n})]}return"executeBatch"===n?a[0].map(e=>{let{target:n,data:a,value:r}=e;return ek({abi:t,target:n,data:a,value:r})}):[]})({abi:s,functionName:f,decodedArgs:p}).filter(e=>{let{to:n}=e;return n&&(0,ed.K)(n)===(0,ed.K)(t)});if(0===m.length)return;let h=(0,eu.h)({abi:[...s,eN],logs:l.logs}),x=h.find(e=>{let{eventName:t}=e;return"UserOperationEvent"===t});c({hash:r,writeId:null!=i?i:r,from:null!==(a=null===(n=m[0])||void 0===n?void 0:n.from)&&void 0!==a?a:d.from,timestamp:o,transaction:d,calls:m,receipt:l,logs:h,value:d.value,status:(null==x?void 0:x.args.success)?"success":"reverted"})},[s,c,t]),p=(0,C.useCallback)(async e=>{let{writeId:t,timestamp:a,transaction:r}=e;if(!s)return;let i=r.hash,c=await (0,ex.e)(n,{hash:r.hash});for(let e of(0,eo.p)({abi:ef.i,data:r.input}).args[0])f({hash:i,writeId:t,timestamp:a,receipt:c,transaction:r,userOperation:e})},[s,f,n]),m=(0,C.useCallback)(async e=>{let a,r,i,l,{writeId:d,hash:u,timestamp:f,transaction:p}=e;if(!s||!p.to)return;try{let e=(0,eo.p)({abi:s,data:p.input});a=e.functionName,r=e.args}catch(e){i=e,a=p.input.length>10?p.input.slice(0,10):"unknown"}c({hash:u,writeId:null!=d?d:u,from:p.from,timestamp:f,transaction:p,status:"pending",calls:[{to:p.to,functionName:a,args:r}],value:p.value});try{l=await (0,ex.e)(n,{hash:u})}catch(e){console.error("Failed to fetch transaction receipt. Transaction hash: ".concat(u))}if(l&&"reverted"===l.status&&a)try{await (0,eb.a)(n,{account:p.from,address:t,abi:s,value:p.value,blockNumber:l.blockNumber,functionName:a,args:r})}catch(e){i=e}let m=l?l.status:"unknown",h=(0,eu.h)({abi:s,logs:(null==l?void 0:l.logs)||[]});o(u,{receipt:l,logs:h,status:m,error:i})},[s,n,t,c,o]),h=(0,C.useCallback)(async e=>{let{hash:a,writeId:r,timestamp:i}=e;if(!s)return;let c=await (0,ey.f)(n,{hash:a});c.to&&(0,ed.K)(c.to)===(0,ed.K)(ep.V)?p({writeId:r,timestamp:i,transaction:c}):c.to&&(0,ed.K)(c.to)===(0,ed.K)(t)&&m({hash:a,writeId:r,timestamp:i,transaction:c})},[s,n,t,p,m]);return(0,C.useEffect)(()=>{for(let{hash:e,writeId:t,time:n}of Object.values(d))e&&!i.find(t=>t.hash===e)&&h({hash:e,writeId:t,timestamp:BigInt(n)/1000n})},[h,d,i,t]),(0,eh.C)({chainId:e,async onBlock(t){var a;for(let r of null!==(a=t.transactions)&&void 0!==a?a:(await (0,ev.Q)(n,{chainId:e,blockHash:t.hash})).transactions)i.find(e=>e.hash===r)||h({hash:r,timestamp:t.timestamp})}}),null}function eO(e){let{params:{chainName:t},children:n}=e;return(0,s.oK)(t)?(0,a.jsxs)(ec,{children:[(0,a.jsxs)("div",{className:"flex h-screen flex-col",children:[(0,a.jsx)(Y,{}),n]}),(0,a.jsx)(eC,{})]}):(0,r.notFound)()}},51049:function(e,t,n){"use strict";n.d(t,{h:function(){return a}});let a=(0,n(82178).M)()(e=>({transactions:[],setTransaction:t=>e(e=>({transactions:[...e.transactions,t]})),updateTransaction:(t,n)=>e(e=>({transactions:e.transactions.map(e=>e.hash===t?{...e,...n}:e)}))}))},24869:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});var a=n(34219),r=n(7867);function s(){let{chainName:e}=(0,a.useParams)();return(0,r.Yx)(e),r.df[e]}},31491:function(e,t,n){"use strict";n.d(t,{g:function(){return s}});var a=n(34219),r=n(14517);function s(){let{chainName:e,worldAddress:t}=(0,a.useParams)();return n=>"".concat((0,r.m)(e,t),"/").concat(n)}},52045:function(e,t,n){"use strict";n.d(t,{b:function(){return i}});var a=n(34219),r=n(59485),s=n(7867);function i(){let{chainName:e,worldAddress:t}=(0,a.useParams)();(0,s.Yx)(e);let{id:n}=s.df[e];return(0,r.a)({queryKey:["worldAbi",e,t],queryFn:async()=>{let e=await fetch("/api/world-abi?".concat(new URLSearchParams({chainId:n.toString(),worldAddress:t})));return await e.json()},select:e=>({abi:e.abi||[],isWorldDeployed:e.isWorldDeployed}),refetchInterval:15e3})}},14517:function(e,t,n){"use strict";function a(e,t){return"/".concat(e,"/worlds/").concat(t)}n.d(t,{m:function(){return a}})},7867:function(e,t,n){"use strict";n.d(t,{is:function(){return m},M0:function(){return f},oK:function(){return h},df:function(){return p},wG:function(){return x},Yx:function(){return b}});var a=n(40975),r=n(48010),s=n(30246),i=n(90337),c=n(39994);({...r.t});var o={...s.g,iconUrls:["https://redstone.xyz/chain-icons/redstone.png"],indexerUrl:"https://indexer.mud.redstonechain.com",fees:{estimateFeesPerGas:async()=>({maxFeePerGas:100000n,maxPriorityFeePerGas:0n})}},l={...i.T,iconUrls:["https://redstone.xyz/chain-icons/garnet.png"],indexerUrl:"https://indexer.mud.garnetchain.com",fees:{estimateFeesPerGas:async()=>({maxFeePerGas:100000n,maxPriorityFeePerGas:0n})}},d={http:["https://rpc.rhodolitechain.com"],webSocket:["wss://rpc.rhodolitechain.com"]},u={...c.i,name:"Rhodolite Devnet",testnet:!0,id:17420,sourceId:17001,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:d,bundler:d,quarryPassIssuer:d,wiresaw:d},contracts:{...c.i.contracts,quarryPaymaster:{address:"0x61f22c3827d90c390e0e2aaf220971524ac0a68d",blockCreated:11262}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.rhodolitechain.com"},worldsExplorer:{name:"MUD Worlds Explorer",url:"https://explorer.mud.dev/rhodolite/worlds"}},iconUrls:["https://redstone.xyz/chain-icons/rhodolite.png"],indexerUrl:"https://indexer.mud.rhodolitechain.com",mudIdUrl:"https://id.mud.dev",fees:{estimateFeesPerGas:async()=>({maxFeePerGas:100000n,maxPriorityFeePerGas:0n})}};let f=["world","store","metadata","puppet","erc20-puppet","erc721-puppet"],p={anvil:a.O,rhodolite:u,garnet:l,redstone:o},m=Object.fromEntries(Object.entries(p).map(e=>{let[t,n]=e;return[n.id,t]}));function h(e){return"string"==typeof e&&e in p}function x(e){if(!("number"==typeof e&&e in m))throw Error("Invalid chain ID. Supported chains are: ".concat(Object.keys(m).join(", "),"."))}function b(e){if(!h(e))throw Error("Invalid chain name. Supported chains are: ".concat(Object.keys(p).join(", "),"."))}},97617:function(e,t,n){"use strict";n.d(t,{z:function(){return l}});var a=n(25418),r=n(4460),s=n(46760),i=n(85767),c=n(26559);let o=(0,r.j)((0,c.cn)("inline-flex items-center justify-center rounded-md","whitespace-nowrap text-sm font-medium","ring-offset-background transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50"),{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),l=s.forwardRef((e,t)=>{let{className:n,variant:r,size:s,type:l="button",asChild:d=!1,...u}=e,f=d?i.g7:"button";return(0,a.jsx)(f,{className:(0,c.cn)(o({variant:r,size:s,className:n})),ref:t,type:l,...u})});l.displayName="Button"},15579:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var a=n(25418),r=n(46760),s=n(32525),i=n(26559);let c=r.forwardRef((e,t)=>{let{className:n,orientation:r="horizontal",decorative:c=!0,...o}=e;return(0,a.jsx)(s.f,{ref:t,decorative:c,orientation:r,className:(0,i.cn)("shrink-0 bg-border","horizontal"===r?"h-[1px] w-full":"h-full w-[1px]",n),...o})});c.displayName=s.f.displayName},71874:function(e,t,n){"use strict";n.d(t,{O:function(){return s}});var a=n(25418),r=n(26559);function s(e){let{className:t,...n}=e;return(0,a.jsx)("div",{className:(0,r.cn)("animate-pulse rounded-md bg-muted",t),...n})}},39482:function(e,t,n){"use strict";n.d(t,{a:function(){return r}});var a=n(25418);function r(e){let{hex:t}=e;return t.length<=10?(0,a.jsx)("span",{children:t}):(0,a.jsxs)("span",{children:[(0,a.jsx)("span",{className:"after:select-none after:content-['…']",children:t.slice(0,6)}),(0,a.jsx)("span",{className:"tracking-[-1ch] text-transparent",children:t.slice(6,-4)}),t.slice(-4)]})}},18141:function(e,t,n){"use strict";n.d(t,{M:function(){return a}});let a="explorer/observer"},21598:function(e,t,n){"use strict";n.d(t,{f:function(){return r}});var a=n(64303);let r=n.n(a)()("mud:explorer").extend("observer")},87182:function(e,t,n){"use strict";n.d(t,{store:function(){return c}});var a=n(82178),r=n(26559),s=n(18141),i=n(21598);let c=(0,a.M)(()=>({writes:{}}));(0,i.f)("listening for relayed messages",s.M);let o=[];new BroadcastChannel(s.M).addEventListener("message",e=>{"ping"!==e.data.type&&o.push(e)}),setInterval(function(){0!==o.length&&c.setState(e=>{let t=e;for(let{data:e}of o){if("ping"===e.type)continue;let n="write"===e.type?{...e,events:[]}:t.writes[e.writeId];if(!n)continue;let a=n.hash;"waitForTransactionReceipt"===e.type?a=e.hash:"waitForUserOperationReceipt:result"===e.type&&(0,r.r8)(e)&&(a=e.value.receipt.transactionHash),t={...t,writes:{...t.writes,[e.writeId]:{...n,type:e.type,hash:a,userOpHash:"waitForUserOperationReceipt"===e.type?e.userOpHash:n.userOpHash,events:[...n.events,e]}}}}return o.length=0,t})},100)},26559:function(e,t,n){"use strict";n.d(t,{az:function(){return o},cn:function(){return i},fu:function(){return c},r8:function(){return l}});var a=n(73662),r=n(22830),s=n(95359);function i(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s.m)((0,r.W)(t))}function c(e){return e.replace(/[A-Z]/g,e=>"_".concat(e.toLowerCase())).replace(/^_/,"")}function o(e){let t=(0,a.d)(e),n=Math.floor(parseFloat(t)).toString().length;return parseFloat(t).toLocaleString("en-US",{maximumFractionDigits:Math.max(0,6-n)})}function l(e){return"fulfilled"===e.status}}},function(e){e.O(0,[7801,1734,8866,3823,8444,3442,4303,3787,8578,4296,833,5056,749,5168,2710,8781,1744],function(){return e(e.s=47629)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1667],{47629:function(e,t,n){Promise.resolve().then(n.bind(n,23168))},23168:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return eO}});var a=n(25418),r=n(34219),s=n(7867),i=n(264),c=n(55056),o=n(31491),l=n(52045),d=n(52724),u=n(24869),f=n(71874);function p(){let{id:e}=(0,u.A)(),{data:t}=(0,d.O)({watch:!0,chainId:e,query:{refetchInterval:1e3}});return(0,a.jsx)("div",{className:"inline-block w-[50px]",children:t?(0,a.jsxs)("div",{className:"flex items-center justify-end gap-x-2 text-xs font-extrabold text-green-600",children:[(0,a.jsx)("span",{className:"inline-block h-[8px] w-[8px] animate-pulse rounded-full bg-success"}),(0,a.jsx)("span",{className:"opacity-70",children:t.toString()})]}):(0,a.jsx)(f.O,{className:"h-[10px]"})})}var m=n(15579),h=n(26559),x=n(64541),b=n(12010),y=n(40975),v=n(42564),g=n(21805),j=n(65845),w=n(50215),N=n(11603),k=n(87031),C=n(46760),O=n(57015),z=n(85598),P=n(87288);let U=["0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80","0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d","0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a","0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6","0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a","0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba","0x92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e","0x4bbbf85ce3377467afe5d46f804f221813b2bb87f24d81f60f1fcdbf7cbf4356","0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97","0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6"].map(e=>(0,z.L)(e)),F=e=>{let t=e!==y.O.id;return U.map((e,n)=>(function(e){let{id:t,name:n,accounts:a,disabled:r}=e;if(!a.length)throw Error("missing accounts");let s=!1;return(0,P.K)(()=>({id:t,name:n,type:"anvil",accounts:a,connect:async()=>(s=!0,{accounts:a.map(e=>e.address),chainId:y.O.id}),async disconnect(){s=!1},getAccounts:async()=>a.map(e=>e.address),getChainId:async()=>y.O.id,getProvider:async()=>(0,O.d)()({chain:y.O}),async isAuthorized(){return!r&&!!s&&!!(await this.getAccounts()).length},async onAccountsChanged(){},async onDisconnect(){},onChainChanged(){}}))})({id:"anvil-".concat(n),name:"Anvil #".concat(n+1),accounts:[e],disabled:t}))};function I(e){return"anvil"===e.type}var E=n(97617),Z=n(84321),_=n(76081),A=n(41766),R=n(93284);let G=R.fC;R.ZA;let S=R.B4,K=C.forwardRef((e,t)=>{let{className:n,children:r,...s}=e;return(0,a.jsxs)(R.xz,{ref:t,className:(0,h.cn)("flex h-10 w-full items-center justify-between px-3 py-2 text-sm","rounded-md border border-input bg-background ring-offset-background","placeholder:text-muted-foreground","focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",n),...s,children:[r,(0,a.jsx)(R.JO,{asChild:!0,children:(0,a.jsx)(Z.Z,{className:"h-4 w-4 opacity-50"})})]})});K.displayName=R.xz.displayName;let M=C.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,a.jsx)(R.u_,{ref:t,className:(0,h.cn)("flex cursor-default items-center justify-center py-1",n),...r,children:(0,a.jsx)(_.Z,{className:"h-4 w-4"})})});M.displayName=R.u_.displayName;let B=C.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,a.jsx)(R.$G,{ref:t,className:(0,h.cn)("flex cursor-default items-center justify-center py-1",n),...r,children:(0,a.jsx)(Z.Z,{className:"h-4 w-4"})})});B.displayName=R.$G.displayName;let D=C.forwardRef((e,t)=>{let{className:n,children:r,position:s="popper",...i}=e;return(0,a.jsx)(R.h_,{children:(0,a.jsxs)(R.VY,{ref:t,className:(0,h.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden","rounded-md border bg-popover text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2","data-[side=top]:slide-in-from-bottom-2","popper"===s&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:s,...i,children:[(0,a.jsx)(M,{}),(0,a.jsx)(R.l_,{className:(0,h.cn)("p-1","popper"===s&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),(0,a.jsx)(B,{})]})})});D.displayName=R.VY.displayName,C.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,a.jsx)(R.__,{ref:t,className:(0,h.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",n),...r})}).displayName=R.__.displayName;let H=C.forwardRef((e,t)=>{let{className:n,children:r,...s}=e;return(0,a.jsxs)(R.ck,{ref:t,className:(0,h.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),...s,children:[(0,a.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,a.jsx)(R.wU,{children:(0,a.jsx)(A.Z,{className:"h-4 w-4"})})}),(0,a.jsx)(R.eT,{children:r})]})});H.displayName=R.ck.displayName,C.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,a.jsx)(R.Z0,{ref:t,className:(0,h.cn)("-mx-1 my-1 h-px bg-muted",n),...r})}).displayName=R.Z0.displayName;var T=n(39482);function W(e){var t;let{connector:n}=e,r=null===(t=n.accounts[0])||void 0===t?void 0:t.address,{data:s}=(0,j.K)({address:r,query:{refetchInterval:15e3,select:e=>null==e?void 0:e.value,enabled:!!r}});return(0,a.jsxs)(H,{value:n.id,className:"font-mono",children:[n.name,void 0!==s&&" (".concat((0,h.az)(s)," ETH)")," ",r&&(0,a.jsxs)("span",{className:"opacity-70",children:["(",(0,a.jsx)(T.a,{hex:r}),")"]})]},r)}function L(){let[e,t]=(0,C.useState)(!1),{connector:n}=(0,w.m)(),{connect:r}=(0,N.$)(),{openConnectModal:s}=(0,v.We)(),i=[...(0,k.Y)().filter(I)];return(0,a.jsxs)(G,{open:e,onOpenChange:t,value:null==n?void 0:n.id,onValueChange:e=>{let t=i.find(t=>t.id===e);t&&r({connector:t})},children:[(0,a.jsx)(E.z,{size:"sm",asChild:!0,children:(0,a.jsxs)(K,{children:[(0,a.jsx)(x.Z,{className:"mr-2 inline-block h-4 w-4"}),(0,a.jsx)(S,{placeholder:"Connect"})]})}),(0,a.jsxs)(D,{children:[i.map(e=>(0,a.jsx)(W,{connector:e},e.id)),(0,a.jsxs)(E.z,{size:"sm",className:"mt-2 w-full font-mono",onClick:()=>{t(!1),null==s||s()},children:[(0,a.jsx)(g.Z,{className:"mr-2 inline-block h-4 w-4"}),"Add wallet"]})]})]})}function q(){let{id:e}=(0,u.A)();return(0,a.jsx)(v.NL.Custom,{children:t=>{let{account:n,chain:r,openAccountModal:s,openChainModal:i,openConnectModal:c,mounted:o}=t;return(0,a.jsx)("div",{className:(0,h.cn)({"pointer-events-none select-none opacity-0":!o}),children:o&&n&&r?r.unsupported?(0,a.jsxs)(E.z,{type:"button",size:"sm",onClick:i,children:[(0,a.jsx)(b.Z,{className:"mr-2 inline-block h-4 w-4"}),"Wrong network"]}):(0,a.jsx)("div",{className:"flex-wrap gap-2",children:(0,a.jsxs)(E.z,{type:"button",size:"sm",onClick:s,variant:"secondary",children:[(0,a.jsx)(x.Z,{className:"mr-2 inline-block h-4 w-4"}),n.displayName,(0,a.jsx)("span",{className:"ml-2 font-normal opacity-70",children:n.displayBalance?" (".concat(n.displayBalance,")"):""})]})}):e===y.O.id?(0,a.jsx)(L,{}):(0,a.jsxs)(E.z,{type:"button",size:"sm",onClick:c,children:[(0,a.jsx)(x.Z,{className:"mr-2 inline-block h-4 w-4"})," Connect"]})})}})}function V(e){let{href:t,children:n}=e,s=(0,r.usePathname)(),i=(0,o.g)();return(0,a.jsx)(c.default,{href:i(t),className:"group px-3 text-sm font-semibold uppercase",children:(0,a.jsx)("span",{className:(0,h.cn)("flex border-b-4 border-transparent pb-3 pt-4 transition group-hover:border-orange-500/30",s===i(t)?"border-orange-500 group-hover:border-orange-400":null),children:n})})}function Y(){let{data:e,isFetched:t}=(0,l.b)();return(0,a.jsxs)("div",{className:"pb-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"-mx-3 flex",children:[(0,a.jsx)(V,{href:"explore",children:"Explore"}),(0,a.jsx)(V,{href:"interact",children:"Interact"}),(0,a.jsx)(V,{href:"observe",children:"Observe"})]}),t&&!(null==e?void 0:e.isWorldDeployed)&&(0,a.jsxs)("h4",{className:"font-mono text-sm font-bold uppercase opacity-70",children:["Waiting for world deploy ",(0,a.jsx)(i.Z,{className:"inline-block h-4 w-4 animate-spin"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-x-4",children:[(0,a.jsx)(p,{}),(0,a.jsx)(q,{})]})]}),(0,a.jsx)(m.Z,{})]})}var $=n(32226),J=n(65835),Q=n(32932),X=n(17019),ee=n(89821),et=n(87244),en=n(62856),ea=n(1130);n(90966);var er=n(10286),es=n(86655);let ei=new er.S;function ec(e){let{children:t}=e,n=(0,u.A)(),r=(0,C.useMemo)(()=>(0,$._)({chains:[n],connectors:[(0,ee.L)(),(0,et.O)({dappMetadata:{name:"World Explorer"}}),(0,en.T)(),...F(n.id)],transports:{[n.id]:n.rpcUrls.default.webSocket?(0,J.t)([(0,Q.j)(n.rpcUrls.default.webSocket[0]),(0,O.d)(n.rpcUrls.default.http[0])]):(0,O.d)(n.rpcUrls.default.http[0])},ssr:!0,pollingInterval:{[n.id]:31337===n.id?100:500}}),[n]);return(0,a.jsx)(X.F,{config:r,children:(0,a.jsx)(es.aH,{client:ei,children:(0,a.jsx)(v.pj,{theme:(0,ea.$)(),children:t})})})}var eo=n(47268),el=n(31038),ed=n(46812),eu=n(68943),ef=n(54472),ep=n(74334),em=n(24143),eh=n(39854),ex=n(98470),eb=n(59450),ey=n(30393),ev=n(7168),eg=n(88620),ej=n(87182),ew=n(51049);let eN={type:"event",name:"UserOperationEvent",inputs:[{type:"bytes32",name:"userOpHash",indexed:!0},{type:"address",name:"sender",indexed:!0},{type:"address",name:"paymaster",indexed:!0},{type:"uint256",name:"nonce",indexed:!1},{type:"bool",name:"success",indexed:!1},{type:"uint256",name:"actualGasCost",indexed:!1},{type:"uint256",name:"actualGasUsed",indexed:!1}]};function ek(e){let t,n,a,{abi:r,target:s,data:i,value:c}=e;try{let e=(0,eo.p)({abi:r,data:i});if(t=e.functionName,n=e.args,"callFrom"===t){let[e,,s]=n,i=(0,eo.p)({abi:r,data:s});t=i.functionName,n=i.args,a=e}}catch(e){t=i.length>10?i.slice(0,10):"unknown"}return{to:s,from:a,functionName:t,args:n,value:c}}function eC(){let{id:e}=(0,u.A)(),{worldAddress:t}=(0,r.useParams)(),n=(0,em.Z)(),{data:a}=(0,l.b)(),s=null==a?void 0:a.abi,{transactions:i,setTransaction:c,updateTransaction:o}=(0,eg.oR)(ew.h),d=(0,eg.oR)(ej.store,e=>e.writes),f=(0,C.useCallback)(e=>{var n,a;let{hash:r,writeId:i,timestamp:o,receipt:l,transaction:d,userOperation:u}=e;if(!s)return;let{functionName:f,args:p}=(0,eo.p)({abi:(0,el.V)(["function execute(address target, uint256 value, bytes calldata data)","function executeBatch((address target,uint256 value,bytes data)[])"]),data:u.callData}),m=(function(e){let{abi:t,functionName:n,decodedArgs:a}=e;if("execute"===n){let e=a[0],n=a[1];return[ek({abi:t,target:e,data:a[2],value:n})]}return"executeBatch"===n?a[0].map(e=>{let{target:n,data:a,value:r}=e;return ek({abi:t,target:n,data:a,value:r})}):[]})({abi:s,functionName:f,decodedArgs:p}).filter(e=>{let{to:n}=e;return n&&(0,ed.K)(n)===(0,ed.K)(t)});if(0===m.length)return;let h=(0,eu.h)({abi:[...s,eN],logs:l.logs}),x=h.find(e=>{let{eventName:t}=e;return"UserOperationEvent"===t});c({hash:r,writeId:null!=i?i:r,from:null!==(a=null===(n=m[0])||void 0===n?void 0:n.from)&&void 0!==a?a:d.from,timestamp:o,transaction:d,calls:m,receipt:l,logs:h,value:d.value,status:(null==x?void 0:x.args.success)?"success":"reverted"})},[s,c,t]),p=(0,C.useCallback)(async e=>{let{writeId:t,timestamp:a,transaction:r}=e;if(!s)return;let i=r.hash,c=await (0,ex.e)(n,{hash:r.hash});for(let e of(0,eo.p)({abi:ef.i,data:r.input}).args[0])f({hash:i,writeId:t,timestamp:a,receipt:c,transaction:r,userOperation:e})},[s,f,n]),m=(0,C.useCallback)(async e=>{let a,r,i,l,{writeId:d,hash:u,timestamp:f,transaction:p}=e;if(!s||!p.to)return;try{let e=(0,eo.p)({abi:s,data:p.input});a=e.functionName,r=e.args}catch(e){i=e,a=p.input.length>10?p.input.slice(0,10):"unknown"}c({hash:u,writeId:null!=d?d:u,from:p.from,timestamp:f,transaction:p,status:"pending",calls:[{to:p.to,functionName:a,args:r}],value:p.value});try{l=await (0,ex.e)(n,{hash:u})}catch(e){console.error("Failed to fetch transaction receipt. Transaction hash: ".concat(u))}if(l&&"reverted"===l.status&&a)try{await (0,eb.a)(n,{account:p.from,address:t,abi:s,value:p.value,blockNumber:l.blockNumber,functionName:a,args:r})}catch(e){i=e}let m=l?l.status:"unknown",h=(0,eu.h)({abi:s,logs:(null==l?void 0:l.logs)||[]});o(u,{receipt:l,logs:h,status:m,error:i})},[s,n,t,c,o]),h=(0,C.useCallback)(async e=>{let{hash:a,writeId:r,timestamp:i}=e;if(!s)return;let c=await (0,ey.f)(n,{hash:a});c.to&&(0,ed.K)(c.to)===(0,ed.K)(ep.V)?p({writeId:r,timestamp:i,transaction:c}):c.to&&(0,ed.K)(c.to)===(0,ed.K)(t)&&m({hash:a,writeId:r,timestamp:i,transaction:c})},[s,n,t,p,m]);return(0,C.useEffect)(()=>{for(let{hash:e,writeId:t,time:n}of Object.values(d))e&&!i.find(t=>t.hash===e)&&h({hash:e,writeId:t,timestamp:BigInt(n)/1000n})},[h,d,i,t]),(0,eh.C)({chainId:e,async onBlock(t){var a;for(let r of null!==(a=t.transactions)&&void 0!==a?a:(await (0,ev.Q)(n,{chainId:e,blockHash:t.hash})).transactions)i.find(e=>e.hash===r)||h({hash:r,timestamp:t.timestamp})}}),null}function eO(e){let{params:{chainName:t},children:n}=e;return(0,s.oK)(t)?(0,a.jsxs)(ec,{children:[(0,a.jsxs)("div",{className:"flex h-screen flex-col",children:[(0,a.jsx)(Y,{}),n]}),(0,a.jsx)(eC,{})]}):(0,r.notFound)()}},51049:function(e,t,n){"use strict";n.d(t,{h:function(){return a}});let a=(0,n(82178).M)()(e=>({transactions:[],setTransaction:t=>e(e=>({transactions:[...e.transactions,t]})),updateTransaction:(t,n)=>e(e=>({transactions:e.transactions.map(e=>e.hash===t?{...e,...n}:e)}))}))},24869:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});var a=n(34219),r=n(7867);function s(){let{chainName:e}=(0,a.useParams)();return(0,r.Yx)(e),r.df[e]}},31491:function(e,t,n){"use strict";n.d(t,{g:function(){return s}});var a=n(34219),r=n(14517);function s(){let{chainName:e,worldAddress:t}=(0,a.useParams)();return n=>"".concat((0,r.m)(e,t),"/").concat(n)}},52045:function(e,t,n){"use strict";n.d(t,{b:function(){return i}});var a=n(34219),r=n(59485),s=n(7867);function i(){let{chainName:e,worldAddress:t}=(0,a.useParams)();(0,s.Yx)(e);let{id:n}=s.df[e];return(0,r.a)({queryKey:["worldAbi",e,t],queryFn:async()=>{let e=await fetch("/api/world-abi?".concat(new URLSearchParams({chainId:n.toString(),worldAddress:t})));return await e.json()},select:e=>({abi:e.abi||[],isWorldDeployed:e.isWorldDeployed}),refetchInterval:5e3})}},14517:function(e,t,n){"use strict";function a(e,t){return"/".concat(e,"/worlds/").concat(t)}n.d(t,{m:function(){return a}})},7867:function(e,t,n){"use strict";n.d(t,{is:function(){return m},M0:function(){return f},oK:function(){return h},df:function(){return p},wG:function(){return x},Yx:function(){return b}});var a=n(40975),r=n(48010),s=n(30246),i=n(90337),c=n(39994);({...r.t});var o={...s.g,iconUrls:["https://redstone.xyz/chain-icons/redstone.png"],indexerUrl:"https://indexer.mud.redstonechain.com",fees:{estimateFeesPerGas:async()=>({maxFeePerGas:100000n,maxPriorityFeePerGas:0n})}},l={...i.T,iconUrls:["https://redstone.xyz/chain-icons/garnet.png"],indexerUrl:"https://indexer.mud.garnetchain.com",fees:{estimateFeesPerGas:async()=>({maxFeePerGas:100000n,maxPriorityFeePerGas:0n})}},d={http:["https://rpc.rhodolitechain.com"],webSocket:["wss://rpc.rhodolitechain.com"]},u={...c.i,name:"Rhodolite Devnet",testnet:!0,id:17420,sourceId:17001,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:d,bundler:d,quarryPassIssuer:d,wiresaw:d},contracts:{...c.i.contracts,quarryPaymaster:{address:"0x61f22c3827d90c390e0e2aaf220971524ac0a68d",blockCreated:11262}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.rhodolitechain.com"},worldsExplorer:{name:"MUD Worlds Explorer",url:"https://explorer.mud.dev/rhodolite/worlds"}},iconUrls:["https://redstone.xyz/chain-icons/rhodolite.png"],indexerUrl:"https://indexer.mud.rhodolitechain.com",mudIdUrl:"https://id.mud.dev",fees:{estimateFeesPerGas:async()=>({maxFeePerGas:100000n,maxPriorityFeePerGas:0n})}};let f=["world","store","metadata","puppet","erc20-puppet","erc721-puppet"],p={anvil:a.O,rhodolite:u,garnet:l,redstone:o},m=Object.fromEntries(Object.entries(p).map(e=>{let[t,n]=e;return[n.id,t]}));function h(e){return"string"==typeof e&&e in p}function x(e){if(!("number"==typeof e&&e in m))throw Error("Invalid chain ID. Supported chains are: ".concat(Object.keys(m).join(", "),"."))}function b(e){if(!h(e))throw Error("Invalid chain name. Supported chains are: ".concat(Object.keys(p).join(", "),"."))}},97617:function(e,t,n){"use strict";n.d(t,{z:function(){return l}});var a=n(25418),r=n(4460),s=n(46760),i=n(85767),c=n(26559);let o=(0,r.j)((0,c.cn)("inline-flex items-center justify-center rounded-md","whitespace-nowrap text-sm font-medium","ring-offset-background transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50"),{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),l=s.forwardRef((e,t)=>{let{className:n,variant:r,size:s,type:l="button",asChild:d=!1,...u}=e,f=d?i.g7:"button";return(0,a.jsx)(f,{className:(0,c.cn)(o({variant:r,size:s,className:n})),ref:t,type:l,...u})});l.displayName="Button"},15579:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var a=n(25418),r=n(46760),s=n(32525),i=n(26559);let c=r.forwardRef((e,t)=>{let{className:n,orientation:r="horizontal",decorative:c=!0,...o}=e;return(0,a.jsx)(s.f,{ref:t,decorative:c,orientation:r,className:(0,i.cn)("shrink-0 bg-border","horizontal"===r?"h-[1px] w-full":"h-full w-[1px]",n),...o})});c.displayName=s.f.displayName},71874:function(e,t,n){"use strict";n.d(t,{O:function(){return s}});var a=n(25418),r=n(26559);function s(e){let{className:t,...n}=e;return(0,a.jsx)("div",{className:(0,r.cn)("animate-pulse rounded-md bg-muted",t),...n})}},39482:function(e,t,n){"use strict";n.d(t,{a:function(){return r}});var a=n(25418);function r(e){let{hex:t}=e;return t.length<=10?(0,a.jsx)("span",{children:t}):(0,a.jsxs)("span",{children:[(0,a.jsx)("span",{className:"after:select-none after:content-['…']",children:t.slice(0,6)}),(0,a.jsx)("span",{className:"tracking-[-1ch] text-transparent",children:t.slice(6,-4)}),t.slice(-4)]})}},18141:function(e,t,n){"use strict";n.d(t,{M:function(){return a}});let a="explorer/observer"},21598:function(e,t,n){"use strict";n.d(t,{f:function(){return r}});var a=n(64303);let r=n.n(a)()("mud:explorer").extend("observer")},87182:function(e,t,n){"use strict";n.d(t,{store:function(){return c}});var a=n(82178),r=n(26559),s=n(18141),i=n(21598);let c=(0,a.M)(()=>({writes:{}}));(0,i.f)("listening for relayed messages",s.M);let o=[];new BroadcastChannel(s.M).addEventListener("message",e=>{"ping"!==e.data.type&&o.push(e)}),setInterval(function(){0!==o.length&&c.setState(e=>{let t=e;for(let{data:e}of o){if("ping"===e.type)continue;let n="write"===e.type?{...e,events:[]}:t.writes[e.writeId];if(!n)continue;let a=n.hash;"waitForTransactionReceipt"===e.type?a=e.hash:"waitForUserOperationReceipt:result"===e.type&&(0,r.r8)(e)&&(a=e.value.receipt.transactionHash),t={...t,writes:{...t.writes,[e.writeId]:{...n,type:e.type,hash:a,userOpHash:"waitForUserOperationReceipt"===e.type?e.userOpHash:n.userOpHash,events:[...n.events,e]}}}}return o.length=0,t})},100)},26559:function(e,t,n){"use strict";n.d(t,{az:function(){return o},cn:function(){return i},fu:function(){return c},r8:function(){return l}});var a=n(73662),r=n(22830),s=n(95359);function i(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s.m)((0,r.W)(t))}function c(e){return e.replace(/[A-Z]/g,e=>"_".concat(e.toLowerCase())).replace(/^_/,"")}function o(e){let t=(0,a.d)(e),n=Math.floor(parseFloat(t)).toString().length;return parseFloat(t).toLocaleString("en-US",{maximumFractionDigits:Math.max(0,6-n)})}function l(e){return"fulfilled"===e.status}}},function(e){e.O(0,[7801,1734,8866,3823,8444,3442,4303,3787,8578,4296,833,5056,749,5168,2710,8781,1744],function(){return e(e.s=47629)}),_N_E=e.O()}]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@latticexyz/explorer",
|
|
3
|
-
"version": "2.2.15-entrykit-
|
|
3
|
+
"version": "2.2.15-entrykit-c9413176891b246d2ca7a7e061a6414f34770349",
|
|
4
4
|
"description": "World Explorer is a tool for visually exploring and manipulating the state of worlds",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -57,15 +57,15 @@
|
|
|
57
57
|
"yargs": "^17.7.1",
|
|
58
58
|
"zod": "3.23.8",
|
|
59
59
|
"zustand": "^4.3.7",
|
|
60
|
-
"@latticexyz/block-logs-stream": "2.2.15-entrykit-
|
|
61
|
-
"@latticexyz/common": "2.2.15-entrykit-
|
|
62
|
-
"@latticexyz/config": "2.2.15-entrykit-
|
|
63
|
-
"@latticexyz/protocol-parser": "2.2.15-entrykit-
|
|
64
|
-
"@latticexyz/schema-type": "2.2.15-entrykit-
|
|
65
|
-
"@latticexyz/store": "2.2.15-entrykit-
|
|
66
|
-
"@latticexyz/store-indexer": "2.2.15-entrykit-
|
|
67
|
-
"@latticexyz/store-sync": "2.2.15-entrykit-
|
|
68
|
-
"@latticexyz/world": "2.2.15-entrykit-
|
|
60
|
+
"@latticexyz/block-logs-stream": "2.2.15-entrykit-c9413176891b246d2ca7a7e061a6414f34770349",
|
|
61
|
+
"@latticexyz/common": "2.2.15-entrykit-c9413176891b246d2ca7a7e061a6414f34770349",
|
|
62
|
+
"@latticexyz/config": "2.2.15-entrykit-c9413176891b246d2ca7a7e061a6414f34770349",
|
|
63
|
+
"@latticexyz/protocol-parser": "2.2.15-entrykit-c9413176891b246d2ca7a7e061a6414f34770349",
|
|
64
|
+
"@latticexyz/schema-type": "2.2.15-entrykit-c9413176891b246d2ca7a7e061a6414f34770349",
|
|
65
|
+
"@latticexyz/store": "2.2.15-entrykit-c9413176891b246d2ca7a7e061a6414f34770349",
|
|
66
|
+
"@latticexyz/store-indexer": "2.2.15-entrykit-c9413176891b246d2ca7a7e061a6414f34770349",
|
|
67
|
+
"@latticexyz/store-sync": "2.2.15-entrykit-c9413176891b246d2ca7a7e061a6414f34770349",
|
|
68
|
+
"@latticexyz/world": "2.2.15-entrykit-c9413176891b246d2ca7a7e061a6414f34770349"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=555,exports.ids=[555],exports.modules={80555:(t,e,r)=>{r.d(e,{secp256k1:()=>tw});var n={};r.r(n),r.d(n,{Fy:()=>$,uw:()=>g,gk:()=>c,Dd:()=>N,dQ:()=>H,ci:()=>y,bytesToNumberBE:()=>v,ty:()=>x,eV:()=>O,n$:()=>Z,ql:()=>A,hexToBytes:()=>B,Z2:()=>R,_t:()=>h,H9:()=>P,tL:()=>I,S5:()=>S,uz:()=>m,FF:()=>F});var i=r(11120),o=r(20080),l=r(31916);class s extends l.kb{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,(0,o.vp)(t);let r=(0,l.O0)(e);if(this.iHash=t.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let n=this.blockLen,i=new Uint8Array(n);i.set(r.length>n?t.create().update(r).digest():r);for(let t=0;t<i.length;t++)i[t]^=54;this.iHash.update(i),this.oHash=t.create();for(let t=0;t<i.length;t++)i[t]^=106;this.oHash.update(i),i.fill(0)}update(t){return(0,o.Gg)(this),this.iHash.update(t),this}digestInto(t){(0,o.Gg)(this),(0,o.aI)(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){let t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));let{oHash:e,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:l}=this;return t.finished=n,t.destroyed=i,t.blockLen=o,t.outputLen=l,t.oHash=e._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}let f=(t,e,r)=>new s(t,e).update(r).digest();f.create=(t,e)=>new s(t,e);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let a=BigInt(0),u=BigInt(1),d=BigInt(2);function h(t){return t instanceof Uint8Array||null!=t&&"object"==typeof t&&"Uint8Array"===t.constructor.name}function c(t){if(!h(t))throw Error("Uint8Array expected")}function g(t,e){if("boolean"!=typeof e)throw Error(`${t} must be valid boolean, got "${e}".`)}let p=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function y(t){c(t);let e="";for(let r=0;r<t.length;r++)e+=p[t[r]];return e}function m(t){let e=t.toString(16);return 1&e.length?`0${e}`:e}function w(t){if("string"!=typeof t)throw Error("hex string expected, got "+typeof t);return BigInt(""===t?"0":`0x${t}`)}let E={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function b(t){return t>=E._0&&t<=E._9?t-E._0:t>=E._A&&t<=E._F?t-(E._A-10):t>=E._a&&t<=E._f?t-(E._a-10):void 0}function B(t){if("string"!=typeof t)throw Error("hex string expected, got "+typeof t);let e=t.length,r=e/2;if(e%2)throw Error("padded hex string expected, got unpadded hex of length "+e);let n=new Uint8Array(r);for(let e=0,i=0;e<r;e++,i+=2){let r=b(t.charCodeAt(i)),o=b(t.charCodeAt(i+1));if(void 0===r||void 0===o)throw Error('hex string expected, got non-hex character "'+(t[i]+t[i+1])+'" at index '+i);n[e]=16*r+o}return n}function v(t){return w(y(t))}function x(t){return c(t),w(y(Uint8Array.from(t).reverse()))}function I(t,e){return B(t.toString(16).padStart(2*e,"0"))}function S(t,e){return I(t,e).reverse()}function A(t,e,r){let n;if("string"==typeof e)try{n=B(e)}catch(r){throw Error(`${t} must be valid hex string, got "${e}". Cause: ${r}`)}else if(h(e))n=Uint8Array.from(e);else throw Error(`${t} must be hex string or Uint8Array`);let i=n.length;if("number"==typeof r&&i!==r)throw Error(`${t} expected ${r} bytes, got ${i}`);return n}function O(...t){let e=0;for(let r=0;r<t.length;r++){let n=t[r];c(n),e+=n.length}let r=new Uint8Array(e);for(let e=0,n=0;e<t.length;e++){let i=t[e];r.set(i,n),n+=i.length}return r}let q=t=>"bigint"==typeof t&&a<=t;function R(t,e,r){return q(t)&&q(e)&&q(r)&&e<=t&&t<r}function $(t,e,r,n){if(!R(e,r,n))throw Error(`expected valid ${t}: ${r} <= n < ${n}, got ${typeof e} ${e}`)}function N(t){let e;for(e=0;t>a;t>>=u,e+=1);return e}let H=t=>(d<<BigInt(t-1))-u,z=t=>new Uint8Array(t),L=t=>Uint8Array.from(t);function Z(t,e,r){if("number"!=typeof t||t<2)throw Error("hashLen must be a number");if("number"!=typeof e||e<2)throw Error("qByteLen must be a number");if("function"!=typeof r)throw Error("hmacFn must be a function");let n=z(t),i=z(t),o=0,l=()=>{n.fill(1),i.fill(0),o=0},s=(...t)=>r(i,n,...t),f=(t=z())=>{i=s(L([0]),t),n=s(),0!==t.length&&(i=s(L([1]),t),n=s())},a=()=>{if(o++>=1e3)throw Error("drbg: tried 1000 values");let t=0,r=[];for(;t<e;){let e=(n=s()).slice();r.push(e),t+=n.length}return O(...r)};return(t,e)=>{let r;for(l(),f(t);!(r=e(a()));)f();return l(),r}}let _={bigint:t=>"bigint"==typeof t,function:t=>"function"==typeof t,boolean:t=>"boolean"==typeof t,string:t=>"string"==typeof t,stringOrUint8Array:t=>"string"==typeof t||h(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>"function"==typeof t&&Number.isSafeInteger(t.outputLen)};function F(t,e,r={}){let n=(e,r,n)=>{let i=_[r];if("function"!=typeof i)throw Error(`Invalid validator "${r}", expected function`);let o=t[e];if((!n||void 0!==o)&&!i(o,t))throw Error(`Invalid param ${String(e)}=${o} (${typeof o}), expected ${r}`)};for(let[t,r]of Object.entries(e))n(t,r,!1);for(let[t,e]of Object.entries(r))n(t,e,!0);return t}function P(t){let e=new WeakMap;return(r,...n)=>{let i=e.get(r);if(void 0!==i)return i;let o=t(r,...n);return e.set(r,o),o}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let T=BigInt(0),U=BigInt(1),C=BigInt(2),j=BigInt(3),V=BigInt(4),k=BigInt(5),K=BigInt(8);function D(t,e){let r=t%e;return r>=T?r:e+r}function M(t,e,r){let n=t;for(;e-- >T;)n*=n,n%=r;return n}function W(t,e){if(t===T||e<=T)throw Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=D(t,e),n=e,i=T,o=U,l=U,s=T;for(;r!==T;){let t=n/r,e=n%r,f=i-l*t,a=o-s*t;n=r,r=e,i=l,o=s,l=f,s=a}if(n!==U)throw Error("invert: does not exist");return D(i,e)}BigInt(9),BigInt(16);let Y=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function G(t,e){let r=void 0!==e?e:t.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function Q(t,e,r=!1,n={}){if(t<=T)throw Error(`Expected Field ORDER > 0, got ${t}`);let{nBitLength:i,nByteLength:o}=G(t,e);if(o>2048)throw Error("Field lengths over 2048 bytes are not supported");let l=function(t){if(t%V===j){let e=(t+U)/V;return function(t,r){let n=t.pow(r,e);if(!t.eql(t.sqr(n),r))throw Error("Cannot find square root");return n}}if(t%K===k){let e=(t-k)/K;return function(t,r){let n=t.mul(r,C),i=t.pow(n,e),o=t.mul(r,i),l=t.mul(t.mul(o,C),i),s=t.mul(o,t.sub(l,t.ONE));if(!t.eql(t.sqr(s),r))throw Error("Cannot find square root");return s}}return function(t){let e,r,n;let i=(t-U)/C;for(e=t-U,r=0;e%C===T;e/=C,r++);for(n=C;n<t&&function(t,e,r){if(r<=T||e<T)throw Error("Expected power/modulo > 0");if(r===U)return T;let n=U;for(;e>T;)e&U&&(n=n*t%r),t=t*t%r,e>>=U;return n}(n,i,t)!==t-U;n++);if(1===r){let e=(t+U)/V;return function(t,r){let n=t.pow(r,e);if(!t.eql(t.sqr(n),r))throw Error("Cannot find square root");return n}}let o=(e+U)/C;return function(t,l){if(t.pow(l,i)===t.neg(t.ONE))throw Error("Cannot find square root");let s=r,f=t.pow(t.mul(t.ONE,n),e),a=t.pow(l,o),u=t.pow(l,e);for(;!t.eql(u,t.ONE);){if(t.eql(u,t.ZERO))return t.ZERO;let e=1;for(let r=t.sqr(u);e<s&&!t.eql(r,t.ONE);e++)r=t.sqr(r);let r=t.pow(f,U<<BigInt(s-e-1));f=t.sqr(r),a=t.mul(a,r),u=t.mul(u,f),s=e}return a}}(t)}(t),s=Object.freeze({ORDER:t,BITS:i,BYTES:o,MASK:H(i),ZERO:T,ONE:U,create:e=>D(e,t),isValid:e=>{if("bigint"!=typeof e)throw Error(`Invalid field element: expected bigint, got ${typeof e}`);return T<=e&&e<t},is0:t=>t===T,isOdd:t=>(t&U)===U,neg:e=>D(-e,t),eql:(t,e)=>t===e,sqr:e=>D(e*e,t),add:(e,r)=>D(e+r,t),sub:(e,r)=>D(e-r,t),mul:(e,r)=>D(e*r,t),pow:(t,e)=>(function(t,e,r){if(r<T)throw Error("Expected power > 0");if(r===T)return t.ONE;if(r===U)return e;let n=t.ONE,i=e;for(;r>T;)r&U&&(n=t.mul(n,i)),i=t.sqr(i),r>>=U;return n})(s,t,e),div:(e,r)=>D(e*W(r,t),t),sqrN:t=>t*t,addN:(t,e)=>t+e,subN:(t,e)=>t-e,mulN:(t,e)=>t*e,inv:e=>W(e,t),sqrt:n.sqrt||(t=>l(s,t)),invertBatch:t=>(function(t,e){let r=Array(e.length),n=e.reduce((e,n,i)=>t.is0(n)?e:(r[i]=e,t.mul(e,n)),t.ONE),i=t.inv(n);return e.reduceRight((e,n,i)=>t.is0(n)?e:(r[i]=t.mul(e,r[i]),t.mul(e,n)),i),r})(s,t),cmov:(t,e,r)=>r?e:t,toBytes:t=>r?S(t,o):I(t,o),fromBytes:t=>{if(t.length!==o)throw Error(`Fp.fromBytes: expected ${o}, got ${t.length}`);return r?x(t):v(t)}});return Object.freeze(s)}function J(t){if("bigint"!=typeof t)throw Error("field order must be bigint");return Math.ceil(t.toString(2).length/8)}function X(t){let e=J(t);return e+Math.ceil(e/2)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let tt=BigInt(0),te=BigInt(1),tr=new WeakMap,tn=new WeakMap;function ti(t){return F(t.Fp,Y.reduce((t,e)=>(t[e]="function",t),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"})),F(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...G(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function to(t){void 0!==t.lowS&&g("lowS",t.lowS),void 0!==t.prehash&&g("prehash",t.prehash)}let{bytesToNumberBE:tl,hexToBytes:ts}=n,tf={Err:class extends Error{constructor(t=""){super(t)}},_tlv:{encode:(t,e)=>{let{Err:r}=tf;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(1&e.length)throw new r("tlv.encode: unpadded data");let n=e.length/2,i=m(n);if(i.length/2&128)throw new r("tlv.encode: long form length too big");let o=n>127?m(i.length/2|128):"";return`${m(t)}${o}${i}${e}`},decode(t,e){let{Err:r}=tf,n=0;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(e.length<2||e[n++]!==t)throw new r("tlv.decode: wrong tlv");let i=e[n++],o=0;if(128&i){let t=127&i;if(!t)throw new r("tlv.decode(long): indefinite length not supported");if(t>4)throw new r("tlv.decode(long): byte length is too big");let l=e.subarray(n,n+t);if(l.length!==t)throw new r("tlv.decode: length bytes not complete");if(0===l[0])throw new r("tlv.decode(long): zero leftmost byte");for(let t of l)o=o<<8|t;if(n+=t,o<128)throw new r("tlv.decode(long): not minimal encoding")}else o=i;let l=e.subarray(n,n+o);if(l.length!==o)throw new r("tlv.decode: wrong value length");return{v:l,l:e.subarray(n+o)}}},_int:{encode(t){let{Err:e}=tf;if(t<ta)throw new e("integer: negative integers are not allowed");let r=m(t);if(8&Number.parseInt(r[0],16)&&(r="00"+r),1&r.length)throw new e("unexpected assertion");return r},decode(t){let{Err:e}=tf;if(128&t[0])throw new e("Invalid signature integer: negative");if(0===t[0]&&!(128&t[1]))throw new e("Invalid signature integer: unnecessary leading zero");return tl(t)}},toSig(t){let{Err:e,_int:r,_tlv:n}=tf,i="string"==typeof t?ts(t):t;c(i);let{v:o,l:l}=n.decode(48,i);if(l.length)throw new e("Invalid signature: left bytes after parsing");let{v:s,l:f}=n.decode(2,o),{v:a,l:u}=n.decode(2,f);if(u.length)throw new e("Invalid signature: left bytes after parsing");return{r:r.decode(s),s:r.decode(a)}},hexFromSig(t){let{_tlv:e,_int:r}=tf,n=`${e.encode(2,r.encode(t.r))}${e.encode(2,r.encode(t.s))}`;return e.encode(48,n)}},ta=BigInt(0),tu=BigInt(1),td=(BigInt(2),BigInt(3)),th=(BigInt(4),BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f")),tc=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),tg=BigInt(1),tp=BigInt(2),ty=(t,e)=>(t+e/tp)/e,tm=Q(th,void 0,void 0,{sqrt:function(t){let e=BigInt(3),r=BigInt(6),n=BigInt(11),i=BigInt(22),o=BigInt(23),l=BigInt(44),s=BigInt(88),f=t*t*t%th,a=f*f*t%th,u=M(a,e,th)*a%th,d=M(u,e,th)*a%th,h=M(d,tp,th)*f%th,c=M(h,n,th)*h%th,g=M(c,i,th)*c%th,p=M(g,l,th)*g%th,y=M(p,s,th)*p%th,m=M(y,l,th)*g%th,w=M(m,e,th)*a%th,E=M(w,o,th)*c%th,b=M(E,r,th)*f%th,B=M(b,tp,th);if(!tm.eql(tm.sqr(B),t))throw Error("Cannot find square root");return B}}),tw=function(t,e){let r=e=>(function(t){let e=function(t){let e=ti(t);return F(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}(t),{Fp:r,n:n}=e,i=r.BYTES+1,o=2*r.BYTES+1;function l(t){return D(t,n)}let{ProjectivePoint:s,normPrivateKeyToScalar:f,weierstrassEquation:a,isWithinCurveOrder:u}=function(t){let e=function(t){let e=ti(t);F(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:r,Fp:n,a:i}=e;if(r){if(!n.eql(i,n.ZERO))throw Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}(t),{Fp:r}=e,n=Q(e.n,e.nBitLength),i=e.toBytes||((t,e,n)=>{let i=e.toAffine();return O(Uint8Array.from([4]),r.toBytes(i.x),r.toBytes(i.y))}),o=e.fromBytes||(t=>{let e=t.subarray(1);return{x:r.fromBytes(e.subarray(0,r.BYTES)),y:r.fromBytes(e.subarray(r.BYTES,2*r.BYTES))}});function l(t){let{a:n,b:i}=e,o=r.sqr(t),l=r.mul(o,t);return r.add(r.add(l,r.mul(t,n)),i)}if(!r.eql(r.sqr(e.Gy),l(e.Gx)))throw Error("bad generator point: equation left != right");function s(t){let r;let{allowedPrivateKeyLengths:n,nByteLength:i,wrapPrivateKey:o,n:l}=e;if(n&&"bigint"!=typeof t){if(h(t)&&(t=y(t)),"string"!=typeof t||!n.includes(t.length))throw Error("Invalid key");t=t.padStart(2*i,"0")}try{r="bigint"==typeof t?t:v(A("private key",t,i))}catch(e){throw Error(`private key must be ${i} bytes, hex or bigint, not ${typeof t}`)}return o&&(r=D(r,l)),$("private key",r,tu,l),r}function f(t){if(!(t instanceof d))throw Error("ProjectivePoint expected")}let a=P((t,e)=>{let{px:n,py:i,pz:o}=t;if(r.eql(o,r.ONE))return{x:n,y:i};let l=t.is0();null==e&&(e=l?r.ONE:r.inv(o));let s=r.mul(n,e),f=r.mul(i,e),a=r.mul(o,e);if(l)return{x:r.ZERO,y:r.ZERO};if(!r.eql(a,r.ONE))throw Error("invZ was invalid");return{x:s,y:f}}),u=P(t=>{if(t.is0()){if(e.allowInfinityPoint&&!r.is0(t.py))return;throw Error("bad point: ZERO")}let{x:n,y:i}=t.toAffine();if(!r.isValid(n)||!r.isValid(i))throw Error("bad point: x or y not FE");let o=r.sqr(i),s=l(n);if(!r.eql(o,s))throw Error("bad point: equation left != right");if(!t.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});class d{constructor(t,e,n){if(this.px=t,this.py=e,this.pz=n,null==t||!r.isValid(t))throw Error("x required");if(null==e||!r.isValid(e))throw Error("y required");if(null==n||!r.isValid(n))throw Error("z required");Object.freeze(this)}static fromAffine(t){let{x:e,y:n}=t||{};if(!t||!r.isValid(e)||!r.isValid(n))throw Error("invalid affine point");if(t instanceof d)throw Error("projective point not allowed");let i=t=>r.eql(t,r.ZERO);return i(e)&&i(n)?d.ZERO:new d(e,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(t){let e=r.invertBatch(t.map(t=>t.pz));return t.map((t,r)=>t.toAffine(e[r])).map(d.fromAffine)}static fromHex(t){let e=d.fromAffine(o(A("pointHex",t)));return e.assertValidity(),e}static fromPrivateKey(t){return d.BASE.multiply(s(t))}static msm(t,e){return function(t,e,r,n){if(!Array.isArray(r)||!Array.isArray(n)||n.length!==r.length)throw Error("arrays of points and scalars must have equal length");n.forEach((t,r)=>{if(!e.isValid(t))throw Error(`wrong scalar at index ${r}`)}),r.forEach((e,r)=>{if(!(e instanceof t))throw Error(`wrong point at index ${r}`)});let i=N(BigInt(r.length)),o=i>12?i-3:i>4?i-2:i?2:1,l=(1<<o)-1,s=Array(l+1).fill(t.ZERO),f=Math.floor((e.BITS-1)/o)*o,a=t.ZERO;for(let e=f;e>=0;e-=o){s.fill(t.ZERO);for(let t=0;t<n.length;t++){let i=Number(n[t]>>BigInt(e)&BigInt(l));s[i]=s[i].add(r[t])}let i=t.ZERO;for(let e=s.length-1,r=t.ZERO;e>0;e--)r=r.add(s[e]),i=i.add(r);if(a=a.add(i),0!==e)for(let t=0;t<o;t++)a=a.double()}return a}(d,n,t,e)}_setWindowSize(t){p.setWindowSize(this,t)}assertValidity(){u(this)}hasEvenY(){let{y:t}=this.toAffine();if(r.isOdd)return!r.isOdd(t);throw Error("Field doesn't support isOdd")}equals(t){f(t);let{px:e,py:n,pz:i}=this,{px:o,py:l,pz:s}=t,a=r.eql(r.mul(e,s),r.mul(o,i)),u=r.eql(r.mul(n,s),r.mul(l,i));return a&&u}negate(){return new d(this.px,r.neg(this.py),this.pz)}double(){let{a:t,b:n}=e,i=r.mul(n,td),{px:o,py:l,pz:s}=this,f=r.ZERO,a=r.ZERO,u=r.ZERO,h=r.mul(o,o),c=r.mul(l,l),g=r.mul(s,s),p=r.mul(o,l);return p=r.add(p,p),u=r.mul(o,s),u=r.add(u,u),f=r.mul(t,u),a=r.mul(i,g),a=r.add(f,a),f=r.sub(c,a),a=r.add(c,a),a=r.mul(f,a),f=r.mul(p,f),u=r.mul(i,u),g=r.mul(t,g),p=r.sub(h,g),p=r.mul(t,p),p=r.add(p,u),u=r.add(h,h),h=r.add(u,h),h=r.add(h,g),h=r.mul(h,p),a=r.add(a,h),g=r.mul(l,s),g=r.add(g,g),h=r.mul(g,p),f=r.sub(f,h),u=r.mul(g,c),u=r.add(u,u),new d(f,a,u=r.add(u,u))}add(t){f(t);let{px:n,py:i,pz:o}=this,{px:l,py:s,pz:a}=t,u=r.ZERO,h=r.ZERO,c=r.ZERO,g=e.a,p=r.mul(e.b,td),y=r.mul(n,l),m=r.mul(i,s),w=r.mul(o,a),E=r.add(n,i),b=r.add(l,s);E=r.mul(E,b),b=r.add(y,m),E=r.sub(E,b),b=r.add(n,o);let B=r.add(l,a);return b=r.mul(b,B),B=r.add(y,w),b=r.sub(b,B),B=r.add(i,o),u=r.add(s,a),B=r.mul(B,u),u=r.add(m,w),B=r.sub(B,u),c=r.mul(g,b),u=r.mul(p,w),c=r.add(u,c),u=r.sub(m,c),c=r.add(m,c),h=r.mul(u,c),m=r.add(y,y),m=r.add(m,y),w=r.mul(g,w),b=r.mul(p,b),m=r.add(m,w),w=r.sub(y,w),w=r.mul(g,w),b=r.add(b,w),y=r.mul(m,b),h=r.add(h,y),y=r.mul(B,b),u=r.mul(E,u),u=r.sub(u,y),y=r.mul(E,m),c=r.mul(B,c),new d(u,h,c=r.add(c,y))}subtract(t){return this.add(t.negate())}is0(){return this.equals(d.ZERO)}wNAF(t){return p.wNAFCached(this,t,d.normalizeZ)}multiplyUnsafe(t){$("scalar",t,ta,e.n);let n=d.ZERO;if(t===ta)return n;if(t===tu)return this;let{endo:i}=e;if(!i)return p.unsafeLadder(this,t);let{k1neg:o,k1:l,k2neg:s,k2:f}=i.splitScalar(t),a=n,u=n,h=this;for(;l>ta||f>ta;)l&tu&&(a=a.add(h)),f&tu&&(u=u.add(h)),h=h.double(),l>>=tu,f>>=tu;return o&&(a=a.negate()),s&&(u=u.negate()),u=new d(r.mul(u.px,i.beta),u.py,u.pz),a.add(u)}multiply(t){let n,i;let{endo:o,n:l}=e;if($("scalar",t,tu,l),o){let{k1neg:e,k1:l,k2neg:s,k2:f}=o.splitScalar(t),{p:a,f:u}=this.wNAF(l),{p:h,f:c}=this.wNAF(f);a=p.constTimeNegate(e,a),h=p.constTimeNegate(s,h),h=new d(r.mul(h.px,o.beta),h.py,h.pz),n=a.add(h),i=u.add(c)}else{let{p:e,f:r}=this.wNAF(t);n=e,i=r}return d.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(t,e,r){let n=d.BASE,i=(t,e)=>e!==ta&&e!==tu&&t.equals(n)?t.multiply(e):t.multiplyUnsafe(e),o=i(this,e).add(i(t,r));return o.is0()?void 0:o}toAffine(t){return a(this,t)}isTorsionFree(){let{h:t,isTorsionFree:r}=e;if(t===tu)return!0;if(r)return r(d,this);throw Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:t,clearCofactor:r}=e;return t===tu?this:r?r(d,this):this.multiplyUnsafe(e.h)}toRawBytes(t=!0){return g("isCompressed",t),this.assertValidity(),i(d,this,t)}toHex(t=!0){return g("isCompressed",t),y(this.toRawBytes(t))}}d.BASE=new d(e.Gx,e.Gy,r.ONE),d.ZERO=new d(r.ZERO,r.ONE,r.ZERO);let c=e.nBitLength,p=function(t,e){let r=(t,e)=>{let r=e.negate();return t?r:e},n=t=>{if(!Number.isSafeInteger(t)||t<=0||t>e)throw Error(`Wrong window size=${t}, should be [1..${e}]`)},i=t=>(n(t),{windows:Math.ceil(e/t)+1,windowSize:2**(t-1)});return{constTimeNegate:r,unsafeLadder(e,r){let n=t.ZERO,i=e;for(;r>tt;)r&te&&(n=n.add(i)),i=i.double(),r>>=te;return n},precomputeWindow(t,e){let{windows:r,windowSize:n}=i(e),o=[],l=t,s=l;for(let t=0;t<r;t++){s=l,o.push(s);for(let t=1;t<n;t++)s=s.add(l),o.push(s);l=s.double()}return o},wNAF(e,n,o){let{windows:l,windowSize:s}=i(e),f=t.ZERO,a=t.BASE,u=BigInt(2**e-1),d=2**e,h=BigInt(e);for(let t=0;t<l;t++){let e=t*s,i=Number(o&u);o>>=h,i>s&&(i-=d,o+=te);let l=e+Math.abs(i)-1,c=t%2!=0,g=i<0;0===i?a=a.add(r(c,n[e])):f=f.add(r(g,n[l]))}return{p:f,f:a}},wNAFCached(t,e,r){let n=tn.get(t)||1,i=tr.get(t);return i||(i=this.precomputeWindow(t,n),1!==n&&tr.set(t,r(i))),this.wNAF(n,i,e)},setWindowSize(t,e){n(e),tn.set(t,e),tr.delete(t)}}}(d,e.endo?Math.ceil(c/2):c);return{CURVE:e,ProjectivePoint:d,normPrivateKeyToScalar:s,weierstrassEquation:l,isWithinCurveOrder:function(t){return R(t,tu,e.n)}}}({...e,toBytes(t,e,n){let i=e.toAffine(),o=r.toBytes(i.x),l=O;return(g("isCompressed",n),n)?l(Uint8Array.from([e.hasEvenY()?2:3]),o):l(Uint8Array.from([4]),o,r.toBytes(i.y))},fromBytes(t){let e=t.length,n=t[0],l=t.subarray(1);if(e===i&&(2===n||3===n)){let t;let e=v(l);if(!R(e,tu,r.ORDER))throw Error("Point is not on curve");let i=a(e);try{t=r.sqrt(i)}catch(t){throw Error("Point is not on curve"+(t instanceof Error?": "+t.message:""))}return(1&n)==1!=((t&tu)===tu)&&(t=r.neg(t)),{x:e,y:t}}if(e===o&&4===n)return{x:r.fromBytes(l.subarray(0,r.BYTES)),y:r.fromBytes(l.subarray(r.BYTES,2*r.BYTES))};throw Error(`Point of length ${e} was invalid. Expected ${i} compressed bytes or ${o} uncompressed bytes`)}}),d=t=>y(I(t,e.nByteLength)),c=(t,e,r)=>v(t.slice(e,r));class p{constructor(t,e,r){this.r=t,this.s=e,this.recovery=r,this.assertValidity()}static fromCompact(t){let r=e.nByteLength;return new p(c(t=A("compactSignature",t,2*r),0,r),c(t,r,2*r))}static fromDER(t){let{r:e,s:r}=tf.toSig(A("DER",t));return new p(e,r)}assertValidity(){$("r",this.r,tu,n),$("s",this.s,tu,n)}addRecoveryBit(t){return new p(this.r,this.s,t)}recoverPublicKey(t){let{r:i,s:o,recovery:f}=this,a=E(A("msgHash",t));if(null==f||![0,1,2,3].includes(f))throw Error("recovery id invalid");let u=2===f||3===f?i+e.n:i;if(u>=r.ORDER)throw Error("recovery id 2 or 3 invalid");let h=(1&f)==0?"02":"03",c=s.fromHex(h+d(u)),g=W(u,n),p=l(-a*g),y=l(o*g),m=s.BASE.multiplyAndAddUnsafe(c,p,y);if(!m)throw Error("point at infinify");return m.assertValidity(),m}hasHighS(){return this.s>n>>tu}normalizeS(){return this.hasHighS()?new p(this.r,l(-this.s),this.recovery):this}toDERRawBytes(){return B(this.toDERHex())}toDERHex(){return tf.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return B(this.toCompactHex())}toCompactHex(){return d(this.r)+d(this.s)}}function m(t){let e=h(t),r="string"==typeof t,n=(e||r)&&t.length;return e?n===i||n===o:r?n===2*i||n===2*o:t instanceof s}let w=e.bits2int||function(t){let r=v(t),n=8*t.length-e.nBitLength;return n>0?r>>BigInt(n):r},E=e.bits2int_modN||function(t){return l(w(t))},b=H(e.nBitLength);function q(t){return $(`num < 2^${e.nBitLength}`,t,ta,b),I(t,e.nByteLength)}let z={lowS:e.lowS,prehash:!1},L={lowS:e.lowS,prehash:!1};return s.BASE._setWindowSize(8),{CURVE:e,getPublicKey:function(t,e=!0){return s.fromPrivateKey(t).toRawBytes(e)},getSharedSecret:function(t,e,r=!0){if(m(t))throw Error("first arg must be private key");if(!m(e))throw Error("second arg must be public key");return s.fromHex(e).multiply(f(t)).toRawBytes(r)},sign:function(t,i,o=z){let{seed:a,k2sig:d}=function(t,i,o=z){if(["recovered","canonical"].some(t=>t in o))throw Error("sign() legacy options not supported");let{hash:a,randomBytes:d}=e,{lowS:h,prehash:c,extraEntropy:g}=o;null==h&&(h=!0),t=A("msgHash",t),to(o),c&&(t=A("prehashed msgHash",a(t)));let y=E(t),m=f(i),b=[q(m),q(y)];if(null!=g&&!1!==g){let t=!0===g?d(r.BYTES):g;b.push(A("extraEntropy",t))}return{seed:O(...b),k2sig:function(t){let e=w(t);if(!u(e))return;let r=W(e,n),i=s.BASE.multiply(e).toAffine(),o=l(i.x);if(o===ta)return;let f=l(r*l(y+o*m));if(f===ta)return;let a=(i.x===o?0:2)|Number(i.y&tu),d=f;if(h&&f>n>>tu)d=f>n>>tu?l(-f):f,a^=1;return new p(o,d,a)}}}(t,i,o);return Z(e.hash.outputLen,e.nByteLength,e.hmac)(a,d)},verify:function(t,r,i,o=L){let f,a;if(r=A("msgHash",r),i=A("publicKey",i),"strict"in o)throw Error("options.strict was renamed to lowS");to(o);let{lowS:u,prehash:d}=o;try{if("string"==typeof t||h(t))try{a=p.fromDER(t)}catch(e){if(!(e instanceof tf.Err))throw e;a=p.fromCompact(t)}else if("object"==typeof t&&"bigint"==typeof t.r&&"bigint"==typeof t.s){let{r:e,s:r}=t;a=new p(e,r)}else throw Error("PARSE");f=s.fromHex(i)}catch(t){if("PARSE"===t.message)throw Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(u&&a.hasHighS())return!1;d&&(r=e.hash(r));let{r:c,s:g}=a,y=E(r),m=W(g,n),w=l(y*m),b=l(c*m),B=s.BASE.multiplyAndAddUnsafe(f,w,b)?.toAffine();return!!B&&l(B.x)===c},ProjectivePoint:s,Signature:p,utils:{isValidPrivateKey(t){try{return f(t),!0}catch(t){return!1}},normPrivateKeyToScalar:f,randomPrivateKey:()=>{let t=X(e.n);return function(t,e,r=!1){let n=t.length,i=J(e),o=X(e);if(n<16||n<o||n>1024)throw Error(`expected ${o}-1024 bytes of input, got ${n}`);let l=D(r?v(t):x(t),e-U)+U;return r?S(l,i):I(l,i)}(e.randomBytes(t),e.n)},precompute:(t=8,e=s.BASE)=>(e._setWindowSize(t),e.multiply(BigInt(3)),e)}}})({...t,hash:e,hmac:(t,...r)=>f(e,t,(0,l.eV)(...r)),randomBytes:l.O6});return Object.freeze({...r(e),create:r})}({a:BigInt(0),b:BigInt(7),Fp:tm,n:tc,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{let e=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-tg*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),n=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=BigInt("0x100000000000000000000000000000000"),o=ty(e*t,tc),l=ty(-r*t,tc),s=D(t-o*e-l*n,tc),f=D(-o*r-l*e,tc),a=s>i,u=f>i;if(a&&(s=tc-s),u&&(f=tc-f),s>i||f>i)throw Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:a,k1:s,k2neg:u,k2:f}}}},i.JQ);BigInt(0),tw.ProjectivePoint}};
|