diff --git a/.gitignore b/.gitignore index 00c88a671..9722eeec3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,3 @@ -<<<<<<< HEAD -# Compiler files -cache/ -out/ - -# Ignores development broadcast logs -======= # ============================================================================= # Environment Variables - CRITICAL: Never commit .env files # ============================================================================= @@ -26,23 +19,14 @@ contracts/foundry-out/ contracts/out/ # Development broadcast logs (keep broadcast structure, ignore specific chains) ->>>>>>> 8b13a35cb03fb14cdb9f34a7b7b429971bb197b8 !/broadcast /broadcast/*/31337/ /broadcast/**/dry-run/ -<<<<<<< HEAD -# Docs -docs/ - -# Dotenv file -.env -======= # ============================================================================= # Hardhat Build Artifacts (if used) # ============================================================================= artifacts/ -cache/ typechain/ typechain-types/ @@ -141,4 +125,3 @@ agents/ *.temp .cache/ .temp/ ->>>>>>> 8b13a35cb03fb14cdb9f34a7b7b429971bb197b8 diff --git a/README.md b/README.md index 8e03d8083..952c2ca8a 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,54 @@ # Hook Bazaar Monorepo +
+
+
+ Code compliance checked by staked operators +
+
+ {compilationResult.bytecodeHash?.slice(0, 18)}...
+
+
+ {compilationResult.deployedBytecodeHash?.slice(0, 18)}...
+
+
+ {avsResult.attestationId.slice(0, 20)}...
+
+
+ + {finding.description} +
+ + {finding.codeLocation && ( +
+ Lines {finding.codeLocation.startLine}-{finding.codeLocation.endLine}
+ {finding.codeLocation.functionName && ` in ${finding.codeLocation.functionName}()`}
+
+ + Your code fully complies with the HookSpec specification +
++ Encrypted bytecode deployed to confidential FHE network +
++ Your hook bytecode has been encrypted and deployed +
+
+ {cfheResult.encryptedContractAddress}
+
+
+
+ {cfheResult.deploymentTxHash}
+
+
+
+ {cfheResult.encryptedBytecodeHash.slice(0, 22)}...
+
+
+ Submit Hook Code
+ + Submit your GitHub repository for AVS verification and CFHE deployment +
++ {licenseInfo.hookName} v{licenseInfo.hookVersion} +
++ #{licenseInfo.tokenId} +
++ {submissionResult.transactionHash.slice(0, 10)}... +
+
+ hook-bazaar submit-code --license {licenseInfo.tokenId} --repo https://github.com/your-repo
+
+
+ Your repository should contain a Uniswap V4 hook implementation.
+ The system will automatically detect hook contracts that extend BaseHook.
+
+ Analyzing repository, verifying with AVS operators, and deploying to CFHE... +
+ + {/* Progress indicators */} ++ View the detailed results below +
+ + {/* Repo Info Summary */} + {verificationResult.repoAnalysis && ( +
+ {verificationResult.repoAnalysis.commitHash.slice(0, 8)}
+
+ + Link your GitHub repository for AVS verification and CFHE deployment +
++ AVS operators are verifying your code against the HookSpec specification... +
+ + {/* Progress Steps */} ++ Define your hook specification, mint license, and deploy verified code +
++ Define your hook's state variables and system functions +
++ {totalVariables} state variables from IStateView (v{model.version}) +
++ {model.ipfsCid} +
+| + Variable + | ++ Symbol + | ++ Type + | ++ Getter + | +
|---|---|---|---|
|
+
+
+ {variable.name}
+
+
+ + {variable.description} + + |
+
+
+
+
+
+
+ |
+
+
+ {variable.type}
+
+ |
+
+
+ {variable.getter}
+
+ |
+
+ No variables match your search +
++ Connect your wallet to submit your HookSpec +
+ ++ Validation Required +
++ Your HookSpec must pass validation before submission +
++ v{hookSpec.metadata.version} +
+ {hookSpec.metadata.description && ( ++ {hookSpec.metadata.description} +
+ )} ++ {hookSpec.hook_state.length} +
++ {hookSpec.system_functions.length} +
++ {hookSpec.invariants?.length || 0} +
+
+ {walletAddress?.slice(0, 6)}...{walletAddress?.slice(-4)}
+
+ + {step.description} +
++ Your hook specification has been registered on-chain +
+
+ {result.ipfsCid.slice(0, 12)}...{result.ipfsCid.slice(-4)}
+
+
+ {result.ownerAddress.slice(0, 6)}...{result.ownerAddress.slice(-4)}
+
+ + {error || 'An unexpected error occurred'} +
++ {allPassed + ? 'Your HookSpec is compatible with the State Space Model' + : `${failedCount} rule${failedCount > 1 ? 's' : ''} failed validation` + } +
++ Passed +
++ Failed +
++ Warnings +
++ Verify deployed code matches registered bytecode for {hookName} +
++ Optionally specify a pool ID to verify deployment for a specific pool +
+{error}
++ {result.verified + ? 'The deployed code matches the registered hook bytecode' + : 'The deployed code does not match the registered bytecode'} +
+
+ {result.obfuscatedBytecodeHash}
+
+
+
+ {result.deployedBytecodeHash}
+
+
+ + Bytecode verification confirms that the deployed hook code matches the registered + obfuscated bytecode stored on the CFHE network. This ensures code integrity and + prevents tampering. +
++ Initialize test will verify the hook's beforeInitialize and afterInitialize + callbacks with default pool parameters. +
++ Test hook behavior and get AVS accuracy report for {hookName} +
+{error}
++ {result.behaviorMatch ? 'Behavior matches specification' : 'Behavior deviates from specification'} +
+Test ID
+{result.testId}
+AVS Verification ID
+{result.avsVerificationId}
+Input Summary
+{result.report.inputSummary}
+Expected Output
+{result.report.expectedOutput}
+Actual Output
+{result.report.actualOutput}
+Gas Used
+{result.report.gasUsed}
+Execution Time
+{result.report.executionTimeMs}ms
+Attesters ({result.attestation.attesters.length})
++ AVS operators will execute your test parameters against the hook and provide + an attestation on the results. The accuracy score reflects how closely the + actual behavior matches the hook specification. +
++ Loading hooks... +
++ No hooks found +
++ Try adjusting your filters or search query +
++ {hook.metadata.description} +
+
+ {hook.developer.slice(0, 6)}...{hook.developer.slice(-4)}
+
+
+
+ {hook.verification.cfheContractAddress.slice(0, 10)}...
+
+ )}
+ >
+ ) : (
+
+
+ {cap.callback}
+
+ + {getCallbackDescription(cap.callback)} +
++ {cap.description} +
+
+ {hook.pricing.currency.slice(0, 6)}...
+
+ + Browse, verify, and subscribe to hooks for your pools +
++ Deploy a new Uniswap v4 pool for Protocol #{protocolId?.toString()} +
++ Manage pools, roles, and metadata for Protocol #{protocolId?.toString()} +
+No pools created yet
++ Create a pool to get started +
+| # | +Pool ID | +Status | +
|---|---|---|
| {index + 1} | +
+
+ {poolId.slice(0, 10)}...{poolId.slice(-8)}
+
+ |
+ + + Active + + | +
+ Grant pool creation permissions to another address. This allows them to create pools + for this protocol. +
+ +{delegateError}
+ )} ++ Set metadata URIs for your protocol. These are publicly visible and help users + discover and verify your protocol. +
+ ++ {protocol.name} (ID: {protocolId}) +
+{adminState.pools.length}
+{protocol.revenue}
++ {Object.keys(adminState.uris).length}/{Object.keys(URI_TYPE_LABELS).length} +
+| Pool ID | +Status | +Actions | +
|---|---|---|
| + {poolId.slice(0, 10)}...{poolId.slice(-8)} + | ++ + Active + + | ++ + | +
+ Configure revenue settings for Protocol #{protocolId?.toString()} +
+