diff --git a/app/utils/etherscanApi.ts b/app/utils/etherscanApi.ts index 6ead866..11965ba 100644 --- a/app/utils/etherscanApi.ts +++ b/app/utils/etherscanApi.ts @@ -1,253 +1,83 @@ -import type { Language, VerificationMethod } from "../types/verification"; import type { VyperVersion } from "../contexts/CompilerVersionsContext"; -import type { SolidityCompilerSettings, VyperCompilerSettings } from "./sourcifyApi"; +import { + EtherscanUtils, + EtherscanImportError, + type EtherscanResult, + type ProcessedEtherscanResult, +} from "@ethereum-sourcify/lib-sourcify"; // Function to convert Vyper short version to long version using pre-loaded versions -export const getVyperLongVersionFromList = (shortVersion: string, vyperVersions: VyperVersion[]): string => { - const foundVersion = vyperVersions.find((version) => version.version === shortVersion); +export const getVyperLongVersionFromList = ( + shortVersion: string, + vyperVersions: VyperVersion[] +): string => { + const foundVersion = vyperVersions.find( + (version) => version.version === shortVersion + ); return foundVersion ? foundVersion.longVersion : shortVersion; }; -// Helper function to generate compiler settings from Etherscan result -const generateCompilerSettings = ( - language: Language, - etherscanResult: EtherscanResult -): SolidityCompilerSettings | VyperCompilerSettings => { - if (language === "solidity") { - const settings: SolidityCompilerSettings = { - optimizerEnabled: etherscanResult.OptimizationUsed === "1", - optimizerRuns: parseInt(etherscanResult.Runs), - }; - - // Only include evmVersion if it's not "default" - if (etherscanResult.EVMVersion.toLowerCase() !== "default") { - settings.evmVersion = etherscanResult.EVMVersion; - } - - return settings; - } else { - // For Vyper, no optimization settings - const settings: VyperCompilerSettings = {}; - - // Only include evmVersion if it's not "default" - if (etherscanResult.EVMVersion.toLowerCase() !== "default") { - settings.evmVersion = etherscanResult.EVMVersion; - } - - return settings; - } -}; - -export interface EtherscanResult { - SourceCode: string; - ABI: string; - ContractName: string; - CompilerVersion: string; - OptimizationUsed: string; - Runs: string; - ConstructorArguments: string; - EVMVersion: string; - Library: string; - LicenseType: string; - Proxy: string; - Implementation: string; - SwarmSource: string; - ContractFileName?: string; -} - -export interface ProcessedEtherscanResult { - language: Language; - verificationMethod: VerificationMethod; - compilerVersion: string; - contractName: string; - contractPath: string; - files: File[]; - compilerSettings?: SolidityCompilerSettings | VyperCompilerSettings; -} - -export interface ProcessEtherscanOptions { - vyperVersions?: VyperVersion[]; -} - -export const isEtherscanJsonInput = (sourceCodeObject: string): boolean => { - return sourceCodeObject.startsWith("{{"); -}; - -export const isEtherscanMultipleFilesObject = (sourceCodeObject: string): boolean => { - try { - return Object.keys(JSON.parse(sourceCodeObject)).length > 0; - } catch (e) { - return false; - } -}; - -export const parseEtherscanJsonInput = (sourceCodeObject: string) => { - // Etherscan wraps the json object: {{ ... }} - return JSON.parse(sourceCodeObject.slice(1, -1)); -}; - -export const isVyperResult = (etherscanResult: EtherscanResult): boolean => { - return etherscanResult.CompilerVersion.startsWith("vyper"); -}; - -export const getContractPathFromSoliditySources = (contractName: string, sources: any): string | undefined => { - // Look for a file that contains the contract definition - for (const [filePath, source] of Object.entries(sources)) { - const content = typeof source === "string" ? source : (source as any).content; - if (content && typeof content === "string") { - // Look for contract definition in the file - const contractRegex = new RegExp(`contract\\s+${contractName}\\s*[\\s\\S]*?\\{`, "g"); - const interfaceRegex = new RegExp(`interface\\s+${contractName}\\s*[\\s\\S]*?\\{`, "g"); - const libraryRegex = new RegExp(`library\\s+${contractName}\\s*[\\s\\S]*?\\{`, "g"); - - if (contractRegex.test(content) || interfaceRegex.test(content) || libraryRegex.test(content)) { - return filePath; - } - } - } - return undefined; -}; - export const fetchFromEtherscan = async ( chainId: string, address: string, - apiKey: string + apiKey: string = "" ): Promise => { - const url = `https://api.etherscan.io/v2/api?chainid=${chainId}&module=contract&action=getsourcecode&address=${address}&apikey=${apiKey}`; - - let response: Response; - try { - response = await fetch(url); + return await EtherscanUtils.fetchFromEtherscan(chainId, address, apiKey); } catch (error) { - throw new Error(`Network error: Failed to connect to Etherscan API`); - } - - if (!response.ok) { - throw new Error(`Etherscan API responded with status ${response.status}`); - } - - const resultJson = await response.json(); - - if (resultJson.message === "NOTOK" && resultJson.result.includes("rate limit reached")) { - throw new Error("Etherscan API rate limit reached, please try again later"); - } - - if (resultJson.message === "NOTOK") { - throw new Error(`Etherscan API error: ${resultJson.result}`); - } - - if (resultJson.result[0].SourceCode === "") { - throw new Error("This contract is not verified on Etherscan"); + if (error instanceof EtherscanImportError) { + // Convert EtherscanImportError to regular Error for compatibility + switch (error.code) { + case "etherscan_network_error": + throw new Error("Network error: Failed to connect to Etherscan API"); + case "etherscan_http_error": + throw new Error( + `Etherscan API responded with status ${(error as any).status}` + ); + case "etherscan_rate_limit": + throw new Error( + "Etherscan API rate limit reached, please try again later" + ); + case "etherscan_api_error": + throw new Error( + `Etherscan API error: ${(error as any).apiErrorMessage}` + ); + case "etherscan_not_verified": + throw new Error("This contract is not verified on Etherscan"); + default: + throw new Error(`Etherscan error: ${error.message}`); + } + } + throw error; } - - return resultJson.result[0] as EtherscanResult; }; export const processEtherscanResult = async ( - etherscanResult: EtherscanResult, - options: ProcessEtherscanOptions = {} + etherscanResult: EtherscanResult ): Promise => { - const sourceCodeObject = etherscanResult.SourceCode; - const contractName = etherscanResult.ContractName; - - // Determine language - const language: Language = isVyperResult(etherscanResult) ? "vyper" : "solidity"; - - // Process compiler version - let compilerVersion = etherscanResult.CompilerVersion; - - if (compilerVersion.startsWith("vyper:")) { - const shortVersion = compilerVersion.slice(6); - // Convert short version to long version for Vyper using pre-loaded versions - if (options.vyperVersions) { - compilerVersion = getVyperLongVersionFromList(shortVersion, options.vyperVersions); - } else { - // Fallback to short version if no versions provided - compilerVersion = shortVersion; - } - } else if (compilerVersion.charAt(0) === "v") { - compilerVersion = compilerVersion.slice(1); - } - - let verificationMethod: VerificationMethod; - let files: File[] = []; - let contractPath: string; - let compilerSettings: SolidityCompilerSettings | VyperCompilerSettings | undefined; - - // Determine verification method and create files - if (isEtherscanJsonInput(sourceCodeObject)) { - // std-json method - compiler settings are already in the JSON input - verificationMethod = "std-json"; - const jsonInput = parseEtherscanJsonInput(sourceCodeObject); + try { + let processedResult; - // Use ContractFileName if available, otherwise search in sources - if (etherscanResult.ContractFileName) { - contractPath = etherscanResult.ContractFileName; + if (EtherscanUtils.isVyperResult(etherscanResult)) { + processedResult = await EtherscanUtils.processVyperResultFromEtherscan( + etherscanResult + ); } else { - const foundPath = getContractPathFromSoliditySources(contractName, jsonInput.sources); - if (!foundPath) { - throw new Error("Could not find contract path in sources"); - } - contractPath = foundPath; + processedResult = + EtherscanUtils.processSolidityResultFromEtherscan(etherscanResult); } - // Create a single JSON file - const jsonContent = JSON.stringify(jsonInput, null, 2); - const jsonFile = new File([jsonContent], `${contractName}-input.json`, { type: "application/json" }); - files = [jsonFile]; - - // For std-json, we don't generate compiler settings since they're in the JSON input - // compilerSettings will be undefined - } else if (isEtherscanMultipleFilesObject(sourceCodeObject)) { - // multiple-files method - verificationMethod = "multiple-files"; - const sourcesObject = JSON.parse(sourceCodeObject) as { [key: string]: { content: string } }; - - // Use ContractFileName if available, otherwise search in sources - if (etherscanResult.ContractFileName) { - contractPath = etherscanResult.ContractFileName; - } else { - const foundPath = getContractPathFromSoliditySources(contractName, sourcesObject); - if (!foundPath) { - throw new Error("Could not find contract path in sources"); - } - contractPath = foundPath; - } - - // Create files from sources object - files = Object.entries(sourcesObject).map(([filename, object]) => { - return new File([object.content as string], filename, { type: "text/plain" }); - }); - - // Generate compiler settings for multiple-files method - compilerSettings = generateCompilerSettings(language, etherscanResult); - } else { - // single-file method - verificationMethod = "single-file"; - const extension = language === "vyper" ? "vy" : "sol"; - - // Use ContractFileName if available, otherwise construct filename - if (etherscanResult.ContractFileName) { - contractPath = etherscanResult.ContractFileName; - } else { - contractPath = `${contractName}.${extension}`; + return { + compilerVersion: processedResult.compilerVersion, + contractName: processedResult.contractName, + contractPath: processedResult.contractPath, + jsonInput: processedResult.jsonInput, + }; + } catch (error) { + if (error instanceof EtherscanImportError) { + // Convert EtherscanImportError to regular Error for compatibility + throw new Error(error.message); } - - const sourceFile = new File([sourceCodeObject], contractPath, { type: "text/plain" }); - files = [sourceFile]; - - // Generate compiler settings for single-file method - compilerSettings = generateCompilerSettings(language, etherscanResult); + throw error; } - - return { - language, - verificationMethod, - compilerVersion, - contractName, - contractPath, - files, - compilerSettings, - }; }; diff --git a/app/utils/sourcifyApi.ts b/app/utils/sourcifyApi.ts index bf9ca01..b33206b 100644 --- a/app/utils/sourcifyApi.ts +++ b/app/utils/sourcifyApi.ts @@ -1,11 +1,13 @@ import type { Language } from "../types/verification"; import { fetchFromEtherscan, processEtherscanResult } from "./etherscanApi"; -import type { VyperVersion } from "../contexts/CompilerVersionsContext"; /** * Custom fetch function for Sourcify API calls that adds client identification headers */ -function sourcifyFetch(url: string, options: RequestInit = {}): Promise { +function sourcifyFetch( + url: string, + options: RequestInit = {} +): Promise { const gitCommit = import.meta.env.VITE_GIT_COMMIT || "dev"; return fetch(url, { @@ -121,13 +123,16 @@ async function submitStandardJsonVerification( ...(creationTransactionHash && { creationTransactionHash }), }; - const response = await sourcifyFetch(`${serverUrl}/v2/verify/${chainId}/${address}`, { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify(payload), - }); + const response = await sourcifyFetch( + `${serverUrl}/v2/verify/${chainId}/${address}`, + { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify(payload), + } + ); if (!response.ok) { const error: VerificationError = await response.json(); @@ -210,13 +215,16 @@ export async function submitMetadataVerification( ...(creationTransactionHash && { creationTransactionHash }), }; - const response = await sourcifyFetch(`${serverUrl}/v2/verify/metadata/${chainId}/${address}`, { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify(payload), - }); + const response = await sourcifyFetch( + `${serverUrl}/v2/verify/metadata/${chainId}/${address}`, + { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify(payload), + } + ); if (!response.ok) { const error: VerificationError = await response.json(); @@ -272,12 +280,15 @@ export async function getVerificationJobStatus( serverUrl: string, verificationId: string ): Promise { - const response = await sourcifyFetch(`${serverUrl}/v2/verify/${verificationId}`, { - method: "GET", - headers: { - "Content-Type": "application/json", - }, - }); + const response = await sourcifyFetch( + `${serverUrl}/v2/verify/${verificationId}`, + { + method: "GET", + headers: { + "Content-Type": "application/json", + }, + } + ); if (!response.ok) { if (response.status === 404) { @@ -295,44 +306,18 @@ export async function submitEtherscanVerification( serverUrl: string, chainId: string, address: string, - apiKey: string, - vyperVersions?: VyperVersion[] // Needed because VyperVersions are stored in the context and needs to be passed in the processEtherscanResult function + apiKey: string ): Promise { - // Fetch data from Etherscan + // Fetch data from Etherscan and process the result const etherscanResult = await fetchFromEtherscan(chainId, address, apiKey); + const processedResult = await processEtherscanResult(etherscanResult); - // Process the result to get files, settings, and contract info - const processedResult = await processEtherscanResult(etherscanResult, { vyperVersions }); - - // Construct contract identifier in the format contractPath:contractName - const contractIdentifier = `${processedResult.contractPath}:${processedResult.contractName}`; - - // Submit verification based on the determined method - if (processedResult.verificationMethod === "std-json") { - // For std-json method, use the first file which should be the JSON file - return await submitStdJsonFile( - serverUrl, - chainId, - address, - processedResult.files[0], - processedResult.compilerVersion, - contractIdentifier - ); - } else { - // For single-file and multiple-files methods, use assembleAndSubmitStandardJson - if (!processedResult.compilerSettings) { - throw new Error("Compiler settings are required for single-file and multiple-files methods"); - } - - return await assembleAndSubmitStandardJson( - serverUrl, - chainId, - address, - processedResult.files, - processedResult.language as Language, - processedResult.compilerVersion, - contractIdentifier, - processedResult.compilerSettings - ); - } + return await submitStandardJsonVerification( + serverUrl, + chainId, + address, + processedResult.jsonInput as StandardJsonInput, + processedResult.compilerVersion, + `${processedResult.contractPath}:${processedResult.contractName}` + ); } diff --git a/package-lock.json b/package-lock.json index 70c8f11..7307136 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,6 +5,7 @@ "packages": { "": { "dependencies": { + "@ethereum-sourcify/lib-sourcify": "^2.3.0", "@headlessui/react": "^2.2.4", "@react-router/node": "^7.5.3", "@react-router/serve": "^7.5.3", @@ -20,6 +21,7 @@ "react-tooltip": "^5.29.1" }, "devDependencies": { + "@ethereum-sourcify/compilers-types": "^1.0.7", "@react-router/dev": "^7.5.3", "@tailwindcss/vite": "^4.1.4", "@types/node": "^20", @@ -519,6 +521,84 @@ "node": ">=6.9.0" } }, + "node_modules/@cbor-extract/cbor-extract-darwin-arm64": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@cbor-extract/cbor-extract-darwin-arm64/-/cbor-extract-darwin-arm64-2.2.0.tgz", + "integrity": "sha512-P7swiOAdF7aSi0H+tHtHtr6zrpF3aAq/W9FXx5HektRvLTM2O89xCyXF3pk7pLc7QpaY7AoaE8UowVf9QBdh3w==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@cbor-extract/cbor-extract-darwin-x64": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@cbor-extract/cbor-extract-darwin-x64/-/cbor-extract-darwin-x64-2.2.0.tgz", + "integrity": "sha512-1liF6fgowph0JxBbYnAS7ZlqNYLf000Qnj4KjqPNW4GViKrEql2MgZnAsExhY9LSy8dnvA4C0qHEBgPrll0z0w==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@cbor-extract/cbor-extract-linux-arm": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@cbor-extract/cbor-extract-linux-arm/-/cbor-extract-linux-arm-2.2.0.tgz", + "integrity": "sha512-QeBcBXk964zOytiedMPQNZr7sg0TNavZeuUCD6ON4vEOU/25+pLhNN6EDIKJ9VLTKaZ7K7EaAriyYQ1NQ05s/Q==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@cbor-extract/cbor-extract-linux-arm64": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@cbor-extract/cbor-extract-linux-arm64/-/cbor-extract-linux-arm64-2.2.0.tgz", + "integrity": "sha512-rQvhNmDuhjTVXSPFLolmQ47/ydGOFXtbR7+wgkSY0bdOxCFept1hvg59uiLPT2fVDuJFuEy16EImo5tE2x3RsQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@cbor-extract/cbor-extract-linux-x64": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@cbor-extract/cbor-extract-linux-x64/-/cbor-extract-linux-x64-2.2.0.tgz", + "integrity": "sha512-cWLAWtT3kNLHSvP4RKDzSTX9o0wvQEEAj4SKvhWuOVZxiDAeQazr9A+PSiRILK1VYMLeDml89ohxCnUNQNQNCw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@cbor-extract/cbor-extract-win32-x64": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@cbor-extract/cbor-extract-win32-x64/-/cbor-extract-win32-x64-2.2.0.tgz", + "integrity": "sha512-l2M+Z8DO2vbvADOBNLbbh9y5ST1RY5sqkWOg/58GkUPBYou/cuNZ68SGQ644f1CvZ8kcOxyZtw06+dxWHIoN/w==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.25.5", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.5.tgz", @@ -944,6 +1024,352 @@ "node": ">=18" } }, + "node_modules/@ethereum-sourcify/bytecode-utils": { + "version": "1.3.12", + "resolved": "https://registry.npmjs.org/@ethereum-sourcify/bytecode-utils/-/bytecode-utils-1.3.12.tgz", + "integrity": "sha512-mSNEj3Gxtq5vhIRTN8VHNhOJZzDZWBKUWP8snqonn28o+4mvKYeZ3YV4Io0JNc2gh+4NOQgGzsavKIcMd3ybpQ==", + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "5.8.0", + "base-x": "4.0.1", + "bs58": "5.0.0", + "cbor-x": "1.6.0", + "semver": "7.7.2" + }, + "engines": { + "node": ">=22.0.0" + }, + "optionalDependencies": { + "fsevents": "2.3.3" + } + }, + "node_modules/@ethereum-sourcify/compilers-types": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@ethereum-sourcify/compilers-types/-/compilers-types-1.0.7.tgz", + "integrity": "sha512-zZAqS3cyBIzlRmq3WhNaFCEN1EbT7IvVK9YXM9ZycxWviNNAQqJTOELXdJbsDS+HgqVqOrmt+AA+eYf0PfBHpA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@ethereum-sourcify/lib-sourcify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ethereum-sourcify/lib-sourcify/-/lib-sourcify-2.3.0.tgz", + "integrity": "sha512-v+/T6iC43rbTLHWOLbfMNJQgDQHn3QEQcGAeb8cIVq6Uwlad1Dgb4RQZiApwfgdA7qtankyZL803KtZC2ELrCw==", + "license": "MIT", + "dependencies": { + "@ethereum-sourcify/bytecode-utils": "^1.3.12", + "@ethereumjs/blockchain": "7.3.0", + "@ethereumjs/common": "4.4.0", + "@ethereumjs/evm": "3.1.1", + "@ethereumjs/statemanager": "2.4.0", + "@ethereumjs/util": "9.1.0", + "@ethereumjs/vm": "8.1.1", + "@ethersproject/bignumber": "5.8.0", + "@ethersproject/bytes": "5.8.0", + "@fairdatasociety/bmt-js": "2.1.0", + "bs58": "5.0.0", + "ethers": "6.15.0", + "jszip": "3.10.1", + "semver": "7.7.2" + }, + "engines": { + "node": ">=22.0.0" + } + }, + "node_modules/@ethereumjs/block": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/block/-/block-5.3.0.tgz", + "integrity": "sha512-cyphdEB/ywIERqWLRHdAS6muTkAcd6BibMOp6XmGbeWgvtIhe4ArxcMDI78MVstJzT/faihvRI4rKQKy+MpdKQ==", + "license": "MPL-2.0", + "dependencies": { + "@ethereumjs/common": "^4.4.0", + "@ethereumjs/rlp": "^5.0.2", + "@ethereumjs/trie": "^6.2.1", + "@ethereumjs/tx": "^5.4.0", + "@ethereumjs/util": "^9.1.0", + "ethereum-cryptography": "^2.2.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@ethereumjs/blockchain": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/blockchain/-/blockchain-7.3.0.tgz", + "integrity": "sha512-UZXFb6JFeXDHobKhXGAiKf+m5n2ynCtqpgHWCl2nQ3Tol9W7C3By4UFMpAl2E6EyaFhC26Maig9kqCWxfsQ6bQ==", + "license": "MPL-2.0", + "dependencies": { + "@ethereumjs/block": "^5.3.0", + "@ethereumjs/common": "^4.4.0", + "@ethereumjs/ethash": "^3.0.4", + "@ethereumjs/rlp": "^5.0.2", + "@ethereumjs/trie": "^6.2.1", + "@ethereumjs/tx": "^5.4.0", + "@ethereumjs/util": "^9.1.0", + "debug": "^4.3.3", + "ethereum-cryptography": "^2.2.1", + "lru-cache": "10.1.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@ethereumjs/blockchain/node_modules/lru-cache": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.1.0.tgz", + "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==", + "license": "ISC", + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/@ethereumjs/common": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-4.4.0.tgz", + "integrity": "sha512-Fy5hMqF6GsE6DpYTyqdDIJPJgUtDn4dL120zKw+Pswuo+iLyBsEYuSyzMw6NVzD2vDzcBG9fE4+qX4X2bPc97w==", + "license": "MIT", + "dependencies": { + "@ethereumjs/util": "^9.1.0" + } + }, + "node_modules/@ethereumjs/ethash": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@ethereumjs/ethash/-/ethash-3.0.4.tgz", + "integrity": "sha512-dDc9h4RxEIWr38DxzeFyWlTmc++WeAFysFT6Ru0opoQ8WSM/hM3KH1VfHMPwx6JaqQT89Q/xtHV3CEvWrbwLKw==", + "license": "MPL-2.0", + "dependencies": { + "@ethereumjs/block": "^5.3.0", + "@ethereumjs/rlp": "^5.0.2", + "@ethereumjs/util": "^9.1.0", + "bigint-crypto-utils": "^3.2.2", + "ethereum-cryptography": "^2.2.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@ethereumjs/evm": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@ethereumjs/evm/-/evm-3.1.1.tgz", + "integrity": "sha512-JbDXtIn0PPZFU2oqVngje0YvW/JuNa6Y+kIYp1MCh5pn9NRplR8FkBbvb991fVSSo6AzuFMHJxSwgVl+OksnvQ==", + "license": "MPL-2.0", + "dependencies": { + "@ethereumjs/common": "^4.4.0", + "@ethereumjs/statemanager": "^2.4.0", + "@ethereumjs/tx": "^5.4.0", + "@ethereumjs/util": "^9.1.0", + "@noble/curves": "^1.4.2", + "@types/debug": "^4.1.9", + "debug": "^4.3.3", + "ethereum-cryptography": "^2.2.1", + "rustbn-wasm": "^0.4.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@ethereumjs/evm/node_modules/@noble/curves": { + "version": "1.9.7", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.7.tgz", + "integrity": "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.8.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@ethereumjs/evm/node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "license": "MIT", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@ethereumjs/rlp": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-5.0.2.tgz", + "integrity": "sha512-DziebCdg4JpGlEqEdGgXmjqcFoJi+JGulUXwEjsZGAscAQ7MyD/7LE/GVCP29vEQxKc7AAwjT3A2ywHp2xfoCA==", + "license": "MPL-2.0", + "bin": { + "rlp": "bin/rlp.cjs" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@ethereumjs/statemanager": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/statemanager/-/statemanager-2.4.0.tgz", + "integrity": "sha512-IBe5kMGsDWlSvNg7QCERwO3BQE1c9hzVIZ9ktZF7xyifFEfA4VNhTMMEpwLuiAIy0l/ZzZiZ17/Iqar+SawMYA==", + "license": "MPL-2.0", + "dependencies": { + "@ethereumjs/common": "^4.4.0", + "@ethereumjs/rlp": "^5.0.2", + "@ethereumjs/trie": "^6.2.1", + "@ethereumjs/util": "^9.1.0", + "debug": "^4.3.3", + "ethereum-cryptography": "^2.2.1", + "js-sdsl": "^4.1.4", + "lru-cache": "10.1.0" + } + }, + "node_modules/@ethereumjs/statemanager/node_modules/lru-cache": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.1.0.tgz", + "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==", + "license": "ISC", + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/@ethereumjs/trie": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/@ethereumjs/trie/-/trie-6.2.1.tgz", + "integrity": "sha512-MguABMVi/dPtgagK+SuY57rpXFP+Ghr2x+pBDy+e3VmMqUY+WGzFu1QWjBb5/iJ7lINk4CI2Uwsih07Nu9sTSg==", + "license": "MPL-2.0", + "dependencies": { + "@ethereumjs/rlp": "^5.0.2", + "@ethereumjs/util": "^9.1.0", + "@types/readable-stream": "^2.3.13", + "debug": "^4.3.4", + "ethereum-cryptography": "^2.2.1", + "lru-cache": "10.1.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@ethereumjs/trie/node_modules/lru-cache": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.1.0.tgz", + "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==", + "license": "ISC", + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/@ethereumjs/tx": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-5.4.0.tgz", + "integrity": "sha512-SCHnK7m/AouZ7nyoR0MEXw1OO/tQojSbp88t8oxhwes5iZkZCtfFdUrJaiIb72qIpH2FVw6s1k1uP7LXuH7PsA==", + "license": "MPL-2.0", + "dependencies": { + "@ethereumjs/common": "^4.4.0", + "@ethereumjs/rlp": "^5.0.2", + "@ethereumjs/util": "^9.1.0", + "ethereum-cryptography": "^2.2.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@ethereumjs/util": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/util/-/util-9.1.0.tgz", + "integrity": "sha512-XBEKsYqLGXLah9PNJbgdkigthkG7TAGvlD/sH12beMXEyHDyigfcbdvHhmLyDWgDyOJn4QwiQUaF7yeuhnjdog==", + "license": "MPL-2.0", + "dependencies": { + "@ethereumjs/rlp": "^5.0.2", + "ethereum-cryptography": "^2.2.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@ethereumjs/vm": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/@ethereumjs/vm/-/vm-8.1.1.tgz", + "integrity": "sha512-h9gIN/maMKXltM4VxZ9ac581PPUUObnFVBniLuu9vJgGTELdnwqxLwJVxSfho/Bhk56YyvKBYf1RpHwoLZZ6xw==", + "license": "MPL-2.0", + "dependencies": { + "@ethereumjs/block": "^5.3.0", + "@ethereumjs/blockchain": "^7.3.0", + "@ethereumjs/common": "^4.4.0", + "@ethereumjs/evm": "^3.1.1", + "@ethereumjs/rlp": "^5.0.2", + "@ethereumjs/statemanager": "^2.4.0", + "@ethereumjs/trie": "^6.2.1", + "@ethereumjs/tx": "^5.4.0", + "@ethereumjs/util": "^9.1.0", + "debug": "^4.3.3", + "ethereum-cryptography": "^2.2.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@ethersproject/bignumber": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.8.0.tgz", + "integrity": "sha512-ZyaT24bHaSeJon2tGPKIiHszWjD/54Sz8t57Toch475lCLljC6MgPmxk7Gtzz+ddNN5LuHea9qhAe0x3D+uYPA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "bn.js": "^5.2.1" + } + }, + "node_modules/@ethersproject/bytes": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.8.0.tgz", + "integrity": "sha512-vTkeohgJVCPVHu5c25XWaWQOZ4v+DkGoC42/TS2ond+PARCxTJvgTFUNDZovyQ/uAQ4EcpqqowKydcdmRKjg7A==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/logger": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.8.0.tgz", + "integrity": "sha512-Qe6knGmY+zPPWTC+wQrpitodgBfH7XoceCGL5bJVejmH+yCS3R8jJm8iiWuvWbG76RUmyEG53oqv6GMVWqunjA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT" + }, + "node_modules/@fairdatasociety/bmt-js": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@fairdatasociety/bmt-js/-/bmt-js-2.1.0.tgz", + "integrity": "sha512-Qm8jCQMijS1rwQIiDRJ4C7CdLXrUl0UVZet/McZ2fhNOk5J+Lhc0vqdF9i+7ZGwhGmTwILhNzcbNFJW1ejBhWw==", + "license": "MIT" + }, "node_modules/@floating-ui/core": { "version": "1.7.1", "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.7.1.tgz", @@ -1696,6 +2122,78 @@ "win32" ] }, + "node_modules/@scure/base": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", + "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "license": "MIT", + "dependencies": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32/node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@solidity-parser/parser": { "version": "0.20.1", "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.20.1.tgz", @@ -2011,6 +2509,15 @@ "url": "https://github.com/sponsors/tannerlinsley" } }, + "node_modules/@types/debug": { + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", + "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", + "license": "MIT", + "dependencies": { + "@types/ms": "*" + } + }, "node_modules/@types/estree": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", @@ -2018,11 +2525,16 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/ms": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz", + "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==", + "license": "MIT" + }, "node_modules/@types/node": { "version": "20.19.1", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.1.tgz", "integrity": "sha512-jJD50LtlD2dodAEO653i3YF04NWak6jN3ky+Ri3Em3mGR39/glWiboM/IePaRbgwSfqM1TpGXfAg8ohn/4dTgA==", - "dev": true, "license": "MIT", "dependencies": { "undici-types": "~6.21.0" @@ -2048,6 +2560,22 @@ "@types/react": "^19.0.0" } }, + "node_modules/@types/readable-stream": { + "version": "2.3.15", + "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-2.3.15.tgz", + "integrity": "sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ==", + "license": "MIT", + "dependencies": { + "@types/node": "*", + "safe-buffer": "~5.1.1" + } + }, + "node_modules/@types/readable-stream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" + }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -2134,6 +2662,12 @@ "dev": true, "license": "MIT" }, + "node_modules/base-x": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.1.tgz", + "integrity": "sha512-uAZ8x6r6S3aUM9rbHGVOIsR15U/ZSc82b3ymnCPsT45Gk1DDvhDPdIgB5MrhirZWt+5K0EEPQH985kNqZgNPFw==", + "license": "MIT" + }, "node_modules/basic-auth": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", @@ -2152,6 +2686,21 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "license": "MIT" }, + "node_modules/bigint-crypto-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/bigint-crypto-utils/-/bigint-crypto-utils-3.3.0.tgz", + "integrity": "sha512-jOTSb+drvEDxEq6OuUybOAv/xxoh3cuYRUIPyu8sSHQNKM303UQ2R1DAo45o1AkcIXw6fzbaFI1+xGGdaXs2lg==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/bn.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.2.tgz", + "integrity": "sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw==", + "license": "MIT" + }, "node_modules/body-parser": { "version": "1.20.3", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", @@ -2234,6 +2783,15 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/bs58": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", + "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", + "license": "MIT", + "dependencies": { + "base-x": "^4.0.0" + } + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -2309,6 +2867,37 @@ ], "license": "CC-BY-4.0" }, + "node_modules/cbor-extract": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cbor-extract/-/cbor-extract-2.2.0.tgz", + "integrity": "sha512-Ig1zM66BjLfTXpNgKpvBePq271BPOvu8MR0Jl080yG7Jsl+wAZunfrwiwA+9ruzm/WEdIV5QF/bjDZTqyAIVHA==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "node-gyp-build-optional-packages": "5.1.1" + }, + "bin": { + "download-cbor-prebuilds": "bin/download-prebuilds.js" + }, + "optionalDependencies": { + "@cbor-extract/cbor-extract-darwin-arm64": "2.2.0", + "@cbor-extract/cbor-extract-darwin-x64": "2.2.0", + "@cbor-extract/cbor-extract-linux-arm": "2.2.0", + "@cbor-extract/cbor-extract-linux-arm64": "2.2.0", + "@cbor-extract/cbor-extract-linux-x64": "2.2.0", + "@cbor-extract/cbor-extract-win32-x64": "2.2.0" + } + }, + "node_modules/cbor-x": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/cbor-x/-/cbor-x-1.6.0.tgz", + "integrity": "sha512-0kareyRwHSkL6ws5VXHEf8uY1liitysCVJjlmhaLG+IXLqhSaOO+t63coaso7yjwEzWZzLy8fJo06gZDVQM9Qg==", + "license": "MIT", + "optionalDependencies": { + "cbor-extract": "^2.2.0" + } + }, "node_modules/chokidar": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", @@ -2456,6 +3045,12 @@ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", "license": "MIT" }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "license": "MIT" + }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -2498,7 +3093,6 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", - "dev": true, "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -2550,7 +3144,7 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.4.tgz", "integrity": "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==", - "dev": true, + "devOptional": true, "license": "Apache-2.0", "engines": { "node": ">=8" @@ -2738,10 +3332,46 @@ "node": ">= 0.6" } }, + "node_modules/ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "license": "MIT", + "dependencies": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "node_modules/ethereum-cryptography/node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/ethereum-cryptography/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/ethers": { - "version": "6.14.4", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.14.4.tgz", - "integrity": "sha512-Jm/dzRs2Z9iBrT6e9TvGxyb5YVKAPLlpna7hjxH7KH/++DSh2T/JVmQUv7iHI5E55hDbp/gEVvstWYXVxXFzsA==", + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.15.0.tgz", + "integrity": "sha512-Kf/3ZW54L4UT0pZtsY/rf+EkBU7Qi5nnhonjUb8yTXcxH3cdcWrV2cRyk0Xk/4jK6OoHhxxZHriyhje20If2hQ==", "funding": [ { "type": "individual", @@ -2752,6 +3382,7 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], + "license": "MIT", "dependencies": { "@adraffy/ens-normalize": "1.10.1", "@noble/curves": "1.2.0", @@ -2959,7 +3590,6 @@ "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, "hasInstallScript": true, "license": "MIT", "optional": true, @@ -3178,6 +3808,12 @@ "node": ">=0.10.0" } }, + "node_modules/immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", + "license": "MIT" + }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", @@ -3219,6 +3855,12 @@ "node": ">=8" } }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "license": "MIT" + }, "node_modules/isbot": { "version": "5.1.28", "resolved": "https://registry.npmjs.org/isbot/-/isbot-5.1.28.tgz", @@ -3261,6 +3903,16 @@ "jiti": "lib/jiti-cli.mjs" } }, + "node_modules/js-sdsl": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.2.tgz", + "integrity": "sha512-dwXFwByc/ajSV6m5bcKAPwe4yDDF6D614pxmIi5odytzxRlwqF6nwoiCek80Ixc7Cvma5awClxrzFtxCQvcM8w==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -3317,6 +3969,57 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/jszip": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", + "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", + "license": "(MIT OR GPL-3.0-or-later)", + "dependencies": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "setimmediate": "^1.0.5" + } + }, + "node_modules/jszip/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/jszip/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" + }, + "node_modules/jszip/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/lie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "license": "MIT", + "dependencies": { + "immediate": "~3.0.5" + } + }, "node_modules/lightningcss": { "version": "1.30.1", "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.30.1.tgz", @@ -3793,6 +4496,21 @@ "node": ">= 0.6" } }, + "node_modules/node-gyp-build-optional-packages": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.1.1.tgz", + "integrity": "sha512-+P72GAjVAbTxjjwUmwjVrqrdZROD4nf8KgpBoDxqXXTiYZZt/ud60dE5yvCSr9lRO8e8yv6kgJIC0K0PfZFVQw==", + "license": "MIT", + "optional": true, + "dependencies": { + "detect-libc": "^2.0.1" + }, + "bin": { + "node-gyp-build-optional-packages": "bin.js", + "node-gyp-build-optional-packages-optional": "optional.js", + "node-gyp-build-optional-packages-test": "build-test.js" + } + }, "node_modules/node-releases": { "version": "2.0.19", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", @@ -3911,6 +4629,12 @@ "dev": true, "license": "BlueOak-1.0.0" }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "license": "(MIT AND Zlib)" + }, "node_modules/parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -4042,6 +4766,12 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "license": "MIT" + }, "node_modules/promise-inflight": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", @@ -4198,6 +4928,20 @@ "react-dom": ">=16.14.0" } }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/readdirp": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", @@ -4262,6 +5006,15 @@ "fsevents": "~2.3.2" } }, + "node_modules/rustbn-wasm": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/rustbn-wasm/-/rustbn-wasm-0.4.0.tgz", + "integrity": "sha512-C2ujvPv05hXC69MD7YwSsoUEsT/X/dKHkkgwN9B0ZTgb0OXDC9yaHhE6Pq+uaRAzMyW0Y97bwc4JO4cqPDzVuQ==", + "license": "(MIT OR Apache-2.0)", + "dependencies": { + "@scure/base": "^1.1.5" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -4298,7 +5051,6 @@ "version": "7.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "dev": true, "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -4376,6 +5128,12 @@ "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==", "license": "MIT" }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", + "license": "MIT" + }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", @@ -4570,6 +5328,15 @@ "integrity": "sha512-QzQxpoacatkreL6jsxnVb7X5R/pGw9OUv2qWTYWnmLpg4NdN31snPy/f3TdQE1ZUXaThRvj1Zw4/OGg0ZkaLMA==", "license": "MIT" }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, "node_modules/string-width": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", @@ -4816,7 +5583,6 @@ "version": "6.21.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", - "dev": true, "license": "MIT" }, "node_modules/universalify": { @@ -4877,6 +5643,12 @@ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, "node_modules/utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", diff --git a/package.json b/package.json index f580c19..1e4e0a8 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "typecheck": "react-router typegen && tsc" }, "dependencies": { + "@ethereum-sourcify/lib-sourcify": "^2.3.0", "@headlessui/react": "^2.2.4", "@react-router/node": "^7.5.3", "@react-router/serve": "^7.5.3", @@ -24,6 +25,7 @@ "react-tooltip": "^5.29.1" }, "devDependencies": { + "@ethereum-sourcify/compilers-types": "^1.0.7", "@react-router/dev": "^7.5.3", "@tailwindcss/vite": "^4.1.4", "@types/node": "^20",