UNPKG

@flaunch/sdk

Version:

Flaunch SDK to easily interact with the Flaunch protocol

1 lines 340 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@delvtech/drift"),require("viem"),require("axios"),require("@uniswap/v3-sdk"),require("@delvtech/drift-viem")):"function"==typeof define&&define.amd?define(["exports","@delvtech/drift","viem","axios","@uniswap/v3-sdk","@delvtech/drift-viem"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@flaunch_sdk"]={},e.drift,e.viem,e.axios,e.v3Sdk,e.driftViem)}(this,(function(e,t,n,a,i,r){"use strict";function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=s(a);function o(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}const y="2.29.2";let u=({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,l=`viem@${y}`;class d extends Error{constructor(e,t={}){const n=t.cause instanceof d?t.cause.details:t.cause?.message?t.cause.message:t.details,a=t.cause instanceof d&&t.cause.docsPath||t.docsPath,i=u?.({...t,docsPath:a});super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...i?[`Docs: ${i}`]:[],...n?[`Details: ${n}`]:[],...l?[`Version: ${l}`]:[]].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=n,this.docsPath=a,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=e,this.version=y}walk(e){return c(this,e)}}function c(e,t){return t?.(e)?e:e&&"object"==typeof e&&"cause"in e&&void 0!==e.cause?c(e.cause,t):t?null:e}class m extends d{constructor({max:e,min:t,signed:n,size:a,value:i}){super(`Number "${i}" is not in safe ${a?`${8*a}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`,{name:"IntegerOutOfRangeError"})}}class T extends d{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}function b(e,{strict:t=!0}={}){return!!e&&("string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")))}function f(e){return b(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}function h(e,{dir:t="left"}={}){let n="string"==typeof e?e.replace("0x",""):e,a=0;for(let e=0;e<n.length-1&&"0"===n["left"===t?e:n.length-e-1].toString();e++)a++;return n="left"===t?n.slice(a):n.slice(0,n.length-a),"string"==typeof e?(1===n.length&&"right"===t&&(n=`${n}0`),`0x${n.length%2==1?`0${n}`:n}`):n}class w extends d{constructor({offset:e,position:t,size:n}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${n}).`,{name:"SliceOffsetOutOfBoundsError"})}}class g extends d{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}function I(e,{dir:t,size:n=32}={}){return"string"==typeof e?function(e,{dir:t,size:n=32}={}){if(null===n)return e;const a=e.replace("0x","");if(a.length>2*n)throw new g({size:Math.ceil(a.length/2),targetSize:n,type:"hex"});return`0x${a["right"===t?"padEnd":"padStart"](2*n,"0")}`}(e,{dir:t,size:n}):function(e,{dir:t,size:n=32}={}){if(null===n)return e;if(e.length>n)throw new g({size:e.length,targetSize:n,type:"bytes"});const a=new Uint8Array(n);for(let i=0;i<n;i++){const r="right"===t;a[r?i:n-i-1]=e[r?i:e.length-i-1]}return a}(e,{dir:t,size:n})}const v=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function x(e,t={}){return"number"==typeof e||"bigint"==typeof e?P(e,t):"string"==typeof e?function(e,t={}){const n=k.encode(e);return M(n,t)}(e,t):"boolean"==typeof e?function(e,t={}){const n=`0x${Number(e)}`;if("number"==typeof t.size)return E(n,{size:t.size}),I(n,{size:t.size});return n}(e,t):M(e,t)}function M(e,t={}){let n="";for(let t=0;t<e.length;t++)n+=v[e[t]];const a=`0x${n}`;return"number"==typeof t.size?(E(a,{size:t.size}),I(a,{dir:"right",size:t.size})):a}function P(e,t={}){const{signed:n,size:a}=t,i=BigInt(e);let r;a?r=n?(1n<<8n*BigInt(a)-1n)-1n:2n**(8n*BigInt(a))-1n:"number"==typeof e&&(r=BigInt(Number.MAX_SAFE_INTEGER));const s="bigint"==typeof r&&n?-r-1n:0;if(r&&i>r||i<s){const t="bigint"==typeof e?"n":"";throw new m({max:r?`${r}${t}`:void 0,min:`${s}${t}`,signed:n,size:a,value:`${e}${t}`})}const p=`0x${(n&&i<0?(1n<<BigInt(8*a))+BigInt(i):i).toString(16)}`;return a?I(p,{size:a}):p}const k=new TextEncoder;const _=new TextEncoder;function F(e,t={}){return"number"==typeof e||"bigint"==typeof e?function(e,t){const n=P(e,t);return S(n)}(e,t):"boolean"==typeof e?function(e,t={}){const n=new Uint8Array(1);if(n[0]=Number(e),"number"==typeof t.size)return E(n,{size:t.size}),I(n,{size:t.size});return n}(e,t):b(e)?S(e,t):D(e,t)}const A={zero:48,nine:57,A:65,F:70,a:97,f:102};function C(e){return e>=A.zero&&e<=A.nine?e-A.zero:e>=A.A&&e<=A.F?e-(A.A-10):e>=A.a&&e<=A.f?e-(A.a-10):void 0}function S(e,t={}){let n=e;t.size&&(E(n,{size:t.size}),n=I(n,{dir:"right",size:t.size}));let a=n.slice(2);a.length%2&&(a=`0${a}`);const i=a.length/2,r=new Uint8Array(i);for(let e=0,t=0;e<i;e++){const n=C(a.charCodeAt(t++)),i=C(a.charCodeAt(t++));if(void 0===n||void 0===i)throw new d(`Invalid byte sequence ("${a[t-2]}${a[t-1]}" in "${a}").`);r[e]=16*n+i}return r}function D(e,t={}){const n=_.encode(e);return"number"==typeof t.size?(E(n,{size:t.size}),I(n,{dir:"right",size:t.size})):n}function E(e,{size:t}){if(f(e)>t)throw new T({givenSize:f(e),maxSize:t})}function O(e,t={}){const{signed:n}=t;t.size&&E(e,{size:t.size});const a=BigInt(e);if(!n)return a;const i=(e.length-2)/2;return a<=(1n<<8n*BigInt(i)-1n)-1n?a:a-BigInt(`0x${"f".padStart(2*i,"f")}`)-1n}function B(e,t={}){return Number(O(e,t))}function L(e,t){return({exclude:n,format:a})=>({exclude:n,format:e=>{const i=t(e);if(n)for(const e of n)delete i[e];return{...i,...a(e)}},type:e})}const U={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function R(e){const t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?B(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?B(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?U[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=>({address:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:e.r,s:e.s,yParity:Number(e.yParity)})))),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}const H=L("transaction",R);function N(e){const t=(e.transactions??[]).map((e=>"string"==typeof e?e:R(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}}const z=L("block",N);const q={"0x0":"reverted","0x1":"success"};function V(e){const 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=>function(e,{args:t,eventName:n}={}){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,...n?{args:t,eventName:n}:{}}}(e))):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?B(e.transactionIndex):null,status:e.status?q[e.status]:null,type:e.type?U[e.type]||e.type:null};return e.blobGasPrice&&(t.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(t.blobGasUsed=BigInt(e.blobGasUsed)),t}const W=L("transactionReceipt",V);const G=2n**256n-1n;function K(e){return`0x${e.reduce(((e,t)=>e+t.replace("0x","")),"")}`}class $ extends d{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class Z extends d{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`,{name:"PositionOutOfBoundsError"})}}class X extends d{constructor({count:e,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`,{name:"RecursiveReadLimitExceededError"})}}const Q={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 X({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new Z({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new $({offset:e});const 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 $({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const 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();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function j(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(Q);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function Y(e,t="hex"){const n=J(e),a=j(new Uint8Array(n.length));return n.encode(a),"hex"===t?M(a.bytes):a.bytes}function J(e){return Array.isArray(e)?function(e){const t=e.reduce(((e,t)=>e+t.length),0),n=ee(t);return{length:t<=55?1+t:1+n+t,encode(a){t<=55?a.pushByte(192+t):(a.pushByte(247+n),1===n?a.pushUint8(t):2===n?a.pushUint16(t):3===n?a.pushUint24(t):a.pushUint32(t));for(const{encode:t}of e)t(a)}}}(e.map((e=>J(e)))):function(e){const t="string"==typeof e?S(e):e,n=ee(t.length),a=1===t.length&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length;return{length:a,encode(e){1===t.length&&t[0]<128?e.pushBytes(t):t.length<=55?(e.pushByte(128+t.length),e.pushBytes(t)):(e.pushByte(183+n),1===n?e.pushUint8(t.length):2===n?e.pushUint16(t.length):3===n?e.pushUint24(t.length):e.pushUint32(t.length),e.pushBytes(t))}}}(e)}function ee(e){if(e<256)return 1;if(e<65536)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new d("Length is too large.")}const te={ether:-9,wei:9};function ne(e,t="wei"){return function(e,t){let n=e.toString();const a=n.startsWith("-");a&&(n=n.slice(1)),n=n.padStart(t,"0");let[i,r]=[n.slice(0,n.length-t),n.slice(n.length-t)];return r=r.replace(/(0+)$/,""),`${a?"-":""}${i||"0"}${r?`.${r}`:""}`}(e,te[t])}function ae(e){const t=Object.entries(e).map((([e,t])=>void 0===t||!1===t?null:[e,t])).filter(Boolean),n=t.reduce(((e,[t])=>Math.max(e,t.length)),0);return t.map((([e,t])=>` ${`${e}:`.padEnd(n+1)} ${t}`)).join("\n")}class ie extends d{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class re extends d{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",ae(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 se extends d{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 pe(e){const{kzg:t}=e,n=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),a="string"==typeof e.blobs[0]?e.blobs.map((e=>S(e))):e.blobs,i=[];for(const e of a)i.push(Uint8Array.from(t.blobToKzgCommitment(e)));return"bytes"===n?i:i.map((e=>M(e)))}function oe(e){const{kzg:t}=e,n=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),a="string"==typeof e.blobs[0]?e.blobs.map((e=>S(e))):e.blobs,i="string"==typeof e.commitments[0]?e.commitments.map((e=>S(e))):e.commitments,r=[];for(let e=0;e<a.length;e++){const n=a[e],s=i[e];r.push(Uint8Array.from(t.computeBlobKzgProof(n,s)))}return"bytes"===n?r:r.map((e=>M(e)))}function ye(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function ue(e,...t){if(!((n=e)instanceof Uint8Array||ArrayBuffer.isView(n)&&"Uint8Array"===n.constructor.name))throw new Error("Uint8Array expected");var n;if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function le(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function de(e,t){ue(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function ce(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function me(e,t){return e<<32-t|e>>>t}const Te=(()=>68===new Uint8Array(new Uint32Array([287454020]).buffer)[0])();function be(e){for(let n=0;n<e.length;n++)e[n]=(t=e[n])<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255;var t}function fe(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),ue(e),e}"function"==typeof Uint8Array.from([]).toHex&&Uint8Array.fromHex;class he{clone(){return this._cloneInto()}}function we(e){const t=t=>e().update(fe(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function ge(e,t,n){return e&t^e&n^t&n}class Ie extends he{constructor(e,t,n,a){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=a,this.buffer=new Uint8Array(e),this.view=ce(this.buffer)}update(e){le(this);const{view:t,buffer:n,blockLen:a}=this,i=(e=fe(e)).length;for(let r=0;r<i;){const s=Math.min(a-this.pos,i-r);if(s!==a)n.set(e.subarray(r,r+s),this.pos),this.pos+=s,r+=s,this.pos===a&&(this.process(t,0),this.pos=0);else{const t=ce(e);for(;a<=i-r;r+=a)this.process(t,r)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){le(this),de(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:a,isLE:i}=this;let{pos:r}=this;t[r++]=128,this.buffer.subarray(r).fill(0),this.padOffset>a-r&&(this.process(n,0),r=0);for(let e=r;e<a;e++)t[e]=0;!function(e,t,n,a){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,a);const i=BigInt(32),r=BigInt(4294967295),s=Number(n>>i&r),p=Number(n&r),o=a?4:0,y=a?0:4;e.setUint32(t+o,s,a),e.setUint32(t+y,p,a)}(n,a-8,BigInt(8*this.length),i),this.process(n,0);const s=ce(e),p=this.outputLen;if(p%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const o=p/4,y=this.get();if(o>y.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<o;e++)s.setUint32(4*e,y[e],i)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:a,finished:i,destroyed:r,pos:s}=this;return e.length=a,e.pos=s,e.finished=i,e.destroyed=r,a%t&&e.buffer.set(n),e}}const ve=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]),xe=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Me=new Uint32Array(64);class Pe extends Ie{constructor(e=32){super(64,e,8,!1),this.A=0|xe[0],this.B=0|xe[1],this.C=0|xe[2],this.D=0|xe[3],this.E=0|xe[4],this.F=0|xe[5],this.G=0|xe[6],this.H=0|xe[7]}get(){const{A:e,B:t,C:n,D:a,E:i,F:r,G:s,H:p}=this;return[e,t,n,a,i,r,s,p]}set(e,t,n,a,i,r,s,p){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|a,this.E=0|i,this.F=0|r,this.G=0|s,this.H=0|p}process(e,t){for(let n=0;n<16;n++,t+=4)Me[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=Me[e-15],n=Me[e-2],a=me(t,7)^me(t,18)^t>>>3,i=me(n,17)^me(n,19)^n>>>10;Me[e]=i+Me[e-7]+a+Me[e-16]|0}let{A:n,B:a,C:i,D:r,E:s,F:p,G:o,H:y}=this;for(let e=0;e<64;e++){const t=y+(me(s,6)^me(s,11)^me(s,25))+((u=s)&p^~u&o)+ve[e]+Me[e]|0,l=(me(n,2)^me(n,13)^me(n,22))+ge(n,a,i)|0;y=o,o=p,p=s,s=r+t|0,r=i,i=a,a=n,n=t+l|0}var u;n=n+this.A|0,a=a+this.B|0,i=i+this.C|0,r=r+this.D|0,s=s+this.E|0,p=p+this.F|0,o=o+this.G|0,y=y+this.H|0,this.set(n,a,i,r,s,p,o,y)}roundClean(){Me.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const ke=we((()=>new Pe));function _e(e){const{commitment:t,version:n=1}=e,a=e.to??("string"==typeof t?"hex":"bytes"),i=function(e,t){const n=t||"hex",a=ke(b(e,{strict:!1})?F(e):e);return"bytes"===n?a:x(a)}(t,"bytes");return i.set([n],0),"bytes"===a?i:M(i)}const Fe=4096,Ae=131072,Ce=761855;class Se extends d{constructor({maxSize:e,size:t}){super("Blob size is too large.",{metaMessages:[`Max: ${e} bytes`,`Given: ${t} bytes`],name:"BlobSizeTooLargeError"})}}class De extends d{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class Ee extends d{constructor({hash:e,size:t}){super(`Versioned hash "${e}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${t}`],name:"InvalidVersionedHashSizeError"})}}class Oe extends d{constructor({hash:e,version:t}){super(`Versioned hash "${e}" version is invalid.`,{metaMessages:["Expected: 1",`Received: ${t}`],name:"InvalidVersionedHashVersionError"})}}function Be(e){const{data:t,kzg:n,to:a}=e,i=e.blobs??function(e){const t=e.to??("string"==typeof e.data?"hex":"bytes"),n="string"==typeof e.data?S(e.data):e.data,a=f(n);if(!a)throw new De;if(a>Ce)throw new Se({maxSize:Ce,size:a});const i=[];let r=!0,s=0;for(;r;){const e=j(new Uint8Array(Ae));let t=0;for(;t<Fe;){const a=n.slice(s,s+31);if(e.pushByte(0),e.pushBytes(a),a.length<31){e.pushByte(128),r=!1;break}t++,s+=31}i.push(e)}return"bytes"===t?i.map((e=>e.bytes)):i.map((e=>M(e.bytes)))}({data:t,to:a}),r=e.commitments??pe({blobs:i,kzg:n,to:a}),s=e.proofs??oe({blobs:i,commitments:r,kzg:n,to:a}),p=[];for(let e=0;e<i.length;e++)p.push({blob:i[e],commitment:r[e],proof:s[e]});return p}class Le extends d{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"})}}class Ue extends d{constructor({chainId:e}){super("number"==typeof e?`Chain ID "${e}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}class Re extends d{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${ne(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}}Object.defineProperty(Re,"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 He extends d{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${ne(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${ne(n)} gwei`:""}).`].join("\n"),{cause:e,name:"TipAboveFeeCapError"})}}Object.defineProperty(He,"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 Ne extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const 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){const e=this.keys().next().value;e&&this.delete(e)}return this}}const ze=BigInt(2**32-1),qe=BigInt(32);function Ve(e,t=!1){return t?{h:Number(e&ze),l:Number(e>>qe&ze)}:{h:0|Number(e>>qe&ze),l:0|Number(e&ze)}}function We(e,t=!1){let n=new Uint32Array(e.length),a=new Uint32Array(e.length);for(let i=0;i<e.length;i++){const{h:r,l:s}=Ve(e[i],t);[n[i],a[i]]=[r,s]}return[n,a]}const Ge=[],Ke=[],$e=[],Ze=BigInt(0),Xe=BigInt(1),Qe=BigInt(2),je=BigInt(7),Ye=BigInt(256),Je=BigInt(113);for(let e=0,t=Xe,n=1,a=0;e<24;e++){[n,a]=[a,(2*n+3*a)%5],Ge.push(2*(5*a+n)),Ke.push((e+1)*(e+2)/2%64);let i=Ze;for(let e=0;e<7;e++)t=(t<<Xe^(t>>je)*Je)%Ye,t&Qe&&(i^=Xe<<(Xe<<BigInt(e))-Xe);$e.push(i)}const[et,tt]=We($e,!0),nt=(e,t,n)=>n>32?((e,t,n)=>t<<n-32|e>>>64-n)(e,t,n):((e,t,n)=>e<<n|t>>>32-n)(e,t,n),at=(e,t,n)=>n>32?((e,t,n)=>e<<n-32|t>>>64-n)(e,t,n):((e,t,n)=>t<<n|e>>>32-n)(e,t,n);class it extends he{constructor(e,t,n,a=!1,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=a,this.rounds=i,ye(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");var r;this.state=new Uint8Array(200),this.state32=(r=this.state,new Uint32Array(r.buffer,r.byteOffset,Math.floor(r.byteLength/4)))}keccak(){Te||be(this.state32),function(e,t=24){const n=new Uint32Array(10);for(let a=24-t;a<24;a++){for(let t=0;t<10;t++)n[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const a=(t+8)%10,i=(t+2)%10,r=n[i],s=n[i+1],p=nt(r,s,1)^n[a],o=at(r,s,1)^n[a+1];for(let n=0;n<50;n+=10)e[t+n]^=p,e[t+n+1]^=o}let t=e[2],i=e[3];for(let n=0;n<24;n++){const a=Ke[n],r=nt(t,i,a),s=at(t,i,a),p=Ge[n];t=e[p],i=e[p+1],e[p]=r,e[p+1]=s}for(let t=0;t<50;t+=10){for(let a=0;a<10;a++)n[a]=e[t+a];for(let a=0;a<10;a++)e[t+a]^=~n[(a+2)%10]&n[(a+4)%10]}e[0]^=et[a],e[1]^=tt[a]}n.fill(0)}(this.state32,this.rounds),Te||be(this.state32),this.posOut=0,this.pos=0}update(e){le(this);const{blockLen:t,state:n}=this,a=(e=fe(e)).length;for(let i=0;i<a;){const r=Math.min(t-this.pos,a-i);for(let t=0;t<r;t++)n[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:n,blockLen:a}=this;e[n]^=t,128&t&&n===a-1&&this.keccak(),e[a-1]^=128,this.keccak()}writeInto(e){le(this,!1),ue(e),this.finish();const t=this.state,{blockLen:n}=this;for(let a=0,i=e.length;a<i;){this.posOut>=n&&this.keccak();const r=Math.min(n-this.posOut,i-a);e.set(t.subarray(this.posOut,this.posOut+r),a),this.posOut+=r,a+=r}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return ye(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(de(e,this),this.finished)throw new 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){const{blockLen:t,suffix:n,outputLen:a,rounds:i,enableXOF:r}=this;return e||(e=new it(t,n,a,r,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=a,e.enableXOF=r,e.destroyed=this.destroyed,e}}const rt=((e,t,n)=>we((()=>new it(t,e,n))))(1,136,32);const st=new Ne(8192);function pt(e,t){if(st.has(`${e}.${t}`))return st.get(`${e}.${t}`);const n=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),a=function(e,t){const n=t||"hex",a=rt(b(e,{strict:!1})?F(e):e);return"bytes"===n?a:x(a)}(D(n),"bytes"),i=(t?n.substring(`${t}0x`.length):n).split("");for(let e=0;e<40;e+=2)a[e>>1]>>4>=8&&i[e]&&(i[e]=i[e].toUpperCase()),(15&a[e>>1])>=8&&i[e+1]&&(i[e+1]=i[e+1].toUpperCase());const r=`0x${i.join("")}`;return st.set(`${e}.${t}`,r),r}const ot=/^0x[a-fA-F0-9]{40}$/,yt=new Ne(8192);function ut(e,t){const{strict:n=!0}=t??{},a=`${e}.${n}`;if(yt.has(a))return yt.get(a);const i=!(!ot.test(e)||e.toLowerCase()!==e&&n&&pt(e)!==e);return yt.set(a,i),i}function lt(e,t,n,{strict:a}={}){return b(e,{strict:!1})?function(e,t,n,{strict:a}={}){dt(e,t);const i=`0x${e.replace("0x","").slice(2*(t??0),2*(n??e.length))}`;a&&ct(i,t,n);return i}(e,t,n,{strict:a}):function(e,t,n,{strict:a}={}){dt(e,t);const i=e.slice(t,n);a&&ct(i,t,n);return i}(e,t,n,{strict:a})}function dt(e,t){if("number"==typeof t&&t>0&&t>f(e)-1)throw new w({offset:t,position:"start",size:f(e)})}function ct(e,t,n){if("number"==typeof t&&"number"==typeof n&&f(e)!==n-t)throw new w({offset:n,position:"end",size:f(e)})}function mt(e){const{chainId:t,maxPriorityFeePerGas:n,maxFeePerGas:a,to:i}=e;if(t<=0)throw new Ue({chainId:t});if(i&&!ut(i))throw new Le({address:i});if(a&&a>G)throw new Re({maxFeePerGas:a});if(n&&a&&n>a)throw new He({maxFeePerGas:a,maxPriorityFeePerGas:n})}function Tt(e){if(!e||0===e.length)return[];const t=[];for(let n=0;n<e.length;n++){const{address:a,storageKeys:i}=e[n];for(let e=0;e<i.length;e++)if(i[e].length-2!=64)throw new se({storageKey:i[e]});if(!ut(a,{strict:!1}))throw new Le({address:a});t.push([a,i])}return t}function bt(e,t){const n=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 re({transaction:e})}(e);return"eip1559"===n?function(e,t){const{chainId:n,gas:a,nonce:i,to:r,value:s,maxFeePerGas:p,maxPriorityFeePerGas:o,accessList:y,data:u}=e;mt(e);const l=Tt(y),d=[x(n),i?x(i):"0x",o?x(o):"0x",p?x(p):"0x",a?x(a):"0x",r??"0x",s?x(s):"0x",u??"0x",l,...ft(e,t)];return K(["0x02",Y(d)])}(e,t):"eip2930"===n?function(e,t){const{chainId:n,gas:a,data:i,nonce:r,to:s,value:p,accessList:o,gasPrice:y}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:a,maxFeePerGas:i,to:r}=e;if(t<=0)throw new Ue({chainId:t});if(r&&!ut(r))throw new Le({address:r});if(n||i)throw new d("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(a&&a>G)throw new Re({maxFeePerGas:a})}(e);const u=Tt(o),l=[x(n),r?x(r):"0x",y?x(y):"0x",a?x(a):"0x",s??"0x",p?x(p):"0x",i??"0x",u,...ft(e,t)];return K(["0x01",Y(l)])}(e,t):"eip4844"===n?function(e,t){const{chainId:n,gas:a,nonce:i,to:r,value:s,maxFeePerBlobGas:p,maxFeePerGas:o,maxPriorityFeePerGas:y,accessList:u,data:l}=e;!function(e){const{blobVersionedHashes:t}=e;if(t){if(0===t.length)throw new De;for(const e of t){const t=f(e),n=B(lt(e,0,1));if(32!==t)throw new Ee({hash:e,size:t});if(1!==n)throw new Oe({hash:e,version:n})}}mt(e)}(e);let d=e.blobVersionedHashes,c=e.sidecars;if(e.blobs&&(void 0===d||void 0===c)){const t="string"==typeof e.blobs[0]?e.blobs:e.blobs.map((e=>M(e))),n=e.kzg,a=pe({blobs:t,kzg:n});if(void 0===d&&(d=function(e){const{commitments:t,version:n}=e,a=e.to??("string"==typeof t[0]?"hex":"bytes"),i=[];for(const e of t)i.push(_e({commitment:e,to:a,version:n}));return i}({commitments:a})),void 0===c){c=Be({blobs:t,commitments:a,proofs:oe({blobs:t,commitments:a,kzg:n})})}}const m=Tt(u),T=[x(n),i?x(i):"0x",y?x(y):"0x",o?x(o):"0x",a?x(a):"0x",r??"0x",s?x(s):"0x",l??"0x",m,p?x(p):"0x",d??[],...ft(e,t)],b=[],h=[],w=[];if(c)for(let e=0;e<c.length;e++){const{blob:t,commitment:n,proof:a}=c[e];b.push(t),h.push(n),w.push(a)}return K(["0x03",Y(c?[T,b,h,w]:T)])}(e,t):"eip7702"===n?function(e,t){const{authorizationList:n,chainId:a,gas:i,nonce:r,to:s,value:p,maxFeePerGas:o,maxPriorityFeePerGas:y,accessList:u,data:l}=e;!function(e){const{authorizationList:t}=e;if(t)for(const e of t){const{chainId:t}=e,n=e.address;if(!ut(n))throw new Le({address:n});if(t<0)throw new Ue({chainId:t})}mt(e)}(e);const d=Tt(u),c=function(e){if(!e||0===e.length)return[];const t=[];for(const n of e){const{chainId:e,nonce:a,...i}=n,r=n.address;t.push([e?x(e):"0x",r,a?x(a):"0x",...ft({},i)])}return t}(n);return K(["0x04",Y([x(a),r?x(r):"0x",y?x(y):"0x",o?x(o):"0x",i?x(i):"0x",s??"0x",p?x(p):"0x",l??"0x",d,c,...ft(e,t)])])}(e,t):function(e,t){const{chainId:n=0,gas:a,data:i,nonce:r,to:s,value:p,gasPrice:o}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:a,maxFeePerGas:i,to:r}=e;if(r&&!ut(r))throw new Le({address:r});if(void 0!==t&&t<=0)throw new Ue({chainId:t});if(n||i)throw new d("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(a&&a>G)throw new Re({maxFeePerGas:a})}(e);let y=[r?x(r):"0x",o?x(o):"0x",a?x(a):"0x",s??"0x",p?x(p):"0x",i??"0x"];if(t){const e=(()=>{if(t.v>=35n){return(t.v-35n)/2n>0?t.v:27n+(35n===t.v?0n:1n)}if(n>0)return BigInt(2*n)+BigInt(35n+t.v-27n);const e=27n+(27n===t.v?0n:1n);if(t.v!==e)throw new ie({v:t.v});return e})(),a=h(t.r),i=h(t.s);y=[...y,x(e),"0x00"===a?"0x":a,"0x00"===i?"0x":i]}else n>0&&(y=[...y,x(n),"0x","0x"]);return Y(y)}(e,t)}function ft(e,t){const n=t??e,{v:a,yParity:i}=n;if(void 0===n.r)return[];if(void 0===n.s)return[];if(void 0===a&&void 0===i)return[];const r=h(n.r),s=h(n.s);return["number"==typeof i?i?x(1):"0x":0n===a?"0x":1n===a?x(1):27n===a?"0x":x(1),"0x00"===r?"0x":r,"0x00"===s?"0x":s]}const ht={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}};function wt(e,t){return function(e){return"deposit"===e.type||void 0!==e.sourceHash}(e)?function(e){!function(e){const{from:t,to:n}=e;if(t&&!ut(t))throw new Le({address:t});if(n&&!ut(n))throw new Le({address:n})}(e);const{sourceHash:t,data:n,from:a,gas:i,isSystemTx:r,mint:s,to:p,value:o}=e;return K(["0x7e",Y([t,a,p??"0x",s?x(s):"0x",o?x(o):"0x",i?x(i):"0x",r?"0x1":"0x",n??"0x"])])}(e):bt(e,t)}const gt={contracts:ht,formatters:{block:z({format(e){const t=e.transactions?.map((e=>{if("string"==typeof e)return e;const t=R(e);return"0x7e"===t.typeHex&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?O(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}));return{transactions:t,stateRoot:e.stateRoot}}}),transaction:H({format(e){const t={};return"0x7e"===e.type&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?O(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:W({format:e=>({l1GasPrice:e.l1GasPrice?O(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?O(e.l1GasUsed):null,l1Fee:e.l1Fee?O(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null})})},serializers:{transaction:wt}},It=1,vt=o({...gt,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...gt.contracts,disputeGameFactory:{[It]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[It]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[It]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[It]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:1}),xt=11155111,Mt=o({...gt,id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://sepolia.basescan.org",apiUrl:"https://api-sepolia.basescan.org/api"}},contracts:{...gt.contracts,disputeGameFactory:{[xt]:{address:"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"}},l2OutputOracle:{[xt]:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{[xt]:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{[xt]:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:!0,sourceId:xt});o({id:53456,name:"BirdLayer",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.birdlayer.xyz","https://rpc1.birdlayer.xyz"],webSocket:["wss://rpc.birdlayer.xyz/ws"]}},blockExplorers:{default:{name:"BirdLayer Explorer",url:"https://scan.birdlayer.xyz"}}});const Pt=1;o({...gt,id:60808,name:"BOB",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.gobob.xyz"],webSocket:["wss://rpc.gobob.xyz"]}},blockExplorers:{default:{name:"BOB Explorer",url:"https://explorer.gobob.xyz"}},contracts:{...gt.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:23131},l2OutputOracle:{[Pt]:{address:"0xdDa53E23f8a32640b04D7256e651C1db98dB11C1",blockCreated:4462615}},portal:{[Pt]:{address:"0x8AdeE124447435fE03e3CD24dF3f4cAE32E65a3E",blockCreated:4462615}}},sourceId:1});const kt=11155111;o({...gt,id:808813,name:"BOB Sepolia",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://bob-sepolia.rpc.gobob.xyz"],webSocket:["wss://bob-sepolia.rpc.gobob.xyz"]}},blockExplorers:{default:{name:"BOB Sepolia Explorer",url:"https://bob-sepolia.explorer.gobob.xyz"}},contracts:{...gt.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:35677},l2OutputOracle:{[kt]:{address:"0x14D0069452b4AE2b250B395b8adAb771E4267d2f",blockCreated:4462615}},portal:{[kt]:{address:"0x867B1Aa872b9C8cB5E9F7755feDC45BB24Ad0ae4",blockCreated:4462615}}},testnet:!0,sourceId:kt});o({id:44,name:"Crab Network",nativeCurrency:{decimals:18,name:"Crab Network Native Token",symbol:"CRAB"},rpcUrls:{default:{http:["https://crab-rpc.darwinia.network"],webSocket:["wss://crab-rpc.darwinia.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://crab-scan.darwinia.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3032593}}}),o({id:66665,name:"Creator",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.creatorchain.io"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.creatorchain.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},testnet:!0}),o({id:53457,name:"DODOchain Testnet",nativeCurrency:{decimals:18,name:"DODO",symbol:"DODO"},rpcUrls:{default:{http:["https://dodochain-testnet.alt.technology"],webSocket:["wss://dodochain-testnet.alt.technology/ws"]}},blockExplorers:{default:{name:"DODOchain Testnet (Sepolia) Explorer",url:"https://testnet-scan.dodochain.com"}},testnet:!0});o({...gt,id:3397901,network:"funkiSepolia",name:"Funki Sepolia Sandbox",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://funki-testnet.alt.technology"]}},blockExplorers:{default:{name:"Funki Sepolia Sandbox Explorer",url:"https://sepolia-sandbox.funkichain.com/"}},testnet:!0,contracts:{...gt.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204}},sourceId:11155111});const _t=17e3;o({...gt,name:"Garnet Testnet",testnet:!0,id:17069,sourceId:_t,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:{...gt.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[_t]:{address:"0x57ee40586fbE286AfC75E67cb69511A6D9aF5909",blockCreated:1274684}},l2OutputOracle:{[_t]:{address:"0xCb8E7AC561b8EF04F2a15865e9fbc0766FEF569B",blockCreated:1274684}},l1StandardBridge:{[_t]:{address:"0x09bcDd311FE398F80a78BE37E489f5D440DB95DE",blockCreated:1274684}}}});o({id:701,name:"Koi Network",nativeCurrency:{decimals:18,name:"Koi Network Native Token",symbol:"KRING"},rpcUrls:{default:{http:["https://koi-rpc.darwinia.network"],webSocket:["wss://koi-rpc.darwinia.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://koi-scan.darwinia.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:180001}},testnet:!0});const Ft=11155111;o({...gt,name:"Pyrope Testnet",testnet:!0,id:695569,sourceId:Ft,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.pyropechain.com"],webSocket:["wss://rpc.pyropechain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://pyrope.blockscout.com"}},contracts:{...gt.contracts,l1StandardBridge:{[Ft]:{address:"0xC24932c31D9621aE9e792576152B7ef010cFC2F8"}}}});const At=1;o({...gt,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:{...gt.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[At]:{address:"0xC7bCb0e8839a28A1cFadd1CF716de9016CdA51ae",blockCreated:19578329}},l2OutputOracle:{[At]:{address:"0xa426A052f657AEEefc298b3B5c35a470e4739d69",blockCreated:19578337}},l1StandardBridge:{[At]:{address:"0xc473ca7E02af24c129c2eEf51F2aDf0411c1Df69",blockCreated:19578331}}}});const Ct={[vt.id]:"0x51Bba15255406Cfe7099a42183302640ba7dAFDC",[Mt.id]:"0x9A7059cA00dA92843906Cb4bCa1D005cE848AFdC"},St={[vt.id]:"0xf785bb58059fab6fb19bdda2cb9078d9e546efdc",[Mt.id]:"0x24347e0dd16357059abfc1b321df354873552fdc"},Dt={[vt.id]:"0x8DC3b85e1dc1C846ebf3971179a751896842e5dC",[Mt.id]:"0xB4A535B9D35851972736495CC52FBfDaCF32e5dc"},Et={[vt.id]:"0xb47af90ae61bc916ea4b4bacffae4570e7435842",[Mt.id]:"0xb4955a396ef07c124a59164c30d63e96a103a98b"},Ot={[vt.id]:"0xf6ddfcb093be0cd0c015590cb6c5127d9ff2a20b",[Mt.id]:"0x2874f9a30348acaaad55d74b0bec9c18f04b471a"},Bt={[vt.id]:"0xedd66b080b8e9425c39d349a3fb69f480580f993",[Mt.id]:"0x6428b5C4da36ecB070aBdcB5E1939244A3cC7fb5"},Lt={[vt.id]:"0x06a089fa231aca48d2aa77365123ad9aca43d3a4",[Mt.id]:"0x6582d2bc6a7eba3b40bdf46b3868fc7ec2ff96ec"},Ut={[vt.id]:"0x7a04367563a65db574d6b7d084fdbcf4a570c5a6",[Mt.id]:"0xfde5b79e3e2814edd5f91e8694ae400954d9cfaa"},Rt={[vt.id]:"0x656047fd43d2c3a121f2ef859d7171d7dd59f8b9",[Mt.id]:"0x05a5763e9199b88bb591c6b112d0424b2cd7a99e"},Ht={[vt.id]:"0x72e6f7948b1B1A343B477F39aAbd2E35E6D27dde",[Mt.id]:"0x73E27908b7d35A9251a54799A8ef4C17e4ED9FF9"},Nt={[vt.id]:"0xBD39c7Be6D98BD1a3e4Ad482baF99d738947fE55",[Mt.id]:"0xd3d9047CaBE3346C70b510435866565176e8CE12"},zt={[vt.id]:"0x000000000D564D5be76f7f0d28fE52605afC7Cf8",[Mt.id]:"0x79FC52701cD4BE6f9Ba9aDC94c207DE37e3314eb"},qt={[vt.id]:"0x9E433F32bb5481a9CA7DFF5b3af74A7ed041a888",[Mt.id]:"0x4bd2ca15286c96e4e731337de8b375da6841e888"},Vt={[vt.id]:"0xCc7A4A00072ccbeEEbd999edc812C0ce498Fb63B",[Mt.id]:"0x227Fc288aC56E169f2BfEA82e07F8635054d4136"},Wt={[vt.id]:"0x4dc442403e8c758425b93c59dc737da522f32640",[Mt.id]:"0x7922c1ead7c5825fb52ed6b14f397d064508acbe"},Gt={[vt.id]:"0xCc7A4A00072ccbeEEbd999edc812C0ce498Fb63B",[Mt.id]:"0x7D375C9133721083DF7b7e5Cb0Ed8Fc78862dfe3"},Kt={[vt.id]:"0xb4512bf57d50fbcb64a3adf8b17a79b2a204c18c",[Mt.id]:"0x96be8ff5e244294a34bfa507a39190dc7a839baa"},$t={[vt.id]:"0xc5B2E8F197407263F4B62a35C71bFc394ecF95D5",[Mt.id]:"0x67Ee6C83956a75f67bD3Fc8Ca4080D95a145c7C9"},Zt={[vt.id]:"0x66681f10BA90496241A25e33380004f30Dfd8aa8",[Mt.id]:"0xa2107050ACEf4809c88Ab744F8e667605db5ACDB"},Xt={[vt.id]:"0x7f22353d1634223a802D1c1Ea5308Ddf5DD0ef9c",[Mt.id]:"0x6f2fa01a05ff8b6efbfefd91a3b85aaf19265a00"},Qt={[vt.id]:"0x2154c604df568A5285284D1c4918DC98C39240df",[Mt.id]:"0xcfF222eA42E43F46A98755db237E4c9C2CA9B772"},jt={[vt.id]:"0x68d967d25806fef4aa134db031cdcc55d3e20f92",[Mt.id]:"0x821d9f6075e7971cc71c379081de9d532f5f9957"},Yt={[vt.id]:"0xfa9e8528ee95eb109bffd1a2d59cb95b300a672a",[Mt.id]:"0xb2f5d987de90e026b61805e60b6002d367461474"},Jt={[vt.id]:"0x712fa8ddc7347b4b6b029aa21710f365cd02d898",[Mt.id]:"0x17E02501dE3e420347e7C5fCAe3AD787C5aea690"},en={[vt.id]:"0x6baa4ec493a9698dc7388c0f290e29ea3d149f99",[Mt.id]:"0xf72dcdee692c188de6b14c6213e849982e04069b"},tn={[vt.id]:"0x48af8b28DDC5e5A86c4906212fc35Fa808CA8763",[Mt.id]:"0xd2f3c6185e06925dcbe794c6574315b2202e9ccd"},nn={[vt.id]:"0x498581fF718922c3f8e6A244956aF099B2652b2b",[Mt.id]:"0x05E73354cFDd6745C338b50BcFDfA3Aa6fA03408"},an={[vt.id]:"0x6fF5693b99212Da76ad316178A184AB56D299b43",[Mt.id]:"0x492E6456D9528771018DeB9E87ef7750EF184104"},rn={[vt.id]:"0x0d5e0f971ed27fbff6c2837bf31316121532048d",[Mt.id]:"0x4a6513c898fe1b2d0e78d3b0e0a4a151589b1cba"},sn={[vt.id]:"0xA3c0c9b65baD0b08107Aa264b0f3dB444b867A71",[Mt.id]:"0x571291b572ed32ce6751a2Cb2486EbEe8DEfB9B4"},pn={[vt.id]:"0x000000000022D473030F116dDEE9F6B43aC78BA3",[Mt.id]:"0x000000000022D473030F116dDEE9F6B43aC78BA3"},on={[vt.id]:{currency0:n.zeroAddress,currency1:"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",fee:500,tickSpacing:10,hooks:n.zeroAddress},[Mt.id]:{currency0:n.zeroAddress,currency1:"0x036CbD53842c5426634e7929541eC2318f3dCF7e",fee:0,tickSpacing:30,hooks:n.zeroAddress}},yn=[{inputs:[{components:[{internalType:"address",name:"nativeToken",type:"address"},{internalType:"contract IPoolManager",name:"poolManager",type:"address"},{components:[{internalType:"uint24",name:"swapFee",type:"uint24"},{internalType:"uint24",name:"referrer",type:"uint24"},{internalType:"uint24",name:"protocol",type:"uint24"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct FeeDistributor.FeeDistribution",name:"feeDistribution",type:"tuple"},{internalType:"contract IInitialPrice",name:"initialPrice",type:"address"},{internalType:"address",name:"protocolOwner",type:"address"},{internalType:"address",name:"protocolFeeRecipient",type:"address"},{internalType:"address",name:"flayGovernance",type:"address"},{internalType:"contract FeeExemptions",name:"feeExemptions",type:"address"}],internalType:"struct PositionManager.ConstructorParams",name:"params",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AlreadyInitialized",type:"error"},{inputs:[],name:"CallerIsNotBidWall",type:"error"},{inputs:[{internalType:"address",name:"_caller",type:"address"}],name:"CallerNotCreator",type:"error"},{inputs:[],name:"CannotBeInitializedDirectly",type:"error"},{inputs:[],name:"CannotModifyLiquidityDuringFairLaunch",type:"error"},{inputs:[],name:"CannotSellTokenDuringFairLaunch",type:"error"},{inputs:[],name:"HookNotImplemented",type:"error"},{inputs:[{internalType:"uint256",name:"_paid",type:"uint256"},{internalType:"uint256",name:"_required",type:"uint256"}],name:"InsufficientFlaunchFee",type:"error"},{inputs:[],name:"InvalidPool",type:"error"},{inputs:[],name:"LockFailure",type:"error"},{inputs:[],name:"NewOwnerIsZeroAddress",type:"error"},{inputs:[],name:"NoHandoverRequest",type:"error"},{inputs:[],name:"NotPoolManager",type:"error"},{inputs:[],name:"NotSelf",type:"error"},{inputs:[],name:"ProtocolFeeInvalid",type:"error"},{inputs:[],name:"RecipientZeroAddress",type:"error"},{inputs:[],name:"ReferrerFeeInvalid",type:"error"},{inputs:[],name:"SwapFeeInvalid",type:"error"},{inputs:[{internalType:"uint256",name:"_flaunchesAt",type:"uint256"}],name:"TokenNotFlaunched",type:"error"},{inputs:[],name:"Unauthorized",type:"error"},{inputs:[{internalType:"PoolId",name:"_poolId",type:"bytes32"}],name:"UnknownPool",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"PoolId",name:"_poolId",type:"bytes32"},{indexed:!1,internalType:"uint24",name:"_allocation",type:"uint24"}],name:"CreatorFeeAllocationUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"PoolId",name:"_poolId",type:"bytes32"},{indexed:!1,internalType:"address",name:"_payee",type:"address"},{indexed:!1,internalType:"address",name:"_token",type:"address"},{indexed:!1,internalType:"uint256",name:"_amount",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"_feeCalculator",type:"address"}],name:"FairLaunchFeeCalculatorUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"_feeCalculator",type:"address"}],name:"FeeCalculatorUpdated",type:"event"},{anonymous:!1,inputs:[{components:[{internalType:"uint24",name:"swapFee",type:"uint24"},{internalType:"uint24",name:"referrer",type:"uint24"},{internalType:"uint24",name:"protocol",type:"uint24"},{internalType:"bool",name:"active",type:"bool"}],indexed:!1,internalType:"struct FeeDistributor.FeeDistribution",name:"_feeDistribution",type:"tuple"}],name:"FeeDistributionUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"_initialPrice",type:"address"}],name:"InitialPriceUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pendingOwner",type:"address"}],name:"OwnershipHandoverCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pendingOwner",type:"address"}],name:"OwnershipHandoverRequested",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"PoolId",name:"_poolId",type:"bytes32"},{indexed:!1,internalType:"address",name:"_memecoin",type:"address"},{indexed:!1,internalType:"address",name:"_memecoinTreasury",type:"address"},{indexed:!1,internalType:"uint256",name:"_tokenId",type:"uint256"},{indexed:!1,internalType:"bool",name:"_currencyFlipped",type:"bool"},{indexed:!1,internalType:"uint256",name:"_flaunchFee",type:"uint256"},{components: