From 6bbf63fe695a3a97c91da5c3a214fafa83fabfa7 Mon Sep 17 00:00:00 2001 From: Oluwatomilola Date: Tue, 3 Mar 2026 02:02:46 +0100 Subject: [PATCH 1/4] feat: integrate savings widget --- .gitignore | 3 +- src/components/Faq/Faq.tsx | 2 +- src/components/Faq/copies.tsx | 41 +++++++++ src/components/SideBar.tsx | 5 + src/index.tsx | 3 +- src/language/locales/af/catalog.po | 20 ++-- src/language/locales/ar/catalog.po | 20 ++-- src/language/locales/ca/catalog.po | 20 ++-- src/language/locales/cs/catalog.po | 20 ++-- src/language/locales/da/catalog.po | 20 ++-- src/language/locales/de/catalog.po | 20 ++-- src/language/locales/el/catalog.po | 20 ++-- src/language/locales/en/catalog.po | 20 ++-- src/language/locales/es-419/catalog.po | 20 ++-- src/language/locales/es/catalog.po | 20 ++-- src/language/locales/fi/catalog.po | 20 ++-- src/language/locales/fr/catalog.po | 20 ++-- src/language/locales/he/catalog.po | 20 ++-- src/language/locales/hi/catalog.po | 20 ++-- src/language/locales/hu/catalog.po | 20 ++-- src/language/locales/it/catalog.po | 20 ++-- src/language/locales/ja/catalog.po | 20 ++-- src/language/locales/ko/catalog.po | 20 ++-- src/language/locales/nl/catalog.po | 20 ++-- src/language/locales/no/catalog.po | 20 ++-- src/language/locales/pl/catalog.po | 20 ++-- src/language/locales/pt-BR/catalog.po | 20 ++-- src/language/locales/pt/catalog.po | 20 ++-- src/language/locales/ro/catalog.po | 20 ++-- src/language/locales/ru/catalog.po | 20 ++-- src/language/locales/sr/catalog.po | 20 ++-- src/language/locales/sv/catalog.po | 20 ++-- src/language/locales/tr/catalog.po | 20 ++-- src/language/locales/uk/catalog.po | 20 ++-- src/language/locales/vi/catalog.po | 20 ++-- src/language/locales/zh-CN/catalog.po | 20 ++-- src/language/locales/zh-TW/catalog.po | 20 ++-- src/language/locales/zh/catalog.po | 20 ++-- src/pages/gd/Savings/index.tsx | 121 +++++++++++++++++++++++++ src/routes.tsx | 2 + 40 files changed, 636 insertions(+), 201 deletions(-) create mode 100644 src/pages/gd/Savings/index.tsx diff --git a/.gitignore b/.gitignore index 62c301dde..b1cf1d2a9 100644 --- a/.gitignore +++ b/.gitignore @@ -56,4 +56,5 @@ deploy.sh yalc.lock .continueignore analice.html -e2e.log \ No newline at end of file +e2e.logTEST_SAVINGS_INTEGRATION.html +TEST_SAVINGS_INTEGRATION.html diff --git a/src/components/Faq/Faq.tsx b/src/components/Faq/Faq.tsx index 057ea04ec..194d68cf1 100644 --- a/src/components/Faq/Faq.tsx +++ b/src/components/Faq/Faq.tsx @@ -7,7 +7,7 @@ import MarkDown from '@ronradtke/react-native-markdown-display' import { faqs } from './copies' -export type FaqType = 'swap' | 'buy' | 'bridge' | 'goodid' | 'claim' | 'reserve' +export type FaqType = 'swap' | 'buy' | 'bridge' | 'goodid' | 'claim' | 'reserve' | 'savings' const FaqItem = ({ id, question, answer, links, AltLink }) => { const { isDesktopView } = useScreenSize() diff --git a/src/components/Faq/copies.tsx b/src/components/Faq/copies.tsx index 18e3f10e1..e28fbb944 100644 --- a/src/components/Faq/copies.tsx +++ b/src/components/Faq/copies.tsx @@ -342,6 +342,46 @@ const faqReserveCopy: FaqItemCopy[] = [ }, ] +const faqSavingsCopy: FaqItemCopy[] = [ + { + id: 'whatissavings', + question: `What is Savings?`, + answer: `Savings is a way to earn rewards by lending or staking your GoodDollars. You can lock your digital assets and generate passive income over time through yield-bearing products.`, + }, + { + id: 'howsavingswork', + question: `How does Savings work?`, + answer: `When you use the Savings product, your assets are deposited into a yield-generating protocol. Your funds work for you by earning rewards, which are added to your balance periodically. The exact mechanism depends on the underlying savings product.`, + }, + { + id: 'savingrisk', + question: `What are the risks of using Savings?`, + answer: `Savings products carry smart contract risk and market risk. Please review the terms and risks of the specific savings protocol before depositing. Your funds are subject to the security of the underlying smart contracts.`, + }, + { + id: 'withdrawsavings', + question: `Can I withdraw my funds anytime?`, + answer: `Withdrawal terms depend on the specific savings product. Some products may have lock-up periods or redemption schedules. Check the product details for specific terms before depositing.`, + }, + { + id: 'savingyield', + question: `How is my yield calculated?`, + answer: `Yield is calculated based on the APY (Annual Percentage Yield) advertised by the savings product. Your actual returns depend on the amount deposited, duration, and any applicable fees or terms.`, + }, + { + id: 'savingsfees', + question: `Are there fees for using Savings?`, + answer: `Fees may apply depending on the specific savings product. You can review the fee structure and APY details of each product before making a deposit. GoodDapp may not charge additional fees on top of protocol fees.`, + links: [ + { + href: 'https://docs.gooddollar.org/savings', + text: 'To learn more about Savings products, visit the', + linkText: 'GoodDollar Documentation', + }, + ], + }, +] + export const faqs = { swap: faqSwapCopy, buy: faqBuyCopy, @@ -349,4 +389,5 @@ export const faqs = { goodid: faqGoodIDCopy, claim: faqClaimCopy, reserve: faqReserveCopy, + savings: faqSavingsCopy, } diff --git a/src/components/SideBar.tsx b/src/components/SideBar.tsx index 1a68825b2..34434f7c4 100644 --- a/src/components/SideBar.tsx +++ b/src/components/SideBar.tsx @@ -174,6 +174,11 @@ export default function SideBar({ mobile, closeSidebar }: { mobile?: boolean; cl text: 'Claim', show: true, }, + { + route: '/savings', + text: 'Savings', + show: true, + }, { route: '/news', text: 'News', diff --git a/src/index.tsx b/src/index.tsx index 0e3552bb0..9232dcd72 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -85,9 +85,10 @@ const enableServiceWorker = const ProviderWrapper = ({ children }) => ( diff --git a/src/language/locales/af/catalog.po b/src/language/locales/af/catalog.po index 40c750d67..b25ebf9c3 100644 --- a/src/language/locales/af/catalog.po +++ b/src/language/locales/af/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "misluk om te laai" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "Glip Verdraagsaamheid" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "Transaksie is gestuur na die blockchain" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "Kyk op verkenner" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/ar/catalog.po b/src/language/locales/ar/catalog.po index 440f0c38d..ff65b275b 100644 --- a/src/language/locales/ar/catalog.po +++ b/src/language/locales/ar/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "فشل التحميل" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "تسامح الانزلاق" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "تم إرسال المعاملة إلى blockchain" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "عرض على المستكشف" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/ca/catalog.po b/src/language/locales/ca/catalog.po index a31e3ae2e..b007f56e0 100644 --- a/src/language/locales/ca/catalog.po +++ b/src/language/locales/ca/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/cs/catalog.po b/src/language/locales/cs/catalog.po index 694122b18..c525376d7 100644 --- a/src/language/locales/cs/catalog.po +++ b/src/language/locales/cs/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/da/catalog.po b/src/language/locales/da/catalog.po index 4b8fa643c..7e9a6479a 100644 --- a/src/language/locales/da/catalog.po +++ b/src/language/locales/da/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/de/catalog.po b/src/language/locales/de/catalog.po index 9eafb12f3..c57c6fc10 100644 --- a/src/language/locales/de/catalog.po +++ b/src/language/locales/de/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "Laden fehlgeschlagen" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "Schlupftoleranz" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "Die Transaktion wurde an den Blockchain geschickt" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "Ansicht auf Explorer" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "Rücknahme von Mitteln von {0}" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/el/catalog.po b/src/language/locales/el/catalog.po index 0b300365c..372889dc3 100644 --- a/src/language/locales/el/catalog.po +++ b/src/language/locales/el/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/en/catalog.po b/src/language/locales/en/catalog.po index 51490f8ab..7f28cf042 100644 --- a/src/language/locales/en/catalog.po +++ b/src/language/locales/en/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/es-419/catalog.po b/src/language/locales/es-419/catalog.po index 3bd8ac058..4eb37d02b 100644 --- a/src/language/locales/es-419/catalog.po +++ b/src/language/locales/es-419/catalog.po @@ -304,6 +304,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "" @@ -373,7 +381,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -615,7 +623,7 @@ msgstr "" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -856,11 +864,11 @@ msgstr "" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -874,7 +882,7 @@ msgstr "" msgid "View on explorer" msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -933,7 +941,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/es/catalog.po b/src/language/locales/es/catalog.po index 96814ede8..712bc9730 100644 --- a/src/language/locales/es/catalog.po +++ b/src/language/locales/es/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "falló al cargar" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "Tolerancia al deslizamiento" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "La transacción fue enviada al bloque de bloques." msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "Ver en el explorador" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "Retiró fondos de {0}" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/fi/catalog.po b/src/language/locales/fi/catalog.po index 12ec0f1e4..398c834e9 100644 --- a/src/language/locales/fi/catalog.po +++ b/src/language/locales/fi/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/fr/catalog.po b/src/language/locales/fr/catalog.po index a245575ab..da98915c3 100644 --- a/src/language/locales/fr/catalog.po +++ b/src/language/locales/fr/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "échec du chargement" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "Tolérance de slippage" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "Voir sur l'explorateur" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "A retiré des fonds de {0}" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/he/catalog.po b/src/language/locales/he/catalog.po index ec574a1e0..8fda79720 100644 --- a/src/language/locales/he/catalog.po +++ b/src/language/locales/he/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "נכשלה בטעינה" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "תנודת מחיר מקובלת" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "העסקה נשלחה אל בלוקשין" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "הצג על אקספלורר" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "משכו כספים מ {0}" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/hi/catalog.po b/src/language/locales/hi/catalog.po index d4b84d6b8..4716be939 100644 --- a/src/language/locales/hi/catalog.po +++ b/src/language/locales/hi/catalog.po @@ -1709,6 +1709,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "लोड करने में विफल" @@ -1778,7 +1786,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -2038,7 +2046,7 @@ msgstr "स्लिपेज टॉलरेंस" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -2291,11 +2299,11 @@ msgstr "" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -2313,7 +2321,7 @@ msgstr "एक्सप्लोरर पर देखें" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -2396,7 +2404,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/hu/catalog.po b/src/language/locales/hu/catalog.po index a6e77a8f0..4fcf49e00 100644 --- a/src/language/locales/hu/catalog.po +++ b/src/language/locales/hu/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/it/catalog.po b/src/language/locales/it/catalog.po index 1f20a1a1d..f3b369744 100644 --- a/src/language/locales/it/catalog.po +++ b/src/language/locales/it/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "impossibile caricare" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "Tolleranza slippage" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "La transazione è stata inviata al blockchain" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "Visualizza sull'explorer" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "Ritirato i fondi da {0}" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/ja/catalog.po b/src/language/locales/ja/catalog.po index ffd8e3d58..6be45fac7 100644 --- a/src/language/locales/ja/catalog.po +++ b/src/language/locales/ja/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "読み込みに失敗しました" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "スリッページ許容値" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "エクスプローラーで表示" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "{0}から資金を撤回しました" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/ko/catalog.po b/src/language/locales/ko/catalog.po index 0675a5dc9..9bcad4dfd 100644 --- a/src/language/locales/ko/catalog.po +++ b/src/language/locales/ko/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "불러 오지 못했습니다" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "미끄러짐 공차" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "탐색기에서보기" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "{0}에서 철수 된 자금" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/nl/catalog.po b/src/language/locales/nl/catalog.po index d52a26c37..ebf9384f7 100644 --- a/src/language/locales/nl/catalog.po +++ b/src/language/locales/nl/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/no/catalog.po b/src/language/locales/no/catalog.po index 3d9e92f3a..7956951ae 100644 --- a/src/language/locales/no/catalog.po +++ b/src/language/locales/no/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/pl/catalog.po b/src/language/locales/pl/catalog.po index 65d919504..8d1a322fb 100644 --- a/src/language/locales/pl/catalog.po +++ b/src/language/locales/pl/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/pt-BR/catalog.po b/src/language/locales/pt-BR/catalog.po index 469b934d5..006711011 100644 --- a/src/language/locales/pt-BR/catalog.po +++ b/src/language/locales/pt-BR/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "Falha ao carregar" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "Tolerância de deslizamento" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "Ver no explorer" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/pt/catalog.po b/src/language/locales/pt/catalog.po index ffa132cc1..91d3a7cbf 100644 --- a/src/language/locales/pt/catalog.po +++ b/src/language/locales/pt/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/ro/catalog.po b/src/language/locales/ro/catalog.po index 0e9b881ce..9a3481157 100644 --- a/src/language/locales/ro/catalog.po +++ b/src/language/locales/ro/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "incarcarea a esuat" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "Toleranță la alunecare" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "Tranzacția a fost trimisă la blockchain" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "Vizualizare pe explorator" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "A retras fonduri de la {0}" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/ru/catalog.po b/src/language/locales/ru/catalog.po index d1ad7dadf..ae1f4f0b9 100644 --- a/src/language/locales/ru/catalog.po +++ b/src/language/locales/ru/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "ошибка загрузки" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "Допуск по проскальзыванию" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "Транзакция была отправлена в блокчане" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "Посмотреть в проводнике" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "Вышли средства из {0}" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/sr/catalog.po b/src/language/locales/sr/catalog.po index d1bf75405..9cc0eb746 100644 --- a/src/language/locales/sr/catalog.po +++ b/src/language/locales/sr/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/sv/catalog.po b/src/language/locales/sv/catalog.po index 6d5961c64..501f60b6a 100644 --- a/src/language/locales/sv/catalog.po +++ b/src/language/locales/sv/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/tr/catalog.po b/src/language/locales/tr/catalog.po index ac9d715a7..0f34c435e 100644 --- a/src/language/locales/tr/catalog.po +++ b/src/language/locales/tr/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/uk/catalog.po b/src/language/locales/uk/catalog.po index 395b6652c..9391426fc 100644 --- a/src/language/locales/uk/catalog.po +++ b/src/language/locales/uk/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/vi/catalog.po b/src/language/locales/vi/catalog.po index ea3c6114e..df54f784f 100644 --- a/src/language/locales/vi/catalog.po +++ b/src/language/locales/vi/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "không tải được" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "Khả năng chịu trượt" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "Giao dịch đã được gửi đến Blockchain" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "Xem trên explorer" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "Đã rút tiền từ {0}" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/zh-CN/catalog.po b/src/language/locales/zh-CN/catalog.po index 898118bbc..20c5bf14b 100644 --- a/src/language/locales/zh-CN/catalog.po +++ b/src/language/locales/zh-CN/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "加载失败" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "可容忍滑点" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "交易被发送到区块链" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "在浏览器查看" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "退出{0}的资金" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/zh-TW/catalog.po b/src/language/locales/zh-TW/catalog.po index d9a03f6f8..c0a13800d 100644 --- a/src/language/locales/zh-TW/catalog.po +++ b/src/language/locales/zh-TW/catalog.po @@ -2954,6 +2954,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "加載失敗" @@ -3023,7 +3031,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -3283,7 +3291,7 @@ msgstr "可容忍滑點" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3536,11 +3544,11 @@ msgstr "交易被發送到區塊鏈" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3558,7 +3566,7 @@ msgstr "在瀏覽器查看" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3641,7 +3649,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "退出{0}的資金" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/language/locales/zh/catalog.po b/src/language/locales/zh/catalog.po index 01c920bdc..d0830f330 100644 --- a/src/language/locales/zh/catalog.po +++ b/src/language/locales/zh/catalog.po @@ -2425,6 +2425,14 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" +#: src/pages/gd/Savings/index.tsx:14 +msgid "" +"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Savings provides a simple way to generate yield on your digital assets.\n" +"Securely lock your assets and watch them grow over time.\n" +"Please be patient, loading information may take some time." +msgstr "" + #: src/components/Gas/index.tsx:12 msgid "failed to load" msgstr "" @@ -2494,7 +2502,7 @@ msgstr "" msgid "GoodDollar creates free money as a public good, G$ tokens, which you can collect daily." msgstr "" -#: src/components/SideBar.tsx:230 +#: src/components/SideBar.tsx:235 msgid "GoodDollar Main Bridge" msgstr "" @@ -2754,7 +2762,7 @@ msgstr "" msgid "Social APY" msgstr "" -#: src/components/SideBar.tsx:237 +#: src/components/SideBar.tsx:242 msgid "Squid Router" msgstr "" @@ -3007,11 +3015,11 @@ msgstr "" msgid "TYPE" msgstr "" -#: src/components/SideBar.tsx:206 +#: src/components/SideBar.tsx:211 msgid "Uniswap (Celo)" msgstr "" -#: src/components/SideBar.tsx:193 +#: src/components/SideBar.tsx:198 msgid "Uniswap (widget)" msgstr "" @@ -3029,7 +3037,7 @@ msgstr "" #~ msgid "View transaction on explorer" #~ msgstr "" -#: src/components/SideBar.tsx:199 +#: src/components/SideBar.tsx:204 msgid "Voltage Finance (Fuse)" msgstr "" @@ -3112,7 +3120,7 @@ msgstr "" msgid "Withdrew funds from {0}" msgstr "" -#: src/components/SideBar.tsx:213 +#: src/components/SideBar.tsx:218 msgid "Xswap (XDC)" msgstr "" diff --git a/src/pages/gd/Savings/index.tsx b/src/pages/gd/Savings/index.tsx new file mode 100644 index 000000000..582023536 --- /dev/null +++ b/src/pages/gd/Savings/index.tsx @@ -0,0 +1,121 @@ +import React, { useEffect, useRef, useState } from 'react' +import { VStack, Text, useBreakpointValue, Spinner } from 'native-base' +import { i18n } from '@lingui/core' +import { t } from '@lingui/macro' +import { useEthers } from '@usedapp/core' + +import { PageLayout } from 'components/Layout/PageLayout' + +const SavingsExplanation = () => ( + + + {i18n._( + t`Earn rewards by saving your GoodDollars with Ubeswap savings products! +Savings provides a simple way to generate yield on your digital assets. +Securely lock your assets and watch them grow over time. +Please be patient, loading information may take some time.` + )} + + +) + +const SavingsWidgetContainer: React.FC = () => { + const containerRef = useRef(null) + const [isLoading, setIsLoading] = useState(true) + const [hasError, setHasError] = useState(false) + const { account } = useEthers() + + const containerStyles = useBreakpointValue({ + base: { + maxWidth: 350, + }, + sm: { + maxWidth: '100%', + }, + }) + + useEffect(() => { + const loadWidget = async () => { + try { + setIsLoading(true) + setHasError(false) + + // Try to load the savings widget script from CDN + // The widget is available as a web component from GoodSDKs/savings-widget + const script = document.createElement('script') + script.src = 'https://unpkg.com/@gooddollar/savings-widget@latest/dist/index.js' + script.async = true + script.defer = true + + script.onload = () => { + setIsLoading(false) + } + + script.onerror = () => { + console.error('Failed to load savings widget from CDN') + setHasError(true) + setIsLoading(false) + } + + if (containerRef.current) { + containerRef.current.appendChild(script) + } + } catch (error) { + console.error('Error loading savings widget:', error) + setHasError(true) + setIsLoading(false) + } + } + + loadWidget() + + return () => { + // Cleanup + if (containerRef.current) { + const scripts = containerRef.current.querySelectorAll('script') + scripts.forEach((script) => script.remove()) + } + } + }, [account]) + + return ( + + {isLoading && ( + + + + Loading savings widget... + + + )} + {hasError && ( + + + Unable to load the savings widget. Please try again later. + + + )} +
+ + ) +} + +const Savings: React.FC = () => { + return ( + + + + + ) +} + +export default Savings + diff --git a/src/routes.tsx b/src/routes.tsx index fc89552ec..f8c9afd4c 100644 --- a/src/routes.tsx +++ b/src/routes.tsx @@ -16,6 +16,7 @@ const MicroBridge = lazy(() => import('./pages/gd/MicroBridge')) const Claim = lazy(() => import('./pages/gd/Claim/')) const GoodId = lazy(() => import('./pages/gd/GoodId')) const BuyGd = lazy(() => import('./pages/gd/BuyGD')) +const Savings = lazy(() => import('./pages/gd/Savings')) const NewsFeedPage = lazy(() => import('./pages/gd/News')) const RoutesWrapper = () => { @@ -54,6 +55,7 @@ function Routes(): JSX.Element { + From a7e9668e82d5e561fa4f834c90d9dc48e7ed0589 Mon Sep 17 00:00:00 2001 From: Oluwatomilola Date: Tue, 3 Mar 2026 02:18:51 +0100 Subject: [PATCH 2/4] feat: integrate ubeswap savings widget #619 - Add Savings page component with widget integration - Add /savings route to router - Add Savings menu item to sidebar - Add 6 FAQ items for Savings section - Use split-screen layout matching other pages --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index b1cf1d2a9..791e3f0b7 100644 --- a/.gitignore +++ b/.gitignore @@ -58,3 +58,6 @@ yalc.lock analice.html e2e.logTEST_SAVINGS_INTEGRATION.html TEST_SAVINGS_INTEGRATION.html +SAVINGS_INTEGRATION_TEST.html +catalog.po +src/language/locales/sr/catalog.po \ No newline at end of file From 98b06328fef3774a8f7ea89409490cf4850b23a5 Mon Sep 17 00:00:00 2001 From: Oluwatomilola Date: Thu, 5 Mar 2026 18:09:24 +0100 Subject: [PATCH 3/4] feat: integrate savings widget --- public/index.global.js | 544 +++++++++++++++++++++++++ src/language/locales/af/catalog.po | 12 +- src/language/locales/ar/catalog.po | 12 +- src/language/locales/ca/catalog.po | 12 +- src/language/locales/cs/catalog.po | 12 +- src/language/locales/da/catalog.po | 12 +- src/language/locales/de/catalog.po | 12 +- src/language/locales/el/catalog.po | 12 +- src/language/locales/en/catalog.po | 12 +- src/language/locales/es-419/catalog.po | 12 +- src/language/locales/es/catalog.po | 12 +- src/language/locales/fi/catalog.po | 12 +- src/language/locales/fr/catalog.po | 12 +- src/language/locales/he/catalog.po | 12 +- src/language/locales/hi/catalog.po | 12 +- src/language/locales/hu/catalog.po | 12 +- src/language/locales/it/catalog.po | 12 +- src/language/locales/ja/catalog.po | 12 +- src/language/locales/ko/catalog.po | 12 +- src/language/locales/nl/catalog.po | 12 +- src/language/locales/no/catalog.po | 12 +- src/language/locales/pl/catalog.po | 12 +- src/language/locales/pt-BR/catalog.po | 12 +- src/language/locales/pt/catalog.po | 12 +- src/language/locales/ro/catalog.po | 12 +- src/language/locales/ru/catalog.po | 12 +- src/language/locales/sr/catalog.po | 12 +- src/language/locales/sv/catalog.po | 12 +- src/language/locales/tr/catalog.po | 12 +- src/language/locales/uk/catalog.po | 12 +- src/language/locales/vi/catalog.po | 12 +- src/language/locales/zh-CN/catalog.po | 12 +- src/language/locales/zh-TW/catalog.po | 12 +- src/language/locales/zh/catalog.po | 12 +- src/pages/Savings/index.global.js | 544 +++++++++++++++++++++++++ src/pages/gd/Savings/index.tsx | 111 +++-- 36 files changed, 1506 insertions(+), 89 deletions(-) create mode 100644 public/index.global.js create mode 100644 src/pages/Savings/index.global.js diff --git a/public/index.global.js b/public/index.global.js new file mode 100644 index 000000000..cb78b2bb7 --- /dev/null +++ b/public/index.global.js @@ -0,0 +1,544 @@ +"use strict";var GooddollarSavingsWidget=(()=>{var $i=Object.defineProperty;var wl=Object.getOwnPropertyDescriptor;var z0=Object.getOwnPropertyNames;var U0=Object.prototype.hasOwnProperty;var E=(e,t)=>()=>(e&&(t=e(e=0)),t);var np=(e,t)=>{for(var r in t)$i(e,r,{get:t[r],enumerable:!0})},L0=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of z0(t))!U0.call(e,o)&&o!==r&&$i(e,o,{get:()=>t[o],enumerable:!(n=wl(t,o))||n.enumerable});return e};var H0=e=>L0($i({},"__esModule",{value:!0}),e),Oe=(e,t,r,n)=>{for(var o=n>1?void 0:n?wl(t,r):t,s=e.length-1,i;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&$i(t,r,o),o};var zl,Ul=E(()=>{"use strict";zl="1.0.8"});var Ae,qn=E(()=>{"use strict";Ul();Ae=class e extends Error{constructor(t,r={}){let n=r.cause instanceof e?r.cause.details:r.cause?.message?r.cause.message:r.details,o=r.cause instanceof e&&r.cause.docsPath||r.docsPath,s=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...o?[`Docs: https://abitype.dev${o}`]:[],...n?[`Details: ${n}`]:[],`Version: abitype@${zl}`].join(` +`);super(s),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,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=o,this.metaMessages=r.metaMessages,this.shortMessage=t}}});function at(e,t){return e.exec(t)?.groups}var xp,bp,Li,Ps=E(()=>{"use strict";xp=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,bp=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,Li=/^\(.+?\).*?$/});function Hi(e){let t=e.type;if(Ll.test(e.type)&&"components"in e){t="(";let r=e.components.length;for(let o=0;o{"use strict";Ps();Ll=/^tuple(?(\[(\d*)\])*)$/});function Vn(e){let t="",r=e.length;for(let n=0;n{"use strict";Hl()});function dn(e){return e.type==="function"?`function ${e.name}(${Vn(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${Vn(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${Vn(e.inputs)})`:e.type==="error"?`error ${e.name}(${Vn(e.inputs)})`:e.type==="constructor"?`constructor(${Vn(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}var jl=E(()=>{"use strict";Dl()});function Vl(e){return ql.test(e)}function Gl(e){return at(ql,e)}function Kl(e){return Wl.test(e)}function Yl(e){return at(Wl,e)}function Jl(e){return Zl.test(e)}function Xl(e){return at(Zl,e)}function Gn(e){return Ql.test(e)}function em(e){return at(Ql,e)}function rm(e){return tm.test(e)}function nm(e){return at(tm,e)}function sm(e){return om.test(e)}function im(e){return at(om,e)}function am(e){return nb.test(e)}var ql,Wl,Zl,Ql,tm,om,nb,cm,Di,ks=E(()=>{"use strict";Ps();ql=/^error (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;Wl=/^event (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;Zl=/^function (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)(?: (?external|public{1}))?(?: (?pure|view|nonpayable|payable{1}))?(?: returns\s?\((?.*?)\))?$/;Ql=/^struct (?[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?.*?)\}$/;tm=/^constructor\((?.*?)\)(?:\s(?payable{1}))?$/;om=/^fallback\(\) external(?:\s(?payable{1}))?$/;nb=/^receive\(\) external payable$/;cm=new Set(["indexed"]),Di=new Set(["calldata","memory","storage"])});var ji,qi,Vi,Gi=E(()=>{"use strict";qn();ji=class extends Ae{constructor({signature:t}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}},qi=class extends Ae{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}},Vi=class extends Ae{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}});var Wi,Ki,Yi,Zi,Ji,gp=E(()=>{"use strict";qn();Wi=class extends Ae{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}},Ki=class extends Ae{constructor({param:t,name:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${r}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}},Yi=class extends Ae{constructor({param:t,type:r,modifier:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${n}" not allowed${r?` in "${r}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}},Zi=class extends Ae{constructor({param:t,type:r,modifier:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${n}" not allowed${r?` in "${r}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${n}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}},Ji=class extends Ae{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}});var zt,Xi,Qi,wp=E(()=>{"use strict";qn();zt=class extends Ae{constructor({signature:t,type:r}){super(`Invalid ${r} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}},Xi=class extends Ae{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}},Qi=class extends Ae{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}});var ea,um=E(()=>{"use strict";qn();ea=class extends Ae{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}});var ta,pm=E(()=>{"use strict";qn();ta=class extends Ae{constructor({current:t,depth:r}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${r>0?"opening":"closing"} parentheses.`],details:`Depth "${r}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}});function fm(e,t,r){let n="";if(r)for(let o of Object.entries(r)){if(!o)continue;let s="";for(let i of o[1])s+=`[${i.type}${i.name?`:${i.name}`:""}]`;n+=`(${o[0]}{${s}})`}return t?`${t}:${e}${n}`:e}var ra,lm=E(()=>{"use strict";ra=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]])});function Bs(e,t={}){if(Jl(e))return ob(e,t);if(Kl(e))return sb(e,t);if(Vl(e))return ib(e,t);if(rm(e))return ab(e,t);if(sm(e))return cb(e);if(am(e))return{type:"receive",stateMutability:"payable"};throw new Xi({signature:e})}function ob(e,t={}){let r=Xl(e);if(!r)throw new zt({signature:e,type:"function"});let n=Tt(r.parameters),o=[],s=n.length;for(let a=0;a{"use strict";Ps();Gi();gp();wp();pm();lm();ks();ub=/^(?[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,pb=/^\((?.+?)\)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,fb=/^u?int$/;lb=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/});function oa(e){let t={},r=e.length;for(let i=0;i{"use strict";Ps();Gi();gp();wp();um();ks();na();hb=/^(?[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?$/});function sa(e){let t=oa(e),r=[],n=e.length;for(let o=0;o{"use strict";ks();Ep();na()});function ia(e){let t;if(typeof e=="string")t=Bs(e);else{let r=oa(e),n=e.length;for(let o=0;o{"use strict";Gi();ks();Ep();na()});var aa=E(()=>{"use strict";jl();dm();hm()});function Ce(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new ca(e.type);return`${e.name}(${Rs(e.inputs,{includeName:t})})`}function Rs(e,{includeName:t=!1}={}){return e?e.map(r=>xb(r,{includeName:t})).join(t?", ":","):""}function xb(e,{includeName:t}){return e.type.startsWith("tuple")?`(${Rs(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}var tr=E(()=>{"use strict";ye()});function we(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}var St=E(()=>{"use strict"});function ee(e){return we(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}var mt=E(()=>{"use strict";St()});var Ap,ym=E(()=>{"use strict";Ap="2.28.4"});function xm(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?xm(e.cause,t):t?null:e}var Tp,g,W=E(()=>{"use strict";ym();Tp={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${Ap}`},g=class e extends Error{constructor(t,r={}){let n=r.cause instanceof e?r.cause.details:r.cause?.message?r.cause.message:r.details,o=r.cause instanceof e&&r.cause.docsPath||r.docsPath,s=Tp.getDocsUrl?.({...r,docsPath:o}),i=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...s?[`Docs: ${s}`]:[],...n?[`Details: ${n}`]:[],...Tp.version?[`Version: ${Tp.version}`]:[]].join(` +`);super(i,r.cause?{cause:r.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=o,this.metaMessages=r.metaMessages,this.name=r.name??this.name,this.shortMessage=t,this.version=Ap}walk(t){return xm(this,t)}}});var ua,_s,Wn,dt,pa,fa,la,ma,$s,Kn,da,Yn,Ns,Ct,Zn,ha,ya,xa,It,Ut,ba,ga,Jn,ca,ye=E(()=>{"use strict";tr();mt();W();ua=class extends g{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(` +`),{docsPath:t,name:"AbiConstructorNotFoundError"})}},_s=class extends g{constructor({docsPath:t}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(` +`),{docsPath:t,name:"AbiConstructorParamsNotFoundError"})}},Wn=class extends g{constructor({data:t,params:r,size:n}){super([`Data size of ${n} bytes is too small for given parameters.`].join(` +`),{metaMessages:[`Params: (${Rs(r,{includeName:!0})})`,`Data: ${t} (${n} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t,this.params=r,this.size=n}},dt=class extends g{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}},pa=class extends g{constructor({expectedLength:t,givenLength:r,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${t}`,`Given length: ${r}`].join(` +`),{name:"AbiEncodingArrayLengthMismatchError"})}},fa=class extends g{constructor({expectedSize:t,value:r}){super(`Size of bytes "${r}" (bytes${ee(r)}) does not match expected size (bytes${t}).`,{name:"AbiEncodingBytesSizeMismatchError"})}},la=class extends g{constructor({expectedLength:t,givenLength:r}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${t}`,`Given length (values): ${r}`].join(` +`),{name:"AbiEncodingLengthMismatchError"})}},ma=class extends g{constructor(t,{docsPath:r}){super([`Arguments (\`args\`) were provided to "${t}", but "${t}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join(` +`),{docsPath:r,name:"AbiErrorInputsNotFoundError"})}},$s=class extends g{constructor(t,{docsPath:r}={}){super([`Error ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join(` +`),{docsPath:r,name:"AbiErrorNotFoundError"})}},Kn=class extends g{constructor(t,{docsPath:r}){super([`Encoded error signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${t}.`].join(` +`),{docsPath:r,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=t}},da=class extends g{constructor({docsPath:t}){super("Cannot extract event signature from empty topics.",{docsPath:t,name:"AbiEventSignatureEmptyTopicsError"})}},Yn=class extends g{constructor(t,{docsPath:r}){super([`Encoded event signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${t}.`].join(` +`),{docsPath:r,name:"AbiEventSignatureNotFoundError"})}},Ns=class extends g{constructor(t,{docsPath:r}={}){super([`Event ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(` +`),{docsPath:r,name:"AbiEventNotFoundError"})}},Ct=class extends g{constructor(t,{docsPath:r}={}){super([`Function ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(` +`),{docsPath:r,name:"AbiFunctionNotFoundError"})}},Zn=class extends g{constructor(t,{docsPath:r}){super([`Function "${t}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(` +`),{docsPath:r,name:"AbiFunctionOutputsNotFoundError"})}},ha=class extends g{constructor(t,{docsPath:r}){super([`Encoded function signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${t}.`].join(` +`),{docsPath:r,name:"AbiFunctionSignatureNotFoundError"})}},ya=class extends g{constructor(t,r){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${t.type}\` in \`${Ce(t.abiItem)}\`, and`,`\`${r.type}\` in \`${Ce(r.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}},xa=class extends g{constructor({expectedSize:t,givenSize:r}){super(`Expected bytes${t}, got bytes${r}.`,{name:"BytesSizeMismatchError"})}},It=class extends g{constructor({abiItem:t,data:r,params:n,size:o}){super([`Data size of ${o} bytes is too small for non-indexed event parameters.`].join(` +`),{metaMessages:[`Params: (${Rs(n,{includeName:!0})})`,`Data: ${r} (${o} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=t,this.data=r,this.params=n,this.size=o}},Ut=class extends g{constructor({abiItem:t,param:r}){super([`Expected a topic for indexed event parameter${r.name?` "${r.name}"`:""} on event "${Ce(t,{includeName:!0})}".`].join(` +`),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=t}},ba=class extends g{constructor(t,{docsPath:r}){super([`Type "${t}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(` +`),{docsPath:r,name:"InvalidAbiEncodingType"})}},ga=class extends g{constructor(t,{docsPath:r}){super([`Type "${t}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(` +`),{docsPath:r,name:"InvalidAbiDecodingType"})}},Jn=class extends g{constructor(t){super([`Value "${t}" is not a valid array.`].join(` +`),{name:"InvalidArrayError"})}},ca=class extends g{constructor(t){super([`"${t}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(` +`),{name:"InvalidDefinitionTypeError"})}}});var Fs,Os,Ms,va=E(()=>{"use strict";W();Fs=class extends g{constructor({offset:t,position:r,size:n}){super(`Slice ${r==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${n}).`,{name:"SliceOffsetOutOfBoundsError"})}},Os=class extends g{constructor({size:t,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${t}) exceeds padding size (${r}).`,{name:"SizeExceedsPaddingSizeError"})}},Ms=class extends g{constructor({size:t,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} is expected to be ${r} ${n} long, but is ${t} ${n} long.`,{name:"InvalidBytesLengthError"})}}});function Sr(e,{dir:t,size:r=32}={}){return typeof e=="string"?rr(e,{dir:t,size:r}):bb(e,{dir:t,size:r})}function rr(e,{dir:t,size:r=32}={}){if(r===null)return e;let n=e.replace("0x","");if(n.length>r*2)throw new Os({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n[t==="right"?"padEnd":"padStart"](r*2,"0")}`}function bb(e,{dir:t,size:r=32}={}){if(r===null)return e;if(e.length>r)throw new Os({size:e.length,targetSize:r,type:"bytes"});let n=new Uint8Array(r);for(let o=0;o{"use strict";va()});var Xn,Aa,Ta,Sa,zs=E(()=>{"use strict";W();Xn=class extends g{constructor({max:t,min:r,signed:n,size:o,value:s}){super(`Number "${s}" is not in safe ${o?`${o*8}-bit ${n?"signed":"unsigned"} `:""}integer range ${t?`(${r} to ${t})`:`(above ${r})`}`,{name:"IntegerOutOfRangeError"})}},Aa=class extends g{constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}},Ta=class extends g{constructor(t){super(`Hex value "${t}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}},Sa=class extends g{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}}});function Ie(e,{dir:t="left"}={}){let r=typeof e=="string"?e.replace("0x",""):e,n=0;for(let o=0;o{"use strict"});function Qe(e,{size:t}){if(ee(e)>t)throw new Sa({givenSize:ee(e),maxSize:t})}function he(e,t={}){let{signed:r}=t;t.size&&Qe(e,{size:t.size});let n=BigInt(e);if(!r)return n;let o=(e.length-2)/2,s=(1n<{"use strict";zs();mt();hn()});function z(e,t={}){return typeof e=="number"||typeof e=="bigint"?_(e,t):typeof e=="string"?Lt(e,t):typeof e=="boolean"?Cp(e,t):te(e,t)}function Cp(e,t={}){let r=`0x${Number(e)}`;return typeof t.size=="number"?(Qe(r,{size:t.size}),Sr(r,{size:t.size})):r}function te(e,t={}){let r="";for(let o=0;os||o{"use strict";zs();Ea();He();gb=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));wb=new TextEncoder});function ht(e,t={}){return typeof e=="number"||typeof e=="bigint"?Ab(e,t):typeof e=="boolean"?Eb(e,t):we(e)?Pe(e,t):Pt(e,t)}function Eb(e,t={}){let r=new Uint8Array(1);return r[0]=Number(e),typeof t.size=="number"?(Qe(r,{size:t.size}),Sr(r,{size:t.size})):r}function bm(e){if(e>=nr.zero&&e<=nr.nine)return e-nr.zero;if(e>=nr.A&&e<=nr.F)return e-(nr.A-10);if(e>=nr.a&&e<=nr.f)return e-(nr.a-10)}function Pe(e,t={}){let r=e;t.size&&(Qe(r,{size:t.size}),r=Sr(r,{dir:"right",size:t.size}));let n=r.slice(2);n.length%2&&(n=`0${n}`);let o=n.length/2,s=new Uint8Array(o);for(let i=0,a=0;i{"use strict";W();St();Ea();He();V();vb=new TextEncoder;nr={zero:48,nine:57,A:65,F:70,a:97,f:102}});function Us(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Tb(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Cr(e,...t){if(!Tb(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function gm(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Us(e.outputLen),Us(e.blockLen)}function or(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 Ca(e,t){Cr(e);let r=t.outputLen;if(e.length{"use strict"});function Sb(e,t=!1){return t?{h:Number(e&Ia),l:Number(e>>wm&Ia)}:{h:Number(e>>wm&Ia)|0,l:Number(e&Ia)|0}}function vm(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;o{"use strict";Ia=BigInt(4294967295),wm=BigInt(32);Em=(e,t,r)=>e<>>32-r,Am=(e,t,r)=>t<>>32-r,Tm=(e,t,r)=>t<>>64-r,Sm=(e,t,r)=>e<>>64-r});var yn,Im=E(()=>{"use strict";yn=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0});function Pm(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Pa(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function kt(e,t){return e<<32-t|e>>>t}function Cb(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function Pp(e){for(let t=0;te().update(Pr(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function Bm(e){let t=(n,o)=>e(o).update(Pr(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}function Ba(e=32){if(yn&&typeof yn.getRandomValues=="function")return yn.getRandomValues(new Uint8Array(e));if(yn&&typeof yn.randomBytes=="function")return Uint8Array.from(yn.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}var Ip,DA,Ir,xn=E(()=>{"use strict";Im();Ls();Ip=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;DA=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function";Ir=class{clone(){return this._cloneInto()}}});function Fb(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let i=0;i<10;i++)r[i]=e[i]^e[i+10]^e[i+20]^e[i+30]^e[i+40];for(let i=0;i<10;i+=2){let a=(i+8)%10,c=(i+2)%10,u=r[c],p=r[c+1],f=Rm(u,p,1)^r[a],l=_m(u,p,1)^r[a+1];for(let m=0;m<50;m+=10)e[i+m]^=f,e[i+m+1]^=l}let o=e[2],s=e[3];for(let i=0;i<24;i++){let a=Nm[i],c=Rm(o,s,a),u=_m(o,s,a),p=$m[i];o=e[p],s=e[p+1],e[p]=c,e[p+1]=u}for(let i=0;i<50;i+=10){for(let a=0;a<10;a++)r[a]=e[i+a];for(let a=0;a<10;a++)e[i+a]^=~r[(a+2)%10]&r[(a+4)%10]}e[0]^=$b[n],e[1]^=Nb[n]}r.fill(0)}var $m,Nm,Fm,Pb,Hs,kb,Bb,Rb,_b,$b,Nb,Rm,_m,Ra,kr,WA,KA,YA,ZA,JA,Om,XA,QA,Mm,eT,tT,zm=E(()=>{"use strict";Ls();Cm();xn();$m=[],Nm=[],Fm=[],Pb=BigInt(0),Hs=BigInt(1),kb=BigInt(2),Bb=BigInt(7),Rb=BigInt(256),_b=BigInt(113);for(let e=0,t=Hs,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],$m.push(2*(5*n+r)),Nm.push((e+1)*(e+2)/2%64);let o=Pb;for(let s=0;s<7;s++)t=(t<>Bb)*_b)%Rb,t&kb&&(o^=Hs<<(Hs<r>32?Tm(e,t,r):Em(e,t,r),_m=(e,t,r)=>r>32?Sm(e,t,r):Am(e,t,r);Ra=class e extends Ir{constructor(t,r,n,o=!1,s=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=r,this.outputLen=n,this.enableXOF=o,this.rounds=s,Us(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Pm(this.state)}keccak(){Ip||Pp(this.state32),Fb(this.state32,this.rounds),Ip||Pp(this.state32),this.posOut=0,this.pos=0}update(t){or(this);let{blockLen:r,state:n}=this;t=Pr(t);let o=t.length;for(let s=0;s=n&&this.keccak();let i=Math.min(n-this.posOut,s-o);t.set(r.subarray(this.posOut,this.posOut+i),o),this.posOut+=i,o+=i}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return Us(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(Ca(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:r,suffix:n,outputLen:o,rounds:s,enableXOF:i}=this;return t||(t=new e(r,n,o,i,s)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=s,t.suffix=n,t.outputLen=o,t.enableXOF=i,t.destroyed=this.destroyed,t}},kr=(e,t,r)=>ka(()=>new Ra(t,e,r)),WA=kr(6,144,224/8),KA=kr(6,136,256/8),YA=kr(6,104,384/8),ZA=kr(6,72,512/8),JA=kr(1,144,224/8),Om=kr(1,136,256/8),XA=kr(1,104,384/8),QA=kr(1,72,512/8),Mm=(e,t,r)=>Bm((n={})=>new Ra(t,e,n.dkLen===void 0?r:n.dkLen,!0)),eT=Mm(31,168,128/8),tT=Mm(31,136,256/8)});function ue(e,t){let r=t||"hex",n=Om(we(e,{strict:!1})?ht(e):e);return r==="bytes"?n:z(n)}var Bt=E(()=>{"use strict";zm();St();ze();V()});function Um(e){return Ob(e)}var Ob,Lm=E(()=>{"use strict";ze();Bt();Ob=e=>ue(ht(e))});function Hm(e){let t=!0,r="",n=0,o="",s=!1;for(let i=0;i{"use strict";W()});var jm,qm=E(()=>{"use strict";aa();Dm();jm=e=>{let t=typeof e=="string"?e:dn(e);return Hm(t)}});function _a(e){return Um(jm(e))}var kp=E(()=>{"use strict";Lm();qm()});var Br,Ds=E(()=>{"use strict";kp();Br=_a});var ae,Rt=E(()=>{"use strict";W();ae=class extends g{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}});var Ht,js=E(()=>{"use strict";Ht=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){let r=super.get(t);return super.has(t)&&r!==void 0&&(this.delete(t),super.set(t,r)),r}set(t,r){if(super.set(t,r),this.maxSize&&this.size>this.maxSize){let n=this.keys().next().value;n&&this.delete(n)}return this}}});function sr(e,t){if(Bp.has(`${e}.${t}`))return Bp.get(`${e}.${t}`);let r=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),n=ue(Pt(r),"bytes"),o=(t?r.substring(`${t}0x`.length):r).split("");for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&o[i]&&(o[i]=o[i].toUpperCase()),(n[i>>1]&15)>=8&&o[i+1]&&(o[i+1]=o[i+1].toUpperCase());let s=`0x${o.join("")}`;return Bp.set(`${e}.${t}`,s),s}function $a(e,t){if(!re(e,{strict:!1}))throw new ae({address:e});return sr(e,t)}var Bp,bn=E(()=>{"use strict";Rt();ze();Bt();js();yt();Bp=new Ht(8192)});function re(e,t){let{strict:r=!0}=t??{},n=`${e}.${r}`;if(Rp.has(n))return Rp.get(n);let o=Mb.test(e)?e.toLowerCase()===e?!0:r?sr(e)===e:!0:!1;return Rp.set(n,o),o}var Mb,Rp,yt=E(()=>{"use strict";js();bn();Mb=/^0x[a-fA-F0-9]{40}$/,Rp=new Ht(8192)});function Ze(e){return typeof e[0]=="string"?Te(e):zb(e)}function zb(e){let t=0;for(let o of e)t+=o.length;let r=new Uint8Array(t),n=0;for(let o of e)r.set(o,n),n+=o.length;return r}function Te(e){return`0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}var et=E(()=>{"use strict"});function xt(e,t,r,{strict:n}={}){return we(e,{strict:!1})?$p(e,t,r,{strict:n}):_p(e,t,r,{strict:n})}function Vm(e,t){if(typeof t=="number"&&t>0&&t>ee(e)-1)throw new Fs({offset:t,position:"start",size:ee(e)})}function Gm(e,t,r){if(typeof t=="number"&&typeof r=="number"&&ee(e)!==r-t)throw new Fs({offset:r,position:"end",size:ee(e)})}function _p(e,t,r,{strict:n}={}){Vm(e,t);let o=e.slice(t,r);return n&&Gm(o,t,r),o}function $p(e,t,r,{strict:n}={}){Vm(e,t);let o=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return n&&Gm(o,t,r),o}var Rr=E(()=>{"use strict";va();St();mt()});var Wm,Na,Np=E(()=>{"use strict";Wm=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Na=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/});function De(e,t){if(e.length!==t.length)throw new la({expectedLength:e.length,givenLength:t.length});let r=Ub({params:e,values:t}),n=Op(r);return n.length===0?"0x":n}function Ub({params:e,values:t}){let r=[];for(let n=0;n0?Ze([a,i]):a}}if(o)return{dynamic:!0,encoded:i}}return{dynamic:!1,encoded:Ze(s.map(({encoded:i})=>i))}}function Db(e,{param:t}){let[,r]=t.type.split("bytes"),n=ee(e);if(!r){let o=e;return n%32!==0&&(o=rr(o,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:Ze([rr(_(n,{size:32})),o])}}if(n!==Number.parseInt(r))throw new fa({expectedSize:Number.parseInt(r),value:e});return{dynamic:!1,encoded:rr(e,{dir:"right"})}}function jb(e){if(typeof e!="boolean")throw new g(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:rr(Cp(e))}}function qb(e,{signed:t,size:r=256}){if(typeof r=="number"){let n=2n**(BigInt(r)-(t?1n:0n))-1n,o=t?-n-1n:0n;if(e>n||eo))}}function Fa(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}var Dt=E(()=>{"use strict";ye();Rt();W();zs();yt();et();Ea();mt();Rr();V();Np()});var jt,Qn=E(()=>{"use strict";Rr();kp();jt=e=>xt(_a(e),0,4)});function tt(e){let{abi:t,args:r=[],name:n}=e,o=we(n,{strict:!1}),s=t.filter(a=>o?a.type==="function"?jt(a)===n:a.type==="event"?Br(a)===n:!1:"name"in a&&a.name===n);if(s.length===0)return;if(s.length===1)return s[0];let i;for(let a of s){if(!("inputs"in a))continue;if(!r||r.length===0){if(!a.inputs||a.inputs.length===0)return a;continue}if(!a.inputs||a.inputs.length===0||a.inputs.length!==r.length)continue;if(r.every((u,p)=>{let f="inputs"in a&&a.inputs[p];return f?Mp(u,f):!1})){if(i&&"inputs"in i&&i.inputs){let u=Km(a.inputs,i.inputs,r);if(u)throw new ya({abiItem:a,type:u[0]},{abiItem:i,type:u[1]})}i=a}}return i||s[0]}function Mp(e,t){let r=typeof e,n=t.type;switch(n){case"address":return re(e,{strict:!1});case"bool":return r==="boolean";case"function":return r==="string";case"string":return r==="string";default:return n==="tuple"&&"components"in t?Object.values(t.components).every((o,s)=>Mp(Object.values(e)[s],o)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(n)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?r==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)?Array.isArray(e)&&e.every(o=>Mp(o,{...t,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function Km(e,t,r){for(let n in e){let o=e[n],s=t[n];if(o.type==="tuple"&&s.type==="tuple"&&"components"in o&&"components"in s)return Km(o.components,s.components,r[n]);let i=[o.type,s.type];if(i.includes("address")&&i.includes("bytes20")?!0:i.includes("address")&&i.includes("string")?re(r[n],{strict:!1}):i.includes("address")&&i.includes("bytes")?re(r[n],{strict:!1}):!1)return i}}var _r=E(()=>{"use strict";ye();St();yt();Ds();Qn()});function K(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}var ve=E(()=>{"use strict"});function Xm(e){let{abi:t,args:r,functionName:n}=e,o=t[0];if(n){let s=tt({abi:t,args:r,name:n});if(!s)throw new Ct(n,{docsPath:Jm});o=s}if(o.type!=="function")throw new Ct(void 0,{docsPath:Jm});return{abi:[o],functionName:jt(Ce(o))}}var Jm,Qm=E(()=>{"use strict";ye();Qn();tr();_r();Jm="/docs/contract/encodeFunctionData"});function de(e){let{args:t}=e,{abi:r,functionName:n}=e.abi.length===1&&e.functionName?.startsWith("0x")?e:Xm(e),o=r[0],s=n,i="inputs"in o&&o.inputs?De(o.inputs,t??[]):void 0;return Te([s,i??"0x"])}var ct=E(()=>{"use strict";et();Dt();Qm()});var Ma,za,ed,qs=E(()=>{"use strict";Ma={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},za={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},ed={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}});var Vs,eo,Ua,zp=E(()=>{"use strict";W();Vs=class extends g{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}},eo=class extends g{constructor({length:t,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}},Ua=class extends g{constructor({count:t,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}}});function to(e,{recursiveReadLimit:t=8192}={}){let r=Object.create(Wb);return r.bytes=e,r.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}var Wb,La=E(()=>{"use strict";zp();Wb={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 Ua({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new eo({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Vs({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new Vs({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}}});function td(e,t={}){typeof t.size<"u"&&Qe(e,{size:t.size});let r=te(e,t);return he(r,t)}function rd(e,t={}){let r=e;if(typeof t.size<"u"&&(Qe(r,{size:t.size}),r=Ie(r)),r.length>1||r[0]>1)throw new Aa(r);return!!r[0]}function Vt(e,t={}){typeof t.size<"u"&&Qe(e,{size:t.size});let r=te(e,t);return xe(r,t)}function nd(e,t={}){let r=e;return typeof t.size<"u"&&(Qe(r,{size:t.size}),r=Ie(r,{dir:"right"})),new TextDecoder().decode(r)}var od=E(()=>{"use strict";zs();hn();He();V()});function ir(e,t){let r=typeof t=="string"?Pe(t):t,n=to(r);if(ee(r)===0&&e.length>0)throw new dt;if(ee(t)&&ee(t)<32)throw new Wn({data:typeof t=="string"?t:te(t),params:e,size:ee(t)});let o=0,s=[];for(let i=0;i48?td(o,{signed:r}):Vt(o,{signed:r}),32]}function Qb(e,t,{staticPosition:r}){let n=t.components.length===0||t.components.some(({name:i})=>!i),o=n?[]:{},s=0;if(Gs(t)){let i=Vt(e.readBytes(Up)),a=r+i;for(let c=0;c{"use strict";ye();bn();La();mt();Rr();hn();od();ze();V();Dt();sd=32,Up=32});function Ha(e){let{abi:t,data:r}=e,n=xt(r,0,4);if(n==="0x")throw new dt;let s=[...t||[],za,ed].find(i=>i.type==="error"&&n===jt(Ce(i)));if(!s)throw new Kn(n,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:s,args:"inputs"in s&&s.inputs&&s.inputs.length>0?ir(s.inputs,xt(r,4)):void 0,errorName:s.name}}var Lp=E(()=>{"use strict";qs();ye();Rr();Qn();Ws();tr()});var X,qe=E(()=>{"use strict";X=(e,t,r)=>JSON.stringify(e,(n,o)=>{let s=typeof o=="bigint"?o.toString():o;return typeof t=="function"?t(n,s):s},r)});function Hp({abiItem:e,args:t,includeFunctionName:r=!0,includeName:n=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${r?e.name:""}(${e.inputs.map((o,s)=>`${n&&o.name?`${o.name}: `:""}${typeof t[s]=="object"?X(t[s]):t[s]}`).join(", ")})`}var id=E(()=>{"use strict";qe()});var Da,ad,ja=E(()=>{"use strict";Da={gwei:9,wei:18},ad={ether:-9,wei:9}});function qa(e,t){let r=e.toString(),n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(t,"0");let[o,s]=[r.slice(0,r.length-t),r.slice(r.length-t)];return s=s.replace(/(0+)$/,""),`${n?"-":""}${o||"0"}${s?`.${s}`:""}`}var Dp=E(()=>{"use strict"});function ar(e,t="wei"){return qa(e,Da[t])}var Ks=E(()=>{"use strict";ja();Dp()});function ke(e,t="wei"){return qa(e,ad[t])}var no=E(()=>{"use strict";ja();Dp()});function cd(e){return e.reduce((t,{slot:r,value:n})=>`${t} ${r}: ${n} +`,"")}function ud(e){return e.reduce((t,{address:r,...n})=>{let o=`${t} ${r}: +`;return n.nonce&&(o+=` nonce: ${n.nonce} +`),n.balance&&(o+=` balance: ${n.balance} +`),n.code&&(o+=` code: ${n.code} +`),n.state&&(o+=` state: +`,o+=cd(n.state)),n.stateDiff&&(o+=` stateDiff: +`,o+=cd(n.stateDiff)),o},` State Override: +`).slice(0,-1)}var Va,Ga,jp=E(()=>{"use strict";W();Va=class extends g{constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"})}},Ga=class extends g{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}});function gn(e){let t=Object.entries(e).map(([n,o])=>o===void 0||o===!1?null:[n,o]).filter(Boolean),r=t.reduce((n,[o])=>Math.max(n,o.length),0);return t.map(([n,o])=>` ${`${n}:`.padEnd(r+1)} ${o}`).join(` +`)}var Wa,Ka,Ya,Za,Ja,oo,so,Xa,_t=E(()=>{"use strict";Ks();no();W();Wa=class extends g{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(` +`),{name:"FeeConflictError"})}},Ka=class extends g{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}},Ya=class extends g{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",gn(t),"}","","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"})}},Za=class extends g{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}},Ja=class extends g{constructor(t,{account:r,docsPath:n,chain:o,data:s,gas:i,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:p,to:f,value:l}){let m=gn({chain:o&&`${o?.name} (id: ${o?.id})`,from:r?.address,to:f,value:typeof l<"u"&&`${ar(l)} ${o?.nativeCurrency?.symbol||"ETH"}`,data:s,gas:i,gasPrice:typeof a<"u"&&`${ke(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${ke(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${ke(u)} gwei`,nonce:p});super(t.shortMessage,{cause:t,docsPath:n,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",m].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}},oo=class extends g{constructor({blockHash:t,blockNumber:r,blockTag:n,hash:o,index:s}){let i="Transaction";n&&s!==void 0&&(i=`Transaction at block time "${n}" at index "${s}"`),t&&s!==void 0&&(i=`Transaction at block hash "${t}" at index "${s}"`),r&&s!==void 0&&(i=`Transaction at block number "${r}" at index "${s}"`),o&&(i=`Transaction with hash "${o}"`),super(`${i} could not be found.`,{name:"TransactionNotFoundError"})}},so=class extends g{constructor({hash:t}){super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}},Xa=class extends g{constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}});var pd,wn,Qa=E(()=>{"use strict";pd=e=>e,wn=e=>e});var io,ec,vn,tc,rc,Gt,Nr=E(()=>{"use strict";ve();qs();Lp();tr();id();_r();Ks();no();ye();W();jp();_t();Qa();io=class extends g{constructor(t,{account:r,docsPath:n,chain:o,data:s,gas:i,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:p,to:f,value:l,stateOverride:m}){let y=r?K(r):void 0,x=gn({from:y?.address,to:f,value:typeof l<"u"&&`${ar(l)} ${o?.nativeCurrency?.symbol||"ETH"}`,data:s,gas:i,gasPrice:typeof a<"u"&&`${ke(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${ke(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${ke(u)} gwei`,nonce:p});m&&(x+=` +${ud(m)}`),super(t.shortMessage,{cause:t,docsPath:n,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Raw Call Arguments:",x].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}},ec=class extends g{constructor(t,{abi:r,args:n,contractAddress:o,docsPath:s,functionName:i,sender:a}){let c=tt({abi:r,args:n,name:i}),u=c?Hp({abiItem:c,args:n,includeFunctionName:!1,includeName:!1}):void 0,p=c?Ce(c,{includeName:!0}):void 0,f=gn({address:o&&pd(o),function:p,args:u&&u!=="()"&&`${[...Array(i?.length??0).keys()].map(()=>" ").join("")}${u}`,sender:a});super(t.shortMessage||`An unknown error occurred while executing the contract function "${i}".`,{cause:t,docsPath:s,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],f&&"Contract Call:",f].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=r,this.args=n,this.cause=t,this.contractAddress=o,this.functionName=i,this.sender=a}},vn=class extends g{constructor({abi:t,data:r,functionName:n,message:o}){let s,i,a,c;if(r&&r!=="0x")try{i=Ha({abi:t,data:r});let{abiItem:p,errorName:f,args:l}=i;if(f==="Error")c=l[0];else if(f==="Panic"){let[m]=l;c=Ma[m]}else{let m=p?Ce(p,{includeName:!0}):void 0,y=p&&l?Hp({abiItem:p,args:l,includeFunctionName:!1,includeName:!1}):void 0;a=[m?`Error: ${m}`:"",y&&y!=="()"?` ${[...Array(f?.length??0).keys()].map(()=>" ").join("")}${y}`:""]}}catch(p){s=p}else o&&(c=o);let u;s instanceof Kn&&(u=s.signature,a=[`Unable to decode signature "${u}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${u}.`]),super(c&&c!=="execution reverted"||u?[`The contract function "${n}" reverted with the following ${u?"signature":"reason"}:`,c||u].join(` +`):`The contract function "${n}" reverted.`,{cause:s,metaMessages:a,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=i,this.raw=r,this.reason=c,this.signature=u}},tc=class extends g{constructor({functionName:t}){super(`The contract function "${t}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${t}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError"})}},rc=class extends g{constructor({factory:t}){super(`Deployment for counterfactual contract call failed${t?` for factory "${t}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}},Gt=class extends g{constructor({data:t,message:r}){super(r||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t}}});var bt,Fr,Ys,En=E(()=>{"use strict";qe();W();Qa();bt=class extends g{constructor({body:t,cause:r,details:n,headers:o,status:s,url:i}){super("HTTP request failed.",{cause:r,details:n,metaMessages:[s&&`Status: ${s}`,`URL: ${wn(i)}`,t&&`Request body: ${X(t)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=t,this.headers=o,this.status=s,this.url=i}},Fr=class extends g{constructor({body:t,error:r,url:n}){super("RPC Request failed.",{cause:r,details:r.message,metaMessages:[`URL: ${wn(n)}`,`Request body: ${X(t)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=r.code,this.data=r.data}},Ys=class extends g{constructor({body:t,url:r}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${wn(r)}`,`Request body: ${X(t)}`],name:"TimeoutError"})}}});var tg,Ve,Je,ao,co,uo,po,cr,Wt,fo,lo,mo,Or,An,ho,Tn,yo,xo,bo,go,wo,vo,Eo,Ao,To,So,Co,Io,nc,Zs=E(()=>{"use strict";W();En();tg=-1,Ve=class extends g{constructor(t,{code:r,docsPath:n,metaMessages:o,name:s,shortMessage:i}){super(i,{cause:t,docsPath:n,metaMessages:o||t?.metaMessages,name:s||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=s||t.name,this.code=t instanceof Fr?t.code:r??tg}},Je=class extends Ve{constructor(t,r){super(t,r),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=r.data}},ao=class e extends Ve{constructor(t){super(t,{code:e.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}};Object.defineProperty(ao,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});co=class e extends Ve{constructor(t){super(t,{code:e.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}};Object.defineProperty(co,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});uo=class e extends Ve{constructor(t,{method:r}={}){super(t,{code:e.code,name:"MethodNotFoundRpcError",shortMessage:`The method${r?` "${r}"`:""} does not exist / is not available.`})}};Object.defineProperty(uo,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});po=class e extends Ve{constructor(t){super(t,{code:e.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(` +`)})}};Object.defineProperty(po,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});cr=class e extends Ve{constructor(t){super(t,{code:e.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}};Object.defineProperty(cr,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});Wt=class e extends Ve{constructor(t){super(t,{code:e.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(` +`)})}};Object.defineProperty(Wt,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});fo=class e extends Ve{constructor(t){super(t,{code:e.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}};Object.defineProperty(fo,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});lo=class e extends Ve{constructor(t){super(t,{code:e.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}};Object.defineProperty(lo,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});mo=class e extends Ve{constructor(t){super(t,{code:e.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}};Object.defineProperty(mo,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});Or=class e extends Ve{constructor(t,{method:r}={}){super(t,{code:e.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${r?` "${r}"`:""} is not supported.`})}};Object.defineProperty(Or,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});An=class e extends Ve{constructor(t){super(t,{code:e.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}};Object.defineProperty(An,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});ho=class e extends Ve{constructor(t){super(t,{code:e.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}};Object.defineProperty(ho,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});Tn=class e extends Je{constructor(t){super(t,{code:e.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}};Object.defineProperty(Tn,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});yo=class e extends Je{constructor(t){super(t,{code:e.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}};Object.defineProperty(yo,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});xo=class e extends Je{constructor(t,{method:r}={}){super(t,{code:e.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${r?` " ${r}"`:""}.`})}};Object.defineProperty(xo,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});bo=class e extends Je{constructor(t){super(t,{code:e.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}};Object.defineProperty(bo,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});go=class e extends Je{constructor(t){super(t,{code:e.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}};Object.defineProperty(go,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});wo=class e extends Je{constructor(t){super(t,{code:e.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}};Object.defineProperty(wo,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});vo=class e extends Je{constructor(t){super(t,{code:e.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}};Object.defineProperty(vo,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});Eo=class e extends Je{constructor(t){super(t,{code:e.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}};Object.defineProperty(Eo,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});Ao=class e extends Je{constructor(t){super(t,{code:e.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}};Object.defineProperty(Ao,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});To=class e extends Je{constructor(t){super(t,{code:e.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}};Object.defineProperty(To,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});So=class e extends Je{constructor(t){super(t,{code:e.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}};Object.defineProperty(So,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});Co=class e extends Je{constructor(t){super(t,{code:e.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}};Object.defineProperty(Co,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});Io=class e extends Je{constructor(t){super(t,{code:e.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}};Object.defineProperty(Io,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});nc=class extends Ve{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}});function ng(e,t,r,n){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,n);let o=BigInt(32),s=BigInt(4294967295),i=Number(r>>o&s),a=Number(r&s),c=n?4:0,u=n?0:4;e.setUint32(t+c,i,n),e.setUint32(t+u,a,n)}function ld(e,t,r){return e&t^~e&r}function md(e,t,r){return e&t^e&r^t&r}var oc,dd=E(()=>{"use strict";Ls();xn();oc=class extends Ir{constructor(t,r,n,o){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=o,this.buffer=new Uint8Array(t),this.view=Pa(this.buffer)}update(t){or(this);let{view:r,buffer:n,blockLen:o}=this;t=Pr(t);let s=t.length;for(let i=0;io-i&&(this.process(n,0),i=0);for(let f=i;fp.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f{"use strict";dd();xn();og=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]),Mr=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),zr=new Uint32Array(64),qp=class extends oc{constructor(t=32){super(64,t,8,!1),this.A=Mr[0]|0,this.B=Mr[1]|0,this.C=Mr[2]|0,this.D=Mr[3]|0,this.E=Mr[4]|0,this.F=Mr[5]|0,this.G=Mr[6]|0,this.H=Mr[7]|0}get(){let{A:t,B:r,C:n,D:o,E:s,F:i,G:a,H:c}=this;return[t,r,n,o,s,i,a,c]}set(t,r,n,o,s,i,a,c){this.A=t|0,this.B=r|0,this.C=n|0,this.D=o|0,this.E=s|0,this.F=i|0,this.G=a|0,this.H=c|0}process(t,r){for(let f=0;f<16;f++,r+=4)zr[f]=t.getUint32(r,!1);for(let f=16;f<64;f++){let l=zr[f-15],m=zr[f-2],y=kt(l,7)^kt(l,18)^l>>>3,x=kt(m,17)^kt(m,19)^m>>>10;zr[f]=x+zr[f-7]+y+zr[f-16]|0}let{A:n,B:o,C:s,D:i,E:a,F:c,G:u,H:p}=this;for(let f=0;f<64;f++){let l=kt(a,6)^kt(a,11)^kt(a,25),m=p+l+ld(a,c,u)+og[f]+zr[f]|0,x=(kt(n,2)^kt(n,13)^kt(n,22))+md(n,o,s)|0;p=u,u=c,c=a,a=i+m|0,i=s,s=o,o=n,n=m+x|0}n=n+this.A|0,o=o+this.B|0,s=s+this.C|0,i=i+this.D|0,a=a+this.E|0,c=c+this.F|0,u=u+this.G|0,p=p+this.H|0,this.set(n,o,s,i,a,c,u,p)}roundClean(){zr.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}},Ur=ka(()=>new qp)});var hd=E(()=>{"use strict";Vp()});var sc,Gp,yd=E(()=>{"use strict";Ls();xn();sc=class extends Ir{constructor(t,r){super(),this.finished=!1,this.destroyed=!1,gm(t);let n=Pr(r);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let o=this.blockLen,s=new Uint8Array(o);s.set(n.length>o?t.create().update(n).digest():n);for(let i=0;inew sc(e,t).update(r).digest();Gp.create=(e,t)=>new sc(e,t)});function Sn(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function pr(e){if(!Sn(e))throw new Error("Uint8Array expected")}function Po(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}function Js(e){let t=e.toString(16);return t.length&1?"0"+t:t}function gd(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?Zp:BigInt("0x"+e)}function ko(e){if(pr(e),wd)return e.toHex();let t="";for(let r=0;r=ur._0&&e<=ur._9)return e-ur._0;if(e>=ur.A&&e<=ur.F)return e-(ur.A-10);if(e>=ur.a&&e<=ur.f)return e-(ur.a-10)}function Xs(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(wd)return Uint8Array.fromHex(e);let t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let o=0,s=0;oZp;e>>=Yp,t+=1);return t}function Ed(e,t,r){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=Kp(e),o=Kp(e),s=0,i=()=>{n.fill(1),o.fill(0),s=0},a=(...f)=>r(o,n,...f),c=(f=Kp(0))=>{o=a(bd([0]),f),n=a(),f.length!==0&&(o=a(bd([1]),f),n=a())},u=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let f=0,l=[];for(;f{i(),c(f);let m;for(;!(m=l(u()));)c();return i(),m}}function lr(e,t,r={}){let n=(o,s,i)=>{let a=ig[s];if(typeof a!="function")throw new Error("invalid validator function");let c=e[o];if(!(i&&c===void 0)&&!a(c,e))throw new Error("param "+String(o)+" is invalid. Expected "+s+", got "+c)};for(let[o,s]of Object.entries(t))n(o,s,!1);for(let[o,s]of Object.entries(r))n(o,s,!0);return e}function Qp(e){let t=new WeakMap;return(r,...n)=>{let o=t.get(r);if(o!==void 0)return o;let s=e(r,...n);return t.set(r,s),s}}var Zp,Yp,wd,sg,ur,Wp,In,Kp,bd,ig,Bo=E(()=>{"use strict";Zp=BigInt(0),Yp=BigInt(1);wd=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",sg=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));ur={_0:48,_9:57,A:65,F:70,a:97,f:102};Wp=e=>typeof e=="bigint"&&Zp<=e;In=e=>(Yp<new Uint8Array(e),bd=e=>Uint8Array.from(e);ig={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||Sn(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)}});function Ee(e,t){let r=e%t;return r>=Re?r:t+r}function pg(e,t,r){if(tRe;)t&be&&(n=n*e%r),e=e*e%r,t>>=be;return n}function pt(e,t,r){let n=e;for(;t-- >Re;)n*=n,n%=r;return n}function ac(e,t){if(e===Re)throw new Error("invert: expected non-zero number");if(t<=Re)throw new Error("invert: expected positive modulus, got "+t);let r=Ee(e,t),n=t,o=Re,s=be,i=be,a=Re;for(;r!==Re;){let u=n/r,p=n%r,f=o-i*u,l=s-a*u;n=r,r=p,o=i,s=a,i=f,a=l}if(n!==be)throw new Error("invert: does not exist");return Ee(o,t)}function fg(e){let t=(e-be)/Pn,r,n,o;for(r=e-be,n=0;r%Pn===Re;r/=Pn,n++);for(o=Pn;o1e3)throw new Error("Cannot find square root: likely non-prime P");if(n===1){let i=(e+be)/ef;return function(c,u){let p=c.pow(u,i);if(!c.eql(c.sqr(p),u))throw new Error("Cannot find square root");return p}}let s=(r+be)/Pn;return function(a,c){if(a.pow(c,t)===a.neg(a.ONE))throw new Error("Cannot find square root");let u=n,p=a.pow(a.mul(a.ONE,o),r),f=a.pow(c,s),l=a.pow(c,r);for(;!a.eql(l,a.ONE);){if(a.eql(l,a.ZERO))return a.ZERO;let m=1;for(let x=a.sqr(l);m(n[o]="function",n),t);return lr(e,r)}function dg(e,t,r){if(rRe;)r&be&&(n=e.mul(n,o)),o=e.sqr(o),r>>=be;return n}function hg(e,t){let r=new Array(t.length),n=t.reduce((s,i,a)=>e.is0(i)?s:(r[a]=s,e.mul(s,i)),e.ONE),o=e.inv(n);return t.reduceRight((s,i,a)=>e.is0(i)?s:(r[a]=e.mul(s,r[a]),e.mul(s,i)),o),r}function tf(e,t){let r=t!==void 0?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function uc(e,t,r=!1,n={}){if(e<=Re)throw new Error("invalid field: expected ORDER > 0, got "+e);let{nBitLength:o,nByteLength:s}=tf(e,t);if(s>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let i,a=Object.freeze({ORDER:e,isLE:r,BITS:o,BYTES:s,MASK:In(o),ZERO:Re,ONE:be,create:c=>Ee(c,e),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return Re<=c&&cc===Re,isOdd:c=>(c&be)===be,neg:c=>Ee(-c,e),eql:(c,u)=>c===u,sqr:c=>Ee(c*c,e),add:(c,u)=>Ee(c+u,e),sub:(c,u)=>Ee(c-u,e),mul:(c,u)=>Ee(c*u,e),pow:(c,u)=>dg(a,c,u),div:(c,u)=>Ee(c*ac(u,e),e),sqrN:c=>c*c,addN:(c,u)=>c+u,subN:(c,u)=>c-u,mulN:(c,u)=>c*u,inv:c=>ac(c,e),sqrt:n.sqrt||(c=>(i||(i=lg(e)),i(a,c))),invertBatch:c=>hg(a,c),cmov:(c,u,p)=>p?u:c,toBytes:c=>r?Xp(c,s):Kt(c,s),fromBytes:c=>{if(c.length!==s)throw new Error("Field.fromBytes: expected "+s+" bytes, got "+c.length);return r?Jp(c):rt(c)}});return Object.freeze(a)}function Sd(e){if(typeof e!="bigint")throw new Error("field order must be bigint");let t=e.toString(2).length;return Math.ceil(t/8)}function rf(e){let t=Sd(e);return t+Math.ceil(t/2)}function Cd(e,t,r=!1){let n=e.length,o=Sd(t),s=rf(t);if(n<16||n1024)throw new Error("expected "+s+"-1024 bytes of input, got "+n);let i=r?Jp(e):rt(e),a=Ee(i,t-be)+be;return r?Xp(a,o):Kt(a,o)}var Re,be,Pn,ag,ef,Ad,Td,cg,ug,mg,Qs=E(()=>{"use strict";Bo();Re=BigInt(0),be=BigInt(1),Pn=BigInt(2),ag=BigInt(3),ef=BigInt(4),Ad=BigInt(5),Td=BigInt(8),cg=BigInt(9),ug=BigInt(16);mg=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"]});function nf(e,t){let r=t.negate();return e?r:t}function kd(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function of(e,t){kd(e,t);let r=Math.ceil(t/e)+1,n=2**(e-1),o=2**e,s=In(e),i=BigInt(e);return{windows:r,windowSize:n,mask:s,maxNumber:o,shiftBy:i}}function Pd(e,t,r){let{windowSize:n,mask:o,maxNumber:s,shiftBy:i}=r,a=Number(e&o),c=e>>i;a>n&&(a-=s,c+=cf);let u=t*n,p=u+Math.abs(a)-1,f=a===0,l=a<0,m=t%2!==0;return{nextN:c,offset:p,isZero:f,isNeg:l,isNegF:m,offsetF:u}}function yg(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((r,n)=>{if(!(r instanceof t))throw new Error("invalid point at index "+n)})}function xg(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((r,n)=>{if(!t.isValid(r))throw new Error("invalid scalar at index "+n)})}function af(e){return Bd.get(e)||1}function Rd(e,t){return{constTimeNegate:nf,hasPrecomputes(r){return af(r)!==1},unsafeLadder(r,n,o=e.ZERO){let s=r;for(;n>Id;)n&cf&&(o=o.add(s)),s=s.double(),n>>=cf;return o},precomputeWindow(r,n){let{windows:o,windowSize:s}=of(n,t),i=[],a=r,c=a;for(let u=0;u12?s-3:s>4?s-2:s?2:1,a=In(i),c=new Array(Number(a)+1).fill(o),u=Math.floor((t.BITS-1)/i)*i,p=o;for(let f=u;f>=0;f-=i){c.fill(o);for(let m=0;m>BigInt(f)&a);c[x]=c[x].add(r[m])}let l=o;for(let m=c.length-1,y=o;m>0;m--)y=y.add(c[m]),l=l.add(y);if(p=p.add(l),f!==0)for(let m=0;m{"use strict";Qs();Bo();Id=BigInt(0),cf=BigInt(1);sf=new WeakMap,Bd=new WeakMap});function Nd(e){e.lowS!==void 0&&Po("lowS",e.lowS),e.prehash!==void 0&&Po("prehash",e.prehash)}function bg(e){let t=uf(e);lr(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:r,Fp:n,a:o}=t;if(r){if(!n.eql(o,n.ZERO))throw new Error("invalid endomorphism, can only be defined for Koblitz curves that have a=0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error("invalid endomorphism, expected beta: bigint and splitScalar: function")}return Object.freeze({...t})}function gg(e){let t=bg(e),{Fp:r}=t,n=uc(t.n,t.nBitLength),o=t.toBytes||((x,d,h)=>{let b=d.toAffine();return Xe(Uint8Array.from([4]),r.toBytes(b.x),r.toBytes(b.y))}),s=t.fromBytes||(x=>{let d=x.subarray(1),h=r.fromBytes(d.subarray(0,r.BYTES)),b=r.fromBytes(d.subarray(r.BYTES,2*r.BYTES));return{x:h,y:b}});function i(x){let{a:d,b:h}=t,b=r.sqr(x),v=r.mul(b,x);return r.add(r.add(v,r.mul(x,d)),h)}if(!r.eql(r.sqr(t.Gy),i(t.Gx)))throw new Error("bad generator point: equation left != right");function a(x){return Cn(x,ce,t.n)}function c(x){let{allowedPrivateKeyLengths:d,nByteLength:h,wrapPrivateKey:b,n:v}=t;if(d&&typeof x!="bigint"){if(Sn(x)&&(x=ko(x)),typeof x!="string"||!d.includes(x.length))throw new Error("invalid private key");x=x.padStart(h*2,"0")}let A;try{A=typeof x=="bigint"?x:rt(Be("private key",x,h))}catch{throw new Error("invalid private key, expected hex or "+h+" bytes, got "+typeof x)}return b&&(A=Ee(A,v)),fr("private key",A,ce,v),A}function u(x){if(!(x instanceof l))throw new Error("ProjectivePoint expected")}let p=Qp((x,d)=>{let{px:h,py:b,pz:v}=x;if(r.eql(v,r.ONE))return{x:h,y:b};let A=x.is0();d==null&&(d=A?r.ONE:r.inv(v));let k=r.mul(h,d),S=r.mul(b,d),T=r.mul(v,d);if(A)return{x:r.ZERO,y:r.ZERO};if(!r.eql(T,r.ONE))throw new Error("invZ was invalid");return{x:k,y:S}}),f=Qp(x=>{if(x.is0()){if(t.allowInfinityPoint&&!r.is0(x.py))return;throw new Error("bad point: ZERO")}let{x:d,y:h}=x.toAffine();if(!r.isValid(d)||!r.isValid(h))throw new Error("bad point: x or y not FE");let b=r.sqr(h),v=i(d);if(!r.eql(b,v))throw new Error("bad point: equation left != right");if(!x.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class l{constructor(d,h,b){if(d==null||!r.isValid(d))throw new Error("x required");if(h==null||!r.isValid(h))throw new Error("y required");if(b==null||!r.isValid(b))throw new Error("z required");this.px=d,this.py=h,this.pz=b,Object.freeze(this)}static fromAffine(d){let{x:h,y:b}=d||{};if(!d||!r.isValid(h)||!r.isValid(b))throw new Error("invalid affine point");if(d instanceof l)throw new Error("projective point not allowed");let v=A=>r.eql(A,r.ZERO);return v(h)&&v(b)?l.ZERO:new l(h,b,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(d){let h=r.invertBatch(d.map(b=>b.pz));return d.map((b,v)=>b.toAffine(h[v])).map(l.fromAffine)}static fromHex(d){let h=l.fromAffine(s(Be("pointHex",d)));return h.assertValidity(),h}static fromPrivateKey(d){return l.BASE.multiply(c(d))}static msm(d,h){return _d(l,n,d,h)}_setWindowSize(d){y.setWindowSize(this,d)}assertValidity(){f(this)}hasEvenY(){let{y:d}=this.toAffine();if(r.isOdd)return!r.isOdd(d);throw new Error("Field doesn't support isOdd")}equals(d){u(d);let{px:h,py:b,pz:v}=this,{px:A,py:k,pz:S}=d,T=r.eql(r.mul(h,S),r.mul(A,v)),B=r.eql(r.mul(b,S),r.mul(k,v));return T&&B}negate(){return new l(this.px,r.neg(this.py),this.pz)}double(){let{a:d,b:h}=t,b=r.mul(h,pc),{px:v,py:A,pz:k}=this,S=r.ZERO,T=r.ZERO,B=r.ZERO,P=r.mul(v,v),H=r.mul(A,A),U=r.mul(k,k),L=r.mul(v,A);return L=r.add(L,L),B=r.mul(v,k),B=r.add(B,B),S=r.mul(d,B),T=r.mul(b,U),T=r.add(S,T),S=r.sub(H,T),T=r.add(H,T),T=r.mul(S,T),S=r.mul(L,S),B=r.mul(b,B),U=r.mul(d,U),L=r.sub(P,U),L=r.mul(d,L),L=r.add(L,B),B=r.add(P,P),P=r.add(B,P),P=r.add(P,U),P=r.mul(P,L),T=r.add(T,P),U=r.mul(A,k),U=r.add(U,U),P=r.mul(U,L),S=r.sub(S,P),B=r.mul(U,H),B=r.add(B,B),B=r.add(B,B),new l(S,T,B)}add(d){u(d);let{px:h,py:b,pz:v}=this,{px:A,py:k,pz:S}=d,T=r.ZERO,B=r.ZERO,P=r.ZERO,H=t.a,U=r.mul(t.b,pc),L=r.mul(h,A),ne=r.mul(b,k),R=r.mul(v,S),O=r.add(h,b),N=r.add(A,k);O=r.mul(O,N),N=r.add(L,ne),O=r.sub(O,N),N=r.add(h,v);let q=r.add(A,S);return N=r.mul(N,q),q=r.add(L,R),N=r.sub(N,q),q=r.add(b,v),T=r.add(k,S),q=r.mul(q,T),T=r.add(ne,R),q=r.sub(q,T),P=r.mul(H,N),T=r.mul(U,R),P=r.add(T,P),T=r.sub(ne,P),P=r.add(ne,P),B=r.mul(T,P),ne=r.add(L,L),ne=r.add(ne,L),R=r.mul(H,R),N=r.mul(U,N),ne=r.add(ne,R),R=r.sub(L,R),R=r.mul(H,R),N=r.add(N,R),L=r.mul(ne,N),B=r.add(B,L),L=r.mul(q,N),T=r.mul(O,T),T=r.sub(T,L),L=r.mul(O,ne),P=r.mul(q,P),P=r.add(P,L),new l(T,B,P)}subtract(d){return this.add(d.negate())}is0(){return this.equals(l.ZERO)}wNAF(d){return y.wNAFCached(this,d,l.normalizeZ)}multiplyUnsafe(d){let{endo:h,n:b}=t;fr("scalar",d,$t,b);let v=l.ZERO;if(d===$t)return v;if(this.is0()||d===ce)return this;if(!h||y.hasPrecomputes(this))return y.wNAFCachedUnsafe(this,d,l.normalizeZ);let{k1neg:A,k1:k,k2neg:S,k2:T}=h.splitScalar(d),B=v,P=v,H=this;for(;k>$t||T>$t;)k&ce&&(B=B.add(H)),T&ce&&(P=P.add(H)),H=H.double(),k>>=ce,T>>=ce;return A&&(B=B.negate()),S&&(P=P.negate()),P=new l(r.mul(P.px,h.beta),P.py,P.pz),B.add(P)}multiply(d){let{endo:h,n:b}=t;fr("scalar",d,ce,b);let v,A;if(h){let{k1neg:k,k1:S,k2neg:T,k2:B}=h.splitScalar(d),{p:P,f:H}=this.wNAF(S),{p:U,f:L}=this.wNAF(B);P=y.constTimeNegate(k,P),U=y.constTimeNegate(T,U),U=new l(r.mul(U.px,h.beta),U.py,U.pz),v=P.add(U),A=H.add(L)}else{let{p:k,f:S}=this.wNAF(d);v=k,A=S}return l.normalizeZ([v,A])[0]}multiplyAndAddUnsafe(d,h,b){let v=l.BASE,A=(S,T)=>T===$t||T===ce||!S.equals(v)?S.multiplyUnsafe(T):S.multiply(T),k=A(this,h).add(A(d,b));return k.is0()?void 0:k}toAffine(d){return p(this,d)}isTorsionFree(){let{h:d,isTorsionFree:h}=t;if(d===ce)return!0;if(h)return h(l,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:d,clearCofactor:h}=t;return d===ce?this:h?h(l,this):this.multiplyUnsafe(t.h)}toRawBytes(d=!0){return Po("isCompressed",d),this.assertValidity(),o(l,this,d)}toHex(d=!0){return Po("isCompressed",d),ko(this.toRawBytes(d))}}l.BASE=new l(t.Gx,t.Gy,r.ONE),l.ZERO=new l(r.ZERO,r.ONE,r.ZERO);let m=t.nBitLength,y=Rd(l,t.endo?Math.ceil(m/2):m);return{CURVE:t,ProjectivePoint:l,normPrivateKeyToScalar:c,weierstrassEquation:i,isWithinCurveOrder:a}}function wg(e){let t=uf(e);return lr(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function Od(e){let t=wg(e),{Fp:r,n}=t,o=r.BYTES+1,s=2*r.BYTES+1;function i(R){return Ee(R,n)}function a(R){return ac(R,n)}let{ProjectivePoint:c,normPrivateKeyToScalar:u,weierstrassEquation:p,isWithinCurveOrder:f}=gg({...t,toBytes(R,O,N){let q=O.toAffine(),D=r.toBytes(q.x),F=Xe;return Po("isCompressed",N),N?F(Uint8Array.from([O.hasEvenY()?2:3]),D):F(Uint8Array.from([4]),D,r.toBytes(q.y))},fromBytes(R){let O=R.length,N=R[0],q=R.subarray(1);if(O===o&&(N===2||N===3)){let D=rt(q);if(!Cn(D,ce,r.ORDER))throw new Error("Point is not on curve");let F=p(D),Q;try{Q=r.sqrt(F)}catch(I){let G=I instanceof Error?": "+I.message:"";throw new Error("Point is not on curve"+G)}let fe=(Q&ce)===ce;return(N&1)===1!==fe&&(Q=r.neg(Q)),{x:D,y:Q}}else if(O===s&&N===4){let D=r.fromBytes(q.subarray(0,r.BYTES)),F=r.fromBytes(q.subarray(r.BYTES,2*r.BYTES));return{x:D,y:F}}else{let D=o,F=s;throw new Error("invalid Point, expected length of "+D+", or uncompressed "+F+", got "+O)}}}),l=R=>ko(Kt(R,t.nByteLength));function m(R){let O=n>>ce;return R>O}function y(R){return m(R)?i(-R):R}let x=(R,O,N)=>rt(R.slice(O,N));class d{constructor(O,N,q){fr("r",O,ce,n),fr("s",N,ce,n),this.r=O,this.s=N,q!=null&&(this.recovery=q),Object.freeze(this)}static fromCompact(O){let N=t.nByteLength;return O=Be("compactSignature",O,N*2),new d(x(O,0,N),x(O,N,2*N))}static fromDER(O){let{r:N,s:q}=mr.toSig(Be("DER",O));return new d(N,q)}assertValidity(){}addRecoveryBit(O){return new d(this.r,this.s,O)}recoverPublicKey(O){let{r:N,s:q,recovery:D}=this,F=S(Be("msgHash",O));if(D==null||![0,1,2,3].includes(D))throw new Error("recovery id invalid");let Q=D===2||D===3?N+t.n:N;if(Q>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");let fe=(D&1)===0?"02":"03",w=c.fromHex(fe+l(Q)),I=a(Q),G=i(-F*I),Z=i(q*I),Y=c.BASE.multiplyAndAddUnsafe(w,G,Z);if(!Y)throw new Error("point at infinify");return Y.assertValidity(),Y}hasHighS(){return m(this.s)}normalizeS(){return this.hasHighS()?new d(this.r,i(-this.s),this.recovery):this}toDERRawBytes(){return Xs(this.toDERHex())}toDERHex(){return mr.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Xs(this.toCompactHex())}toCompactHex(){return l(this.r)+l(this.s)}}let h={isValidPrivateKey(R){try{return u(R),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{let R=rf(t.n);return Cd(t.randomBytes(R),t.n)},precompute(R=8,O=c.BASE){return O._setWindowSize(R),O.multiply(BigInt(3)),O}};function b(R,O=!0){return c.fromPrivateKey(R).toRawBytes(O)}function v(R){let O=Sn(R),N=typeof R=="string",q=(O||N)&&R.length;return O?q===o||q===s:N?q===2*o||q===2*s:R instanceof c}function A(R,O,N=!0){if(v(R))throw new Error("first arg must be private key");if(!v(O))throw new Error("second arg must be public key");return c.fromHex(O).multiply(u(R)).toRawBytes(N)}let k=t.bits2int||function(R){if(R.length>8192)throw new Error("input is too large");let O=rt(R),N=R.length*8-t.nBitLength;return N>0?O>>BigInt(N):O},S=t.bits2int_modN||function(R){return i(k(R))},T=In(t.nBitLength);function B(R){return fr("num < 2^"+t.nBitLength,R,$t,T),Kt(R,t.nByteLength)}function P(R,O,N=H){if(["recovered","canonical"].some(se=>se in N))throw new Error("sign() legacy options not supported");let{hash:q,randomBytes:D}=t,{lowS:F,prehash:Q,extraEntropy:fe}=N;F==null&&(F=!0),R=Be("msgHash",R),Nd(N),Q&&(R=Be("prehashed msgHash",q(R)));let w=S(R),I=u(O),G=[B(I),B(w)];if(fe!=null&&fe!==!1){let se=fe===!0?D(r.BYTES):fe;G.push(Be("extraEntropy",se))}let Z=Xe(...G),Y=w;function le(se){let ie=k(se);if(!f(ie))return;let pe=a(ie),$e=c.BASE.multiply(ie).toAffine(),gr=i($e.x);if(gr===$t)return;let zn=i(pe*i(Y+gr*I));if(zn===$t)return;let cn=($e.x===gr?0:2)|Number($e.y&ce),rp=zn;return F&&m(zn)&&(rp=y(zn),cn^=1),new d(gr,rp,cn)}return{seed:Z,k2sig:le}}let H={lowS:t.lowS,prehash:!1},U={lowS:t.lowS,prehash:!1};function L(R,O,N=H){let{seed:q,k2sig:D}=P(R,O,N),F=t;return Ed(F.hash.outputLen,F.nByteLength,F.hmac)(q,D)}c.BASE._setWindowSize(8);function ne(R,O,N,q=U){let D=R;O=Be("msgHash",O),N=Be("publicKey",N);let{lowS:F,prehash:Q,format:fe}=q;if(Nd(q),"strict"in q)throw new Error("options.strict was renamed to lowS");if(fe!==void 0&&fe!=="compact"&&fe!=="der")throw new Error("format must be compact or der");let w=typeof D=="string"||Sn(D),I=!w&&!fe&&typeof D=="object"&&D!==null&&typeof D.r=="bigint"&&typeof D.s=="bigint";if(!w&&!I)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let G,Z;try{if(I&&(G=new d(D.r,D.s)),w){try{fe!=="compact"&&(G=d.fromDER(D))}catch(cn){if(!(cn instanceof mr.Err))throw cn}!G&&fe!=="der"&&(G=d.fromCompact(D))}Z=c.fromHex(N)}catch{return!1}if(!G||F&&G.hasHighS())return!1;Q&&(O=t.hash(O));let{r:Y,s:le}=G,se=S(O),ie=a(le),pe=i(se*ie),$e=i(Y*ie),gr=c.BASE.multiplyAndAddUnsafe(Z,pe,$e)?.toAffine();return gr?i(gr.x)===Y:!1}return{CURVE:t,getPublicKey:b,getSharedSecret:A,sign:L,verify:ne,ProjectivePoint:c,Signature:d,utils:h}}function vg(e,t){let r=e.ORDER,n=$t;for(let y=r-ce;y%Lr===$t;y/=Lr)n+=ce;let o=n,s=Lr<{let d=f,h=e.pow(x,u),b=e.sqr(h);b=e.mul(b,x);let v=e.mul(y,b);v=e.pow(v,c),v=e.mul(v,h),h=e.mul(v,x),b=e.mul(v,y);let A=e.mul(b,h);v=e.pow(A,p);let k=e.eql(v,e.ONE);h=e.mul(b,l),v=e.mul(A,d),b=e.cmov(h,b,k),A=e.cmov(v,A,k);for(let S=o;S>ce;S--){let T=S-Lr;T=Lr<{let b=e.sqr(h),v=e.mul(d,h);b=e.mul(b,v);let A=e.pow(b,y);A=e.mul(A,v);let k=e.mul(A,x),S=e.mul(e.sqr(A),h),T=e.eql(S,d),B=e.cmov(k,A,T);return{isValid:T,value:B}}}return m}function Md(e,t){if(cc(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");let r=vg(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return n=>{let o,s,i,a,c,u,p,f;o=e.sqr(n),o=e.mul(o,t.Z),s=e.sqr(o),s=e.add(s,o),i=e.add(s,e.ONE),i=e.mul(i,t.B),a=e.cmov(t.Z,e.neg(s),!e.eql(s,e.ZERO)),a=e.mul(a,t.A),s=e.sqr(i),u=e.sqr(a),c=e.mul(u,t.A),s=e.add(s,c),s=e.mul(s,i),u=e.mul(u,a),c=e.mul(u,t.B),s=e.add(s,c),p=e.mul(o,i);let{isValid:l,value:m}=r(s,u);f=e.mul(o,n),f=e.mul(f,m),p=e.cmov(p,i,l),f=e.cmov(f,m,l);let y=e.isOdd(n)===e.isOdd(f);return f=e.cmov(e.neg(f),f,y),p=e.div(p,a),{x:p,y:f}}}var pf,mr,$t,ce,Lr,pc,Fd,ff=E(()=>{"use strict";$d();Qs();Bo();pf=class extends Error{constructor(t=""){super(t)}},mr={Err:pf,_tlv:{encode:(e,t)=>{let{Err:r}=mr;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length&1)throw new r("tlv.encode: unpadded data");let n=t.length/2,o=Js(n);if(o.length/2&128)throw new r("tlv.encode: long form length too big");let s=n>127?Js(o.length/2|128):"";return Js(e)+s+o+t},decode(e,t){let{Err:r}=mr,n=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length<2||t[n++]!==e)throw new r("tlv.decode: wrong tlv");let o=t[n++],s=!!(o&128),i=0;if(!s)i=o;else{let c=o&127;if(!c)throw new r("tlv.decode(long): indefinite length not supported");if(c>4)throw new r("tlv.decode(long): byte length is too big");let u=t.subarray(n,n+c);if(u.length!==c)throw new r("tlv.decode: length bytes not complete");if(u[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(let p of u)i=i<<8|p;if(n+=c,i<128)throw new r("tlv.decode(long): not minimal encoding")}let a=t.subarray(n,n+i);if(a.length!==i)throw new r("tlv.decode: wrong value length");return{v:a,l:t.subarray(n+i)}}},_int:{encode(e){let{Err:t}=mr;if(e<$t)throw new t("integer: negative integers are not allowed");let r=Js(e);if(Number.parseInt(r[0],16)&8&&(r="00"+r),r.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){let{Err:t}=mr;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return rt(e)}},toSig(e){let{Err:t,_int:r,_tlv:n}=mr,o=Be("signature",e),{v:s,l:i}=n.decode(48,o);if(i.length)throw new t("invalid signature: left bytes after parsing");let{v:a,l:c}=n.decode(2,s),{v:u,l:p}=n.decode(2,c);if(p.length)throw new t("invalid signature: left bytes after parsing");return{r:r.decode(a),s:r.decode(u)}},hexFromSig(e){let{_tlv:t,_int:r}=mr,n=t.encode(2,r.encode(e.r)),o=t.encode(2,r.encode(e.s)),s=n+o;return t.encode(48,s)}},$t=BigInt(0),ce=BigInt(1),Lr=BigInt(2),pc=BigInt(3),Fd=BigInt(4)});function Eg(e){return{hash:e,hmac:(t,...r)=>Gp(e,t,km(...r)),randomBytes:Ba}}function zd(e,t){let r=n=>Od({...e,...Eg(n)});return{...r(t),create:r}}var Ud=E(()=>{"use strict";yd();xn();ff();});function Hr(e,t){if(ei(e),ei(t),e<0||e>=1<<8*t)throw new Error("invalid I2OSP input: "+e);let r=Array.from({length:t}).fill(0);for(let n=t-1;n>=0;n--)r[n]=e&255,e>>>=8;return new Uint8Array(r)}function Tg(e,t){let r=new Uint8Array(e.length);for(let n=0;n255&&(t=n(Xe(ic("H2C-OVERSIZE-DST-"),t)));let{outputLen:o,blockLen:s}=n,i=Math.ceil(r/o);if(r>65535||i>255)throw new Error("expand_message_xmd: invalid lenInBytes");let a=Xe(t,Hr(t.length,1)),c=Hr(0,s),u=Hr(r,2),p=new Array(i),f=n(Xe(c,e,u,Hr(0,1),a));p[0]=n(Xe(f,Hr(1,1),a));for(let m=1;m<=i;m++){let y=[Tg(f,p[m-1]),Hr(m+1,1),a];p[m]=n(Xe(...y))}return Xe(...p).slice(0,r)}function Cg(e,t,r,n,o){if(pr(e),pr(t),ei(r),t.length>255){let s=Math.ceil(2*n/8);t=o.create({dkLen:s}).update(ic("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return o.create({dkLen:r}).update(e).update(Hr(r,2)).update(t).update(Hr(t.length,1)).digest()}function Ld(e,t,r){lr(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});let{p:n,k:o,m:s,hash:i,expand:a,DST:c}=r;pr(e),ei(t);let u=typeof c=="string"?ic(c):c,p=n.toString(2).length,f=Math.ceil((p+o)/8),l=t*s*f,m;if(a==="xmd")m=Sg(e,u,l,i);else if(a==="xof")m=Cg(e,u,l,o,i);else if(a==="_internal_pass")m=e;else throw new Error('expand must be "xmd" or "xof"');let y=new Array(t);for(let x=0;xArray.from(n).reverse());return(n,o)=>{let[s,i,a,c]=r.map(u=>u.reduce((p,f)=>e.add(e.mul(p,n),f)));if(e.is0(i)||e.is0(c))throw new Error("bad point: ZERO");return n=e.div(s,i),o=e.mul(o,e.div(a,c)),{x:n,y:o}}}function Dd(e,t,r){if(typeof t!="function")throw new Error("mapToCurve() must be defined");return{hashToCurve(n,o){let s=Ld(n,2,{...r,DST:r.DST,...o}),i=e.fromAffine(t(s[0])),a=e.fromAffine(t(s[1])),c=i.add(a).clearCofactor();return c.assertValidity(),c},encodeToCurve(n,o){let s=Ld(n,1,{...r,DST:r.encodeDST,...o}),i=e.fromAffine(t(s[0])).clearCofactor();return i.assertValidity(),i},mapToCurve(n){if(!Array.isArray(n))throw new Error("mapToCurve: expected array of bigints");for(let s of n)if(typeof s!="bigint")throw new Error("mapToCurve: expected array of bigints");let o=e.fromAffine(t(n)).clearCofactor();return o.assertValidity(),o}}}var Ag,jd=E(()=>{"use strict";Qs();Bo();Ag=rt});var Xd={};np(Xd,{encodeToCurve:()=>Ng,hashToCurve:()=>$g,schnorr:()=>Bg,secp256k1:()=>kn});function Gd(e){let t=ni,r=BigInt(3),n=BigInt(6),o=BigInt(11),s=BigInt(22),i=BigInt(23),a=BigInt(44),c=BigInt(88),u=e*e*e%t,p=u*u*e%t,f=pt(p,r,t)*p%t,l=pt(f,r,t)*p%t,m=pt(l,lc,t)*u%t,y=pt(m,o,t)*m%t,x=pt(y,s,t)*y%t,d=pt(x,a,t)*x%t,h=pt(d,c,t)*d%t,b=pt(h,a,t)*x%t,v=pt(b,r,t)*p%t,A=pt(v,i,t)*y%t,k=pt(A,n,t)*u%t,S=pt(k,lc,t);if(!Dr.eql(Dr.sqr(S),e))throw new Error("Cannot find square root");return S}function mc(e,...t){let r=Vd[e];if(r===void 0){let n=Ur(Uint8Array.from(e,o=>o.charCodeAt(0)));r=Xe(n,n),Vd[e]=r}return Ur(Xe(r,...t))}function df(e){let t=kn.utils.normPrivateKeyToScalar(e),r=yf.fromPrivateKey(t);return{scalar:r.hasEvenY()?t:ri(-t),bytes:hf(r)}}function Kd(e){fr("x",e,ti,ni);let t=lf(e*e),r=lf(t*e+BigInt(7)),n=Gd(r);n%lc!==Wd&&(n=lf(-n));let o=new yf(e,n,ti);return o.assertValidity(),o}function Yd(...e){return ri(Ro(mc("BIP0340/challenge",...e)))}function Pg(e){return df(e).bytes}function kg(e,t,r=Ba(32)){let n=Be("message",e),{bytes:o,scalar:s}=df(t),i=Be("auxRand",r,32),a=mf(s^Ro(mc("BIP0340/aux",i))),c=mc("BIP0340/nonce",a,o,n),u=ri(Ro(c));if(u===Wd)throw new Error("sign failed: k is zero");let{bytes:p,scalar:f}=df(u),l=Yd(p,o,n),m=new Uint8Array(64);if(m.set(p,0),m.set(mf(ri(f+l*s)),32),!Zd(m,n,o))throw new Error("sign: Invalid signature produced");return m}function Zd(e,t,r){let n=Be("signature",e,64),o=Be("message",t),s=Be("publicKey",r,32);try{let i=Kd(Ro(s)),a=Ro(n.subarray(0,32));if(!Cn(a,ti,ni))return!1;let c=Ro(n.subarray(32,64));if(!Cn(c,ti,fc))return!1;let u=Yd(mf(a),hf(i),o),p=Ig(i,c,ri(-u));return!(!p||!p.hasEvenY()||p.toAffine().x!==a)}catch{return!1}}var ni,fc,ti,lc,qd,Dr,kn,Wd,Vd,hf,mf,lf,ri,yf,Ig,Ro,Bg,Rg,_g,Jd,$g,Ng,xf=E(()=>{"use strict";hd();xn();Ud();jd();Qs();Bo();ff();ni=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),fc=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),ti=BigInt(1),lc=BigInt(2),qd=(e,t)=>(e+t/lc)/t;Dr=uc(ni,void 0,void 0,{sqrt:Gd}),kn=zd({a:BigInt(0),b:BigInt(7),Fp:Dr,n:fc,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=fc,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-ti*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=r,i=BigInt("0x100000000000000000000000000000000"),a=qd(s*e,t),c=qd(-n*e,t),u=Ee(e-a*r-c*o,t),p=Ee(-a*n-c*s,t),f=u>i,l=p>i;if(f&&(u=t-u),l&&(p=t-p),u>i||p>i)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:f,k1:u,k2neg:l,k2:p}}}},Ur),Wd=BigInt(0),Vd={};hf=e=>e.toRawBytes(!0).slice(1),mf=e=>Kt(e,32),lf=e=>Ee(e,ni),ri=e=>Ee(e,fc),yf=kn.ProjectivePoint,Ig=(e,t,r)=>yf.BASE.multiplyAndAddUnsafe(e,t,r);Ro=rt;Bg={getPublicKey:Pg,sign:kg,verify:Zd,utils:{randomPrivateKey:kn.utils.randomPrivateKey,lift_x:Kd,pointToBytes:hf,numberToBytesBE:Kt,bytesToNumberBE:rt,taggedHash:mc,mod:Ee}},Rg=Hd(Dr,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(e=>e.map(t=>BigInt(t)))),_g=Md(Dr,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:Dr.create(BigInt("-11"))}),Jd=Dd(kn.ProjectivePoint,e=>{let{x:t,y:r}=_g(Dr.create(e[0]));return Rg(t,r)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:Dr.ORDER,m:1,k:128,expand:"xmd",hash:Ur}),$g=Jd.hashToCurve,Ng=Jd.encodeToCurve});var dr,nt,_o,$o,No,Fo,Oo,Mo,zo,Uo,gt,wt,hr=E(()=>{"use strict";no();W();dr=class extends g{constructor({cause:t,message:r}={}){let n=r?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}};Object.defineProperty(dr,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(dr,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});nt=class extends g{constructor({cause:t,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${ke(r)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}};Object.defineProperty(nt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});_o=class extends g{constructor({cause:t,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${ke(r)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}};Object.defineProperty(_o,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});$o=class extends g{constructor({cause:t,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}};Object.defineProperty($o,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});No=class extends g{constructor({cause:t,nonce:r}={}){super([`Nonce provided for the transaction ${r?`(${r}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(` +`),{cause:t,name:"NonceTooLowError"})}};Object.defineProperty(No,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});Fo=class extends g{constructor({cause:t,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"})}};Object.defineProperty(Fo,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});Oo=class extends g{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(` +`),{cause:t,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}};Object.defineProperty(Oo,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});Mo=class extends g{constructor({cause:t,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"})}};Object.defineProperty(Mo,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});zo=class extends g{constructor({cause:t,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"})}};Object.defineProperty(zo,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});Uo=class extends g{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"})}};Object.defineProperty(Uo,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});gt=class extends g{constructor({cause:t,maxPriorityFeePerGas:r,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${r?` = ${ke(r)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${ke(n)} gwei`:""}).`].join(` +`),{cause:t,name:"TipAboveFeeCapError"})}};Object.defineProperty(gt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});wt=class extends g{constructor({cause:t}){super(`An error occurred while executing: ${t?.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}});function jr(e,t){let r=(e.details||"").toLowerCase(),n=e instanceof g?e.walk(o=>o?.code===dr.code):e;return n instanceof g?new dr({cause:e,message:n.details}):dr.nodeMessage.test(r)?new dr({cause:e,message:e.details}):nt.nodeMessage.test(r)?new nt({cause:e,maxFeePerGas:t?.maxFeePerGas}):_o.nodeMessage.test(r)?new _o({cause:e,maxFeePerGas:t?.maxFeePerGas}):$o.nodeMessage.test(r)?new $o({cause:e,nonce:t?.nonce}):No.nodeMessage.test(r)?new No({cause:e,nonce:t?.nonce}):Fo.nodeMessage.test(r)?new Fo({cause:e,nonce:t?.nonce}):Oo.nodeMessage.test(r)?new Oo({cause:e}):Mo.nodeMessage.test(r)?new Mo({cause:e,gas:t?.gas}):zo.nodeMessage.test(r)?new zo({cause:e,gas:t?.gas}):Uo.nodeMessage.test(r)?new Uo({cause:e}):gt.nodeMessage.test(r)?new gt({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new wt({cause:e})}var oi=E(()=>{"use strict";W();hr()});function qr(e,{format:t}){if(!t)return{};let r={};function n(s){let i=Object.keys(s);for(let a of i)a in e&&(r[a]=e[a]),s[a]&&typeof s[a]=="object"&&!Array.isArray(s[a])&&n(s[a])}let o=t(e||{});return n(o),r}var si=E(()=>{"use strict"});function Lo(e,t){return({exclude:r,format:n})=>({exclude:r,format:o=>{let s=t(o);if(r)for(let i of r)delete s[i];return{...s,...n(o)}},type:e})}var xc=E(()=>{"use strict"});function lt(e){let t={};return typeof e.authorizationList<"u"&&(t.authorizationList=zg(e.authorizationList)),typeof e.accessList<"u"&&(t.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(t.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?t.blobs=e.blobs.map(r=>te(r)):t.blobs=e.blobs),typeof e.data<"u"&&(t.data=e.data),typeof e.from<"u"&&(t.from=e.from),typeof e.gas<"u"&&(t.gas=_(e.gas)),typeof e.gasPrice<"u"&&(t.gasPrice=_(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(t.maxFeePerBlobGas=_(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(t.maxFeePerGas=_(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(t.maxPriorityFeePerGas=_(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(t.nonce=_(e.nonce)),typeof e.to<"u"&&(t.to=e.to),typeof e.type<"u"&&(t.type=Mg[e.type]),typeof e.value<"u"&&(t.value=_(e.value)),t}function zg(e){return e.map(t=>({address:t.address,r:t.r?_(BigInt(t.r)):t.r,s:t.s?_(BigInt(t.s)):t.s,chainId:_(t.chainId),nonce:_(t.nonce),...typeof t.yParity<"u"?{yParity:_(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:_(t.v)}:{}}))}var Mg,sh,Vr=E(()=>{"use strict";V();xc();Mg={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};sh=Lo("transactionRequest",lt)});function ih(e){if(!(!e||e.length===0))return e.reduce((t,{slot:r,value:n})=>{if(r.length!==66)throw new Ms({size:r.length,targetSize:66,type:"hex"});if(n.length!==66)throw new Ms({size:n.length,targetSize:66,type:"hex"});return t[r]=n,t},{})}function Ug(e){let{balance:t,nonce:r,state:n,stateDiff:o,code:s}=e,i={};if(s!==void 0&&(i.code=s),t!==void 0&&(i.balance=_(t)),r!==void 0&&(i.nonce=_(r)),n!==void 0&&(i.state=ih(n)),o!==void 0){if(i.state)throw new Ga;i.stateDiff=ih(o)}return i}function Ho(e){if(!e)return;let t={};for(let{address:r,...n}of e){if(!re(r,{strict:!1}))throw new ae({address:r});if(t[r])throw new Va({address:r});t[r]=Ug(n)}return t}var bc=E(()=>{"use strict";Rt();va();jp();yt();V()});var PI,kI,BI,RI,_I,$I,NI,FI,OI,MI,zI,UI,LI,HI,DI,jI,qI,VI,GI,WI,KI,YI,ZI,JI,XI,QI,eP,tP,rP,nP,oP,sP,iP,aP,cP,uP,pP,fP,lP,mP,dP,hP,yP,xP,bP,gP,wP,vP,EP,AP,TP,SP,CP,IP,PP,kP,BP,RP,_P,$P,NP,FP,OP,MP,zP,UP,LP,HP,DP,jP,qP,VP,GP,WP,KP,YP,ZP,JP,XP,QP,ek,tk,rk,nk,ok,sk,ik,ak,ck,uk,pk,fk,lk,mk,dk,Gr,gc=E(()=>{"use strict";PI=2n**(8n-1n)-1n,kI=2n**(16n-1n)-1n,BI=2n**(24n-1n)-1n,RI=2n**(32n-1n)-1n,_I=2n**(40n-1n)-1n,$I=2n**(48n-1n)-1n,NI=2n**(56n-1n)-1n,FI=2n**(64n-1n)-1n,OI=2n**(72n-1n)-1n,MI=2n**(80n-1n)-1n,zI=2n**(88n-1n)-1n,UI=2n**(96n-1n)-1n,LI=2n**(104n-1n)-1n,HI=2n**(112n-1n)-1n,DI=2n**(120n-1n)-1n,jI=2n**(128n-1n)-1n,qI=2n**(136n-1n)-1n,VI=2n**(144n-1n)-1n,GI=2n**(152n-1n)-1n,WI=2n**(160n-1n)-1n,KI=2n**(168n-1n)-1n,YI=2n**(176n-1n)-1n,ZI=2n**(184n-1n)-1n,JI=2n**(192n-1n)-1n,XI=2n**(200n-1n)-1n,QI=2n**(208n-1n)-1n,eP=2n**(216n-1n)-1n,tP=2n**(224n-1n)-1n,rP=2n**(232n-1n)-1n,nP=2n**(240n-1n)-1n,oP=2n**(248n-1n)-1n,sP=2n**(256n-1n)-1n,iP=-(2n**(8n-1n)),aP=-(2n**(16n-1n)),cP=-(2n**(24n-1n)),uP=-(2n**(32n-1n)),pP=-(2n**(40n-1n)),fP=-(2n**(48n-1n)),lP=-(2n**(56n-1n)),mP=-(2n**(64n-1n)),dP=-(2n**(72n-1n)),hP=-(2n**(80n-1n)),yP=-(2n**(88n-1n)),xP=-(2n**(96n-1n)),bP=-(2n**(104n-1n)),gP=-(2n**(112n-1n)),wP=-(2n**(120n-1n)),vP=-(2n**(128n-1n)),EP=-(2n**(136n-1n)),AP=-(2n**(144n-1n)),TP=-(2n**(152n-1n)),SP=-(2n**(160n-1n)),CP=-(2n**(168n-1n)),IP=-(2n**(176n-1n)),PP=-(2n**(184n-1n)),kP=-(2n**(192n-1n)),BP=-(2n**(200n-1n)),RP=-(2n**(208n-1n)),_P=-(2n**(216n-1n)),$P=-(2n**(224n-1n)),NP=-(2n**(232n-1n)),FP=-(2n**(240n-1n)),OP=-(2n**(248n-1n)),MP=-(2n**(256n-1n)),zP=2n**8n-1n,UP=2n**16n-1n,LP=2n**24n-1n,HP=2n**32n-1n,DP=2n**40n-1n,jP=2n**48n-1n,qP=2n**56n-1n,VP=2n**64n-1n,GP=2n**72n-1n,WP=2n**80n-1n,KP=2n**88n-1n,YP=2n**96n-1n,ZP=2n**104n-1n,JP=2n**112n-1n,XP=2n**120n-1n,QP=2n**128n-1n,ek=2n**136n-1n,tk=2n**144n-1n,rk=2n**152n-1n,nk=2n**160n-1n,ok=2n**168n-1n,sk=2n**176n-1n,ik=2n**184n-1n,ak=2n**192n-1n,ck=2n**200n-1n,uk=2n**208n-1n,pk=2n**216n-1n,fk=2n**224n-1n,lk=2n**232n-1n,mk=2n**240n-1n,dk=2n**248n-1n,Gr=2n**256n-1n});function ot(e){let{account:t,gasPrice:r,maxFeePerGas:n,maxPriorityFeePerGas:o,to:s}=e,i=t?K(t):void 0;if(i&&!re(i.address))throw new ae({address:i.address});if(s&&!re(s))throw new ae({address:s});if(typeof r<"u"&&(typeof n<"u"||typeof o<"u"))throw new Wa;if(n&&n>Gr)throw new nt({maxFeePerGas:n});if(o&&n&&o>n)throw new gt({maxFeePerGas:n,maxPriorityFeePerGas:o})}var Wr=E(()=>{"use strict";ve();gc();Rt();hr();_t();yt()});function Yt(e,t){if(!re(e,{strict:!1}))throw new ae({address:e});if(!re(t,{strict:!1}))throw new ae({address:t});return e.toLowerCase()===t.toLowerCase()}var Yo=E(()=>{"use strict";Rt();yt()});function st(e){let{abi:t,args:r,functionName:n,data:o}=e,s=t[0];if(n){let a=tt({abi:t,args:r,name:n});if(!a)throw new Ct(n,{docsPath:vf});s=a}if(s.type!=="function")throw new Ct(void 0,{docsPath:vf});if(!s.outputs)throw new Zn(s.name,{docsPath:vf});let i=ir(s.outputs,o);if(i&&i.length>1)return i;if(i&&i.length===1)return i[0]}var vf,Zr=E(()=>{"use strict";ye();Ws();_r();vf="/docs/contract/decodeFunctionResult"});var ai,Rc,xh,_c,bh,Ef,Af,Tf,Jr=E(()=>{"use strict";ai=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],Rc=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],xh=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"},{inputs:[],name:"ResolverNotContract",type:"error"},{inputs:[{name:"returnData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{components:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"errors",type:"tuple[]"}],name:"HttpError",type:"error"}],_c=[...xh,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]},{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],bh=[...xh,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]},{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],Ef=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],Af=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],Tf=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}]});var gh,wh=E(()=>{"use strict";gh="0x82ad56cb"});var $c,vh,Eh,Nc=E(()=>{"use strict";$c="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",vh="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",Eh="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572"});var Rn,Fc,Oc,ci,yr,Qo=E(()=>{"use strict";W();Rn=class extends g{constructor({blockNumber:t,chain:r,contract:n}){super(`Chain "${r.name}" does not support contract "${n.name}".`,{metaMessages:["This could be due to any of the following:",...t&&n.blockCreated&&n.blockCreated>t?[`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${n.name}" configured.`]],name:"ChainDoesNotSupportContract"})}},Fc=class extends g{constructor({chain:t,currentChainId:r}){super(`The current chain of the wallet (id: ${r}) does not match the target chain for the transaction (id: ${t.id} \u2013 ${t.name}).`,{metaMessages:[`Current Chain ID: ${r}`,`Expected Chain ID: ${t.id} \u2013 ${t.name}`],name:"ChainMismatchError"})}},Oc=class extends g{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(` +`),{name:"ChainNotFoundError"})}},ci=class extends g{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}},yr=class extends g{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}});function _n(e){let{abi:t,args:r,bytecode:n}=e;if(!r||r.length===0)return n;let o=t.find(i=>"type"in i&&i.type==="constructor");if(!o)throw new ua({docsPath:Sf});if(!("inputs"in o))throw new _s({docsPath:Sf});if(!o.inputs||o.inputs.length===0)throw new _s({docsPath:Sf});let s=De(o.inputs,r);return Te([n,s])}var Sf,Mc=E(()=>{"use strict";ye();et();Dt();Sf="/docs/contract/encodeDeployData"});function Et({blockNumber:e,chain:t,contract:r}){let n=t?.contracts?.[r];if(!n)throw new Rn({chain:t,contract:{name:r}});if(e&&n.blockCreated&&n.blockCreated>e)throw new Rn({blockNumber:e,chain:t,contract:{name:r,blockCreated:n.blockCreated}});return n.address}var $n=E(()=>{"use strict";Qo()});function zc(e,{docsPath:t,...r}){let n=(()=>{let o=jr(e,r);return o instanceof wt?e:o})();return new io(n,{docsPath:t,...r})}var Cf=E(()=>{"use strict";Nr();hr();oi()});function es(){let e=()=>{},t=()=>{};return{promise:new Promise((n,o)=>{e=n,t=o}),resolve:e,reject:t}}var Uc=E(()=>{"use strict"});function Lc({fn:e,id:t,shouldSplitBatch:r,wait:n=0,sort:o}){let s=async()=>{let p=c();i();let f=p.map(({args:l})=>l);f.length!==0&&e(f).then(l=>{o&&Array.isArray(l)&&l.sort(o);for(let m=0;m{for(let m=0;mIf.delete(t),a=()=>c().map(({args:p})=>p),c=()=>If.get(t)||[],u=p=>If.set(t,[...c(),p]);return{flush:i,async schedule(p){let{promise:f,resolve:l,reject:m}=es();return r?.([...a(),p])&&s(),c().length>0?(u({args:p,resolve:l,reject:m}),f):(u({args:p,resolve:l,reject:m}),setTimeout(s,n),f)}}}var If,Pf=E(()=>{"use strict";Uc();If=new Map});var Hc,Dc,jc,Ah=E(()=>{"use strict";qe();W();Qa();Hc=class extends g{constructor({callbackSelector:t,cause:r,data:n,extraData:o,sender:s,urls:i}){super(r.shortMessage||"An error occurred while fetching for an offchain result.",{cause:r,metaMessages:[...r.metaMessages||[],r.metaMessages?.length?"":[],"Offchain Gateway Call:",i&&[" Gateway URL(s):",...i.map(a=>` ${wn(a)}`)],` Sender: ${s}`,` Data: ${n}`,` Callback selector: ${t}`,` Extra data: ${o}`].flat(),name:"OffchainLookupError"})}},Dc=class extends g{constructor({result:t,url:r}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${wn(r)}`,`Response: ${X(t)}`],name:"OffchainLookupResponseMalformedError"})}},jc=class extends g{constructor({sender:t,to:r}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${r}`,`OffchainLookup sender address: ${t}`],name:"OffchainLookupSenderMismatchError"})}}});function Th(e){let{abi:t,data:r}=e,n=xt(r,0,4),o=t.find(s=>s.type==="function"&&n===jt(Ce(s)));if(!o)throw new ha(n,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:o.name,args:"inputs"in o&&o.inputs&&o.inputs.length>0?ir(o.inputs,xt(r,4)):void 0}}var Sh=E(()=>{"use strict";ye();Rr();Qn();Ws();tr()});function Bf(e){let{abi:t,errorName:r,args:n}=e,o=t[0];if(r){let c=tt({abi:t,args:n,name:r});if(!c)throw new $s(r,{docsPath:kf});o=c}if(o.type!=="error")throw new $s(void 0,{docsPath:kf});let s=Ce(o),i=jt(s),a="0x";if(n&&n.length>0){if(!o.inputs)throw new ma(o.name,{docsPath:kf});a=De(o.inputs,n)}return Te([i,a])}var kf,Ch=E(()=>{"use strict";ye();et();Qn();Dt();tr();_r();kf="/docs/contract/encodeErrorResult"});function Ih(e){let{abi:t,functionName:r,result:n}=e,o=t[0];if(r){let i=tt({abi:t,name:r});if(!i)throw new Ct(r,{docsPath:Rf});o=i}if(o.type!=="function")throw new Ct(void 0,{docsPath:Rf});if(!o.outputs)throw new Zn(o.name,{docsPath:Rf});let s=(()=>{if(o.outputs.length===0)return[];if(o.outputs.length===1)return[n];if(Array.isArray(n))return n;throw new Jn(n)})();return De(o.outputs,s)}var Rf,Ph=E(()=>{"use strict";ye();Dt();_r();Rf="/docs/contract/encodeFunctionResult"});async function kh(e){let{data:t,ccipRequest:r}=e,{args:[n]}=Th({abi:Rc,data:t}),o=[],s=[];return await Promise.all(n.map(async(i,a)=>{try{s[a]=await r(i),o[a]=!1}catch(c){o[a]=!0,s[a]=Vg(c)}})),Ih({abi:Rc,functionName:"query",result:[o,s]})}function Vg(e){return e.name==="HttpRequestError"&&e.status?Bf({abi:Rc,errorName:"HttpError",args:[e.status,e.shortMessage]}):Bf({abi:[za],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}var ts,qc=E(()=>{"use strict";Jr();qs();Sh();Ch();Ph();ts="x-batch-gateway:true"});var _h={};np(_h,{ccipRequest:()=>Rh,offchainLookup:()=>Wg,offchainLookupAbiItem:()=>Bh,offchainLookupSignature:()=>Gg});async function Wg(e,{blockNumber:t,blockTag:r,data:n,to:o}){let{args:s}=Ha({data:n,abi:[Bh]}),[i,a,c,u,p]=s,{ccipRead:f}=e,l=f&&typeof f?.request=="function"?f.request:Rh;try{if(!Yt(o,i))throw new jc({sender:i,to:o});let m=a.includes(ts)?await kh({data:c,ccipRequest:l}):await l({data:c,sender:i,urls:a}),{data:y}=await Zt(e,{blockNumber:t,blockTag:r,data:Ze([u,De([{type:"bytes"},{type:"bytes"}],[m,p])]),to:o});return y}catch(m){throw new Hc({callbackSelector:u,cause:m,data:n,extraData:p,sender:i,urls:a})}}async function Rh({data:e,sender:t,urls:r}){let n=new Error("An unknown error occurred.");for(let o=0;o{"use strict";rs();Ah();En();Lp();Dt();Yo();et();St();qc();qe();Gg="0x556f1830",Bh={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]}});async function Zt(e,t){let{account:r=e.account,batch:n=!!e.batch?.multicall,blockNumber:o,blockTag:s="latest",accessList:i,blobs:a,code:c,data:u,factory:p,factoryData:f,gas:l,gasPrice:m,maxFeePerBlobGas:y,maxFeePerGas:x,maxPriorityFeePerGas:d,nonce:h,to:b,value:v,stateOverride:A,...k}=t,S=r?K(r):void 0;if(c&&(p||f))throw new g("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(c&&b)throw new g("Cannot provide both `code` & `to` as parameters.");let T=c&&u,B=p&&f&&b&&u,P=T||B,H=T?Zg({code:c,data:u}):B?Jg({data:u,factory:p,factoryData:f,to:b}):u;try{ot(t);let L=(o?_(o):void 0)||s,ne=Ho(A),R=e.chain?.formatters?.transactionRequest?.format,N=(R||lt)({...qr(k,{format:R}),from:S?.address,accessList:i,blobs:a,data:H,gas:l,gasPrice:m,maxFeePerBlobGas:y,maxFeePerGas:x,maxPriorityFeePerGas:d,nonce:h,to:P?void 0:b,value:v});if(n&&Kg({request:N})&&!ne)try{return await Yg(e,{...N,blockNumber:o,blockTag:s})}catch(D){if(!(D instanceof ci)&&!(D instanceof Rn))throw D}let q=await e.request({method:"eth_call",params:ne?[N,L,ne]:[N,L]});return q==="0x"?{data:void 0}:{data:q}}catch(U){let L=Xg(U),{offchainLookup:ne,offchainLookupSignature:R}=await Promise.resolve().then(()=>($h(),_h));if(e.ccipRead!==!1&&L?.slice(0,10)===R&&b)return{data:await ne(e,{data:L,to:b})};throw P&&L?.slice(0,10)==="0x101bb98d"?new rc({factory:p}):zc(U,{...t,account:S,chain:e.chain})}}function Kg({request:e}){let{data:t,to:r,...n}=e;return!(!t||t.startsWith(gh)||!r||Object.values(n).filter(o=>typeof o<"u").length>0)}async function Yg(e,t){let{batchSize:r=1024,wait:n=0}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},{blockNumber:o,blockTag:s="latest",data:i,multicallAddress:a,to:c}=t,u=a;if(!u){if(!e.chain)throw new ci;u=Et({blockNumber:o,chain:e.chain,contract:"multicall3"})}let f=(o?_(o):void 0)||s,{schedule:l}=Lc({id:`${e.uid}.${f}`,wait:n,shouldSplitBatch(x){return x.reduce((h,{data:b})=>h+(b.length-2),0)>r*2},fn:async x=>{let d=x.map(v=>({allowFailure:!0,callData:v.data,target:v.to})),h=de({abi:ai,args:[d],functionName:"aggregate3"}),b=await e.request({method:"eth_call",params:[{data:h,to:u},f]});return st({abi:ai,args:[d],functionName:"aggregate3",data:b||"0x"})}}),[{returnData:m,success:y}]=await l({data:i,to:c});if(!y)throw new Gt({data:m});return m==="0x"?{data:void 0}:{data:m}}function Zg(e){let{code:t,data:r}=e;return _n({abi:sa(["constructor(bytes, bytes)"]),bytecode:$c,args:[t,r]})}function Jg(e){let{data:t,factory:r,factoryData:n,to:o}=e;return _n({abi:sa(["constructor(address, bytes, address, bytes)"]),bytecode:vh,args:[o,t,r,n]})}function Xg(e){if(!(e instanceof g))return;let t=e.walk();return typeof t?.data=="object"?t.data?.data:t.data}var rs=E(()=>{"use strict";aa();ve();Jr();wh();Nc();W();Qo();Nr();Zr();Mc();ct();$n();V();Cf();si();Vr();Pf();bc();Wr()});var e0,t0=E(()=>{"use strict";e0="1.0.8"});var _e,xs=E(()=>{"use strict";t0();_e=class e extends Error{constructor(t,r={}){let n=r.cause instanceof e?r.cause.details:r.cause?.message?r.cause.message:r.details,o=r.cause instanceof e&&r.cause.docsPath||r.docsPath,s=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...o?[`Docs: https://abitype.dev${o}`]:[],...n?[`Details: ${n}`]:[],`Version: abitype@${e0}`].join(` +`);super(s),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,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=o,this.metaMessages=r.metaMessages,this.shortMessage=t}}});function Ft(e,t){return e.exec(t)?.groups}var ul,pl,Ku,Yu=E(()=>{"use strict";ul=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,pl=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,Ku=/^\(.+?\).*?$/});function n0(e){return r0.test(e)}function o0(e){return Ft(r0,e)}function i0(e){return s0.test(e)}function a0(e){return Ft(s0,e)}function u0(e){return c0.test(e)}function p0(e){return Ft(c0,e)}function Zu(e){return f0.test(e)}function l0(e){return Ft(f0,e)}function d0(e){return m0.test(e)}function h0(e){return Ft(m0,e)}function x0(e){return y0.test(e)}function b0(e){return Ft(y0,e)}function g0(e){return Cw.test(e)}var r0,s0,c0,f0,m0,y0,Cw,w0,Ju,Xu=E(()=>{"use strict";Yu();r0=/^error (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;s0=/^event (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;c0=/^function (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)(?: (?external|public{1}))?(?: (?pure|view|nonpayable|payable{1}))?(?: returns\s?\((?.*?)\))?$/;f0=/^struct (?[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?.*?)\}$/;m0=/^constructor\((?.*?)\)(?:\s(?payable{1}))?$/;y0=/^fallback\(\) external(?:\s(?payable{1}))?$/;Cw=/^receive\(\) external payable$/;w0=new Set(["indexed"]),Ju=new Set(["calldata","memory","storage"])});var wi,Qu,fl=E(()=>{"use strict";xs();wi=class extends _e{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}},Qu=class extends _e{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}});var vi,Ei,Ai,Ti,Si,ll=E(()=>{"use strict";xs();vi=class extends _e{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}},Ei=class extends _e{constructor({param:t,name:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${r}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}},Ai=class extends _e{constructor({param:t,type:r,modifier:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${n}" not allowed${r?` in "${r}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}},Ti=class extends _e{constructor({param:t,type:r,modifier:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${n}" not allowed${r?` in "${r}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${n}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}},Si=class extends _e{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}});var Ot,Ci,Ii,ml=E(()=>{"use strict";xs();Ot=class extends _e{constructor({signature:t,type:r}){super(`Invalid ${r} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}},Ci=class extends _e{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}},Ii=class extends _e{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}});var Pi,v0=E(()=>{"use strict";xs();Pi=class extends _e{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}});var ki,E0=E(()=>{"use strict";xs();ki=class extends _e{constructor({current:t,depth:r}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${r>0?"opening":"closing"} parentheses.`],details:`Depth "${r}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}});function A0(e,t,r){let n="";if(r)for(let o of Object.entries(r)){if(!o)continue;let s="";for(let i of o[1])s+=`[${i.type}${i.name?`:${i.name}`:""}]`;n+=`(${o[0]}{${s}})`}return t?`${t}:${e}${n}`:e}var ep,T0=E(()=>{"use strict";ep=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]])});function S0(e,t={}){if(u0(e))return Iw(e,t);if(i0(e))return Pw(e,t);if(n0(e))return kw(e,t);if(d0(e))return Bw(e,t);if(x0(e))return Rw(e);if(g0(e))return{type:"receive",stateMutability:"payable"};throw new Ci({signature:e})}function Iw(e,t={}){let r=p0(e);if(!r)throw new Ot({signature:e,type:"function"});let n=Mt(r.parameters),o=[],s=n.length;for(let a=0;a{"use strict";Yu();fl();ll();ml();E0();T0();Xu();_w=/^(?[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,$w=/^\((?.+?)\)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,Nw=/^u?int$/;Fw=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/});function C0(e){let t={},r=e.length;for(let i=0;i{"use strict";Yu();fl();ll();ml();v0();Xu();hl();zw=/^(?[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?$/});function Bi(e){let t=C0(e),r=[],n=e.length;for(let o=0;o{"use strict";Xu();P0();hl()});var B0=E(()=>{"use strict";k0()});var R0,_0=E(()=>{"use strict";R0={gwei:9,wei:18}});function $0(e,t){let r=e.toString(),n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(t,"0");let[o,s]=[r.slice(0,r.length-t),r.slice(r.length-t)];return s=s.replace(/(0+)$/,""),`${n?"-":""}${o||"0"}${s?`.${s}`:""}`}var N0=E(()=>{"use strict"});function yl(e,t="wei"){return $0(e,R0[t])}var F0=E(()=>{"use strict";_0();N0()});var Zw={};np(Zw,{GooddollarSavingsWidget:()=>ge});var Ni=globalThis,Fi=Ni.ShadowRoot&&(Ni.ShadyCSS===void 0||Ni.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,op=Symbol(),vl=new WeakMap,gs=class{constructor(t,r,n){if(this._$cssResult$=!0,n!==op)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=r}get styleSheet(){let t=this.o,r=this.t;if(Fi&&t===void 0){let n=r!==void 0&&r.length===1;n&&(t=vl.get(r)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&vl.set(r,t))}return t}toString(){return this.cssText}},El=e=>new gs(typeof e=="string"?e:e+"",void 0,op),sp=(e,...t)=>{let r=e.length===1?e[0]:t.reduce((n,o,s)=>n+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+e[s+1],e[0]);return new gs(r,e,op)},Al=(e,t)=>{if(Fi)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),o=Ni.litNonce;o!==void 0&&n.setAttribute("nonce",o),n.textContent=r.cssText,e.appendChild(n)}},ip=Fi?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let r="";for(let n of t.cssRules)r+=n.cssText;return El(r)})(e):e;var{is:D0,defineProperty:j0,getOwnPropertyDescriptor:q0,getOwnPropertyNames:V0,getOwnPropertySymbols:G0,getPrototypeOf:W0}=Object,Oi=globalThis,Tl=Oi.trustedTypes,K0=Tl?Tl.emptyScript:"",Y0=Oi.reactiveElementPolyfillSupport,ws=(e,t)=>e,vs={toAttribute(e,t){switch(t){case Boolean:e=e?K0:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},Mi=(e,t)=>!D0(e,t),Sl={attribute:!0,type:String,converter:vs,reflect:!1,useDefault:!1,hasChanged:Mi};Symbol.metadata??=Symbol("metadata"),Oi.litPropertyMetadata??=new WeakMap;var er=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,r=Sl){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(t,r),!r.noAccessor){let n=Symbol(),o=this.getPropertyDescriptor(t,n,r);o!==void 0&&j0(this.prototype,t,o)}}static getPropertyDescriptor(t,r,n){let{get:o,set:s}=q0(this.prototype,t)??{get(){return this[r]},set(i){this[r]=i}};return{get:o,set(i){let a=o?.call(this);s?.call(this,i),this.requestUpdate(t,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Sl}static _$Ei(){if(this.hasOwnProperty(ws("elementProperties")))return;let t=W0(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(ws("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ws("properties"))){let r=this.properties,n=[...V0(r),...G0(r)];for(let o of n)this.createProperty(o,r[o])}let t=this[Symbol.metadata];if(t!==null){let r=litPropertyMetadata.get(t);if(r!==void 0)for(let[n,o]of r)this.elementProperties.set(n,o)}this._$Eh=new Map;for(let[r,n]of this.elementProperties){let o=this._$Eu(r,n);o!==void 0&&this._$Eh.set(o,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let r=[];if(Array.isArray(t)){let n=new Set(t.flat(1/0).reverse());for(let o of n)r.unshift(ip(o))}else t!==void 0&&r.push(ip(t));return r}static _$Eu(t,r){let n=r.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,r=this.constructor.elementProperties;for(let n of r.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Al(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,r,n){this._$AK(t,n)}_$ET(t,r){let n=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,n);if(o!==void 0&&n.reflect===!0){let s=(n.converter?.toAttribute!==void 0?n.converter:vs).toAttribute(r,n.type);this._$Em=t,s==null?this.removeAttribute(o):this.setAttribute(o,s),this._$Em=null}}_$AK(t,r){let n=this.constructor,o=n._$Eh.get(t);if(o!==void 0&&this._$Em!==o){let s=n.getPropertyOptions(o),i=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:vs;this._$Em=o;let a=i.fromAttribute(r,s.type);this[o]=a??this._$Ej?.get(o)??a,this._$Em=null}}requestUpdate(t,r,n){if(t!==void 0){let o=this.constructor,s=this[t];if(n??=o.getPropertyOptions(t),!((n.hasChanged??Mi)(s,r)||n.useDefault&&n.reflect&&s===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,n))))return;this.C(t,r,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,r,{useDefault:n,reflect:o,wrapped:s},i){n&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??r??this[t]),s!==!0||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||n||(r=void 0),this._$AL.set(t,r)),o===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[o,s]of this._$Ep)this[o]=s;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[o,s]of n){let{wrapped:i}=s,a=this[o];i!==!0||this._$AL.has(o)||a===void 0||this.C(o,void 0,s,a)}}let t=!1,r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),this._$EO?.forEach(n=>n.hostUpdate?.()),this.update(r)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(r)}willUpdate(t){}_$AE(t){this._$EO?.forEach(r=>r.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(r=>this._$ET(r,this[r])),this._$EM()}updated(t){}firstUpdated(t){}};er.elementStyles=[],er.shadowRootOptions={mode:"open"},er[ws("elementProperties")]=new Map,er[ws("finalized")]=new Map,Y0?.({ReactiveElement:er}),(Oi.reactiveElementVersions??=[]).push("2.1.1");var mp=globalThis,zi=mp.trustedTypes,Cl=zi?zi.createPolicy("lit-html",{createHTML:e=>e}):void 0,_l="$lit$",vr=`lit$${Math.random().toFixed(9).slice(2)}$`,$l="?"+vr,Z0=`<${$l}>`,ln=document,As=()=>ln.createComment(""),Ts=e=>e===null||typeof e!="object"&&typeof e!="function",dp=Array.isArray,J0=e=>dp(e)||typeof e?.[Symbol.iterator]=="function",ap=`[ +\f\r]`,Es=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Il=/-->/g,Pl=/>/g,pn=RegExp(`>|${ap}(?:([^\\s"'>=/]+)(${ap}*=${ap}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),kl=/'/g,Bl=/"/g,Nl=/^(?:script|style|textarea|title)$/i,hp=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),Er=hp(1),xE=hp(2),bE=hp(3),mn=Symbol.for("lit-noChange"),Me=Symbol.for("lit-nothing"),Rl=new WeakMap,fn=ln.createTreeWalker(ln,129);function Fl(e,t){if(!dp(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Cl!==void 0?Cl.createHTML(t):t}var X0=(e,t)=>{let r=e.length-1,n=[],o,s=t===2?"":t===3?"":"",i=Es;for(let a=0;a"?(i=o??Es,f=-1):p[1]===void 0?f=-2:(f=i.lastIndex-p[2].length,u=p[1],i=p[3]===void 0?pn:p[3]==='"'?Bl:kl):i===Bl||i===kl?i=pn:i===Il||i===Pl?i=Es:(i=pn,o=void 0);let m=i===pn&&e[a+1].startsWith("/>")?" ":"";s+=i===Es?c+Z0:f>=0?(n.push(u),c.slice(0,f)+_l+c.slice(f)+vr+m):c+vr+(f===-2?a:m)}return[Fl(e,s+(e[r]||"")+(t===2?"":t===3?"":"")),n]},Ss=class e{constructor({strings:t,_$litType$:r},n){let o;this.parts=[];let s=0,i=0,a=t.length-1,c=this.parts,[u,p]=X0(t,r);if(this.el=e.createElement(u,n),fn.currentNode=this.el.content,r===2||r===3){let f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(o=fn.nextNode())!==null&&c.length0){o.textContent=zi?zi.emptyScript:"";for(let m=0;m2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=Me}_$AI(t,r=this,n,o){let s=this.strings,i=!1;if(s===void 0)t=Dn(this,t,r,0),i=!Ts(t)||t!==this._$AH&&t!==mn,i&&(this._$AH=t);else{let a=t,c,u;for(t=s[0],c=0;c{let n=r?.renderBefore??t,o=n._$litPart$;if(o===void 0){let s=r?.renderBefore??null;n._$litPart$=o=new Cs(t.insertBefore(As(),s),s,void 0,r??{})}return o._$AI(e),o};var yp=globalThis,Ar=class extends er{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ol(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return mn}};Ar._$litElement$=!0,Ar.finalized=!0,yp.litElementHydrateSupport?.({LitElement:Ar});var eb=yp.litElementPolyfillSupport;eb?.({LitElement:Ar});(yp.litElementVersions??=[]).push("4.2.1");var Ml=e=>(t,r)=>{r!==void 0?r.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)};var tb={attribute:!0,type:String,converter:vs,reflect:!1,hasChanged:Mi},rb=(e=tb,t,r)=>{let{kind:n,metadata:o}=r,s=globalThis.litPropertyMetadata.get(o);if(s===void 0&&globalThis.litPropertyMetadata.set(o,s=new Map),n==="setter"&&((e=Object.create(e)).wrapped=!0),s.set(r.name,e),n==="accessor"){let{name:i}=r;return{set(a){let c=t.get.call(this);t.set.call(this,a),this.requestUpdate(i,c,e)},init(a){return a!==void 0&&this.C(i,void 0,e,a),a}}}if(n==="setter"){let{name:i}=r;return function(a){let c=this[i];t.call(this,a),this.requestUpdate(i,c,e)}}throw Error("Unsupported decorator location: "+n)};function Is(e){return(t,r)=>typeof r=="object"?rb(e,t,r):((n,o,s)=>{let i=o.hasOwnProperty(s);return o.constructor.createProperty(s,n),i?Object.getOwnPropertyDescriptor(o,s):void 0})(e,t,r)}function Ye(e){return Is({...e,state:!0,attribute:!1})}function $(e,t,r){let n=e[t.name];if(typeof n=="function")return n;let o=e[r];return typeof o=="function"?o:s=>t(e,s)}ye();W();var wa=class extends g{constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"})}};ze();Bt();Ds();Dt();tr();_r();var Ym="/docs/contract/encodeEventTopics";function qt(e){let{abi:t,eventName:r,args:n}=e,o=t[0];if(r){let c=tt({abi:t,name:r});if(!c)throw new Ns(r,{docsPath:Ym});o=c}if(o.type!=="event")throw new Ns(void 0,{docsPath:Ym});let s=Ce(o),i=Br(s),a=[];if(n&&"inputs"in o){let c=o.inputs?.filter(p=>"indexed"in p&&p.indexed),u=Array.isArray(n)?n:Object.values(n).length>0?c?.map(p=>n[p.name])??[]:[];u.length>0&&(a=c?.map((p,f)=>Array.isArray(u[f])?u[f].map((l,m)=>Zm({param:p,value:u[f][m]})):typeof u[f]<"u"&&u[f]!==null?Zm({param:p,value:u[f]}):null)??[])}return[i,...a]}function Zm({param:e,value:t}){if(e.type==="string"||e.type==="bytes")return ue(ht(t));if(e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/))throw new wa(e.type);return De([e],[t])}V();function $r(e,{method:t}){let r={};return e.transport.type==="fallback"&&e.transport.onResponse?.(({method:n,response:o,status:s,transport:i})=>{s==="success"&&t===n&&(r[o]=i.request)}),n=>r[n]||e.request}async function Oa(e,t){let{address:r,abi:n,args:o,eventName:s,fromBlock:i,strict:a,toBlock:c}=t,u=$r(e,{method:"eth_newFilter"}),p=s?qt({abi:n,args:o,eventName:s}):void 0,f=await e.request({method:"eth_newFilter",params:[{address:r,fromBlock:typeof i=="bigint"?_(i):i,toBlock:typeof c=="bigint"?_(c):c,topics:p}]});return{abi:n,args:o,eventName:s,id:f,request:u(f),strict:!!a,type:"event"}}ve();ct();ye();W();Nr();En();Zs();var rg=3;function ut(e,{abi:t,address:r,args:n,docsPath:o,functionName:s,sender:i}){let a=e instanceof Gt?e:e instanceof g?e.walk(y=>"data"in y)||e.walk():{},{code:c,data:u,details:p,message:f,shortMessage:l}=a,m=e instanceof dt?new tc({functionName:s}):[rg,cr.code].includes(c)&&(u||p||f||l)?new vn({abi:t,data:typeof u=="object"?u.data:u,functionName:s,message:a instanceof Fr?p:l??f}):e;return new ec(m,{abi:t,args:n,contractAddress:r,docsPath:o,functionName:s,sender:i})}ve();W();bn();Bt();function fd(e){let t=ue(`0x${e.substring(4)}`).substring(26);return sr(`0x${t}`)}St();mt();He();V();async function eh({hash:e,signature:t}){let r=we(e)?e:z(e),{secp256k1:n}=await Promise.resolve().then(()=>(xf(),Xd));return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){let{r:u,s:p,v:f,yParity:l}=t,m=Number(l??f),y=Qd(m);return new n.Signature(he(u),he(p)).addRecoveryBit(y)}let i=we(t)?t:z(t);if(ee(i)!==65)throw new Error("invalid signature length");let a=xe(`0x${i.slice(130)}`),c=Qd(a);return n.Signature.fromCompact(i.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(r.substring(2)).toHex(!1)}`}function Qd(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function dc({hash:e,signature:t}){return fd(await eh({hash:e,signature:t}))}et();ze();V();W();La();ze();V();function ft(e,t="hex"){let r=th(e),n=to(new Uint8Array(r.length));return r.encode(n),t==="hex"?te(n.bytes):n.bytes}function th(e){return Array.isArray(e)?Fg(e.map(t=>th(t))):Og(e)}function Fg(e){let t=e.reduce((o,s)=>o+s.length,0),r=rh(t);return{length:t<=55?1+t:1+r+t,encode(o){t<=55?o.pushByte(192+t):(o.pushByte(247+r),r===1?o.pushUint8(t):r===2?o.pushUint16(t):r===3?o.pushUint24(t):o.pushUint32(t));for(let{encode:s}of e)s(o)}}}function Og(e){let t=typeof e=="string"?Pe(e):e,r=rh(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(o){t.length===1&&t[0]<128?o.pushBytes(t):t.length<=55?(o.pushByte(128+t.length),o.pushBytes(t)):(o.pushByte(183+r),r===1?o.pushUint8(t.length):r===2?o.pushUint16(t.length):r===3?o.pushUint24(t.length):o.pushUint32(t.length),o.pushBytes(t))}}}function rh(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new g("Length is too large.")}Bt();function nh(e){let{chainId:t,nonce:r,to:n}=e,o=e.contractAddress??e.address,s=ue(Te(["0x05",ft([t?_(t):"0x",o,r?_(r):"0x"])]));return n==="bytes"?Pe(s):s}async function hc(e){let{authorization:t,signature:r}=e;return dc({hash:nh(t),signature:r??t})}V();Ks();no();W();_t();var yc=class extends g{constructor(t,{account:r,docsPath:n,chain:o,data:s,gas:i,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:p,to:f,value:l}){let m=gn({from:r?.address,to:f,value:typeof l<"u"&&`${ar(l)} ${o?.nativeCurrency?.symbol||"ETH"}`,data:s,gas:i,gasPrice:typeof a<"u"&&`${ke(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${ke(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${ke(u)} gwei`,nonce:p});super(t.shortMessage,{cause:t,docsPath:n,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",m].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}};hr();oi();function oh(e,{docsPath:t,...r}){let n=(()=>{let o=jr(e,r);return o instanceof wt?e:o})();return new yc(n,{docsPath:t,...r})}si();Vr();bc();Wr();ve();no();W();var wc=class extends g{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}},Kr=class extends g{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}},vc=class extends g{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${ke(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}};He();W();var Do=class extends g{constructor({blockHash:t,blockNumber:r}){let n="Block";t&&(n=`Block at hash "${t}"`),r&&(n=`Block at number "${r}"`),super(`${n} could not be found.`,{name:"BlockNotFoundError"})}};V();xc();He();xc();var bf={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function Bn(e){let t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?xe(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?xe(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?bf[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=Lg(e.authorizationList)),t.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof t.v=="bigint"){if(t.v===0n||t.v===27n)return 0;if(t.v===1n||t.v===28n)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),t.type==="legacy"&&(delete t.accessList,delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),t.type==="eip2930"&&(delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),t.type==="eip1559"&&delete t.maxFeePerBlobGas,t}var ah=Lo("transaction",Bn);function Lg(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function ii(e){let t=(e.transactions??[]).map(r=>typeof r=="string"?r:Bn(r));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}var ch=Lo("block",ii);async function Ge(e,{blockHash:t,blockNumber:r,blockTag:n,includeTransactions:o}={}){let s=n??"latest",i=o??!1,a=r!==void 0?_(r):void 0,c=null;if(t?c=await e.request({method:"eth_getBlockByHash",params:[t,i]},{dedupe:!0}):c=await e.request({method:"eth_getBlockByNumber",params:[a||s,i]},{dedupe:!!a}),!c)throw new Do({blockHash:t,blockNumber:r});return(e.chain?.formatters?.block?.format||ii)(c)}async function jo(e){let t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function uh(e,t){return gf(e,t)}async function gf(e,t){let{block:r,chain:n=e.chain,request:o}=t||{};try{let s=n?.fees?.maxPriorityFeePerGas??n?.fees?.defaultPriorityFee;if(typeof s=="function"){let a=r||await $(e,Ge,"getBlock")({}),c=await s({block:a,client:e,request:o});if(c===null)throw new Error;return c}if(typeof s<"u")return s;let i=await e.request({method:"eth_maxPriorityFeePerGas"});return he(i)}catch{let[s,i]=await Promise.all([r?Promise.resolve(r):$(e,Ge,"getBlock")({}),$(e,jo,"getGasPrice")({})]);if(typeof s.baseFeePerGas!="bigint")throw new Kr;let a=i-s.baseFeePerGas;return a<0n?0n:a}}async function ph(e,t){return Ec(e,t)}async function Ec(e,t){let{block:r,chain:n=e.chain,request:o,type:s="eip1559"}=t||{},i=await(async()=>typeof n?.fees?.baseFeeMultiplier=="function"?n.fees.baseFeeMultiplier({block:r,client:e,request:o}):n?.fees?.baseFeeMultiplier??1.2)();if(i<1)throw new wc;let c=10**(i.toString().split(".")[1]?.length??0),u=l=>l*BigInt(Math.ceil(i*c))/BigInt(c),p=r||await $(e,Ge,"getBlock")({});if(typeof n?.fees?.estimateFeesPerGas=="function"){let l=await n.fees.estimateFeesPerGas({block:r,client:e,multiply:u,request:o,type:s});if(l!==null)return l}if(s==="eip1559"){if(typeof p.baseFeePerGas!="bigint")throw new Kr;let l=typeof o?.maxPriorityFeePerGas=="bigint"?o.maxPriorityFeePerGas:await gf(e,{block:p,chain:n,request:o}),m=u(p.baseFeePerGas);return{maxFeePerGas:o?.maxFeePerGas??m+l,maxPriorityFeePerGas:l}}return{gasPrice:o?.gasPrice??u(await $(e,jo,"getGasPrice")({}))}}He();V();async function qo(e,{address:t,blockTag:r="latest",blockNumber:n}){let o=await e.request({method:"eth_getTransactionCount",params:[t,n?_(n):r]},{dedupe:!!n});return xe(o)}ze();V();function Vo(e){let{kzg:t}=e,r=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),n=typeof e.blobs[0]=="string"?e.blobs.map(s=>Pe(s)):e.blobs,o=[];for(let s of n)o.push(Uint8Array.from(t.blobToKzgCommitment(s)));return r==="bytes"?o:o.map(s=>te(s))}ze();V();function Go(e){let{kzg:t}=e,r=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),n=typeof e.blobs[0]=="string"?e.blobs.map(i=>Pe(i)):e.blobs,o=typeof e.commitments[0]=="string"?e.commitments.map(i=>Pe(i)):e.commitments,s=[];for(let i=0;ite(i))}V();Vp();St();ze();V();function fh(e,t){let r=t||"hex",n=Ur(we(e,{strict:!1})?ht(e):e);return r==="bytes"?n:z(n)}function lh(e){let{commitment:t,version:r=1}=e,n=e.to??(typeof t=="string"?"hex":"bytes"),o=fh(t,"bytes");return o.set([r],0),n==="bytes"?o:te(o)}function Ac(e){let{commitments:t,version:r}=e,n=e.to??(typeof t[0]=="string"?"hex":"bytes"),o=[];for(let s of t)o.push(lh({commitment:s,to:n,version:r}));return o}W();var Tc=class extends g{constructor({maxSize:t,size:r}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${r} bytes`],name:"BlobSizeTooLargeError"})}},Wo=class extends g{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}},Sc=class extends g{constructor({hash:t,size:r}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${r}`],name:"InvalidVersionedHashSizeError"})}},Cc=class extends g{constructor({hash:t,version:r}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${1}`,`Received: ${r}`],name:"InvalidVersionedHashVersionError"})}};La();mt();ze();V();function mh(e){let t=e.to??(typeof e.data=="string"?"hex":"bytes"),r=typeof e.data=="string"?Pe(e.data):e.data,n=ee(r);if(!n)throw new Wo;if(n>761855)throw new Tc({maxSize:761855,size:n});let o=[],s=!0,i=0;for(;s;){let a=to(new Uint8Array(131072)),c=0;for(;c<4096;){let u=r.slice(i,i+31);if(a.pushByte(0),a.pushBytes(u),u.length<31){a.pushByte(128),s=!1;break}c++,i+=31}o.push(a)}return t==="bytes"?o.map(a=>a.bytes):o.map(a=>te(a.bytes))}function Ic(e){let{data:t,kzg:r,to:n}=e,o=e.blobs??mh({data:t,to:n}),s=e.commitments??Vo({blobs:o,kzg:r,to:n}),i=e.proofs??Go({blobs:o,commitments:s,kzg:r,to:n}),a=[];for(let c=0;c"u"&&f)if(c){let h=await d();l.nonce=await c.consume({address:f.address,chainId:h,client:e})}else l.nonce=await $(e,qo,"getTransactionCount")({address:f.address,blockTag:"pending"});if((u.includes("blobVersionedHashes")||u.includes("sidecars"))&&n&&i){let h=Vo({blobs:n,kzg:i});if(u.includes("blobVersionedHashes")){let b=Ac({commitments:h,to:"hex"});l.blobVersionedHashes=b}if(u.includes("sidecars")){let b=Go({blobs:n,commitments:h,kzg:i}),v=Ic({blobs:n,commitments:h,proofs:b,to:"hex"});l.sidecars=v}}if(u.includes("chainId")&&(l.chainId=await d()),(u.includes("fees")||u.includes("type"))&&typeof p>"u")try{l.type=Pc(l)}catch{let h=dh.get(e.uid);typeof h>"u"&&(h=typeof(await y())?.baseFeePerGas=="bigint",dh.set(e.uid,h)),l.type=h?"eip1559":"legacy"}if(u.includes("fees"))if(l.type!=="legacy"&&l.type!=="eip2930"){if(typeof l.maxFeePerGas>"u"||typeof l.maxPriorityFeePerGas>"u"){let h=await y(),{maxFeePerGas:b,maxPriorityFeePerGas:v}=await Ec(e,{block:h,chain:o,request:l});if(typeof t.maxPriorityFeePerGas>"u"&&t.maxFeePerGas&&t.maxFeePerGas"u"){let h=await y(),{gasPrice:b}=await Ec(e,{block:h,chain:o,request:l,type:"legacy"});l.gasPrice=b}}return u.includes("gas")&&typeof s>"u"&&(l.gas=await $(e,Ko,"estimateGas")({...l,account:f&&{address:f.address,type:"json-rpc"}})),ot(l),delete l.parameters,l}V();async function kc(e,{address:t,blockNumber:r,blockTag:n="latest"}){let o=r?_(r):void 0,s=await e.request({method:"eth_getBalance",params:[t,o||n]});return BigInt(s)}async function Ko(e,t){let{account:r=e.account}=t,n=r?K(r):void 0;try{let L=function(R){let{block:O,request:N,rpcStateOverride:q}=R;return e.request({method:"eth_estimateGas",params:q?[N,O??"latest",q]:O?[N,O]:[N]})};var o=L;let{accessList:s,authorizationList:i,blobs:a,blobVersionedHashes:c,blockNumber:u,blockTag:p,data:f,gas:l,gasPrice:m,maxFeePerBlobGas:y,maxFeePerGas:x,maxPriorityFeePerGas:d,nonce:h,value:b,stateOverride:v,...A}=await Yr(e,{...t,parameters:n?.type==="local"?void 0:["blobVersionedHashes"]}),S=(u?_(u):void 0)||p,T=Ho(v),B=await(async()=>{if(A.to)return A.to;if(i&&i.length>0)return await hc({authorization:i[0]}).catch(()=>{throw new g("`to` is required. Could not infer from `authorizationList`")})})();ot(t);let P=e.chain?.formatters?.transactionRequest?.format,U=(P||lt)({...qr(A,{format:P}),from:n?.address,accessList:s,authorizationList:i,blobs:a,blobVersionedHashes:c,data:f,gas:l,gasPrice:m,maxFeePerBlobGas:y,maxFeePerGas:x,maxPriorityFeePerGas:d,nonce:h,to:B,value:b}),ne=BigInt(await L({block:S,request:U,rpcStateOverride:T}));if(i){let R=await kc(e,{address:U.from}),O=await Promise.all(i.map(async N=>{let{address:q}=N,D=await L({block:S,request:{authorizationList:void 0,data:f,from:n?.address,to:q,value:_(R)},rpcStateOverride:T}).catch(()=>100000n);return 2n*BigInt(D)}));ne+=O.reduce((N,q)=>N+q,0n)}return ne}catch(s){throw oh(s,{...t,account:n,chain:e.chain})}}async function hh(e,t){let{abi:r,address:n,args:o,functionName:s,dataSuffix:i,...a}=t,c=de({abi:r,args:o,functionName:s});try{return await $(e,Ko,"estimateGas")({data:`${c}${i?i.replace("0x",""):""}`,to:n,...a})}catch(u){let p=a.account?K(a.account):void 0;throw ut(u,{abi:r,address:n,args:o,docsPath:"/docs/contract/estimateContractGas",functionName:s,sender:p?.address})}}_r();ye();Yo();ze();Bt();Ds();ye();mt();Ds();zp();Ws();tr();var yh="/docs/contract/decodeEventLog";function Zo(e){let{abi:t,data:r,strict:n,topics:o}=e,s=n??!0,[i,...a]=o;if(!i)throw new da({docsPath:yh});let c=t.length===1?t[0]:t.find(x=>x.type==="event"&&i===Br(Ce(x)));if(!(c&&"name"in c)||c.type!=="event")throw new Yn(i,{docsPath:yh});let{name:u,inputs:p}=c,f=p?.some(x=>!("name"in x&&x.name)),l=f?[]:{},m=p.filter(x=>"indexed"in x&&x.indexed);for(let x=0;x!("indexed"in x&&x.indexed));if(y.length>0){if(r&&r!=="0x")try{let x=ir(y,r);if(x)if(f)l=[...l,...x];else for(let d=0;d0?l:void 0}}function jg({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(ir([e],t)||[])[0]}function Jo(e){let{abi:t,args:r,logs:n,strict:o=!0}=e,s=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})();return n.map(i=>{try{let a=t.find(u=>u.type==="event"&&i.topics[0]===Br(u));if(!a)return null;let c=Zo({...i,abi:[a],strict:o});return s&&!s.includes(c.eventName)||!qg({args:c.args,inputs:a.inputs,matchArgs:r})?null:{...c,...i}}catch(a){let c,u;if(a instanceof Yn)return null;if(a instanceof It||a instanceof Ut){if(o)return null;c=a.abiItem.name,u=a.abiItem.inputs?.some(p=>!("name"in p&&p.name))}return{...i,args:u?[]:{},eventName:c}}}).filter(Boolean)}function qg(e){let{args:t,inputs:r,matchArgs:n}=e;if(!n)return!0;if(!t)return!1;function o(s,i,a){try{return s.type==="address"?Yt(i,a):s.type==="string"||s.type==="bytes"?ue(ht(i))===a:i===a}catch{return!1}}return Array.isArray(t)&&Array.isArray(n)?n.every((s,i)=>{if(s==null)return!0;let a=r[i];return a?(Array.isArray(s)?s:[s]).some(u=>o(a,u,t[i])):!1}):typeof t=="object"&&!Array.isArray(t)&&typeof n=="object"&&!Array.isArray(n)?Object.entries(n).every(([s,i])=>{if(i==null)return!0;let a=r.find(u=>u.name===s);return a?(Array.isArray(i)?i:[i]).some(u=>o(a,u,t[s])):!1}):!1}V();function We(e,{args:t,eventName:r}={}){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,...r?{args:t,eventName:r}:{}}}async function Xo(e,{address:t,blockHash:r,fromBlock:n,toBlock:o,event:s,events:i,args:a,strict:c}={}){let u=c??!1,p=i??(s?[s]:void 0),f=[];p&&(f=[p.flatMap(x=>qt({abi:[x],eventName:x.name,args:i?void 0:a}))],s&&(f=f[0]));let l;r?l=await e.request({method:"eth_getLogs",params:[{address:t,topics:f,blockHash:r}]}):l=await e.request({method:"eth_getLogs",params:[{address:t,topics:f,fromBlock:typeof n=="bigint"?_(n):n,toBlock:typeof o=="bigint"?_(o):o}]});let m=l.map(y=>We(y));return p?Jo({abi:p,args:a,logs:m,strict:u}):m}async function Bc(e,t){let{abi:r,address:n,args:o,blockHash:s,eventName:i,fromBlock:a,toBlock:c,strict:u}=t,p=i?tt({abi:r,name:i}):void 0,f=p?void 0:r.filter(l=>l.type==="event");return $(e,Xo,"getLogs")({address:n,args:o,blockHash:s,event:p,events:f,fromBlock:a,toBlock:c,strict:u})}Zr();ct();rs();async function je(e,t){let{abi:r,address:n,args:o,functionName:s,...i}=t,a=de({abi:r,args:o,functionName:s});try{let{data:c}=await $(e,Zt,"call")({...i,data:a,to:n});return st({abi:r,args:o,functionName:s,data:c||"0x"})}catch(c){throw ut(c,{abi:r,address:n,args:o,docsPath:"/docs/contract/readContract",functionName:s})}}ve();Zr();ct();rs();async function Nh(e,t){let{abi:r,address:n,args:o,dataSuffix:s,functionName:i,...a}=t,c=a.account?K(a.account):e.account,u=de({abi:r,args:o,functionName:i});try{let{data:p}=await $(e,Zt,"call")({batch:!1,data:`${u}${s?s.replace("0x",""):""}`,to:n,...a,account:c}),f=st({abi:r,args:o,functionName:i,data:p||"0x"}),l=r.filter(m=>"name"in m&&m.name===t.functionName);return{result:f,request:{abi:l,address:n,args:o,dataSuffix:s,functionName:i,...a,account:c}}}catch(p){throw ut(p,{abi:r,address:n,args:o,docsPath:"/docs/contract/simulateContract",functionName:i,sender:c?.address})}}ye();Zs();var _f=new Map,Fh=new Map,Qg=0;function Ke(e,t,r){let n=++Qg,o=()=>_f.get(e)||[],s=()=>{let p=o();_f.set(e,p.filter(f=>f.id!==n))},i=()=>{let p=o();if(!p.some(l=>l.id===n))return;let f=Fh.get(e);p.length===1&&f&&f(),s()},a=o();if(_f.set(e,[...a,{id:n,fns:t}]),a&&a.length>0)return i;let c={};for(let p in t)c[p]=(...f)=>{let l=o();if(l.length!==0)for(let m of l)m.fns[p]?.(...f)};let u=r(c);return typeof u=="function"&&Fh.set(e,u),i}async function ui(e){return new Promise(t=>setTimeout(t,e))}function At(e,{emitOnBegin:t,initialWaitTime:r,interval:n}){let o=!0,s=()=>o=!1;return(async()=>{let a;t&&(a=await e({unpoll:s}));let c=await r?.(a)??n;await ui(c);let u=async()=>{o&&(await e({unpoll:s}),await ui(n),u())};u()})(),s}qe();var e1=new Map,t1=new Map;function Oh(e){let t=(o,s)=>({clear:()=>s.delete(o),get:()=>s.get(o),set:i=>s.set(o,i)}),r=t(e,e1),n=t(e,t1);return{clear:()=>{r.clear(),n.clear()},promise:r,response:n}}async function Mh(e,{cacheKey:t,cacheTime:r=Number.POSITIVE_INFINITY}){let n=Oh(t),o=n.response.get();if(o&&r>0&&new Date().getTime()-o.created.getTime()`blockNumber.${e}`;async function Jt(e,{cacheTime:t=e.cacheTime}={}){let r=await Mh(()=>e.request({method:"eth_blockNumber"}),{cacheKey:r1(e.uid),cacheTime:t});return BigInt(r)}async function Xr(e,{filter:t}){let r="strict"in t&&t.strict,n=await t.request({method:"eth_getFilterChanges",params:[t.id]});if(typeof n[0]=="string")return n;let o=n.map(s=>We(s));return!("abi"in t)||!t.abi?o:Jo({abi:t.abi,logs:o,strict:r})}async function Qr(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}function zh(e,t){let{abi:r,address:n,args:o,batch:s=!0,eventName:i,fromBlock:a,onError:c,onLogs:u,poll:p,pollingInterval:f=e.pollingInterval,strict:l}=t;return(typeof p<"u"?p:typeof a=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="fallback"&&e.transport.transports[0].config.type==="webSocket"))?(()=>{let d=l??!1,h=X(["watchContractEvent",n,o,s,e.uid,i,f,d,a]);return Ke(h,{onLogs:u,onError:c},b=>{let v;a!==void 0&&(v=a-1n);let A,k=!1,S=At(async()=>{if(!k){try{A=await $(e,Oa,"createContractEventFilter")({abi:r,address:n,args:o,eventName:i,strict:d,fromBlock:a})}catch{}k=!0;return}try{let T;if(A)T=await $(e,Xr,"getFilterChanges")({filter:A});else{let B=await $(e,Jt,"getBlockNumber")({});v&&v{A&&await $(e,Qr,"uninstallFilter")({filter:A}),S()}})})():(()=>{let d=l??!1,h=X(["watchContractEvent",n,o,s,e.uid,i,f,d]),b=!0,v=()=>b=!1;return Ke(h,{onLogs:u,onError:c},A=>((async()=>{try{let k=(()=>{if(e.transport.type==="fallback"){let B=e.transport.transports.find(P=>P.config.type==="webSocket");return B?B.value:e.transport}return e.transport})(),S=i?qt({abi:r,eventName:i,args:o}):[],{unsubscribe:T}=await k.subscribe({params:["logs",{address:n,topics:S}],onData(B){if(!b)return;let P=B.result;try{let{eventName:H,args:U}=Zo({abi:r,data:P.data,topics:P.topics,strict:l}),L=We(P,{args:U,eventName:H});A.onLogs([L])}catch(H){let U,L;if(H instanceof It||H instanceof Ut){if(l)return;U=H.abiItem.name,L=H.abiItem.inputs?.some(R=>!("name"in R&&R.name))}let ne=We(P,{args:L?[]:{},eventName:U});A.onLogs([ne])}},onError(B){A.onError?.(B)}});v=T,b||v()}catch(k){c?.(k)}})(),()=>v()))})()}ve();W();var Ue=class extends g{constructor({docsPath:t}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(` +`),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"})}},en=class extends g{constructor({docsPath:t,metaMessages:r,type:n}){super(`Account type "${n}" is not supported.`,{docsPath:t,metaMessages:r,name:"AccountTypeNotSupportedError"})}};ct();ve();W();Qo();function Vc({chain:e,currentChainId:t}){if(!e)throw new Oc;if(t!==e.id)throw new Fc({chain:e,currentChainId:t})}hr();_t();oi();function Gc(e,{docsPath:t,...r}){let n=(()=>{let o=jr(e,r);return o instanceof wt?e:o})();return new Ja(n,{docsPath:t,...r})}si();Vr();js();Wr();async function ns(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}var $f=new Ht(128);async function os(e,t){let{account:r=e.account,chain:n=e.chain,accessList:o,authorizationList:s,blobs:i,data:a,gas:c,gasPrice:u,maxFeePerBlobGas:p,maxFeePerGas:f,maxPriorityFeePerGas:l,nonce:m,type:y,value:x,...d}=t;if(typeof r>"u")throw new Ue({docsPath:"/docs/actions/wallet/sendTransaction"});let h=r?K(r):null;try{ot(t);let b=await(async()=>{if(t.to)return t.to;if(t.to!==null&&s&&s.length>0)return await hc({authorization:s[0]}).catch(()=>{throw new g("`to` is required. Could not infer from `authorizationList`.")})})();if(h?.type==="json-rpc"||h===null){let v;n!==null&&(v=await $(e,vt,"getChainId")({}),Vc({currentChainId:v,chain:n}));let A=e.chain?.formatters?.transactionRequest?.format,S=(A||lt)({...qr(d,{format:A}),accessList:o,authorizationList:s,blobs:i,chainId:v,data:a,from:h?.address,gas:c,gasPrice:u,maxFeePerBlobGas:p,maxFeePerGas:f,maxPriorityFeePerGas:l,nonce:m,to:b,type:y,value:x}),T=$f.get(e.uid),B=T?"wallet_sendTransaction":"eth_sendTransaction";try{return await e.request({method:B,params:[S]},{retryCount:0})}catch(P){if(T===!1)throw P;let H=P;if(H.name==="InvalidInputRpcError"||H.name==="InvalidParamsRpcError"||H.name==="MethodNotFoundRpcError"||H.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[S]},{retryCount:0}).then(U=>($f.set(e.uid,!0),U)).catch(U=>{let L=U;throw L.name==="MethodNotFoundRpcError"||L.name==="MethodNotSupportedRpcError"?($f.set(e.uid,!1),H):L});throw H}}if(h?.type==="local"){let v=await $(e,Yr,"prepareTransactionRequest")({account:h,accessList:o,authorizationList:s,blobs:i,chain:n,data:a,gas:c,gasPrice:u,maxFeePerBlobGas:p,maxFeePerGas:f,maxPriorityFeePerGas:l,nonce:m,nonceManager:h.nonceManager,parameters:[...wf,"sidecars"],type:y,value:x,...d,to:b}),A=n?.serializers?.transaction,k=await h.signTransaction(v,{serializer:A});return await $(e,ns,"sendRawTransaction")({serializedTransaction:k})}throw h?.type==="smart"?new en({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new en({docsPath:"/docs/actions/wallet/sendTransaction",type:h?.type})}catch(b){throw b instanceof en?b:Gc(b,{...t,account:h,chain:t.chain||void 0})}}async function Uh(e,t){let{abi:r,account:n=e.account,address:o,args:s,dataSuffix:i,functionName:a,...c}=t;if(typeof n>"u")throw new Ue({docsPath:"/docs/contract/writeContract"});let u=n?K(n):null,p=de({abi:r,args:s,functionName:a});try{return await $(e,os,"sendTransaction")({data:`${p}${i?i.replace("0x",""):""}`,to:o,account:u,...c})}catch(f){throw ut(f,{abi:r,address:o,args:s,docsPath:"/docs/contract/writeContract",functionName:a,sender:u?.address})}}W();Uc();qe();He();He();var Nf={"0x0":"reverted","0x1":"success"};function Lh(e){let t={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(r=>We(r)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?xe(e.transactionIndex):null,status:e.status?Nf[e.status]:null,type:e.type?bf[e.type]||e.type:null};return e.blobGasPrice&&(t.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(t.blobGasUsed=BigInt(e.blobGasUsed)),t}async function Wc(e,t){let{atomic:r=!1,chainId:n,receipts:o,version:s="2.0.0",...i}=await e.request({method:"wallet_getCallsStatus",params:[t.id]}),[a,c]=(()=>{let u=i.status;return u>=100&&u<200?["pending",u]:u>=200&&u<300?["success",u]:u>=300&&u<700?["failure",u]:u==="CONFIRMED"?["success",200]:u==="PENDING"?["pending",100]:[void 0,u]})();return{...i,atomic:r,chainId:n?xe(n):void 0,receipts:o?.map(u=>({...u,blockNumber:he(u.blockNumber),gasUsed:he(u.gasUsed),status:Nf[u.status]}))??[],statusCode:c,status:a,version:s}}async function Hh(e,t){let{id:r,pollingInterval:n=e.pollingInterval,status:o=({statusCode:l})=>l>=200,timeout:s=6e4}=t,i=X(["waitForCallsStatus",e.uid,r]),{promise:a,resolve:c,reject:u}=es(),p,f=Ke(i,{resolve:c,reject:u},l=>{let m=At(async()=>{let y=x=>{clearTimeout(p),m(),x(),f()};try{let x=await Wc(e,{id:r});if(!o(x))return;y(()=>l.resolve(x))}catch(x){y(()=>l.reject(x))}},{interval:n,emitOnBegin:!0});return m});return p=s?setTimeout(()=>{f(),clearTimeout(p),u(new Ff({id:r}))},s):void 0,await a}var Ff=class extends g{constructor({id:t}){super(`Timed out while waiting for call bundle with id "${t}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}};ve();var Kc=256,Yc;function Zc(e=11){if(!Yc||Kc+e>256*2){Yc="",Kc=0;for(let t=0;t<256;t++)Yc+=(256+Math.random()*256|0).toString(16).substring(1)}return Yc.substring(Kc,Kc+++e)}function Jc(e){let{batch:t,cacheTime:r=e.pollingInterval??4e3,ccipRead:n,key:o="base",name:s="Base Client",pollingInterval:i=4e3,type:a="base"}=e,c=e.chain,u=e.account?K(e.account):void 0,{config:p,request:f,value:l}=e.transport({chain:c,pollingInterval:i}),m={...p,...l},y={account:u,batch:t,cacheTime:r,ccipRead:n,chain:c,key:o,name:s,pollingInterval:i,request:f,transport:m,type:a,uid:Zc()};function x(d){return h=>{let b=h(d);for(let A in y)delete b[A];let v={...d,...b};return Object.assign(v,{extend:x(v)})}}return Object.assign(y,{extend:x(y)})}W();En();Zs();V();js();var Xc=new Ht(8192);function Dh(e,{enabled:t=!0,id:r}){if(!t||!r)return e();if(Xc.get(r))return Xc.get(r);let n=e().finally(()=>Xc.delete(r));return Xc.set(r,n),n}function pi(e,{delay:t=100,retryCount:r=2,shouldRetry:n=()=>!0}={}){return new Promise((o,s)=>{let i=async({count:a=0}={})=>{let c=async({error:u})=>{let p=typeof t=="function"?t({count:a,error:u}):t;p&&await ui(p),i({count:a+1})};try{let u=await e();o(u)}catch(u){if(a{let{dedupe:o=!1,methods:s,retryDelay:i=150,retryCount:a=3,uid:c}={...t,...n},{method:u}=r;if(s?.exclude?.includes(u))throw new Or(new Error("method not supported"),{method:u});if(s?.include&&!s.include.includes(u))throw new Or(new Error("method not supported"),{method:u});let p=o?Lt(`${c}.${X(r)}`):void 0;return Dh(()=>pi(async()=>{try{return await e(r)}catch(f){let l=f;switch(l.code){case ao.code:throw new ao(l);case co.code:throw new co(l);case uo.code:throw new uo(l,{method:r.method});case po.code:throw new po(l);case cr.code:throw new cr(l);case Wt.code:throw new Wt(l);case fo.code:throw new fo(l);case lo.code:throw new lo(l);case mo.code:throw new mo(l);case Or.code:throw new Or(l,{method:r.method});case An.code:throw new An(l);case ho.code:throw new ho(l);case Tn.code:throw new Tn(l);case yo.code:throw new yo(l);case xo.code:throw new xo(l);case bo.code:throw new bo(l);case go.code:throw new go(l);case wo.code:throw new wo(l);case vo.code:throw new vo(l);case Eo.code:throw new Eo(l);case Ao.code:throw new Ao(l);case To.code:throw new To(l);case So.code:throw new So(l);case Co.code:throw new Co(l);case Io.code:throw new Io(l);case 5e3:throw new Tn(l);default:throw f instanceof g?f:new nc(l)}}},{delay:({count:f,error:l})=>{if(l&&l instanceof bt){let m=l?.headers?.get("Retry-After");if(m?.match(/\d/))return Number.parseInt(m)*1e3}return~~(1<n1(f)}),{enabled:o,id:p})}}function n1(e){return"code"in e&&typeof e.code=="number"?e.code===-1||e.code===An.code||e.code===cr.code:e instanceof bt&&e.status?e.status===403||e.status===408||e.status===413||e.status===429||e.status===500||e.status===502||e.status===503||e.status===504:!0}function Qc({key:e,methods:t,name:r,request:n,retryCount:o=3,retryDelay:s=150,timeout:i,type:a},c){let u=Zc();return{config:{key:e,methods:t,name:r,request:n,retryCount:o,retryDelay:s,timeout:i,type:a},request:jh(n,{methods:t,retryCount:o,retryDelay:s,uid:u}),value:c}}function Of(e,t={}){let{key:r="custom",methods:n,name:o="Custom Provider",retryDelay:s}=t;return({retryCount:i})=>Qc({key:r,methods:n,name:o,request:e.request.bind(e),retryCount:t.retryCount??i,retryDelay:s,type:"custom"})}En();W();var eu=class extends g{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}};Pf();En();function qh(e,{errorInstance:t=new Error("timed out"),timeout:r,signal:n}){return new Promise((o,s)=>{(async()=>{let i;try{let a=new AbortController;r>0&&(i=setTimeout(()=>{n?a.abort():s(t)},r)),o(await e({signal:a?.signal||null}))}catch(a){a?.name==="AbortError"&&s(t),s(a)}finally{clearTimeout(i)}})()})}qe();function o1(){return{current:0,take(){return this.current++},reset(){this.current=0}}}var Mf=o1();function Vh(e,t={}){return{async request(r){let{body:n,onRequest:o=t.onRequest,onResponse:s=t.onResponse,timeout:i=t.timeout??1e4}=r,a={...t.fetchOptions??{},...r.fetchOptions??{}},{headers:c,method:u,signal:p}=a;try{let f=await qh(async({signal:m})=>{let y={...a,body:Array.isArray(n)?X(n.map(b=>({jsonrpc:"2.0",id:b.id??Mf.take(),...b}))):X({jsonrpc:"2.0",id:n.id??Mf.take(),...n}),headers:{"Content-Type":"application/json",...c},method:u||"POST",signal:p||(i>0?m:null)},x=new Request(e,y),d=await o?.(x,y)??{...y,url:e};return await fetch(d.url??e,d)},{errorInstance:new Ys({body:n,url:e}),timeout:i,signal:!0});s&&await s(f);let l;if(f.headers.get("Content-Type")?.startsWith("application/json"))l=await f.json();else{l=await f.text();try{l=JSON.parse(l||"{}")}catch(m){if(f.ok)throw m;l={error:l}}}if(!f.ok)throw new bt({body:n,details:X(l.error)||f.statusText,headers:f.headers,status:f.status,url:e});return l}catch(f){throw f instanceof bt||f instanceof Ys?f:new bt({body:n,cause:f,url:e})}}}}function zf(e,t={}){let{batch:r,fetchOptions:n,key:o="http",methods:s,name:i="HTTP JSON-RPC",onFetchRequest:a,onFetchResponse:c,retryDelay:u,raw:p}=t;return({chain:f,retryCount:l,timeout:m})=>{let{batchSize:y=1e3,wait:x=0}=typeof r=="object"?r:{},d=t.retryCount??l,h=m??t.timeout??1e4,b=e||f?.rpcUrls.default.http[0];if(!b)throw new eu;let v=Vh(b,{fetchOptions:n,onRequest:a,onResponse:c,timeout:h});return Qc({key:o,methods:s,name:i,async request({method:A,params:k}){let S={method:A,params:k},{schedule:T}=Lc({id:b,wait:x,shouldSplitBatch(U){return U.length>y},fn:U=>v.request({body:U}),sort:(U,L)=>U.id-L.id}),B=async U=>r?T(U):[await v.request({body:U})],[{error:P,result:H}]=await B(S);if(p)return{error:P,result:H};if(P)throw new Fr({body:S,error:P,url:b});return H},retryCount:d,retryDelay:u,timeout:h,type:"http"},{fetchOptions:n,url:b})}}Jr();Zr();ct();$n();hn();V();qs();W();Nr();function ss(e,t){if(!(e instanceof g))return!1;let r=e.walk(n=>n instanceof vn);return r instanceof vn?!!(r.data?.errorName==="ResolverNotFound"||r.data?.errorName==="ResolverWildcardNotSupported"||r.data?.errorName==="ResolverNotContract"||r.data?.errorName==="ResolverError"||r.data?.errorName==="HttpError"||r.reason?.includes("Wildcard on non-extended resolvers is not supported")||t==="reverse"&&r.reason===Ma[50]):!1}qc();et();ze();V();Bt();St();function tu(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;let t=`0x${e.slice(1,65)}`;return we(t)?t:null}function is(e){let t=new Uint8Array(32).fill(0);if(!e)return te(t);let r=e.split(".");for(let n=r.length-1;n>=0;n-=1){let o=tu(r[n]),s=o?ht(o):ue(Pt(r[n]),"bytes");t=ue(Ze([t,s]),"bytes")}return te(t)}ze();function Gh(e){return`[${e.slice(2)}]`}ze();V();Bt();function Wh(e){let t=new Uint8Array(32).fill(0);return e?tu(e)||ue(Pt(e)):te(t)}function tn(e){let t=e.replace(/^\.|\.$/gm,"");if(t.length===0)return new Uint8Array(1);let r=new Uint8Array(Pt(t).byteLength+2),n=0,o=t.split(".");for(let s=0;s255&&(i=Pt(Gh(Wh(o[s])))),r[n]=i.length,r.set(i,n+1),n+=i.length+1}return r.byteLength!==n+1?r.slice(0,n+1):r}async function Kh(e,t){let{blockNumber:r,blockTag:n,coinType:o,name:s,gatewayUrls:i,strict:a}=t,{chain:c}=e,u=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Et({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})(),p=c?.ensTlds;if(p&&!p.some(f=>s.endsWith(f)))return null;try{let f=de({abi:Af,functionName:"addr",...o!=null?{args:[is(s),BigInt(o)]}:{args:[is(s)]}}),l={address:u,abi:_c,functionName:"resolve",args:[z(tn(s)),f,i??[ts]],blockNumber:r,blockTag:n},y=await $(e,je,"readContract")(l);if(y[0]==="0x")return null;let x=st({abi:Af,args:o!=null?[is(s),BigInt(o)]:void 0,functionName:"addr",data:y[0]});return x==="0x"||Ie(x)==="0x00"?null:x}catch(f){if(a)throw f;if(ss(f,"resolve"))return null;throw f}}W();var ru=class extends g{constructor({data:t}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(t)}`],name:"EnsAvatarInvalidMetadataError"})}},rn=class extends g{constructor({reason:t}){super(`ENS NFT avatar URI is invalid. ${t}`,{name:"EnsAvatarInvalidNftUriError"})}},as=class extends g{constructor({uri:t}){super(`Unable to resolve ENS avatar URI "${t}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}},nu=class extends g{constructor({namespace:t}){super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}};var s1=/(?https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,i1=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?[\w\-.]+))?(?\/.*)?$/,a1=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,c1=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function u1(e){try{let t=await fetch(e,{method:"HEAD"});return t.status===200?t.headers.get("content-type")?.startsWith("image/"):!1}catch(t){return typeof t=="object"&&typeof t.response<"u"||!globalThis.hasOwnProperty("Image")?!1:new Promise(r=>{let n=new Image;n.onload=()=>{r(!0)},n.onerror=()=>{r(!1)},n.src=e})}}function Yh(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function Uf({uri:e,gatewayUrls:t}){let r=a1.test(e);if(r)return{uri:e,isOnChain:!0,isEncoded:r};let n=Yh(t?.ipfs,"https://ipfs.io"),o=Yh(t?.arweave,"https://arweave.net"),s=e.match(s1),{protocol:i,subpath:a,target:c,subtarget:u=""}=s?.groups||{},p=i==="ipns:/"||a==="ipns/",f=i==="ipfs:/"||a==="ipfs/"||i1.test(e);if(e.startsWith("http")&&!p&&!f){let m=e;return t?.arweave&&(m=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:m,isOnChain:!1,isEncoded:!1}}if((p||f)&&c)return{uri:`${n}/${p?"ipns":"ipfs"}/${c}${u}`,isOnChain:!1,isEncoded:!1};if(i==="ar:/"&&c)return{uri:`${o}/${c}${u||""}`,isOnChain:!1,isEncoded:!1};let l=e.replace(c1,"");if(l.startsWith("o.json());return await ou({gatewayUrls:e,uri:Lf(r)})}catch{throw new as({uri:t})}}async function ou({gatewayUrls:e,uri:t}){let{uri:r,isOnChain:n}=Uf({uri:t,gatewayUrls:e});if(n||await u1(r))return r;throw new as({uri:t})}function Jh(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));let[r,n,o]=t.split("/"),[s,i]=r.split(":"),[a,c]=n.split(":");if(!s||s.toLowerCase()!=="eip155")throw new rn({reason:"Only EIP-155 supported"});if(!i)throw new rn({reason:"Chain ID not found"});if(!c)throw new rn({reason:"Contract address not found"});if(!o)throw new rn({reason:"Token ID not found"});if(!a)throw new rn({reason:"ERC namespace not found"});return{chainID:Number.parseInt(i),namespace:a.toLowerCase(),contractAddress:c,tokenID:o}}async function Xh(e,{nft:t}){if(t.namespace==="erc721")return je(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if(t.namespace==="erc1155")return je(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new nu({namespace:t.namespace})}async function Qh(e,{gatewayUrls:t,record:r}){return/eip155:/i.test(r)?p1(e,{gatewayUrls:t,record:r}):ou({uri:r,gatewayUrls:t})}async function p1(e,{gatewayUrls:t,record:r}){let n=Jh(r),o=await Xh(e,{nft:n}),{uri:s,isOnChain:i,isEncoded:a}=Uf({uri:o,gatewayUrls:t});if(i&&(s.includes("data:application/json;base64,")||s.startsWith("{"))){let u=a?atob(s.replace("data:application/json;base64,","")):s,p=JSON.parse(u);return ou({uri:Lf(p),gatewayUrls:t})}let c=n.tokenID;return n.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),Zh({gatewayUrls:t,uri:s.replace(/(?:0x)?{id}/,c)})}Jr();Zr();ct();$n();V();qc();async function su(e,t){let{blockNumber:r,blockTag:n,key:o,name:s,gatewayUrls:i,strict:a}=t,{chain:c}=e,u=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Et({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})(),p=c?.ensTlds;if(p&&!p.some(f=>s.endsWith(f)))return null;try{let f={address:u,abi:_c,functionName:"resolve",args:[z(tn(s)),de({abi:Ef,functionName:"text",args:[is(s),o]}),i??[ts]],blockNumber:r,blockTag:n},m=await $(e,je,"readContract")(f);if(m[0]==="0x")return null;let y=st({abi:Ef,functionName:"text",data:m[0]});return y===""?null:y}catch(f){if(a)throw f;if(ss(f,"resolve"))return null;throw f}}async function ey(e,{blockNumber:t,blockTag:r,assetGatewayUrls:n,name:o,gatewayUrls:s,strict:i,universalResolverAddress:a}){let c=await $(e,su,"getEnsText")({blockNumber:t,blockTag:r,key:"avatar",name:o,universalResolverAddress:a,gatewayUrls:s,strict:i});if(!c)return null;try{return await Qh(e,{record:c,gatewayUrls:n})}catch{return null}}Jr();$n();V();async function ty(e,{address:t,blockNumber:r,blockTag:n,gatewayUrls:o,strict:s,universalResolverAddress:i}){let a=i;if(!a){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");a=Et({blockNumber:r,chain:e.chain,contract:"ensUniversalResolver"})}let c=`${t.toLowerCase().substring(2)}.addr.reverse`;try{let u={address:a,abi:bh,functionName:"reverse",args:[z(tn(c))],blockNumber:r,blockTag:n},p=$(e,je,"readContract"),[f,l]=o?await p({...u,args:[...u.args,o]}):await p(u);return t.toLowerCase()!==l.toLowerCase()?null:f}catch(u){if(s)throw u;if(ss(u,"reverse"))return null;throw u}}$n();V();async function ry(e,t){let{blockNumber:r,blockTag:n,name:o}=t,{chain:s}=e,i=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!s)throw new Error("client chain not configured. universalResolverAddress is required.");return Et({blockNumber:r,chain:s,contract:"ensUniversalResolver"})})(),a=s?.ensTlds;if(a&&!a.some(u=>o.endsWith(u)))throw new Error(`${o} is not a valid ENS TLD (${a?.join(", ")}) for chain "${s.name}" (id: ${s.id}).`);let[c]=await $(e,je,"readContract")({address:i,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[z(tn(o))],blockNumber:r,blockTag:n});return c}rs();ve();V();Cf();si();Vr();Wr();async function iu(e,t){let{account:r=e.account,blockNumber:n,blockTag:o="latest",blobs:s,data:i,gas:a,gasPrice:c,maxFeePerBlobGas:u,maxFeePerGas:p,maxPriorityFeePerGas:f,to:l,value:m,...y}=t,x=r?K(r):void 0;try{ot(t);let h=(n?_(n):void 0)||o,b=e.chain?.formatters?.transactionRequest?.format,A=(b||lt)({...qr(y,{format:b}),from:x?.address,blobs:s,data:i,gas:a,gasPrice:c,maxFeePerBlobGas:u,maxFeePerGas:p,maxPriorityFeePerGas:f,to:l,value:m}),k=await e.request({method:"eth_createAccessList",params:[A,h]});return{accessList:k.accessList,gasUsed:BigInt(k.gasUsed)}}catch(d){throw zc(d,{...t,account:x,chain:e.chain})}}async function ny(e){let t=$r(e,{method:"eth_newBlockFilter"}),r=await e.request({method:"eth_newBlockFilter"});return{id:r,request:t(r),type:"block"}}V();async function au(e,{address:t,args:r,event:n,events:o,fromBlock:s,strict:i,toBlock:a}={}){let c=o??(n?[n]:void 0),u=$r(e,{method:"eth_newFilter"}),p=[];c&&(p=[c.flatMap(m=>qt({abi:[m],eventName:m.name,args:r}))],n&&(p=p[0]));let f=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:typeof s=="bigint"?_(s):s,toBlock:typeof a=="bigint"?_(a):a,...p.length?{topics:p}:{}}]});return{abi:c,args:r,eventName:n?n.name:void 0,fromBlock:s,id:f,request:u(f),strict:!!i,toBlock:a,type:"event"}}async function cu(e){let t=$r(e,{method:"eth_newPendingTransactionFilter"}),r=await e.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:t(r),type:"transaction"}}async function oy(e){let t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}He();V();async function sy(e,{blockHash:t,blockNumber:r,blockTag:n="latest"}={}){let o=r!==void 0?_(r):void 0,s;return t?s=await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:!0}):s=await e.request({method:"eth_getBlockTransactionCountByNumber",params:[o||n]},{dedupe:!!o}),xe(s)}V();async function Hf(e,{address:t,blockNumber:r,blockTag:n="latest"}){let o=r!==void 0?_(r):void 0,s=await e.request({method:"eth_getCode",params:[t,o||n]},{dedupe:!!o});if(s!=="0x")return s}W();var uu=class extends g{constructor({address:t}){super(`No EIP-712 domain found on contract "${t}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${t}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}};async function iy(e,t){let{address:r,factory:n,factoryData:o}=t;try{let[s,i,a,c,u,p,f]=await $(e,je,"readContract")({abi:f1,address:r,functionName:"eip712Domain",factory:n,factoryData:o});return{domain:{name:i,version:a,chainId:Number(c),verifyingContract:u,salt:p},extensions:f,fields:s}}catch(s){let i=s;throw i.name==="ContractFunctionExecutionError"&&i.cause.name==="ContractFunctionZeroDataError"?new uu({address:r}):i}}var f1=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];V();function ay(e){return{baseFeePerGas:e.baseFeePerGas.map(t=>BigInt(t)),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:e.reward?.map(t=>t.map(r=>BigInt(r)))}}async function cy(e,{blockCount:t,blockNumber:r,blockTag:n="latest",rewardPercentiles:o}){let s=r?_(r):void 0,i=await e.request({method:"eth_feeHistory",params:[_(t),s||n,o]},{dedupe:!!s});return ay(i)}async function uy(e,{filter:t}){let r=t.strict??!1,o=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(s=>We(s));return t.abi?Jo({abi:t.abi,logs:o,strict:r}):o}V();function py(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}ye();Rt();qe();W();var pu=class extends g{constructor({domain:t}){super(`Invalid domain "${X(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}},fu=class extends g{constructor({primaryType:t,types:r}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(r))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}},lu=class extends g{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}};yt();mt();V();Np();Dt();et();V();Bt();function fy(e){let{domain:t={},message:r,primaryType:n}=e,o={EIP712Domain:du({domain:t}),...e.types};mu({domain:t,message:r,primaryType:n,types:o});let s=["0x1901"];return t&&s.push(l1({domain:t,types:o})),n!=="EIP712Domain"&&s.push(ly({data:r,primaryType:n,types:o})),ue(Ze(s))}function l1({domain:e,types:t}){return ly({data:e,primaryType:"EIP712Domain",types:t})}function ly({data:e,primaryType:t,types:r}){let n=my({data:e,primaryType:t,types:r});return ue(n)}function my({data:e,primaryType:t,types:r}){let n=[{type:"bytes32"}],o=[m1({primaryType:t,types:r})];for(let s of r[t]){let[i,a]=hy({types:r,name:s.name,type:s.type,value:e[s.name]});n.push(i),o.push(a)}return De(n,o)}function m1({primaryType:e,types:t}){let r=z(d1({primaryType:e,types:t}));return ue(r)}function d1({primaryType:e,types:t}){let r="",n=dy({primaryType:e,types:t});n.delete(e);let o=[e,...Array.from(n).sort()];for(let s of o)r+=`${s}(${t[s].map(({name:i,type:a})=>`${a} ${i}`).join(",")})`;return r}function dy({primaryType:e,types:t},r=new Set){let o=e.match(/^\w*/u)?.[0];if(r.has(o)||t[o]===void 0)return r;r.add(o);for(let s of t[o])dy({primaryType:s.type,types:t},r);return r}function hy({types:e,name:t,type:r,value:n}){if(e[r]!==void 0)return[{type:"bytes32"},ue(my({data:n,primaryType:r,types:e}))];if(r==="bytes")return n=`0x${(n.length%2?"0":"")+n.slice(2)}`,[{type:"bytes32"},ue(n)];if(r==="string")return[{type:"bytes32"},ue(z(n))];if(r.lastIndexOf("]")===r.length-1){let o=r.slice(0,r.lastIndexOf("[")),s=n.map(i=>hy({name:t,type:o,types:e,value:i}));return[{type:"bytes32"},ue(De(s.map(([i])=>i),s.map(([,i])=>i)))]}return[{type:r},n]}qe();function yy(e){let{domain:t,message:r,primaryType:n,types:o}=e,s=(c,u)=>{let p={...u};for(let f of c){let{name:l,type:m}=f;m==="address"&&(p[l]=p[l].toLowerCase())}return p},i=o.EIP712Domain?t?s(o.EIP712Domain,t):{}:{},a=(()=>{if(n!=="EIP712Domain")return s(o[n],r)})();return X({domain:i,message:a,primaryType:n,types:o})}function mu(e){let{domain:t,message:r,primaryType:n,types:o}=e,s=(i,a)=>{for(let c of i){let{name:u,type:p}=c,f=a[u],l=p.match(Na);if(l&&(typeof f=="number"||typeof f=="bigint")){let[x,d,h]=l;_(f,{signed:d==="int",size:Number.parseInt(h)/8})}if(p==="address"&&typeof f=="string"&&!re(f))throw new ae({address:f});let m=p.match(Wm);if(m){let[x,d]=m;if(d&&ee(f)!==Number.parseInt(d))throw new xa({expectedSize:Number.parseInt(d),givenSize:ee(f)})}let y=o[p];y&&(h1(p),s(y,f))}};if(o.EIP712Domain&&t){if(typeof t!="object")throw new pu({domain:t});s(o.EIP712Domain,t)}if(n!=="EIP712Domain")if(o[n])s(o[n],r);else throw new fu({primaryType:n,types:o})}function du({domain:e}){return[typeof e?.name=="string"&&{name:"name",type:"string"},e?.version&&{name:"version",type:"string"},(typeof e?.chainId=="number"||typeof e?.chainId=="bigint")&&{name:"chainId",type:"uint256"},e?.verifyingContract&&{name:"verifyingContract",type:"address"},e?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}function h1(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new lu({type:e})}ct();V();_t();et();hn();V();gc();Rt();W();Qo();hr();yt();mt();Rr();He();function xy(e){let{authorizationList:t}=e;if(t)for(let r of t){let{chainId:n}=r,o=r.address;if(!re(o))throw new ae({address:o});if(n<0)throw new yr({chainId:n})}hu(e)}function by(e){let{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new Wo;for(let r of t){let n=ee(r),o=xe(xt(r,0,1));if(n!==32)throw new Sc({hash:r,size:n});if(o!==1)throw new Cc({hash:r,version:o})}}hu(e)}function hu(e){let{chainId:t,maxPriorityFeePerGas:r,maxFeePerGas:n,to:o}=e;if(t<=0)throw new yr({chainId:t});if(o&&!re(o))throw new ae({address:o});if(n&&n>Gr)throw new nt({maxFeePerGas:n});if(r&&n&&r>n)throw new gt({maxFeePerGas:n,maxPriorityFeePerGas:r})}function gy(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:o,to:s}=e;if(t<=0)throw new yr({chainId:t});if(s&&!re(s))throw new ae({address:s});if(r||o)throw new g("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(n&&n>Gr)throw new nt({maxFeePerGas:n})}function wy(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:o,to:s}=e;if(s&&!re(s))throw new ae({address:s});if(typeof t<"u"&&t<=0)throw new yr({chainId:t});if(r||o)throw new g("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(n&&n>Gr)throw new nt({maxFeePerGas:n})}Rt();_t();yt();function Nn(e){if(!e||e.length===0)return[];let t=[];for(let r=0;r"u"||typeof m>"u")){let v=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(S=>te(S)),A=e.kzg,k=Vo({blobs:v,kzg:A});if(typeof l>"u"&&(l=Ac({commitments:k})),typeof m>"u"){let S=Go({blobs:v,commitments:k,kzg:A});m=Ic({blobs:v,commitments:k,proofs:S})}}let y=Nn(p),x=[z(r),o?z(o):"0x",u?z(u):"0x",c?z(c):"0x",n?z(n):"0x",s??"0x",i?z(i):"0x",f??"0x",y,a?z(a):"0x",l??[],...nn(e,t)],d=[],h=[],b=[];if(m)for(let v=0;v{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(r>0)return BigInt(r*2)+BigInt(35n+t.v-27n);let m=27n+(t.v===27n?0n:1n);if(t.v!==m)throw new Ka({v:t.v});return m})(),f=Ie(t.r),l=Ie(t.s);u=[...u,z(p),f==="0x00"?"0x":f,l==="0x00"?"0x":l]}else r>0&&(u=[...u,z(r),"0x","0x"]);return ft(u)}function nn(e,t){let r=t??e,{v:n,yParity:o}=r;if(typeof r.r>"u")return[];if(typeof r.s>"u")return[];if(typeof n>"u"&&typeof o>"u")return[];let s=Ie(r.r),i=Ie(r.s);return[typeof o=="number"?o?z(1):"0x":n===0n?"0x":n===1n?z(1):n===27n?"0x":z(1),s==="0x00"?"0x":s,i==="0x00"?"0x":i]}function Ey(e){if(!e||e.length===0)return[];let t=[];for(let r of e){let{chainId:n,nonce:o,...s}=r,i=r.address;t.push([n?z(n):"0x",i,o?z(o):"0x",...nn({},s)])}return t}He();Bt();var Ay=`Ethereum Signed Message: +`;et();mt();V();function Ty(e){let t=typeof e=="string"?Lt(e):typeof e.raw=="string"?e.raw:te(e.raw),r=Lt(`${Ay}${ee(t)}`);return Ze([r,t])}function yu(e,t){return ue(Ty(e),t)}var xu="0x6492649264926492649264926492649264926492649264926492649264926492";Rr();function Sy(e){return $p(e,-32)===xu}Dt();et();ze();function Cy(e){let{address:t,data:r,signature:n,to:o="hex"}=e,s=Te([De([{type:"address"},{type:"bytes"},{type:"bytes"}],[t,r,n]),xu]);return o==="hex"?s:Pe(s)}W();var bu=class extends g{constructor({value:t}){super(`Number \`${t}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}};function Iy(e,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(e))throw new bu({value:e});let[r,n="0"]=e.split("."),o=r.startsWith("-");if(o&&(r=r.slice(1)),n=n.replace(/(0+)$/,""),t===0)Math.round(+`.${n}`)===1&&(r=`${BigInt(r)+1n}`),n="";else if(n.length>t){let[s,i,a]=[n.slice(0,t-1),n.slice(t-1,t),n.slice(t)],c=Math.round(+`${i}.${a}`);c>9?n=`${BigInt(s)+BigInt(1)}0`.padStart(s.length+1,"0"):n=`${s}${c}`,n.length>t&&(n=n.slice(1),r=`${BigInt(r)+1n}`),n=n.slice(0,t)}else n=n.padEnd(t,"0");return BigInt(`${o?"-":""}${r}${n}`)}ja();function cs(e,t="wei"){return Iy(e,Da[t])}function v1(e){return e.map(t=>({...t,value:BigInt(t.value)}))}function Py(e){return{...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?xe(e.nonce):void 0,storageProof:e.storageProof?v1(e.storageProof):void 0}}async function ky(e,{address:t,blockNumber:r,blockTag:n,storageKeys:o}){let s=n??"latest",i=r!==void 0?_(r):void 0,a=await e.request({method:"eth_getProof",params:[t,o,i||s]});return Py(a)}V();async function By(e,{address:t,blockNumber:r,blockTag:n="latest",slot:o}){let s=r!==void 0?_(r):void 0;return await e.request({method:"eth_getStorageAt",params:[t,o,s||n]})}_t();V();async function us(e,{blockHash:t,blockNumber:r,blockTag:n,hash:o,index:s}){let i=n||"latest",a=r!==void 0?_(r):void 0,c=null;if(o?c=await e.request({method:"eth_getTransactionByHash",params:[o]},{dedupe:!0}):t?c=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,_(s)]},{dedupe:!0}):(a||i)&&(c=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[a||i,_(s)]},{dedupe:!!a})),!c)throw new oo({blockHash:t,blockNumber:r,blockTag:i,hash:o,index:s});return(e.chain?.formatters?.transaction?.format||Bn)(c)}async function Ry(e,{hash:t,transactionReceipt:r}){let[n,o]=await Promise.all([$(e,Jt,"getBlockNumber")({}),t?$(e,us,"getTransaction")({hash:t}):void 0]),s=r?.blockNumber||o?.blockNumber;return s?n-s+1n:0n}_t();async function fi(e,{hash:t}){let r=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!r)throw new so({hash:t});return(e.chain?.formatters?.transactionReceipt?.format||Lh)(r)}Jr();ye();W();Nr();Zr();ct();$n();async function _y(e,t){let{allowFailure:r=!0,batchSize:n,blockNumber:o,blockTag:s,multicallAddress:i,stateOverride:a}=t,c=t.contracts,u=n??(typeof e.batch?.multicall=="object"&&e.batch.multicall.batchSize||1024),p=i;if(!p){if(!e.chain)throw new Error("client chain not configured. multicallAddress is required.");p=Et({blockNumber:o,chain:e.chain,contract:"multicall3"})}let f=[[]],l=0,m=0;for(let d=0;d0&&m>u&&f[l].length>0&&(l++,m=(k.length-2)/2,f[l]=[]),f[l]=[...f[l],{allowFailure:!0,callData:k,target:b}]}catch(k){let S=ut(k,{abi:h,address:b,args:v,docsPath:"/docs/contract/multicall",functionName:A});if(!r)throw S;f[l]=[...f[l],{allowFailure:!0,callData:"0x",target:b}]}}let y=await Promise.allSettled(f.map(d=>$(e,je,"readContract")({abi:ai,address:p,args:[d],blockNumber:o,blockTag:s,functionName:"aggregate3",stateOverride:a}))),x=[];for(let d=0;d{if(r.cause instanceof e){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause?.message?r.cause.message:r.details})(),o=r.cause instanceof e&&r.cause.docsPath||r.docsPath,i=`https://oxlib.sh${o??""}`,a=[t||"An error occurred.",...r.metaMessages?["",...r.metaMessages]:[],...n||o?["",n?`Details: ${n}`:void 0,o?`See: ${i}`:void 0]:[]].filter(c=>typeof c=="string").join(` +`);super(a,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{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,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:`ox@${Ny()}`}),this.cause=r.cause,this.details=n,this.docs=i,this.docsPath=o,this.shortMessage=t}walk(t){return Fy(this,t)}};function Fy(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?Fy(e.cause,t):t?null:e}var E1="#__bigint";function Oy(e,t,r){return JSON.stringify(e,(n,o)=>typeof t=="function"?t(n,o):typeof o=="bigint"?o.toString()+E1:o,r)}function My(e,t){if(Df(e)>t)throw new gu({givenSize:Df(e),maxSize:t})}var xr={zero:48,nine:57,A:65,F:70,a:97,f:102};function jf(e){if(e>=xr.zero&&e<=xr.nine)return e-xr.zero;if(e>=xr.A&&e<=xr.F)return e-(xr.A-10);if(e>=xr.a&&e<=xr.f)return e-(xr.a-10)}function zy(e,t={}){let{dir:r,size:n=32}=t;if(n===0)return e;if(e.length>n)throw new wu({size:e.length,targetSize:n,type:"Bytes"});let o=new Uint8Array(n);for(let s=0;st)throw new vu({givenSize:Le(e),maxSize:t})}function Uy(e,t){if(typeof t=="number"&&t>0&&t>Le(e)-1)throw new mi({offset:t,position:"start",size:Le(e)})}function Ly(e,t,r){if(typeof t=="number"&&typeof r=="number"&&Le(e)!==r-t)throw new mi({offset:r,position:"end",size:Le(e)})}function Vf(e,t={}){let{dir:r,size:n=32}=t;if(n===0)return e;let o=e.replace("0x","");if(o.length>n*2)throw new Eu({size:Math.ceil(o.length/2),targetSize:n,type:"Hex"});return`0x${o[r==="right"?"padEnd":"padStart"](n*2,"0")}`}var S1=new TextEncoder;function Dy(e){return e instanceof Uint8Array?e:typeof e=="string"?I1(e):C1(e)}function C1(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function I1(e,t={}){let{size:r}=t,n=e;r&&(li(e,r),n=Qt(e,r));let o=n.slice(2);o.length%2&&(o=`0${o}`);let s=o.length/2,i=new Uint8Array(s);for(let a=0,c=0;at.toString(16).padStart(2,"0"));function R1(e,t={}){let{strict:r=!1}=t;if(!e)throw new Au(e);if(typeof e!="string")throw new Au(e);if(r&&!/^0x[0-9a-fA-F]*$/.test(e))throw new Tu(e);if(!e.startsWith("0x"))throw new Tu(e)}function it(...e){return`0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}function Su(e,t={}){let r=`0x${Number(e)}`;return typeof t.size=="number"?(li(r,t.size),br(r,t.size)):r}function ps(e,t={}){let r="";for(let o=0;os||o{let h=d,b=h.account?K(h.account):void 0,v={...h,data:h.abi?de(h):h.data,from:h.from??b?.address};return ot(v),lt(v)}),x=l.stateOverrides?Ho(l.stateOverrides):void 0;c.push({blockOverrides:m,calls:y,stateOverrides:x})}let p=(r?_(r):void 0)||n;return(await e.request({method:"eth_simulateV1",params:[{blockStateCalls:c,returnFullTransactions:s,traceTransfers:i,validation:a},p]})).map((l,m)=>({...ii(l),calls:l.calls.map((y,x)=>{let{abi:d,args:h,functionName:b,to:v}=o[m].calls[x],A=y.error?.data??y.returnData,k=BigInt(y.gasUsed),S=y.logs?.map(H=>We(H)),T=y.status==="0x1"?"success":"failure",B=d&&T==="success"&&A!=="0x"?st({abi:d,data:A,functionName:b}):null,P=(()=>{if(T==="success")return;let H;if(y.error?.data==="0x"?H=new dt:y.error&&(H=new Gt(y.error)),!!H)return ut(H,{abi:d??[],address:v,args:h,functionName:b??""})})();return{data:A,gasUsed:k,logs:S,status:T,...T==="success"?{result:B}:{error:P}}})}))}catch(c){let u=c,p=jr(u,{});throw p instanceof wt?u:p}}aa();function Wf(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function N1(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function yi(e,...t){if(!N1(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function Kf(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 Gy(e,t){yi(e);let r=t.outputLen;if(e.length>>8&65280|e>>>24&255}function Zf(e){for(let t=0;te().update(Iu(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function Yy(e){let t=(n,o)=>e(o).update(Iu(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}var Pu=BigInt(4294967295),Zy=BigInt(32);function M1(e,t=!1){return t?{h:Number(e&Pu),l:Number(e>>Zy&Pu)}:{h:Number(e>>Zy&Pu)|0,l:Number(e&Pu)|0}}function Jy(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;oe<>>32-r,Qy=(e,t,r)=>t<>>32-r,ex=(e,t,r)=>t<>>64-r,tx=(e,t,r)=>e<>>64-r;var ox=[],sx=[],ix=[],z1=BigInt(0),xi=BigInt(1),U1=BigInt(2),L1=BigInt(7),H1=BigInt(256),D1=BigInt(113);for(let e=0,t=xi,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],ox.push(2*(5*n+r)),sx.push((e+1)*(e+2)/2%64);let o=z1;for(let s=0;s<7;s++)t=(t<>L1)*D1)%H1,t&U1&&(o^=xi<<(xi<r>32?ex(e,t,r):Xy(e,t,r),nx=(e,t,r)=>r>32?tx(e,t,r):Qy(e,t,r);function V1(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let i=0;i<10;i++)r[i]=e[i]^e[i+10]^e[i+20]^e[i+30]^e[i+40];for(let i=0;i<10;i+=2){let a=(i+8)%10,c=(i+2)%10,u=r[c],p=r[c+1],f=rx(u,p,1)^r[a],l=nx(u,p,1)^r[a+1];for(let m=0;m<50;m+=10)e[i+m]^=f,e[i+m+1]^=l}let o=e[2],s=e[3];for(let i=0;i<24;i++){let a=sx[i],c=rx(o,s,a),u=nx(o,s,a),p=ox[i];o=e[p],s=e[p+1],e[p]=c,e[p+1]=u}for(let i=0;i<50;i+=10){for(let a=0;a<10;a++)r[a]=e[i+a];for(let a=0;a<10;a++)e[i+a]^=~r[(a+2)%10]&r[(a+4)%10]}e[0]^=j1[n],e[1]^=q1[n]}r.fill(0)}var ku=class e extends Cu{constructor(t,r,n,o=!1,s=24){if(super(),this.blockLen=t,this.suffix=r,this.outputLen=n,this.enableXOF=o,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Wf(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Wy(this.state)}keccak(){Yf||Zf(this.state32),V1(this.state32,this.rounds),Yf||Zf(this.state32),this.posOut=0,this.pos=0}update(t){Kf(this);let{blockLen:r,state:n}=this;t=Iu(t);let o=t.length;for(let s=0;s=n&&this.keccak();let i=Math.min(n-this.posOut,s-o);t.set(r.subarray(this.posOut,this.posOut+i),o),this.posOut+=i,o+=i}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return Wf(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(Gy(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:r,suffix:n,outputLen:o,rounds:s,enableXOF:i}=this;return t||(t=new e(r,n,o,i,s)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=s,t.suffix=n,t.outputLen=o,t.enableXOF=i,t.destroyed=this.destroyed,t}},on=(e,t,r)=>Ky(()=>new ku(t,e,r)),iM=on(6,144,224/8),aM=on(6,136,256/8),cM=on(6,104,384/8),uM=on(6,72,512/8),pM=on(1,144,224/8),ax=on(1,136,256/8),fM=on(1,104,384/8),lM=on(1,72,512/8),cx=(e,t,r)=>Yy((n={})=>new ku(t,e,n.dkLen===void 0?r:n.dkLen,!0)),mM=cx(31,168,128/8),dM=cx(31,136,256/8);function Bu(e,t={}){let{as:r=typeof e=="string"?"Hex":"Bytes"}=t,n=ax(Dy(e));return r==="Bytes"?n:ps(n)}var Ru=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){let r=super.get(t);return super.has(t)&&r!==void 0&&(this.delete(t),super.set(t,r)),r}set(t,r){if(super.set(t,r),this.maxSize&&this.size>this.maxSize){let n=this.keys().next().value;n&&this.delete(n)}return this}};var G1={checksum:new Ru(8192)},_u=G1.checksum;var K1=/^0x[a-fA-F0-9]{40}$/;function ms(e,t={}){let{strict:r=!0}=t;if(!K1.test(e))throw new $u({address:e,cause:new Jf});if(r){if(e.toLowerCase()===e)return;if(px(e)!==e)throw new $u({address:e,cause:new Xf})}}function px(e){if(_u.has(e))return _u.get(e);ms(e,{strict:!1});let t=e.substring(2).toLowerCase(),r=Bu(jy(t),{as:"Bytes"}),n=t.split("");for(let s=0;s<40;s+=2)r[s>>1]>>4>=8&&n[s]&&(n[s]=n[s].toUpperCase()),(r[s>>1]&15)>=8&&n[s+1]&&(n[s+1]=n[s+1].toUpperCase());let o=`0x${n.join("")}`;return _u.set(e,o),o}function Nu(e,t={}){let{strict:r=!0}=t??{};try{return ms(e,{strict:r}),!0}catch{return!1}}var $u=class extends oe{constructor({address:t,cause:r}){super(`Address "${t}" is invalid.`,{cause:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}},Jf=class extends oe{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}},Xf=class extends oe{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}};function Ou(e){let t=!0,r="",n=0,o="",s=!1;for(let i=0;iFu(Object.values(e)[s],o)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(n)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?r==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)?Array.isArray(e)&&e.every(o=>Fu(o,{...t,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function el(e,t,r){for(let n in e){let o=e[n],s=t[n];if(o.type==="tuple"&&s.type==="tuple"&&"components"in o&&"components"in s)return el(o.components,s.components,r[n]);let i=[o.type,s.type];if(i.includes("address")&&i.includes("bytes20")?!0:i.includes("address")&&i.includes("string")?Nu(r[n],{strict:!1}):i.includes("address")&&i.includes("bytes")?Nu(r[n],{strict:!1}):!1)return i}}function Mu(e,t={}){let{prepare:r=!0}=t,n=Array.isArray(e)?ia(e):typeof e=="string"?ia(e):e;return{...n,...r?{hash:ds(n)}:{}}}function fx(e,t,r){let{args:n=[],prepare:o=!0}=r??{},s=Gf(t,{strict:!1}),i=e.filter(u=>s?u.type==="function"||u.type==="error"?rl(u)===ls(t,0,4):u.type==="event"?ds(u)===t:!1:"name"in u&&u.name===t);if(i.length===0)throw new On({name:t});if(i.length===1)return{...i[0],...o?{hash:ds(i[0])}:{}};let a;for(let u of i){if(!("inputs"in u))continue;if(!n||n.length===0){if(!u.inputs||u.inputs.length===0)return{...u,...o?{hash:ds(u)}:{}};continue}if(!u.inputs||u.inputs.length===0||u.inputs.length!==n.length)continue;if(n.every((f,l)=>{let m="inputs"in u&&u.inputs[l];return m?Fu(f,m):!1})){if(a&&"inputs"in a&&a.inputs){let f=el(u.inputs,a.inputs,n);if(f)throw new tl({abiItem:u,type:f[0]},{abiItem:a,type:f[1]})}a=u}}let c=(()=>{if(a)return a;let[u,...p]=i;return{...u,overloads:p}})();if(!c)throw new On({name:t});return{...c,...o?{hash:ds(c)}:{}}}function rl(e){return ls(ds(e),0,4)}function Z1(e){let t=typeof e=="string"?e:dn(e);return Ou(t)}function ds(e){return typeof e!="string"&&"hash"in e&&e.hash?e.hash:Bu(fs(Z1(e)))}var tl=class extends oe{constructor(t,r){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${t.type}\` in \`${Ou(dn(t.abiItem))}\`, and`,`\`${r.type}\` in \`${Ou(dn(r.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}},On=class extends oe{constructor({name:t,data:r,type:n="item"}){let o=t?` with name "${t}"`:r?` with data "${r}"`:"";super(`ABI ${n}${o} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}};var mx=/^(.*)\[([0-9]*)\]$/,dx=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,zu=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,gM=2n**(8n-1n)-1n,wM=2n**(16n-1n)-1n,vM=2n**(24n-1n)-1n,EM=2n**(32n-1n)-1n,AM=2n**(40n-1n)-1n,TM=2n**(48n-1n)-1n,SM=2n**(56n-1n)-1n,CM=2n**(64n-1n)-1n,IM=2n**(72n-1n)-1n,PM=2n**(80n-1n)-1n,kM=2n**(88n-1n)-1n,BM=2n**(96n-1n)-1n,RM=2n**(104n-1n)-1n,_M=2n**(112n-1n)-1n,$M=2n**(120n-1n)-1n,NM=2n**(128n-1n)-1n,FM=2n**(136n-1n)-1n,OM=2n**(144n-1n)-1n,MM=2n**(152n-1n)-1n,zM=2n**(160n-1n)-1n,UM=2n**(168n-1n)-1n,LM=2n**(176n-1n)-1n,HM=2n**(184n-1n)-1n,DM=2n**(192n-1n)-1n,jM=2n**(200n-1n)-1n,qM=2n**(208n-1n)-1n,VM=2n**(216n-1n)-1n,GM=2n**(224n-1n)-1n,WM=2n**(232n-1n)-1n,KM=2n**(240n-1n)-1n,YM=2n**(248n-1n)-1n,ZM=2n**(256n-1n)-1n,JM=-(2n**(8n-1n)),XM=-(2n**(16n-1n)),QM=-(2n**(24n-1n)),ez=-(2n**(32n-1n)),tz=-(2n**(40n-1n)),rz=-(2n**(48n-1n)),nz=-(2n**(56n-1n)),oz=-(2n**(64n-1n)),sz=-(2n**(72n-1n)),iz=-(2n**(80n-1n)),az=-(2n**(88n-1n)),cz=-(2n**(96n-1n)),uz=-(2n**(104n-1n)),pz=-(2n**(112n-1n)),fz=-(2n**(120n-1n)),lz=-(2n**(128n-1n)),mz=-(2n**(136n-1n)),dz=-(2n**(144n-1n)),hz=-(2n**(152n-1n)),yz=-(2n**(160n-1n)),xz=-(2n**(168n-1n)),bz=-(2n**(176n-1n)),gz=-(2n**(184n-1n)),wz=-(2n**(192n-1n)),vz=-(2n**(200n-1n)),Ez=-(2n**(208n-1n)),Az=-(2n**(216n-1n)),Tz=-(2n**(224n-1n)),Sz=-(2n**(232n-1n)),Cz=-(2n**(240n-1n)),Iz=-(2n**(248n-1n)),Pz=-(2n**(256n-1n)),kz=2n**8n-1n,Bz=2n**16n-1n,Rz=2n**24n-1n,_z=2n**32n-1n,$z=2n**40n-1n,Nz=2n**48n-1n,Fz=2n**56n-1n,Oz=2n**64n-1n,Mz=2n**72n-1n,zz=2n**80n-1n,Uz=2n**88n-1n,Lz=2n**96n-1n,Hz=2n**104n-1n,Dz=2n**112n-1n,jz=2n**120n-1n,qz=2n**128n-1n,Vz=2n**136n-1n,Gz=2n**144n-1n,Wz=2n**152n-1n,Kz=2n**160n-1n,Yz=2n**168n-1n,Zz=2n**176n-1n,Jz=2n**184n-1n,Xz=2n**192n-1n,Qz=2n**200n-1n,eU=2n**208n-1n,tU=2n**216n-1n,rU=2n**224n-1n,nU=2n**232n-1n,oU=2n**240n-1n,sU=2n**248n-1n,iU=2n**256n-1n;function hx({checksumAddress:e,parameters:t,values:r}){let n=[];for(let o=0;o0?it(u,c):u}}if(i)return{dynamic:!0,encoded:c}}return{dynamic:!1,encoded:it(...a.map(({encoded:c})=>c))}}function ew(e,{type:t}){let[,r]=t.split("bytes"),n=Le(e);if(!r){let o=e;return n%32!==0&&(o=Qt(o,Math.ceil((e.length-2)/2/32)*32)),{dynamic:!0,encoded:it(br(Se(n,{size:32})),o)}}if(n!==Number.parseInt(r))throw new bi({expectedSize:Number.parseInt(r),value:e});return{dynamic:!1,encoded:Qt(e)}}function tw(e){if(typeof e!="boolean")throw new oe(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:br(Su(e))}}function rw(e,{signed:t,size:r}){if(typeof r=="number"){let n=2n**(BigInt(r)-(t?1n:0n))-1n,o=t?-n-1n:0n;if(e>n||ei))}}function sw(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function ju(e,t,r){let{checksumAddress:n=!1}=r??{};if(e.length!==t.length)throw new Du({expectedLength:e.length,givenLength:t.length});let o=hx({checksumAddress:n,parameters:e,values:t}),s=Uu(o);return s.length===0?"0x":s}function sl(e,t){if(e.length!==t.length)throw new Du({expectedLength:e.length,givenLength:t.length});let r=[];for(let n=0;n0?ju(n.inputs,t[0]):void 0;return s?it(o,s):o}function Mn(e,t={}){return Mu(e,t)}function uw(e,t,r){let n=fx(e,t,r);if(n.type!=="function")throw new On({name:t,type:"function"});return n}function pw(e){return rl(e)}ve();var gx="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",Nt="0x0000000000000000000000000000000000000000";Nc();W();ct();var lw="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function wx(e,t){let{blockNumber:r,blockTag:n,calls:o,stateOverrides:s,traceAssetChanges:i,traceTransfers:a,validation:c}=t,u=t.account?K(t.account):void 0;if(i&&!u)throw new g("`account` is required when `traceAssetChanges` is true");let p=u?yx(xx("constructor(bytes, bytes)"),{bytecode:$c,args:[lw,bx(Mn("function getBalance(address)"),[u.address])]}):void 0,f=i?await Promise.all(t.calls.map(async F=>{if(!F.data&&!F.abi)return;let{accessList:Q}=await iu(e,{account:u.address,...F,data:F.abi?de(F):F.data});return Q.map(({address:fe,storageKeys:w})=>w.length>0?fe:null)})).then(F=>F.flat().filter(Boolean)):[],l=s?.map(F=>F.address===u?.address?{...F,nonce:0}:F),m=await hi(e,{blockNumber:r,blockTag:n,blocks:[...i?[{calls:[{data:p}],stateOverrides:s},{calls:f.map((F,Q)=>({abi:[Mn("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[u.address],to:F,from:Nt,nonce:Q})),stateOverrides:[{address:Nt,nonce:0}]}]:[],{calls:[...o,{}].map((F,Q)=>({...F,from:u?.address,nonce:Q})),stateOverrides:l},...i?[{calls:[{data:p}]},{calls:f.map((F,Q)=>({abi:[Mn("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[u.address],to:F,from:Nt,nonce:Q})),stateOverrides:[{address:Nt,nonce:0}]},{calls:f.map((F,Q)=>({to:F,abi:[Mn("function decimals() returns (uint256)")],functionName:"decimals",from:Nt,nonce:Q})),stateOverrides:[{address:Nt,nonce:0}]},{calls:f.map((F,Q)=>({to:F,abi:[Mn("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:Nt,nonce:Q})),stateOverrides:[{address:Nt,nonce:0}]},{calls:f.map((F,Q)=>({to:F,abi:[Mn("function symbol() returns (string)")],functionName:"symbol",from:Nt,nonce:Q})),stateOverrides:[{address:Nt,nonce:0}]}]:[]],traceTransfers:a,validation:c}),y=i?m[2]:m[0],[x,d,,h,b,v,A,k]=i?m:[],{calls:S,...T}=y,B=S.slice(0,-1)??[],P=x?.calls??[],H=d?.calls??[],U=[...P,...H].map(F=>F.status==="success"?he(F.data):null),L=h?.calls??[],ne=b?.calls??[],R=[...L,...ne].map(F=>F.status==="success"?he(F.data):null),O=(v?.calls??[]).map(F=>F.status==="success"?F.result:null),N=(k?.calls??[]).map(F=>F.status==="success"?F.result:null),q=(A?.calls??[]).map(F=>F.status==="success"?F.result:null),D=[];for(let[F,Q]of R.entries()){let fe=U[F];if(typeof Q!="bigint"||typeof fe!="bigint")continue;let w=O[F-1],I=N[F-1],G=q[F-1],Z=F===0?{address:gx,decimals:18,symbol:"ETH"}:{address:f[F-1],decimals:G||w?Number(w??1):void 0,symbol:I??void 0};D.some(Y=>Y.token.address===Z.address)||D.push({token:Z,value:{pre:fe,post:Q,diff:Q-fe}})}return{assetChanges:D,block:T,results:B}}Jr();Nc();Nr();Mc();bn();Yo();St();V();xf();He();ze();function vx({r:e,s:t,to:r="hex",v:n,yParity:o}){let s=(()=>{if(o===0||o===1)return o;if(n&&(n===27n||n===28n||n>=35n))return n%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),i=`0x${new kn.Signature(he(e),he(t)).toCompactHex()}${s===0?"1b":"1c"}`;return r==="hex"?i:Pe(i)}rs();async function hs(e,t){let{address:r,factory:n,factoryData:o,hash:s,signature:i,universalSignatureVerifierAddress:a=e.chain?.contracts?.universalSignatureVerifier?.address,...c}=t,u=we(i)?i:typeof i=="object"&&"r"in i&&"s"in i?vx(i):te(i),p=await(async()=>!n&&!o||Sy(u)?u:Cy({address:n,data:o,signature:u}))();try{let f=a?{to:a,data:de({abi:Tf,functionName:"isValidSig",args:[r,s,p]}),...c}:{data:_n({abi:Tf,args:[r,s,p],bytecode:Eh}),...c},{data:l}=await $(e,Zt,"call")(f);return Sp(l??"0x0")}catch(f){try{if(Yt($a(r),await dc({hash:s,signature:i})))return!0}catch{}if(f instanceof io)return!1;throw f}}async function Ex(e,{address:t,message:r,factory:n,factoryData:o,signature:s,...i}){let a=yu(r);return hs(e,{address:t,factory:n,factoryData:o,hash:a,signature:s,...i})}async function Ax(e,t){let{address:r,factory:n,factoryData:o,signature:s,message:i,primaryType:a,types:c,domain:u,...p}=t,f=fy({message:i,primaryType:a,types:c,domain:u});return hs(e,{address:r,factory:n,factoryData:o,hash:f,signature:s,...p})}_t();Uc();qe();He();qe();function qu(e,{emitOnBegin:t=!1,emitMissed:r=!1,onBlockNumber:n,onError:o,poll:s,pollingInterval:i=e.pollingInterval}){let a=typeof s<"u"?s:!(e.transport.type==="webSocket"||e.transport.type==="fallback"&&e.transport.transports[0].config.type==="webSocket"),c;return a?(()=>{let f=X(["watchBlockNumber",e.uid,t,r,i]);return Ke(f,{onBlockNumber:n,onError:o},l=>At(async()=>{try{let m=await $(e,Jt,"getBlockNumber")({cacheTime:0});if(c){if(m===c)return;if(m-c>1&&r)for(let y=c+1n;yc)&&(l.onBlockNumber(m,c),c=m)}catch(m){l.onError?.(m)}},{emitOnBegin:t,interval:i}))})():(()=>{let f=X(["watchBlockNumber",e.uid,t,r]);return Ke(f,{onBlockNumber:n,onError:o},l=>{let m=!0,y=()=>m=!1;return(async()=>{try{let x=(()=>{if(e.transport.type==="fallback"){let h=e.transport.transports.find(b=>b.config.type==="webSocket");return h?h.value:e.transport}return e.transport})(),{unsubscribe:d}=await x.subscribe({params:["newHeads"],onData(h){if(!m)return;let b=he(h.result?.number);l.onBlockNumber(b,c),c=b},onError(h){l.onError?.(h)}});y=d,m||y()}catch(x){o?.(x)}})(),()=>y()})})()}async function Tx(e,{confirmations:t=1,hash:r,onReplaced:n,pollingInterval:o=e.pollingInterval,retryCount:s=6,retryDelay:i=({count:c})=>~~(1<x(new Xa({hash:r})),a):void 0,h=Ke(c,{onReplaced:n,resolve:y,reject:x},b=>{let v=$(e,qu,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:o,async onBlockNumber(A){let k=T=>{clearTimeout(d),v(),T(),h()},S=A;if(!l)try{if(f){if(t>1&&(!f.blockNumber||S-f.blockNumber+1nb.resolve(f));return}if(u||(l=!0,await pi(async()=>{u=await $(e,us,"getTransaction")({hash:r}),u.blockNumber&&(S=u.blockNumber)},{delay:i,retryCount:s}),l=!1),f=await $(e,fi,"getTransactionReceipt")({hash:r}),t>1&&(!f.blockNumber||S-f.blockNumber+1nb.resolve(f))}catch(T){if(T instanceof oo||T instanceof so){if(!u){l=!1;return}try{p=u,l=!0;let B=await pi(()=>$(e,Ge,"getBlock")({blockNumber:S,includeTransactions:!0}),{delay:i,retryCount:s,shouldRetry:({error:U})=>U instanceof Do});l=!1;let P=B.transactions.find(({from:U,nonce:L})=>U===p.from&&L===p.nonce);if(!P||(f=await $(e,fi,"getTransactionReceipt")({hash:P.hash}),t>1&&(!f.blockNumber||S-f.blockNumber+1n{b.onReplaced?.({reason:H,replacedTransaction:p,transaction:P,transactionReceipt:f}),b.resolve(f)})}catch(B){k(()=>b.reject(B))}}else k(()=>b.reject(T))}}})});return m}qe();function Sx(e,{blockTag:t="latest",emitMissed:r=!1,emitOnBegin:n=!1,onBlock:o,onError:s,includeTransactions:i,poll:a,pollingInterval:c=e.pollingInterval}){let u=typeof a<"u"?a:!(e.transport.type==="webSocket"||e.transport.type==="fallback"&&e.transport.transports[0].config.type==="webSocket"),p=i??!1,f;return u?(()=>{let y=X(["watchBlocks",e.uid,t,r,n,p,c]);return Ke(y,{onBlock:o,onError:s},x=>At(async()=>{try{let d=await $(e,Ge,"getBlock")({blockTag:t,includeTransactions:p});if(d.number&&f?.number){if(d.number===f.number)return;if(d.number-f.number>1&&r)for(let h=f?.number+1n;hf.number)&&(x.onBlock(d,f),f=d)}catch(d){x.onError?.(d)}},{emitOnBegin:n,interval:c}))})():(()=>{let y=!0,x=!0,d=()=>y=!1;return(async()=>{try{n&&$(e,Ge,"getBlock")({blockTag:t,includeTransactions:p}).then(v=>{y&&x&&(o(v,void 0),x=!1)});let h=(()=>{if(e.transport.type==="fallback"){let v=e.transport.transports.find(A=>A.config.type==="webSocket");return v?v.value:e.transport}return e.transport})(),{unsubscribe:b}=await h.subscribe({params:["newHeads"],async onData(v){if(!y)return;let A=await $(e,Ge,"getBlock")({blockNumber:v.blockNumber,includeTransactions:p}).catch(()=>{});y&&(o(A,f),x=!1,f=A)},onError(v){s?.(v)}});d=b,y||d()}catch(h){s?.(h)}})(),()=>d()})()}qe();ye();Zs();function Cx(e,{address:t,args:r,batch:n=!0,event:o,events:s,fromBlock:i,onError:a,onLogs:c,poll:u,pollingInterval:p=e.pollingInterval,strict:f}){let l=typeof u<"u"?u:typeof i=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="fallback"&&e.transport.transports[0].config.type==="webSocket"),m=f??!1;return l?(()=>{let d=X(["watchEvent",t,r,n,e.uid,o,p,i]);return Ke(d,{onLogs:c,onError:a},h=>{let b;i!==void 0&&(b=i-1n);let v,A=!1,k=At(async()=>{if(!A){try{v=await $(e,au,"createEventFilter")({address:t,args:r,event:o,events:s,strict:m,fromBlock:i})}catch{}A=!0;return}try{let S;if(v)S=await $(e,Xr,"getFilterChanges")({filter:v});else{let T=await $(e,Jt,"getBlockNumber")({});b&&b!==T?S=await $(e,Xo,"getLogs")({address:t,args:r,event:o,events:s,fromBlock:b+1n,toBlock:T}):S=[],b=T}if(S.length===0)return;if(n)h.onLogs(S);else for(let T of S)h.onLogs([T])}catch(S){v&&S instanceof Wt&&(A=!1),h.onError?.(S)}},{emitOnBegin:!0,interval:p});return async()=>{v&&await $(e,Qr,"uninstallFilter")({filter:v}),k()}})})():(()=>{let d=!0,h=()=>d=!1;return(async()=>{try{let b=(()=>{if(e.transport.type==="fallback"){let S=e.transport.transports.find(T=>T.config.type==="webSocket");return S?S.value:e.transport}return e.transport})(),v=s??(o?[o]:void 0),A=[];v&&(A=[v.flatMap(T=>qt({abi:[T],eventName:T.name,args:r}))],o&&(A=A[0]));let{unsubscribe:k}=await b.subscribe({params:["logs",{address:t,topics:A}],onData(S){if(!d)return;let T=S.result;try{let{eventName:B,args:P}=Zo({abi:v??[],data:T.data,topics:T.topics,strict:m}),H=We(T,{args:P,eventName:B});c([H])}catch(B){let P,H;if(B instanceof It||B instanceof Ut){if(f)return;P=B.abiItem.name,H=B.abiItem.inputs?.some(L=>!("name"in L&&L.name))}let U=We(T,{args:H?[]:{},eventName:P});c([U])}},onError(S){a?.(S)}});h=k,d||h()}catch(b){a?.(b)}})(),()=>h()})()}qe();function Ix(e,{batch:t=!0,onError:r,onTransactions:n,poll:o,pollingInterval:s=e.pollingInterval}){return(typeof o<"u"?o:e.transport.type!=="webSocket")?(()=>{let u=X(["watchPendingTransactions",e.uid,t,s]);return Ke(u,{onTransactions:n,onError:r},p=>{let f,l=At(async()=>{try{if(!f)try{f=await $(e,cu,"createPendingTransactionFilter")({});return}catch(y){throw l(),y}let m=await $(e,Xr,"getFilterChanges")({filter:f});if(m.length===0)return;if(t)p.onTransactions(m);else for(let y of m)p.onTransactions([y])}catch(m){p.onError?.(m)}},{emitOnBegin:!0,interval:s});return async()=>{f&&await $(e,Qr,"uninstallFilter")({filter:f}),l()}})})():(()=>{let u=!0,p=()=>u=!1;return(async()=>{try{let{unsubscribe:f}=await e.transport.subscribe({params:["newPendingTransactions"],onData(l){if(!u)return;let m=l.result;n([m])},onError(l){r?.(l)}});p=f,u||p()}catch(f){r?.(f)}})(),()=>p()})()}function Px(e){let{scheme:t,statement:r,...n}=e.match(mw)?.groups??{},{chainId:o,expirationTime:s,issuedAt:i,notBefore:a,requestId:c,...u}=e.match(dw)?.groups??{},p=e.split("Resources:")[1]?.split(` +- `).slice(1);return{...n,...u,...o?{chainId:Number(o)}:{},...s?{expirationTime:new Date(s)}:{},...i?{issuedAt:new Date(i)}:{},...a?{notBefore:new Date(a)}:{},...c?{requestId:c}:{},...p?{resources:p}:{},...t?{scheme:t}:{},...r?{statement:r}:{}}}var mw=/^(?:(?[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?
0x[a-fA-F0-9]{40})\n\n(?:(?.*)\n\n)?/,dw=/(?:URI: (?.+))\n(?:Version: (?.+))\n(?:Chain ID: (?\d+))\n(?:Nonce: (?[a-zA-Z0-9]+))\n(?:Issued At: (?.+))(?:\nExpiration Time: (?.+))?(?:\nNot Before: (?.+))?(?:\nRequest ID: (?.+))?/;Yo();function kx(e){let{address:t,domain:r,message:n,nonce:o,scheme:s,time:i=new Date}=e;if(r&&n.domain!==r||o&&n.nonce!==o||s&&n.scheme!==s||n.expirationTime&&i>=n.expirationTime||n.notBefore&&iZt(e,t),createAccessList:t=>iu(e,t),createBlockFilter:()=>ny(e),createContractEventFilter:t=>Oa(e,t),createEventFilter:t=>au(e,t),createPendingTransactionFilter:()=>cu(e),estimateContractGas:t=>hh(e,t),estimateGas:t=>Ko(e,t),getBalance:t=>kc(e,t),getBlobBaseFee:()=>oy(e),getBlock:t=>Ge(e,t),getBlockNumber:t=>Jt(e,t),getBlockTransactionCount:t=>sy(e,t),getBytecode:t=>Hf(e,t),getChainId:()=>vt(e),getCode:t=>Hf(e,t),getContractEvents:t=>Bc(e,t),getEip712Domain:t=>iy(e,t),getEnsAddress:t=>Kh(e,t),getEnsAvatar:t=>ey(e,t),getEnsName:t=>ty(e,t),getEnsResolver:t=>ry(e,t),getEnsText:t=>su(e,t),getFeeHistory:t=>cy(e,t),estimateFeesPerGas:t=>ph(e,t),getFilterChanges:t=>Xr(e,t),getFilterLogs:t=>uy(e,t),getGasPrice:()=>jo(e),getLogs:t=>Xo(e,t),getProof:t=>ky(e,t),estimateMaxPriorityFeePerGas:t=>uh(e,t),getStorageAt:t=>By(e,t),getTransaction:t=>us(e,t),getTransactionConfirmations:t=>Ry(e,t),getTransactionCount:t=>qo(e,t),getTransactionReceipt:t=>fi(e,t),multicall:t=>_y(e,t),prepareTransactionRequest:t=>Yr(e,t),readContract:t=>je(e,t),sendRawTransaction:t=>ns(e,t),simulate:t=>hi(e,t),simulateBlocks:t=>hi(e,t),simulateCalls:t=>wx(e,t),simulateContract:t=>Nh(e,t),verifyMessage:t=>Ex(e,t),verifySiweMessage:t=>Bx(e,t),verifyTypedData:t=>Ax(e,t),uninstallFilter:t=>Qr(e,t),waitForTransactionReceipt:t=>Tx(e,t),watchBlocks:t=>Sx(e,t),watchBlockNumber:t=>qu(e,t),watchContractEvent:t=>zh(e,t),watchEvent:t=>Cx(e,t),watchPendingTransactions:t=>Ix(e,t)}}function il(e){let{key:t="public",name:r="Public Client"}=e;return Jc({...e,key:t,name:r,type:"publicClient"}).extend(Rx)}V();async function _x(e,{chain:t}){let{id:r,name:n,nativeCurrency:o,rpcUrls:s,blockExplorers:i}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:_(r),chainName:n,nativeCurrency:o,rpcUrls:s.default.http,blockExplorerUrls:i?Object.values(i).map(({url:a})=>a):void 0}]},{dedupe:!0,retryCount:0})}Mc();function $x(e,t){let{abi:r,args:n,bytecode:o,...s}=t,i=_n({abi:r,args:n,bytecode:o});return os(e,{...s,...s.authorizationList?{to:null}:{},data:i})}bn();async function Nx(e){return e.account?.type==="local"?[e.account.address]:(await e.request({method:"eth_accounts"},{dedupe:!0})).map(r=>sr(r))}ve();V();async function Fx(e,t={}){let{account:r=e.account,chainId:n}=t,o=r?K(r):void 0,s=n?[o?.address,[_(n)]]:[o?.address],i=await e.request({method:"wallet_getCapabilities",params:s}),a={};for(let[c,u]of Object.entries(i))a[Number(c)]=u;return typeof n=="number"?a[n]:a}async function Ox(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}ve();Yo();async function Vu(e,t){let{account:r=e.account,chainId:n,nonce:o}=t;if(!r)throw new Ue({docsPath:"/docs/eip7702/prepareAuthorization"});let s=K(r),i=(()=>{if(t.executor)return t.executor==="self"?t.executor:K(t.executor)})(),a={address:t.contractAddress??t.address,chainId:n,nonce:o};return typeof a.chainId>"u"&&(a.chainId=e.chain?.id??await $(e,vt,"getChainId")({})),typeof a.nonce>"u"&&(a.nonce=await $(e,qo,"getTransactionCount")({address:s.address,blockTag:"pending"}),(i==="self"||i?.address&&Yt(i.address,s.address))&&(a.nonce+=1)),a}bn();async function Mx(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(r=>$a(r))}async function zx(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}ve();ct();V();async function Ux(e,t){let{account:r=e.account,chain:n=e.chain,forceAtomic:o=!1,id:s,version:i="2.0.0"}=t;if(typeof r>"u")throw new Ue({docsPath:"/docs/actions/wallet/sendCalls"});let a=r?K(r):null,c=t.calls.map(u=>{let p=u;return{data:p.abi?de({abi:p.abi,functionName:p.functionName,args:p.args}):p.data,to:p.to,value:p.value?_(p.value):void 0}});try{let u=await e.request({method:"wallet_sendCalls",params:[{atomicRequired:o,calls:c,capabilities:hw(t.capabilities),chainId:_(n.id),from:a?.address,id:s,version:i}]},{retryCount:0});return typeof u=="string"?{id:u}:u}catch(u){throw Gc(u,{...t,account:a,chain:t.chain})}}function hw(e){let t=e?.paymasterService?Object.entries(e.paymasterService).reduce((r,[n,o])=>({...r??{},[_(Number(n))]:o}),{}):void 0;return{...e,...t?{paymasterService:t}:{}}}async function Lx(e,t){let{id:r}=t;await e.request({method:"wallet_showCallsStatus",params:[r]})}ve();async function Hx(e,t){let{account:r=e.account}=t;if(!r)throw new Ue({docsPath:"/docs/eip7702/signAuthorization"});let n=K(r);if(!n.signAuthorization)throw new en({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:n.type});let o=await Vu(e,t);return n.signAuthorization(o)}ve();V();async function Dx(e,{account:t=e.account,message:r}){if(!t)throw new Ue({docsPath:"/docs/actions/wallet/signMessage"});let n=K(t);if(n.signMessage)return n.signMessage({message:r});let o=typeof r=="string"?Lt(r):r.raw instanceof Uint8Array?z(r.raw):r.raw;return e.request({method:"personal_sign",params:[o,n.address]},{retryCount:0})}ve();V();Vr();Wr();async function jx(e,t){let{account:r=e.account,chain:n=e.chain,...o}=t;if(!r)throw new Ue({docsPath:"/docs/actions/wallet/signTransaction"});let s=K(r);ot({account:s,...t});let i=await $(e,vt,"getChainId")({});n!==null&&Vc({currentChainId:i,chain:n});let c=(n?.formatters||e.chain?.formatters)?.transactionRequest?.format||lt;return s.signTransaction?s.signTransaction({...o,chainId:i},{serializer:e.chain?.serializers?.transaction}):await e.request({method:"eth_signTransaction",params:[{...c(o),chainId:_(i),from:s.address}]},{retryCount:0})}ve();async function qx(e,t){let{account:r=e.account,domain:n,message:o,primaryType:s}=t;if(!r)throw new Ue({docsPath:"/docs/actions/wallet/signTypedData"});let i=K(r),a={EIP712Domain:du({domain:n}),...t.types};if(mu({domain:n,message:o,primaryType:s,types:a}),i.signTypedData)return i.signTypedData({domain:n,message:o,primaryType:s,types:a});let c=yy({domain:n,message:o,primaryType:s,types:a});return e.request({method:"eth_signTypedData_v4",params:[i.address,c]},{retryCount:0})}V();async function Vx(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:_(t)}]},{retryCount:0})}async function Gx(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}function Wx(e){return{addChain:t=>_x(e,t),deployContract:t=>$x(e,t),getAddresses:()=>Nx(e),getCallsStatus:t=>Wc(e,t),getCapabilities:t=>Fx(e,t),getChainId:()=>vt(e),getPermissions:()=>Ox(e),prepareAuthorization:t=>Vu(e,t),prepareTransactionRequest:t=>Yr(e,t),requestAddresses:()=>Mx(e),requestPermissions:t=>zx(e,t),sendCalls:t=>Ux(e,t),sendRawTransaction:t=>ns(e,t),sendTransaction:t=>os(e,t),showCallsStatus:t=>Lx(e,t),signAuthorization:t=>Hx(e,t),signMessage:t=>Dx(e,t),signTransaction:t=>jx(e,t),signTypedData:t=>qx(e,t),switchChain:t=>Vx(e,t),waitForCallsStatus:t=>Hh(e,t),watchAsset:t=>Gx(e,t),writeContract:t=>Uh(e,t)}}function al(e){let{key:t="wallet",name:r="Wallet Client",transport:n}=e;return Jc({...e,key:t,name:r,transport:n,type:"walletClient"}).extend(Wx)}Ks();var Kx={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}};Rt();yt();et();V();function Yx(e,t){return xw(e)?yw(e):vy(e,t)}function yw(e){bw(e);let{sourceHash:t,data:r,from:n,gas:o,isSystemTx:s,mint:i,to:a,value:c}=e,u=[t,n,a??"0x",i?z(i):"0x",c?z(c):"0x",o?z(o):"0x",s?"0x1":"0x",r??"0x"];return Te(["0x7e",ft(u)])}function xw(e){return e.type==="deposit"||typeof e.sourceHash<"u"}function bw(e){let{from:t,to:r}=e;if(t&&!re(t))throw new ae({address:t});if(r&&!re(r))throw new ae({address:r})}var Zx={estimateFeesPerGas:async e=>{if(!e.request?.feeCurrency)return null;let[t,r]=await Promise.all([gw(e.client,e.request.feeCurrency),ww(e.client,e.request.feeCurrency)]);return{maxFeePerGas:e.multiply(t-r)+r,maxPriorityFeePerGas:r}}};async function gw(e,t){let r=await e.request({method:"eth_gasPrice",params:[t]});return BigInt(r)}async function ww(e,t){let r=await e.request({method:"eth_maxPriorityFeePerGas",params:[t]});return BigInt(r)}He();Vr();hn();function cl(e){return e===0||e===0n||e===void 0||e===null||e==="0"||e===""||typeof e=="string"&&(Ie(e).toLowerCase()==="0x"||Ie(e).toLowerCase()==="0x00")}function ys(e){return!cl(e)}function vw(e){return typeof e.maxFeePerGas<"u"&&typeof e.maxPriorityFeePerGas<"u"}function Gu(e){return e.type==="cip64"?!0:vw(e)&&ys(e.feeCurrency)}var Jx={block:ch({format(e){return{transactions:e.transactions?.map(r=>typeof r=="string"?r:{...Bn(r),...r.gatewayFee?{gatewayFee:he(r.gatewayFee),gatewayFeeRecipient:r.gatewayFeeRecipient}:{},feeCurrency:r.feeCurrency}),...e.randomness?{randomness:e.randomness}:{}}}}),transaction:ah({format(e){if(e.type==="0x7e")return{isSystemTx:e.isSystemTx,mint:e.mint?he(e.mint):void 0,sourceHash:e.sourceHash,type:"deposit"};let t={feeCurrency:e.feeCurrency};return e.type==="0x7b"?t.type="cip64":(e.type==="0x7c"&&(t.type="cip42"),t.gatewayFee=e.gatewayFee?he(e.gatewayFee):null,t.gatewayFeeRecipient=e.gatewayFeeRecipient),t}}),transactionRequest:sh({format(e){let t={};return e.feeCurrency&&(t.feeCurrency=e.feeCurrency),Gu(e)&&(t.type="0x7b"),t}})};gc();Rt();W();Qo();hr();yt();et();V();function Ew(e,t){return Gu(e)?Aw(e,t):Yx(e,t)}var Xx={transaction:Ew};function Aw(e,t){Sw(e);let{chainId:r,gas:n,nonce:o,to:s,value:i,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:u,feeCurrency:p,data:f}=e,l=[z(r),o?z(o):"0x",c?z(c):"0x",a?z(a):"0x",n?z(n):"0x",s??"0x",i?z(i):"0x",f??"0x",Nn(u),p,...nn(e,t)];return Te(["0x7b",ft(l)])}var Tw=Gr;function Sw(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:o,to:s,feeCurrency:i}=e;if(t<=0)throw new yr({chainId:t});if(s&&!re(s))throw new ae({address:s});if(n)throw new g("`gasPrice` is not a valid CIP-64 Transaction attribute.");if(ys(o)&&o>Tw)throw new nt({maxFeePerGas:o});if(ys(r)&&ys(o)&&r>o)throw new gt({maxFeePerGas:o,maxPriorityFeePerGas:r});if(ys(i)&&!re(i))throw new g("`feeCurrency` MUST be a token address for CIP-64 transactions.");if(cl(i))throw new g("`feeCurrency` must be provided for CIP-64 transactions.")}var Qx={contracts:Kx,formatters:Jx,serializers:Xx,fees:Zx};var Wu=py({...Qx,id:42220,name:"Celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://celoscan.io",apiUrl:"https://api.celoscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:13112599}},testnet:!1});B0();F0();var Uw=Object.create,O0=Object.defineProperty,Lw=Object.getOwnPropertyDescriptor,M0=Object.getOwnPropertyNames,Hw=Object.getPrototypeOf,Dw=Object.prototype.hasOwnProperty,bl=(e,t)=>function(){return t||(0,e[M0(e)[0]])((t={exports:{}}).exports,t),t.exports},jw=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of M0(t))!Dw.call(e,o)&&o!==r&&O0(e,o,{get:()=>t[o],enumerable:!(n=Lw(t,o))||n.enumerable});return e},qw=(e,t,r)=>(r=e!=null?Uw(Hw(e)):{},jw(O0(r,"default",{value:e,enumerable:!0}),e)),Vw=bl({"../../node_modules/react/cjs/react.production.min.js"(e){var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),l=Symbol.iterator;function m(w){return w===null||typeof w!="object"?null:(w=l&&w[l]||w["@@iterator"],typeof w=="function"?w:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,d={};function h(w,I,G){this.props=w,this.context=I,this.refs=d,this.updater=G||y}h.prototype.isReactComponent={},h.prototype.setState=function(w,I){if(typeof w!="object"&&typeof w!="function"&&w!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,w,I,"setState")},h.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};function b(){}b.prototype=h.prototype;function v(w,I,G){this.props=w,this.context=I,this.refs=d,this.updater=G||y}var A=v.prototype=new b;A.constructor=v,x(A,h.prototype),A.isPureReactComponent=!0;var k=Array.isArray,S=Object.prototype.hasOwnProperty,T={current:null},B={key:!0,ref:!0,__self:!0,__source:!0};function P(w,I,G){var Z,Y={},le=null,se=null;if(I!=null)for(Z in I.ref!==void 0&&(se=I.ref),I.key!==void 0&&(le=""+I.key),I)S.call(I,Z)&&!B.hasOwnProperty(Z)&&(Y[Z]=I[Z]);var ie=arguments.length-2;if(ie===1)Y.children=G;else if(10&&tBigInt(0)){let i=BigInt(31536e3);s=this.toEtherNumber(this.cachedRewardRate*i)*100/this.toEtherNumber(e)}return{totalStaked:e,annualAPR:s}}async getUserStats(){let e=await this.getAccount(),[t,r,n]=await Promise.all([this.publicClient.readContract({...tp,functionName:"balanceOf",args:[e]}),this.publicClient.readContract({...an,functionName:"balanceOf",args:[e]}),this.publicClient.readContract({...an,functionName:"earned",args:[e]})]),o=BigInt(0);if(r>BigInt(0)&&this.totalStaked==BigInt(0)){await this.getGlobalStats();let s=BigInt(7*24*60*60);o=this.cachedRewardRate*s*r/this.totalStaked}return{walletBalance:t,currentStake:r,unclaimedRewards:n,userWeeklyRewards:o}}async stake(e,t){if(e<=BigInt(0))throw new Error("Amount must be greater than zero");let r=await this.getAccount();if(await this.publicClient.readContract({...tp,functionName:"balanceOf",args:[r]})this.refreshData(),3e4),this.refreshData()}disconnectedCallback(){this.interval&&clearInterval(this.interval)}updated(r){r.has("web3Provider")&&this.refreshData(),(r.has("walletBalance")||r.has("currentStake"))&&this.validateInput()}render(){let r=!!(this.web3Provider&&this.web3Provider.isConnected&&this.userAddress);return Er` +
+
+ +

Gooddollar Savings

+
+ +
+ + +
+ +
+
+ + ${this.activeTab==="stake"?`Wallet Balance: ${this.isLoading?"Loading...":this.formatBigInt(this.walletBalance)}`:`Current Stake: ${this.isLoading?"Loading...":this.formatBigInt(this.currentStake)}`} + +
+
+ + +
+ ${this.inputError?Er`
${this.inputError}
`:""} +
+ +
+ Unclaimed Rewards +
+ + ${this.isLoading?"Loading...":this.formatBigInt(this.unclaimedRewards)} +
+
+ + ${this.transactionError?Er`
${this.transactionError}
`:""} + + ${r?Er` + + `:Er` + + `} + +
+

Staking Statistics

+ +
+ Total G$ Staked + ${this.isLoading?"Loading...":this.formatBigInt(this.totalStaked)} +
+ + ${r?Er` +
+ Your G$ Stake Pool Share + ${this.isLoading?"Loading...":this.formatBigInt(this.currentStake)} +
+ +
+ Your Weekly Rewards + ${this.isLoading?"Loading...":this.formatBigInt(this.userWeeklyRewards)} +
+ `:""} + +
+ Annual Stake APR + ${this.isLoading?"Loading...":this.formatPercent(this.annualAPR)} +
+
+ ${this.txLoading||this.isClaiming?Er`
`:""} +
+ `}async refreshData(){if(this.publicClient||(this.publicClient=il({chain:Wu,transport:zf()})),this.web3Provider&&this.web3Provider.isConnected){this.walletClient=al({chain:Wu,transport:Of(this.web3Provider)}),this.sdk=new gl(this.publicClient,this.walletClient),await this.loadStats();let r=await this.web3Provider.request({method:"eth_accounts"});r.length>0?(this.userAddress=r[0],await this.loadUserStats()):this.resetUserStats()}else this.sdk=new gl(this.publicClient),await this.loadStats()}async loadStats(){if(this.sdk)try{let r=await this.sdk.getGlobalStats();this.totalStaked=r.totalStaked,this.annualAPR=r.annualAPR}catch(r){console.error("Error loading global stats:",r)}}async loadUserStats(){if(!(!this.sdk||!this.userAddress))try{let r=await this.sdk.getUserStats();this.walletBalance=r.walletBalance,this.currentStake=r.currentStake,this.unclaimedRewards=r.unclaimedRewards,this.userWeeklyRewards=r.userWeeklyRewards}catch(r){console.error("Error loading user stats:",r)}}resetUserStats(){this.walletBalance=0n,this.currentStake=0n,this.unclaimedRewards=0n,this.userWeeklyRewards=0n}formatBigInt(r){return Intl.NumberFormat().format(this.toEtherNumber(r))}toEtherNumber(r){return Number(ar(r))}formatPercent(r){return`${r.toFixed(2)}%`}handleTabClick(r){this.activeTab=r,this.inputError="",this.transactionError=""}handleMaxClick(){this.activeTab==="stake"?this.inputAmount=this.toEtherNumber(this.walletBalance).toString():this.inputAmount=this.toEtherNumber(this.currentStake).toString(),this.inputError=""}handleInputChange(r){let n=r.target;this.inputAmount=n.value,this.validateInput()}validateInput(r=!1){if(this.inputError="",!this.inputAmount||this.inputAmount.trim()==="")return;if(!/^[0-9]*\.?[0-9]*$/.test(this.inputAmount)){this.inputError="Invalid value";return}let o=parseFloat(this.inputAmount);if(isNaN(o)||o<0){this.inputError="Invalid value";return}if(o===0&&r){this.inputError="Please enter a valid amount";return}if(this.activeTab==="stake"&&cs(this.inputAmount)>this.walletBalance){this.inputError="Insufficient balance";return}if(this.activeTab==="unstake"&&cs(this.inputAmount)>this.currentStake){this.inputError="Max amount exceeded";return}}handleConnectWallet(){this.connectWallet&&this.connectWallet()}async handleStake(){if(!(!this.sdk||!this.userAddress)&&(this.validateInput(!0),!this.inputError))try{this.txLoading=!0,this.transactionError="";let r=cs(this.inputAmount);(await this.sdk.stake(r)).status==="success"&&(await this.refreshData(),this.inputAmount="0.0",this.inputError="",this.transactionError="")}catch(r){console.error("Staking error:",r),this.transactionError=r.message||"Staking failed"}finally{this.txLoading=!1}}async handleUnstake(){if(!(!this.sdk||!this.userAddress)&&(this.validateInput(!0),!this.inputError))try{this.txLoading=!0,this.transactionError="";let r=cs(this.inputAmount);(await this.sdk.unstake(r)).status==="success"&&(await this.refreshData(),this.inputAmount="0.0",this.inputError="",this.transactionError="")}catch(r){console.error("Unstaking error:",r),this.transactionError=r.message||"Unstaking failed"}finally{this.txLoading=!1}}async handleClaim(){if(!(!this.sdk||!this.userAddress))try{this.isClaiming=!0,this.transactionError="",(await this.sdk.claimReward()).status==="success"&&(await this.refreshData(),this.transactionError="")}catch(r){console.error("Claim error:",r),this.transactionError=r.message||"Claim failed"}finally{this.isClaiming=!1}}};ge.styles=sp` + :host { + display: block; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; + max-width: 480px; + margin: 0 auto; + } + + .container { + background: white; + border-radius: 16px; + padding: 24px; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + border: 1px solid #e5e7eb; + position: relative; + } + + .header { + display: flex; + align-items: center; + gap: 12px; + margin-bottom: 24px; + } + + .logo { + width: 48px; + height: 48px; + background-color: white; + display: flex; + align-items: center; + justify-content: center; + } + .logo img { + width: 44px; + height: 44px; + box-shadow: rgba(0, 0, 0, 0.075) 0px 6px 10px; + border-radius: 50%; + background-color: white; + } + + .title { + font-size: 24px; + font-weight: 600; + color: #111827; + margin: 0; + } + + .tab-container { + display: flex; + background: #f9fafb; + border-radius: 12px; + padding: 4px; + margin-bottom: 16px; + border: 1px solid #e5e7eb; + } + + .tab { + flex: 1; + padding: 10px 16px; + border: none; + background: transparent; + border-radius: 8px; + font-size: 16px; + font-weight: 500; + cursor: pointer; + transition: all 0.2s ease; + color: #6b7280; + } + + .tab.active { + background: #00b0ff; + color: #ffffff; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); + } + + .input-section { + background: #f9fafb; + border-radius: 12px; + padding: 16px; + margin-bottom: 16px; + border: 1px solid #e5e7eb; + } + + .balance-info { + display: flex; + justify-content: flex-end; + align-items: center; + margin-bottom: 12px; + font-size: 14px; + color: #6b7280; + } + + .input-container { + display: flex; + align-items: center; + gap: 12px; + } + + .amount-input { + flex: 1; + border: none; + background: transparent; + font-size: 24px; + font-weight: 600; + color: #111827; + outline: none; + } + + .max-button { + background: #ffffff; + border-radius: 8px; + padding: 6px 12px; + font-size: 12px; + font-weight: 400; + color: #374151; + border: 1px solid #374151; + cursor: pointer; + transition: background-color 0.2s ease; + } + + .max-button:hover { + border: 1px solid #00b0ff; + color: #00b0ff; + } + + .rewards-section { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 16px; + padding: 0 4px; + } + + .rewards-label { + font-size: 16px; + color: #374151; + } + + .rewards-value { + display: flex; + align-items: center; + gap: 8px; + } + + .claim-button { + background: none; + border: none; + color: #0387c3; + font-size: 16px; + font-weight: 600; + text-decoration: underline; + cursor: pointer; + padding: 0; + } + + .main-button { + width: 100%; + background: #00b0ff; + border: none; + border-radius: 12px; + padding: 16px; + font-size: 18px; + font-weight: 600; + color: #ffffff; + cursor: pointer; + margin-bottom: 24px; + transition: background-color 0.2s ease; + box-shadow: rgba(11, 27, 102, 0.306) 3px 3px 10px -1px; + } + + .main-button:hover { + background: #0387c3; + } + + .main-button.primary { + background: #00b0ff; + color: white; + } + + .main-button.primary:hover { + background: #0387c3; + } + + .stats-section { + background: #f9fafb; + border-radius: 12px; + padding: 20px; + border: 1px solid #e5e7eb; + } + + .stats-title { + font-size: 18px; + font-weight: 600; + color: #111827; + margin: 0 0 16px 0; + } + + .stat-row { + display: flex; + justify-content: space-between; + align-items: center; + padding: 8px 0; + border-bottom: 1px solid #e5e7eb; + } + + .stat-row:last-child { + border-bottom: none; + } + + .stat-label { + font-size: 14px; + color: #6b7280; + } + + .stat-value { + font-size: 14px; + font-weight: 600; + color: #111827; + } + + .hidden { + display: none; + } + + .overlay { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(255, 255, 255, 0.2); + border-radius: 16px; + z-index: 10; + display: flex; + align-items: center; + justify-content: center; + pointer-events: none; + } + + .error-message { + color: #dc2626; + font-size: 12px; + margin-top: 4px; + padding-left: 4px; + } + `,Oe([Is({type:Object})],ge.prototype,"web3Provider",2),Oe([Is({type:Function})],ge.prototype,"connectWallet",2),Oe([Ye()],ge.prototype,"activeTab",2),Oe([Ye()],ge.prototype,"inputAmount",2),Oe([Ye()],ge.prototype,"walletBalance",2),Oe([Ye()],ge.prototype,"currentStake",2),Oe([Ye()],ge.prototype,"unclaimedRewards",2),Oe([Ye()],ge.prototype,"totalStaked",2),Oe([Ye()],ge.prototype,"userWeeklyRewards",2),Oe([Ye()],ge.prototype,"annualAPR",2),Oe([Ye()],ge.prototype,"interval",2),Oe([Ye()],ge.prototype,"isLoading",2),Oe([Ye()],ge.prototype,"txLoading",2),Oe([Ye()],ge.prototype,"isClaiming",2),Oe([Ye()],ge.prototype,"inputError",2),Oe([Ye()],ge.prototype,"transactionError",2),ge=Oe([Ml("gooddollar-savings-widget")],ge);return H0(Zw);})(); +/*! Bundled license information: + +react/cjs/react.production.min.js: + (** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) + +react/cjs/react.development.js: + (** + * @license React + * react.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) +*/ +/*! Bundled license information: + +@noble/hashes/esm/utils.js: + (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *) + +@noble/curves/esm/abstract/utils.js: + (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *) + +@noble/curves/esm/abstract/modular.js: + (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *) + +@noble/curves/esm/abstract/curve.js: + (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *) + +@noble/curves/esm/abstract/weierstrass.js: + (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *) + +@noble/curves/esm/_shortw_utils.js: + (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *) + +@noble/curves/esm/secp256k1.js: + (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *) + +@lit/reactive-element/css-tag.js: + (** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/reactive-element.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +lit-html/lit-html.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +lit-element/lit-element.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +lit-html/is-server.js: + (** + * @license + * Copyright 2022 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/custom-element.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/property.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/state.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/event-options.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/base.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/query.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/query-all.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/query-async.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/query-assigned-elements.js: + (** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/query-assigned-nodes.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@noble/hashes/esm/utils.js: + (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *) +*/ diff --git a/src/language/locales/af/catalog.po b/src/language/locales/af/catalog.po index b25ebf9c3..bd5c259de 100644 --- a/src/language/locales/af/catalog.po +++ b/src/language/locales/af/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/ar/catalog.po b/src/language/locales/ar/catalog.po index ff65b275b..c3f700b1e 100644 --- a/src/language/locales/ar/catalog.po +++ b/src/language/locales/ar/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/ca/catalog.po b/src/language/locales/ca/catalog.po index b007f56e0..d48263003 100644 --- a/src/language/locales/ca/catalog.po +++ b/src/language/locales/ca/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/cs/catalog.po b/src/language/locales/cs/catalog.po index c525376d7..adac9083e 100644 --- a/src/language/locales/cs/catalog.po +++ b/src/language/locales/cs/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/da/catalog.po b/src/language/locales/da/catalog.po index 7e9a6479a..ddc768ac4 100644 --- a/src/language/locales/da/catalog.po +++ b/src/language/locales/da/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/de/catalog.po b/src/language/locales/de/catalog.po index c57c6fc10..9e827a39f 100644 --- a/src/language/locales/de/catalog.po +++ b/src/language/locales/de/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/el/catalog.po b/src/language/locales/el/catalog.po index 372889dc3..8835130d0 100644 --- a/src/language/locales/el/catalog.po +++ b/src/language/locales/el/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/en/catalog.po b/src/language/locales/en/catalog.po index 7f28cf042..b18fec504 100644 --- a/src/language/locales/en/catalog.po +++ b/src/language/locales/en/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/es-419/catalog.po b/src/language/locales/es-419/catalog.po index 4eb37d02b..83d9586b6 100644 --- a/src/language/locales/es-419/catalog.po +++ b/src/language/locales/es-419/catalog.po @@ -304,9 +304,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/es/catalog.po b/src/language/locales/es/catalog.po index 712bc9730..5982bb613 100644 --- a/src/language/locales/es/catalog.po +++ b/src/language/locales/es/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/fi/catalog.po b/src/language/locales/fi/catalog.po index 398c834e9..13ad5622c 100644 --- a/src/language/locales/fi/catalog.po +++ b/src/language/locales/fi/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/fr/catalog.po b/src/language/locales/fr/catalog.po index da98915c3..e902b5c10 100644 --- a/src/language/locales/fr/catalog.po +++ b/src/language/locales/fr/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/he/catalog.po b/src/language/locales/he/catalog.po index 8fda79720..8040e047d 100644 --- a/src/language/locales/he/catalog.po +++ b/src/language/locales/he/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/hi/catalog.po b/src/language/locales/hi/catalog.po index 4716be939..a5d6d2032 100644 --- a/src/language/locales/hi/catalog.po +++ b/src/language/locales/hi/catalog.po @@ -1709,9 +1709,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/hu/catalog.po b/src/language/locales/hu/catalog.po index 4fcf49e00..7909de91b 100644 --- a/src/language/locales/hu/catalog.po +++ b/src/language/locales/hu/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/it/catalog.po b/src/language/locales/it/catalog.po index f3b369744..26598acac 100644 --- a/src/language/locales/it/catalog.po +++ b/src/language/locales/it/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/ja/catalog.po b/src/language/locales/ja/catalog.po index 6be45fac7..514bd80f1 100644 --- a/src/language/locales/ja/catalog.po +++ b/src/language/locales/ja/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/ko/catalog.po b/src/language/locales/ko/catalog.po index 9bcad4dfd..919f1caf2 100644 --- a/src/language/locales/ko/catalog.po +++ b/src/language/locales/ko/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/nl/catalog.po b/src/language/locales/nl/catalog.po index ebf9384f7..dd4abae0d 100644 --- a/src/language/locales/nl/catalog.po +++ b/src/language/locales/nl/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/no/catalog.po b/src/language/locales/no/catalog.po index 7956951ae..6cf3d14c3 100644 --- a/src/language/locales/no/catalog.po +++ b/src/language/locales/no/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/pl/catalog.po b/src/language/locales/pl/catalog.po index 8d1a322fb..695c72de5 100644 --- a/src/language/locales/pl/catalog.po +++ b/src/language/locales/pl/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/pt-BR/catalog.po b/src/language/locales/pt-BR/catalog.po index 006711011..a61bb6e6c 100644 --- a/src/language/locales/pt-BR/catalog.po +++ b/src/language/locales/pt-BR/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/pt/catalog.po b/src/language/locales/pt/catalog.po index 91d3a7cbf..e33fdf7ce 100644 --- a/src/language/locales/pt/catalog.po +++ b/src/language/locales/pt/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/ro/catalog.po b/src/language/locales/ro/catalog.po index 9a3481157..1642a036c 100644 --- a/src/language/locales/ro/catalog.po +++ b/src/language/locales/ro/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/ru/catalog.po b/src/language/locales/ru/catalog.po index ae1f4f0b9..0883e0385 100644 --- a/src/language/locales/ru/catalog.po +++ b/src/language/locales/ru/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/sr/catalog.po b/src/language/locales/sr/catalog.po index 9cc0eb746..722c44477 100644 --- a/src/language/locales/sr/catalog.po +++ b/src/language/locales/sr/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/sv/catalog.po b/src/language/locales/sv/catalog.po index 501f60b6a..e6b70a56c 100644 --- a/src/language/locales/sv/catalog.po +++ b/src/language/locales/sv/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/tr/catalog.po b/src/language/locales/tr/catalog.po index 0f34c435e..b39a6b3fe 100644 --- a/src/language/locales/tr/catalog.po +++ b/src/language/locales/tr/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/uk/catalog.po b/src/language/locales/uk/catalog.po index 9391426fc..9752d8d58 100644 --- a/src/language/locales/uk/catalog.po +++ b/src/language/locales/uk/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/vi/catalog.po b/src/language/locales/vi/catalog.po index df54f784f..a23cbe451 100644 --- a/src/language/locales/vi/catalog.po +++ b/src/language/locales/vi/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/zh-CN/catalog.po b/src/language/locales/zh-CN/catalog.po index 20c5bf14b..639c93561 100644 --- a/src/language/locales/zh-CN/catalog.po +++ b/src/language/locales/zh-CN/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/zh-TW/catalog.po b/src/language/locales/zh-TW/catalog.po index c0a13800d..3c08708ca 100644 --- a/src/language/locales/zh-TW/catalog.po +++ b/src/language/locales/zh-TW/catalog.po @@ -2954,9 +2954,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/language/locales/zh/catalog.po b/src/language/locales/zh/catalog.po index d0830f330..b21ce9378 100644 --- a/src/language/locales/zh/catalog.po +++ b/src/language/locales/zh/catalog.po @@ -2425,9 +2425,17 @@ msgstr "" #~ msgid "Donate" #~ msgstr "" -#: src/pages/gd/Savings/index.tsx:14 +#: src/pages/gd/Savings/index.tsx:23 +#~ msgid "" +#~ "Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +#~ "Savings provides a simple way to generate yield on your digital assets.\n" +#~ "Securely lock your assets and watch them grow over time.\n" +#~ "Please be patient, loading information may take some time." +#~ msgstr "" + +#: src/pages/gd/Savings/index.tsx:13 msgid "" -"Earn rewards by saving your GoodDollars with Ubeswap savings products!\n" +"Earn rewards by saving your GoodDollars with Ubeswap savings products! \n" "Savings provides a simple way to generate yield on your digital assets.\n" "Securely lock your assets and watch them grow over time.\n" "Please be patient, loading information may take some time." diff --git a/src/pages/Savings/index.global.js b/src/pages/Savings/index.global.js new file mode 100644 index 000000000..cb78b2bb7 --- /dev/null +++ b/src/pages/Savings/index.global.js @@ -0,0 +1,544 @@ +"use strict";var GooddollarSavingsWidget=(()=>{var $i=Object.defineProperty;var wl=Object.getOwnPropertyDescriptor;var z0=Object.getOwnPropertyNames;var U0=Object.prototype.hasOwnProperty;var E=(e,t)=>()=>(e&&(t=e(e=0)),t);var np=(e,t)=>{for(var r in t)$i(e,r,{get:t[r],enumerable:!0})},L0=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of z0(t))!U0.call(e,o)&&o!==r&&$i(e,o,{get:()=>t[o],enumerable:!(n=wl(t,o))||n.enumerable});return e};var H0=e=>L0($i({},"__esModule",{value:!0}),e),Oe=(e,t,r,n)=>{for(var o=n>1?void 0:n?wl(t,r):t,s=e.length-1,i;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&$i(t,r,o),o};var zl,Ul=E(()=>{"use strict";zl="1.0.8"});var Ae,qn=E(()=>{"use strict";Ul();Ae=class e extends Error{constructor(t,r={}){let n=r.cause instanceof e?r.cause.details:r.cause?.message?r.cause.message:r.details,o=r.cause instanceof e&&r.cause.docsPath||r.docsPath,s=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...o?[`Docs: https://abitype.dev${o}`]:[],...n?[`Details: ${n}`]:[],`Version: abitype@${zl}`].join(` +`);super(s),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,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=o,this.metaMessages=r.metaMessages,this.shortMessage=t}}});function at(e,t){return e.exec(t)?.groups}var xp,bp,Li,Ps=E(()=>{"use strict";xp=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,bp=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,Li=/^\(.+?\).*?$/});function Hi(e){let t=e.type;if(Ll.test(e.type)&&"components"in e){t="(";let r=e.components.length;for(let o=0;o{"use strict";Ps();Ll=/^tuple(?(\[(\d*)\])*)$/});function Vn(e){let t="",r=e.length;for(let n=0;n{"use strict";Hl()});function dn(e){return e.type==="function"?`function ${e.name}(${Vn(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${Vn(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${Vn(e.inputs)})`:e.type==="error"?`error ${e.name}(${Vn(e.inputs)})`:e.type==="constructor"?`constructor(${Vn(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}var jl=E(()=>{"use strict";Dl()});function Vl(e){return ql.test(e)}function Gl(e){return at(ql,e)}function Kl(e){return Wl.test(e)}function Yl(e){return at(Wl,e)}function Jl(e){return Zl.test(e)}function Xl(e){return at(Zl,e)}function Gn(e){return Ql.test(e)}function em(e){return at(Ql,e)}function rm(e){return tm.test(e)}function nm(e){return at(tm,e)}function sm(e){return om.test(e)}function im(e){return at(om,e)}function am(e){return nb.test(e)}var ql,Wl,Zl,Ql,tm,om,nb,cm,Di,ks=E(()=>{"use strict";Ps();ql=/^error (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;Wl=/^event (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;Zl=/^function (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)(?: (?external|public{1}))?(?: (?pure|view|nonpayable|payable{1}))?(?: returns\s?\((?.*?)\))?$/;Ql=/^struct (?[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?.*?)\}$/;tm=/^constructor\((?.*?)\)(?:\s(?payable{1}))?$/;om=/^fallback\(\) external(?:\s(?payable{1}))?$/;nb=/^receive\(\) external payable$/;cm=new Set(["indexed"]),Di=new Set(["calldata","memory","storage"])});var ji,qi,Vi,Gi=E(()=>{"use strict";qn();ji=class extends Ae{constructor({signature:t}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}},qi=class extends Ae{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}},Vi=class extends Ae{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}});var Wi,Ki,Yi,Zi,Ji,gp=E(()=>{"use strict";qn();Wi=class extends Ae{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}},Ki=class extends Ae{constructor({param:t,name:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${r}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}},Yi=class extends Ae{constructor({param:t,type:r,modifier:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${n}" not allowed${r?` in "${r}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}},Zi=class extends Ae{constructor({param:t,type:r,modifier:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${n}" not allowed${r?` in "${r}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${n}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}},Ji=class extends Ae{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}});var zt,Xi,Qi,wp=E(()=>{"use strict";qn();zt=class extends Ae{constructor({signature:t,type:r}){super(`Invalid ${r} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}},Xi=class extends Ae{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}},Qi=class extends Ae{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}});var ea,um=E(()=>{"use strict";qn();ea=class extends Ae{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}});var ta,pm=E(()=>{"use strict";qn();ta=class extends Ae{constructor({current:t,depth:r}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${r>0?"opening":"closing"} parentheses.`],details:`Depth "${r}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}});function fm(e,t,r){let n="";if(r)for(let o of Object.entries(r)){if(!o)continue;let s="";for(let i of o[1])s+=`[${i.type}${i.name?`:${i.name}`:""}]`;n+=`(${o[0]}{${s}})`}return t?`${t}:${e}${n}`:e}var ra,lm=E(()=>{"use strict";ra=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]])});function Bs(e,t={}){if(Jl(e))return ob(e,t);if(Kl(e))return sb(e,t);if(Vl(e))return ib(e,t);if(rm(e))return ab(e,t);if(sm(e))return cb(e);if(am(e))return{type:"receive",stateMutability:"payable"};throw new Xi({signature:e})}function ob(e,t={}){let r=Xl(e);if(!r)throw new zt({signature:e,type:"function"});let n=Tt(r.parameters),o=[],s=n.length;for(let a=0;a{"use strict";Ps();Gi();gp();wp();pm();lm();ks();ub=/^(?[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,pb=/^\((?.+?)\)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,fb=/^u?int$/;lb=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/});function oa(e){let t={},r=e.length;for(let i=0;i{"use strict";Ps();Gi();gp();wp();um();ks();na();hb=/^(?[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?$/});function sa(e){let t=oa(e),r=[],n=e.length;for(let o=0;o{"use strict";ks();Ep();na()});function ia(e){let t;if(typeof e=="string")t=Bs(e);else{let r=oa(e),n=e.length;for(let o=0;o{"use strict";Gi();ks();Ep();na()});var aa=E(()=>{"use strict";jl();dm();hm()});function Ce(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new ca(e.type);return`${e.name}(${Rs(e.inputs,{includeName:t})})`}function Rs(e,{includeName:t=!1}={}){return e?e.map(r=>xb(r,{includeName:t})).join(t?", ":","):""}function xb(e,{includeName:t}){return e.type.startsWith("tuple")?`(${Rs(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}var tr=E(()=>{"use strict";ye()});function we(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}var St=E(()=>{"use strict"});function ee(e){return we(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}var mt=E(()=>{"use strict";St()});var Ap,ym=E(()=>{"use strict";Ap="2.28.4"});function xm(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?xm(e.cause,t):t?null:e}var Tp,g,W=E(()=>{"use strict";ym();Tp={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${Ap}`},g=class e extends Error{constructor(t,r={}){let n=r.cause instanceof e?r.cause.details:r.cause?.message?r.cause.message:r.details,o=r.cause instanceof e&&r.cause.docsPath||r.docsPath,s=Tp.getDocsUrl?.({...r,docsPath:o}),i=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...s?[`Docs: ${s}`]:[],...n?[`Details: ${n}`]:[],...Tp.version?[`Version: ${Tp.version}`]:[]].join(` +`);super(i,r.cause?{cause:r.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=o,this.metaMessages=r.metaMessages,this.name=r.name??this.name,this.shortMessage=t,this.version=Ap}walk(t){return xm(this,t)}}});var ua,_s,Wn,dt,pa,fa,la,ma,$s,Kn,da,Yn,Ns,Ct,Zn,ha,ya,xa,It,Ut,ba,ga,Jn,ca,ye=E(()=>{"use strict";tr();mt();W();ua=class extends g{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(` +`),{docsPath:t,name:"AbiConstructorNotFoundError"})}},_s=class extends g{constructor({docsPath:t}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(` +`),{docsPath:t,name:"AbiConstructorParamsNotFoundError"})}},Wn=class extends g{constructor({data:t,params:r,size:n}){super([`Data size of ${n} bytes is too small for given parameters.`].join(` +`),{metaMessages:[`Params: (${Rs(r,{includeName:!0})})`,`Data: ${t} (${n} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t,this.params=r,this.size=n}},dt=class extends g{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}},pa=class extends g{constructor({expectedLength:t,givenLength:r,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${t}`,`Given length: ${r}`].join(` +`),{name:"AbiEncodingArrayLengthMismatchError"})}},fa=class extends g{constructor({expectedSize:t,value:r}){super(`Size of bytes "${r}" (bytes${ee(r)}) does not match expected size (bytes${t}).`,{name:"AbiEncodingBytesSizeMismatchError"})}},la=class extends g{constructor({expectedLength:t,givenLength:r}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${t}`,`Given length (values): ${r}`].join(` +`),{name:"AbiEncodingLengthMismatchError"})}},ma=class extends g{constructor(t,{docsPath:r}){super([`Arguments (\`args\`) were provided to "${t}", but "${t}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join(` +`),{docsPath:r,name:"AbiErrorInputsNotFoundError"})}},$s=class extends g{constructor(t,{docsPath:r}={}){super([`Error ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join(` +`),{docsPath:r,name:"AbiErrorNotFoundError"})}},Kn=class extends g{constructor(t,{docsPath:r}){super([`Encoded error signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${t}.`].join(` +`),{docsPath:r,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=t}},da=class extends g{constructor({docsPath:t}){super("Cannot extract event signature from empty topics.",{docsPath:t,name:"AbiEventSignatureEmptyTopicsError"})}},Yn=class extends g{constructor(t,{docsPath:r}){super([`Encoded event signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${t}.`].join(` +`),{docsPath:r,name:"AbiEventSignatureNotFoundError"})}},Ns=class extends g{constructor(t,{docsPath:r}={}){super([`Event ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(` +`),{docsPath:r,name:"AbiEventNotFoundError"})}},Ct=class extends g{constructor(t,{docsPath:r}={}){super([`Function ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(` +`),{docsPath:r,name:"AbiFunctionNotFoundError"})}},Zn=class extends g{constructor(t,{docsPath:r}){super([`Function "${t}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(` +`),{docsPath:r,name:"AbiFunctionOutputsNotFoundError"})}},ha=class extends g{constructor(t,{docsPath:r}){super([`Encoded function signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${t}.`].join(` +`),{docsPath:r,name:"AbiFunctionSignatureNotFoundError"})}},ya=class extends g{constructor(t,r){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${t.type}\` in \`${Ce(t.abiItem)}\`, and`,`\`${r.type}\` in \`${Ce(r.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}},xa=class extends g{constructor({expectedSize:t,givenSize:r}){super(`Expected bytes${t}, got bytes${r}.`,{name:"BytesSizeMismatchError"})}},It=class extends g{constructor({abiItem:t,data:r,params:n,size:o}){super([`Data size of ${o} bytes is too small for non-indexed event parameters.`].join(` +`),{metaMessages:[`Params: (${Rs(n,{includeName:!0})})`,`Data: ${r} (${o} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=t,this.data=r,this.params=n,this.size=o}},Ut=class extends g{constructor({abiItem:t,param:r}){super([`Expected a topic for indexed event parameter${r.name?` "${r.name}"`:""} on event "${Ce(t,{includeName:!0})}".`].join(` +`),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=t}},ba=class extends g{constructor(t,{docsPath:r}){super([`Type "${t}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(` +`),{docsPath:r,name:"InvalidAbiEncodingType"})}},ga=class extends g{constructor(t,{docsPath:r}){super([`Type "${t}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(` +`),{docsPath:r,name:"InvalidAbiDecodingType"})}},Jn=class extends g{constructor(t){super([`Value "${t}" is not a valid array.`].join(` +`),{name:"InvalidArrayError"})}},ca=class extends g{constructor(t){super([`"${t}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(` +`),{name:"InvalidDefinitionTypeError"})}}});var Fs,Os,Ms,va=E(()=>{"use strict";W();Fs=class extends g{constructor({offset:t,position:r,size:n}){super(`Slice ${r==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${n}).`,{name:"SliceOffsetOutOfBoundsError"})}},Os=class extends g{constructor({size:t,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${t}) exceeds padding size (${r}).`,{name:"SizeExceedsPaddingSizeError"})}},Ms=class extends g{constructor({size:t,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} is expected to be ${r} ${n} long, but is ${t} ${n} long.`,{name:"InvalidBytesLengthError"})}}});function Sr(e,{dir:t,size:r=32}={}){return typeof e=="string"?rr(e,{dir:t,size:r}):bb(e,{dir:t,size:r})}function rr(e,{dir:t,size:r=32}={}){if(r===null)return e;let n=e.replace("0x","");if(n.length>r*2)throw new Os({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n[t==="right"?"padEnd":"padStart"](r*2,"0")}`}function bb(e,{dir:t,size:r=32}={}){if(r===null)return e;if(e.length>r)throw new Os({size:e.length,targetSize:r,type:"bytes"});let n=new Uint8Array(r);for(let o=0;o{"use strict";va()});var Xn,Aa,Ta,Sa,zs=E(()=>{"use strict";W();Xn=class extends g{constructor({max:t,min:r,signed:n,size:o,value:s}){super(`Number "${s}" is not in safe ${o?`${o*8}-bit ${n?"signed":"unsigned"} `:""}integer range ${t?`(${r} to ${t})`:`(above ${r})`}`,{name:"IntegerOutOfRangeError"})}},Aa=class extends g{constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}},Ta=class extends g{constructor(t){super(`Hex value "${t}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}},Sa=class extends g{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}}});function Ie(e,{dir:t="left"}={}){let r=typeof e=="string"?e.replace("0x",""):e,n=0;for(let o=0;o{"use strict"});function Qe(e,{size:t}){if(ee(e)>t)throw new Sa({givenSize:ee(e),maxSize:t})}function he(e,t={}){let{signed:r}=t;t.size&&Qe(e,{size:t.size});let n=BigInt(e);if(!r)return n;let o=(e.length-2)/2,s=(1n<{"use strict";zs();mt();hn()});function z(e,t={}){return typeof e=="number"||typeof e=="bigint"?_(e,t):typeof e=="string"?Lt(e,t):typeof e=="boolean"?Cp(e,t):te(e,t)}function Cp(e,t={}){let r=`0x${Number(e)}`;return typeof t.size=="number"?(Qe(r,{size:t.size}),Sr(r,{size:t.size})):r}function te(e,t={}){let r="";for(let o=0;os||o{"use strict";zs();Ea();He();gb=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));wb=new TextEncoder});function ht(e,t={}){return typeof e=="number"||typeof e=="bigint"?Ab(e,t):typeof e=="boolean"?Eb(e,t):we(e)?Pe(e,t):Pt(e,t)}function Eb(e,t={}){let r=new Uint8Array(1);return r[0]=Number(e),typeof t.size=="number"?(Qe(r,{size:t.size}),Sr(r,{size:t.size})):r}function bm(e){if(e>=nr.zero&&e<=nr.nine)return e-nr.zero;if(e>=nr.A&&e<=nr.F)return e-(nr.A-10);if(e>=nr.a&&e<=nr.f)return e-(nr.a-10)}function Pe(e,t={}){let r=e;t.size&&(Qe(r,{size:t.size}),r=Sr(r,{dir:"right",size:t.size}));let n=r.slice(2);n.length%2&&(n=`0${n}`);let o=n.length/2,s=new Uint8Array(o);for(let i=0,a=0;i{"use strict";W();St();Ea();He();V();vb=new TextEncoder;nr={zero:48,nine:57,A:65,F:70,a:97,f:102}});function Us(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Tb(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Cr(e,...t){if(!Tb(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function gm(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Us(e.outputLen),Us(e.blockLen)}function or(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 Ca(e,t){Cr(e);let r=t.outputLen;if(e.length{"use strict"});function Sb(e,t=!1){return t?{h:Number(e&Ia),l:Number(e>>wm&Ia)}:{h:Number(e>>wm&Ia)|0,l:Number(e&Ia)|0}}function vm(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;o{"use strict";Ia=BigInt(4294967295),wm=BigInt(32);Em=(e,t,r)=>e<>>32-r,Am=(e,t,r)=>t<>>32-r,Tm=(e,t,r)=>t<>>64-r,Sm=(e,t,r)=>e<>>64-r});var yn,Im=E(()=>{"use strict";yn=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0});function Pm(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Pa(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function kt(e,t){return e<<32-t|e>>>t}function Cb(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function Pp(e){for(let t=0;te().update(Pr(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function Bm(e){let t=(n,o)=>e(o).update(Pr(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}function Ba(e=32){if(yn&&typeof yn.getRandomValues=="function")return yn.getRandomValues(new Uint8Array(e));if(yn&&typeof yn.randomBytes=="function")return Uint8Array.from(yn.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}var Ip,DA,Ir,xn=E(()=>{"use strict";Im();Ls();Ip=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;DA=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function";Ir=class{clone(){return this._cloneInto()}}});function Fb(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let i=0;i<10;i++)r[i]=e[i]^e[i+10]^e[i+20]^e[i+30]^e[i+40];for(let i=0;i<10;i+=2){let a=(i+8)%10,c=(i+2)%10,u=r[c],p=r[c+1],f=Rm(u,p,1)^r[a],l=_m(u,p,1)^r[a+1];for(let m=0;m<50;m+=10)e[i+m]^=f,e[i+m+1]^=l}let o=e[2],s=e[3];for(let i=0;i<24;i++){let a=Nm[i],c=Rm(o,s,a),u=_m(o,s,a),p=$m[i];o=e[p],s=e[p+1],e[p]=c,e[p+1]=u}for(let i=0;i<50;i+=10){for(let a=0;a<10;a++)r[a]=e[i+a];for(let a=0;a<10;a++)e[i+a]^=~r[(a+2)%10]&r[(a+4)%10]}e[0]^=$b[n],e[1]^=Nb[n]}r.fill(0)}var $m,Nm,Fm,Pb,Hs,kb,Bb,Rb,_b,$b,Nb,Rm,_m,Ra,kr,WA,KA,YA,ZA,JA,Om,XA,QA,Mm,eT,tT,zm=E(()=>{"use strict";Ls();Cm();xn();$m=[],Nm=[],Fm=[],Pb=BigInt(0),Hs=BigInt(1),kb=BigInt(2),Bb=BigInt(7),Rb=BigInt(256),_b=BigInt(113);for(let e=0,t=Hs,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],$m.push(2*(5*n+r)),Nm.push((e+1)*(e+2)/2%64);let o=Pb;for(let s=0;s<7;s++)t=(t<>Bb)*_b)%Rb,t&kb&&(o^=Hs<<(Hs<r>32?Tm(e,t,r):Em(e,t,r),_m=(e,t,r)=>r>32?Sm(e,t,r):Am(e,t,r);Ra=class e extends Ir{constructor(t,r,n,o=!1,s=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=r,this.outputLen=n,this.enableXOF=o,this.rounds=s,Us(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Pm(this.state)}keccak(){Ip||Pp(this.state32),Fb(this.state32,this.rounds),Ip||Pp(this.state32),this.posOut=0,this.pos=0}update(t){or(this);let{blockLen:r,state:n}=this;t=Pr(t);let o=t.length;for(let s=0;s=n&&this.keccak();let i=Math.min(n-this.posOut,s-o);t.set(r.subarray(this.posOut,this.posOut+i),o),this.posOut+=i,o+=i}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return Us(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(Ca(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:r,suffix:n,outputLen:o,rounds:s,enableXOF:i}=this;return t||(t=new e(r,n,o,i,s)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=s,t.suffix=n,t.outputLen=o,t.enableXOF=i,t.destroyed=this.destroyed,t}},kr=(e,t,r)=>ka(()=>new Ra(t,e,r)),WA=kr(6,144,224/8),KA=kr(6,136,256/8),YA=kr(6,104,384/8),ZA=kr(6,72,512/8),JA=kr(1,144,224/8),Om=kr(1,136,256/8),XA=kr(1,104,384/8),QA=kr(1,72,512/8),Mm=(e,t,r)=>Bm((n={})=>new Ra(t,e,n.dkLen===void 0?r:n.dkLen,!0)),eT=Mm(31,168,128/8),tT=Mm(31,136,256/8)});function ue(e,t){let r=t||"hex",n=Om(we(e,{strict:!1})?ht(e):e);return r==="bytes"?n:z(n)}var Bt=E(()=>{"use strict";zm();St();ze();V()});function Um(e){return Ob(e)}var Ob,Lm=E(()=>{"use strict";ze();Bt();Ob=e=>ue(ht(e))});function Hm(e){let t=!0,r="",n=0,o="",s=!1;for(let i=0;i{"use strict";W()});var jm,qm=E(()=>{"use strict";aa();Dm();jm=e=>{let t=typeof e=="string"?e:dn(e);return Hm(t)}});function _a(e){return Um(jm(e))}var kp=E(()=>{"use strict";Lm();qm()});var Br,Ds=E(()=>{"use strict";kp();Br=_a});var ae,Rt=E(()=>{"use strict";W();ae=class extends g{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}});var Ht,js=E(()=>{"use strict";Ht=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){let r=super.get(t);return super.has(t)&&r!==void 0&&(this.delete(t),super.set(t,r)),r}set(t,r){if(super.set(t,r),this.maxSize&&this.size>this.maxSize){let n=this.keys().next().value;n&&this.delete(n)}return this}}});function sr(e,t){if(Bp.has(`${e}.${t}`))return Bp.get(`${e}.${t}`);let r=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),n=ue(Pt(r),"bytes"),o=(t?r.substring(`${t}0x`.length):r).split("");for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&o[i]&&(o[i]=o[i].toUpperCase()),(n[i>>1]&15)>=8&&o[i+1]&&(o[i+1]=o[i+1].toUpperCase());let s=`0x${o.join("")}`;return Bp.set(`${e}.${t}`,s),s}function $a(e,t){if(!re(e,{strict:!1}))throw new ae({address:e});return sr(e,t)}var Bp,bn=E(()=>{"use strict";Rt();ze();Bt();js();yt();Bp=new Ht(8192)});function re(e,t){let{strict:r=!0}=t??{},n=`${e}.${r}`;if(Rp.has(n))return Rp.get(n);let o=Mb.test(e)?e.toLowerCase()===e?!0:r?sr(e)===e:!0:!1;return Rp.set(n,o),o}var Mb,Rp,yt=E(()=>{"use strict";js();bn();Mb=/^0x[a-fA-F0-9]{40}$/,Rp=new Ht(8192)});function Ze(e){return typeof e[0]=="string"?Te(e):zb(e)}function zb(e){let t=0;for(let o of e)t+=o.length;let r=new Uint8Array(t),n=0;for(let o of e)r.set(o,n),n+=o.length;return r}function Te(e){return`0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}var et=E(()=>{"use strict"});function xt(e,t,r,{strict:n}={}){return we(e,{strict:!1})?$p(e,t,r,{strict:n}):_p(e,t,r,{strict:n})}function Vm(e,t){if(typeof t=="number"&&t>0&&t>ee(e)-1)throw new Fs({offset:t,position:"start",size:ee(e)})}function Gm(e,t,r){if(typeof t=="number"&&typeof r=="number"&&ee(e)!==r-t)throw new Fs({offset:r,position:"end",size:ee(e)})}function _p(e,t,r,{strict:n}={}){Vm(e,t);let o=e.slice(t,r);return n&&Gm(o,t,r),o}function $p(e,t,r,{strict:n}={}){Vm(e,t);let o=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return n&&Gm(o,t,r),o}var Rr=E(()=>{"use strict";va();St();mt()});var Wm,Na,Np=E(()=>{"use strict";Wm=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Na=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/});function De(e,t){if(e.length!==t.length)throw new la({expectedLength:e.length,givenLength:t.length});let r=Ub({params:e,values:t}),n=Op(r);return n.length===0?"0x":n}function Ub({params:e,values:t}){let r=[];for(let n=0;n0?Ze([a,i]):a}}if(o)return{dynamic:!0,encoded:i}}return{dynamic:!1,encoded:Ze(s.map(({encoded:i})=>i))}}function Db(e,{param:t}){let[,r]=t.type.split("bytes"),n=ee(e);if(!r){let o=e;return n%32!==0&&(o=rr(o,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:Ze([rr(_(n,{size:32})),o])}}if(n!==Number.parseInt(r))throw new fa({expectedSize:Number.parseInt(r),value:e});return{dynamic:!1,encoded:rr(e,{dir:"right"})}}function jb(e){if(typeof e!="boolean")throw new g(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:rr(Cp(e))}}function qb(e,{signed:t,size:r=256}){if(typeof r=="number"){let n=2n**(BigInt(r)-(t?1n:0n))-1n,o=t?-n-1n:0n;if(e>n||eo))}}function Fa(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}var Dt=E(()=>{"use strict";ye();Rt();W();zs();yt();et();Ea();mt();Rr();V();Np()});var jt,Qn=E(()=>{"use strict";Rr();kp();jt=e=>xt(_a(e),0,4)});function tt(e){let{abi:t,args:r=[],name:n}=e,o=we(n,{strict:!1}),s=t.filter(a=>o?a.type==="function"?jt(a)===n:a.type==="event"?Br(a)===n:!1:"name"in a&&a.name===n);if(s.length===0)return;if(s.length===1)return s[0];let i;for(let a of s){if(!("inputs"in a))continue;if(!r||r.length===0){if(!a.inputs||a.inputs.length===0)return a;continue}if(!a.inputs||a.inputs.length===0||a.inputs.length!==r.length)continue;if(r.every((u,p)=>{let f="inputs"in a&&a.inputs[p];return f?Mp(u,f):!1})){if(i&&"inputs"in i&&i.inputs){let u=Km(a.inputs,i.inputs,r);if(u)throw new ya({abiItem:a,type:u[0]},{abiItem:i,type:u[1]})}i=a}}return i||s[0]}function Mp(e,t){let r=typeof e,n=t.type;switch(n){case"address":return re(e,{strict:!1});case"bool":return r==="boolean";case"function":return r==="string";case"string":return r==="string";default:return n==="tuple"&&"components"in t?Object.values(t.components).every((o,s)=>Mp(Object.values(e)[s],o)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(n)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?r==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)?Array.isArray(e)&&e.every(o=>Mp(o,{...t,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function Km(e,t,r){for(let n in e){let o=e[n],s=t[n];if(o.type==="tuple"&&s.type==="tuple"&&"components"in o&&"components"in s)return Km(o.components,s.components,r[n]);let i=[o.type,s.type];if(i.includes("address")&&i.includes("bytes20")?!0:i.includes("address")&&i.includes("string")?re(r[n],{strict:!1}):i.includes("address")&&i.includes("bytes")?re(r[n],{strict:!1}):!1)return i}}var _r=E(()=>{"use strict";ye();St();yt();Ds();Qn()});function K(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}var ve=E(()=>{"use strict"});function Xm(e){let{abi:t,args:r,functionName:n}=e,o=t[0];if(n){let s=tt({abi:t,args:r,name:n});if(!s)throw new Ct(n,{docsPath:Jm});o=s}if(o.type!=="function")throw new Ct(void 0,{docsPath:Jm});return{abi:[o],functionName:jt(Ce(o))}}var Jm,Qm=E(()=>{"use strict";ye();Qn();tr();_r();Jm="/docs/contract/encodeFunctionData"});function de(e){let{args:t}=e,{abi:r,functionName:n}=e.abi.length===1&&e.functionName?.startsWith("0x")?e:Xm(e),o=r[0],s=n,i="inputs"in o&&o.inputs?De(o.inputs,t??[]):void 0;return Te([s,i??"0x"])}var ct=E(()=>{"use strict";et();Dt();Qm()});var Ma,za,ed,qs=E(()=>{"use strict";Ma={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},za={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},ed={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}});var Vs,eo,Ua,zp=E(()=>{"use strict";W();Vs=class extends g{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}},eo=class extends g{constructor({length:t,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}},Ua=class extends g{constructor({count:t,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}}});function to(e,{recursiveReadLimit:t=8192}={}){let r=Object.create(Wb);return r.bytes=e,r.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}var Wb,La=E(()=>{"use strict";zp();Wb={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 Ua({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new eo({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Vs({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new Vs({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}}});function td(e,t={}){typeof t.size<"u"&&Qe(e,{size:t.size});let r=te(e,t);return he(r,t)}function rd(e,t={}){let r=e;if(typeof t.size<"u"&&(Qe(r,{size:t.size}),r=Ie(r)),r.length>1||r[0]>1)throw new Aa(r);return!!r[0]}function Vt(e,t={}){typeof t.size<"u"&&Qe(e,{size:t.size});let r=te(e,t);return xe(r,t)}function nd(e,t={}){let r=e;return typeof t.size<"u"&&(Qe(r,{size:t.size}),r=Ie(r,{dir:"right"})),new TextDecoder().decode(r)}var od=E(()=>{"use strict";zs();hn();He();V()});function ir(e,t){let r=typeof t=="string"?Pe(t):t,n=to(r);if(ee(r)===0&&e.length>0)throw new dt;if(ee(t)&&ee(t)<32)throw new Wn({data:typeof t=="string"?t:te(t),params:e,size:ee(t)});let o=0,s=[];for(let i=0;i48?td(o,{signed:r}):Vt(o,{signed:r}),32]}function Qb(e,t,{staticPosition:r}){let n=t.components.length===0||t.components.some(({name:i})=>!i),o=n?[]:{},s=0;if(Gs(t)){let i=Vt(e.readBytes(Up)),a=r+i;for(let c=0;c{"use strict";ye();bn();La();mt();Rr();hn();od();ze();V();Dt();sd=32,Up=32});function Ha(e){let{abi:t,data:r}=e,n=xt(r,0,4);if(n==="0x")throw new dt;let s=[...t||[],za,ed].find(i=>i.type==="error"&&n===jt(Ce(i)));if(!s)throw new Kn(n,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:s,args:"inputs"in s&&s.inputs&&s.inputs.length>0?ir(s.inputs,xt(r,4)):void 0,errorName:s.name}}var Lp=E(()=>{"use strict";qs();ye();Rr();Qn();Ws();tr()});var X,qe=E(()=>{"use strict";X=(e,t,r)=>JSON.stringify(e,(n,o)=>{let s=typeof o=="bigint"?o.toString():o;return typeof t=="function"?t(n,s):s},r)});function Hp({abiItem:e,args:t,includeFunctionName:r=!0,includeName:n=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${r?e.name:""}(${e.inputs.map((o,s)=>`${n&&o.name?`${o.name}: `:""}${typeof t[s]=="object"?X(t[s]):t[s]}`).join(", ")})`}var id=E(()=>{"use strict";qe()});var Da,ad,ja=E(()=>{"use strict";Da={gwei:9,wei:18},ad={ether:-9,wei:9}});function qa(e,t){let r=e.toString(),n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(t,"0");let[o,s]=[r.slice(0,r.length-t),r.slice(r.length-t)];return s=s.replace(/(0+)$/,""),`${n?"-":""}${o||"0"}${s?`.${s}`:""}`}var Dp=E(()=>{"use strict"});function ar(e,t="wei"){return qa(e,Da[t])}var Ks=E(()=>{"use strict";ja();Dp()});function ke(e,t="wei"){return qa(e,ad[t])}var no=E(()=>{"use strict";ja();Dp()});function cd(e){return e.reduce((t,{slot:r,value:n})=>`${t} ${r}: ${n} +`,"")}function ud(e){return e.reduce((t,{address:r,...n})=>{let o=`${t} ${r}: +`;return n.nonce&&(o+=` nonce: ${n.nonce} +`),n.balance&&(o+=` balance: ${n.balance} +`),n.code&&(o+=` code: ${n.code} +`),n.state&&(o+=` state: +`,o+=cd(n.state)),n.stateDiff&&(o+=` stateDiff: +`,o+=cd(n.stateDiff)),o},` State Override: +`).slice(0,-1)}var Va,Ga,jp=E(()=>{"use strict";W();Va=class extends g{constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"})}},Ga=class extends g{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}});function gn(e){let t=Object.entries(e).map(([n,o])=>o===void 0||o===!1?null:[n,o]).filter(Boolean),r=t.reduce((n,[o])=>Math.max(n,o.length),0);return t.map(([n,o])=>` ${`${n}:`.padEnd(r+1)} ${o}`).join(` +`)}var Wa,Ka,Ya,Za,Ja,oo,so,Xa,_t=E(()=>{"use strict";Ks();no();W();Wa=class extends g{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(` +`),{name:"FeeConflictError"})}},Ka=class extends g{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}},Ya=class extends g{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",gn(t),"}","","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"})}},Za=class extends g{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}},Ja=class extends g{constructor(t,{account:r,docsPath:n,chain:o,data:s,gas:i,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:p,to:f,value:l}){let m=gn({chain:o&&`${o?.name} (id: ${o?.id})`,from:r?.address,to:f,value:typeof l<"u"&&`${ar(l)} ${o?.nativeCurrency?.symbol||"ETH"}`,data:s,gas:i,gasPrice:typeof a<"u"&&`${ke(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${ke(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${ke(u)} gwei`,nonce:p});super(t.shortMessage,{cause:t,docsPath:n,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",m].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}},oo=class extends g{constructor({blockHash:t,blockNumber:r,blockTag:n,hash:o,index:s}){let i="Transaction";n&&s!==void 0&&(i=`Transaction at block time "${n}" at index "${s}"`),t&&s!==void 0&&(i=`Transaction at block hash "${t}" at index "${s}"`),r&&s!==void 0&&(i=`Transaction at block number "${r}" at index "${s}"`),o&&(i=`Transaction with hash "${o}"`),super(`${i} could not be found.`,{name:"TransactionNotFoundError"})}},so=class extends g{constructor({hash:t}){super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}},Xa=class extends g{constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}});var pd,wn,Qa=E(()=>{"use strict";pd=e=>e,wn=e=>e});var io,ec,vn,tc,rc,Gt,Nr=E(()=>{"use strict";ve();qs();Lp();tr();id();_r();Ks();no();ye();W();jp();_t();Qa();io=class extends g{constructor(t,{account:r,docsPath:n,chain:o,data:s,gas:i,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:p,to:f,value:l,stateOverride:m}){let y=r?K(r):void 0,x=gn({from:y?.address,to:f,value:typeof l<"u"&&`${ar(l)} ${o?.nativeCurrency?.symbol||"ETH"}`,data:s,gas:i,gasPrice:typeof a<"u"&&`${ke(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${ke(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${ke(u)} gwei`,nonce:p});m&&(x+=` +${ud(m)}`),super(t.shortMessage,{cause:t,docsPath:n,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Raw Call Arguments:",x].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}},ec=class extends g{constructor(t,{abi:r,args:n,contractAddress:o,docsPath:s,functionName:i,sender:a}){let c=tt({abi:r,args:n,name:i}),u=c?Hp({abiItem:c,args:n,includeFunctionName:!1,includeName:!1}):void 0,p=c?Ce(c,{includeName:!0}):void 0,f=gn({address:o&&pd(o),function:p,args:u&&u!=="()"&&`${[...Array(i?.length??0).keys()].map(()=>" ").join("")}${u}`,sender:a});super(t.shortMessage||`An unknown error occurred while executing the contract function "${i}".`,{cause:t,docsPath:s,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],f&&"Contract Call:",f].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=r,this.args=n,this.cause=t,this.contractAddress=o,this.functionName=i,this.sender=a}},vn=class extends g{constructor({abi:t,data:r,functionName:n,message:o}){let s,i,a,c;if(r&&r!=="0x")try{i=Ha({abi:t,data:r});let{abiItem:p,errorName:f,args:l}=i;if(f==="Error")c=l[0];else if(f==="Panic"){let[m]=l;c=Ma[m]}else{let m=p?Ce(p,{includeName:!0}):void 0,y=p&&l?Hp({abiItem:p,args:l,includeFunctionName:!1,includeName:!1}):void 0;a=[m?`Error: ${m}`:"",y&&y!=="()"?` ${[...Array(f?.length??0).keys()].map(()=>" ").join("")}${y}`:""]}}catch(p){s=p}else o&&(c=o);let u;s instanceof Kn&&(u=s.signature,a=[`Unable to decode signature "${u}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${u}.`]),super(c&&c!=="execution reverted"||u?[`The contract function "${n}" reverted with the following ${u?"signature":"reason"}:`,c||u].join(` +`):`The contract function "${n}" reverted.`,{cause:s,metaMessages:a,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=i,this.raw=r,this.reason=c,this.signature=u}},tc=class extends g{constructor({functionName:t}){super(`The contract function "${t}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${t}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError"})}},rc=class extends g{constructor({factory:t}){super(`Deployment for counterfactual contract call failed${t?` for factory "${t}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}},Gt=class extends g{constructor({data:t,message:r}){super(r||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t}}});var bt,Fr,Ys,En=E(()=>{"use strict";qe();W();Qa();bt=class extends g{constructor({body:t,cause:r,details:n,headers:o,status:s,url:i}){super("HTTP request failed.",{cause:r,details:n,metaMessages:[s&&`Status: ${s}`,`URL: ${wn(i)}`,t&&`Request body: ${X(t)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=t,this.headers=o,this.status=s,this.url=i}},Fr=class extends g{constructor({body:t,error:r,url:n}){super("RPC Request failed.",{cause:r,details:r.message,metaMessages:[`URL: ${wn(n)}`,`Request body: ${X(t)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=r.code,this.data=r.data}},Ys=class extends g{constructor({body:t,url:r}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${wn(r)}`,`Request body: ${X(t)}`],name:"TimeoutError"})}}});var tg,Ve,Je,ao,co,uo,po,cr,Wt,fo,lo,mo,Or,An,ho,Tn,yo,xo,bo,go,wo,vo,Eo,Ao,To,So,Co,Io,nc,Zs=E(()=>{"use strict";W();En();tg=-1,Ve=class extends g{constructor(t,{code:r,docsPath:n,metaMessages:o,name:s,shortMessage:i}){super(i,{cause:t,docsPath:n,metaMessages:o||t?.metaMessages,name:s||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=s||t.name,this.code=t instanceof Fr?t.code:r??tg}},Je=class extends Ve{constructor(t,r){super(t,r),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=r.data}},ao=class e extends Ve{constructor(t){super(t,{code:e.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}};Object.defineProperty(ao,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});co=class e extends Ve{constructor(t){super(t,{code:e.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}};Object.defineProperty(co,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});uo=class e extends Ve{constructor(t,{method:r}={}){super(t,{code:e.code,name:"MethodNotFoundRpcError",shortMessage:`The method${r?` "${r}"`:""} does not exist / is not available.`})}};Object.defineProperty(uo,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});po=class e extends Ve{constructor(t){super(t,{code:e.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(` +`)})}};Object.defineProperty(po,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});cr=class e extends Ve{constructor(t){super(t,{code:e.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}};Object.defineProperty(cr,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});Wt=class e extends Ve{constructor(t){super(t,{code:e.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(` +`)})}};Object.defineProperty(Wt,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});fo=class e extends Ve{constructor(t){super(t,{code:e.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}};Object.defineProperty(fo,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});lo=class e extends Ve{constructor(t){super(t,{code:e.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}};Object.defineProperty(lo,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});mo=class e extends Ve{constructor(t){super(t,{code:e.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}};Object.defineProperty(mo,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});Or=class e extends Ve{constructor(t,{method:r}={}){super(t,{code:e.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${r?` "${r}"`:""} is not supported.`})}};Object.defineProperty(Or,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});An=class e extends Ve{constructor(t){super(t,{code:e.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}};Object.defineProperty(An,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});ho=class e extends Ve{constructor(t){super(t,{code:e.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}};Object.defineProperty(ho,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});Tn=class e extends Je{constructor(t){super(t,{code:e.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}};Object.defineProperty(Tn,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});yo=class e extends Je{constructor(t){super(t,{code:e.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}};Object.defineProperty(yo,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});xo=class e extends Je{constructor(t,{method:r}={}){super(t,{code:e.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${r?` " ${r}"`:""}.`})}};Object.defineProperty(xo,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});bo=class e extends Je{constructor(t){super(t,{code:e.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}};Object.defineProperty(bo,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});go=class e extends Je{constructor(t){super(t,{code:e.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}};Object.defineProperty(go,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});wo=class e extends Je{constructor(t){super(t,{code:e.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}};Object.defineProperty(wo,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});vo=class e extends Je{constructor(t){super(t,{code:e.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}};Object.defineProperty(vo,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});Eo=class e extends Je{constructor(t){super(t,{code:e.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}};Object.defineProperty(Eo,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});Ao=class e extends Je{constructor(t){super(t,{code:e.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}};Object.defineProperty(Ao,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});To=class e extends Je{constructor(t){super(t,{code:e.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}};Object.defineProperty(To,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});So=class e extends Je{constructor(t){super(t,{code:e.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}};Object.defineProperty(So,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});Co=class e extends Je{constructor(t){super(t,{code:e.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}};Object.defineProperty(Co,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});Io=class e extends Je{constructor(t){super(t,{code:e.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}};Object.defineProperty(Io,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});nc=class extends Ve{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}});function ng(e,t,r,n){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,n);let o=BigInt(32),s=BigInt(4294967295),i=Number(r>>o&s),a=Number(r&s),c=n?4:0,u=n?0:4;e.setUint32(t+c,i,n),e.setUint32(t+u,a,n)}function ld(e,t,r){return e&t^~e&r}function md(e,t,r){return e&t^e&r^t&r}var oc,dd=E(()=>{"use strict";Ls();xn();oc=class extends Ir{constructor(t,r,n,o){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=o,this.buffer=new Uint8Array(t),this.view=Pa(this.buffer)}update(t){or(this);let{view:r,buffer:n,blockLen:o}=this;t=Pr(t);let s=t.length;for(let i=0;io-i&&(this.process(n,0),i=0);for(let f=i;fp.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f{"use strict";dd();xn();og=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]),Mr=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),zr=new Uint32Array(64),qp=class extends oc{constructor(t=32){super(64,t,8,!1),this.A=Mr[0]|0,this.B=Mr[1]|0,this.C=Mr[2]|0,this.D=Mr[3]|0,this.E=Mr[4]|0,this.F=Mr[5]|0,this.G=Mr[6]|0,this.H=Mr[7]|0}get(){let{A:t,B:r,C:n,D:o,E:s,F:i,G:a,H:c}=this;return[t,r,n,o,s,i,a,c]}set(t,r,n,o,s,i,a,c){this.A=t|0,this.B=r|0,this.C=n|0,this.D=o|0,this.E=s|0,this.F=i|0,this.G=a|0,this.H=c|0}process(t,r){for(let f=0;f<16;f++,r+=4)zr[f]=t.getUint32(r,!1);for(let f=16;f<64;f++){let l=zr[f-15],m=zr[f-2],y=kt(l,7)^kt(l,18)^l>>>3,x=kt(m,17)^kt(m,19)^m>>>10;zr[f]=x+zr[f-7]+y+zr[f-16]|0}let{A:n,B:o,C:s,D:i,E:a,F:c,G:u,H:p}=this;for(let f=0;f<64;f++){let l=kt(a,6)^kt(a,11)^kt(a,25),m=p+l+ld(a,c,u)+og[f]+zr[f]|0,x=(kt(n,2)^kt(n,13)^kt(n,22))+md(n,o,s)|0;p=u,u=c,c=a,a=i+m|0,i=s,s=o,o=n,n=m+x|0}n=n+this.A|0,o=o+this.B|0,s=s+this.C|0,i=i+this.D|0,a=a+this.E|0,c=c+this.F|0,u=u+this.G|0,p=p+this.H|0,this.set(n,o,s,i,a,c,u,p)}roundClean(){zr.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}},Ur=ka(()=>new qp)});var hd=E(()=>{"use strict";Vp()});var sc,Gp,yd=E(()=>{"use strict";Ls();xn();sc=class extends Ir{constructor(t,r){super(),this.finished=!1,this.destroyed=!1,gm(t);let n=Pr(r);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let o=this.blockLen,s=new Uint8Array(o);s.set(n.length>o?t.create().update(n).digest():n);for(let i=0;inew sc(e,t).update(r).digest();Gp.create=(e,t)=>new sc(e,t)});function Sn(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function pr(e){if(!Sn(e))throw new Error("Uint8Array expected")}function Po(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}function Js(e){let t=e.toString(16);return t.length&1?"0"+t:t}function gd(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?Zp:BigInt("0x"+e)}function ko(e){if(pr(e),wd)return e.toHex();let t="";for(let r=0;r=ur._0&&e<=ur._9)return e-ur._0;if(e>=ur.A&&e<=ur.F)return e-(ur.A-10);if(e>=ur.a&&e<=ur.f)return e-(ur.a-10)}function Xs(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(wd)return Uint8Array.fromHex(e);let t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let o=0,s=0;oZp;e>>=Yp,t+=1);return t}function Ed(e,t,r){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=Kp(e),o=Kp(e),s=0,i=()=>{n.fill(1),o.fill(0),s=0},a=(...f)=>r(o,n,...f),c=(f=Kp(0))=>{o=a(bd([0]),f),n=a(),f.length!==0&&(o=a(bd([1]),f),n=a())},u=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let f=0,l=[];for(;f{i(),c(f);let m;for(;!(m=l(u()));)c();return i(),m}}function lr(e,t,r={}){let n=(o,s,i)=>{let a=ig[s];if(typeof a!="function")throw new Error("invalid validator function");let c=e[o];if(!(i&&c===void 0)&&!a(c,e))throw new Error("param "+String(o)+" is invalid. Expected "+s+", got "+c)};for(let[o,s]of Object.entries(t))n(o,s,!1);for(let[o,s]of Object.entries(r))n(o,s,!0);return e}function Qp(e){let t=new WeakMap;return(r,...n)=>{let o=t.get(r);if(o!==void 0)return o;let s=e(r,...n);return t.set(r,s),s}}var Zp,Yp,wd,sg,ur,Wp,In,Kp,bd,ig,Bo=E(()=>{"use strict";Zp=BigInt(0),Yp=BigInt(1);wd=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",sg=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));ur={_0:48,_9:57,A:65,F:70,a:97,f:102};Wp=e=>typeof e=="bigint"&&Zp<=e;In=e=>(Yp<new Uint8Array(e),bd=e=>Uint8Array.from(e);ig={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||Sn(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)}});function Ee(e,t){let r=e%t;return r>=Re?r:t+r}function pg(e,t,r){if(tRe;)t&be&&(n=n*e%r),e=e*e%r,t>>=be;return n}function pt(e,t,r){let n=e;for(;t-- >Re;)n*=n,n%=r;return n}function ac(e,t){if(e===Re)throw new Error("invert: expected non-zero number");if(t<=Re)throw new Error("invert: expected positive modulus, got "+t);let r=Ee(e,t),n=t,o=Re,s=be,i=be,a=Re;for(;r!==Re;){let u=n/r,p=n%r,f=o-i*u,l=s-a*u;n=r,r=p,o=i,s=a,i=f,a=l}if(n!==be)throw new Error("invert: does not exist");return Ee(o,t)}function fg(e){let t=(e-be)/Pn,r,n,o;for(r=e-be,n=0;r%Pn===Re;r/=Pn,n++);for(o=Pn;o1e3)throw new Error("Cannot find square root: likely non-prime P");if(n===1){let i=(e+be)/ef;return function(c,u){let p=c.pow(u,i);if(!c.eql(c.sqr(p),u))throw new Error("Cannot find square root");return p}}let s=(r+be)/Pn;return function(a,c){if(a.pow(c,t)===a.neg(a.ONE))throw new Error("Cannot find square root");let u=n,p=a.pow(a.mul(a.ONE,o),r),f=a.pow(c,s),l=a.pow(c,r);for(;!a.eql(l,a.ONE);){if(a.eql(l,a.ZERO))return a.ZERO;let m=1;for(let x=a.sqr(l);m(n[o]="function",n),t);return lr(e,r)}function dg(e,t,r){if(rRe;)r&be&&(n=e.mul(n,o)),o=e.sqr(o),r>>=be;return n}function hg(e,t){let r=new Array(t.length),n=t.reduce((s,i,a)=>e.is0(i)?s:(r[a]=s,e.mul(s,i)),e.ONE),o=e.inv(n);return t.reduceRight((s,i,a)=>e.is0(i)?s:(r[a]=e.mul(s,r[a]),e.mul(s,i)),o),r}function tf(e,t){let r=t!==void 0?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function uc(e,t,r=!1,n={}){if(e<=Re)throw new Error("invalid field: expected ORDER > 0, got "+e);let{nBitLength:o,nByteLength:s}=tf(e,t);if(s>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let i,a=Object.freeze({ORDER:e,isLE:r,BITS:o,BYTES:s,MASK:In(o),ZERO:Re,ONE:be,create:c=>Ee(c,e),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return Re<=c&&cc===Re,isOdd:c=>(c&be)===be,neg:c=>Ee(-c,e),eql:(c,u)=>c===u,sqr:c=>Ee(c*c,e),add:(c,u)=>Ee(c+u,e),sub:(c,u)=>Ee(c-u,e),mul:(c,u)=>Ee(c*u,e),pow:(c,u)=>dg(a,c,u),div:(c,u)=>Ee(c*ac(u,e),e),sqrN:c=>c*c,addN:(c,u)=>c+u,subN:(c,u)=>c-u,mulN:(c,u)=>c*u,inv:c=>ac(c,e),sqrt:n.sqrt||(c=>(i||(i=lg(e)),i(a,c))),invertBatch:c=>hg(a,c),cmov:(c,u,p)=>p?u:c,toBytes:c=>r?Xp(c,s):Kt(c,s),fromBytes:c=>{if(c.length!==s)throw new Error("Field.fromBytes: expected "+s+" bytes, got "+c.length);return r?Jp(c):rt(c)}});return Object.freeze(a)}function Sd(e){if(typeof e!="bigint")throw new Error("field order must be bigint");let t=e.toString(2).length;return Math.ceil(t/8)}function rf(e){let t=Sd(e);return t+Math.ceil(t/2)}function Cd(e,t,r=!1){let n=e.length,o=Sd(t),s=rf(t);if(n<16||n1024)throw new Error("expected "+s+"-1024 bytes of input, got "+n);let i=r?Jp(e):rt(e),a=Ee(i,t-be)+be;return r?Xp(a,o):Kt(a,o)}var Re,be,Pn,ag,ef,Ad,Td,cg,ug,mg,Qs=E(()=>{"use strict";Bo();Re=BigInt(0),be=BigInt(1),Pn=BigInt(2),ag=BigInt(3),ef=BigInt(4),Ad=BigInt(5),Td=BigInt(8),cg=BigInt(9),ug=BigInt(16);mg=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"]});function nf(e,t){let r=t.negate();return e?r:t}function kd(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function of(e,t){kd(e,t);let r=Math.ceil(t/e)+1,n=2**(e-1),o=2**e,s=In(e),i=BigInt(e);return{windows:r,windowSize:n,mask:s,maxNumber:o,shiftBy:i}}function Pd(e,t,r){let{windowSize:n,mask:o,maxNumber:s,shiftBy:i}=r,a=Number(e&o),c=e>>i;a>n&&(a-=s,c+=cf);let u=t*n,p=u+Math.abs(a)-1,f=a===0,l=a<0,m=t%2!==0;return{nextN:c,offset:p,isZero:f,isNeg:l,isNegF:m,offsetF:u}}function yg(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((r,n)=>{if(!(r instanceof t))throw new Error("invalid point at index "+n)})}function xg(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((r,n)=>{if(!t.isValid(r))throw new Error("invalid scalar at index "+n)})}function af(e){return Bd.get(e)||1}function Rd(e,t){return{constTimeNegate:nf,hasPrecomputes(r){return af(r)!==1},unsafeLadder(r,n,o=e.ZERO){let s=r;for(;n>Id;)n&cf&&(o=o.add(s)),s=s.double(),n>>=cf;return o},precomputeWindow(r,n){let{windows:o,windowSize:s}=of(n,t),i=[],a=r,c=a;for(let u=0;u12?s-3:s>4?s-2:s?2:1,a=In(i),c=new Array(Number(a)+1).fill(o),u=Math.floor((t.BITS-1)/i)*i,p=o;for(let f=u;f>=0;f-=i){c.fill(o);for(let m=0;m>BigInt(f)&a);c[x]=c[x].add(r[m])}let l=o;for(let m=c.length-1,y=o;m>0;m--)y=y.add(c[m]),l=l.add(y);if(p=p.add(l),f!==0)for(let m=0;m{"use strict";Qs();Bo();Id=BigInt(0),cf=BigInt(1);sf=new WeakMap,Bd=new WeakMap});function Nd(e){e.lowS!==void 0&&Po("lowS",e.lowS),e.prehash!==void 0&&Po("prehash",e.prehash)}function bg(e){let t=uf(e);lr(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:r,Fp:n,a:o}=t;if(r){if(!n.eql(o,n.ZERO))throw new Error("invalid endomorphism, can only be defined for Koblitz curves that have a=0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error("invalid endomorphism, expected beta: bigint and splitScalar: function")}return Object.freeze({...t})}function gg(e){let t=bg(e),{Fp:r}=t,n=uc(t.n,t.nBitLength),o=t.toBytes||((x,d,h)=>{let b=d.toAffine();return Xe(Uint8Array.from([4]),r.toBytes(b.x),r.toBytes(b.y))}),s=t.fromBytes||(x=>{let d=x.subarray(1),h=r.fromBytes(d.subarray(0,r.BYTES)),b=r.fromBytes(d.subarray(r.BYTES,2*r.BYTES));return{x:h,y:b}});function i(x){let{a:d,b:h}=t,b=r.sqr(x),v=r.mul(b,x);return r.add(r.add(v,r.mul(x,d)),h)}if(!r.eql(r.sqr(t.Gy),i(t.Gx)))throw new Error("bad generator point: equation left != right");function a(x){return Cn(x,ce,t.n)}function c(x){let{allowedPrivateKeyLengths:d,nByteLength:h,wrapPrivateKey:b,n:v}=t;if(d&&typeof x!="bigint"){if(Sn(x)&&(x=ko(x)),typeof x!="string"||!d.includes(x.length))throw new Error("invalid private key");x=x.padStart(h*2,"0")}let A;try{A=typeof x=="bigint"?x:rt(Be("private key",x,h))}catch{throw new Error("invalid private key, expected hex or "+h+" bytes, got "+typeof x)}return b&&(A=Ee(A,v)),fr("private key",A,ce,v),A}function u(x){if(!(x instanceof l))throw new Error("ProjectivePoint expected")}let p=Qp((x,d)=>{let{px:h,py:b,pz:v}=x;if(r.eql(v,r.ONE))return{x:h,y:b};let A=x.is0();d==null&&(d=A?r.ONE:r.inv(v));let k=r.mul(h,d),S=r.mul(b,d),T=r.mul(v,d);if(A)return{x:r.ZERO,y:r.ZERO};if(!r.eql(T,r.ONE))throw new Error("invZ was invalid");return{x:k,y:S}}),f=Qp(x=>{if(x.is0()){if(t.allowInfinityPoint&&!r.is0(x.py))return;throw new Error("bad point: ZERO")}let{x:d,y:h}=x.toAffine();if(!r.isValid(d)||!r.isValid(h))throw new Error("bad point: x or y not FE");let b=r.sqr(h),v=i(d);if(!r.eql(b,v))throw new Error("bad point: equation left != right");if(!x.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class l{constructor(d,h,b){if(d==null||!r.isValid(d))throw new Error("x required");if(h==null||!r.isValid(h))throw new Error("y required");if(b==null||!r.isValid(b))throw new Error("z required");this.px=d,this.py=h,this.pz=b,Object.freeze(this)}static fromAffine(d){let{x:h,y:b}=d||{};if(!d||!r.isValid(h)||!r.isValid(b))throw new Error("invalid affine point");if(d instanceof l)throw new Error("projective point not allowed");let v=A=>r.eql(A,r.ZERO);return v(h)&&v(b)?l.ZERO:new l(h,b,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(d){let h=r.invertBatch(d.map(b=>b.pz));return d.map((b,v)=>b.toAffine(h[v])).map(l.fromAffine)}static fromHex(d){let h=l.fromAffine(s(Be("pointHex",d)));return h.assertValidity(),h}static fromPrivateKey(d){return l.BASE.multiply(c(d))}static msm(d,h){return _d(l,n,d,h)}_setWindowSize(d){y.setWindowSize(this,d)}assertValidity(){f(this)}hasEvenY(){let{y:d}=this.toAffine();if(r.isOdd)return!r.isOdd(d);throw new Error("Field doesn't support isOdd")}equals(d){u(d);let{px:h,py:b,pz:v}=this,{px:A,py:k,pz:S}=d,T=r.eql(r.mul(h,S),r.mul(A,v)),B=r.eql(r.mul(b,S),r.mul(k,v));return T&&B}negate(){return new l(this.px,r.neg(this.py),this.pz)}double(){let{a:d,b:h}=t,b=r.mul(h,pc),{px:v,py:A,pz:k}=this,S=r.ZERO,T=r.ZERO,B=r.ZERO,P=r.mul(v,v),H=r.mul(A,A),U=r.mul(k,k),L=r.mul(v,A);return L=r.add(L,L),B=r.mul(v,k),B=r.add(B,B),S=r.mul(d,B),T=r.mul(b,U),T=r.add(S,T),S=r.sub(H,T),T=r.add(H,T),T=r.mul(S,T),S=r.mul(L,S),B=r.mul(b,B),U=r.mul(d,U),L=r.sub(P,U),L=r.mul(d,L),L=r.add(L,B),B=r.add(P,P),P=r.add(B,P),P=r.add(P,U),P=r.mul(P,L),T=r.add(T,P),U=r.mul(A,k),U=r.add(U,U),P=r.mul(U,L),S=r.sub(S,P),B=r.mul(U,H),B=r.add(B,B),B=r.add(B,B),new l(S,T,B)}add(d){u(d);let{px:h,py:b,pz:v}=this,{px:A,py:k,pz:S}=d,T=r.ZERO,B=r.ZERO,P=r.ZERO,H=t.a,U=r.mul(t.b,pc),L=r.mul(h,A),ne=r.mul(b,k),R=r.mul(v,S),O=r.add(h,b),N=r.add(A,k);O=r.mul(O,N),N=r.add(L,ne),O=r.sub(O,N),N=r.add(h,v);let q=r.add(A,S);return N=r.mul(N,q),q=r.add(L,R),N=r.sub(N,q),q=r.add(b,v),T=r.add(k,S),q=r.mul(q,T),T=r.add(ne,R),q=r.sub(q,T),P=r.mul(H,N),T=r.mul(U,R),P=r.add(T,P),T=r.sub(ne,P),P=r.add(ne,P),B=r.mul(T,P),ne=r.add(L,L),ne=r.add(ne,L),R=r.mul(H,R),N=r.mul(U,N),ne=r.add(ne,R),R=r.sub(L,R),R=r.mul(H,R),N=r.add(N,R),L=r.mul(ne,N),B=r.add(B,L),L=r.mul(q,N),T=r.mul(O,T),T=r.sub(T,L),L=r.mul(O,ne),P=r.mul(q,P),P=r.add(P,L),new l(T,B,P)}subtract(d){return this.add(d.negate())}is0(){return this.equals(l.ZERO)}wNAF(d){return y.wNAFCached(this,d,l.normalizeZ)}multiplyUnsafe(d){let{endo:h,n:b}=t;fr("scalar",d,$t,b);let v=l.ZERO;if(d===$t)return v;if(this.is0()||d===ce)return this;if(!h||y.hasPrecomputes(this))return y.wNAFCachedUnsafe(this,d,l.normalizeZ);let{k1neg:A,k1:k,k2neg:S,k2:T}=h.splitScalar(d),B=v,P=v,H=this;for(;k>$t||T>$t;)k&ce&&(B=B.add(H)),T&ce&&(P=P.add(H)),H=H.double(),k>>=ce,T>>=ce;return A&&(B=B.negate()),S&&(P=P.negate()),P=new l(r.mul(P.px,h.beta),P.py,P.pz),B.add(P)}multiply(d){let{endo:h,n:b}=t;fr("scalar",d,ce,b);let v,A;if(h){let{k1neg:k,k1:S,k2neg:T,k2:B}=h.splitScalar(d),{p:P,f:H}=this.wNAF(S),{p:U,f:L}=this.wNAF(B);P=y.constTimeNegate(k,P),U=y.constTimeNegate(T,U),U=new l(r.mul(U.px,h.beta),U.py,U.pz),v=P.add(U),A=H.add(L)}else{let{p:k,f:S}=this.wNAF(d);v=k,A=S}return l.normalizeZ([v,A])[0]}multiplyAndAddUnsafe(d,h,b){let v=l.BASE,A=(S,T)=>T===$t||T===ce||!S.equals(v)?S.multiplyUnsafe(T):S.multiply(T),k=A(this,h).add(A(d,b));return k.is0()?void 0:k}toAffine(d){return p(this,d)}isTorsionFree(){let{h:d,isTorsionFree:h}=t;if(d===ce)return!0;if(h)return h(l,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:d,clearCofactor:h}=t;return d===ce?this:h?h(l,this):this.multiplyUnsafe(t.h)}toRawBytes(d=!0){return Po("isCompressed",d),this.assertValidity(),o(l,this,d)}toHex(d=!0){return Po("isCompressed",d),ko(this.toRawBytes(d))}}l.BASE=new l(t.Gx,t.Gy,r.ONE),l.ZERO=new l(r.ZERO,r.ONE,r.ZERO);let m=t.nBitLength,y=Rd(l,t.endo?Math.ceil(m/2):m);return{CURVE:t,ProjectivePoint:l,normPrivateKeyToScalar:c,weierstrassEquation:i,isWithinCurveOrder:a}}function wg(e){let t=uf(e);return lr(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function Od(e){let t=wg(e),{Fp:r,n}=t,o=r.BYTES+1,s=2*r.BYTES+1;function i(R){return Ee(R,n)}function a(R){return ac(R,n)}let{ProjectivePoint:c,normPrivateKeyToScalar:u,weierstrassEquation:p,isWithinCurveOrder:f}=gg({...t,toBytes(R,O,N){let q=O.toAffine(),D=r.toBytes(q.x),F=Xe;return Po("isCompressed",N),N?F(Uint8Array.from([O.hasEvenY()?2:3]),D):F(Uint8Array.from([4]),D,r.toBytes(q.y))},fromBytes(R){let O=R.length,N=R[0],q=R.subarray(1);if(O===o&&(N===2||N===3)){let D=rt(q);if(!Cn(D,ce,r.ORDER))throw new Error("Point is not on curve");let F=p(D),Q;try{Q=r.sqrt(F)}catch(I){let G=I instanceof Error?": "+I.message:"";throw new Error("Point is not on curve"+G)}let fe=(Q&ce)===ce;return(N&1)===1!==fe&&(Q=r.neg(Q)),{x:D,y:Q}}else if(O===s&&N===4){let D=r.fromBytes(q.subarray(0,r.BYTES)),F=r.fromBytes(q.subarray(r.BYTES,2*r.BYTES));return{x:D,y:F}}else{let D=o,F=s;throw new Error("invalid Point, expected length of "+D+", or uncompressed "+F+", got "+O)}}}),l=R=>ko(Kt(R,t.nByteLength));function m(R){let O=n>>ce;return R>O}function y(R){return m(R)?i(-R):R}let x=(R,O,N)=>rt(R.slice(O,N));class d{constructor(O,N,q){fr("r",O,ce,n),fr("s",N,ce,n),this.r=O,this.s=N,q!=null&&(this.recovery=q),Object.freeze(this)}static fromCompact(O){let N=t.nByteLength;return O=Be("compactSignature",O,N*2),new d(x(O,0,N),x(O,N,2*N))}static fromDER(O){let{r:N,s:q}=mr.toSig(Be("DER",O));return new d(N,q)}assertValidity(){}addRecoveryBit(O){return new d(this.r,this.s,O)}recoverPublicKey(O){let{r:N,s:q,recovery:D}=this,F=S(Be("msgHash",O));if(D==null||![0,1,2,3].includes(D))throw new Error("recovery id invalid");let Q=D===2||D===3?N+t.n:N;if(Q>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");let fe=(D&1)===0?"02":"03",w=c.fromHex(fe+l(Q)),I=a(Q),G=i(-F*I),Z=i(q*I),Y=c.BASE.multiplyAndAddUnsafe(w,G,Z);if(!Y)throw new Error("point at infinify");return Y.assertValidity(),Y}hasHighS(){return m(this.s)}normalizeS(){return this.hasHighS()?new d(this.r,i(-this.s),this.recovery):this}toDERRawBytes(){return Xs(this.toDERHex())}toDERHex(){return mr.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Xs(this.toCompactHex())}toCompactHex(){return l(this.r)+l(this.s)}}let h={isValidPrivateKey(R){try{return u(R),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{let R=rf(t.n);return Cd(t.randomBytes(R),t.n)},precompute(R=8,O=c.BASE){return O._setWindowSize(R),O.multiply(BigInt(3)),O}};function b(R,O=!0){return c.fromPrivateKey(R).toRawBytes(O)}function v(R){let O=Sn(R),N=typeof R=="string",q=(O||N)&&R.length;return O?q===o||q===s:N?q===2*o||q===2*s:R instanceof c}function A(R,O,N=!0){if(v(R))throw new Error("first arg must be private key");if(!v(O))throw new Error("second arg must be public key");return c.fromHex(O).multiply(u(R)).toRawBytes(N)}let k=t.bits2int||function(R){if(R.length>8192)throw new Error("input is too large");let O=rt(R),N=R.length*8-t.nBitLength;return N>0?O>>BigInt(N):O},S=t.bits2int_modN||function(R){return i(k(R))},T=In(t.nBitLength);function B(R){return fr("num < 2^"+t.nBitLength,R,$t,T),Kt(R,t.nByteLength)}function P(R,O,N=H){if(["recovered","canonical"].some(se=>se in N))throw new Error("sign() legacy options not supported");let{hash:q,randomBytes:D}=t,{lowS:F,prehash:Q,extraEntropy:fe}=N;F==null&&(F=!0),R=Be("msgHash",R),Nd(N),Q&&(R=Be("prehashed msgHash",q(R)));let w=S(R),I=u(O),G=[B(I),B(w)];if(fe!=null&&fe!==!1){let se=fe===!0?D(r.BYTES):fe;G.push(Be("extraEntropy",se))}let Z=Xe(...G),Y=w;function le(se){let ie=k(se);if(!f(ie))return;let pe=a(ie),$e=c.BASE.multiply(ie).toAffine(),gr=i($e.x);if(gr===$t)return;let zn=i(pe*i(Y+gr*I));if(zn===$t)return;let cn=($e.x===gr?0:2)|Number($e.y&ce),rp=zn;return F&&m(zn)&&(rp=y(zn),cn^=1),new d(gr,rp,cn)}return{seed:Z,k2sig:le}}let H={lowS:t.lowS,prehash:!1},U={lowS:t.lowS,prehash:!1};function L(R,O,N=H){let{seed:q,k2sig:D}=P(R,O,N),F=t;return Ed(F.hash.outputLen,F.nByteLength,F.hmac)(q,D)}c.BASE._setWindowSize(8);function ne(R,O,N,q=U){let D=R;O=Be("msgHash",O),N=Be("publicKey",N);let{lowS:F,prehash:Q,format:fe}=q;if(Nd(q),"strict"in q)throw new Error("options.strict was renamed to lowS");if(fe!==void 0&&fe!=="compact"&&fe!=="der")throw new Error("format must be compact or der");let w=typeof D=="string"||Sn(D),I=!w&&!fe&&typeof D=="object"&&D!==null&&typeof D.r=="bigint"&&typeof D.s=="bigint";if(!w&&!I)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let G,Z;try{if(I&&(G=new d(D.r,D.s)),w){try{fe!=="compact"&&(G=d.fromDER(D))}catch(cn){if(!(cn instanceof mr.Err))throw cn}!G&&fe!=="der"&&(G=d.fromCompact(D))}Z=c.fromHex(N)}catch{return!1}if(!G||F&&G.hasHighS())return!1;Q&&(O=t.hash(O));let{r:Y,s:le}=G,se=S(O),ie=a(le),pe=i(se*ie),$e=i(Y*ie),gr=c.BASE.multiplyAndAddUnsafe(Z,pe,$e)?.toAffine();return gr?i(gr.x)===Y:!1}return{CURVE:t,getPublicKey:b,getSharedSecret:A,sign:L,verify:ne,ProjectivePoint:c,Signature:d,utils:h}}function vg(e,t){let r=e.ORDER,n=$t;for(let y=r-ce;y%Lr===$t;y/=Lr)n+=ce;let o=n,s=Lr<{let d=f,h=e.pow(x,u),b=e.sqr(h);b=e.mul(b,x);let v=e.mul(y,b);v=e.pow(v,c),v=e.mul(v,h),h=e.mul(v,x),b=e.mul(v,y);let A=e.mul(b,h);v=e.pow(A,p);let k=e.eql(v,e.ONE);h=e.mul(b,l),v=e.mul(A,d),b=e.cmov(h,b,k),A=e.cmov(v,A,k);for(let S=o;S>ce;S--){let T=S-Lr;T=Lr<{let b=e.sqr(h),v=e.mul(d,h);b=e.mul(b,v);let A=e.pow(b,y);A=e.mul(A,v);let k=e.mul(A,x),S=e.mul(e.sqr(A),h),T=e.eql(S,d),B=e.cmov(k,A,T);return{isValid:T,value:B}}}return m}function Md(e,t){if(cc(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");let r=vg(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return n=>{let o,s,i,a,c,u,p,f;o=e.sqr(n),o=e.mul(o,t.Z),s=e.sqr(o),s=e.add(s,o),i=e.add(s,e.ONE),i=e.mul(i,t.B),a=e.cmov(t.Z,e.neg(s),!e.eql(s,e.ZERO)),a=e.mul(a,t.A),s=e.sqr(i),u=e.sqr(a),c=e.mul(u,t.A),s=e.add(s,c),s=e.mul(s,i),u=e.mul(u,a),c=e.mul(u,t.B),s=e.add(s,c),p=e.mul(o,i);let{isValid:l,value:m}=r(s,u);f=e.mul(o,n),f=e.mul(f,m),p=e.cmov(p,i,l),f=e.cmov(f,m,l);let y=e.isOdd(n)===e.isOdd(f);return f=e.cmov(e.neg(f),f,y),p=e.div(p,a),{x:p,y:f}}}var pf,mr,$t,ce,Lr,pc,Fd,ff=E(()=>{"use strict";$d();Qs();Bo();pf=class extends Error{constructor(t=""){super(t)}},mr={Err:pf,_tlv:{encode:(e,t)=>{let{Err:r}=mr;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length&1)throw new r("tlv.encode: unpadded data");let n=t.length/2,o=Js(n);if(o.length/2&128)throw new r("tlv.encode: long form length too big");let s=n>127?Js(o.length/2|128):"";return Js(e)+s+o+t},decode(e,t){let{Err:r}=mr,n=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length<2||t[n++]!==e)throw new r("tlv.decode: wrong tlv");let o=t[n++],s=!!(o&128),i=0;if(!s)i=o;else{let c=o&127;if(!c)throw new r("tlv.decode(long): indefinite length not supported");if(c>4)throw new r("tlv.decode(long): byte length is too big");let u=t.subarray(n,n+c);if(u.length!==c)throw new r("tlv.decode: length bytes not complete");if(u[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(let p of u)i=i<<8|p;if(n+=c,i<128)throw new r("tlv.decode(long): not minimal encoding")}let a=t.subarray(n,n+i);if(a.length!==i)throw new r("tlv.decode: wrong value length");return{v:a,l:t.subarray(n+i)}}},_int:{encode(e){let{Err:t}=mr;if(e<$t)throw new t("integer: negative integers are not allowed");let r=Js(e);if(Number.parseInt(r[0],16)&8&&(r="00"+r),r.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){let{Err:t}=mr;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return rt(e)}},toSig(e){let{Err:t,_int:r,_tlv:n}=mr,o=Be("signature",e),{v:s,l:i}=n.decode(48,o);if(i.length)throw new t("invalid signature: left bytes after parsing");let{v:a,l:c}=n.decode(2,s),{v:u,l:p}=n.decode(2,c);if(p.length)throw new t("invalid signature: left bytes after parsing");return{r:r.decode(a),s:r.decode(u)}},hexFromSig(e){let{_tlv:t,_int:r}=mr,n=t.encode(2,r.encode(e.r)),o=t.encode(2,r.encode(e.s)),s=n+o;return t.encode(48,s)}},$t=BigInt(0),ce=BigInt(1),Lr=BigInt(2),pc=BigInt(3),Fd=BigInt(4)});function Eg(e){return{hash:e,hmac:(t,...r)=>Gp(e,t,km(...r)),randomBytes:Ba}}function zd(e,t){let r=n=>Od({...e,...Eg(n)});return{...r(t),create:r}}var Ud=E(()=>{"use strict";yd();xn();ff();});function Hr(e,t){if(ei(e),ei(t),e<0||e>=1<<8*t)throw new Error("invalid I2OSP input: "+e);let r=Array.from({length:t}).fill(0);for(let n=t-1;n>=0;n--)r[n]=e&255,e>>>=8;return new Uint8Array(r)}function Tg(e,t){let r=new Uint8Array(e.length);for(let n=0;n255&&(t=n(Xe(ic("H2C-OVERSIZE-DST-"),t)));let{outputLen:o,blockLen:s}=n,i=Math.ceil(r/o);if(r>65535||i>255)throw new Error("expand_message_xmd: invalid lenInBytes");let a=Xe(t,Hr(t.length,1)),c=Hr(0,s),u=Hr(r,2),p=new Array(i),f=n(Xe(c,e,u,Hr(0,1),a));p[0]=n(Xe(f,Hr(1,1),a));for(let m=1;m<=i;m++){let y=[Tg(f,p[m-1]),Hr(m+1,1),a];p[m]=n(Xe(...y))}return Xe(...p).slice(0,r)}function Cg(e,t,r,n,o){if(pr(e),pr(t),ei(r),t.length>255){let s=Math.ceil(2*n/8);t=o.create({dkLen:s}).update(ic("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return o.create({dkLen:r}).update(e).update(Hr(r,2)).update(t).update(Hr(t.length,1)).digest()}function Ld(e,t,r){lr(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});let{p:n,k:o,m:s,hash:i,expand:a,DST:c}=r;pr(e),ei(t);let u=typeof c=="string"?ic(c):c,p=n.toString(2).length,f=Math.ceil((p+o)/8),l=t*s*f,m;if(a==="xmd")m=Sg(e,u,l,i);else if(a==="xof")m=Cg(e,u,l,o,i);else if(a==="_internal_pass")m=e;else throw new Error('expand must be "xmd" or "xof"');let y=new Array(t);for(let x=0;xArray.from(n).reverse());return(n,o)=>{let[s,i,a,c]=r.map(u=>u.reduce((p,f)=>e.add(e.mul(p,n),f)));if(e.is0(i)||e.is0(c))throw new Error("bad point: ZERO");return n=e.div(s,i),o=e.mul(o,e.div(a,c)),{x:n,y:o}}}function Dd(e,t,r){if(typeof t!="function")throw new Error("mapToCurve() must be defined");return{hashToCurve(n,o){let s=Ld(n,2,{...r,DST:r.DST,...o}),i=e.fromAffine(t(s[0])),a=e.fromAffine(t(s[1])),c=i.add(a).clearCofactor();return c.assertValidity(),c},encodeToCurve(n,o){let s=Ld(n,1,{...r,DST:r.encodeDST,...o}),i=e.fromAffine(t(s[0])).clearCofactor();return i.assertValidity(),i},mapToCurve(n){if(!Array.isArray(n))throw new Error("mapToCurve: expected array of bigints");for(let s of n)if(typeof s!="bigint")throw new Error("mapToCurve: expected array of bigints");let o=e.fromAffine(t(n)).clearCofactor();return o.assertValidity(),o}}}var Ag,jd=E(()=>{"use strict";Qs();Bo();Ag=rt});var Xd={};np(Xd,{encodeToCurve:()=>Ng,hashToCurve:()=>$g,schnorr:()=>Bg,secp256k1:()=>kn});function Gd(e){let t=ni,r=BigInt(3),n=BigInt(6),o=BigInt(11),s=BigInt(22),i=BigInt(23),a=BigInt(44),c=BigInt(88),u=e*e*e%t,p=u*u*e%t,f=pt(p,r,t)*p%t,l=pt(f,r,t)*p%t,m=pt(l,lc,t)*u%t,y=pt(m,o,t)*m%t,x=pt(y,s,t)*y%t,d=pt(x,a,t)*x%t,h=pt(d,c,t)*d%t,b=pt(h,a,t)*x%t,v=pt(b,r,t)*p%t,A=pt(v,i,t)*y%t,k=pt(A,n,t)*u%t,S=pt(k,lc,t);if(!Dr.eql(Dr.sqr(S),e))throw new Error("Cannot find square root");return S}function mc(e,...t){let r=Vd[e];if(r===void 0){let n=Ur(Uint8Array.from(e,o=>o.charCodeAt(0)));r=Xe(n,n),Vd[e]=r}return Ur(Xe(r,...t))}function df(e){let t=kn.utils.normPrivateKeyToScalar(e),r=yf.fromPrivateKey(t);return{scalar:r.hasEvenY()?t:ri(-t),bytes:hf(r)}}function Kd(e){fr("x",e,ti,ni);let t=lf(e*e),r=lf(t*e+BigInt(7)),n=Gd(r);n%lc!==Wd&&(n=lf(-n));let o=new yf(e,n,ti);return o.assertValidity(),o}function Yd(...e){return ri(Ro(mc("BIP0340/challenge",...e)))}function Pg(e){return df(e).bytes}function kg(e,t,r=Ba(32)){let n=Be("message",e),{bytes:o,scalar:s}=df(t),i=Be("auxRand",r,32),a=mf(s^Ro(mc("BIP0340/aux",i))),c=mc("BIP0340/nonce",a,o,n),u=ri(Ro(c));if(u===Wd)throw new Error("sign failed: k is zero");let{bytes:p,scalar:f}=df(u),l=Yd(p,o,n),m=new Uint8Array(64);if(m.set(p,0),m.set(mf(ri(f+l*s)),32),!Zd(m,n,o))throw new Error("sign: Invalid signature produced");return m}function Zd(e,t,r){let n=Be("signature",e,64),o=Be("message",t),s=Be("publicKey",r,32);try{let i=Kd(Ro(s)),a=Ro(n.subarray(0,32));if(!Cn(a,ti,ni))return!1;let c=Ro(n.subarray(32,64));if(!Cn(c,ti,fc))return!1;let u=Yd(mf(a),hf(i),o),p=Ig(i,c,ri(-u));return!(!p||!p.hasEvenY()||p.toAffine().x!==a)}catch{return!1}}var ni,fc,ti,lc,qd,Dr,kn,Wd,Vd,hf,mf,lf,ri,yf,Ig,Ro,Bg,Rg,_g,Jd,$g,Ng,xf=E(()=>{"use strict";hd();xn();Ud();jd();Qs();Bo();ff();ni=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),fc=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),ti=BigInt(1),lc=BigInt(2),qd=(e,t)=>(e+t/lc)/t;Dr=uc(ni,void 0,void 0,{sqrt:Gd}),kn=zd({a:BigInt(0),b:BigInt(7),Fp:Dr,n:fc,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=fc,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-ti*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=r,i=BigInt("0x100000000000000000000000000000000"),a=qd(s*e,t),c=qd(-n*e,t),u=Ee(e-a*r-c*o,t),p=Ee(-a*n-c*s,t),f=u>i,l=p>i;if(f&&(u=t-u),l&&(p=t-p),u>i||p>i)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:f,k1:u,k2neg:l,k2:p}}}},Ur),Wd=BigInt(0),Vd={};hf=e=>e.toRawBytes(!0).slice(1),mf=e=>Kt(e,32),lf=e=>Ee(e,ni),ri=e=>Ee(e,fc),yf=kn.ProjectivePoint,Ig=(e,t,r)=>yf.BASE.multiplyAndAddUnsafe(e,t,r);Ro=rt;Bg={getPublicKey:Pg,sign:kg,verify:Zd,utils:{randomPrivateKey:kn.utils.randomPrivateKey,lift_x:Kd,pointToBytes:hf,numberToBytesBE:Kt,bytesToNumberBE:rt,taggedHash:mc,mod:Ee}},Rg=Hd(Dr,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(e=>e.map(t=>BigInt(t)))),_g=Md(Dr,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:Dr.create(BigInt("-11"))}),Jd=Dd(kn.ProjectivePoint,e=>{let{x:t,y:r}=_g(Dr.create(e[0]));return Rg(t,r)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:Dr.ORDER,m:1,k:128,expand:"xmd",hash:Ur}),$g=Jd.hashToCurve,Ng=Jd.encodeToCurve});var dr,nt,_o,$o,No,Fo,Oo,Mo,zo,Uo,gt,wt,hr=E(()=>{"use strict";no();W();dr=class extends g{constructor({cause:t,message:r}={}){let n=r?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}};Object.defineProperty(dr,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(dr,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});nt=class extends g{constructor({cause:t,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${ke(r)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}};Object.defineProperty(nt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});_o=class extends g{constructor({cause:t,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${ke(r)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}};Object.defineProperty(_o,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});$o=class extends g{constructor({cause:t,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}};Object.defineProperty($o,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});No=class extends g{constructor({cause:t,nonce:r}={}){super([`Nonce provided for the transaction ${r?`(${r}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(` +`),{cause:t,name:"NonceTooLowError"})}};Object.defineProperty(No,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});Fo=class extends g{constructor({cause:t,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"})}};Object.defineProperty(Fo,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});Oo=class extends g{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(` +`),{cause:t,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}};Object.defineProperty(Oo,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});Mo=class extends g{constructor({cause:t,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"})}};Object.defineProperty(Mo,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});zo=class extends g{constructor({cause:t,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"})}};Object.defineProperty(zo,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});Uo=class extends g{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"})}};Object.defineProperty(Uo,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});gt=class extends g{constructor({cause:t,maxPriorityFeePerGas:r,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${r?` = ${ke(r)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${ke(n)} gwei`:""}).`].join(` +`),{cause:t,name:"TipAboveFeeCapError"})}};Object.defineProperty(gt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});wt=class extends g{constructor({cause:t}){super(`An error occurred while executing: ${t?.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}});function jr(e,t){let r=(e.details||"").toLowerCase(),n=e instanceof g?e.walk(o=>o?.code===dr.code):e;return n instanceof g?new dr({cause:e,message:n.details}):dr.nodeMessage.test(r)?new dr({cause:e,message:e.details}):nt.nodeMessage.test(r)?new nt({cause:e,maxFeePerGas:t?.maxFeePerGas}):_o.nodeMessage.test(r)?new _o({cause:e,maxFeePerGas:t?.maxFeePerGas}):$o.nodeMessage.test(r)?new $o({cause:e,nonce:t?.nonce}):No.nodeMessage.test(r)?new No({cause:e,nonce:t?.nonce}):Fo.nodeMessage.test(r)?new Fo({cause:e,nonce:t?.nonce}):Oo.nodeMessage.test(r)?new Oo({cause:e}):Mo.nodeMessage.test(r)?new Mo({cause:e,gas:t?.gas}):zo.nodeMessage.test(r)?new zo({cause:e,gas:t?.gas}):Uo.nodeMessage.test(r)?new Uo({cause:e}):gt.nodeMessage.test(r)?new gt({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new wt({cause:e})}var oi=E(()=>{"use strict";W();hr()});function qr(e,{format:t}){if(!t)return{};let r={};function n(s){let i=Object.keys(s);for(let a of i)a in e&&(r[a]=e[a]),s[a]&&typeof s[a]=="object"&&!Array.isArray(s[a])&&n(s[a])}let o=t(e||{});return n(o),r}var si=E(()=>{"use strict"});function Lo(e,t){return({exclude:r,format:n})=>({exclude:r,format:o=>{let s=t(o);if(r)for(let i of r)delete s[i];return{...s,...n(o)}},type:e})}var xc=E(()=>{"use strict"});function lt(e){let t={};return typeof e.authorizationList<"u"&&(t.authorizationList=zg(e.authorizationList)),typeof e.accessList<"u"&&(t.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(t.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?t.blobs=e.blobs.map(r=>te(r)):t.blobs=e.blobs),typeof e.data<"u"&&(t.data=e.data),typeof e.from<"u"&&(t.from=e.from),typeof e.gas<"u"&&(t.gas=_(e.gas)),typeof e.gasPrice<"u"&&(t.gasPrice=_(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(t.maxFeePerBlobGas=_(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(t.maxFeePerGas=_(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(t.maxPriorityFeePerGas=_(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(t.nonce=_(e.nonce)),typeof e.to<"u"&&(t.to=e.to),typeof e.type<"u"&&(t.type=Mg[e.type]),typeof e.value<"u"&&(t.value=_(e.value)),t}function zg(e){return e.map(t=>({address:t.address,r:t.r?_(BigInt(t.r)):t.r,s:t.s?_(BigInt(t.s)):t.s,chainId:_(t.chainId),nonce:_(t.nonce),...typeof t.yParity<"u"?{yParity:_(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:_(t.v)}:{}}))}var Mg,sh,Vr=E(()=>{"use strict";V();xc();Mg={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};sh=Lo("transactionRequest",lt)});function ih(e){if(!(!e||e.length===0))return e.reduce((t,{slot:r,value:n})=>{if(r.length!==66)throw new Ms({size:r.length,targetSize:66,type:"hex"});if(n.length!==66)throw new Ms({size:n.length,targetSize:66,type:"hex"});return t[r]=n,t},{})}function Ug(e){let{balance:t,nonce:r,state:n,stateDiff:o,code:s}=e,i={};if(s!==void 0&&(i.code=s),t!==void 0&&(i.balance=_(t)),r!==void 0&&(i.nonce=_(r)),n!==void 0&&(i.state=ih(n)),o!==void 0){if(i.state)throw new Ga;i.stateDiff=ih(o)}return i}function Ho(e){if(!e)return;let t={};for(let{address:r,...n}of e){if(!re(r,{strict:!1}))throw new ae({address:r});if(t[r])throw new Va({address:r});t[r]=Ug(n)}return t}var bc=E(()=>{"use strict";Rt();va();jp();yt();V()});var PI,kI,BI,RI,_I,$I,NI,FI,OI,MI,zI,UI,LI,HI,DI,jI,qI,VI,GI,WI,KI,YI,ZI,JI,XI,QI,eP,tP,rP,nP,oP,sP,iP,aP,cP,uP,pP,fP,lP,mP,dP,hP,yP,xP,bP,gP,wP,vP,EP,AP,TP,SP,CP,IP,PP,kP,BP,RP,_P,$P,NP,FP,OP,MP,zP,UP,LP,HP,DP,jP,qP,VP,GP,WP,KP,YP,ZP,JP,XP,QP,ek,tk,rk,nk,ok,sk,ik,ak,ck,uk,pk,fk,lk,mk,dk,Gr,gc=E(()=>{"use strict";PI=2n**(8n-1n)-1n,kI=2n**(16n-1n)-1n,BI=2n**(24n-1n)-1n,RI=2n**(32n-1n)-1n,_I=2n**(40n-1n)-1n,$I=2n**(48n-1n)-1n,NI=2n**(56n-1n)-1n,FI=2n**(64n-1n)-1n,OI=2n**(72n-1n)-1n,MI=2n**(80n-1n)-1n,zI=2n**(88n-1n)-1n,UI=2n**(96n-1n)-1n,LI=2n**(104n-1n)-1n,HI=2n**(112n-1n)-1n,DI=2n**(120n-1n)-1n,jI=2n**(128n-1n)-1n,qI=2n**(136n-1n)-1n,VI=2n**(144n-1n)-1n,GI=2n**(152n-1n)-1n,WI=2n**(160n-1n)-1n,KI=2n**(168n-1n)-1n,YI=2n**(176n-1n)-1n,ZI=2n**(184n-1n)-1n,JI=2n**(192n-1n)-1n,XI=2n**(200n-1n)-1n,QI=2n**(208n-1n)-1n,eP=2n**(216n-1n)-1n,tP=2n**(224n-1n)-1n,rP=2n**(232n-1n)-1n,nP=2n**(240n-1n)-1n,oP=2n**(248n-1n)-1n,sP=2n**(256n-1n)-1n,iP=-(2n**(8n-1n)),aP=-(2n**(16n-1n)),cP=-(2n**(24n-1n)),uP=-(2n**(32n-1n)),pP=-(2n**(40n-1n)),fP=-(2n**(48n-1n)),lP=-(2n**(56n-1n)),mP=-(2n**(64n-1n)),dP=-(2n**(72n-1n)),hP=-(2n**(80n-1n)),yP=-(2n**(88n-1n)),xP=-(2n**(96n-1n)),bP=-(2n**(104n-1n)),gP=-(2n**(112n-1n)),wP=-(2n**(120n-1n)),vP=-(2n**(128n-1n)),EP=-(2n**(136n-1n)),AP=-(2n**(144n-1n)),TP=-(2n**(152n-1n)),SP=-(2n**(160n-1n)),CP=-(2n**(168n-1n)),IP=-(2n**(176n-1n)),PP=-(2n**(184n-1n)),kP=-(2n**(192n-1n)),BP=-(2n**(200n-1n)),RP=-(2n**(208n-1n)),_P=-(2n**(216n-1n)),$P=-(2n**(224n-1n)),NP=-(2n**(232n-1n)),FP=-(2n**(240n-1n)),OP=-(2n**(248n-1n)),MP=-(2n**(256n-1n)),zP=2n**8n-1n,UP=2n**16n-1n,LP=2n**24n-1n,HP=2n**32n-1n,DP=2n**40n-1n,jP=2n**48n-1n,qP=2n**56n-1n,VP=2n**64n-1n,GP=2n**72n-1n,WP=2n**80n-1n,KP=2n**88n-1n,YP=2n**96n-1n,ZP=2n**104n-1n,JP=2n**112n-1n,XP=2n**120n-1n,QP=2n**128n-1n,ek=2n**136n-1n,tk=2n**144n-1n,rk=2n**152n-1n,nk=2n**160n-1n,ok=2n**168n-1n,sk=2n**176n-1n,ik=2n**184n-1n,ak=2n**192n-1n,ck=2n**200n-1n,uk=2n**208n-1n,pk=2n**216n-1n,fk=2n**224n-1n,lk=2n**232n-1n,mk=2n**240n-1n,dk=2n**248n-1n,Gr=2n**256n-1n});function ot(e){let{account:t,gasPrice:r,maxFeePerGas:n,maxPriorityFeePerGas:o,to:s}=e,i=t?K(t):void 0;if(i&&!re(i.address))throw new ae({address:i.address});if(s&&!re(s))throw new ae({address:s});if(typeof r<"u"&&(typeof n<"u"||typeof o<"u"))throw new Wa;if(n&&n>Gr)throw new nt({maxFeePerGas:n});if(o&&n&&o>n)throw new gt({maxFeePerGas:n,maxPriorityFeePerGas:o})}var Wr=E(()=>{"use strict";ve();gc();Rt();hr();_t();yt()});function Yt(e,t){if(!re(e,{strict:!1}))throw new ae({address:e});if(!re(t,{strict:!1}))throw new ae({address:t});return e.toLowerCase()===t.toLowerCase()}var Yo=E(()=>{"use strict";Rt();yt()});function st(e){let{abi:t,args:r,functionName:n,data:o}=e,s=t[0];if(n){let a=tt({abi:t,args:r,name:n});if(!a)throw new Ct(n,{docsPath:vf});s=a}if(s.type!=="function")throw new Ct(void 0,{docsPath:vf});if(!s.outputs)throw new Zn(s.name,{docsPath:vf});let i=ir(s.outputs,o);if(i&&i.length>1)return i;if(i&&i.length===1)return i[0]}var vf,Zr=E(()=>{"use strict";ye();Ws();_r();vf="/docs/contract/decodeFunctionResult"});var ai,Rc,xh,_c,bh,Ef,Af,Tf,Jr=E(()=>{"use strict";ai=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],Rc=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],xh=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"},{inputs:[],name:"ResolverNotContract",type:"error"},{inputs:[{name:"returnData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{components:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"errors",type:"tuple[]"}],name:"HttpError",type:"error"}],_c=[...xh,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]},{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],bh=[...xh,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]},{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],Ef=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],Af=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],Tf=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}]});var gh,wh=E(()=>{"use strict";gh="0x82ad56cb"});var $c,vh,Eh,Nc=E(()=>{"use strict";$c="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",vh="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",Eh="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572"});var Rn,Fc,Oc,ci,yr,Qo=E(()=>{"use strict";W();Rn=class extends g{constructor({blockNumber:t,chain:r,contract:n}){super(`Chain "${r.name}" does not support contract "${n.name}".`,{metaMessages:["This could be due to any of the following:",...t&&n.blockCreated&&n.blockCreated>t?[`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${n.name}" configured.`]],name:"ChainDoesNotSupportContract"})}},Fc=class extends g{constructor({chain:t,currentChainId:r}){super(`The current chain of the wallet (id: ${r}) does not match the target chain for the transaction (id: ${t.id} \u2013 ${t.name}).`,{metaMessages:[`Current Chain ID: ${r}`,`Expected Chain ID: ${t.id} \u2013 ${t.name}`],name:"ChainMismatchError"})}},Oc=class extends g{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(` +`),{name:"ChainNotFoundError"})}},ci=class extends g{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}},yr=class extends g{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}});function _n(e){let{abi:t,args:r,bytecode:n}=e;if(!r||r.length===0)return n;let o=t.find(i=>"type"in i&&i.type==="constructor");if(!o)throw new ua({docsPath:Sf});if(!("inputs"in o))throw new _s({docsPath:Sf});if(!o.inputs||o.inputs.length===0)throw new _s({docsPath:Sf});let s=De(o.inputs,r);return Te([n,s])}var Sf,Mc=E(()=>{"use strict";ye();et();Dt();Sf="/docs/contract/encodeDeployData"});function Et({blockNumber:e,chain:t,contract:r}){let n=t?.contracts?.[r];if(!n)throw new Rn({chain:t,contract:{name:r}});if(e&&n.blockCreated&&n.blockCreated>e)throw new Rn({blockNumber:e,chain:t,contract:{name:r,blockCreated:n.blockCreated}});return n.address}var $n=E(()=>{"use strict";Qo()});function zc(e,{docsPath:t,...r}){let n=(()=>{let o=jr(e,r);return o instanceof wt?e:o})();return new io(n,{docsPath:t,...r})}var Cf=E(()=>{"use strict";Nr();hr();oi()});function es(){let e=()=>{},t=()=>{};return{promise:new Promise((n,o)=>{e=n,t=o}),resolve:e,reject:t}}var Uc=E(()=>{"use strict"});function Lc({fn:e,id:t,shouldSplitBatch:r,wait:n=0,sort:o}){let s=async()=>{let p=c();i();let f=p.map(({args:l})=>l);f.length!==0&&e(f).then(l=>{o&&Array.isArray(l)&&l.sort(o);for(let m=0;m{for(let m=0;mIf.delete(t),a=()=>c().map(({args:p})=>p),c=()=>If.get(t)||[],u=p=>If.set(t,[...c(),p]);return{flush:i,async schedule(p){let{promise:f,resolve:l,reject:m}=es();return r?.([...a(),p])&&s(),c().length>0?(u({args:p,resolve:l,reject:m}),f):(u({args:p,resolve:l,reject:m}),setTimeout(s,n),f)}}}var If,Pf=E(()=>{"use strict";Uc();If=new Map});var Hc,Dc,jc,Ah=E(()=>{"use strict";qe();W();Qa();Hc=class extends g{constructor({callbackSelector:t,cause:r,data:n,extraData:o,sender:s,urls:i}){super(r.shortMessage||"An error occurred while fetching for an offchain result.",{cause:r,metaMessages:[...r.metaMessages||[],r.metaMessages?.length?"":[],"Offchain Gateway Call:",i&&[" Gateway URL(s):",...i.map(a=>` ${wn(a)}`)],` Sender: ${s}`,` Data: ${n}`,` Callback selector: ${t}`,` Extra data: ${o}`].flat(),name:"OffchainLookupError"})}},Dc=class extends g{constructor({result:t,url:r}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${wn(r)}`,`Response: ${X(t)}`],name:"OffchainLookupResponseMalformedError"})}},jc=class extends g{constructor({sender:t,to:r}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${r}`,`OffchainLookup sender address: ${t}`],name:"OffchainLookupSenderMismatchError"})}}});function Th(e){let{abi:t,data:r}=e,n=xt(r,0,4),o=t.find(s=>s.type==="function"&&n===jt(Ce(s)));if(!o)throw new ha(n,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:o.name,args:"inputs"in o&&o.inputs&&o.inputs.length>0?ir(o.inputs,xt(r,4)):void 0}}var Sh=E(()=>{"use strict";ye();Rr();Qn();Ws();tr()});function Bf(e){let{abi:t,errorName:r,args:n}=e,o=t[0];if(r){let c=tt({abi:t,args:n,name:r});if(!c)throw new $s(r,{docsPath:kf});o=c}if(o.type!=="error")throw new $s(void 0,{docsPath:kf});let s=Ce(o),i=jt(s),a="0x";if(n&&n.length>0){if(!o.inputs)throw new ma(o.name,{docsPath:kf});a=De(o.inputs,n)}return Te([i,a])}var kf,Ch=E(()=>{"use strict";ye();et();Qn();Dt();tr();_r();kf="/docs/contract/encodeErrorResult"});function Ih(e){let{abi:t,functionName:r,result:n}=e,o=t[0];if(r){let i=tt({abi:t,name:r});if(!i)throw new Ct(r,{docsPath:Rf});o=i}if(o.type!=="function")throw new Ct(void 0,{docsPath:Rf});if(!o.outputs)throw new Zn(o.name,{docsPath:Rf});let s=(()=>{if(o.outputs.length===0)return[];if(o.outputs.length===1)return[n];if(Array.isArray(n))return n;throw new Jn(n)})();return De(o.outputs,s)}var Rf,Ph=E(()=>{"use strict";ye();Dt();_r();Rf="/docs/contract/encodeFunctionResult"});async function kh(e){let{data:t,ccipRequest:r}=e,{args:[n]}=Th({abi:Rc,data:t}),o=[],s=[];return await Promise.all(n.map(async(i,a)=>{try{s[a]=await r(i),o[a]=!1}catch(c){o[a]=!0,s[a]=Vg(c)}})),Ih({abi:Rc,functionName:"query",result:[o,s]})}function Vg(e){return e.name==="HttpRequestError"&&e.status?Bf({abi:Rc,errorName:"HttpError",args:[e.status,e.shortMessage]}):Bf({abi:[za],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}var ts,qc=E(()=>{"use strict";Jr();qs();Sh();Ch();Ph();ts="x-batch-gateway:true"});var _h={};np(_h,{ccipRequest:()=>Rh,offchainLookup:()=>Wg,offchainLookupAbiItem:()=>Bh,offchainLookupSignature:()=>Gg});async function Wg(e,{blockNumber:t,blockTag:r,data:n,to:o}){let{args:s}=Ha({data:n,abi:[Bh]}),[i,a,c,u,p]=s,{ccipRead:f}=e,l=f&&typeof f?.request=="function"?f.request:Rh;try{if(!Yt(o,i))throw new jc({sender:i,to:o});let m=a.includes(ts)?await kh({data:c,ccipRequest:l}):await l({data:c,sender:i,urls:a}),{data:y}=await Zt(e,{blockNumber:t,blockTag:r,data:Ze([u,De([{type:"bytes"},{type:"bytes"}],[m,p])]),to:o});return y}catch(m){throw new Hc({callbackSelector:u,cause:m,data:n,extraData:p,sender:i,urls:a})}}async function Rh({data:e,sender:t,urls:r}){let n=new Error("An unknown error occurred.");for(let o=0;o{"use strict";rs();Ah();En();Lp();Dt();Yo();et();St();qc();qe();Gg="0x556f1830",Bh={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]}});async function Zt(e,t){let{account:r=e.account,batch:n=!!e.batch?.multicall,blockNumber:o,blockTag:s="latest",accessList:i,blobs:a,code:c,data:u,factory:p,factoryData:f,gas:l,gasPrice:m,maxFeePerBlobGas:y,maxFeePerGas:x,maxPriorityFeePerGas:d,nonce:h,to:b,value:v,stateOverride:A,...k}=t,S=r?K(r):void 0;if(c&&(p||f))throw new g("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(c&&b)throw new g("Cannot provide both `code` & `to` as parameters.");let T=c&&u,B=p&&f&&b&&u,P=T||B,H=T?Zg({code:c,data:u}):B?Jg({data:u,factory:p,factoryData:f,to:b}):u;try{ot(t);let L=(o?_(o):void 0)||s,ne=Ho(A),R=e.chain?.formatters?.transactionRequest?.format,N=(R||lt)({...qr(k,{format:R}),from:S?.address,accessList:i,blobs:a,data:H,gas:l,gasPrice:m,maxFeePerBlobGas:y,maxFeePerGas:x,maxPriorityFeePerGas:d,nonce:h,to:P?void 0:b,value:v});if(n&&Kg({request:N})&&!ne)try{return await Yg(e,{...N,blockNumber:o,blockTag:s})}catch(D){if(!(D instanceof ci)&&!(D instanceof Rn))throw D}let q=await e.request({method:"eth_call",params:ne?[N,L,ne]:[N,L]});return q==="0x"?{data:void 0}:{data:q}}catch(U){let L=Xg(U),{offchainLookup:ne,offchainLookupSignature:R}=await Promise.resolve().then(()=>($h(),_h));if(e.ccipRead!==!1&&L?.slice(0,10)===R&&b)return{data:await ne(e,{data:L,to:b})};throw P&&L?.slice(0,10)==="0x101bb98d"?new rc({factory:p}):zc(U,{...t,account:S,chain:e.chain})}}function Kg({request:e}){let{data:t,to:r,...n}=e;return!(!t||t.startsWith(gh)||!r||Object.values(n).filter(o=>typeof o<"u").length>0)}async function Yg(e,t){let{batchSize:r=1024,wait:n=0}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},{blockNumber:o,blockTag:s="latest",data:i,multicallAddress:a,to:c}=t,u=a;if(!u){if(!e.chain)throw new ci;u=Et({blockNumber:o,chain:e.chain,contract:"multicall3"})}let f=(o?_(o):void 0)||s,{schedule:l}=Lc({id:`${e.uid}.${f}`,wait:n,shouldSplitBatch(x){return x.reduce((h,{data:b})=>h+(b.length-2),0)>r*2},fn:async x=>{let d=x.map(v=>({allowFailure:!0,callData:v.data,target:v.to})),h=de({abi:ai,args:[d],functionName:"aggregate3"}),b=await e.request({method:"eth_call",params:[{data:h,to:u},f]});return st({abi:ai,args:[d],functionName:"aggregate3",data:b||"0x"})}}),[{returnData:m,success:y}]=await l({data:i,to:c});if(!y)throw new Gt({data:m});return m==="0x"?{data:void 0}:{data:m}}function Zg(e){let{code:t,data:r}=e;return _n({abi:sa(["constructor(bytes, bytes)"]),bytecode:$c,args:[t,r]})}function Jg(e){let{data:t,factory:r,factoryData:n,to:o}=e;return _n({abi:sa(["constructor(address, bytes, address, bytes)"]),bytecode:vh,args:[o,t,r,n]})}function Xg(e){if(!(e instanceof g))return;let t=e.walk();return typeof t?.data=="object"?t.data?.data:t.data}var rs=E(()=>{"use strict";aa();ve();Jr();wh();Nc();W();Qo();Nr();Zr();Mc();ct();$n();V();Cf();si();Vr();Pf();bc();Wr()});var e0,t0=E(()=>{"use strict";e0="1.0.8"});var _e,xs=E(()=>{"use strict";t0();_e=class e extends Error{constructor(t,r={}){let n=r.cause instanceof e?r.cause.details:r.cause?.message?r.cause.message:r.details,o=r.cause instanceof e&&r.cause.docsPath||r.docsPath,s=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...o?[`Docs: https://abitype.dev${o}`]:[],...n?[`Details: ${n}`]:[],`Version: abitype@${e0}`].join(` +`);super(s),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,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=o,this.metaMessages=r.metaMessages,this.shortMessage=t}}});function Ft(e,t){return e.exec(t)?.groups}var ul,pl,Ku,Yu=E(()=>{"use strict";ul=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,pl=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,Ku=/^\(.+?\).*?$/});function n0(e){return r0.test(e)}function o0(e){return Ft(r0,e)}function i0(e){return s0.test(e)}function a0(e){return Ft(s0,e)}function u0(e){return c0.test(e)}function p0(e){return Ft(c0,e)}function Zu(e){return f0.test(e)}function l0(e){return Ft(f0,e)}function d0(e){return m0.test(e)}function h0(e){return Ft(m0,e)}function x0(e){return y0.test(e)}function b0(e){return Ft(y0,e)}function g0(e){return Cw.test(e)}var r0,s0,c0,f0,m0,y0,Cw,w0,Ju,Xu=E(()=>{"use strict";Yu();r0=/^error (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;s0=/^event (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;c0=/^function (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)(?: (?external|public{1}))?(?: (?pure|view|nonpayable|payable{1}))?(?: returns\s?\((?.*?)\))?$/;f0=/^struct (?[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?.*?)\}$/;m0=/^constructor\((?.*?)\)(?:\s(?payable{1}))?$/;y0=/^fallback\(\) external(?:\s(?payable{1}))?$/;Cw=/^receive\(\) external payable$/;w0=new Set(["indexed"]),Ju=new Set(["calldata","memory","storage"])});var wi,Qu,fl=E(()=>{"use strict";xs();wi=class extends _e{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}},Qu=class extends _e{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}});var vi,Ei,Ai,Ti,Si,ll=E(()=>{"use strict";xs();vi=class extends _e{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}},Ei=class extends _e{constructor({param:t,name:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${r}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}},Ai=class extends _e{constructor({param:t,type:r,modifier:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${n}" not allowed${r?` in "${r}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}},Ti=class extends _e{constructor({param:t,type:r,modifier:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${n}" not allowed${r?` in "${r}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${n}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}},Si=class extends _e{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}});var Ot,Ci,Ii,ml=E(()=>{"use strict";xs();Ot=class extends _e{constructor({signature:t,type:r}){super(`Invalid ${r} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}},Ci=class extends _e{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}},Ii=class extends _e{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}});var Pi,v0=E(()=>{"use strict";xs();Pi=class extends _e{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}});var ki,E0=E(()=>{"use strict";xs();ki=class extends _e{constructor({current:t,depth:r}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${r>0?"opening":"closing"} parentheses.`],details:`Depth "${r}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}});function A0(e,t,r){let n="";if(r)for(let o of Object.entries(r)){if(!o)continue;let s="";for(let i of o[1])s+=`[${i.type}${i.name?`:${i.name}`:""}]`;n+=`(${o[0]}{${s}})`}return t?`${t}:${e}${n}`:e}var ep,T0=E(()=>{"use strict";ep=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]])});function S0(e,t={}){if(u0(e))return Iw(e,t);if(i0(e))return Pw(e,t);if(n0(e))return kw(e,t);if(d0(e))return Bw(e,t);if(x0(e))return Rw(e);if(g0(e))return{type:"receive",stateMutability:"payable"};throw new Ci({signature:e})}function Iw(e,t={}){let r=p0(e);if(!r)throw new Ot({signature:e,type:"function"});let n=Mt(r.parameters),o=[],s=n.length;for(let a=0;a{"use strict";Yu();fl();ll();ml();E0();T0();Xu();_w=/^(?[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,$w=/^\((?.+?)\)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,Nw=/^u?int$/;Fw=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/});function C0(e){let t={},r=e.length;for(let i=0;i{"use strict";Yu();fl();ll();ml();v0();Xu();hl();zw=/^(?[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?$/});function Bi(e){let t=C0(e),r=[],n=e.length;for(let o=0;o{"use strict";Xu();P0();hl()});var B0=E(()=>{"use strict";k0()});var R0,_0=E(()=>{"use strict";R0={gwei:9,wei:18}});function $0(e,t){let r=e.toString(),n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(t,"0");let[o,s]=[r.slice(0,r.length-t),r.slice(r.length-t)];return s=s.replace(/(0+)$/,""),`${n?"-":""}${o||"0"}${s?`.${s}`:""}`}var N0=E(()=>{"use strict"});function yl(e,t="wei"){return $0(e,R0[t])}var F0=E(()=>{"use strict";_0();N0()});var Zw={};np(Zw,{GooddollarSavingsWidget:()=>ge});var Ni=globalThis,Fi=Ni.ShadowRoot&&(Ni.ShadyCSS===void 0||Ni.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,op=Symbol(),vl=new WeakMap,gs=class{constructor(t,r,n){if(this._$cssResult$=!0,n!==op)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=r}get styleSheet(){let t=this.o,r=this.t;if(Fi&&t===void 0){let n=r!==void 0&&r.length===1;n&&(t=vl.get(r)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&vl.set(r,t))}return t}toString(){return this.cssText}},El=e=>new gs(typeof e=="string"?e:e+"",void 0,op),sp=(e,...t)=>{let r=e.length===1?e[0]:t.reduce((n,o,s)=>n+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+e[s+1],e[0]);return new gs(r,e,op)},Al=(e,t)=>{if(Fi)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),o=Ni.litNonce;o!==void 0&&n.setAttribute("nonce",o),n.textContent=r.cssText,e.appendChild(n)}},ip=Fi?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let r="";for(let n of t.cssRules)r+=n.cssText;return El(r)})(e):e;var{is:D0,defineProperty:j0,getOwnPropertyDescriptor:q0,getOwnPropertyNames:V0,getOwnPropertySymbols:G0,getPrototypeOf:W0}=Object,Oi=globalThis,Tl=Oi.trustedTypes,K0=Tl?Tl.emptyScript:"",Y0=Oi.reactiveElementPolyfillSupport,ws=(e,t)=>e,vs={toAttribute(e,t){switch(t){case Boolean:e=e?K0:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},Mi=(e,t)=>!D0(e,t),Sl={attribute:!0,type:String,converter:vs,reflect:!1,useDefault:!1,hasChanged:Mi};Symbol.metadata??=Symbol("metadata"),Oi.litPropertyMetadata??=new WeakMap;var er=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,r=Sl){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(t,r),!r.noAccessor){let n=Symbol(),o=this.getPropertyDescriptor(t,n,r);o!==void 0&&j0(this.prototype,t,o)}}static getPropertyDescriptor(t,r,n){let{get:o,set:s}=q0(this.prototype,t)??{get(){return this[r]},set(i){this[r]=i}};return{get:o,set(i){let a=o?.call(this);s?.call(this,i),this.requestUpdate(t,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Sl}static _$Ei(){if(this.hasOwnProperty(ws("elementProperties")))return;let t=W0(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(ws("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ws("properties"))){let r=this.properties,n=[...V0(r),...G0(r)];for(let o of n)this.createProperty(o,r[o])}let t=this[Symbol.metadata];if(t!==null){let r=litPropertyMetadata.get(t);if(r!==void 0)for(let[n,o]of r)this.elementProperties.set(n,o)}this._$Eh=new Map;for(let[r,n]of this.elementProperties){let o=this._$Eu(r,n);o!==void 0&&this._$Eh.set(o,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let r=[];if(Array.isArray(t)){let n=new Set(t.flat(1/0).reverse());for(let o of n)r.unshift(ip(o))}else t!==void 0&&r.push(ip(t));return r}static _$Eu(t,r){let n=r.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,r=this.constructor.elementProperties;for(let n of r.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Al(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,r,n){this._$AK(t,n)}_$ET(t,r){let n=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,n);if(o!==void 0&&n.reflect===!0){let s=(n.converter?.toAttribute!==void 0?n.converter:vs).toAttribute(r,n.type);this._$Em=t,s==null?this.removeAttribute(o):this.setAttribute(o,s),this._$Em=null}}_$AK(t,r){let n=this.constructor,o=n._$Eh.get(t);if(o!==void 0&&this._$Em!==o){let s=n.getPropertyOptions(o),i=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:vs;this._$Em=o;let a=i.fromAttribute(r,s.type);this[o]=a??this._$Ej?.get(o)??a,this._$Em=null}}requestUpdate(t,r,n){if(t!==void 0){let o=this.constructor,s=this[t];if(n??=o.getPropertyOptions(t),!((n.hasChanged??Mi)(s,r)||n.useDefault&&n.reflect&&s===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,n))))return;this.C(t,r,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,r,{useDefault:n,reflect:o,wrapped:s},i){n&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??r??this[t]),s!==!0||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||n||(r=void 0),this._$AL.set(t,r)),o===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[o,s]of this._$Ep)this[o]=s;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[o,s]of n){let{wrapped:i}=s,a=this[o];i!==!0||this._$AL.has(o)||a===void 0||this.C(o,void 0,s,a)}}let t=!1,r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),this._$EO?.forEach(n=>n.hostUpdate?.()),this.update(r)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(r)}willUpdate(t){}_$AE(t){this._$EO?.forEach(r=>r.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(r=>this._$ET(r,this[r])),this._$EM()}updated(t){}firstUpdated(t){}};er.elementStyles=[],er.shadowRootOptions={mode:"open"},er[ws("elementProperties")]=new Map,er[ws("finalized")]=new Map,Y0?.({ReactiveElement:er}),(Oi.reactiveElementVersions??=[]).push("2.1.1");var mp=globalThis,zi=mp.trustedTypes,Cl=zi?zi.createPolicy("lit-html",{createHTML:e=>e}):void 0,_l="$lit$",vr=`lit$${Math.random().toFixed(9).slice(2)}$`,$l="?"+vr,Z0=`<${$l}>`,ln=document,As=()=>ln.createComment(""),Ts=e=>e===null||typeof e!="object"&&typeof e!="function",dp=Array.isArray,J0=e=>dp(e)||typeof e?.[Symbol.iterator]=="function",ap=`[ +\f\r]`,Es=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Il=/-->/g,Pl=/>/g,pn=RegExp(`>|${ap}(?:([^\\s"'>=/]+)(${ap}*=${ap}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),kl=/'/g,Bl=/"/g,Nl=/^(?:script|style|textarea|title)$/i,hp=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),Er=hp(1),xE=hp(2),bE=hp(3),mn=Symbol.for("lit-noChange"),Me=Symbol.for("lit-nothing"),Rl=new WeakMap,fn=ln.createTreeWalker(ln,129);function Fl(e,t){if(!dp(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Cl!==void 0?Cl.createHTML(t):t}var X0=(e,t)=>{let r=e.length-1,n=[],o,s=t===2?"":t===3?"":"",i=Es;for(let a=0;a"?(i=o??Es,f=-1):p[1]===void 0?f=-2:(f=i.lastIndex-p[2].length,u=p[1],i=p[3]===void 0?pn:p[3]==='"'?Bl:kl):i===Bl||i===kl?i=pn:i===Il||i===Pl?i=Es:(i=pn,o=void 0);let m=i===pn&&e[a+1].startsWith("/>")?" ":"";s+=i===Es?c+Z0:f>=0?(n.push(u),c.slice(0,f)+_l+c.slice(f)+vr+m):c+vr+(f===-2?a:m)}return[Fl(e,s+(e[r]||"")+(t===2?"":t===3?"":"")),n]},Ss=class e{constructor({strings:t,_$litType$:r},n){let o;this.parts=[];let s=0,i=0,a=t.length-1,c=this.parts,[u,p]=X0(t,r);if(this.el=e.createElement(u,n),fn.currentNode=this.el.content,r===2||r===3){let f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(o=fn.nextNode())!==null&&c.length0){o.textContent=zi?zi.emptyScript:"";for(let m=0;m2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=Me}_$AI(t,r=this,n,o){let s=this.strings,i=!1;if(s===void 0)t=Dn(this,t,r,0),i=!Ts(t)||t!==this._$AH&&t!==mn,i&&(this._$AH=t);else{let a=t,c,u;for(t=s[0],c=0;c{let n=r?.renderBefore??t,o=n._$litPart$;if(o===void 0){let s=r?.renderBefore??null;n._$litPart$=o=new Cs(t.insertBefore(As(),s),s,void 0,r??{})}return o._$AI(e),o};var yp=globalThis,Ar=class extends er{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ol(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return mn}};Ar._$litElement$=!0,Ar.finalized=!0,yp.litElementHydrateSupport?.({LitElement:Ar});var eb=yp.litElementPolyfillSupport;eb?.({LitElement:Ar});(yp.litElementVersions??=[]).push("4.2.1");var Ml=e=>(t,r)=>{r!==void 0?r.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)};var tb={attribute:!0,type:String,converter:vs,reflect:!1,hasChanged:Mi},rb=(e=tb,t,r)=>{let{kind:n,metadata:o}=r,s=globalThis.litPropertyMetadata.get(o);if(s===void 0&&globalThis.litPropertyMetadata.set(o,s=new Map),n==="setter"&&((e=Object.create(e)).wrapped=!0),s.set(r.name,e),n==="accessor"){let{name:i}=r;return{set(a){let c=t.get.call(this);t.set.call(this,a),this.requestUpdate(i,c,e)},init(a){return a!==void 0&&this.C(i,void 0,e,a),a}}}if(n==="setter"){let{name:i}=r;return function(a){let c=this[i];t.call(this,a),this.requestUpdate(i,c,e)}}throw Error("Unsupported decorator location: "+n)};function Is(e){return(t,r)=>typeof r=="object"?rb(e,t,r):((n,o,s)=>{let i=o.hasOwnProperty(s);return o.constructor.createProperty(s,n),i?Object.getOwnPropertyDescriptor(o,s):void 0})(e,t,r)}function Ye(e){return Is({...e,state:!0,attribute:!1})}function $(e,t,r){let n=e[t.name];if(typeof n=="function")return n;let o=e[r];return typeof o=="function"?o:s=>t(e,s)}ye();W();var wa=class extends g{constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"})}};ze();Bt();Ds();Dt();tr();_r();var Ym="/docs/contract/encodeEventTopics";function qt(e){let{abi:t,eventName:r,args:n}=e,o=t[0];if(r){let c=tt({abi:t,name:r});if(!c)throw new Ns(r,{docsPath:Ym});o=c}if(o.type!=="event")throw new Ns(void 0,{docsPath:Ym});let s=Ce(o),i=Br(s),a=[];if(n&&"inputs"in o){let c=o.inputs?.filter(p=>"indexed"in p&&p.indexed),u=Array.isArray(n)?n:Object.values(n).length>0?c?.map(p=>n[p.name])??[]:[];u.length>0&&(a=c?.map((p,f)=>Array.isArray(u[f])?u[f].map((l,m)=>Zm({param:p,value:u[f][m]})):typeof u[f]<"u"&&u[f]!==null?Zm({param:p,value:u[f]}):null)??[])}return[i,...a]}function Zm({param:e,value:t}){if(e.type==="string"||e.type==="bytes")return ue(ht(t));if(e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/))throw new wa(e.type);return De([e],[t])}V();function $r(e,{method:t}){let r={};return e.transport.type==="fallback"&&e.transport.onResponse?.(({method:n,response:o,status:s,transport:i})=>{s==="success"&&t===n&&(r[o]=i.request)}),n=>r[n]||e.request}async function Oa(e,t){let{address:r,abi:n,args:o,eventName:s,fromBlock:i,strict:a,toBlock:c}=t,u=$r(e,{method:"eth_newFilter"}),p=s?qt({abi:n,args:o,eventName:s}):void 0,f=await e.request({method:"eth_newFilter",params:[{address:r,fromBlock:typeof i=="bigint"?_(i):i,toBlock:typeof c=="bigint"?_(c):c,topics:p}]});return{abi:n,args:o,eventName:s,id:f,request:u(f),strict:!!a,type:"event"}}ve();ct();ye();W();Nr();En();Zs();var rg=3;function ut(e,{abi:t,address:r,args:n,docsPath:o,functionName:s,sender:i}){let a=e instanceof Gt?e:e instanceof g?e.walk(y=>"data"in y)||e.walk():{},{code:c,data:u,details:p,message:f,shortMessage:l}=a,m=e instanceof dt?new tc({functionName:s}):[rg,cr.code].includes(c)&&(u||p||f||l)?new vn({abi:t,data:typeof u=="object"?u.data:u,functionName:s,message:a instanceof Fr?p:l??f}):e;return new ec(m,{abi:t,args:n,contractAddress:r,docsPath:o,functionName:s,sender:i})}ve();W();bn();Bt();function fd(e){let t=ue(`0x${e.substring(4)}`).substring(26);return sr(`0x${t}`)}St();mt();He();V();async function eh({hash:e,signature:t}){let r=we(e)?e:z(e),{secp256k1:n}=await Promise.resolve().then(()=>(xf(),Xd));return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){let{r:u,s:p,v:f,yParity:l}=t,m=Number(l??f),y=Qd(m);return new n.Signature(he(u),he(p)).addRecoveryBit(y)}let i=we(t)?t:z(t);if(ee(i)!==65)throw new Error("invalid signature length");let a=xe(`0x${i.slice(130)}`),c=Qd(a);return n.Signature.fromCompact(i.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(r.substring(2)).toHex(!1)}`}function Qd(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function dc({hash:e,signature:t}){return fd(await eh({hash:e,signature:t}))}et();ze();V();W();La();ze();V();function ft(e,t="hex"){let r=th(e),n=to(new Uint8Array(r.length));return r.encode(n),t==="hex"?te(n.bytes):n.bytes}function th(e){return Array.isArray(e)?Fg(e.map(t=>th(t))):Og(e)}function Fg(e){let t=e.reduce((o,s)=>o+s.length,0),r=rh(t);return{length:t<=55?1+t:1+r+t,encode(o){t<=55?o.pushByte(192+t):(o.pushByte(247+r),r===1?o.pushUint8(t):r===2?o.pushUint16(t):r===3?o.pushUint24(t):o.pushUint32(t));for(let{encode:s}of e)s(o)}}}function Og(e){let t=typeof e=="string"?Pe(e):e,r=rh(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(o){t.length===1&&t[0]<128?o.pushBytes(t):t.length<=55?(o.pushByte(128+t.length),o.pushBytes(t)):(o.pushByte(183+r),r===1?o.pushUint8(t.length):r===2?o.pushUint16(t.length):r===3?o.pushUint24(t.length):o.pushUint32(t.length),o.pushBytes(t))}}}function rh(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new g("Length is too large.")}Bt();function nh(e){let{chainId:t,nonce:r,to:n}=e,o=e.contractAddress??e.address,s=ue(Te(["0x05",ft([t?_(t):"0x",o,r?_(r):"0x"])]));return n==="bytes"?Pe(s):s}async function hc(e){let{authorization:t,signature:r}=e;return dc({hash:nh(t),signature:r??t})}V();Ks();no();W();_t();var yc=class extends g{constructor(t,{account:r,docsPath:n,chain:o,data:s,gas:i,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:p,to:f,value:l}){let m=gn({from:r?.address,to:f,value:typeof l<"u"&&`${ar(l)} ${o?.nativeCurrency?.symbol||"ETH"}`,data:s,gas:i,gasPrice:typeof a<"u"&&`${ke(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${ke(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${ke(u)} gwei`,nonce:p});super(t.shortMessage,{cause:t,docsPath:n,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",m].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}};hr();oi();function oh(e,{docsPath:t,...r}){let n=(()=>{let o=jr(e,r);return o instanceof wt?e:o})();return new yc(n,{docsPath:t,...r})}si();Vr();bc();Wr();ve();no();W();var wc=class extends g{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}},Kr=class extends g{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}},vc=class extends g{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${ke(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}};He();W();var Do=class extends g{constructor({blockHash:t,blockNumber:r}){let n="Block";t&&(n=`Block at hash "${t}"`),r&&(n=`Block at number "${r}"`),super(`${n} could not be found.`,{name:"BlockNotFoundError"})}};V();xc();He();xc();var bf={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function Bn(e){let t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?xe(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?xe(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?bf[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=Lg(e.authorizationList)),t.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof t.v=="bigint"){if(t.v===0n||t.v===27n)return 0;if(t.v===1n||t.v===28n)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),t.type==="legacy"&&(delete t.accessList,delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),t.type==="eip2930"&&(delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),t.type==="eip1559"&&delete t.maxFeePerBlobGas,t}var ah=Lo("transaction",Bn);function Lg(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function ii(e){let t=(e.transactions??[]).map(r=>typeof r=="string"?r:Bn(r));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}var ch=Lo("block",ii);async function Ge(e,{blockHash:t,blockNumber:r,blockTag:n,includeTransactions:o}={}){let s=n??"latest",i=o??!1,a=r!==void 0?_(r):void 0,c=null;if(t?c=await e.request({method:"eth_getBlockByHash",params:[t,i]},{dedupe:!0}):c=await e.request({method:"eth_getBlockByNumber",params:[a||s,i]},{dedupe:!!a}),!c)throw new Do({blockHash:t,blockNumber:r});return(e.chain?.formatters?.block?.format||ii)(c)}async function jo(e){let t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function uh(e,t){return gf(e,t)}async function gf(e,t){let{block:r,chain:n=e.chain,request:o}=t||{};try{let s=n?.fees?.maxPriorityFeePerGas??n?.fees?.defaultPriorityFee;if(typeof s=="function"){let a=r||await $(e,Ge,"getBlock")({}),c=await s({block:a,client:e,request:o});if(c===null)throw new Error;return c}if(typeof s<"u")return s;let i=await e.request({method:"eth_maxPriorityFeePerGas"});return he(i)}catch{let[s,i]=await Promise.all([r?Promise.resolve(r):$(e,Ge,"getBlock")({}),$(e,jo,"getGasPrice")({})]);if(typeof s.baseFeePerGas!="bigint")throw new Kr;let a=i-s.baseFeePerGas;return a<0n?0n:a}}async function ph(e,t){return Ec(e,t)}async function Ec(e,t){let{block:r,chain:n=e.chain,request:o,type:s="eip1559"}=t||{},i=await(async()=>typeof n?.fees?.baseFeeMultiplier=="function"?n.fees.baseFeeMultiplier({block:r,client:e,request:o}):n?.fees?.baseFeeMultiplier??1.2)();if(i<1)throw new wc;let c=10**(i.toString().split(".")[1]?.length??0),u=l=>l*BigInt(Math.ceil(i*c))/BigInt(c),p=r||await $(e,Ge,"getBlock")({});if(typeof n?.fees?.estimateFeesPerGas=="function"){let l=await n.fees.estimateFeesPerGas({block:r,client:e,multiply:u,request:o,type:s});if(l!==null)return l}if(s==="eip1559"){if(typeof p.baseFeePerGas!="bigint")throw new Kr;let l=typeof o?.maxPriorityFeePerGas=="bigint"?o.maxPriorityFeePerGas:await gf(e,{block:p,chain:n,request:o}),m=u(p.baseFeePerGas);return{maxFeePerGas:o?.maxFeePerGas??m+l,maxPriorityFeePerGas:l}}return{gasPrice:o?.gasPrice??u(await $(e,jo,"getGasPrice")({}))}}He();V();async function qo(e,{address:t,blockTag:r="latest",blockNumber:n}){let o=await e.request({method:"eth_getTransactionCount",params:[t,n?_(n):r]},{dedupe:!!n});return xe(o)}ze();V();function Vo(e){let{kzg:t}=e,r=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),n=typeof e.blobs[0]=="string"?e.blobs.map(s=>Pe(s)):e.blobs,o=[];for(let s of n)o.push(Uint8Array.from(t.blobToKzgCommitment(s)));return r==="bytes"?o:o.map(s=>te(s))}ze();V();function Go(e){let{kzg:t}=e,r=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),n=typeof e.blobs[0]=="string"?e.blobs.map(i=>Pe(i)):e.blobs,o=typeof e.commitments[0]=="string"?e.commitments.map(i=>Pe(i)):e.commitments,s=[];for(let i=0;ite(i))}V();Vp();St();ze();V();function fh(e,t){let r=t||"hex",n=Ur(we(e,{strict:!1})?ht(e):e);return r==="bytes"?n:z(n)}function lh(e){let{commitment:t,version:r=1}=e,n=e.to??(typeof t=="string"?"hex":"bytes"),o=fh(t,"bytes");return o.set([r],0),n==="bytes"?o:te(o)}function Ac(e){let{commitments:t,version:r}=e,n=e.to??(typeof t[0]=="string"?"hex":"bytes"),o=[];for(let s of t)o.push(lh({commitment:s,to:n,version:r}));return o}W();var Tc=class extends g{constructor({maxSize:t,size:r}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${r} bytes`],name:"BlobSizeTooLargeError"})}},Wo=class extends g{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}},Sc=class extends g{constructor({hash:t,size:r}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${r}`],name:"InvalidVersionedHashSizeError"})}},Cc=class extends g{constructor({hash:t,version:r}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${1}`,`Received: ${r}`],name:"InvalidVersionedHashVersionError"})}};La();mt();ze();V();function mh(e){let t=e.to??(typeof e.data=="string"?"hex":"bytes"),r=typeof e.data=="string"?Pe(e.data):e.data,n=ee(r);if(!n)throw new Wo;if(n>761855)throw new Tc({maxSize:761855,size:n});let o=[],s=!0,i=0;for(;s;){let a=to(new Uint8Array(131072)),c=0;for(;c<4096;){let u=r.slice(i,i+31);if(a.pushByte(0),a.pushBytes(u),u.length<31){a.pushByte(128),s=!1;break}c++,i+=31}o.push(a)}return t==="bytes"?o.map(a=>a.bytes):o.map(a=>te(a.bytes))}function Ic(e){let{data:t,kzg:r,to:n}=e,o=e.blobs??mh({data:t,to:n}),s=e.commitments??Vo({blobs:o,kzg:r,to:n}),i=e.proofs??Go({blobs:o,commitments:s,kzg:r,to:n}),a=[];for(let c=0;c"u"&&f)if(c){let h=await d();l.nonce=await c.consume({address:f.address,chainId:h,client:e})}else l.nonce=await $(e,qo,"getTransactionCount")({address:f.address,blockTag:"pending"});if((u.includes("blobVersionedHashes")||u.includes("sidecars"))&&n&&i){let h=Vo({blobs:n,kzg:i});if(u.includes("blobVersionedHashes")){let b=Ac({commitments:h,to:"hex"});l.blobVersionedHashes=b}if(u.includes("sidecars")){let b=Go({blobs:n,commitments:h,kzg:i}),v=Ic({blobs:n,commitments:h,proofs:b,to:"hex"});l.sidecars=v}}if(u.includes("chainId")&&(l.chainId=await d()),(u.includes("fees")||u.includes("type"))&&typeof p>"u")try{l.type=Pc(l)}catch{let h=dh.get(e.uid);typeof h>"u"&&(h=typeof(await y())?.baseFeePerGas=="bigint",dh.set(e.uid,h)),l.type=h?"eip1559":"legacy"}if(u.includes("fees"))if(l.type!=="legacy"&&l.type!=="eip2930"){if(typeof l.maxFeePerGas>"u"||typeof l.maxPriorityFeePerGas>"u"){let h=await y(),{maxFeePerGas:b,maxPriorityFeePerGas:v}=await Ec(e,{block:h,chain:o,request:l});if(typeof t.maxPriorityFeePerGas>"u"&&t.maxFeePerGas&&t.maxFeePerGas"u"){let h=await y(),{gasPrice:b}=await Ec(e,{block:h,chain:o,request:l,type:"legacy"});l.gasPrice=b}}return u.includes("gas")&&typeof s>"u"&&(l.gas=await $(e,Ko,"estimateGas")({...l,account:f&&{address:f.address,type:"json-rpc"}})),ot(l),delete l.parameters,l}V();async function kc(e,{address:t,blockNumber:r,blockTag:n="latest"}){let o=r?_(r):void 0,s=await e.request({method:"eth_getBalance",params:[t,o||n]});return BigInt(s)}async function Ko(e,t){let{account:r=e.account}=t,n=r?K(r):void 0;try{let L=function(R){let{block:O,request:N,rpcStateOverride:q}=R;return e.request({method:"eth_estimateGas",params:q?[N,O??"latest",q]:O?[N,O]:[N]})};var o=L;let{accessList:s,authorizationList:i,blobs:a,blobVersionedHashes:c,blockNumber:u,blockTag:p,data:f,gas:l,gasPrice:m,maxFeePerBlobGas:y,maxFeePerGas:x,maxPriorityFeePerGas:d,nonce:h,value:b,stateOverride:v,...A}=await Yr(e,{...t,parameters:n?.type==="local"?void 0:["blobVersionedHashes"]}),S=(u?_(u):void 0)||p,T=Ho(v),B=await(async()=>{if(A.to)return A.to;if(i&&i.length>0)return await hc({authorization:i[0]}).catch(()=>{throw new g("`to` is required. Could not infer from `authorizationList`")})})();ot(t);let P=e.chain?.formatters?.transactionRequest?.format,U=(P||lt)({...qr(A,{format:P}),from:n?.address,accessList:s,authorizationList:i,blobs:a,blobVersionedHashes:c,data:f,gas:l,gasPrice:m,maxFeePerBlobGas:y,maxFeePerGas:x,maxPriorityFeePerGas:d,nonce:h,to:B,value:b}),ne=BigInt(await L({block:S,request:U,rpcStateOverride:T}));if(i){let R=await kc(e,{address:U.from}),O=await Promise.all(i.map(async N=>{let{address:q}=N,D=await L({block:S,request:{authorizationList:void 0,data:f,from:n?.address,to:q,value:_(R)},rpcStateOverride:T}).catch(()=>100000n);return 2n*BigInt(D)}));ne+=O.reduce((N,q)=>N+q,0n)}return ne}catch(s){throw oh(s,{...t,account:n,chain:e.chain})}}async function hh(e,t){let{abi:r,address:n,args:o,functionName:s,dataSuffix:i,...a}=t,c=de({abi:r,args:o,functionName:s});try{return await $(e,Ko,"estimateGas")({data:`${c}${i?i.replace("0x",""):""}`,to:n,...a})}catch(u){let p=a.account?K(a.account):void 0;throw ut(u,{abi:r,address:n,args:o,docsPath:"/docs/contract/estimateContractGas",functionName:s,sender:p?.address})}}_r();ye();Yo();ze();Bt();Ds();ye();mt();Ds();zp();Ws();tr();var yh="/docs/contract/decodeEventLog";function Zo(e){let{abi:t,data:r,strict:n,topics:o}=e,s=n??!0,[i,...a]=o;if(!i)throw new da({docsPath:yh});let c=t.length===1?t[0]:t.find(x=>x.type==="event"&&i===Br(Ce(x)));if(!(c&&"name"in c)||c.type!=="event")throw new Yn(i,{docsPath:yh});let{name:u,inputs:p}=c,f=p?.some(x=>!("name"in x&&x.name)),l=f?[]:{},m=p.filter(x=>"indexed"in x&&x.indexed);for(let x=0;x!("indexed"in x&&x.indexed));if(y.length>0){if(r&&r!=="0x")try{let x=ir(y,r);if(x)if(f)l=[...l,...x];else for(let d=0;d0?l:void 0}}function jg({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(ir([e],t)||[])[0]}function Jo(e){let{abi:t,args:r,logs:n,strict:o=!0}=e,s=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})();return n.map(i=>{try{let a=t.find(u=>u.type==="event"&&i.topics[0]===Br(u));if(!a)return null;let c=Zo({...i,abi:[a],strict:o});return s&&!s.includes(c.eventName)||!qg({args:c.args,inputs:a.inputs,matchArgs:r})?null:{...c,...i}}catch(a){let c,u;if(a instanceof Yn)return null;if(a instanceof It||a instanceof Ut){if(o)return null;c=a.abiItem.name,u=a.abiItem.inputs?.some(p=>!("name"in p&&p.name))}return{...i,args:u?[]:{},eventName:c}}}).filter(Boolean)}function qg(e){let{args:t,inputs:r,matchArgs:n}=e;if(!n)return!0;if(!t)return!1;function o(s,i,a){try{return s.type==="address"?Yt(i,a):s.type==="string"||s.type==="bytes"?ue(ht(i))===a:i===a}catch{return!1}}return Array.isArray(t)&&Array.isArray(n)?n.every((s,i)=>{if(s==null)return!0;let a=r[i];return a?(Array.isArray(s)?s:[s]).some(u=>o(a,u,t[i])):!1}):typeof t=="object"&&!Array.isArray(t)&&typeof n=="object"&&!Array.isArray(n)?Object.entries(n).every(([s,i])=>{if(i==null)return!0;let a=r.find(u=>u.name===s);return a?(Array.isArray(i)?i:[i]).some(u=>o(a,u,t[s])):!1}):!1}V();function We(e,{args:t,eventName:r}={}){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,...r?{args:t,eventName:r}:{}}}async function Xo(e,{address:t,blockHash:r,fromBlock:n,toBlock:o,event:s,events:i,args:a,strict:c}={}){let u=c??!1,p=i??(s?[s]:void 0),f=[];p&&(f=[p.flatMap(x=>qt({abi:[x],eventName:x.name,args:i?void 0:a}))],s&&(f=f[0]));let l;r?l=await e.request({method:"eth_getLogs",params:[{address:t,topics:f,blockHash:r}]}):l=await e.request({method:"eth_getLogs",params:[{address:t,topics:f,fromBlock:typeof n=="bigint"?_(n):n,toBlock:typeof o=="bigint"?_(o):o}]});let m=l.map(y=>We(y));return p?Jo({abi:p,args:a,logs:m,strict:u}):m}async function Bc(e,t){let{abi:r,address:n,args:o,blockHash:s,eventName:i,fromBlock:a,toBlock:c,strict:u}=t,p=i?tt({abi:r,name:i}):void 0,f=p?void 0:r.filter(l=>l.type==="event");return $(e,Xo,"getLogs")({address:n,args:o,blockHash:s,event:p,events:f,fromBlock:a,toBlock:c,strict:u})}Zr();ct();rs();async function je(e,t){let{abi:r,address:n,args:o,functionName:s,...i}=t,a=de({abi:r,args:o,functionName:s});try{let{data:c}=await $(e,Zt,"call")({...i,data:a,to:n});return st({abi:r,args:o,functionName:s,data:c||"0x"})}catch(c){throw ut(c,{abi:r,address:n,args:o,docsPath:"/docs/contract/readContract",functionName:s})}}ve();Zr();ct();rs();async function Nh(e,t){let{abi:r,address:n,args:o,dataSuffix:s,functionName:i,...a}=t,c=a.account?K(a.account):e.account,u=de({abi:r,args:o,functionName:i});try{let{data:p}=await $(e,Zt,"call")({batch:!1,data:`${u}${s?s.replace("0x",""):""}`,to:n,...a,account:c}),f=st({abi:r,args:o,functionName:i,data:p||"0x"}),l=r.filter(m=>"name"in m&&m.name===t.functionName);return{result:f,request:{abi:l,address:n,args:o,dataSuffix:s,functionName:i,...a,account:c}}}catch(p){throw ut(p,{abi:r,address:n,args:o,docsPath:"/docs/contract/simulateContract",functionName:i,sender:c?.address})}}ye();Zs();var _f=new Map,Fh=new Map,Qg=0;function Ke(e,t,r){let n=++Qg,o=()=>_f.get(e)||[],s=()=>{let p=o();_f.set(e,p.filter(f=>f.id!==n))},i=()=>{let p=o();if(!p.some(l=>l.id===n))return;let f=Fh.get(e);p.length===1&&f&&f(),s()},a=o();if(_f.set(e,[...a,{id:n,fns:t}]),a&&a.length>0)return i;let c={};for(let p in t)c[p]=(...f)=>{let l=o();if(l.length!==0)for(let m of l)m.fns[p]?.(...f)};let u=r(c);return typeof u=="function"&&Fh.set(e,u),i}async function ui(e){return new Promise(t=>setTimeout(t,e))}function At(e,{emitOnBegin:t,initialWaitTime:r,interval:n}){let o=!0,s=()=>o=!1;return(async()=>{let a;t&&(a=await e({unpoll:s}));let c=await r?.(a)??n;await ui(c);let u=async()=>{o&&(await e({unpoll:s}),await ui(n),u())};u()})(),s}qe();var e1=new Map,t1=new Map;function Oh(e){let t=(o,s)=>({clear:()=>s.delete(o),get:()=>s.get(o),set:i=>s.set(o,i)}),r=t(e,e1),n=t(e,t1);return{clear:()=>{r.clear(),n.clear()},promise:r,response:n}}async function Mh(e,{cacheKey:t,cacheTime:r=Number.POSITIVE_INFINITY}){let n=Oh(t),o=n.response.get();if(o&&r>0&&new Date().getTime()-o.created.getTime()`blockNumber.${e}`;async function Jt(e,{cacheTime:t=e.cacheTime}={}){let r=await Mh(()=>e.request({method:"eth_blockNumber"}),{cacheKey:r1(e.uid),cacheTime:t});return BigInt(r)}async function Xr(e,{filter:t}){let r="strict"in t&&t.strict,n=await t.request({method:"eth_getFilterChanges",params:[t.id]});if(typeof n[0]=="string")return n;let o=n.map(s=>We(s));return!("abi"in t)||!t.abi?o:Jo({abi:t.abi,logs:o,strict:r})}async function Qr(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}function zh(e,t){let{abi:r,address:n,args:o,batch:s=!0,eventName:i,fromBlock:a,onError:c,onLogs:u,poll:p,pollingInterval:f=e.pollingInterval,strict:l}=t;return(typeof p<"u"?p:typeof a=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="fallback"&&e.transport.transports[0].config.type==="webSocket"))?(()=>{let d=l??!1,h=X(["watchContractEvent",n,o,s,e.uid,i,f,d,a]);return Ke(h,{onLogs:u,onError:c},b=>{let v;a!==void 0&&(v=a-1n);let A,k=!1,S=At(async()=>{if(!k){try{A=await $(e,Oa,"createContractEventFilter")({abi:r,address:n,args:o,eventName:i,strict:d,fromBlock:a})}catch{}k=!0;return}try{let T;if(A)T=await $(e,Xr,"getFilterChanges")({filter:A});else{let B=await $(e,Jt,"getBlockNumber")({});v&&v{A&&await $(e,Qr,"uninstallFilter")({filter:A}),S()}})})():(()=>{let d=l??!1,h=X(["watchContractEvent",n,o,s,e.uid,i,f,d]),b=!0,v=()=>b=!1;return Ke(h,{onLogs:u,onError:c},A=>((async()=>{try{let k=(()=>{if(e.transport.type==="fallback"){let B=e.transport.transports.find(P=>P.config.type==="webSocket");return B?B.value:e.transport}return e.transport})(),S=i?qt({abi:r,eventName:i,args:o}):[],{unsubscribe:T}=await k.subscribe({params:["logs",{address:n,topics:S}],onData(B){if(!b)return;let P=B.result;try{let{eventName:H,args:U}=Zo({abi:r,data:P.data,topics:P.topics,strict:l}),L=We(P,{args:U,eventName:H});A.onLogs([L])}catch(H){let U,L;if(H instanceof It||H instanceof Ut){if(l)return;U=H.abiItem.name,L=H.abiItem.inputs?.some(R=>!("name"in R&&R.name))}let ne=We(P,{args:L?[]:{},eventName:U});A.onLogs([ne])}},onError(B){A.onError?.(B)}});v=T,b||v()}catch(k){c?.(k)}})(),()=>v()))})()}ve();W();var Ue=class extends g{constructor({docsPath:t}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(` +`),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"})}},en=class extends g{constructor({docsPath:t,metaMessages:r,type:n}){super(`Account type "${n}" is not supported.`,{docsPath:t,metaMessages:r,name:"AccountTypeNotSupportedError"})}};ct();ve();W();Qo();function Vc({chain:e,currentChainId:t}){if(!e)throw new Oc;if(t!==e.id)throw new Fc({chain:e,currentChainId:t})}hr();_t();oi();function Gc(e,{docsPath:t,...r}){let n=(()=>{let o=jr(e,r);return o instanceof wt?e:o})();return new Ja(n,{docsPath:t,...r})}si();Vr();js();Wr();async function ns(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}var $f=new Ht(128);async function os(e,t){let{account:r=e.account,chain:n=e.chain,accessList:o,authorizationList:s,blobs:i,data:a,gas:c,gasPrice:u,maxFeePerBlobGas:p,maxFeePerGas:f,maxPriorityFeePerGas:l,nonce:m,type:y,value:x,...d}=t;if(typeof r>"u")throw new Ue({docsPath:"/docs/actions/wallet/sendTransaction"});let h=r?K(r):null;try{ot(t);let b=await(async()=>{if(t.to)return t.to;if(t.to!==null&&s&&s.length>0)return await hc({authorization:s[0]}).catch(()=>{throw new g("`to` is required. Could not infer from `authorizationList`.")})})();if(h?.type==="json-rpc"||h===null){let v;n!==null&&(v=await $(e,vt,"getChainId")({}),Vc({currentChainId:v,chain:n}));let A=e.chain?.formatters?.transactionRequest?.format,S=(A||lt)({...qr(d,{format:A}),accessList:o,authorizationList:s,blobs:i,chainId:v,data:a,from:h?.address,gas:c,gasPrice:u,maxFeePerBlobGas:p,maxFeePerGas:f,maxPriorityFeePerGas:l,nonce:m,to:b,type:y,value:x}),T=$f.get(e.uid),B=T?"wallet_sendTransaction":"eth_sendTransaction";try{return await e.request({method:B,params:[S]},{retryCount:0})}catch(P){if(T===!1)throw P;let H=P;if(H.name==="InvalidInputRpcError"||H.name==="InvalidParamsRpcError"||H.name==="MethodNotFoundRpcError"||H.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[S]},{retryCount:0}).then(U=>($f.set(e.uid,!0),U)).catch(U=>{let L=U;throw L.name==="MethodNotFoundRpcError"||L.name==="MethodNotSupportedRpcError"?($f.set(e.uid,!1),H):L});throw H}}if(h?.type==="local"){let v=await $(e,Yr,"prepareTransactionRequest")({account:h,accessList:o,authorizationList:s,blobs:i,chain:n,data:a,gas:c,gasPrice:u,maxFeePerBlobGas:p,maxFeePerGas:f,maxPriorityFeePerGas:l,nonce:m,nonceManager:h.nonceManager,parameters:[...wf,"sidecars"],type:y,value:x,...d,to:b}),A=n?.serializers?.transaction,k=await h.signTransaction(v,{serializer:A});return await $(e,ns,"sendRawTransaction")({serializedTransaction:k})}throw h?.type==="smart"?new en({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new en({docsPath:"/docs/actions/wallet/sendTransaction",type:h?.type})}catch(b){throw b instanceof en?b:Gc(b,{...t,account:h,chain:t.chain||void 0})}}async function Uh(e,t){let{abi:r,account:n=e.account,address:o,args:s,dataSuffix:i,functionName:a,...c}=t;if(typeof n>"u")throw new Ue({docsPath:"/docs/contract/writeContract"});let u=n?K(n):null,p=de({abi:r,args:s,functionName:a});try{return await $(e,os,"sendTransaction")({data:`${p}${i?i.replace("0x",""):""}`,to:o,account:u,...c})}catch(f){throw ut(f,{abi:r,address:o,args:s,docsPath:"/docs/contract/writeContract",functionName:a,sender:u?.address})}}W();Uc();qe();He();He();var Nf={"0x0":"reverted","0x1":"success"};function Lh(e){let t={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(r=>We(r)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?xe(e.transactionIndex):null,status:e.status?Nf[e.status]:null,type:e.type?bf[e.type]||e.type:null};return e.blobGasPrice&&(t.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(t.blobGasUsed=BigInt(e.blobGasUsed)),t}async function Wc(e,t){let{atomic:r=!1,chainId:n,receipts:o,version:s="2.0.0",...i}=await e.request({method:"wallet_getCallsStatus",params:[t.id]}),[a,c]=(()=>{let u=i.status;return u>=100&&u<200?["pending",u]:u>=200&&u<300?["success",u]:u>=300&&u<700?["failure",u]:u==="CONFIRMED"?["success",200]:u==="PENDING"?["pending",100]:[void 0,u]})();return{...i,atomic:r,chainId:n?xe(n):void 0,receipts:o?.map(u=>({...u,blockNumber:he(u.blockNumber),gasUsed:he(u.gasUsed),status:Nf[u.status]}))??[],statusCode:c,status:a,version:s}}async function Hh(e,t){let{id:r,pollingInterval:n=e.pollingInterval,status:o=({statusCode:l})=>l>=200,timeout:s=6e4}=t,i=X(["waitForCallsStatus",e.uid,r]),{promise:a,resolve:c,reject:u}=es(),p,f=Ke(i,{resolve:c,reject:u},l=>{let m=At(async()=>{let y=x=>{clearTimeout(p),m(),x(),f()};try{let x=await Wc(e,{id:r});if(!o(x))return;y(()=>l.resolve(x))}catch(x){y(()=>l.reject(x))}},{interval:n,emitOnBegin:!0});return m});return p=s?setTimeout(()=>{f(),clearTimeout(p),u(new Ff({id:r}))},s):void 0,await a}var Ff=class extends g{constructor({id:t}){super(`Timed out while waiting for call bundle with id "${t}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}};ve();var Kc=256,Yc;function Zc(e=11){if(!Yc||Kc+e>256*2){Yc="",Kc=0;for(let t=0;t<256;t++)Yc+=(256+Math.random()*256|0).toString(16).substring(1)}return Yc.substring(Kc,Kc+++e)}function Jc(e){let{batch:t,cacheTime:r=e.pollingInterval??4e3,ccipRead:n,key:o="base",name:s="Base Client",pollingInterval:i=4e3,type:a="base"}=e,c=e.chain,u=e.account?K(e.account):void 0,{config:p,request:f,value:l}=e.transport({chain:c,pollingInterval:i}),m={...p,...l},y={account:u,batch:t,cacheTime:r,ccipRead:n,chain:c,key:o,name:s,pollingInterval:i,request:f,transport:m,type:a,uid:Zc()};function x(d){return h=>{let b=h(d);for(let A in y)delete b[A];let v={...d,...b};return Object.assign(v,{extend:x(v)})}}return Object.assign(y,{extend:x(y)})}W();En();Zs();V();js();var Xc=new Ht(8192);function Dh(e,{enabled:t=!0,id:r}){if(!t||!r)return e();if(Xc.get(r))return Xc.get(r);let n=e().finally(()=>Xc.delete(r));return Xc.set(r,n),n}function pi(e,{delay:t=100,retryCount:r=2,shouldRetry:n=()=>!0}={}){return new Promise((o,s)=>{let i=async({count:a=0}={})=>{let c=async({error:u})=>{let p=typeof t=="function"?t({count:a,error:u}):t;p&&await ui(p),i({count:a+1})};try{let u=await e();o(u)}catch(u){if(a{let{dedupe:o=!1,methods:s,retryDelay:i=150,retryCount:a=3,uid:c}={...t,...n},{method:u}=r;if(s?.exclude?.includes(u))throw new Or(new Error("method not supported"),{method:u});if(s?.include&&!s.include.includes(u))throw new Or(new Error("method not supported"),{method:u});let p=o?Lt(`${c}.${X(r)}`):void 0;return Dh(()=>pi(async()=>{try{return await e(r)}catch(f){let l=f;switch(l.code){case ao.code:throw new ao(l);case co.code:throw new co(l);case uo.code:throw new uo(l,{method:r.method});case po.code:throw new po(l);case cr.code:throw new cr(l);case Wt.code:throw new Wt(l);case fo.code:throw new fo(l);case lo.code:throw new lo(l);case mo.code:throw new mo(l);case Or.code:throw new Or(l,{method:r.method});case An.code:throw new An(l);case ho.code:throw new ho(l);case Tn.code:throw new Tn(l);case yo.code:throw new yo(l);case xo.code:throw new xo(l);case bo.code:throw new bo(l);case go.code:throw new go(l);case wo.code:throw new wo(l);case vo.code:throw new vo(l);case Eo.code:throw new Eo(l);case Ao.code:throw new Ao(l);case To.code:throw new To(l);case So.code:throw new So(l);case Co.code:throw new Co(l);case Io.code:throw new Io(l);case 5e3:throw new Tn(l);default:throw f instanceof g?f:new nc(l)}}},{delay:({count:f,error:l})=>{if(l&&l instanceof bt){let m=l?.headers?.get("Retry-After");if(m?.match(/\d/))return Number.parseInt(m)*1e3}return~~(1<n1(f)}),{enabled:o,id:p})}}function n1(e){return"code"in e&&typeof e.code=="number"?e.code===-1||e.code===An.code||e.code===cr.code:e instanceof bt&&e.status?e.status===403||e.status===408||e.status===413||e.status===429||e.status===500||e.status===502||e.status===503||e.status===504:!0}function Qc({key:e,methods:t,name:r,request:n,retryCount:o=3,retryDelay:s=150,timeout:i,type:a},c){let u=Zc();return{config:{key:e,methods:t,name:r,request:n,retryCount:o,retryDelay:s,timeout:i,type:a},request:jh(n,{methods:t,retryCount:o,retryDelay:s,uid:u}),value:c}}function Of(e,t={}){let{key:r="custom",methods:n,name:o="Custom Provider",retryDelay:s}=t;return({retryCount:i})=>Qc({key:r,methods:n,name:o,request:e.request.bind(e),retryCount:t.retryCount??i,retryDelay:s,type:"custom"})}En();W();var eu=class extends g{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}};Pf();En();function qh(e,{errorInstance:t=new Error("timed out"),timeout:r,signal:n}){return new Promise((o,s)=>{(async()=>{let i;try{let a=new AbortController;r>0&&(i=setTimeout(()=>{n?a.abort():s(t)},r)),o(await e({signal:a?.signal||null}))}catch(a){a?.name==="AbortError"&&s(t),s(a)}finally{clearTimeout(i)}})()})}qe();function o1(){return{current:0,take(){return this.current++},reset(){this.current=0}}}var Mf=o1();function Vh(e,t={}){return{async request(r){let{body:n,onRequest:o=t.onRequest,onResponse:s=t.onResponse,timeout:i=t.timeout??1e4}=r,a={...t.fetchOptions??{},...r.fetchOptions??{}},{headers:c,method:u,signal:p}=a;try{let f=await qh(async({signal:m})=>{let y={...a,body:Array.isArray(n)?X(n.map(b=>({jsonrpc:"2.0",id:b.id??Mf.take(),...b}))):X({jsonrpc:"2.0",id:n.id??Mf.take(),...n}),headers:{"Content-Type":"application/json",...c},method:u||"POST",signal:p||(i>0?m:null)},x=new Request(e,y),d=await o?.(x,y)??{...y,url:e};return await fetch(d.url??e,d)},{errorInstance:new Ys({body:n,url:e}),timeout:i,signal:!0});s&&await s(f);let l;if(f.headers.get("Content-Type")?.startsWith("application/json"))l=await f.json();else{l=await f.text();try{l=JSON.parse(l||"{}")}catch(m){if(f.ok)throw m;l={error:l}}}if(!f.ok)throw new bt({body:n,details:X(l.error)||f.statusText,headers:f.headers,status:f.status,url:e});return l}catch(f){throw f instanceof bt||f instanceof Ys?f:new bt({body:n,cause:f,url:e})}}}}function zf(e,t={}){let{batch:r,fetchOptions:n,key:o="http",methods:s,name:i="HTTP JSON-RPC",onFetchRequest:a,onFetchResponse:c,retryDelay:u,raw:p}=t;return({chain:f,retryCount:l,timeout:m})=>{let{batchSize:y=1e3,wait:x=0}=typeof r=="object"?r:{},d=t.retryCount??l,h=m??t.timeout??1e4,b=e||f?.rpcUrls.default.http[0];if(!b)throw new eu;let v=Vh(b,{fetchOptions:n,onRequest:a,onResponse:c,timeout:h});return Qc({key:o,methods:s,name:i,async request({method:A,params:k}){let S={method:A,params:k},{schedule:T}=Lc({id:b,wait:x,shouldSplitBatch(U){return U.length>y},fn:U=>v.request({body:U}),sort:(U,L)=>U.id-L.id}),B=async U=>r?T(U):[await v.request({body:U})],[{error:P,result:H}]=await B(S);if(p)return{error:P,result:H};if(P)throw new Fr({body:S,error:P,url:b});return H},retryCount:d,retryDelay:u,timeout:h,type:"http"},{fetchOptions:n,url:b})}}Jr();Zr();ct();$n();hn();V();qs();W();Nr();function ss(e,t){if(!(e instanceof g))return!1;let r=e.walk(n=>n instanceof vn);return r instanceof vn?!!(r.data?.errorName==="ResolverNotFound"||r.data?.errorName==="ResolverWildcardNotSupported"||r.data?.errorName==="ResolverNotContract"||r.data?.errorName==="ResolverError"||r.data?.errorName==="HttpError"||r.reason?.includes("Wildcard on non-extended resolvers is not supported")||t==="reverse"&&r.reason===Ma[50]):!1}qc();et();ze();V();Bt();St();function tu(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;let t=`0x${e.slice(1,65)}`;return we(t)?t:null}function is(e){let t=new Uint8Array(32).fill(0);if(!e)return te(t);let r=e.split(".");for(let n=r.length-1;n>=0;n-=1){let o=tu(r[n]),s=o?ht(o):ue(Pt(r[n]),"bytes");t=ue(Ze([t,s]),"bytes")}return te(t)}ze();function Gh(e){return`[${e.slice(2)}]`}ze();V();Bt();function Wh(e){let t=new Uint8Array(32).fill(0);return e?tu(e)||ue(Pt(e)):te(t)}function tn(e){let t=e.replace(/^\.|\.$/gm,"");if(t.length===0)return new Uint8Array(1);let r=new Uint8Array(Pt(t).byteLength+2),n=0,o=t.split(".");for(let s=0;s255&&(i=Pt(Gh(Wh(o[s])))),r[n]=i.length,r.set(i,n+1),n+=i.length+1}return r.byteLength!==n+1?r.slice(0,n+1):r}async function Kh(e,t){let{blockNumber:r,blockTag:n,coinType:o,name:s,gatewayUrls:i,strict:a}=t,{chain:c}=e,u=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Et({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})(),p=c?.ensTlds;if(p&&!p.some(f=>s.endsWith(f)))return null;try{let f=de({abi:Af,functionName:"addr",...o!=null?{args:[is(s),BigInt(o)]}:{args:[is(s)]}}),l={address:u,abi:_c,functionName:"resolve",args:[z(tn(s)),f,i??[ts]],blockNumber:r,blockTag:n},y=await $(e,je,"readContract")(l);if(y[0]==="0x")return null;let x=st({abi:Af,args:o!=null?[is(s),BigInt(o)]:void 0,functionName:"addr",data:y[0]});return x==="0x"||Ie(x)==="0x00"?null:x}catch(f){if(a)throw f;if(ss(f,"resolve"))return null;throw f}}W();var ru=class extends g{constructor({data:t}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(t)}`],name:"EnsAvatarInvalidMetadataError"})}},rn=class extends g{constructor({reason:t}){super(`ENS NFT avatar URI is invalid. ${t}`,{name:"EnsAvatarInvalidNftUriError"})}},as=class extends g{constructor({uri:t}){super(`Unable to resolve ENS avatar URI "${t}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}},nu=class extends g{constructor({namespace:t}){super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}};var s1=/(?https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,i1=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?[\w\-.]+))?(?\/.*)?$/,a1=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,c1=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function u1(e){try{let t=await fetch(e,{method:"HEAD"});return t.status===200?t.headers.get("content-type")?.startsWith("image/"):!1}catch(t){return typeof t=="object"&&typeof t.response<"u"||!globalThis.hasOwnProperty("Image")?!1:new Promise(r=>{let n=new Image;n.onload=()=>{r(!0)},n.onerror=()=>{r(!1)},n.src=e})}}function Yh(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function Uf({uri:e,gatewayUrls:t}){let r=a1.test(e);if(r)return{uri:e,isOnChain:!0,isEncoded:r};let n=Yh(t?.ipfs,"https://ipfs.io"),o=Yh(t?.arweave,"https://arweave.net"),s=e.match(s1),{protocol:i,subpath:a,target:c,subtarget:u=""}=s?.groups||{},p=i==="ipns:/"||a==="ipns/",f=i==="ipfs:/"||a==="ipfs/"||i1.test(e);if(e.startsWith("http")&&!p&&!f){let m=e;return t?.arweave&&(m=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:m,isOnChain:!1,isEncoded:!1}}if((p||f)&&c)return{uri:`${n}/${p?"ipns":"ipfs"}/${c}${u}`,isOnChain:!1,isEncoded:!1};if(i==="ar:/"&&c)return{uri:`${o}/${c}${u||""}`,isOnChain:!1,isEncoded:!1};let l=e.replace(c1,"");if(l.startsWith("o.json());return await ou({gatewayUrls:e,uri:Lf(r)})}catch{throw new as({uri:t})}}async function ou({gatewayUrls:e,uri:t}){let{uri:r,isOnChain:n}=Uf({uri:t,gatewayUrls:e});if(n||await u1(r))return r;throw new as({uri:t})}function Jh(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));let[r,n,o]=t.split("/"),[s,i]=r.split(":"),[a,c]=n.split(":");if(!s||s.toLowerCase()!=="eip155")throw new rn({reason:"Only EIP-155 supported"});if(!i)throw new rn({reason:"Chain ID not found"});if(!c)throw new rn({reason:"Contract address not found"});if(!o)throw new rn({reason:"Token ID not found"});if(!a)throw new rn({reason:"ERC namespace not found"});return{chainID:Number.parseInt(i),namespace:a.toLowerCase(),contractAddress:c,tokenID:o}}async function Xh(e,{nft:t}){if(t.namespace==="erc721")return je(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if(t.namespace==="erc1155")return je(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new nu({namespace:t.namespace})}async function Qh(e,{gatewayUrls:t,record:r}){return/eip155:/i.test(r)?p1(e,{gatewayUrls:t,record:r}):ou({uri:r,gatewayUrls:t})}async function p1(e,{gatewayUrls:t,record:r}){let n=Jh(r),o=await Xh(e,{nft:n}),{uri:s,isOnChain:i,isEncoded:a}=Uf({uri:o,gatewayUrls:t});if(i&&(s.includes("data:application/json;base64,")||s.startsWith("{"))){let u=a?atob(s.replace("data:application/json;base64,","")):s,p=JSON.parse(u);return ou({uri:Lf(p),gatewayUrls:t})}let c=n.tokenID;return n.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),Zh({gatewayUrls:t,uri:s.replace(/(?:0x)?{id}/,c)})}Jr();Zr();ct();$n();V();qc();async function su(e,t){let{blockNumber:r,blockTag:n,key:o,name:s,gatewayUrls:i,strict:a}=t,{chain:c}=e,u=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Et({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})(),p=c?.ensTlds;if(p&&!p.some(f=>s.endsWith(f)))return null;try{let f={address:u,abi:_c,functionName:"resolve",args:[z(tn(s)),de({abi:Ef,functionName:"text",args:[is(s),o]}),i??[ts]],blockNumber:r,blockTag:n},m=await $(e,je,"readContract")(f);if(m[0]==="0x")return null;let y=st({abi:Ef,functionName:"text",data:m[0]});return y===""?null:y}catch(f){if(a)throw f;if(ss(f,"resolve"))return null;throw f}}async function ey(e,{blockNumber:t,blockTag:r,assetGatewayUrls:n,name:o,gatewayUrls:s,strict:i,universalResolverAddress:a}){let c=await $(e,su,"getEnsText")({blockNumber:t,blockTag:r,key:"avatar",name:o,universalResolverAddress:a,gatewayUrls:s,strict:i});if(!c)return null;try{return await Qh(e,{record:c,gatewayUrls:n})}catch{return null}}Jr();$n();V();async function ty(e,{address:t,blockNumber:r,blockTag:n,gatewayUrls:o,strict:s,universalResolverAddress:i}){let a=i;if(!a){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");a=Et({blockNumber:r,chain:e.chain,contract:"ensUniversalResolver"})}let c=`${t.toLowerCase().substring(2)}.addr.reverse`;try{let u={address:a,abi:bh,functionName:"reverse",args:[z(tn(c))],blockNumber:r,blockTag:n},p=$(e,je,"readContract"),[f,l]=o?await p({...u,args:[...u.args,o]}):await p(u);return t.toLowerCase()!==l.toLowerCase()?null:f}catch(u){if(s)throw u;if(ss(u,"reverse"))return null;throw u}}$n();V();async function ry(e,t){let{blockNumber:r,blockTag:n,name:o}=t,{chain:s}=e,i=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!s)throw new Error("client chain not configured. universalResolverAddress is required.");return Et({blockNumber:r,chain:s,contract:"ensUniversalResolver"})})(),a=s?.ensTlds;if(a&&!a.some(u=>o.endsWith(u)))throw new Error(`${o} is not a valid ENS TLD (${a?.join(", ")}) for chain "${s.name}" (id: ${s.id}).`);let[c]=await $(e,je,"readContract")({address:i,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[z(tn(o))],blockNumber:r,blockTag:n});return c}rs();ve();V();Cf();si();Vr();Wr();async function iu(e,t){let{account:r=e.account,blockNumber:n,blockTag:o="latest",blobs:s,data:i,gas:a,gasPrice:c,maxFeePerBlobGas:u,maxFeePerGas:p,maxPriorityFeePerGas:f,to:l,value:m,...y}=t,x=r?K(r):void 0;try{ot(t);let h=(n?_(n):void 0)||o,b=e.chain?.formatters?.transactionRequest?.format,A=(b||lt)({...qr(y,{format:b}),from:x?.address,blobs:s,data:i,gas:a,gasPrice:c,maxFeePerBlobGas:u,maxFeePerGas:p,maxPriorityFeePerGas:f,to:l,value:m}),k=await e.request({method:"eth_createAccessList",params:[A,h]});return{accessList:k.accessList,gasUsed:BigInt(k.gasUsed)}}catch(d){throw zc(d,{...t,account:x,chain:e.chain})}}async function ny(e){let t=$r(e,{method:"eth_newBlockFilter"}),r=await e.request({method:"eth_newBlockFilter"});return{id:r,request:t(r),type:"block"}}V();async function au(e,{address:t,args:r,event:n,events:o,fromBlock:s,strict:i,toBlock:a}={}){let c=o??(n?[n]:void 0),u=$r(e,{method:"eth_newFilter"}),p=[];c&&(p=[c.flatMap(m=>qt({abi:[m],eventName:m.name,args:r}))],n&&(p=p[0]));let f=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:typeof s=="bigint"?_(s):s,toBlock:typeof a=="bigint"?_(a):a,...p.length?{topics:p}:{}}]});return{abi:c,args:r,eventName:n?n.name:void 0,fromBlock:s,id:f,request:u(f),strict:!!i,toBlock:a,type:"event"}}async function cu(e){let t=$r(e,{method:"eth_newPendingTransactionFilter"}),r=await e.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:t(r),type:"transaction"}}async function oy(e){let t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}He();V();async function sy(e,{blockHash:t,blockNumber:r,blockTag:n="latest"}={}){let o=r!==void 0?_(r):void 0,s;return t?s=await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:!0}):s=await e.request({method:"eth_getBlockTransactionCountByNumber",params:[o||n]},{dedupe:!!o}),xe(s)}V();async function Hf(e,{address:t,blockNumber:r,blockTag:n="latest"}){let o=r!==void 0?_(r):void 0,s=await e.request({method:"eth_getCode",params:[t,o||n]},{dedupe:!!o});if(s!=="0x")return s}W();var uu=class extends g{constructor({address:t}){super(`No EIP-712 domain found on contract "${t}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${t}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}};async function iy(e,t){let{address:r,factory:n,factoryData:o}=t;try{let[s,i,a,c,u,p,f]=await $(e,je,"readContract")({abi:f1,address:r,functionName:"eip712Domain",factory:n,factoryData:o});return{domain:{name:i,version:a,chainId:Number(c),verifyingContract:u,salt:p},extensions:f,fields:s}}catch(s){let i=s;throw i.name==="ContractFunctionExecutionError"&&i.cause.name==="ContractFunctionZeroDataError"?new uu({address:r}):i}}var f1=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];V();function ay(e){return{baseFeePerGas:e.baseFeePerGas.map(t=>BigInt(t)),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:e.reward?.map(t=>t.map(r=>BigInt(r)))}}async function cy(e,{blockCount:t,blockNumber:r,blockTag:n="latest",rewardPercentiles:o}){let s=r?_(r):void 0,i=await e.request({method:"eth_feeHistory",params:[_(t),s||n,o]},{dedupe:!!s});return ay(i)}async function uy(e,{filter:t}){let r=t.strict??!1,o=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(s=>We(s));return t.abi?Jo({abi:t.abi,logs:o,strict:r}):o}V();function py(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}ye();Rt();qe();W();var pu=class extends g{constructor({domain:t}){super(`Invalid domain "${X(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}},fu=class extends g{constructor({primaryType:t,types:r}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(r))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}},lu=class extends g{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}};yt();mt();V();Np();Dt();et();V();Bt();function fy(e){let{domain:t={},message:r,primaryType:n}=e,o={EIP712Domain:du({domain:t}),...e.types};mu({domain:t,message:r,primaryType:n,types:o});let s=["0x1901"];return t&&s.push(l1({domain:t,types:o})),n!=="EIP712Domain"&&s.push(ly({data:r,primaryType:n,types:o})),ue(Ze(s))}function l1({domain:e,types:t}){return ly({data:e,primaryType:"EIP712Domain",types:t})}function ly({data:e,primaryType:t,types:r}){let n=my({data:e,primaryType:t,types:r});return ue(n)}function my({data:e,primaryType:t,types:r}){let n=[{type:"bytes32"}],o=[m1({primaryType:t,types:r})];for(let s of r[t]){let[i,a]=hy({types:r,name:s.name,type:s.type,value:e[s.name]});n.push(i),o.push(a)}return De(n,o)}function m1({primaryType:e,types:t}){let r=z(d1({primaryType:e,types:t}));return ue(r)}function d1({primaryType:e,types:t}){let r="",n=dy({primaryType:e,types:t});n.delete(e);let o=[e,...Array.from(n).sort()];for(let s of o)r+=`${s}(${t[s].map(({name:i,type:a})=>`${a} ${i}`).join(",")})`;return r}function dy({primaryType:e,types:t},r=new Set){let o=e.match(/^\w*/u)?.[0];if(r.has(o)||t[o]===void 0)return r;r.add(o);for(let s of t[o])dy({primaryType:s.type,types:t},r);return r}function hy({types:e,name:t,type:r,value:n}){if(e[r]!==void 0)return[{type:"bytes32"},ue(my({data:n,primaryType:r,types:e}))];if(r==="bytes")return n=`0x${(n.length%2?"0":"")+n.slice(2)}`,[{type:"bytes32"},ue(n)];if(r==="string")return[{type:"bytes32"},ue(z(n))];if(r.lastIndexOf("]")===r.length-1){let o=r.slice(0,r.lastIndexOf("[")),s=n.map(i=>hy({name:t,type:o,types:e,value:i}));return[{type:"bytes32"},ue(De(s.map(([i])=>i),s.map(([,i])=>i)))]}return[{type:r},n]}qe();function yy(e){let{domain:t,message:r,primaryType:n,types:o}=e,s=(c,u)=>{let p={...u};for(let f of c){let{name:l,type:m}=f;m==="address"&&(p[l]=p[l].toLowerCase())}return p},i=o.EIP712Domain?t?s(o.EIP712Domain,t):{}:{},a=(()=>{if(n!=="EIP712Domain")return s(o[n],r)})();return X({domain:i,message:a,primaryType:n,types:o})}function mu(e){let{domain:t,message:r,primaryType:n,types:o}=e,s=(i,a)=>{for(let c of i){let{name:u,type:p}=c,f=a[u],l=p.match(Na);if(l&&(typeof f=="number"||typeof f=="bigint")){let[x,d,h]=l;_(f,{signed:d==="int",size:Number.parseInt(h)/8})}if(p==="address"&&typeof f=="string"&&!re(f))throw new ae({address:f});let m=p.match(Wm);if(m){let[x,d]=m;if(d&&ee(f)!==Number.parseInt(d))throw new xa({expectedSize:Number.parseInt(d),givenSize:ee(f)})}let y=o[p];y&&(h1(p),s(y,f))}};if(o.EIP712Domain&&t){if(typeof t!="object")throw new pu({domain:t});s(o.EIP712Domain,t)}if(n!=="EIP712Domain")if(o[n])s(o[n],r);else throw new fu({primaryType:n,types:o})}function du({domain:e}){return[typeof e?.name=="string"&&{name:"name",type:"string"},e?.version&&{name:"version",type:"string"},(typeof e?.chainId=="number"||typeof e?.chainId=="bigint")&&{name:"chainId",type:"uint256"},e?.verifyingContract&&{name:"verifyingContract",type:"address"},e?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}function h1(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new lu({type:e})}ct();V();_t();et();hn();V();gc();Rt();W();Qo();hr();yt();mt();Rr();He();function xy(e){let{authorizationList:t}=e;if(t)for(let r of t){let{chainId:n}=r,o=r.address;if(!re(o))throw new ae({address:o});if(n<0)throw new yr({chainId:n})}hu(e)}function by(e){let{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new Wo;for(let r of t){let n=ee(r),o=xe(xt(r,0,1));if(n!==32)throw new Sc({hash:r,size:n});if(o!==1)throw new Cc({hash:r,version:o})}}hu(e)}function hu(e){let{chainId:t,maxPriorityFeePerGas:r,maxFeePerGas:n,to:o}=e;if(t<=0)throw new yr({chainId:t});if(o&&!re(o))throw new ae({address:o});if(n&&n>Gr)throw new nt({maxFeePerGas:n});if(r&&n&&r>n)throw new gt({maxFeePerGas:n,maxPriorityFeePerGas:r})}function gy(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:o,to:s}=e;if(t<=0)throw new yr({chainId:t});if(s&&!re(s))throw new ae({address:s});if(r||o)throw new g("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(n&&n>Gr)throw new nt({maxFeePerGas:n})}function wy(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:o,to:s}=e;if(s&&!re(s))throw new ae({address:s});if(typeof t<"u"&&t<=0)throw new yr({chainId:t});if(r||o)throw new g("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(n&&n>Gr)throw new nt({maxFeePerGas:n})}Rt();_t();yt();function Nn(e){if(!e||e.length===0)return[];let t=[];for(let r=0;r"u"||typeof m>"u")){let v=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(S=>te(S)),A=e.kzg,k=Vo({blobs:v,kzg:A});if(typeof l>"u"&&(l=Ac({commitments:k})),typeof m>"u"){let S=Go({blobs:v,commitments:k,kzg:A});m=Ic({blobs:v,commitments:k,proofs:S})}}let y=Nn(p),x=[z(r),o?z(o):"0x",u?z(u):"0x",c?z(c):"0x",n?z(n):"0x",s??"0x",i?z(i):"0x",f??"0x",y,a?z(a):"0x",l??[],...nn(e,t)],d=[],h=[],b=[];if(m)for(let v=0;v{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(r>0)return BigInt(r*2)+BigInt(35n+t.v-27n);let m=27n+(t.v===27n?0n:1n);if(t.v!==m)throw new Ka({v:t.v});return m})(),f=Ie(t.r),l=Ie(t.s);u=[...u,z(p),f==="0x00"?"0x":f,l==="0x00"?"0x":l]}else r>0&&(u=[...u,z(r),"0x","0x"]);return ft(u)}function nn(e,t){let r=t??e,{v:n,yParity:o}=r;if(typeof r.r>"u")return[];if(typeof r.s>"u")return[];if(typeof n>"u"&&typeof o>"u")return[];let s=Ie(r.r),i=Ie(r.s);return[typeof o=="number"?o?z(1):"0x":n===0n?"0x":n===1n?z(1):n===27n?"0x":z(1),s==="0x00"?"0x":s,i==="0x00"?"0x":i]}function Ey(e){if(!e||e.length===0)return[];let t=[];for(let r of e){let{chainId:n,nonce:o,...s}=r,i=r.address;t.push([n?z(n):"0x",i,o?z(o):"0x",...nn({},s)])}return t}He();Bt();var Ay=`Ethereum Signed Message: +`;et();mt();V();function Ty(e){let t=typeof e=="string"?Lt(e):typeof e.raw=="string"?e.raw:te(e.raw),r=Lt(`${Ay}${ee(t)}`);return Ze([r,t])}function yu(e,t){return ue(Ty(e),t)}var xu="0x6492649264926492649264926492649264926492649264926492649264926492";Rr();function Sy(e){return $p(e,-32)===xu}Dt();et();ze();function Cy(e){let{address:t,data:r,signature:n,to:o="hex"}=e,s=Te([De([{type:"address"},{type:"bytes"},{type:"bytes"}],[t,r,n]),xu]);return o==="hex"?s:Pe(s)}W();var bu=class extends g{constructor({value:t}){super(`Number \`${t}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}};function Iy(e,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(e))throw new bu({value:e});let[r,n="0"]=e.split("."),o=r.startsWith("-");if(o&&(r=r.slice(1)),n=n.replace(/(0+)$/,""),t===0)Math.round(+`.${n}`)===1&&(r=`${BigInt(r)+1n}`),n="";else if(n.length>t){let[s,i,a]=[n.slice(0,t-1),n.slice(t-1,t),n.slice(t)],c=Math.round(+`${i}.${a}`);c>9?n=`${BigInt(s)+BigInt(1)}0`.padStart(s.length+1,"0"):n=`${s}${c}`,n.length>t&&(n=n.slice(1),r=`${BigInt(r)+1n}`),n=n.slice(0,t)}else n=n.padEnd(t,"0");return BigInt(`${o?"-":""}${r}${n}`)}ja();function cs(e,t="wei"){return Iy(e,Da[t])}function v1(e){return e.map(t=>({...t,value:BigInt(t.value)}))}function Py(e){return{...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?xe(e.nonce):void 0,storageProof:e.storageProof?v1(e.storageProof):void 0}}async function ky(e,{address:t,blockNumber:r,blockTag:n,storageKeys:o}){let s=n??"latest",i=r!==void 0?_(r):void 0,a=await e.request({method:"eth_getProof",params:[t,o,i||s]});return Py(a)}V();async function By(e,{address:t,blockNumber:r,blockTag:n="latest",slot:o}){let s=r!==void 0?_(r):void 0;return await e.request({method:"eth_getStorageAt",params:[t,o,s||n]})}_t();V();async function us(e,{blockHash:t,blockNumber:r,blockTag:n,hash:o,index:s}){let i=n||"latest",a=r!==void 0?_(r):void 0,c=null;if(o?c=await e.request({method:"eth_getTransactionByHash",params:[o]},{dedupe:!0}):t?c=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,_(s)]},{dedupe:!0}):(a||i)&&(c=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[a||i,_(s)]},{dedupe:!!a})),!c)throw new oo({blockHash:t,blockNumber:r,blockTag:i,hash:o,index:s});return(e.chain?.formatters?.transaction?.format||Bn)(c)}async function Ry(e,{hash:t,transactionReceipt:r}){let[n,o]=await Promise.all([$(e,Jt,"getBlockNumber")({}),t?$(e,us,"getTransaction")({hash:t}):void 0]),s=r?.blockNumber||o?.blockNumber;return s?n-s+1n:0n}_t();async function fi(e,{hash:t}){let r=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!r)throw new so({hash:t});return(e.chain?.formatters?.transactionReceipt?.format||Lh)(r)}Jr();ye();W();Nr();Zr();ct();$n();async function _y(e,t){let{allowFailure:r=!0,batchSize:n,blockNumber:o,blockTag:s,multicallAddress:i,stateOverride:a}=t,c=t.contracts,u=n??(typeof e.batch?.multicall=="object"&&e.batch.multicall.batchSize||1024),p=i;if(!p){if(!e.chain)throw new Error("client chain not configured. multicallAddress is required.");p=Et({blockNumber:o,chain:e.chain,contract:"multicall3"})}let f=[[]],l=0,m=0;for(let d=0;d0&&m>u&&f[l].length>0&&(l++,m=(k.length-2)/2,f[l]=[]),f[l]=[...f[l],{allowFailure:!0,callData:k,target:b}]}catch(k){let S=ut(k,{abi:h,address:b,args:v,docsPath:"/docs/contract/multicall",functionName:A});if(!r)throw S;f[l]=[...f[l],{allowFailure:!0,callData:"0x",target:b}]}}let y=await Promise.allSettled(f.map(d=>$(e,je,"readContract")({abi:ai,address:p,args:[d],blockNumber:o,blockTag:s,functionName:"aggregate3",stateOverride:a}))),x=[];for(let d=0;d{if(r.cause instanceof e){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause?.message?r.cause.message:r.details})(),o=r.cause instanceof e&&r.cause.docsPath||r.docsPath,i=`https://oxlib.sh${o??""}`,a=[t||"An error occurred.",...r.metaMessages?["",...r.metaMessages]:[],...n||o?["",n?`Details: ${n}`:void 0,o?`See: ${i}`:void 0]:[]].filter(c=>typeof c=="string").join(` +`);super(a,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{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,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:`ox@${Ny()}`}),this.cause=r.cause,this.details=n,this.docs=i,this.docsPath=o,this.shortMessage=t}walk(t){return Fy(this,t)}};function Fy(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?Fy(e.cause,t):t?null:e}var E1="#__bigint";function Oy(e,t,r){return JSON.stringify(e,(n,o)=>typeof t=="function"?t(n,o):typeof o=="bigint"?o.toString()+E1:o,r)}function My(e,t){if(Df(e)>t)throw new gu({givenSize:Df(e),maxSize:t})}var xr={zero:48,nine:57,A:65,F:70,a:97,f:102};function jf(e){if(e>=xr.zero&&e<=xr.nine)return e-xr.zero;if(e>=xr.A&&e<=xr.F)return e-(xr.A-10);if(e>=xr.a&&e<=xr.f)return e-(xr.a-10)}function zy(e,t={}){let{dir:r,size:n=32}=t;if(n===0)return e;if(e.length>n)throw new wu({size:e.length,targetSize:n,type:"Bytes"});let o=new Uint8Array(n);for(let s=0;st)throw new vu({givenSize:Le(e),maxSize:t})}function Uy(e,t){if(typeof t=="number"&&t>0&&t>Le(e)-1)throw new mi({offset:t,position:"start",size:Le(e)})}function Ly(e,t,r){if(typeof t=="number"&&typeof r=="number"&&Le(e)!==r-t)throw new mi({offset:r,position:"end",size:Le(e)})}function Vf(e,t={}){let{dir:r,size:n=32}=t;if(n===0)return e;let o=e.replace("0x","");if(o.length>n*2)throw new Eu({size:Math.ceil(o.length/2),targetSize:n,type:"Hex"});return`0x${o[r==="right"?"padEnd":"padStart"](n*2,"0")}`}var S1=new TextEncoder;function Dy(e){return e instanceof Uint8Array?e:typeof e=="string"?I1(e):C1(e)}function C1(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function I1(e,t={}){let{size:r}=t,n=e;r&&(li(e,r),n=Qt(e,r));let o=n.slice(2);o.length%2&&(o=`0${o}`);let s=o.length/2,i=new Uint8Array(s);for(let a=0,c=0;at.toString(16).padStart(2,"0"));function R1(e,t={}){let{strict:r=!1}=t;if(!e)throw new Au(e);if(typeof e!="string")throw new Au(e);if(r&&!/^0x[0-9a-fA-F]*$/.test(e))throw new Tu(e);if(!e.startsWith("0x"))throw new Tu(e)}function it(...e){return`0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}function Su(e,t={}){let r=`0x${Number(e)}`;return typeof t.size=="number"?(li(r,t.size),br(r,t.size)):r}function ps(e,t={}){let r="";for(let o=0;os||o{let h=d,b=h.account?K(h.account):void 0,v={...h,data:h.abi?de(h):h.data,from:h.from??b?.address};return ot(v),lt(v)}),x=l.stateOverrides?Ho(l.stateOverrides):void 0;c.push({blockOverrides:m,calls:y,stateOverrides:x})}let p=(r?_(r):void 0)||n;return(await e.request({method:"eth_simulateV1",params:[{blockStateCalls:c,returnFullTransactions:s,traceTransfers:i,validation:a},p]})).map((l,m)=>({...ii(l),calls:l.calls.map((y,x)=>{let{abi:d,args:h,functionName:b,to:v}=o[m].calls[x],A=y.error?.data??y.returnData,k=BigInt(y.gasUsed),S=y.logs?.map(H=>We(H)),T=y.status==="0x1"?"success":"failure",B=d&&T==="success"&&A!=="0x"?st({abi:d,data:A,functionName:b}):null,P=(()=>{if(T==="success")return;let H;if(y.error?.data==="0x"?H=new dt:y.error&&(H=new Gt(y.error)),!!H)return ut(H,{abi:d??[],address:v,args:h,functionName:b??""})})();return{data:A,gasUsed:k,logs:S,status:T,...T==="success"?{result:B}:{error:P}}})}))}catch(c){let u=c,p=jr(u,{});throw p instanceof wt?u:p}}aa();function Wf(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function N1(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function yi(e,...t){if(!N1(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function Kf(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 Gy(e,t){yi(e);let r=t.outputLen;if(e.length>>8&65280|e>>>24&255}function Zf(e){for(let t=0;te().update(Iu(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function Yy(e){let t=(n,o)=>e(o).update(Iu(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}var Pu=BigInt(4294967295),Zy=BigInt(32);function M1(e,t=!1){return t?{h:Number(e&Pu),l:Number(e>>Zy&Pu)}:{h:Number(e>>Zy&Pu)|0,l:Number(e&Pu)|0}}function Jy(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;oe<>>32-r,Qy=(e,t,r)=>t<>>32-r,ex=(e,t,r)=>t<>>64-r,tx=(e,t,r)=>e<>>64-r;var ox=[],sx=[],ix=[],z1=BigInt(0),xi=BigInt(1),U1=BigInt(2),L1=BigInt(7),H1=BigInt(256),D1=BigInt(113);for(let e=0,t=xi,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],ox.push(2*(5*n+r)),sx.push((e+1)*(e+2)/2%64);let o=z1;for(let s=0;s<7;s++)t=(t<>L1)*D1)%H1,t&U1&&(o^=xi<<(xi<r>32?ex(e,t,r):Xy(e,t,r),nx=(e,t,r)=>r>32?tx(e,t,r):Qy(e,t,r);function V1(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let i=0;i<10;i++)r[i]=e[i]^e[i+10]^e[i+20]^e[i+30]^e[i+40];for(let i=0;i<10;i+=2){let a=(i+8)%10,c=(i+2)%10,u=r[c],p=r[c+1],f=rx(u,p,1)^r[a],l=nx(u,p,1)^r[a+1];for(let m=0;m<50;m+=10)e[i+m]^=f,e[i+m+1]^=l}let o=e[2],s=e[3];for(let i=0;i<24;i++){let a=sx[i],c=rx(o,s,a),u=nx(o,s,a),p=ox[i];o=e[p],s=e[p+1],e[p]=c,e[p+1]=u}for(let i=0;i<50;i+=10){for(let a=0;a<10;a++)r[a]=e[i+a];for(let a=0;a<10;a++)e[i+a]^=~r[(a+2)%10]&r[(a+4)%10]}e[0]^=j1[n],e[1]^=q1[n]}r.fill(0)}var ku=class e extends Cu{constructor(t,r,n,o=!1,s=24){if(super(),this.blockLen=t,this.suffix=r,this.outputLen=n,this.enableXOF=o,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Wf(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Wy(this.state)}keccak(){Yf||Zf(this.state32),V1(this.state32,this.rounds),Yf||Zf(this.state32),this.posOut=0,this.pos=0}update(t){Kf(this);let{blockLen:r,state:n}=this;t=Iu(t);let o=t.length;for(let s=0;s=n&&this.keccak();let i=Math.min(n-this.posOut,s-o);t.set(r.subarray(this.posOut,this.posOut+i),o),this.posOut+=i,o+=i}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return Wf(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(Gy(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:r,suffix:n,outputLen:o,rounds:s,enableXOF:i}=this;return t||(t=new e(r,n,o,i,s)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=s,t.suffix=n,t.outputLen=o,t.enableXOF=i,t.destroyed=this.destroyed,t}},on=(e,t,r)=>Ky(()=>new ku(t,e,r)),iM=on(6,144,224/8),aM=on(6,136,256/8),cM=on(6,104,384/8),uM=on(6,72,512/8),pM=on(1,144,224/8),ax=on(1,136,256/8),fM=on(1,104,384/8),lM=on(1,72,512/8),cx=(e,t,r)=>Yy((n={})=>new ku(t,e,n.dkLen===void 0?r:n.dkLen,!0)),mM=cx(31,168,128/8),dM=cx(31,136,256/8);function Bu(e,t={}){let{as:r=typeof e=="string"?"Hex":"Bytes"}=t,n=ax(Dy(e));return r==="Bytes"?n:ps(n)}var Ru=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){let r=super.get(t);return super.has(t)&&r!==void 0&&(this.delete(t),super.set(t,r)),r}set(t,r){if(super.set(t,r),this.maxSize&&this.size>this.maxSize){let n=this.keys().next().value;n&&this.delete(n)}return this}};var G1={checksum:new Ru(8192)},_u=G1.checksum;var K1=/^0x[a-fA-F0-9]{40}$/;function ms(e,t={}){let{strict:r=!0}=t;if(!K1.test(e))throw new $u({address:e,cause:new Jf});if(r){if(e.toLowerCase()===e)return;if(px(e)!==e)throw new $u({address:e,cause:new Xf})}}function px(e){if(_u.has(e))return _u.get(e);ms(e,{strict:!1});let t=e.substring(2).toLowerCase(),r=Bu(jy(t),{as:"Bytes"}),n=t.split("");for(let s=0;s<40;s+=2)r[s>>1]>>4>=8&&n[s]&&(n[s]=n[s].toUpperCase()),(r[s>>1]&15)>=8&&n[s+1]&&(n[s+1]=n[s+1].toUpperCase());let o=`0x${n.join("")}`;return _u.set(e,o),o}function Nu(e,t={}){let{strict:r=!0}=t??{};try{return ms(e,{strict:r}),!0}catch{return!1}}var $u=class extends oe{constructor({address:t,cause:r}){super(`Address "${t}" is invalid.`,{cause:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}},Jf=class extends oe{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}},Xf=class extends oe{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}};function Ou(e){let t=!0,r="",n=0,o="",s=!1;for(let i=0;iFu(Object.values(e)[s],o)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(n)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?r==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)?Array.isArray(e)&&e.every(o=>Fu(o,{...t,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function el(e,t,r){for(let n in e){let o=e[n],s=t[n];if(o.type==="tuple"&&s.type==="tuple"&&"components"in o&&"components"in s)return el(o.components,s.components,r[n]);let i=[o.type,s.type];if(i.includes("address")&&i.includes("bytes20")?!0:i.includes("address")&&i.includes("string")?Nu(r[n],{strict:!1}):i.includes("address")&&i.includes("bytes")?Nu(r[n],{strict:!1}):!1)return i}}function Mu(e,t={}){let{prepare:r=!0}=t,n=Array.isArray(e)?ia(e):typeof e=="string"?ia(e):e;return{...n,...r?{hash:ds(n)}:{}}}function fx(e,t,r){let{args:n=[],prepare:o=!0}=r??{},s=Gf(t,{strict:!1}),i=e.filter(u=>s?u.type==="function"||u.type==="error"?rl(u)===ls(t,0,4):u.type==="event"?ds(u)===t:!1:"name"in u&&u.name===t);if(i.length===0)throw new On({name:t});if(i.length===1)return{...i[0],...o?{hash:ds(i[0])}:{}};let a;for(let u of i){if(!("inputs"in u))continue;if(!n||n.length===0){if(!u.inputs||u.inputs.length===0)return{...u,...o?{hash:ds(u)}:{}};continue}if(!u.inputs||u.inputs.length===0||u.inputs.length!==n.length)continue;if(n.every((f,l)=>{let m="inputs"in u&&u.inputs[l];return m?Fu(f,m):!1})){if(a&&"inputs"in a&&a.inputs){let f=el(u.inputs,a.inputs,n);if(f)throw new tl({abiItem:u,type:f[0]},{abiItem:a,type:f[1]})}a=u}}let c=(()=>{if(a)return a;let[u,...p]=i;return{...u,overloads:p}})();if(!c)throw new On({name:t});return{...c,...o?{hash:ds(c)}:{}}}function rl(e){return ls(ds(e),0,4)}function Z1(e){let t=typeof e=="string"?e:dn(e);return Ou(t)}function ds(e){return typeof e!="string"&&"hash"in e&&e.hash?e.hash:Bu(fs(Z1(e)))}var tl=class extends oe{constructor(t,r){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${t.type}\` in \`${Ou(dn(t.abiItem))}\`, and`,`\`${r.type}\` in \`${Ou(dn(r.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}},On=class extends oe{constructor({name:t,data:r,type:n="item"}){let o=t?` with name "${t}"`:r?` with data "${r}"`:"";super(`ABI ${n}${o} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}};var mx=/^(.*)\[([0-9]*)\]$/,dx=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,zu=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,gM=2n**(8n-1n)-1n,wM=2n**(16n-1n)-1n,vM=2n**(24n-1n)-1n,EM=2n**(32n-1n)-1n,AM=2n**(40n-1n)-1n,TM=2n**(48n-1n)-1n,SM=2n**(56n-1n)-1n,CM=2n**(64n-1n)-1n,IM=2n**(72n-1n)-1n,PM=2n**(80n-1n)-1n,kM=2n**(88n-1n)-1n,BM=2n**(96n-1n)-1n,RM=2n**(104n-1n)-1n,_M=2n**(112n-1n)-1n,$M=2n**(120n-1n)-1n,NM=2n**(128n-1n)-1n,FM=2n**(136n-1n)-1n,OM=2n**(144n-1n)-1n,MM=2n**(152n-1n)-1n,zM=2n**(160n-1n)-1n,UM=2n**(168n-1n)-1n,LM=2n**(176n-1n)-1n,HM=2n**(184n-1n)-1n,DM=2n**(192n-1n)-1n,jM=2n**(200n-1n)-1n,qM=2n**(208n-1n)-1n,VM=2n**(216n-1n)-1n,GM=2n**(224n-1n)-1n,WM=2n**(232n-1n)-1n,KM=2n**(240n-1n)-1n,YM=2n**(248n-1n)-1n,ZM=2n**(256n-1n)-1n,JM=-(2n**(8n-1n)),XM=-(2n**(16n-1n)),QM=-(2n**(24n-1n)),ez=-(2n**(32n-1n)),tz=-(2n**(40n-1n)),rz=-(2n**(48n-1n)),nz=-(2n**(56n-1n)),oz=-(2n**(64n-1n)),sz=-(2n**(72n-1n)),iz=-(2n**(80n-1n)),az=-(2n**(88n-1n)),cz=-(2n**(96n-1n)),uz=-(2n**(104n-1n)),pz=-(2n**(112n-1n)),fz=-(2n**(120n-1n)),lz=-(2n**(128n-1n)),mz=-(2n**(136n-1n)),dz=-(2n**(144n-1n)),hz=-(2n**(152n-1n)),yz=-(2n**(160n-1n)),xz=-(2n**(168n-1n)),bz=-(2n**(176n-1n)),gz=-(2n**(184n-1n)),wz=-(2n**(192n-1n)),vz=-(2n**(200n-1n)),Ez=-(2n**(208n-1n)),Az=-(2n**(216n-1n)),Tz=-(2n**(224n-1n)),Sz=-(2n**(232n-1n)),Cz=-(2n**(240n-1n)),Iz=-(2n**(248n-1n)),Pz=-(2n**(256n-1n)),kz=2n**8n-1n,Bz=2n**16n-1n,Rz=2n**24n-1n,_z=2n**32n-1n,$z=2n**40n-1n,Nz=2n**48n-1n,Fz=2n**56n-1n,Oz=2n**64n-1n,Mz=2n**72n-1n,zz=2n**80n-1n,Uz=2n**88n-1n,Lz=2n**96n-1n,Hz=2n**104n-1n,Dz=2n**112n-1n,jz=2n**120n-1n,qz=2n**128n-1n,Vz=2n**136n-1n,Gz=2n**144n-1n,Wz=2n**152n-1n,Kz=2n**160n-1n,Yz=2n**168n-1n,Zz=2n**176n-1n,Jz=2n**184n-1n,Xz=2n**192n-1n,Qz=2n**200n-1n,eU=2n**208n-1n,tU=2n**216n-1n,rU=2n**224n-1n,nU=2n**232n-1n,oU=2n**240n-1n,sU=2n**248n-1n,iU=2n**256n-1n;function hx({checksumAddress:e,parameters:t,values:r}){let n=[];for(let o=0;o0?it(u,c):u}}if(i)return{dynamic:!0,encoded:c}}return{dynamic:!1,encoded:it(...a.map(({encoded:c})=>c))}}function ew(e,{type:t}){let[,r]=t.split("bytes"),n=Le(e);if(!r){let o=e;return n%32!==0&&(o=Qt(o,Math.ceil((e.length-2)/2/32)*32)),{dynamic:!0,encoded:it(br(Se(n,{size:32})),o)}}if(n!==Number.parseInt(r))throw new bi({expectedSize:Number.parseInt(r),value:e});return{dynamic:!1,encoded:Qt(e)}}function tw(e){if(typeof e!="boolean")throw new oe(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:br(Su(e))}}function rw(e,{signed:t,size:r}){if(typeof r=="number"){let n=2n**(BigInt(r)-(t?1n:0n))-1n,o=t?-n-1n:0n;if(e>n||ei))}}function sw(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function ju(e,t,r){let{checksumAddress:n=!1}=r??{};if(e.length!==t.length)throw new Du({expectedLength:e.length,givenLength:t.length});let o=hx({checksumAddress:n,parameters:e,values:t}),s=Uu(o);return s.length===0?"0x":s}function sl(e,t){if(e.length!==t.length)throw new Du({expectedLength:e.length,givenLength:t.length});let r=[];for(let n=0;n0?ju(n.inputs,t[0]):void 0;return s?it(o,s):o}function Mn(e,t={}){return Mu(e,t)}function uw(e,t,r){let n=fx(e,t,r);if(n.type!=="function")throw new On({name:t,type:"function"});return n}function pw(e){return rl(e)}ve();var gx="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",Nt="0x0000000000000000000000000000000000000000";Nc();W();ct();var lw="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function wx(e,t){let{blockNumber:r,blockTag:n,calls:o,stateOverrides:s,traceAssetChanges:i,traceTransfers:a,validation:c}=t,u=t.account?K(t.account):void 0;if(i&&!u)throw new g("`account` is required when `traceAssetChanges` is true");let p=u?yx(xx("constructor(bytes, bytes)"),{bytecode:$c,args:[lw,bx(Mn("function getBalance(address)"),[u.address])]}):void 0,f=i?await Promise.all(t.calls.map(async F=>{if(!F.data&&!F.abi)return;let{accessList:Q}=await iu(e,{account:u.address,...F,data:F.abi?de(F):F.data});return Q.map(({address:fe,storageKeys:w})=>w.length>0?fe:null)})).then(F=>F.flat().filter(Boolean)):[],l=s?.map(F=>F.address===u?.address?{...F,nonce:0}:F),m=await hi(e,{blockNumber:r,blockTag:n,blocks:[...i?[{calls:[{data:p}],stateOverrides:s},{calls:f.map((F,Q)=>({abi:[Mn("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[u.address],to:F,from:Nt,nonce:Q})),stateOverrides:[{address:Nt,nonce:0}]}]:[],{calls:[...o,{}].map((F,Q)=>({...F,from:u?.address,nonce:Q})),stateOverrides:l},...i?[{calls:[{data:p}]},{calls:f.map((F,Q)=>({abi:[Mn("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[u.address],to:F,from:Nt,nonce:Q})),stateOverrides:[{address:Nt,nonce:0}]},{calls:f.map((F,Q)=>({to:F,abi:[Mn("function decimals() returns (uint256)")],functionName:"decimals",from:Nt,nonce:Q})),stateOverrides:[{address:Nt,nonce:0}]},{calls:f.map((F,Q)=>({to:F,abi:[Mn("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:Nt,nonce:Q})),stateOverrides:[{address:Nt,nonce:0}]},{calls:f.map((F,Q)=>({to:F,abi:[Mn("function symbol() returns (string)")],functionName:"symbol",from:Nt,nonce:Q})),stateOverrides:[{address:Nt,nonce:0}]}]:[]],traceTransfers:a,validation:c}),y=i?m[2]:m[0],[x,d,,h,b,v,A,k]=i?m:[],{calls:S,...T}=y,B=S.slice(0,-1)??[],P=x?.calls??[],H=d?.calls??[],U=[...P,...H].map(F=>F.status==="success"?he(F.data):null),L=h?.calls??[],ne=b?.calls??[],R=[...L,...ne].map(F=>F.status==="success"?he(F.data):null),O=(v?.calls??[]).map(F=>F.status==="success"?F.result:null),N=(k?.calls??[]).map(F=>F.status==="success"?F.result:null),q=(A?.calls??[]).map(F=>F.status==="success"?F.result:null),D=[];for(let[F,Q]of R.entries()){let fe=U[F];if(typeof Q!="bigint"||typeof fe!="bigint")continue;let w=O[F-1],I=N[F-1],G=q[F-1],Z=F===0?{address:gx,decimals:18,symbol:"ETH"}:{address:f[F-1],decimals:G||w?Number(w??1):void 0,symbol:I??void 0};D.some(Y=>Y.token.address===Z.address)||D.push({token:Z,value:{pre:fe,post:Q,diff:Q-fe}})}return{assetChanges:D,block:T,results:B}}Jr();Nc();Nr();Mc();bn();Yo();St();V();xf();He();ze();function vx({r:e,s:t,to:r="hex",v:n,yParity:o}){let s=(()=>{if(o===0||o===1)return o;if(n&&(n===27n||n===28n||n>=35n))return n%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),i=`0x${new kn.Signature(he(e),he(t)).toCompactHex()}${s===0?"1b":"1c"}`;return r==="hex"?i:Pe(i)}rs();async function hs(e,t){let{address:r,factory:n,factoryData:o,hash:s,signature:i,universalSignatureVerifierAddress:a=e.chain?.contracts?.universalSignatureVerifier?.address,...c}=t,u=we(i)?i:typeof i=="object"&&"r"in i&&"s"in i?vx(i):te(i),p=await(async()=>!n&&!o||Sy(u)?u:Cy({address:n,data:o,signature:u}))();try{let f=a?{to:a,data:de({abi:Tf,functionName:"isValidSig",args:[r,s,p]}),...c}:{data:_n({abi:Tf,args:[r,s,p],bytecode:Eh}),...c},{data:l}=await $(e,Zt,"call")(f);return Sp(l??"0x0")}catch(f){try{if(Yt($a(r),await dc({hash:s,signature:i})))return!0}catch{}if(f instanceof io)return!1;throw f}}async function Ex(e,{address:t,message:r,factory:n,factoryData:o,signature:s,...i}){let a=yu(r);return hs(e,{address:t,factory:n,factoryData:o,hash:a,signature:s,...i})}async function Ax(e,t){let{address:r,factory:n,factoryData:o,signature:s,message:i,primaryType:a,types:c,domain:u,...p}=t,f=fy({message:i,primaryType:a,types:c,domain:u});return hs(e,{address:r,factory:n,factoryData:o,hash:f,signature:s,...p})}_t();Uc();qe();He();qe();function qu(e,{emitOnBegin:t=!1,emitMissed:r=!1,onBlockNumber:n,onError:o,poll:s,pollingInterval:i=e.pollingInterval}){let a=typeof s<"u"?s:!(e.transport.type==="webSocket"||e.transport.type==="fallback"&&e.transport.transports[0].config.type==="webSocket"),c;return a?(()=>{let f=X(["watchBlockNumber",e.uid,t,r,i]);return Ke(f,{onBlockNumber:n,onError:o},l=>At(async()=>{try{let m=await $(e,Jt,"getBlockNumber")({cacheTime:0});if(c){if(m===c)return;if(m-c>1&&r)for(let y=c+1n;yc)&&(l.onBlockNumber(m,c),c=m)}catch(m){l.onError?.(m)}},{emitOnBegin:t,interval:i}))})():(()=>{let f=X(["watchBlockNumber",e.uid,t,r]);return Ke(f,{onBlockNumber:n,onError:o},l=>{let m=!0,y=()=>m=!1;return(async()=>{try{let x=(()=>{if(e.transport.type==="fallback"){let h=e.transport.transports.find(b=>b.config.type==="webSocket");return h?h.value:e.transport}return e.transport})(),{unsubscribe:d}=await x.subscribe({params:["newHeads"],onData(h){if(!m)return;let b=he(h.result?.number);l.onBlockNumber(b,c),c=b},onError(h){l.onError?.(h)}});y=d,m||y()}catch(x){o?.(x)}})(),()=>y()})})()}async function Tx(e,{confirmations:t=1,hash:r,onReplaced:n,pollingInterval:o=e.pollingInterval,retryCount:s=6,retryDelay:i=({count:c})=>~~(1<x(new Xa({hash:r})),a):void 0,h=Ke(c,{onReplaced:n,resolve:y,reject:x},b=>{let v=$(e,qu,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:o,async onBlockNumber(A){let k=T=>{clearTimeout(d),v(),T(),h()},S=A;if(!l)try{if(f){if(t>1&&(!f.blockNumber||S-f.blockNumber+1nb.resolve(f));return}if(u||(l=!0,await pi(async()=>{u=await $(e,us,"getTransaction")({hash:r}),u.blockNumber&&(S=u.blockNumber)},{delay:i,retryCount:s}),l=!1),f=await $(e,fi,"getTransactionReceipt")({hash:r}),t>1&&(!f.blockNumber||S-f.blockNumber+1nb.resolve(f))}catch(T){if(T instanceof oo||T instanceof so){if(!u){l=!1;return}try{p=u,l=!0;let B=await pi(()=>$(e,Ge,"getBlock")({blockNumber:S,includeTransactions:!0}),{delay:i,retryCount:s,shouldRetry:({error:U})=>U instanceof Do});l=!1;let P=B.transactions.find(({from:U,nonce:L})=>U===p.from&&L===p.nonce);if(!P||(f=await $(e,fi,"getTransactionReceipt")({hash:P.hash}),t>1&&(!f.blockNumber||S-f.blockNumber+1n{b.onReplaced?.({reason:H,replacedTransaction:p,transaction:P,transactionReceipt:f}),b.resolve(f)})}catch(B){k(()=>b.reject(B))}}else k(()=>b.reject(T))}}})});return m}qe();function Sx(e,{blockTag:t="latest",emitMissed:r=!1,emitOnBegin:n=!1,onBlock:o,onError:s,includeTransactions:i,poll:a,pollingInterval:c=e.pollingInterval}){let u=typeof a<"u"?a:!(e.transport.type==="webSocket"||e.transport.type==="fallback"&&e.transport.transports[0].config.type==="webSocket"),p=i??!1,f;return u?(()=>{let y=X(["watchBlocks",e.uid,t,r,n,p,c]);return Ke(y,{onBlock:o,onError:s},x=>At(async()=>{try{let d=await $(e,Ge,"getBlock")({blockTag:t,includeTransactions:p});if(d.number&&f?.number){if(d.number===f.number)return;if(d.number-f.number>1&&r)for(let h=f?.number+1n;hf.number)&&(x.onBlock(d,f),f=d)}catch(d){x.onError?.(d)}},{emitOnBegin:n,interval:c}))})():(()=>{let y=!0,x=!0,d=()=>y=!1;return(async()=>{try{n&&$(e,Ge,"getBlock")({blockTag:t,includeTransactions:p}).then(v=>{y&&x&&(o(v,void 0),x=!1)});let h=(()=>{if(e.transport.type==="fallback"){let v=e.transport.transports.find(A=>A.config.type==="webSocket");return v?v.value:e.transport}return e.transport})(),{unsubscribe:b}=await h.subscribe({params:["newHeads"],async onData(v){if(!y)return;let A=await $(e,Ge,"getBlock")({blockNumber:v.blockNumber,includeTransactions:p}).catch(()=>{});y&&(o(A,f),x=!1,f=A)},onError(v){s?.(v)}});d=b,y||d()}catch(h){s?.(h)}})(),()=>d()})()}qe();ye();Zs();function Cx(e,{address:t,args:r,batch:n=!0,event:o,events:s,fromBlock:i,onError:a,onLogs:c,poll:u,pollingInterval:p=e.pollingInterval,strict:f}){let l=typeof u<"u"?u:typeof i=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="fallback"&&e.transport.transports[0].config.type==="webSocket"),m=f??!1;return l?(()=>{let d=X(["watchEvent",t,r,n,e.uid,o,p,i]);return Ke(d,{onLogs:c,onError:a},h=>{let b;i!==void 0&&(b=i-1n);let v,A=!1,k=At(async()=>{if(!A){try{v=await $(e,au,"createEventFilter")({address:t,args:r,event:o,events:s,strict:m,fromBlock:i})}catch{}A=!0;return}try{let S;if(v)S=await $(e,Xr,"getFilterChanges")({filter:v});else{let T=await $(e,Jt,"getBlockNumber")({});b&&b!==T?S=await $(e,Xo,"getLogs")({address:t,args:r,event:o,events:s,fromBlock:b+1n,toBlock:T}):S=[],b=T}if(S.length===0)return;if(n)h.onLogs(S);else for(let T of S)h.onLogs([T])}catch(S){v&&S instanceof Wt&&(A=!1),h.onError?.(S)}},{emitOnBegin:!0,interval:p});return async()=>{v&&await $(e,Qr,"uninstallFilter")({filter:v}),k()}})})():(()=>{let d=!0,h=()=>d=!1;return(async()=>{try{let b=(()=>{if(e.transport.type==="fallback"){let S=e.transport.transports.find(T=>T.config.type==="webSocket");return S?S.value:e.transport}return e.transport})(),v=s??(o?[o]:void 0),A=[];v&&(A=[v.flatMap(T=>qt({abi:[T],eventName:T.name,args:r}))],o&&(A=A[0]));let{unsubscribe:k}=await b.subscribe({params:["logs",{address:t,topics:A}],onData(S){if(!d)return;let T=S.result;try{let{eventName:B,args:P}=Zo({abi:v??[],data:T.data,topics:T.topics,strict:m}),H=We(T,{args:P,eventName:B});c([H])}catch(B){let P,H;if(B instanceof It||B instanceof Ut){if(f)return;P=B.abiItem.name,H=B.abiItem.inputs?.some(L=>!("name"in L&&L.name))}let U=We(T,{args:H?[]:{},eventName:P});c([U])}},onError(S){a?.(S)}});h=k,d||h()}catch(b){a?.(b)}})(),()=>h()})()}qe();function Ix(e,{batch:t=!0,onError:r,onTransactions:n,poll:o,pollingInterval:s=e.pollingInterval}){return(typeof o<"u"?o:e.transport.type!=="webSocket")?(()=>{let u=X(["watchPendingTransactions",e.uid,t,s]);return Ke(u,{onTransactions:n,onError:r},p=>{let f,l=At(async()=>{try{if(!f)try{f=await $(e,cu,"createPendingTransactionFilter")({});return}catch(y){throw l(),y}let m=await $(e,Xr,"getFilterChanges")({filter:f});if(m.length===0)return;if(t)p.onTransactions(m);else for(let y of m)p.onTransactions([y])}catch(m){p.onError?.(m)}},{emitOnBegin:!0,interval:s});return async()=>{f&&await $(e,Qr,"uninstallFilter")({filter:f}),l()}})})():(()=>{let u=!0,p=()=>u=!1;return(async()=>{try{let{unsubscribe:f}=await e.transport.subscribe({params:["newPendingTransactions"],onData(l){if(!u)return;let m=l.result;n([m])},onError(l){r?.(l)}});p=f,u||p()}catch(f){r?.(f)}})(),()=>p()})()}function Px(e){let{scheme:t,statement:r,...n}=e.match(mw)?.groups??{},{chainId:o,expirationTime:s,issuedAt:i,notBefore:a,requestId:c,...u}=e.match(dw)?.groups??{},p=e.split("Resources:")[1]?.split(` +- `).slice(1);return{...n,...u,...o?{chainId:Number(o)}:{},...s?{expirationTime:new Date(s)}:{},...i?{issuedAt:new Date(i)}:{},...a?{notBefore:new Date(a)}:{},...c?{requestId:c}:{},...p?{resources:p}:{},...t?{scheme:t}:{},...r?{statement:r}:{}}}var mw=/^(?:(?[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?
0x[a-fA-F0-9]{40})\n\n(?:(?.*)\n\n)?/,dw=/(?:URI: (?.+))\n(?:Version: (?.+))\n(?:Chain ID: (?\d+))\n(?:Nonce: (?[a-zA-Z0-9]+))\n(?:Issued At: (?.+))(?:\nExpiration Time: (?.+))?(?:\nNot Before: (?.+))?(?:\nRequest ID: (?.+))?/;Yo();function kx(e){let{address:t,domain:r,message:n,nonce:o,scheme:s,time:i=new Date}=e;if(r&&n.domain!==r||o&&n.nonce!==o||s&&n.scheme!==s||n.expirationTime&&i>=n.expirationTime||n.notBefore&&iZt(e,t),createAccessList:t=>iu(e,t),createBlockFilter:()=>ny(e),createContractEventFilter:t=>Oa(e,t),createEventFilter:t=>au(e,t),createPendingTransactionFilter:()=>cu(e),estimateContractGas:t=>hh(e,t),estimateGas:t=>Ko(e,t),getBalance:t=>kc(e,t),getBlobBaseFee:()=>oy(e),getBlock:t=>Ge(e,t),getBlockNumber:t=>Jt(e,t),getBlockTransactionCount:t=>sy(e,t),getBytecode:t=>Hf(e,t),getChainId:()=>vt(e),getCode:t=>Hf(e,t),getContractEvents:t=>Bc(e,t),getEip712Domain:t=>iy(e,t),getEnsAddress:t=>Kh(e,t),getEnsAvatar:t=>ey(e,t),getEnsName:t=>ty(e,t),getEnsResolver:t=>ry(e,t),getEnsText:t=>su(e,t),getFeeHistory:t=>cy(e,t),estimateFeesPerGas:t=>ph(e,t),getFilterChanges:t=>Xr(e,t),getFilterLogs:t=>uy(e,t),getGasPrice:()=>jo(e),getLogs:t=>Xo(e,t),getProof:t=>ky(e,t),estimateMaxPriorityFeePerGas:t=>uh(e,t),getStorageAt:t=>By(e,t),getTransaction:t=>us(e,t),getTransactionConfirmations:t=>Ry(e,t),getTransactionCount:t=>qo(e,t),getTransactionReceipt:t=>fi(e,t),multicall:t=>_y(e,t),prepareTransactionRequest:t=>Yr(e,t),readContract:t=>je(e,t),sendRawTransaction:t=>ns(e,t),simulate:t=>hi(e,t),simulateBlocks:t=>hi(e,t),simulateCalls:t=>wx(e,t),simulateContract:t=>Nh(e,t),verifyMessage:t=>Ex(e,t),verifySiweMessage:t=>Bx(e,t),verifyTypedData:t=>Ax(e,t),uninstallFilter:t=>Qr(e,t),waitForTransactionReceipt:t=>Tx(e,t),watchBlocks:t=>Sx(e,t),watchBlockNumber:t=>qu(e,t),watchContractEvent:t=>zh(e,t),watchEvent:t=>Cx(e,t),watchPendingTransactions:t=>Ix(e,t)}}function il(e){let{key:t="public",name:r="Public Client"}=e;return Jc({...e,key:t,name:r,type:"publicClient"}).extend(Rx)}V();async function _x(e,{chain:t}){let{id:r,name:n,nativeCurrency:o,rpcUrls:s,blockExplorers:i}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:_(r),chainName:n,nativeCurrency:o,rpcUrls:s.default.http,blockExplorerUrls:i?Object.values(i).map(({url:a})=>a):void 0}]},{dedupe:!0,retryCount:0})}Mc();function $x(e,t){let{abi:r,args:n,bytecode:o,...s}=t,i=_n({abi:r,args:n,bytecode:o});return os(e,{...s,...s.authorizationList?{to:null}:{},data:i})}bn();async function Nx(e){return e.account?.type==="local"?[e.account.address]:(await e.request({method:"eth_accounts"},{dedupe:!0})).map(r=>sr(r))}ve();V();async function Fx(e,t={}){let{account:r=e.account,chainId:n}=t,o=r?K(r):void 0,s=n?[o?.address,[_(n)]]:[o?.address],i=await e.request({method:"wallet_getCapabilities",params:s}),a={};for(let[c,u]of Object.entries(i))a[Number(c)]=u;return typeof n=="number"?a[n]:a}async function Ox(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}ve();Yo();async function Vu(e,t){let{account:r=e.account,chainId:n,nonce:o}=t;if(!r)throw new Ue({docsPath:"/docs/eip7702/prepareAuthorization"});let s=K(r),i=(()=>{if(t.executor)return t.executor==="self"?t.executor:K(t.executor)})(),a={address:t.contractAddress??t.address,chainId:n,nonce:o};return typeof a.chainId>"u"&&(a.chainId=e.chain?.id??await $(e,vt,"getChainId")({})),typeof a.nonce>"u"&&(a.nonce=await $(e,qo,"getTransactionCount")({address:s.address,blockTag:"pending"}),(i==="self"||i?.address&&Yt(i.address,s.address))&&(a.nonce+=1)),a}bn();async function Mx(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(r=>$a(r))}async function zx(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}ve();ct();V();async function Ux(e,t){let{account:r=e.account,chain:n=e.chain,forceAtomic:o=!1,id:s,version:i="2.0.0"}=t;if(typeof r>"u")throw new Ue({docsPath:"/docs/actions/wallet/sendCalls"});let a=r?K(r):null,c=t.calls.map(u=>{let p=u;return{data:p.abi?de({abi:p.abi,functionName:p.functionName,args:p.args}):p.data,to:p.to,value:p.value?_(p.value):void 0}});try{let u=await e.request({method:"wallet_sendCalls",params:[{atomicRequired:o,calls:c,capabilities:hw(t.capabilities),chainId:_(n.id),from:a?.address,id:s,version:i}]},{retryCount:0});return typeof u=="string"?{id:u}:u}catch(u){throw Gc(u,{...t,account:a,chain:t.chain})}}function hw(e){let t=e?.paymasterService?Object.entries(e.paymasterService).reduce((r,[n,o])=>({...r??{},[_(Number(n))]:o}),{}):void 0;return{...e,...t?{paymasterService:t}:{}}}async function Lx(e,t){let{id:r}=t;await e.request({method:"wallet_showCallsStatus",params:[r]})}ve();async function Hx(e,t){let{account:r=e.account}=t;if(!r)throw new Ue({docsPath:"/docs/eip7702/signAuthorization"});let n=K(r);if(!n.signAuthorization)throw new en({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:n.type});let o=await Vu(e,t);return n.signAuthorization(o)}ve();V();async function Dx(e,{account:t=e.account,message:r}){if(!t)throw new Ue({docsPath:"/docs/actions/wallet/signMessage"});let n=K(t);if(n.signMessage)return n.signMessage({message:r});let o=typeof r=="string"?Lt(r):r.raw instanceof Uint8Array?z(r.raw):r.raw;return e.request({method:"personal_sign",params:[o,n.address]},{retryCount:0})}ve();V();Vr();Wr();async function jx(e,t){let{account:r=e.account,chain:n=e.chain,...o}=t;if(!r)throw new Ue({docsPath:"/docs/actions/wallet/signTransaction"});let s=K(r);ot({account:s,...t});let i=await $(e,vt,"getChainId")({});n!==null&&Vc({currentChainId:i,chain:n});let c=(n?.formatters||e.chain?.formatters)?.transactionRequest?.format||lt;return s.signTransaction?s.signTransaction({...o,chainId:i},{serializer:e.chain?.serializers?.transaction}):await e.request({method:"eth_signTransaction",params:[{...c(o),chainId:_(i),from:s.address}]},{retryCount:0})}ve();async function qx(e,t){let{account:r=e.account,domain:n,message:o,primaryType:s}=t;if(!r)throw new Ue({docsPath:"/docs/actions/wallet/signTypedData"});let i=K(r),a={EIP712Domain:du({domain:n}),...t.types};if(mu({domain:n,message:o,primaryType:s,types:a}),i.signTypedData)return i.signTypedData({domain:n,message:o,primaryType:s,types:a});let c=yy({domain:n,message:o,primaryType:s,types:a});return e.request({method:"eth_signTypedData_v4",params:[i.address,c]},{retryCount:0})}V();async function Vx(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:_(t)}]},{retryCount:0})}async function Gx(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}function Wx(e){return{addChain:t=>_x(e,t),deployContract:t=>$x(e,t),getAddresses:()=>Nx(e),getCallsStatus:t=>Wc(e,t),getCapabilities:t=>Fx(e,t),getChainId:()=>vt(e),getPermissions:()=>Ox(e),prepareAuthorization:t=>Vu(e,t),prepareTransactionRequest:t=>Yr(e,t),requestAddresses:()=>Mx(e),requestPermissions:t=>zx(e,t),sendCalls:t=>Ux(e,t),sendRawTransaction:t=>ns(e,t),sendTransaction:t=>os(e,t),showCallsStatus:t=>Lx(e,t),signAuthorization:t=>Hx(e,t),signMessage:t=>Dx(e,t),signTransaction:t=>jx(e,t),signTypedData:t=>qx(e,t),switchChain:t=>Vx(e,t),waitForCallsStatus:t=>Hh(e,t),watchAsset:t=>Gx(e,t),writeContract:t=>Uh(e,t)}}function al(e){let{key:t="wallet",name:r="Wallet Client",transport:n}=e;return Jc({...e,key:t,name:r,transport:n,type:"walletClient"}).extend(Wx)}Ks();var Kx={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}};Rt();yt();et();V();function Yx(e,t){return xw(e)?yw(e):vy(e,t)}function yw(e){bw(e);let{sourceHash:t,data:r,from:n,gas:o,isSystemTx:s,mint:i,to:a,value:c}=e,u=[t,n,a??"0x",i?z(i):"0x",c?z(c):"0x",o?z(o):"0x",s?"0x1":"0x",r??"0x"];return Te(["0x7e",ft(u)])}function xw(e){return e.type==="deposit"||typeof e.sourceHash<"u"}function bw(e){let{from:t,to:r}=e;if(t&&!re(t))throw new ae({address:t});if(r&&!re(r))throw new ae({address:r})}var Zx={estimateFeesPerGas:async e=>{if(!e.request?.feeCurrency)return null;let[t,r]=await Promise.all([gw(e.client,e.request.feeCurrency),ww(e.client,e.request.feeCurrency)]);return{maxFeePerGas:e.multiply(t-r)+r,maxPriorityFeePerGas:r}}};async function gw(e,t){let r=await e.request({method:"eth_gasPrice",params:[t]});return BigInt(r)}async function ww(e,t){let r=await e.request({method:"eth_maxPriorityFeePerGas",params:[t]});return BigInt(r)}He();Vr();hn();function cl(e){return e===0||e===0n||e===void 0||e===null||e==="0"||e===""||typeof e=="string"&&(Ie(e).toLowerCase()==="0x"||Ie(e).toLowerCase()==="0x00")}function ys(e){return!cl(e)}function vw(e){return typeof e.maxFeePerGas<"u"&&typeof e.maxPriorityFeePerGas<"u"}function Gu(e){return e.type==="cip64"?!0:vw(e)&&ys(e.feeCurrency)}var Jx={block:ch({format(e){return{transactions:e.transactions?.map(r=>typeof r=="string"?r:{...Bn(r),...r.gatewayFee?{gatewayFee:he(r.gatewayFee),gatewayFeeRecipient:r.gatewayFeeRecipient}:{},feeCurrency:r.feeCurrency}),...e.randomness?{randomness:e.randomness}:{}}}}),transaction:ah({format(e){if(e.type==="0x7e")return{isSystemTx:e.isSystemTx,mint:e.mint?he(e.mint):void 0,sourceHash:e.sourceHash,type:"deposit"};let t={feeCurrency:e.feeCurrency};return e.type==="0x7b"?t.type="cip64":(e.type==="0x7c"&&(t.type="cip42"),t.gatewayFee=e.gatewayFee?he(e.gatewayFee):null,t.gatewayFeeRecipient=e.gatewayFeeRecipient),t}}),transactionRequest:sh({format(e){let t={};return e.feeCurrency&&(t.feeCurrency=e.feeCurrency),Gu(e)&&(t.type="0x7b"),t}})};gc();Rt();W();Qo();hr();yt();et();V();function Ew(e,t){return Gu(e)?Aw(e,t):Yx(e,t)}var Xx={transaction:Ew};function Aw(e,t){Sw(e);let{chainId:r,gas:n,nonce:o,to:s,value:i,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:u,feeCurrency:p,data:f}=e,l=[z(r),o?z(o):"0x",c?z(c):"0x",a?z(a):"0x",n?z(n):"0x",s??"0x",i?z(i):"0x",f??"0x",Nn(u),p,...nn(e,t)];return Te(["0x7b",ft(l)])}var Tw=Gr;function Sw(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:o,to:s,feeCurrency:i}=e;if(t<=0)throw new yr({chainId:t});if(s&&!re(s))throw new ae({address:s});if(n)throw new g("`gasPrice` is not a valid CIP-64 Transaction attribute.");if(ys(o)&&o>Tw)throw new nt({maxFeePerGas:o});if(ys(r)&&ys(o)&&r>o)throw new gt({maxFeePerGas:o,maxPriorityFeePerGas:r});if(ys(i)&&!re(i))throw new g("`feeCurrency` MUST be a token address for CIP-64 transactions.");if(cl(i))throw new g("`feeCurrency` must be provided for CIP-64 transactions.")}var Qx={contracts:Kx,formatters:Jx,serializers:Xx,fees:Zx};var Wu=py({...Qx,id:42220,name:"Celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://celoscan.io",apiUrl:"https://api.celoscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:13112599}},testnet:!1});B0();F0();var Uw=Object.create,O0=Object.defineProperty,Lw=Object.getOwnPropertyDescriptor,M0=Object.getOwnPropertyNames,Hw=Object.getPrototypeOf,Dw=Object.prototype.hasOwnProperty,bl=(e,t)=>function(){return t||(0,e[M0(e)[0]])((t={exports:{}}).exports,t),t.exports},jw=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of M0(t))!Dw.call(e,o)&&o!==r&&O0(e,o,{get:()=>t[o],enumerable:!(n=Lw(t,o))||n.enumerable});return e},qw=(e,t,r)=>(r=e!=null?Uw(Hw(e)):{},jw(O0(r,"default",{value:e,enumerable:!0}),e)),Vw=bl({"../../node_modules/react/cjs/react.production.min.js"(e){var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),l=Symbol.iterator;function m(w){return w===null||typeof w!="object"?null:(w=l&&w[l]||w["@@iterator"],typeof w=="function"?w:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,d={};function h(w,I,G){this.props=w,this.context=I,this.refs=d,this.updater=G||y}h.prototype.isReactComponent={},h.prototype.setState=function(w,I){if(typeof w!="object"&&typeof w!="function"&&w!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,w,I,"setState")},h.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};function b(){}b.prototype=h.prototype;function v(w,I,G){this.props=w,this.context=I,this.refs=d,this.updater=G||y}var A=v.prototype=new b;A.constructor=v,x(A,h.prototype),A.isPureReactComponent=!0;var k=Array.isArray,S=Object.prototype.hasOwnProperty,T={current:null},B={key:!0,ref:!0,__self:!0,__source:!0};function P(w,I,G){var Z,Y={},le=null,se=null;if(I!=null)for(Z in I.ref!==void 0&&(se=I.ref),I.key!==void 0&&(le=""+I.key),I)S.call(I,Z)&&!B.hasOwnProperty(Z)&&(Y[Z]=I[Z]);var ie=arguments.length-2;if(ie===1)Y.children=G;else if(10&&tBigInt(0)){let i=BigInt(31536e3);s=this.toEtherNumber(this.cachedRewardRate*i)*100/this.toEtherNumber(e)}return{totalStaked:e,annualAPR:s}}async getUserStats(){let e=await this.getAccount(),[t,r,n]=await Promise.all([this.publicClient.readContract({...tp,functionName:"balanceOf",args:[e]}),this.publicClient.readContract({...an,functionName:"balanceOf",args:[e]}),this.publicClient.readContract({...an,functionName:"earned",args:[e]})]),o=BigInt(0);if(r>BigInt(0)&&this.totalStaked==BigInt(0)){await this.getGlobalStats();let s=BigInt(7*24*60*60);o=this.cachedRewardRate*s*r/this.totalStaked}return{walletBalance:t,currentStake:r,unclaimedRewards:n,userWeeklyRewards:o}}async stake(e,t){if(e<=BigInt(0))throw new Error("Amount must be greater than zero");let r=await this.getAccount();if(await this.publicClient.readContract({...tp,functionName:"balanceOf",args:[r]})this.refreshData(),3e4),this.refreshData()}disconnectedCallback(){this.interval&&clearInterval(this.interval)}updated(r){r.has("web3Provider")&&this.refreshData(),(r.has("walletBalance")||r.has("currentStake"))&&this.validateInput()}render(){let r=!!(this.web3Provider&&this.web3Provider.isConnected&&this.userAddress);return Er` +
+
+ +

Gooddollar Savings

+
+ +
+ + +
+ +
+
+ + ${this.activeTab==="stake"?`Wallet Balance: ${this.isLoading?"Loading...":this.formatBigInt(this.walletBalance)}`:`Current Stake: ${this.isLoading?"Loading...":this.formatBigInt(this.currentStake)}`} + +
+
+ + +
+ ${this.inputError?Er`
${this.inputError}
`:""} +
+ +
+ Unclaimed Rewards +
+ + ${this.isLoading?"Loading...":this.formatBigInt(this.unclaimedRewards)} +
+
+ + ${this.transactionError?Er`
${this.transactionError}
`:""} + + ${r?Er` + + `:Er` + + `} + +
+

Staking Statistics

+ +
+ Total G$ Staked + ${this.isLoading?"Loading...":this.formatBigInt(this.totalStaked)} +
+ + ${r?Er` +
+ Your G$ Stake Pool Share + ${this.isLoading?"Loading...":this.formatBigInt(this.currentStake)} +
+ +
+ Your Weekly Rewards + ${this.isLoading?"Loading...":this.formatBigInt(this.userWeeklyRewards)} +
+ `:""} + +
+ Annual Stake APR + ${this.isLoading?"Loading...":this.formatPercent(this.annualAPR)} +
+
+ ${this.txLoading||this.isClaiming?Er`
`:""} +
+ `}async refreshData(){if(this.publicClient||(this.publicClient=il({chain:Wu,transport:zf()})),this.web3Provider&&this.web3Provider.isConnected){this.walletClient=al({chain:Wu,transport:Of(this.web3Provider)}),this.sdk=new gl(this.publicClient,this.walletClient),await this.loadStats();let r=await this.web3Provider.request({method:"eth_accounts"});r.length>0?(this.userAddress=r[0],await this.loadUserStats()):this.resetUserStats()}else this.sdk=new gl(this.publicClient),await this.loadStats()}async loadStats(){if(this.sdk)try{let r=await this.sdk.getGlobalStats();this.totalStaked=r.totalStaked,this.annualAPR=r.annualAPR}catch(r){console.error("Error loading global stats:",r)}}async loadUserStats(){if(!(!this.sdk||!this.userAddress))try{let r=await this.sdk.getUserStats();this.walletBalance=r.walletBalance,this.currentStake=r.currentStake,this.unclaimedRewards=r.unclaimedRewards,this.userWeeklyRewards=r.userWeeklyRewards}catch(r){console.error("Error loading user stats:",r)}}resetUserStats(){this.walletBalance=0n,this.currentStake=0n,this.unclaimedRewards=0n,this.userWeeklyRewards=0n}formatBigInt(r){return Intl.NumberFormat().format(this.toEtherNumber(r))}toEtherNumber(r){return Number(ar(r))}formatPercent(r){return`${r.toFixed(2)}%`}handleTabClick(r){this.activeTab=r,this.inputError="",this.transactionError=""}handleMaxClick(){this.activeTab==="stake"?this.inputAmount=this.toEtherNumber(this.walletBalance).toString():this.inputAmount=this.toEtherNumber(this.currentStake).toString(),this.inputError=""}handleInputChange(r){let n=r.target;this.inputAmount=n.value,this.validateInput()}validateInput(r=!1){if(this.inputError="",!this.inputAmount||this.inputAmount.trim()==="")return;if(!/^[0-9]*\.?[0-9]*$/.test(this.inputAmount)){this.inputError="Invalid value";return}let o=parseFloat(this.inputAmount);if(isNaN(o)||o<0){this.inputError="Invalid value";return}if(o===0&&r){this.inputError="Please enter a valid amount";return}if(this.activeTab==="stake"&&cs(this.inputAmount)>this.walletBalance){this.inputError="Insufficient balance";return}if(this.activeTab==="unstake"&&cs(this.inputAmount)>this.currentStake){this.inputError="Max amount exceeded";return}}handleConnectWallet(){this.connectWallet&&this.connectWallet()}async handleStake(){if(!(!this.sdk||!this.userAddress)&&(this.validateInput(!0),!this.inputError))try{this.txLoading=!0,this.transactionError="";let r=cs(this.inputAmount);(await this.sdk.stake(r)).status==="success"&&(await this.refreshData(),this.inputAmount="0.0",this.inputError="",this.transactionError="")}catch(r){console.error("Staking error:",r),this.transactionError=r.message||"Staking failed"}finally{this.txLoading=!1}}async handleUnstake(){if(!(!this.sdk||!this.userAddress)&&(this.validateInput(!0),!this.inputError))try{this.txLoading=!0,this.transactionError="";let r=cs(this.inputAmount);(await this.sdk.unstake(r)).status==="success"&&(await this.refreshData(),this.inputAmount="0.0",this.inputError="",this.transactionError="")}catch(r){console.error("Unstaking error:",r),this.transactionError=r.message||"Unstaking failed"}finally{this.txLoading=!1}}async handleClaim(){if(!(!this.sdk||!this.userAddress))try{this.isClaiming=!0,this.transactionError="",(await this.sdk.claimReward()).status==="success"&&(await this.refreshData(),this.transactionError="")}catch(r){console.error("Claim error:",r),this.transactionError=r.message||"Claim failed"}finally{this.isClaiming=!1}}};ge.styles=sp` + :host { + display: block; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; + max-width: 480px; + margin: 0 auto; + } + + .container { + background: white; + border-radius: 16px; + padding: 24px; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + border: 1px solid #e5e7eb; + position: relative; + } + + .header { + display: flex; + align-items: center; + gap: 12px; + margin-bottom: 24px; + } + + .logo { + width: 48px; + height: 48px; + background-color: white; + display: flex; + align-items: center; + justify-content: center; + } + .logo img { + width: 44px; + height: 44px; + box-shadow: rgba(0, 0, 0, 0.075) 0px 6px 10px; + border-radius: 50%; + background-color: white; + } + + .title { + font-size: 24px; + font-weight: 600; + color: #111827; + margin: 0; + } + + .tab-container { + display: flex; + background: #f9fafb; + border-radius: 12px; + padding: 4px; + margin-bottom: 16px; + border: 1px solid #e5e7eb; + } + + .tab { + flex: 1; + padding: 10px 16px; + border: none; + background: transparent; + border-radius: 8px; + font-size: 16px; + font-weight: 500; + cursor: pointer; + transition: all 0.2s ease; + color: #6b7280; + } + + .tab.active { + background: #00b0ff; + color: #ffffff; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); + } + + .input-section { + background: #f9fafb; + border-radius: 12px; + padding: 16px; + margin-bottom: 16px; + border: 1px solid #e5e7eb; + } + + .balance-info { + display: flex; + justify-content: flex-end; + align-items: center; + margin-bottom: 12px; + font-size: 14px; + color: #6b7280; + } + + .input-container { + display: flex; + align-items: center; + gap: 12px; + } + + .amount-input { + flex: 1; + border: none; + background: transparent; + font-size: 24px; + font-weight: 600; + color: #111827; + outline: none; + } + + .max-button { + background: #ffffff; + border-radius: 8px; + padding: 6px 12px; + font-size: 12px; + font-weight: 400; + color: #374151; + border: 1px solid #374151; + cursor: pointer; + transition: background-color 0.2s ease; + } + + .max-button:hover { + border: 1px solid #00b0ff; + color: #00b0ff; + } + + .rewards-section { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 16px; + padding: 0 4px; + } + + .rewards-label { + font-size: 16px; + color: #374151; + } + + .rewards-value { + display: flex; + align-items: center; + gap: 8px; + } + + .claim-button { + background: none; + border: none; + color: #0387c3; + font-size: 16px; + font-weight: 600; + text-decoration: underline; + cursor: pointer; + padding: 0; + } + + .main-button { + width: 100%; + background: #00b0ff; + border: none; + border-radius: 12px; + padding: 16px; + font-size: 18px; + font-weight: 600; + color: #ffffff; + cursor: pointer; + margin-bottom: 24px; + transition: background-color 0.2s ease; + box-shadow: rgba(11, 27, 102, 0.306) 3px 3px 10px -1px; + } + + .main-button:hover { + background: #0387c3; + } + + .main-button.primary { + background: #00b0ff; + color: white; + } + + .main-button.primary:hover { + background: #0387c3; + } + + .stats-section { + background: #f9fafb; + border-radius: 12px; + padding: 20px; + border: 1px solid #e5e7eb; + } + + .stats-title { + font-size: 18px; + font-weight: 600; + color: #111827; + margin: 0 0 16px 0; + } + + .stat-row { + display: flex; + justify-content: space-between; + align-items: center; + padding: 8px 0; + border-bottom: 1px solid #e5e7eb; + } + + .stat-row:last-child { + border-bottom: none; + } + + .stat-label { + font-size: 14px; + color: #6b7280; + } + + .stat-value { + font-size: 14px; + font-weight: 600; + color: #111827; + } + + .hidden { + display: none; + } + + .overlay { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(255, 255, 255, 0.2); + border-radius: 16px; + z-index: 10; + display: flex; + align-items: center; + justify-content: center; + pointer-events: none; + } + + .error-message { + color: #dc2626; + font-size: 12px; + margin-top: 4px; + padding-left: 4px; + } + `,Oe([Is({type:Object})],ge.prototype,"web3Provider",2),Oe([Is({type:Function})],ge.prototype,"connectWallet",2),Oe([Ye()],ge.prototype,"activeTab",2),Oe([Ye()],ge.prototype,"inputAmount",2),Oe([Ye()],ge.prototype,"walletBalance",2),Oe([Ye()],ge.prototype,"currentStake",2),Oe([Ye()],ge.prototype,"unclaimedRewards",2),Oe([Ye()],ge.prototype,"totalStaked",2),Oe([Ye()],ge.prototype,"userWeeklyRewards",2),Oe([Ye()],ge.prototype,"annualAPR",2),Oe([Ye()],ge.prototype,"interval",2),Oe([Ye()],ge.prototype,"isLoading",2),Oe([Ye()],ge.prototype,"txLoading",2),Oe([Ye()],ge.prototype,"isClaiming",2),Oe([Ye()],ge.prototype,"inputError",2),Oe([Ye()],ge.prototype,"transactionError",2),ge=Oe([Ml("gooddollar-savings-widget")],ge);return H0(Zw);})(); +/*! Bundled license information: + +react/cjs/react.production.min.js: + (** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) + +react/cjs/react.development.js: + (** + * @license React + * react.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) +*/ +/*! Bundled license information: + +@noble/hashes/esm/utils.js: + (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *) + +@noble/curves/esm/abstract/utils.js: + (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *) + +@noble/curves/esm/abstract/modular.js: + (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *) + +@noble/curves/esm/abstract/curve.js: + (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *) + +@noble/curves/esm/abstract/weierstrass.js: + (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *) + +@noble/curves/esm/_shortw_utils.js: + (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *) + +@noble/curves/esm/secp256k1.js: + (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *) + +@lit/reactive-element/css-tag.js: + (** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/reactive-element.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +lit-html/lit-html.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +lit-element/lit-element.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +lit-html/is-server.js: + (** + * @license + * Copyright 2022 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/custom-element.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/property.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/state.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/event-options.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/base.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/query.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/query-all.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/query-async.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/query-assigned-elements.js: + (** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@lit/reactive-element/decorators/query-assigned-nodes.js: + (** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + *) + +@noble/hashes/esm/utils.js: + (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *) +*/ diff --git a/src/pages/gd/Savings/index.tsx b/src/pages/gd/Savings/index.tsx index 582023536..97533cf57 100644 --- a/src/pages/gd/Savings/index.tsx +++ b/src/pages/gd/Savings/index.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useRef, useState } from 'react' -import { VStack, Text, useBreakpointValue, Spinner } from 'native-base' +import { VStack, Text, useBreakpointValue, Spinner, Button } from 'native-base' import { i18n } from '@lingui/core' import { t } from '@lingui/macro' import { useEthers } from '@usedapp/core' @@ -24,6 +24,7 @@ const SavingsWidgetContainer: React.FC = () => { const [isLoading, setIsLoading] = useState(true) const [hasError, setHasError] = useState(false) const { account } = useEthers() + const scriptLoadedRef = useRef(false) const containerStyles = useBreakpointValue({ base: { @@ -36,30 +37,83 @@ const SavingsWidgetContainer: React.FC = () => { useEffect(() => { const loadWidget = async () => { + if (scriptLoadedRef.current) return + try { setIsLoading(true) setHasError(false) - // Try to load the savings widget script from CDN - // The widget is available as a web component from GoodSDKs/savings-widget + // Load the widget script from public folder const script = document.createElement('script') - script.src = 'https://unpkg.com/@gooddollar/savings-widget@latest/dist/index.js' + script.src = '/index.global.js' + script.type = 'text/javascript' script.async = true - script.defer = true script.onload = () => { - setIsLoading(false) + scriptLoadedRef.current = true + + // Use a timeout to ensure the custom element is registered + const initWidget = () => { + try { + if (!containerRef.current) return + + const widget = document.createElement('gooddollar-savings-widget') + if (account) { + widget.setAttribute('account', account) + } + widget.style.width = '100%' + widget.style.minHeight = '500px' + + containerRef.current.innerHTML = '' + containerRef.current.appendChild(widget) + setIsLoading(false) + } catch (error) { + console.error('Error initializing widget:', error) + setHasError(true) + setIsLoading(false) + } + } + + // Try immediately first + if (customElements.get('gooddollar-savings-widget')) { + initWidget() + } else { + // Wait for the element to be defined + customElements.whenDefined('gooddollar-savings-widget').then(() => { + initWidget() + }).catch((error) => { + console.error('Custom element error:', error) + setHasError(true) + setIsLoading(false) + }) + + // Timeout fallback after 3 seconds + setTimeout(() => { + if (customElements.get('gooddollar-savings-widget')) { + initWidget() + } + }, 3000) + } } - script.onerror = () => { - console.error('Failed to load savings widget from CDN') + script.onerror = (event) => { + console.error('Failed to load savings widget script', event) setHasError(true) setIsLoading(false) } - if (containerRef.current) { - containerRef.current.appendChild(script) - } + document.head.appendChild(script) + + // Overall timeout fallback + const timeout = setTimeout(() => { + if (!scriptLoadedRef.current) { + console.error('Widget script did not load within timeout') + setHasError(true) + setIsLoading(false) + } + }, 5000) + + return () => clearTimeout(timeout) } catch (error) { console.error('Error loading savings widget:', error) setHasError(true) @@ -67,15 +121,7 @@ const SavingsWidgetContainer: React.FC = () => { } } - loadWidget() - - return () => { - // Cleanup - if (containerRef.current) { - const scripts = containerRef.current.querySelectorAll('script') - scripts.forEach((script) => script.remove()) - } - } + void loadWidget() }, [account]) return ( @@ -90,9 +136,27 @@ const SavingsWidgetContainer: React.FC = () => { )} {hasError && ( - - Unable to load the savings widget. Please try again later. + + Unable to Load Savings Widget + + + The widget script is not available. To enable this feature: + + 1. Clone GoodSDKs/packages/savings-widget + 2. Run: yarn install && yarn build + 3. Copy dist/index.global.js to public/ + 4. Restart the development server + + )}
{ style={{ width: '100%', minHeight: '500px', - display: isLoading || hasError ? 'none' : 'flex', + display: isLoading || hasError ? 'none' : 'block', + position: 'relative', }} /> From 3e104f45fbc8fa66aeeb89e532153dd8945becfc Mon Sep 17 00:00:00 2001 From: Oluwatomilola Date: Thu, 5 Mar 2026 18:18:07 +0100 Subject: [PATCH 4/4] feat: integrate savings widget --- src/pages/gd/Savings/index.tsx | 160 ++++++++++++++++----------------- 1 file changed, 79 insertions(+), 81 deletions(-) diff --git a/src/pages/gd/Savings/index.tsx b/src/pages/gd/Savings/index.tsx index 97533cf57..23c6c70a9 100644 --- a/src/pages/gd/Savings/index.tsx +++ b/src/pages/gd/Savings/index.tsx @@ -35,93 +35,91 @@ const SavingsWidgetContainer: React.FC = () => { }, }) - useEffect(() => { - const loadWidget = async () => { - if (scriptLoadedRef.current) return + const initializeWidget = () => { + try { + if (!containerRef.current) return - try { - setIsLoading(true) - setHasError(false) - - // Load the widget script from public folder - const script = document.createElement('script') - script.src = '/index.global.js' - script.type = 'text/javascript' - script.async = true - - script.onload = () => { - scriptLoadedRef.current = true - - // Use a timeout to ensure the custom element is registered - const initWidget = () => { - try { - if (!containerRef.current) return - - const widget = document.createElement('gooddollar-savings-widget') - if (account) { - widget.setAttribute('account', account) - } - widget.style.width = '100%' - widget.style.minHeight = '500px' - - containerRef.current.innerHTML = '' - containerRef.current.appendChild(widget) - setIsLoading(false) - } catch (error) { - console.error('Error initializing widget:', error) - setHasError(true) - setIsLoading(false) - } - } - - // Try immediately first - if (customElements.get('gooddollar-savings-widget')) { - initWidget() - } else { - // Wait for the element to be defined - customElements.whenDefined('gooddollar-savings-widget').then(() => { - initWidget() - }).catch((error) => { - console.error('Custom element error:', error) - setHasError(true) - setIsLoading(false) - }) - - // Timeout fallback after 3 seconds - setTimeout(() => { - if (customElements.get('gooddollar-savings-widget')) { - initWidget() - } - }, 3000) - } - } + const widget = document.createElement('gooddollar-savings-widget') + if (account) { + widget.setAttribute('account', account) + } + widget.style.width = '100%' + widget.style.minHeight = '500px' + + containerRef.current.innerHTML = '' + containerRef.current.appendChild(widget) + setIsLoading(false) + } catch (error) { + console.error('Error initializing widget:', error) + setHasError(true) + setIsLoading(false) + } + } + + const handleScriptLoad = () => { + scriptLoadedRef.current = true + + // Try immediately first + if (customElements.get('gooddollar-savings-widget')) { + initializeWidget() + return + } + + // Wait for the element to be defined + customElements.whenDefined('gooddollar-savings-widget').then(() => { + initializeWidget() + }).catch((error) => { + console.error('Custom element error:', error) + setHasError(true) + setIsLoading(false) + }) + + // Timeout fallback after 3 seconds + setTimeout(() => { + if (customElements.get('gooddollar-savings-widget')) { + initializeWidget() + } + }, 3000) + } + + const handleScriptError = (event: string | Event) => { + console.error('Failed to load savings widget script', event) + setHasError(true) + setIsLoading(false) + } - script.onerror = (event) => { - console.error('Failed to load savings widget script', event) + useEffect(() => { + if (scriptLoadedRef.current) return + + try { + setIsLoading(true) + setHasError(false) + + // Load the widget script from public folder + const script = document.createElement('script') + script.src = '/index.global.js' + script.type = 'text/javascript' + script.async = true + script.onload = handleScriptLoad + script.onerror = handleScriptError + + document.head.appendChild(script) + + // Overall timeout fallback + const timeout = setTimeout(() => { + if (!scriptLoadedRef.current) { + console.error('Widget script did not load within timeout') setHasError(true) setIsLoading(false) } + }, 5000) - document.head.appendChild(script) - - // Overall timeout fallback - const timeout = setTimeout(() => { - if (!scriptLoadedRef.current) { - console.error('Widget script did not load within timeout') - setHasError(true) - setIsLoading(false) - } - }, 5000) - - return () => clearTimeout(timeout) - } catch (error) { - console.error('Error loading savings widget:', error) - setHasError(true) - setIsLoading(false) - } + return () => clearTimeout(timeout) + } catch (error) { + console.error('Error loading savings widget:', error) + setHasError(true) + setIsLoading(false) } - - void loadWidget() }, [account]) return ( @@ -142,7 +140,7 @@ const SavingsWidgetContainer: React.FC = () => { The widget script is not available. To enable this feature: - + 1. Clone GoodSDKs/packages/savings-widget 2. Run: yarn install && yarn build 3. Copy dist/index.global.js to public/