@dcl/explore-site 0.0.1-24345714753.commit-c5e29cc → 0.0.1-24347323452.commit-66ae178
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/assets/{HomePage-Cayx-aqS.js → HomePage-D6V-mveb.js} +4 -4
- package/assets/{QueryClientProvider-LqkYvEWg.js → QueryClientProvider-DAQLID1-.js} +1 -1
- package/assets/{SensorsRounded-BqhS1oOd.js → SensorsRounded-CtG4QA9Z.js} +1 -1
- package/assets/{__federation_expose_App-D5fURYa7.js → __federation_expose_App-BMMv9eit.js} +1 -1
- package/assets/{__federation_fn_import-CUxUDAy-.js → __federation_fn_import-Cw4EhxlG.js} +1 -1
- package/assets/__federation_shared_@dcl/{hooks-CvNpE2BS.js → hooks-BZe_CFS-.js} +3 -3
- package/assets/__federation_shared_@emotion/react-B8rXWKtg.js +1 -0
- package/assets/__federation_shared_@emotion/{styled-d41li-Cb.js → styled-4pT2Mrcu.js} +1 -1
- package/assets/{__federation_shared_decentraland-ui2-Bbk1NWyc.js → __federation_shared_decentraland-ui2-DZBO-y4w.js} +4 -4
- package/assets/{__federation_shared_react-redux-BjZVfV5U.js → __federation_shared_react-redux-D6ZOWu-c.js} +1 -1
- package/assets/{__federation_shared_react-router-dom-B255hKWi.js → __federation_shared_react-router-dom-aY8-4Jtr.js} +1 -1
- package/assets/{__federation_shared_viem-CKCF7_5-.js → __federation_shared_viem-4okQOkEY.js} +1 -1
- package/assets/{__federation_shared_wagmi-BzeO6Nyv.js → __federation_shared_wagmi-6QeUZhKR.js} +1 -1
- package/assets/{add-B1jP8GOn.js → add-BiWewVTL.js} +1 -1
- package/assets/{all-wallets-BbHbmEJy.js → all-wallets-CCypuRdk.js} +1 -1
- package/assets/{app-store-DS9BJbrX.js → app-store-DVZ78NdP.js} +1 -1
- package/assets/{apple-DpKjJvN9.js → apple-DI8wHuXR.js} +1 -1
- package/assets/{arrow-bottom-lOMD0MdX.js → arrow-bottom-Cdn25yfn.js} +1 -1
- package/assets/{arrow-bottom-circle-DX4t3gH0.js → arrow-bottom-circle-Dr4-FhSy.js} +1 -1
- package/assets/{arrow-left-B7WsYEF3.js → arrow-left-Bz1AdNPy.js} +1 -1
- package/assets/{arrow-right-B1ANqvnC.js → arrow-right-Bay3z0do.js} +1 -1
- package/assets/{arrow-top-CsMpD4AE.js → arrow-top-DI5j-zJ9.js} +1 -1
- package/assets/{auto-track-Cm9kFkQK.js → auto-track-D2Yg_-7n.js} +1 -1
- package/assets/{bank-Dnus9NnX.js → bank-RZrU0r--.js} +1 -1
- package/assets/{basic-DGlw7EN3.js → basic-Cyg6UEiZ.js} +1 -1
- package/assets/{browser-DTpaCekD.js → browser-BEYHOERe.js} +1 -1
- package/assets/{card-BiKoloeD.js → card-1RwXo47D.js} +1 -1
- package/assets/{ccip-DaZj8OQ0.js → ccip-CmnwE6kO.js} +1 -1
- package/assets/{checkmark-DgN_nwNU.js → checkmark-BKhQv4dC.js} +1 -1
- package/assets/{checkmark-bold-C4uUyv0c.js → checkmark-bold-BlUrDQih.js} +1 -1
- package/assets/{chevron-bottom-DRG1eJi7.js → chevron-bottom-C8rXKOMx.js} +1 -1
- package/assets/{chevron-left-DbVWJVmq.js → chevron-left-RIhvnx0R.js} +1 -1
- package/assets/{chevron-right-BnPIg0cp.js → chevron-right-CFH1HkPm.js} +1 -1
- package/assets/{chevron-top-DQ-txiW4.js → chevron-top-CeZ0kvWe.js} +1 -1
- package/assets/{chrome-store-Dawe88zJ.js → chrome-store-9FDmlz3B.js} +1 -1
- package/assets/{clock-BcPAPgYI.js → clock--qIdT6jS.js} +1 -1
- package/assets/{close-BVpl2r1E.js → close-CYQdeqtg.js} +1 -1
- package/assets/{coinPlaceholder-DWi0bg6D.js → coinPlaceholder-B72RV-UC.js} +1 -1
- package/assets/{compass-D7dtan0A.js → compass-BfGfjqHm.js} +1 -1
- package/assets/{copy-hCG4WIZ6.js → copy-CKx8R_ND.js} +1 -1
- package/assets/{core-DZ3rf3Ov.js → core-Czc2aVX-.js} +3 -3
- package/assets/{createClient-DRXa1ld5.js → createClient-DI-yyeB8.js} +1 -1
- package/assets/{cursor-Dmu87g4c.js → cursor-CE5vm2kp.js} +1 -1
- package/assets/{cursor-transparent-VHToohFc.js → cursor-transparent-CeJ_IeYW.js} +1 -1
- package/assets/{desktop-Dx5u9OAI.js → desktop-BTKUbKLu.js} +1 -1
- package/assets/{disconnect-C5-8AgS2.js → disconnect-bD3IIhi7.js} +1 -1
- package/assets/{discord-DkCG9i5n.js → discord-CiXirQpM.js} +1 -1
- package/assets/{emotion-react.browser.esm-CZP5L8Qk.js → emotion-react.browser.esm-DthAtJ_b.js} +1 -1
- package/assets/{emotion-use-insertion-effect-with-fallbacks.browser.esm-C9ZfXHMo.js → emotion-use-insertion-effect-with-fallbacks.browser.esm-T2Tuze4y.js} +1 -1
- package/assets/{etherscan-DFLECSU-.js → etherscan-Cu9ire2O.js} +1 -1
- package/assets/{exclamation-triangle-Bm1MEMw2.js → exclamation-triangle-B4byBjRl.js} +1 -1
- package/assets/{extension-D6qHSOqO.js → extension-D5lNpd1U.js} +1 -1
- package/assets/{external-link-DnPDXXfL.js → external-link-DZBoiaCZ.js} +1 -1
- package/assets/{facebook-oLbAlV2X.js → facebook-D_iyzARm.js} +1 -1
- package/assets/{farcaster-Qw2wLyU_.js → farcaster-Bdc2pI3F.js} +1 -1
- package/assets/{filters-BBTBCO9n.js → filters-DQns37Iv.js} +1 -1
- package/assets/{github-B5hmprPO.js → github-Dk6Jn9QC.js} +1 -1
- package/assets/{google-B8Ex8Qgi.js → google-Dc6EkFhG.js} +1 -1
- package/assets/{help-circle-ClCjgCm4.js → help-circle-Ce3TG0Cf.js} +1 -1
- package/assets/{id-BLhpNKh9.js → id-C6KbbJ--.js} +1 -1
- package/assets/{image-8Xt2Zhfl.js → image-DrQbraG8.js} +1 -1
- package/assets/{index-CSRViGQv.js → index-B1Qw9Ysc.js} +1 -1
- package/assets/{index-BaeNprJ6.js → index-B3NvZPz9.js} +1 -1
- package/assets/{index-Y9bdvg-5.js → index-B8dCIvh9.js} +1 -1
- package/assets/{index-qWrS70OK.js → index-BXHM3pMM.js} +3 -3
- package/assets/{index-CXXhfUVF.js → index-DKBIymEi.js} +2 -2
- package/assets/{index-Bg6Td2zb.js → index-DqrsvfXo.js} +1 -1
- package/assets/{index-CNHw8b42.js → index-Dw1wySAn.js} +1 -1
- package/assets/index-Dy0yjznp.js +1 -1
- package/assets/{index-pP59MxIA.js → index-DzD7KT9k.js} +1 -1
- package/assets/index-VfkM29PH.js +1 -1
- package/assets/{index.es-Cucfjcxl.js → index.es-B0jK_QO-.js} +3 -3
- package/assets/{info-iYiEoszH.js → info-C0D8pffU.js} +1 -1
- package/assets/{info-circle-Helis67o.js → info-circle-BiCleDE8.js} +1 -1
- package/assets/jsx-runtime-B1l0k91v.js +1 -1
- package/assets/{lightbulb-BS9uJHot.js → lightbulb-Fj_H2VCW.js} +1 -1
- package/assets/{localBatchGatewayRequest-Zago36-3.js → localBatchGatewayRequest-B7t5Tpma.js} +1 -1
- package/assets/{mail-D3hVXype.js → mail-DD4cyKde.js} +1 -1
- package/assets/{mobile-CAwIlAMb.js → mobile-BLAaxpjp.js} +1 -1
- package/assets/{more-Dj5j8V_O.js → more-BIo3nlRi.js} +1 -1
- package/assets/{network-placeholder-BMws_VGI.js → network-placeholder-f5BpXzBo.js} +1 -1
- package/assets/{nftPlaceholder-CKljhPuu.js → nftPlaceholder-OrEKKEpX.js} +1 -1
- package/assets/{off-CqfEbtg1.js → off-qcY6xMeJ.js} +1 -1
- package/assets/{play-store-PZAqLb5W.js → play-store-B63b8J_i.js} +1 -1
- package/assets/{plus-C5S9Q7Bj.js → plus-CPOBBoal.js} +1 -1
- package/assets/{preload-helper-DvW1yRfn.js → preload-helper-Bf6P0chZ.js} +1 -1
- package/assets/{qr-code-D-b-4x9P.js → qr-code-B2BeuRzC.js} +1 -1
- package/assets/{recycle-horizontal-DHVcHaVl.js → recycle-horizontal-BmSnrXT-.js} +1 -1
- package/assets/{refresh-DGzgtVTI.js → refresh-DTspwpm1.js} +1 -1
- package/assets/remoteEntry.js +1 -1
- package/assets/{reown-logo-CQOTc4nl.js → reown-logo-CULSug9i.js} +1 -1
- package/assets/{search-BJJ6KujM.js → search-BjfNIyFi.js} +1 -1
- package/assets/{secp256k1-BRbKWSko.js → secp256k1-Cr4JWMkb.js} +1 -1
- package/assets/{send-CHm11rKk.js → send-CwN36rlO.js} +1 -1
- package/assets/{swapHorizontal-BFnPIg9r.js → swapHorizontal-CmMvC6wr.js} +1 -1
- package/assets/{swapHorizontalBold-BGsQTGW-.js → swapHorizontalBold-BxKoODHm.js} +1 -1
- package/assets/{swapHorizontalMedium--s2Qaa8V.js → swapHorizontalMedium-CzUUBt8i.js} +1 -1
- package/assets/{swapHorizontalRoundedBold-D07xBZnD.js → swapHorizontalRoundedBold-K88FxsS9.js} +1 -1
- package/assets/{swapVertical-CoeD7v2V.js → swapVertical-CSlbGxlU.js} +1 -1
- package/assets/{telegram-D0QEUHlB.js → telegram-C-Z6gZhD.js} +1 -1
- package/assets/{three-dots-CVFmYfS-.js → three-dots-CXLRBoKQ.js} +1 -1
- package/assets/{twitch-D7Dl6jAX.js → twitch-FmYPRPZ3.js} +1 -1
- package/assets/{twitterIcon-DNhb3SkB.js → twitterIcon-tjiQL1DM.js} +1 -1
- package/assets/{uid-D1hgl1uu.js → uid-CtW3Zgnp.js} +3 -3
- package/assets/{verify-Dg_vg3OF.js → verify-CM9wD1IM.js} +1 -1
- package/assets/{verify-filled-D-AxOpyv.js → verify-filled-B6CzCgX0.js} +1 -1
- package/assets/{w3m-modal-BLqw1mnt.js → w3m-modal-Ck8jEkw7.js} +1 -1
- package/assets/{wallet-BGwbw46g.js → wallet-CKX59GDv.js} +1 -1
- package/assets/{wallet-placeholder-s5V_Fs1C.js → wallet-placeholder-ZskzQR-l.js} +1 -1
- package/assets/{walletconnect-BK-z6mal.js → walletconnect-DdcJm4E2.js} +1 -1
- package/assets/{warning-circle-oPNw2TSm.js → warning-circle-BE3Stp0y.js} +1 -1
- package/assets/{webSocket-DIG0WL1j.js → webSocket-b_H0rYq3.js} +1 -1
- package/assets/{x-CkipKMj3.js → x-CPGaXvQ5.js} +1 -1
- package/index.html +14 -14
- package/package.json +3 -3
- package/assets/__federation_shared_@emotion/react-7COqedfj.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{importShared as ye}from"./__federation_fn_import-CUxUDAy-.js";import{B as tr,_ as q,h as mi,y as nc}from"./hooks.module-Dz_XB4AG.js";import{E as rc}from"./index-CdrMQoR6.js";import{a as ic,s as Mn,p as ac,c as sc}from"./createClient-DRXa1ld5.js";import{a as bt,cm as Pe,ak as J,aR as oc,bu as cc,e as Dn,ay as He,al as nr,cW as uc,y as Re,aj as Aa,B as N,fN as dc,fL as yi,d as lc,eP as fc,aw as pc,av as hc,ag as ln,w as $r,ao as mc,cD as yc,x as Gr,z as _a,cw as gc,aS as bc,bq as wc,s as vc,bv as xc,bw as Ec,bD as Ia}from"./uid-D1hgl1uu.js";import{c as Sc,g as kc,d as Ac,s as _c}from"./index-nibyPLVP.js";import{a as Ic}from"./_commonjsHelpers-C4iS2aBk.js";function Oa(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var a;const s=c=>c===null?null:JSON.parse(c,void 0),o=(a=n.getItem(i))!=null?a:null;return o instanceof Promise?o.then(s):s(o)},setItem:(i,a)=>n.setItem(i,JSON.stringify(a,void 0)),removeItem:i=>n.removeItem(i)}}const rr=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return rr(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return rr(r)(n)}}}},Oc=(e,t)=>(n,r,i)=>{let a={storage:Oa(()=>localStorage),partialize:h=>h,version:0,merge:(h,v)=>({...v,...h}),...t},s=!1;const o=new Set,c=new Set;let u=a.storage;if(!u)return e((...h)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...h)},r,i);const p=()=>{const h=a.partialize({...r()});return u.setItem(a.name,{state:h,version:a.version})},f=i.setState;i.setState=(h,v)=>{f(h,v),p()};const l=e((...h)=>{n(...h),p()},r,i);i.getInitialState=()=>l;let d;const g=()=>{var h,v;if(!u)return;s=!1,o.forEach(P=>{var x;return P((x=r())!=null?x:l)});const k=((v=a.onRehydrateStorage)==null?void 0:v.call(a,(h=r())!=null?h:l))||void 0;return rr(u.getItem.bind(u))(a.name).then(P=>{if(P)if(typeof P.version=="number"&&P.version!==a.version){if(a.migrate){const x=a.migrate(P.state,P.version);return x instanceof Promise?x.then(I=>[!0,I]):[!0,x]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,P.state];return[!1,void 0]}).then(P=>{var x;const[I,D]=P;if(d=a.merge(D,(x=r())!=null?x:l),n(d,!0),I)return p()}).then(()=>{k?.(d,void 0),d=r(),s=!0,c.forEach(P=>P(d))}).catch(P=>{k?.(void 0,P)})};return i.persist={setOptions:h=>{a={...a,...h},h.storage&&(u=h.storage)},clearStorage:()=>{u?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>g(),hasHydrated:()=>s,onHydrate:h=>(o.add(h),()=>{o.delete(h)}),onFinishHydration:h=>(c.add(h),()=>{c.delete(h)})},a.skipHydration||g(),d||l},Pc=Oc,gi=e=>{let t;const n=new Set,r=(u,p)=>{const f=typeof u=="function"?u(t):u;if(!Object.is(f,t)){const l=t;t=p??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(d=>d(t,l))}},i=()=>t,o={setState:r,getState:i,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u))},c=t=e(r,i,o);return o},Fr=e=>e?gi(e):gi;function Pa(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Pa(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Dt(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Pa(e))&&(r&&(r+=" "),r+=t);return r}const Cc=[{inputs:[{name:"preOpGas",type:"uint256"},{name:"paid",type:"uint256"},{name:"validAfter",type:"uint48"},{name:"validUntil",type:"uint48"},{name:"targetSuccess",type:"bool"},{name:"targetResult",type:"bytes"}],name:"ExecutionResult",type:"error"},{inputs:[{name:"opIndex",type:"uint256"},{name:"reason",type:"string"}],name:"FailedOp",type:"error"},{inputs:[{name:"sender",type:"address"}],name:"SenderAddressResult",type:"error"},{inputs:[{name:"aggregator",type:"address"}],name:"SignatureValidationFailed",type:"error"},{inputs:[{components:[{name:"preOpGas",type:"uint256"},{name:"prefund",type:"uint256"},{name:"sigFailed",type:"bool"},{name:"validAfter",type:"uint48"},{name:"validUntil",type:"uint48"},{name:"paymasterContext",type:"bytes"}],name:"returnInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"senderInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"factoryInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"paymasterInfo",type:"tuple"}],name:"ValidationResult",type:"error"},{inputs:[{components:[{name:"preOpGas",type:"uint256"},{name:"prefund",type:"uint256"},{name:"sigFailed",type:"bool"},{name:"validAfter",type:"uint48"},{name:"validUntil",type:"uint48"},{name:"paymasterContext",type:"bytes"}],name:"returnInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"senderInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"factoryInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"paymasterInfo",type:"tuple"},{components:[{name:"aggregator",type:"address"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"stakeInfo",type:"tuple"}],name:"aggregatorInfo",type:"tuple"}],name:"ValidationResultWithAggregation",type:"error"},{anonymous:!1,inputs:[{indexed:!0,name:"userOpHash",type:"bytes32"},{indexed:!0,name:"sender",type:"address"},{indexed:!1,name:"factory",type:"address"},{indexed:!1,name:"paymaster",type:"address"}],name:"AccountDeployed",type:"event"},{anonymous:!1,inputs:[],name:"BeforeExecution",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"totalDeposit",type:"uint256"}],name:"Deposited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"aggregator",type:"address"}],name:"SignatureAggregatorChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"totalStaked",type:"uint256"},{indexed:!1,name:"unstakeDelaySec",type:"uint256"}],name:"StakeLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"withdrawTime",type:"uint256"}],name:"StakeUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"withdrawAddress",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"StakeWithdrawn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"userOpHash",type:"bytes32"},{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"paymaster",type:"address"},{indexed:!1,name:"nonce",type:"uint256"},{indexed:!1,name:"success",type:"bool"},{indexed:!1,name:"actualGasCost",type:"uint256"},{indexed:!1,name:"actualGasUsed",type:"uint256"}],name:"UserOperationEvent",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"userOpHash",type:"bytes32"},{indexed:!0,name:"sender",type:"address"},{indexed:!1,name:"nonce",type:"uint256"},{indexed:!1,name:"revertReason",type:"bytes"}],name:"UserOperationRevertReason",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"withdrawAddress",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"Withdrawn",type:"event"},{inputs:[],name:"SIG_VALIDATION_FAILED",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"initCode",type:"bytes"},{name:"sender",type:"address"},{name:"paymasterAndData",type:"bytes"}],name:"_validateSenderAndPaymaster",outputs:[],stateMutability:"view",type:"function"},{inputs:[{name:"unstakeDelaySec",type:"uint32"}],name:"addStake",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{name:"account",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"address"}],name:"depositTo",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{name:"",type:"address"}],name:"deposits",outputs:[{name:"deposit",type:"uint112"},{name:"staked",type:"bool"},{name:"stake",type:"uint112"},{name:"unstakeDelaySec",type:"uint32"},{name:"withdrawTime",type:"uint48"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"address"}],name:"getDepositInfo",outputs:[{components:[{name:"deposit",type:"uint112"},{name:"staked",type:"bool"},{name:"stake",type:"uint112"},{name:"unstakeDelaySec",type:"uint32"},{name:"withdrawTime",type:"uint48"}],name:"info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{name:"sender",type:"address"},{name:"key",type:"uint192"}],name:"getNonce",outputs:[{name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"initCode",type:"bytes"}],name:"getSenderAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOp",type:"tuple"}],name:"getUserOpHash",outputs:[{name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{components:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOps",type:"tuple[]"},{name:"aggregator",type:"address"},{name:"signature",type:"bytes"}],name:"opsPerAggregator",type:"tuple[]"},{name:"beneficiary",type:"address"}],name:"handleAggregatedOps",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"ops",type:"tuple[]"},{name:"beneficiary",type:"address"}],name:"handleOps",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"key",type:"uint192"}],name:"incrementNonce",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"callData",type:"bytes"},{components:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"paymaster",type:"address"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"}],name:"mUserOp",type:"tuple"},{name:"userOpHash",type:"bytes32"},{name:"prefund",type:"uint256"},{name:"contextOffset",type:"uint256"},{name:"preOpGas",type:"uint256"}],name:"opInfo",type:"tuple"},{name:"context",type:"bytes"}],name:"innerHandleOp",outputs:[{name:"actualGasCost",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"",type:"address"},{name:"",type:"uint192"}],name:"nonceSequenceNumber",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"op",type:"tuple"},{name:"target",type:"address"},{name:"targetCallData",type:"bytes"}],name:"simulateHandleOp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOp",type:"tuple"}],name:"simulateValidation",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"withdrawAddress",type:"address"}],name:"withdrawStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"withdrawAddress",type:"address"},{name:"withdrawAmount",type:"uint256"}],name:"withdrawTo",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],Tc="0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789";function Ca(e,t={}){const{forHash:n}=t,{authorization:r,factory:i,factoryData:a}=e;return n&&(i==="0x7702"||i==="0x7702000000000000000000000000000000000000")?r?bt([r.address,a??"0x"]):"0x7702000000000000000000000000000000000000":i?bt([i,a??"0x"]):"0x"}const bi="0x22e325a297439656";function Ta(e,t={}){const{callGasLimit:n,callData:r,maxPriorityFeePerGas:i,maxFeePerGas:a,paymaster:s,paymasterData:o,paymasterPostOpGasLimit:c,paymasterSignature:u,paymasterVerificationGasLimit:p,sender:f,signature:l="0x",verificationGasLimit:d}=e,g=bt([Pe(J(d||0n),{size:16}),Pe(J(n||0n),{size:16})]),h=Ca(e,t),v=bt([Pe(J(i||0n),{size:16}),Pe(J(a||0n),{size:16})]),k=e.nonce??0n,P=s?bt([s,Pe(J(p||0n),{size:16}),Pe(J(c||0n),{size:16}),o||"0x",...u?t.forHash?[bi]:[u,Pe(J(oc(u)),{size:2}),bi]:[]]):"0x",x=e.preVerificationGas??0n;return{accountGasLimits:g,callData:r,initCode:h,gasFees:v,nonce:k,paymasterAndData:P,preVerificationGas:x,sender:f,signature:l}}const Bc={PackedUserOperation:[{type:"address",name:"sender"},{type:"uint256",name:"nonce"},{type:"bytes",name:"initCode"},{type:"bytes",name:"callData"},{type:"bytes32",name:"accountGasLimits"},{type:"uint256",name:"preVerificationGas"},{type:"bytes32",name:"gasFees"},{type:"bytes",name:"paymasterAndData"}]};function Lc(e){const{chainId:t,entryPointAddress:n,userOperation:r}=e,i=Ta(r,{forHash:!0});return{types:Bc,primaryType:"PackedUserOperation",domain:{name:"ERC4337",version:"1",chainId:t,verifyingContract:n},message:i}}function jc(e){const{chainId:t,entryPointAddress:n,entryPointVersion:r}=e,i=e.userOperation,{authorization:a,callData:s="0x",callGasLimit:o,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:p,paymasterAndData:f="0x",preVerificationGas:l,sender:d,verificationGasLimit:g}=i;if(r==="0.8"||r==="0.9")return cc(Lc({chainId:t,entryPointAddress:n,userOperation:i}));const h=(()=>{if(r==="0.6"){const v=i.initCode?.slice(0,42),k=i.initCode?.slice(42),P=Ca({authorization:a,factory:v,factoryData:k},{forHash:!0});return Dn([{type:"address"},{type:"uint256"},{type:"bytes32"},{type:"bytes32"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"bytes32"}],[d,p,He(P),He(s),o,g,l,c,u,He(f)])}if(r==="0.7"){const v=Ta(i,{forHash:!0});return Dn([{type:"address"},{type:"uint256"},{type:"bytes32"},{type:"bytes32"},{type:"bytes32"},{type:"uint256"},{type:"bytes32"},{type:"bytes32"}],[v.sender,v.nonce,He(v.initCode),He(v.callData),v.accountGasLimits,v.preVerificationGas,v.gasFees,He(v.paymasterAndData)])}throw new Error(`entryPointVersion "${r}" not supported.`)})();return He(Dn([{type:"bytes32"},{type:"address"},{type:"uint256"}],[He(h),n,BigInt(t)]))}async function Mc(e){const{extend:t,nonceKeyManager:n=ic({source:{get(){return Date.now()},set(){}}}),...r}=e;let i=!1;const a=await e.getAddress();return{...t,...r,address:a,async getFactoryArgs(){return"isDeployed"in this&&await this.isDeployed()?{factory:void 0,factoryData:void 0}:e.getFactoryArgs()},async getNonce(s){const o=s?.key??BigInt(await n.consume({address:a,chainId:e.client.chain.id,client:e.client}));return e.getNonce?await e.getNonce({...s,key:o}):await nr(e.client,{abi:uc(["function getNonce(address, uint192) pure returns (uint256)"]),address:e.entryPoint.address,functionName:"getNonce",args:[a,o]})},async isDeployed(){return i?!0:(i=!!await Re(e.client,Aa,"getCode")({address:a}),i)},...e.sign?{async sign(s){const[{factory:o,factoryData:c},u]=await Promise.all([this.getFactoryArgs(),e.sign(s)]);return o&&c?Mn({address:o,data:c,signature:u}):u}}:{},async signMessage(s){const[{factory:o,factoryData:c},u]=await Promise.all([this.getFactoryArgs(),e.signMessage(s)]);return o&&c&&o!=="0x7702"?Mn({address:o,data:c,signature:u}):u},async signTypedData(s){const[{factory:o,factoryData:c},u]=await Promise.all([this.getFactoryArgs(),e.signTypedData(s)]);return o&&c&&o!=="0x7702"?Mn({address:o,data:c,signature:u}):u},type:"smart"}}class ir extends N{constructor({cause:t}){super("Smart Account is not deployed.",{cause:t,metaMessages:["This could arise when:","- No `factory`/`factoryData` or `initCode` properties are provided for Smart Account deployment.","- An incorrect `sender` address is provided."],name:"AccountNotDeployedError"})}}Object.defineProperty(ir,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa20/});class kt extends N{constructor({cause:t,data:n,message:r}={}){const i=r?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${i?`with reason: ${i}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=n}}Object.defineProperty(kt,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32521});Object.defineProperty(kt,"message",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class ar extends N{constructor({cause:t}){super("Failed to send funds to beneficiary.",{cause:t,name:"FailedToSendToBeneficiaryError"})}}Object.defineProperty(ar,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa91/});class sr extends N{constructor({cause:t}){super("Gas value overflowed.",{cause:t,metaMessages:["This could arise when:","- one of the gas values exceeded 2**120 (uint120)"].filter(Boolean),name:"GasValuesOverflowError"})}}Object.defineProperty(sr,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa94/});class or extends N{constructor({cause:t}){super("The `handleOps` function was called by the Bundler with a gas limit too low.",{cause:t,name:"HandleOpsOutOfGasError"})}}Object.defineProperty(or,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa95/});class cr extends N{constructor({cause:t,factory:n,factoryData:r,initCode:i}){super("Failed to simulate deployment for Smart Account.",{cause:t,metaMessages:["This could arise when:","- Invalid `factory`/`factoryData` or `initCode` properties are present","- Smart Account deployment execution ran out of gas (low `verificationGasLimit` value)",`- Smart Account deployment execution reverted with an error
|
|
1
|
+
import{importShared as ye}from"./__federation_fn_import-Cw4EhxlG.js";import{B as tr,_ as q,h as mi,y as nc}from"./hooks.module-Dz_XB4AG.js";import{E as rc}from"./index-CdrMQoR6.js";import{a as ic,s as Mn,p as ac,c as sc}from"./createClient-DI-yyeB8.js";import{a as bt,cm as Pe,ak as J,aR as oc,bu as cc,e as Dn,ay as He,al as nr,cW as uc,y as Re,aj as Aa,B as N,fN as dc,fL as yi,d as lc,eP as fc,aw as pc,av as hc,ag as ln,w as $r,ao as mc,cD as yc,x as Gr,z as _a,cw as gc,aS as bc,bq as wc,s as vc,bv as xc,bw as Ec,bD as Ia}from"./uid-CtW3Zgnp.js";import{c as Sc,g as kc,d as Ac,s as _c}from"./index-nibyPLVP.js";import{a as Ic}from"./_commonjsHelpers-C4iS2aBk.js";function Oa(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var a;const s=c=>c===null?null:JSON.parse(c,void 0),o=(a=n.getItem(i))!=null?a:null;return o instanceof Promise?o.then(s):s(o)},setItem:(i,a)=>n.setItem(i,JSON.stringify(a,void 0)),removeItem:i=>n.removeItem(i)}}const rr=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return rr(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return rr(r)(n)}}}},Oc=(e,t)=>(n,r,i)=>{let a={storage:Oa(()=>localStorage),partialize:h=>h,version:0,merge:(h,v)=>({...v,...h}),...t},s=!1;const o=new Set,c=new Set;let u=a.storage;if(!u)return e((...h)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...h)},r,i);const p=()=>{const h=a.partialize({...r()});return u.setItem(a.name,{state:h,version:a.version})},f=i.setState;i.setState=(h,v)=>{f(h,v),p()};const l=e((...h)=>{n(...h),p()},r,i);i.getInitialState=()=>l;let d;const g=()=>{var h,v;if(!u)return;s=!1,o.forEach(P=>{var x;return P((x=r())!=null?x:l)});const k=((v=a.onRehydrateStorage)==null?void 0:v.call(a,(h=r())!=null?h:l))||void 0;return rr(u.getItem.bind(u))(a.name).then(P=>{if(P)if(typeof P.version=="number"&&P.version!==a.version){if(a.migrate){const x=a.migrate(P.state,P.version);return x instanceof Promise?x.then(I=>[!0,I]):[!0,x]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,P.state];return[!1,void 0]}).then(P=>{var x;const[I,D]=P;if(d=a.merge(D,(x=r())!=null?x:l),n(d,!0),I)return p()}).then(()=>{k?.(d,void 0),d=r(),s=!0,c.forEach(P=>P(d))}).catch(P=>{k?.(void 0,P)})};return i.persist={setOptions:h=>{a={...a,...h},h.storage&&(u=h.storage)},clearStorage:()=>{u?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>g(),hasHydrated:()=>s,onHydrate:h=>(o.add(h),()=>{o.delete(h)}),onFinishHydration:h=>(c.add(h),()=>{c.delete(h)})},a.skipHydration||g(),d||l},Pc=Oc,gi=e=>{let t;const n=new Set,r=(u,p)=>{const f=typeof u=="function"?u(t):u;if(!Object.is(f,t)){const l=t;t=p??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(d=>d(t,l))}},i=()=>t,o={setState:r,getState:i,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u))},c=t=e(r,i,o);return o},Fr=e=>e?gi(e):gi;function Pa(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Pa(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Dt(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Pa(e))&&(r&&(r+=" "),r+=t);return r}const Cc=[{inputs:[{name:"preOpGas",type:"uint256"},{name:"paid",type:"uint256"},{name:"validAfter",type:"uint48"},{name:"validUntil",type:"uint48"},{name:"targetSuccess",type:"bool"},{name:"targetResult",type:"bytes"}],name:"ExecutionResult",type:"error"},{inputs:[{name:"opIndex",type:"uint256"},{name:"reason",type:"string"}],name:"FailedOp",type:"error"},{inputs:[{name:"sender",type:"address"}],name:"SenderAddressResult",type:"error"},{inputs:[{name:"aggregator",type:"address"}],name:"SignatureValidationFailed",type:"error"},{inputs:[{components:[{name:"preOpGas",type:"uint256"},{name:"prefund",type:"uint256"},{name:"sigFailed",type:"bool"},{name:"validAfter",type:"uint48"},{name:"validUntil",type:"uint48"},{name:"paymasterContext",type:"bytes"}],name:"returnInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"senderInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"factoryInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"paymasterInfo",type:"tuple"}],name:"ValidationResult",type:"error"},{inputs:[{components:[{name:"preOpGas",type:"uint256"},{name:"prefund",type:"uint256"},{name:"sigFailed",type:"bool"},{name:"validAfter",type:"uint48"},{name:"validUntil",type:"uint48"},{name:"paymasterContext",type:"bytes"}],name:"returnInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"senderInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"factoryInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"paymasterInfo",type:"tuple"},{components:[{name:"aggregator",type:"address"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"stakeInfo",type:"tuple"}],name:"aggregatorInfo",type:"tuple"}],name:"ValidationResultWithAggregation",type:"error"},{anonymous:!1,inputs:[{indexed:!0,name:"userOpHash",type:"bytes32"},{indexed:!0,name:"sender",type:"address"},{indexed:!1,name:"factory",type:"address"},{indexed:!1,name:"paymaster",type:"address"}],name:"AccountDeployed",type:"event"},{anonymous:!1,inputs:[],name:"BeforeExecution",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"totalDeposit",type:"uint256"}],name:"Deposited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"aggregator",type:"address"}],name:"SignatureAggregatorChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"totalStaked",type:"uint256"},{indexed:!1,name:"unstakeDelaySec",type:"uint256"}],name:"StakeLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"withdrawTime",type:"uint256"}],name:"StakeUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"withdrawAddress",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"StakeWithdrawn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"userOpHash",type:"bytes32"},{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"paymaster",type:"address"},{indexed:!1,name:"nonce",type:"uint256"},{indexed:!1,name:"success",type:"bool"},{indexed:!1,name:"actualGasCost",type:"uint256"},{indexed:!1,name:"actualGasUsed",type:"uint256"}],name:"UserOperationEvent",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"userOpHash",type:"bytes32"},{indexed:!0,name:"sender",type:"address"},{indexed:!1,name:"nonce",type:"uint256"},{indexed:!1,name:"revertReason",type:"bytes"}],name:"UserOperationRevertReason",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"withdrawAddress",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"Withdrawn",type:"event"},{inputs:[],name:"SIG_VALIDATION_FAILED",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"initCode",type:"bytes"},{name:"sender",type:"address"},{name:"paymasterAndData",type:"bytes"}],name:"_validateSenderAndPaymaster",outputs:[],stateMutability:"view",type:"function"},{inputs:[{name:"unstakeDelaySec",type:"uint32"}],name:"addStake",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{name:"account",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"address"}],name:"depositTo",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{name:"",type:"address"}],name:"deposits",outputs:[{name:"deposit",type:"uint112"},{name:"staked",type:"bool"},{name:"stake",type:"uint112"},{name:"unstakeDelaySec",type:"uint32"},{name:"withdrawTime",type:"uint48"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"address"}],name:"getDepositInfo",outputs:[{components:[{name:"deposit",type:"uint112"},{name:"staked",type:"bool"},{name:"stake",type:"uint112"},{name:"unstakeDelaySec",type:"uint32"},{name:"withdrawTime",type:"uint48"}],name:"info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{name:"sender",type:"address"},{name:"key",type:"uint192"}],name:"getNonce",outputs:[{name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"initCode",type:"bytes"}],name:"getSenderAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOp",type:"tuple"}],name:"getUserOpHash",outputs:[{name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{components:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOps",type:"tuple[]"},{name:"aggregator",type:"address"},{name:"signature",type:"bytes"}],name:"opsPerAggregator",type:"tuple[]"},{name:"beneficiary",type:"address"}],name:"handleAggregatedOps",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"ops",type:"tuple[]"},{name:"beneficiary",type:"address"}],name:"handleOps",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"key",type:"uint192"}],name:"incrementNonce",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"callData",type:"bytes"},{components:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"paymaster",type:"address"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"}],name:"mUserOp",type:"tuple"},{name:"userOpHash",type:"bytes32"},{name:"prefund",type:"uint256"},{name:"contextOffset",type:"uint256"},{name:"preOpGas",type:"uint256"}],name:"opInfo",type:"tuple"},{name:"context",type:"bytes"}],name:"innerHandleOp",outputs:[{name:"actualGasCost",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"",type:"address"},{name:"",type:"uint192"}],name:"nonceSequenceNumber",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"op",type:"tuple"},{name:"target",type:"address"},{name:"targetCallData",type:"bytes"}],name:"simulateHandleOp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOp",type:"tuple"}],name:"simulateValidation",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"withdrawAddress",type:"address"}],name:"withdrawStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"withdrawAddress",type:"address"},{name:"withdrawAmount",type:"uint256"}],name:"withdrawTo",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],Tc="0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789";function Ca(e,t={}){const{forHash:n}=t,{authorization:r,factory:i,factoryData:a}=e;return n&&(i==="0x7702"||i==="0x7702000000000000000000000000000000000000")?r?bt([r.address,a??"0x"]):"0x7702000000000000000000000000000000000000":i?bt([i,a??"0x"]):"0x"}const bi="0x22e325a297439656";function Ta(e,t={}){const{callGasLimit:n,callData:r,maxPriorityFeePerGas:i,maxFeePerGas:a,paymaster:s,paymasterData:o,paymasterPostOpGasLimit:c,paymasterSignature:u,paymasterVerificationGasLimit:p,sender:f,signature:l="0x",verificationGasLimit:d}=e,g=bt([Pe(J(d||0n),{size:16}),Pe(J(n||0n),{size:16})]),h=Ca(e,t),v=bt([Pe(J(i||0n),{size:16}),Pe(J(a||0n),{size:16})]),k=e.nonce??0n,P=s?bt([s,Pe(J(p||0n),{size:16}),Pe(J(c||0n),{size:16}),o||"0x",...u?t.forHash?[bi]:[u,Pe(J(oc(u)),{size:2}),bi]:[]]):"0x",x=e.preVerificationGas??0n;return{accountGasLimits:g,callData:r,initCode:h,gasFees:v,nonce:k,paymasterAndData:P,preVerificationGas:x,sender:f,signature:l}}const Bc={PackedUserOperation:[{type:"address",name:"sender"},{type:"uint256",name:"nonce"},{type:"bytes",name:"initCode"},{type:"bytes",name:"callData"},{type:"bytes32",name:"accountGasLimits"},{type:"uint256",name:"preVerificationGas"},{type:"bytes32",name:"gasFees"},{type:"bytes",name:"paymasterAndData"}]};function Lc(e){const{chainId:t,entryPointAddress:n,userOperation:r}=e,i=Ta(r,{forHash:!0});return{types:Bc,primaryType:"PackedUserOperation",domain:{name:"ERC4337",version:"1",chainId:t,verifyingContract:n},message:i}}function jc(e){const{chainId:t,entryPointAddress:n,entryPointVersion:r}=e,i=e.userOperation,{authorization:a,callData:s="0x",callGasLimit:o,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:p,paymasterAndData:f="0x",preVerificationGas:l,sender:d,verificationGasLimit:g}=i;if(r==="0.8"||r==="0.9")return cc(Lc({chainId:t,entryPointAddress:n,userOperation:i}));const h=(()=>{if(r==="0.6"){const v=i.initCode?.slice(0,42),k=i.initCode?.slice(42),P=Ca({authorization:a,factory:v,factoryData:k},{forHash:!0});return Dn([{type:"address"},{type:"uint256"},{type:"bytes32"},{type:"bytes32"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"bytes32"}],[d,p,He(P),He(s),o,g,l,c,u,He(f)])}if(r==="0.7"){const v=Ta(i,{forHash:!0});return Dn([{type:"address"},{type:"uint256"},{type:"bytes32"},{type:"bytes32"},{type:"bytes32"},{type:"uint256"},{type:"bytes32"},{type:"bytes32"}],[v.sender,v.nonce,He(v.initCode),He(v.callData),v.accountGasLimits,v.preVerificationGas,v.gasFees,He(v.paymasterAndData)])}throw new Error(`entryPointVersion "${r}" not supported.`)})();return He(Dn([{type:"bytes32"},{type:"address"},{type:"uint256"}],[He(h),n,BigInt(t)]))}async function Mc(e){const{extend:t,nonceKeyManager:n=ic({source:{get(){return Date.now()},set(){}}}),...r}=e;let i=!1;const a=await e.getAddress();return{...t,...r,address:a,async getFactoryArgs(){return"isDeployed"in this&&await this.isDeployed()?{factory:void 0,factoryData:void 0}:e.getFactoryArgs()},async getNonce(s){const o=s?.key??BigInt(await n.consume({address:a,chainId:e.client.chain.id,client:e.client}));return e.getNonce?await e.getNonce({...s,key:o}):await nr(e.client,{abi:uc(["function getNonce(address, uint192) pure returns (uint256)"]),address:e.entryPoint.address,functionName:"getNonce",args:[a,o]})},async isDeployed(){return i?!0:(i=!!await Re(e.client,Aa,"getCode")({address:a}),i)},...e.sign?{async sign(s){const[{factory:o,factoryData:c},u]=await Promise.all([this.getFactoryArgs(),e.sign(s)]);return o&&c?Mn({address:o,data:c,signature:u}):u}}:{},async signMessage(s){const[{factory:o,factoryData:c},u]=await Promise.all([this.getFactoryArgs(),e.signMessage(s)]);return o&&c&&o!=="0x7702"?Mn({address:o,data:c,signature:u}):u},async signTypedData(s){const[{factory:o,factoryData:c},u]=await Promise.all([this.getFactoryArgs(),e.signTypedData(s)]);return o&&c&&o!=="0x7702"?Mn({address:o,data:c,signature:u}):u},type:"smart"}}class ir extends N{constructor({cause:t}){super("Smart Account is not deployed.",{cause:t,metaMessages:["This could arise when:","- No `factory`/`factoryData` or `initCode` properties are provided for Smart Account deployment.","- An incorrect `sender` address is provided."],name:"AccountNotDeployedError"})}}Object.defineProperty(ir,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa20/});class kt extends N{constructor({cause:t,data:n,message:r}={}){const i=r?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${i?`with reason: ${i}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=n}}Object.defineProperty(kt,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32521});Object.defineProperty(kt,"message",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class ar extends N{constructor({cause:t}){super("Failed to send funds to beneficiary.",{cause:t,name:"FailedToSendToBeneficiaryError"})}}Object.defineProperty(ar,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa91/});class sr extends N{constructor({cause:t}){super("Gas value overflowed.",{cause:t,metaMessages:["This could arise when:","- one of the gas values exceeded 2**120 (uint120)"].filter(Boolean),name:"GasValuesOverflowError"})}}Object.defineProperty(sr,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa94/});class or extends N{constructor({cause:t}){super("The `handleOps` function was called by the Bundler with a gas limit too low.",{cause:t,name:"HandleOpsOutOfGasError"})}}Object.defineProperty(or,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa95/});class cr extends N{constructor({cause:t,factory:n,factoryData:r,initCode:i}){super("Failed to simulate deployment for Smart Account.",{cause:t,metaMessages:["This could arise when:","- Invalid `factory`/`factoryData` or `initCode` properties are present","- Smart Account deployment execution ran out of gas (low `verificationGasLimit` value)",`- Smart Account deployment execution reverted with an error
|
|
2
2
|
`,n&&`factory: ${n}`,r&&`factoryData: ${r}`,i&&`initCode: ${i}`].filter(Boolean),name:"InitCodeFailedError"})}}Object.defineProperty(cr,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa13/});class ur extends N{constructor({cause:t,factory:n,factoryData:r,initCode:i}){super("Smart Account initialization implementation did not create an account.",{cause:t,metaMessages:["This could arise when:","- `factory`/`factoryData` or `initCode` properties are invalid",`- Smart Account initialization implementation is incorrect
|
|
3
3
|
`,n&&`factory: ${n}`,r&&`factoryData: ${r}`,i&&`initCode: ${i}`].filter(Boolean),name:"InitCodeMustCreateSenderError"})}}Object.defineProperty(ur,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa15/});class dr extends N{constructor({cause:t,factory:n,factoryData:r,initCode:i,sender:a}){super("Smart Account initialization implementation does not return the expected sender.",{cause:t,metaMessages:["This could arise when:",`Smart Account initialization implementation does not return a sender address
|
|
4
4
|
`,n&&`factory: ${n}`,r&&`factoryData: ${r}`,i&&`initCode: ${i}`,a&&`sender: ${a}`].filter(Boolean),name:"InitCodeMustReturnSenderError"})}}Object.defineProperty(dr,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa14/});class lr extends N{constructor({cause:t}){super("Smart Account does not have sufficient funds to execute the User Operation.",{cause:t,metaMessages:["This could arise when:","- the Smart Account does not have sufficient funds to cover the required prefund, or","- a Paymaster was not provided"].filter(Boolean),name:"InsufficientPrefundError"})}}Object.defineProperty(lr,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa21/});class fr extends N{constructor({cause:t}){super("Bundler attempted to call an invalid function on the EntryPoint.",{cause:t,name:"InternalCallOnlyError"})}}Object.defineProperty(fr,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa92/});class pr extends N{constructor({cause:t}){super("Bundler used an invalid aggregator for handling aggregated User Operations.",{cause:t,name:"InvalidAggregatorError"})}}Object.defineProperty(pr,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa96/});class hr extends N{constructor({cause:t,nonce:n}){super("Invalid Smart Account nonce used for User Operation.",{cause:t,metaMessages:[n&&`nonce: ${n}`].filter(Boolean),name:"InvalidAccountNonceError"})}}Object.defineProperty(hr,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa25/});class mr extends N{constructor({cause:t}){super("Bundler has not set a beneficiary address.",{cause:t,name:"InvalidBeneficiaryError"})}}Object.defineProperty(mr,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa90/});class fn extends N{constructor({cause:t}){super("Invalid fields set on User Operation.",{cause:t,name:"InvalidFieldsError"})}}Object.defineProperty(fn,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class yr extends N{constructor({cause:t,paymasterAndData:n}){super("Paymaster properties provided are invalid.",{cause:t,metaMessages:["This could arise when:","- the `paymasterAndData` property is of an incorrect length\n",n&&`paymasterAndData: ${n}`].filter(Boolean),name:"InvalidPaymasterAndDataError"})}}Object.defineProperty(yr,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa93/});class it extends N{constructor({cause:t}){super("Paymaster deposit for the User Operation is too low.",{cause:t,metaMessages:["This could arise when:","- the Paymaster has deposited less than the expected amount via the `deposit` function"].filter(Boolean),name:"PaymasterDepositTooLowError"})}}Object.defineProperty(it,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32508});Object.defineProperty(it,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa31/});class gr extends N{constructor({cause:t}){super("The `validatePaymasterUserOp` function on the Paymaster reverted.",{cause:t,name:"PaymasterFunctionRevertedError"})}}Object.defineProperty(gr,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa33/});class br extends N{constructor({cause:t}){super("The Paymaster contract has not been deployed.",{cause:t,name:"PaymasterNotDeployedError"})}}Object.defineProperty(br,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa30/});class pn extends N{constructor({cause:t}){super("UserOperation rejected because paymaster (or signature aggregator) is throttled/banned.",{cause:t,name:"PaymasterRateLimitError"})}}Object.defineProperty(pn,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32504});class hn extends N{constructor({cause:t}){super("UserOperation rejected because paymaster (or signature aggregator) is throttled/banned.",{cause:t,name:"PaymasterStakeTooLowError"})}}Object.defineProperty(hn,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32505});class wr extends N{constructor({cause:t}){super("Paymaster `postOp` function reverted.",{cause:t,name:"PaymasterPostOpFunctionRevertedError"})}}Object.defineProperty(wr,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa50/});class vr extends N{constructor({cause:t,factory:n,factoryData:r,initCode:i}){super("Smart Account has already been deployed.",{cause:t,metaMessages:["Remove the following properties and try again:",n&&"`factory`",r&&"`factoryData`",i&&"`initCode`"].filter(Boolean),name:"SenderAlreadyConstructedError"})}}Object.defineProperty(vr,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa10/});class mn extends N{constructor({cause:t}){super("UserOperation rejected because account signature check failed (or paymaster signature, if the paymaster uses its data as signature).",{cause:t,name:"SignatureCheckFailedError"})}}Object.defineProperty(mn,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32507});class xr extends N{constructor({cause:t}){super("The `validateUserOp` function on the Smart Account reverted.",{cause:t,name:"SmartAccountFunctionRevertedError"})}}Object.defineProperty(xr,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa23/});class yn extends N{constructor({cause:t}){super("UserOperation rejected because account specified unsupported signature aggregator.",{cause:t,name:"UnsupportedSignatureAggregatorError"})}}Object.defineProperty(yn,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32506});class Er extends N{constructor({cause:t}){super("User Operation expired.",{cause:t,metaMessages:["This could arise when:","- the `validAfter` or `validUntil` values returned from `validateUserOp` on the Smart Account are not satisfied"].filter(Boolean),name:"UserOperationExpiredError"})}}Object.defineProperty(Er,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa22/});class Sr extends N{constructor({cause:t}){super("Paymaster for User Operation expired.",{cause:t,metaMessages:["This could arise when:","- the `validAfter` or `validUntil` values returned from `validatePaymasterUserOp` on the Paymaster are not satisfied"].filter(Boolean),name:"UserOperationPaymasterExpiredError"})}}Object.defineProperty(Sr,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa32/});class kr extends N{constructor({cause:t}){super("Signature provided for the User Operation is invalid.",{cause:t,metaMessages:["This could arise when:","- the `signature` for the User Operation is incorrectly computed, and unable to be verified by the Smart Account"].filter(Boolean),name:"UserOperationSignatureError"})}}Object.defineProperty(kr,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa24/});class Ar extends N{constructor({cause:t}){super("Signature provided for the User Operation is invalid.",{cause:t,metaMessages:["This could arise when:","- the `signature` for the User Operation is incorrectly computed, and unable to be verified by the Paymaster"].filter(Boolean),name:"UserOperationPaymasterSignatureError"})}}Object.defineProperty(Ar,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa34/});class gn extends N{constructor({cause:t}){super("User Operation rejected by EntryPoint's `simulateValidation` during account creation or validation.",{cause:t,name:"UserOperationRejectedByEntryPointError"})}}Object.defineProperty(gn,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32500});class bn extends N{constructor({cause:t}){super("User Operation rejected by Paymaster's `validatePaymasterUserOp`.",{cause:t,name:"UserOperationRejectedByPaymasterError"})}}Object.defineProperty(bn,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32501});class wn extends N{constructor({cause:t}){super("User Operation rejected with op code validation error.",{cause:t,name:"UserOperationRejectedByOpCodeError"})}}Object.defineProperty(wn,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32502});class vn extends N{constructor({cause:t}){super("UserOperation out of time-range: either wallet or paymaster returned a time-range, and it is already expired (or will expire soon).",{cause:t,name:"UserOperationOutOfTimeRangeError"})}}Object.defineProperty(vn,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32503});class Dc extends N{constructor({cause:t}){super(`An error occurred while executing user operation: ${t?.shortMessage}`,{cause:t,name:"UnknownBundlerError"})}}class _r extends N{constructor({cause:t}){super("User Operation verification gas limit exceeded.",{cause:t,metaMessages:["This could arise when:","- the gas used for verification exceeded the `verificationGasLimit`"].filter(Boolean),name:"VerificationGasLimitExceededError"})}}Object.defineProperty(_r,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa40/});class Ir extends N{constructor({cause:t}){super("User Operation verification gas limit is too low.",{cause:t,metaMessages:["This could arise when:","- the `verificationGasLimit` is too low to verify the User Operation"].filter(Boolean),name:"VerificationGasLimitTooLowError"})}}Object.defineProperty(Ir,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa41/});class Nc extends N{constructor(t,{callData:n,callGasLimit:r,docsPath:i,factory:a,factoryData:s,initCode:o,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:p,paymaster:f,paymasterAndData:l,paymasterData:d,paymasterPostOpGasLimit:g,paymasterVerificationGasLimit:h,preVerificationGas:v,sender:k,signature:P,verificationGasLimit:x}){const I=dc({callData:n,callGasLimit:r,factory:a,factoryData:s,initCode:o,maxFeePerGas:typeof c<"u"&&`${yi(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${yi(u)} gwei`,nonce:p,paymaster:f,paymasterAndData:l,paymasterData:d,paymasterPostOpGasLimit:g,paymasterVerificationGasLimit:h,preVerificationGas:v,sender:k,signature:P,verificationGasLimit:x});super(t.shortMessage,{cause:t,docsPath:i,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",I].filter(Boolean),name:"UserOperationExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class Rc extends N{constructor({hash:t}){super(`User Operation receipt with hash "${t}" could not be found. The User Operation may not have been processed yet.`,{name:"UserOperationReceiptNotFoundError"})}}class Uc extends N{constructor({hash:t}){super(`User Operation with hash "${t}" could not be found.`,{name:"UserOperationNotFoundError"})}}class wi extends N{constructor({hash:t}){super(`Timed out while waiting for User Operation with hash "${t}" to be confirmed.`,{name:"WaitForUserOperationReceiptTimeoutError"})}}const Hc=[kt,fn,it,pn,hn,mn,yn,vn,gn,bn,wn];function $c(e,t){const n=(e.details||"").toLowerCase();if(ir.message.test(n))return new ir({cause:e});if(ar.message.test(n))return new ar({cause:e});if(sr.message.test(n))return new sr({cause:e});if(or.message.test(n))return new or({cause:e});if(cr.message.test(n))return new cr({cause:e,factory:t.factory,factoryData:t.factoryData,initCode:t.initCode});if(ur.message.test(n))return new ur({cause:e,factory:t.factory,factoryData:t.factoryData,initCode:t.initCode});if(dr.message.test(n))return new dr({cause:e,factory:t.factory,factoryData:t.factoryData,initCode:t.initCode,sender:t.sender});if(lr.message.test(n))return new lr({cause:e});if(fr.message.test(n))return new fr({cause:e});if(hr.message.test(n))return new hr({cause:e,nonce:t.nonce});if(pr.message.test(n))return new pr({cause:e});if(mr.message.test(n))return new mr({cause:e});if(yr.message.test(n))return new yr({cause:e});if(it.message.test(n))return new it({cause:e});if(gr.message.test(n))return new gr({cause:e});if(br.message.test(n))return new br({cause:e});if(wr.message.test(n))return new wr({cause:e});if(xr.message.test(n))return new xr({cause:e});if(vr.message.test(n))return new vr({cause:e,factory:t.factory,factoryData:t.factoryData,initCode:t.initCode});if(Er.message.test(n))return new Er({cause:e});if(Sr.message.test(n))return new Sr({cause:e});if(Ar.message.test(n))return new Ar({cause:e});if(kr.message.test(n))return new kr({cause:e});if(_r.message.test(n))return new _r({cause:e});if(Ir.message.test(n))return new Ir({cause:e});const r=e.walk(i=>Hc.some(a=>a.code===i.code));if(r){if(r.code===kt.code)return new kt({cause:e,data:r.data,message:r.details});if(r.code===fn.code)return new fn({cause:e});if(r.code===it.code)return new it({cause:e});if(r.code===pn.code)return new pn({cause:e});if(r.code===hn.code)return new hn({cause:e});if(r.code===mn.code)return new mn({cause:e});if(r.code===yn.code)return new yn({cause:e});if(r.code===vn.code)return new vn({cause:e});if(r.code===gn.code)return new gn({cause:e});if(r.code===bn.code)return new bn({cause:e});if(r.code===wn.code)return new wn({cause:e})}return new Dc({cause:e})}function Ba(e,{calls:t,docsPath:n,...r}){const i=(()=>{const a=$c(e,r);if(t&&a instanceof kt){const s=Gc(a),o=t?.filter(c=>c.abi);if(s&&o.length>0)return Fc({calls:o,revertData:s})}return a})();return new Nc(i,{docsPath:n,...r})}function Gc(e){let t;return e.walk(n=>{const r=n;if(typeof r.data=="string"||typeof r.data?.revertData=="string"||!(r instanceof N)&&typeof r.message=="string"){const i=(r.data?.revertData||r.data||r.message).match?.(/(0x[A-Za-z0-9]*)/);if(i)return t=i[1],!0}return!1}),t}function Fc(e){const{calls:t,revertData:n}=e,{abi:r,functionName:i,args:a,to:s}=(()=>{const c=t?.filter(p=>!!p.abi);if(c.length===1)return c[0];const u=c.filter(p=>{try{return!!lc({abi:p.abi,data:n})}catch{return!1}});return u.length===1?u[0]:{abi:[],functionName:c.reduce((p,f)=>`${p?`${p} | `:""}${f.functionName}`,""),args:void 0,to:void 0}})(),o=n==="0x"?new fc({functionName:i}):new pc({abi:r,data:n,functionName:i});return new hc(o,{abi:r,args:a,contractAddress:s,functionName:i})}function zc(e){const t={};return e.callGasLimit&&(t.callGasLimit=BigInt(e.callGasLimit)),e.preVerificationGas&&(t.preVerificationGas=BigInt(e.preVerificationGas)),e.verificationGasLimit&&(t.verificationGasLimit=BigInt(e.verificationGasLimit)),e.paymasterPostOpGasLimit&&(t.paymasterPostOpGasLimit=BigInt(e.paymasterPostOpGasLimit)),e.paymasterVerificationGasLimit&&(t.paymasterVerificationGasLimit=BigInt(e.paymasterVerificationGasLimit)),t}function In(e){const t={};return typeof e.callData<"u"&&(t.callData=e.callData),typeof e.callGasLimit<"u"&&(t.callGasLimit=J(e.callGasLimit)),typeof e.factory<"u"&&(t.factory=e.factory),typeof e.factoryData<"u"&&(t.factoryData=e.factoryData),typeof e.initCode<"u"&&(t.initCode=e.initCode),typeof e.maxFeePerGas<"u"&&(t.maxFeePerGas=J(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(t.maxPriorityFeePerGas=J(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(t.nonce=J(e.nonce)),typeof e.paymaster<"u"&&(t.paymaster=e.paymaster),typeof e.paymasterAndData<"u"&&(t.paymasterAndData=e.paymasterAndData||"0x"),typeof e.paymasterData<"u"&&(t.paymasterData=e.paymasterData),typeof e.paymasterPostOpGasLimit<"u"&&(t.paymasterPostOpGasLimit=J(e.paymasterPostOpGasLimit)),typeof e.paymasterSignature<"u"&&(t.paymasterSignature=e.paymasterSignature),typeof e.paymasterVerificationGasLimit<"u"&&(t.paymasterVerificationGasLimit=J(e.paymasterVerificationGasLimit)),typeof e.preVerificationGas<"u"&&(t.preVerificationGas=J(e.preVerificationGas)),typeof e.sender<"u"&&(t.sender=e.sender),typeof e.signature<"u"&&(t.signature=e.signature),typeof e.verificationGasLimit<"u"&&(t.verificationGasLimit=J(e.verificationGasLimit)),typeof e.authorization<"u"&&(t.eip7702Auth=qc(e.authorization)),t}function qc(e){return{address:e.address,chainId:J(e.chainId),nonce:J(e.nonce),r:e.r?J(BigInt(e.r),{size:32}):Pe("0x",{size:32}),s:e.s?J(BigInt(e.s),{size:32}):Pe("0x",{size:32}),yParity:e.yParity?J(e.yParity,{size:1}):Pe("0x",{size:32})}}async function Wc(e,t){const{chainId:n,entryPointAddress:r,context:i,...a}=t,s=In(a),{paymasterPostOpGasLimit:o,paymasterVerificationGasLimit:c,...u}=await e.request({method:"pm_getPaymasterData",params:[{...s,callGasLimit:s.callGasLimit??"0x0",verificationGasLimit:s.verificationGasLimit??"0x0",preVerificationGas:s.preVerificationGas??"0x0"},r,J(n),i]});return{...u,...o&&{paymasterPostOpGasLimit:ln(o)},...c&&{paymasterVerificationGasLimit:ln(c)}}}async function Vc(e,t){const{chainId:n,entryPointAddress:r,context:i,...a}=t,s=In(a),{paymasterPostOpGasLimit:o,paymasterVerificationGasLimit:c,...u}=await e.request({method:"pm_getPaymasterStubData",params:[{...s,callGasLimit:s.callGasLimit??"0x0",verificationGasLimit:s.verificationGasLimit??"0x0",preVerificationGas:s.preVerificationGas??"0x0"},r,J(n),i]});return{...u,...o&&{paymasterPostOpGasLimit:ln(o)},...c&&{paymasterVerificationGasLimit:ln(c)}}}const Kc=["factory","fees","gas","paymaster","nonce","signature","authorization"];async function zr(e,t){const n=t,{account:r=e.account,parameters:i=Kc,stateOverride:a}=n;if(!r)throw new $r;const s=Gr(r),o=e,c=n.paymaster??o?.paymaster,u=typeof c=="string"?c:void 0,{getPaymasterStubData:p,getPaymasterData:f}=(()=>{if(c===!0)return{getPaymasterStubData:T=>Re(o,Vc,"getPaymasterStubData")(T),getPaymasterData:T=>Re(o,Wc,"getPaymasterData")(T)};if(typeof c=="object"){const{getPaymasterStubData:T,getPaymasterData:G}=c;return{getPaymasterStubData:G&&T?T:G,getPaymasterData:G&&T?G:void 0}}return{getPaymasterStubData:void 0,getPaymasterData:void 0}})(),l=n.paymasterContext?n.paymasterContext:o?.paymasterContext;let d={...n,paymaster:u,sender:s.address};const[g,h,v,k,P]=await Promise.all([(async()=>n.calls?s.encodeCalls(n.calls.map(T=>{const G=T;return G.abi?{data:mc(G),to:G.to,value:G.value}:G})):n.callData)(),(async()=>{if(!i.includes("factory"))return;if(n.initCode)return{initCode:n.initCode};if(n.factory&&n.factoryData)return{factory:n.factory,factoryData:n.factoryData};const{factory:T,factoryData:G}=await s.getFactoryArgs();return s.entryPoint.version==="0.6"?{initCode:T&&G?bt([T,G]):void 0}:{factory:T,factoryData:G}})(),(async()=>{if(i.includes("fees")){if(typeof n.maxFeePerGas=="bigint"&&typeof n.maxPriorityFeePerGas=="bigint")return d;if(o?.userOperation?.estimateFeesPerGas){const T=await o.userOperation.estimateFeesPerGas({account:s,bundlerClient:o,userOperation:d});return{...d,...T}}try{const T=o.client??e,G=await Re(T,yc,"estimateFeesPerGas")({chain:T.chain,type:"eip1559"});return{maxFeePerGas:typeof n.maxFeePerGas=="bigint"?n.maxFeePerGas:BigInt(2n*G.maxFeePerGas),maxPriorityFeePerGas:typeof n.maxPriorityFeePerGas=="bigint"?n.maxPriorityFeePerGas:BigInt(2n*G.maxPriorityFeePerGas)}}catch{return}}})(),(async()=>{if(i.includes("nonce"))return typeof n.nonce=="bigint"?n.nonce:s.getNonce()})(),(async()=>{if(i.includes("authorization")){if(typeof n.authorization=="object")return n.authorization;if(s.authorization&&!await s.isDeployed())return{...await ac(s.client,s.authorization),r:"0xfffffffffffffffffffffffffffffff000000000000000000000000000000000",s:"0x7aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",yParity:1}}})()]);typeof g<"u"&&(d.callData=g),typeof h<"u"&&(d={...d,...h}),typeof v<"u"&&(d={...d,...v}),typeof k<"u"&&(d.nonce=k),typeof P<"u"&&(d.authorization=P),i.includes("signature")&&(typeof n.signature<"u"?d.signature=n.signature:d.signature=await s.getStubSignature(d)),s.entryPoint.version==="0.6"&&!d.initCode&&(d.initCode="0x");let x;async function I(){return x||(e.chain?e.chain.id:(x=await Re(e,_a,"getChainId")({}),x))}let D=!1;if(i.includes("paymaster")&&p&&!u&&!n.paymasterAndData){const{isFinal:T=!1,sponsor:G,...K}=await p({chainId:await I(),entryPointAddress:s.entryPoint.address,context:l,...d});D=T,d={...d,...K}}if(s.entryPoint.version==="0.6"&&!d.paymasterAndData&&(d.paymasterAndData="0x"),i.includes("gas")){if(s.userOperation?.estimateGas){const T=await s.userOperation.estimateGas(d);d={...d,...T}}if(typeof d.callGasLimit>"u"||typeof d.preVerificationGas>"u"||typeof d.verificationGasLimit>"u"||d.paymaster&&typeof d.paymasterPostOpGasLimit>"u"||d.paymaster&&typeof d.paymasterVerificationGasLimit>"u"){const T=await Re(o,La,"estimateUserOperationGas")({account:s,callGasLimit:0n,preVerificationGas:0n,verificationGasLimit:0n,stateOverride:a,...d.paymaster?{paymasterPostOpGasLimit:0n,paymasterVerificationGasLimit:0n}:{},...d});d={...d,callGasLimit:d.callGasLimit??T.callGasLimit,preVerificationGas:d.preVerificationGas??T.preVerificationGas,verificationGasLimit:d.verificationGasLimit??T.verificationGasLimit,paymasterPostOpGasLimit:d.paymasterPostOpGasLimit??T.paymasterPostOpGasLimit,paymasterVerificationGasLimit:d.paymasterVerificationGasLimit??T.paymasterVerificationGasLimit}}}if(i.includes("paymaster")&&f&&!u&&!n.paymasterAndData&&!D){const T=await f({chainId:await I(),entryPointAddress:s.entryPoint.address,context:l,...d});d={...d,...T}}return delete d.calls,delete d.parameters,delete d.paymasterContext,typeof d.paymaster!="string"&&delete d.paymaster,d}async function La(e,t){const{account:n=e.account,entryPointAddress:r,stateOverride:i}=t;if(!n&&!t.sender)throw new $r;const a=n?Gr(n):void 0,s=gc(i),o=a?await Re(e,zr,"prepareUserOperation")({...t,parameters:["authorization","factory","nonce","paymaster","signature"]}):t;try{const c=[In(o),r??a?.entryPoint?.address],u=await e.request({method:"eth_estimateUserOperationGas",params:s?[...c,s]:[...c]});return zc(u)}catch(c){const u=t.calls;throw Ba(c,{...o,...u?{calls:u}:{}})}}function Zc(e){return e.request({method:"eth_supportedEntryPoints"})}function Yc(e){const t={...e};return e.callGasLimit&&(t.callGasLimit=BigInt(e.callGasLimit)),e.maxFeePerGas&&(t.maxFeePerGas=BigInt(e.maxFeePerGas)),e.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=BigInt(e.maxPriorityFeePerGas)),e.nonce&&(t.nonce=BigInt(e.nonce)),e.paymasterPostOpGasLimit&&(t.paymasterPostOpGasLimit=BigInt(e.paymasterPostOpGasLimit)),e.paymasterVerificationGasLimit&&(t.paymasterVerificationGasLimit=BigInt(e.paymasterVerificationGasLimit)),e.preVerificationGas&&(t.preVerificationGas=BigInt(e.preVerificationGas)),e.verificationGasLimit&&(t.verificationGasLimit=BigInt(e.verificationGasLimit)),t}async function Jc(e,{hash:t}){const n=await e.request({method:"eth_getUserOperationByHash",params:[t]},{dedupe:!0});if(!n)throw new Uc({hash:t});const{blockHash:r,blockNumber:i,entryPoint:a,transactionHash:s,userOperation:o}=n;return{blockHash:r,blockNumber:BigInt(i),entryPoint:a,transactionHash:s,userOperation:Yc(o)}}function Qc(e){const t={...e};return e.actualGasCost&&(t.actualGasCost=BigInt(e.actualGasCost)),e.actualGasUsed&&(t.actualGasUsed=BigInt(e.actualGasUsed)),e.logs&&(t.logs=e.logs.map(n=>bc(n))),e.receipt&&(t.receipt=wc(t.receipt)),t}async function ja(e,{hash:t}){const n=await e.request({method:"eth_getUserOperationReceipt",params:[t]},{dedupe:!0});if(!n)throw new Rc({hash:t});return Qc(n)}async function Xc(e,t){const{account:n=e.account,entryPointAddress:r}=t;if(!n&&!t.sender)throw new $r;const i=n?Gr(n):void 0,a=i?await Re(e,zr,"prepareUserOperation")(t):t,s=t.signature||await i?.signUserOperation?.(a),o=In({...a,signature:s});try{return await e.request({method:"eth_sendUserOperation",params:[o,r??i?.entryPoint?.address]},{retryCount:0})}catch(c){const u=t.calls;throw Ba(c,{...a,...u?{calls:u}:{},signature:s})}}function eu(e,t){const{hash:n,pollingInterval:r=e.pollingInterval,retryCount:i,timeout:a=12e4}=t;let s=0;const o=vc(["waitForUserOperationReceipt",e.uid,n]);return new Promise((c,u)=>{const p=xc(o,{resolve:c,reject:u},f=>{const l=h=>{g(),h(),p()},d=a?setTimeout(()=>l(()=>f.reject(new wi({hash:n}))),a):void 0,g=Ec(async()=>{i&&s>=i&&(clearTimeout(d),l(()=>f.reject(new wi({hash:n}))));try{const h=await Re(e,ja,"getUserOperationReceipt")({hash:n});clearTimeout(d),l(()=>f.resolve(h))}catch(h){const v=h;v.name!=="UserOperationReceiptNotFoundError"&&(clearTimeout(d),l(()=>f.reject(v)))}s++},{emitOnBegin:!0,interval:r});return g})})}function tu(e){return{estimateUserOperationGas:t=>La(e,t),getChainId:()=>_a(e),getSupportedEntryPoints:()=>Zc(e),getUserOperation:t=>Jc(e,t),getUserOperationReceipt:t=>ja(e,t),prepareUserOperation:t=>zr(e,t),sendUserOperation:t=>Xc(e,t),waitForUserOperationReceipt:t=>eu(e,t)}}function nu(e){const{client:t,key:n="bundler",name:r="Bundler Client",paymaster:i,paymasterContext:a,transport:s,userOperation:o}=e;return Object.assign(sc({...e,chain:e.chain??t?.chain,key:n,name:r,transport:s,type:"bundlerClient"}),{client:t,paymaster:i,paymasterContext:a,userOperation:o}).extend(tu)}const ru="0.1.1";function iu(){return ru}let ee=class Or extends Error{constructor(t,n={}){const r=(()=>{if(n.cause instanceof Or){if(n.cause.details)return n.cause.details;if(n.cause.shortMessage)return n.cause.shortMessage}return n.cause?.message?n.cause.message:n.details})(),i=n.cause instanceof Or&&n.cause.docsPath||n.docsPath,s=`https://oxlib.sh${i??""}`,o=[t||"An error occurred.",...n.metaMessages?["",...n.metaMessages]:[],...r||i?["",r?`Details: ${r}`:void 0,i?`See: ${s}`:void 0]:[]].filter(c=>typeof c=="string").join(`
|
package/assets/index-VfkM29PH.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
let m;if(globalThis.__federation_shared__?.default?.["react-dom"]){const{importShared:s}=await import("./__federation_fn_import-
|
|
1
|
+
let m;if(globalThis.__federation_shared__?.default?.["react-dom"]){const{importShared:s}=await import("./__federation_fn_import-Cw4EhxlG.js");m=await s("react-dom");}else{m=await import("./index-VfkM29PH__bundled.js");}export const i=m.i??m;export const r=m.r??m;
|