diff --git a/.env.example b/.env.example index 152015f..e3df864 100644 --- a/.env.example +++ b/.env.example @@ -1,5 +1,5 @@ -# 复制本文件为 .env.local 后填写(.env.local 不会被提交) -# 已部署的 Sepolia 合约地址,必须是 0x 开头的 42 位地址 +# Copy this file to .env.local and fill in the values (Git ignores .env.local). +# Deployed Sepolia contract address: 42 characters starting with 0x. VITE_CONTRACT_ADDRESS= -# 可选:只读浏览用的 Sepolia RPC。留空时前端会通过 MetaMask 读取 +# Optional Sepolia RPC for read-only browsing. Leave blank to read through MetaMask. VITE_SEPOLIA_RPC_URL= diff --git a/README.md b/README.md index 397216b..6fd7897 100644 --- a/README.md +++ b/README.md @@ -1,55 +1,16 @@ # MilestoneFund -COMP7610 课程项目:支持者为项目出资,项目方按两个里程碑提交成果。支持者审批通过后,发起人在网页释放和领取阶段款项,第一阶段为 40%,第二阶段为余款。仅使用 Sepolia 测试 ETH。出资封顶于目标金额(超额当场退回);审批或成果提交超时后,支持者可按贡献比例取回剩余托管资金。 +MilestoneFund is a COMP7610 crowdfunding DApp on Ethereum Sepolia. Backers fund a project in escrow and vote on its two milestones using their accepted contributions as voting weight. Once a milestone is approved, it can be released. The first release allocates 40% of the amount raised, rounded down to a whole wei, and the second releases the remainder. -**在线演示** · 在 Explore 可以直接查看 Sepolia 上的项目,包括已完成两阶段拨款的 `Test Project 02`。创建项目、出资、审批或领取款项时,连接 MetaMask,切到 Ethereum Sepolia,并准备测试 ETH 支付 gas。 [打开 MilestoneFund](https://misaka10111.github.io/dapp/) +[Open the live demo](https://misaka10111.github.io/dapp/) · [View the Sepolia contract](https://eth-sepolia.blockscout.com/address/0x5A5AeaE5553Feb5c5b27FEe5ec8b24E3ED2B964F) · [View the deployment transaction](https://eth-sepolia.blockscout.com/tx/0xfd1c8e65e0115251d0904588ede9c19ea28cb75a466931ef34767bf5f7e7133a) -可复跑的本地测试见 [自动化测试说明](docs/automated-testing.md)。初版合约的交易截图和字节码复现保存在 [端到端测试记录](docs/e2e-test-record.md) 和 [部署核对记录](docs/deployment-verification.md)。 +Explore is available without a wallet. Connect MetaMask on **Ethereum Sepolia** (chain ID `11155111`) to create a project, contribute, approve a milestone or claim funds. All transactions use Sepolia test ETH. -## 1. 项目文件 +## Run locally -| 文件 | 用途 | -| --- | --- | -| `contracts/MilestoneFund.sol` | 核心合约:创建项目、出资、审批、提款和退款。在 Remix 部署这个文件。 | -| `src/App.jsx` | 网页页面、表单、钱包连接和交易按钮。 | -| `src/main.jsx` | React 启动入口。 | -| `src/contract.js` | 读取合约地址和 ABI,连接 MetaMask 与 Sepolia。 | -| `src/abi/MilestoneFund.json` | 前端调用合约需要的 ABI,已经与当前合约匹配。 | -| `src/utils.js` | 金额转换、地址显示、链接检查和错误提示。 | -| `src/styles.css` | 电脑网页样式。 | -| `index.html` | 网页入口。 | -| `package.json` | 依赖和启动命令。 | -| `package-lock.json` | 固定依赖版本,让组员安装相同版本。 | -| `.env.example` | 合约地址配置模板。 | -| `.gitignore` | Git 忽略规则。 | -| `scripts/compile-contract.mjs` | 修改合约后,可用它重新编译并更新 ABI;手动测试无需操作。 | -| `tests/milestone-fund.test.mjs` | 本地连续状态测试,覆盖两阶段放款、退款及边界,不连接钱包。 | -| `tests/utils.test.mjs` | 前端工具函数单元测试:金额格式、百分比、40/60 拆分、URL 校验、列表筛选与错误文案。 | -| `tests/wallet.test.mjs` | 钱包与交易测试骨架:钱包发现、网络校验、调用参数与错误映射。 | -| `tests/helpers/fake-wallet.mjs` | 测试用的 EIP-1193 钱包模拟器,可模拟多钱包、拒绝签名与错误链。 | -| `scripts/verify-deployment.mjs` | 只读核对 Sepolia 运行字节码与编译结果,保存可复现证据。 | -| `scripts/check-format.mjs` | 基础格式检查,无需额外依赖。 | -| `.github/workflows/ci.yml` | PR 与 `main` 的自动检查,以及 `main` 的 GitHub Pages 发布。 | -| `README.md` | 本说明文件。 | - -## 2. 安装依赖并启动网页 - -需要安装: - -- **Node.js 22.12 或更高版本**,包含 npm。 -- Git(使用克隆命令时需要;也可从 GitHub 下载 ZIP 并解压)。 -- Chrome 浏览器和 MetaMask 扩展。 - -先安装 [Node.js](https://nodejs.org/),npm 会随 Node.js 一起安装。React、Vite、Ethers 等会通过下面的命令一起安装,无需分别运行安装命令。不需要数据库、后端服务器或 Hardhat。 - -| 依赖 | 用途 | 安装方式 | -| --- | --- | --- | -| React、React DOM | 显示网页 | `npm ci` 一起安装 | -| Ethers v6 | 连接钱包和调用合约 | `npm ci` 一起安装 | -| Vite、React 插件 | 启动和构建前端 | `npm ci` 一起安装 | -| solc 0.8.24 | 可选的本地合约编译和 ABI 更新 | `npm ci` 一起安装;Remix 中单独选择编译器版本 | +Use Node.js **22.12 or later**, npm and a desktop browser. GitHub Actions uses Node.js 22. Install MetaMask and fund your demo accounts with Sepolia test ETH if you plan to send transactions. -克隆 `main` 并安装依赖。 +Clone the repository and install the locked dependencies. ```bash git clone --branch main https://github.com/misaka10111/dapp.git @@ -57,146 +18,113 @@ cd dapp npm ci ``` -按[第 4 节](#4-配置本地网页)填写 `.env.local`,然后在项目根目录启动。 - -```bash -npm run dev -``` - -打开终端显示的网址,通常是 `http://localhost:5173`。保持终端运行,按 Ctrl+C 可以停止。 - -首次下载项目或 `package-lock.json` 变化后运行 `npm ci`。平时启动网页运行 `npm run dev`。 - -## 3. 部署独立测试合约(可选) - -在线演示和日常本地测试使用第 4 节的 Sepolia 合约。需要隔离测试数据时,可以按仓库默认的 **0.8.24 / 优化开启 / Paris** 配置在 Remix 部署一个独立实例。修改合约接口后,先运行 `npm run compile:contract` 更新 ABI。部署完成后,将独立实例地址填入本机的 `.env.local`。 - -1. 在安装 MetaMask 的浏览器中打开 [Remix](https://remix.ethereum.org)。 -2. 新建 `MilestoneFund.sol`,复制仓库中 `contracts/MilestoneFund.sol` 的全部内容。 -3. 在 Solidity Compiler 中选择 **0.8.24**,开启 Optimization,runs 设为 **200**,EVM Version 选择 **paris**,不启用 via-IR,点击 Compile。 -4. 准备两个不同的 MetaMask 账户:**A 为发起人,B 为支持者**。选择 **Ethereum Sepolia**。A 需要测试 ETH 支付 gas;B 需要 **0.01 测试 ETH,另外预留 gas**。 -5. Remix 的 Deploy & Run 中,Environment 选择 **Browser Extension / MetaMask**,旧版可能叫 Injected Provider。核对网络是 Sepolia、账户是 A。 -6. 合约选择 **MilestoneFund**,Value 为 **0**。v2 有**两个构造参数**,按顺序填:`approvalTimeout`、`submissionTimeout`(单位秒,取值 1 到 2592000 即 30 天)。正式使用填 `604800` 和 `604800`(7 天);如果要现场演示超时退款,另部署一个填入 `600` 和 `600`(10 分钟)的演示实例。点击 Deploy,在 MetaMask 确认,等待成功。 -7. 复制 Deployed Contracts 中的**合约地址**,连同部署交易哈希发给组员。不要把钱包地址或交易哈希当成合约地址。 - -也可以先用 Remix VM 的虚拟账户检查合约。**Remix VM 的地址不能填到这个 Sepolia 前端中**,网页交易需要真正部署在 Sepolia。 - -## 4. 配置本地网页 - -在项目根目录创建 `.env.local`。可以从 `.env.example` 复制,也可以直接粘贴以下配置,让本地网页连接到和线上演示相同的合约。 +Create `.env.local` in the repository root using the current demo configuration. ```dotenv VITE_CONTRACT_ADDRESS=0x5A5AeaE5553Feb5c5b27FEe5ec8b24E3ED2B964F VITE_SEPOLIA_RPC_URL=https://ethereum-sepolia-rpc.publicnode.com ``` -该 Sepolia 实例的成果提交和审批窗口各为 10 分钟。`VITE_SEPOLIA_RPC_URL` 用于只读浏览,本地留空时,网页通过已切到 Sepolia 的 MetaMask 读取。保存配置后启动或重启 `npm run dev`,在 Explore 简介下方核对合约地址。 +The RPC URL enables read-only browsing. If it is blank, the frontend reads through MetaMask on Sepolia. Vite exposes `VITE_*` variables to the browser, so use public values in these fields. Git ignores `.env.local`. -前端的 `VITE_*` 配置会随构建发送到浏览器,请只填公开信息。`.env.local` 已加入 Git 忽略规则。 +```bash +npm run dev +``` + +Open the URL printed by Vite, normally `http://localhost:5173`. Check that Explore shows the contract address above. Restart Vite after editing `.env.local`. -## 5. 手动测试:完成一次成功流程 +## Demonstrate the workflow -每笔交易都等确认后再继续。切换 MetaMask 账户后,先检查网页显示的地址是否正确,必要时点 Refresh。 +Use three MetaMask accounts for the walkthrough. **A** creates the project and claims payouts. **B** and **C** contribute and vote. Each account needs test ETH for gas, and the backers also need the amounts below. Wait for each transaction to confirm and check the connected address after switching accounts. -| 步骤 | 操作 | 预期结果 | +| Step | Action | Expected result | | --- | --- | --- | -| 1 | A 创建项目:目标 **0.01 ETH**,截止选明天,填写名称、简介和两个阶段目标。 | 显示 Funding,已筹金额为 0。 | -| 2 | B 打开该项目,出资 **0.01 ETH**。 | 显示 Successful,已筹和托管金额均为 0.01,停止接受出资。 | -| 3 | A 提交第一阶段成果说明和真实 GitHub/Demo 链接。 | 成果可查看,阶段显示 In review。 | -| 4 | B 审批第一阶段。 | 赞成权重 100%,显示 Approved。 | -| 5 | A 点击 **Release & withdraw**,释放并提取第一阶段资金。 | 提取 **0.004 ETH**,托管剩 **0.006 ETH**。 | -| 6 | A 提交第二阶段成果和链接。 | 第二阶段显示 In review。 | -| 7 | B 审批第二阶段。 | 第二阶段显示 Approved。 | -| 8 | A 点击 **Release & withdraw**,释放并提取第二阶段资金。 | 提取 **0.006 ETH**,托管余额为 0,项目显示 Completed。 | -| 9 | 刷新网页并重新打开项目。 | 完成状态及提款记录仍然正确。 | -| 10 | 打开页面中的交易链接。 | Sepolia Etherscan 能查到真实成功交易。 | +| 1 | A creates a project with a **0.0001 ETH** target, a future funding deadline and two milestone goals. | The project appears as **Funding**. | +| 2 | B and C each contribute **0.00005 ETH**. | The project reaches its target and becomes **Successful**. | +| 3 | A submits a milestone 1 summary and an HTTP or HTTPS evidence link. B approves, then C approves. | B's vote represents exactly **50%**, so the milestone remains in review. C's vote takes the total above 50% and the milestone becomes **Approved**. | +| 4 | A clicks **Release to creator balance** for milestone 1. | A can claim **0.00004 ETH**. The remaining **0.00006 ETH** stays in escrow and milestone 2 opens. | +| 5 | A clicks **Withdraw payout**, keeping A as the recipient. | A claims **0.00004 ETH** in a separate transaction; the claimable balance becomes zero. | +| 6 | A submits milestone 2 evidence. B approves, then C approves. | The approval weight rises from **50%** to **100%** and milestone 2 becomes **Approved**. | +| 7 | A clicks **Release to creator balance** for milestone 2. | The project becomes **Completed**, escrow is zero and **0.00006 ETH** remains available to claim. | +| 8 | A clicks **Withdraw payout**, then refreshes the page. | A claims the remaining **0.00006 ETH**. The page retains **Completed**, both milestones are **Released**, and no payout remains available. | -网页应显示钱包确认中、交易处理中、成功或失败提示。保存项目 ID、交易哈希和截图。钱包余额变化包含 gas,检查提款金额主要看页面记录和交易事件。 +This separate release-and-claim workflow was manually completed on **2026-11-07** for **Test Project 03 (#002)**. The [acceptance record](docs/e2e-test-record.md) contains all **13 confirmed transactions**, state snapshots and screenshots. **Completed** means both allocations have been released from escrow; the creator can still have a payout to claim, as step 7 demonstrates. -步骤 5 也可以由 A 点击 **Release to creator balance**,开启第二阶段并将 **0.004 ETH** 计入自己的待领取余额,再点击 **Withdraw payout** 领取。两笔交易均由 A 签名并支付 gas。收款地址留空时发到 A 的钱包,也可以填写其他收款地址。若收款地址拒收 ETH,余额保留,A 可更换地址后重试。 +A can alternatively choose **Release & withdraw** to release and collect an approved milestone in one transaction. **Withdraw payout** also supports a different recipient. Contributions are capped at the target, with any excess returned in the same transaction. These alternatives were not exercised in the recorded November 7 browser walkthrough; see the acceptance record for the remaining manual checks. -## 6. 主要测试功能 +The website shows release controls to the creator, whose account pays gas for that transaction. The on-chain `releaseMilestone` function allows any account to release an eligible stage. `withdrawMilestone` and `claimPayout` require the creator. -不同场景尽量创建新项目,记录“通过、失败或未测试”。 +### Time windows and refunds -| 测试功能 | 操作和预期 | -| --- | --- | -| 钱包与网络 | 连接钱包、切换 A/B、切换网络。地址、角色按钮和 Sepolia 提示应更新。 | -| 创建与读取 | 创建后刷新,名称、目标、截止时间和两个阶段目标应保持一致。 | -| 输入检查 | 空必填项、零/负金额、过去的截止时间不能成功提交。 | -| 多次出资 | 目标 0.01,B 先出 0.003,再出 0.007。累计应为 0.01,项目成功。 | -| 发起人不能自投 | A 打开自己的项目,应看到限制提示;在 Remix VM 直接调用也应失败。 | -| 超额及封顶 | 目标 0.01,B 出 0.012。只接受 0.01,0.002 当场退回,两阶段预算为 0.004 和 0.006。 | -| 审批超时退款 | 每阶段从提交成果起计算审批截止时间。到期后未通过的阶段拒绝新投票,支持者可按出资比例领取退款。 | -| 提交超时退款 | 第一阶段从达标起算,第二阶段从第一阶段释放时起算。到期后拒绝提交,切换两位支持者依次领取,确认第二位的报价不受首笔退款影响。 | -| 成果与权限 | 只有发起人能提交成果,同阶段不能重复提交或修改。 | -| 加权审批 | 恰好 50% 不通过,严格超过 50% 立即通过。详见下方示例。 | -| 释放与提款权限 | 审批通过后,网页向 A 显示释放按钮,向 B 显示等待发起人释放。链上的 `releaseMilestone` 允许任何账户主动释放,领取已释放款项由发起人签名。已释放的阶段不能重复释放。 | -| 阶段顺序 | 第一阶段释放后即可提交第二阶段。已计入发起人待领取余额的金额不参与退款。 | -| 重复操作 | 重复投票、提款或成果提交应失败,不改变金额或权重。 | -| 拒绝签名 | 在 MetaMask 拒绝交易,应显示拒绝提示并允许重试,不能显示成功。 | -| 刷新恢复 | 刷新后,金额、成果和状态应从合约正确读回。 | +| Window | Opens when | Duration on the live contract | +| --- | --- | --- | +| Milestone 1 submission | Accepted funding reaches the target | 10 minutes | +| Milestone 2 submission | Milestone 1 is released | 10 minutes | +| Approval for either milestone | Its evidence is submitted | 10 minutes | -网页会隐藏或禁用不允许的操作。验证合约本身是否拒绝时,请在 **Remix VM** 中选对应账户直接调用。只有 `contribute` 需要填写 Remix 的 Value,其他调用要把 Value 改回 **0**。项目编号从 0 开始;第一阶段参数是 0,第二阶段是 1。 +The contract uses the block timestamp. Evidence and approvals must be included in a block before their deadline. A milestone approved in time can be released after its approval window ends. -提交成果和投票都必须在链上截止秒之前确认。到达截止秒时,未完成的提交或审批窗口关闭,符合条件的支持者可以退款。已在截止前批准的阶段仍可在之后释放。网页通过 `getMilestoneWindow` 读取当前截止时间和开关状态。 +- **Funding target missed.** After the funding deadline, any account can click **Finalize funding**. Backers can then use **Claim refund** to recover their full accepted contributions. +- **Funded project times out.** If the current milestone misses its submission or approval deadline, backers can use **Claim refund** once the page confirms expiry on-chain. The first claim fixes the remaining escrow pool and marks the project **Expired**. Each backer receives their share of that pool in proportion to their accepted contributions, rounded down to a whole wei. Amounts already released to the creator's balance are outside the pool. -短超时演示可使用两个均有出资的支持者账户。倒计时归零后,等页面确认链上已截止,再用第一位支持者领取。核对交易成功提示的实付金额,切换到第二位支持者,确认其可领金额仍与首笔领取前一致。筹款失败的退款为全额出资,里程碑超时退款按未放款的托管金额计算。 +The recorded demo also shows **Test Project 02 (#001)** as completed and **Test Project 01 (#000)** as expired with refunds open. Those project cards alone do not establish that refunds were claimed. Use the transaction links in the acceptance record to inspect the verified **#002** workflow separately from gas fees. -**50% 边界测试(Remix VM):** +## Architecture and repository layout -1. A 创建目标 **100 wei** 的项目,B/C 为支持者,D 为无关账户。deadline 输入未来的 Unix 秒数,可在浏览器控制台计算 `Math.floor(Date.now() / 1000) + 3600` 后复制数值。 -2. B 和 C 各出 50 wei,A 提交第一阶段成果。 -3. D 调用 `approveMilestone(id, 0)` 应失败,因为 D 没有出资。 -4. B 审批后,`getMilestone(id, 0)` 的 approvalWeight 为 50、approved 为 false。B 再次投票应失败,A 此时不能提款。 -5. C 审批后,approved 立即变为 true;之后不能继续投票。 -6. A 提取第一阶段 40 wei,托管剩 60 wei;再完成第二阶段提交、两人审批和剩余 60 wei 提款。 +React and Vite provide the static frontend. Ethers.js reads the contract through the configured RPC and uses MetaMask for signed transactions. The contract stores projects, voting weights and escrow balances on Sepolia. It records evidence descriptions and URLs, while backers review the linked work themselves. -**失败退款测试(网页 + Sepolia):** +| Path | Responsibility | +| --- | --- | +| [`contracts/MilestoneFund.sol`](contracts/MilestoneFund.sol) | Funding, milestone approval, payout and refund rules. | +| [`src/App.jsx`](src/App.jsx) and [`src/styles.css`](src/styles.css) | Project views, wallet actions and interface styling. | +| [`src/contract.js`](src/contract.js) and [`src/abi/MilestoneFund.json`](src/abi/MilestoneFund.json) | Contract configuration, providers and the interface used by the frontend. | +| [`tests/`](tests/) | Contract scenarios and frontend unit tests. | +| [`.github/workflows/ci.yml`](.github/workflows/ci.yml) | Pull request checks and GitHub Pages deployment from `main`. | -1. 新建目标 **0.02 ETH** 的项目,截止至少设为 5 分钟后,B 只出 **0.003 ETH**。 -2. 等截止后,页面显示 Awaiting finalization,不能继续出资。截止本身不会自动把链上状态改为 Failed。 -3. A 或 B 点击 **Finalize funding**,等确认后显示 Failed。 -4. B 点击 **Claim refund**,应返还原始出资 0.003 ETH,托管余额变 0;历史筹款总额仍为 0.003。 -5. 刷新后仍是已退款,不能重复领取。另可在 Remix VM 检查提前确认失败、提前退款、重复退款以及成功项目退款均被拒绝。 +## Build and verify -**多项目隔离(Remix VM):** 创建 P、Q 两个目标均为 100 wei 的项目。B 为 P 出 100 wei,C 为 Q 出 30 wei。P 完成第一阶段提款后,P 剩 60、Q 仍为 30。Q 截止后确认失败并退款,P 应仍剩 60。一个项目的出资和审批记录不能影响另一个项目。 +```bash +npm run format:check +npm test +npm run build +``` -给组员反馈时写明:测试版本/提交、操作系统和浏览器、合约地址和网络、项目 ID、通过/失败/未测项目、复现步骤及交易哈希/截图。不要包含私钥或助记词。 +Run these commands after `npm ci`. The recorded regression run passed **124 tests**: 30 contract tests, 81 frontend utility/wallet tests and 13 deployment-verifier tests. Tests use a local EVM, simulated wallet calls and saved deployment fixtures. The build writes the production frontend to `dist/`. Run `npm run preview` to serve that build locally. -## 7. 其他命令和常见问题 +GitHub Actions installs dependencies, checks formatting, runs tests and builds the app. Successful runs on `main` publish the build to GitHub Pages with the `/dapp/` base path. For a separate Pages setup, choose **GitHub Actions** as the publishing source and configure the two repository variables shown in [Run locally](#run-locally). -```bash -npm test # 运行合约状态测试和前端单元测试 -npm run test:contract # 只跑合约状态测试 -npm run test:unit # 只跑前端单元测试 -npm run verify:deployment # 只读核对现有 Sepolia 合约,成功时输出 full-match -npm run build # 检查正式构建,生成 dist -npm run compile:contract # 修改 Solidity 后重新生成 ABI -npm run format:check # 基础格式检查:尾随空白、Tab 缩进、末尾换行、行尾混用、JSON 有效性 -``` +See the [automated testing notes](docs/automated-testing.md), [manual acceptance record](docs/e2e-test-record.md) and [deployment verification](docs/deployment-verification.md) for evidence and scope. The current deployment matches the local executable after substitutions at compiler-declared immutable locations; its metadata does **not** match. This is reported as `immutable-substitution-match`, not a full runtime match. To repeat the read-only check and save a new evidence bundle, run `npm run verify:deployment`. -向 `main` 提交 PR 或推送到 `main` 时,GitHub Actions 会安装依赖、检查格式、运行测试并构建前端。PR 必须通过 `quality-gate` 才能合并。`main` 通过检查后,CI 将以 `/dapp/` 为基础路径构建的 `dist` 发布到 GitHub Pages。 +The [October 21 simulation report](TEST-REPORT.md) and older deployment records are historical evidence for a different contract instance. Raw evidence, including original on-chain text and user quotations, is preserved verbatim; the submission documentation is in English. -首次启用时,在仓库 **Settings → Pages** 将 **Source** 设为 **GitHub Actions**。再到 **Settings → Secrets and variables → Actions → Variables** 新建第 4 节的两个仓库变量。合并后在 **Actions → CI → Deploy to GitHub Pages** 查看网址。也可以手动在 `main` 运行 **CI** 重新发布。 +## Deploy a separate Sepolia contract -新增测试依赖后先运行一次 `npm ci`。`npm test` 现在跑两部分:合约状态测试在进程内的虚拟环境执行签名交易,初始化资金、部署合约并连续操作,无需 MetaMask、RPC 或测试 ETH,每次从干净状态开始,两套编译配置都在 Osaka VM 中运行,分别覆盖仓库默认构建和现有部署的复现构建;前端单元测试只跑纯函数和模拟钱包,不读 `.env.local`、不连网、不依赖当前时间,因此结果稳定可复跑。React 组件级的回归测试尚未接入,`tests/helpers/fake-wallet.mjs` 为下一步准备了可复用的钱包模拟器。 +Use this procedure to create an independent instance for your own campaigns. -`verify:deployment` 需要联网读取 Sepolia,但不签名或发送交易,也不修改前端 ABI。它将证据写入 `docs/evidence/deployment/`,默认使用新文件名;仅完整运行字节码匹配才返回退出码 0。详细命令及结果解释见上面的两个记录文件。 +1. Open [Remix](https://remix.ethereum.org/) and add [`MilestoneFund.sol`](contracts/MilestoneFund.sol). +2. Match the repository compiler settings. Select Solidity **0.8.24**, enable optimisation with **200 runs** and choose **Paris** as the EVM target. +3. In **Deploy & Run**, select the browser wallet environment and connect MetaMask to **Ethereum Sepolia**. Select `MilestoneFund` and set the deployment value to **0**. Supply `approvalTimeout` and `submissionTimeout`, in that order, in seconds. Use `600` for each to reproduce the demo windows. +4. Confirm deployment and set `VITE_CONTRACT_ADDRESS` in `.env.local` to the new contract address. Restart the frontend. If you change the contract interface, run `npm run compile:contract` to regenerate the frontend ABI. -`simulate-tests.mjs` 和 `TEST-REPORT.md` 保留为 2026-10-21 的历史模拟验收;旧脚本依赖当时的链上项目数量和状态,不能作为稳定的持续测试入口。日常回归使用 `npm test`。 +See the [Remix deployment guide](https://remix-ide.readthedocs.io/en/latest/run.html) for the wallet connection and deployment controls. -修改 Solidity 后,要重新编译并更新 ABI、在 Remix 重新部署、替换前端地址。当前源码未修改时,无需重新生成 ABI。 +## Troubleshooting -| 问题 | 检查方法 | +| Symptom | Check | | --- | --- | -| 找不到 node/npm | 安装带 npm 的 Node.js,重新打开终端。 | -| 合约未配置 | 检查根目录 .env.local、实际地址,重启 Vite。 | -| 地址没有合约 | 确认是 Sepolia 部署地址,不是钱包或 Remix VM 地址。 | -| 钱包连接失败 | 解锁 MetaMask、选择 Sepolia、检查站点授权。 | -| 余额不足 | A、B 都需要测试 ETH 支付 gas。 | -| 切换账户后按钮不对 | 核对连接地址,刷新;必要时重新连接正确账户。 | +| Explore shows a configuration error | Check `.env.local`, the Sepolia contract address and the RPC URL, then restart Vite. | +| Transaction buttons are unavailable | Unlock MetaMask, select Sepolia and check that the connected account has the required role. | +| A transaction fails near a deadline | Check the latest on-chain state and the submission or approval deadline shown for that milestone. | +| The view looks stale after switching accounts | Confirm the address shown in the header and use **Refresh** in Explore. | -开发时从 `main` 新建分支,通过 PR 合并。仓库保留源码、README 和配置模板,前端构建产物由 CI 发布。 +## Course submission + +The team submits one package for COMP7610. Use the live site and the [local setup](#run-locally) to reproduce the demonstration from this repository. + +| Deliverable | Submission requirement | +| --- | --- | +| Demo video | An English video of up to **15 minutes** in high-resolution **MP4** or **MOV**. Explain the idea, show the core features and include a live demonstration. Include presentation slides if prepared. | +| Project report | A **PDF** covering the background, idea, design, implementation and contribution distribution. | +| Code repository | The complete runnable source and a detailed README with setup and demonstration instructions. | -本项目仅面向电脑浏览器。**真实 Remix/Sepolia 手动验收仍需组员执行。** 首笔成功的超时退款将当时未释放的托管余额固定为退款池。每人按「原始出资 × 固定退款池 ÷ 总筹款」领取,先后顺序不影响金额。每笔退款向下取整到 wei,无法按比例分配的余数留在托管账本中。前端直接显示合约返回的可领金额。 +Each student submits the peer assignment separately. diff --git a/TEST-REPORT.md b/TEST-REPORT.md index fe2ddad..dd51c3d 100644 --- a/TEST-REPORT.md +++ b/TEST-REPORT.md @@ -1,200 +1,208 @@ -# MilestoneFund 测试报告 +# MilestoneFund Historical Test Report -> 本文主要记录 2026-10-21 的历史模拟测试。2026-10-22 已完成 [两条手动端到端流程](docs/e2e-test-record.md)、[本地连续状态测试](docs/automated-testing.md) 和 [完整部署字节码核对](docs/deployment-verification.md)。旧脚本中的实时链上状态假设会随时间失效,日常回归请运行 `npm test`。 +> This report records the historical simulations and UI work from **2026-10-21**, with follow-up notes from 2026-10-22. Its 76 recorded assertions are not the current 124-test regression suite or the new Sepolia acceptance run. Later records cover [manual end-to-end testing](docs/e2e-test-record.md), [local stateful tests](docs/automated-testing.md), and [deployment bytecode verification](docs/deployment-verification.md). The old script imports the current ABI while assuming an older contract layout and live state, so it is not a current acceptance tool. Run `npm test` for current regression testing. Historical results below have not been rerun for this translation. -- **测试对象**:`misaka10111/dapp` 分支 `milestonefunddemo`(commit `HEAD`) -- **合约**:Sepolia `0x9b824CA674432B390E30A5164a76c04EeAa8f686` -- **测试日期**:2026-10-21 -- **测试范围**:合约逻辑(创建 / 出资 / 审批 / 提款 / 退款 / 权限 / 边界)、前端只读流程、构建、交接配置 +- **Subject at the time**: `misaka10111/dapp`, branch `milestonefunddemo` (recorded as commit `HEAD`; no immutable commit hash was recorded) +- **Historical contract**: Sepolia `0x9b824CA674432B390E30A5164a76c04EeAa8f686` +- **Test date**: 2026-10-21 +- **Scope**: contract calls for creation, contributions, approvals, withdrawals, refunds, permissions, and boundaries; the frontend read-only flow, build, and handover configuration --- -## 一、结论 +## 1. Historical conclusions -| 项目 | 结果 | +| Item | Recorded result | | --- | --- | -| 合约逻辑(76 项断言) | **全部通过**,包括审批、提款、退款、50% 边界、超额出资、取整尾差 | -| 前端只读流程(列表 / 详情 / 状态徽章 / 金额) | 正常,读到的链上数据与合约一致 | -| `npm ci` / `npm run build` | 通过(484 kB JS,gzip 165 kB) | -| 合约接口初检 | 13 个 ABI 函数选择器在链上字节码中存在;该检查本身不能证明源码和部署完全一致。后续完整核验见部署核对记录。 | -| **阻塞级问题** | **1 个:群里的合约地址校验和不正确,直接粘贴会让页面完全不可用**(已修复,见第二节) | -| 交接文件缺失 | `.env.example`、`.gitignore`、`vite.config.js` 都不在仓库里,README 的步骤跑不通(已补齐) | +| Simulation and helper checks (76 assertions) | **All recorded as passing**: 45 contract-call assertions and 31 frontend helper assertions. These included approval, withdrawal, refund, fabricated overfunded-state, and rounding cases. See Section 4 for the limits of these checks, including the original 50% boundary claim. | +| Frontend read-only flow (list, details, status badges, amounts) | Displayed chain data matched the contract reads. | +| `npm ci` / `npm run build` | Passed (484 kB JS, 165 kB gzip). | +| Preliminary contract interface check | All 13 ABI function selectors were present in the deployed bytecode. This alone did not establish a complete source-to-deployment match; see the later deployment verification record. | +| **Blocking issue** | **One: the contract address shared in the group had an invalid checksum, making the page unusable when pasted directly.** Fixed as described in Section 2. | +| Missing handover files | `.env.example`, `.gitignore`, and `vite.config.js` were absent, so the README setup steps could not be followed. The files were added. | -当时的 76 项模拟断言及前端只读检查通过,发现的地址和配置问题已处理;模拟结果不能替代连续交易验收、钱包交互测试或完整部署核对。 +The 76 historical assertions and frontend read-only checks were reported as passing, and the address/configuration issues were addressed. These simulations did not replace stateful transaction acceptance, wallet interaction tests, or complete deployment verification. --- -## 二、阻塞问题:合约地址校验和不正确 +## 2. Blocking issue: invalid contract address checksum -群消息里的地址: +The address shared in the group differed from the correct checksum form: -``` -0x9b824CA674432B390E30A5164a76c04eEaa8f686 ← isAddress() = false -0x9b824CA674432B390E30A5164a76c04EeAa8f686 ← 正确(注意 04EeAa 的大小写) +```text +0x9b824CA674432B390E30A5164a76c04eEaa8f686 <- isAddress() = false +0x9b824CA674432B390E30A5164a76c04EeAa8f686 <- correct (note the case of 04EeAa) ``` -这串地址的十六进制数字是对的,但 **EIP-55 大小写校验和算错了**(`04eEaa` 应为 `04EeAa`)。ethers v6 的 `isAddress()` 对混合大小写地址会校验校验和,所以: +The hexadecimal address value was correct, but its **EIP-55 mixed-case checksum was incorrect**: `04eEaa` should have been `04EeAa`. In ethers v6, `isAddress()` validates mixed-case checksums, resulting in: -``` -CONFIGURED = isAddress(CONTRACT_ADDRESS) && ... → false +```text +CONFIGURED = isAddress(CONTRACT_ADDRESS) && ... -> false ``` -页面直接进入"配置异常"分支,显示 `Configuration needs attention / Invalid contract address`,项目列表为空、所有按钮禁用。**表现看起来像"合约没部署"或"代码坏了",实际上是地址字符串大小写的问题。** +The page entered its configuration-error branch, showing `Configuration needs attention / Invalid contract address`, an empty project list, and disabled buttons. This resembled a missing deployment or broken application, although the immediate cause was the address string's casing. -已做两件事: +Two changes were made: -1. **`src/contract.js` 增加容错**:混合大小写校验失败时,用全小写重试一次(十六进制值不变,因此不会指向错误合约)。现在粘贴群里那串地址也能正常工作。 -2. 报告里记录正确写法:`0x9b824CA674432B390E30A5164a76c04EeAa8f686`,或全小写 `0x9b824ca674432b390e30a5164a76c04eeaa8f686`。 +1. **Checksum tolerance in `src/contract.js`**: if mixed-case validation failed, validation retried the lowercase address. This retained the hexadecimal value and made the shared address usable; it did not verify the intended deployment independently. +2. The correct form was documented: `0x9b824CA674432B390E30A5164a76c04EeAa8f686`, or lowercase `0x9b824ca674432b390e30a5164a76c04eeaa8f686`. -> 建议:以后在群里发地址时用代码块或直接发全小写,聊天软件/输入法改大小写是很常见的。 +> Historical sharing recommendation: use a code block or the lowercase form to reduce accidental casing changes. --- -## 三、其他发现(按严重度) +## 3. Other historical findings, by severity -| 级别 | 问题 | 影响 | 处理 | +| Severity | Issue | Impact | Resolution or recommendation at the time | | --- | --- | --- | --- | -| P0 | 仓库里没有 `.env.example` | README 第 4 节 `cp .env.example .env.local` 直接失败,组员不知道要填哪几个变量 | **已补** | -| P0 | 仓库里没有 `.gitignore` | 组员很容易把 `node_modules/`、`dist/`、`.env.local` 提交上去;`.env.local` 一旦进仓库,别人 clone 后会用错地址 | **已补** | -| P1 | 链上字节码与 README 默认编译参数不一致 | 2026-10-22 已纠正早期根据 PUSH0 推断 Shanghai 的结论:完整匹配配置为 solc 0.8.34、优化关闭、Osaka、源码单元 MilestoneFund.sol、LF 换行。完整 runtime 为 15,664 字节,包含 metadata;默认 0.8.24 优化开启/Paris 构建不能复现该实例。选择器存在也不能单独证明“功能无影响”。 | 已补只读核验脚本、Standard JSON 输入与完整匹配证据;详见部署核对记录,无需重部署现有实例。 | -| P2 | 缺 `vite.config.js` | `@vitejs/plugin-react` 装了但从未启用:没有 HMR,改代码要手动刷新;且 JSX 走经典运行时,新组件忘了 `import React` 会报错 | **已补** | -| P2 | 不配 `VITE_SEPOLIA_RPC_URL` 时,**只读浏览也依赖 MetaMask** | `readProvider()` 在 RPC 为空时回落到 `BrowserProvider`,没装钱包/没切 Sepolia 的组员连项目列表都看不到,报错信息也不直观 | 建议 README 里把 RPC 那行标成"强烈建议填",或内置一个公共 RPC 兜底 | -| P3 | Funding 阶段就显示 `Budget after successful funding: 0.0002 ETH` | 这个数字是按**当前已筹**算的,还会随新出资变化,容易被当成最终预算 | 已修复:改为 Projected budget,并注明 "based on X ETH raised so far",无出资时显示 `—` | -| P3 | 交易提示条不会自动消失 | 上一次的失败提示会一直挂在页面上 | 已修复:改为右下角 toast,成功 7 秒 / 失败 12 秒自动收起,也可手动关闭 | -| P3 | `body { min-width: 1000px }` | 小屏幕横向滚动 | 已修复:去掉最小宽度,加 1000px / 720px 两个断点,430px 可用 | -| P3 | 详情面板在项目列表下方 | 点卡片后要自己往下滚才能看到详情,选中态也不明显 | 已修复:选中后平滑滚动到详情,卡片显示蓝色描边,详情可关闭 | -| P3 | 顶部品牌名 `href="#"` | 点击会跳到页面顶部并改写 URL hash | 已修复:改为 button | +| P0 | Missing `.env.example` | The README's `cp .env.example .env.local` step failed, and teammates had no variable template. | **Added.** | +| P0 | Missing `.gitignore` | `node_modules/`, `dist/`, or `.env.local` could be committed accidentally; a shared local configuration could make another clone use an unintended address. | **Added.** | +| P1 | Deployed bytecode differed from the README's default compiler settings | The 2026-10-22 follow-up corrected the early inference of Shanghai from PUSH0. The matching configuration was solc 0.8.34, optimizer disabled, Osaka, source unit `MilestoneFund.sol`, and LF line endings. The complete runtime was 15,664 bytes including metadata; the default solc 0.8.24, optimizer-enabled, Paris build did not reproduce that instance. Selector presence alone could not establish equivalent behavior. | Added a read-only verification script, Standard JSON input, and complete-match evidence; see the deployment verification record. The historical instance did not require redeployment for this mismatch. | +| P2 | Missing `vite.config.js` | `@vitejs/plugin-react` was installed but not enabled. The original report described missing HMR and classic-JSX imports; more precisely, the React plugin was not configured, which alone does not establish that all Vite HMR was unavailable. | **Added.** | +| P2 | Read-only browsing depended on MetaMask when `VITE_SEPOLIA_RPC_URL` was omitted | `readProvider()` fell back to `BrowserProvider`, so users without a wallet or on the wrong network could not reliably load the project list, and errors were unclear. | Recommend a stronger README recommendation to configure RPC, or a public RPC fallback. | +| P3 | Funding projects displayed `Budget after successful funding: 0.0002 ETH` | The amount was based on funds raised so far and changed with new contributions, making it easy to mistake for a final budget. | Changed to Projected budget with `based on X ETH raised so far`; displayed `—` when nothing had been raised. | +| P3 | Transaction banners remained indefinitely | An earlier failure remained visible. | Replaced with bottom-right toasts, dismissed after 7 seconds for success or 12 seconds for failure, with manual dismissal. | +| P3 | `body { min-width: 1000px }` | Small screens required horizontal scrolling. | Removed the minimum width and added 1000px / 720px breakpoints; checked at 430px. | +| P3 | Details appeared below the project list | Selecting a card required manual scrolling, and selection was unclear. | Added smooth scrolling to details, a blue selected-card outline, and a close button. | +| P3 | The brand link used `href="#"` | Clicking jumped to the page top and changed the URL hash. | Replaced with a button. | --- -## 四、测试是怎么做的(不用测试币) +## 4. Historical test method without test ETH -千鳥卡住的地方是"审批、提款、退款没测完,Sepolia 测试币不够"。这两个流程都需要**多笔真实交易 + 两个账户**,没有币确实测不动。 +Chidori reported that approval, withdrawal, and refund testing was incomplete because Sepolia test ETH was insufficient. Those manual flows required multiple transactions and at least two accounts. -这里换了个办法:**用 `eth_call` + state override,把链上真实的 runtime bytecode 放到一个测试地址上,手工构造出"已达标 / 已提交成果 / 已投票 / 已过期"等状态,再调用函数看它是否按预期通过或 revert**。`eth_call` 不广播、不花 gas、不需要私钥,但执行的是**同一份部署在链上的字节码**,所以能验证 require 条件、金额计算和状态机。 +The alternative used **`eth_call` with state overrides**. The script fetched the deployed runtime bytecode, placed it at a synthetic test address, and supplied fabricated storage for funded, evidence-submitted, voted, or expired scenarios. It then checked whether individual calls succeeded or reverted. These calls did not broadcast transactions, spend gas, or require a private key. -- **A 组(16 项)**:直接对真实合约的真实状态调用,验证权限和参数校验。 -- **B 组(29 项)**:构造状态,验证审批 / 提款 / 退款 / 阶段顺序 / 重复操作。其中"提款金额"用**托管余额探针**验证:例如总额 100 wei 时,托管放 39 wei 必然下溢 revert、放 40 wei 刚好成功,即可确认第一阶段金额确实是 `floor(2×100/5)=40`。 -- **C 组(31 项)**:前端 `src/utils.js` 与合约公式对齐(40/60 拆分 317 组金额逐一比对、`positiveEth` 非法输入、`safeUrl` 伪协议、错误信息映射)。 +- **Part A (16 assertions)**: calls against the real deployed contract and its state at the time, checking permissions, parameters, and a simulated creation result. +- **Part B (29 assertions)**: fabricated-state calls covering approval, withdrawal, refund, milestone ordering, and repeated operations. Amount probes compared calls with different escrow balances: for example, a total of 100 wei with 39 wei escrow was expected to fail, while 40 wei was expected to succeed, consistent with a first-stage budget of `floor(2 × 100 / 5) = 40`. +- **Part C (31 assertions)**: frontend `src/utils.js` checks, including a 40/60 formula comparison across 317 amounts, invalid `positiveEth` inputs, `safeUrl`, error-message mapping, and project filters. The 317 amounts were compared to a locally calculated formula, not to 317 on-chain calls. -### 结果汇总 +**Evidence limits:** each `eth_call` was independent and did not preserve changes for the next call. The script did not inspect post-call storage or actual recipient transfers. Its generic `revert` expectation accepted any caught error, so amount probes did not specifically prove an arithmetic-underflow panic. The original summary's exact-50% boundary claim was not directly asserted by this script. Likewise, clearing escrow, preserving `totalRaised` after refunds, and paying the entire remaining balance were intended behaviors, not post-state results established here. Fabricated overfunding tested withdrawal calculations from supplied state, not a real overfunding contribution transaction. -``` +### Recorded result summary + +```text ================ 76/76 passed, 0 failed ================ -A 组 16/16 B 组 29/29 C 组 31/31 +Part A 16/16 Part B 29/29 Part C 31/31 ``` -代表性用例: +Representative recorded cases, with expectations limited to what the script checked: -| 用例 | 预期 | 结果 | +| Case | Checked expectation | Recorded result | | --- | --- | --- | -| 达标项目:未出资者审批 | revert `Backers only` | PASS | -| 未提交成果时审批 | revert `Approval not open` | PASS | -| 已通过后再次审批 / 重复投票 | revert `Approval not open` / `Already approved` | PASS | -| 阶段未批准时提款 | revert `Milestone not withdrawable` | PASS | -| 阶段已提款再提款 | revert `Milestone not withdrawable` | PASS | -| 非发起人提款 | revert `Creator only` | PASS | -| 总额 100 wei,托管 39 wei 提款 | revert(算术下溢)→ 证明 M1 = 40 wei | PASS | -| 总额 0.012 ETH 超额出资,托管 0.0048-1 提款 | revert → 证明 M1 = 0.0048 ETH | PASS | -| 阶段 2 提款(当前阶段 = 1) | 成功,取走全部剩余托管 | PASS | -| 阶段 1 未提款就提交阶段 2 成果 | revert `Wrong milestone` | PASS | -| 失败项目:支持者退款 | 成功,托管清零、`totalRaised` 保留 | PASS | -| 失败项目:重复退款 / 未出资者退款 | revert `No refund available` | PASS | -| 成功项目退款 / 成功项目 finalize | revert `Project not failed` / `Funding closed` | PASS | -| 过期未达标 finalize | 成功(任何人可调用) | PASS | -| 过期后继续出资 | revert `Deadline reached` | PASS | -| 发起人给自己出资 / 0 金额出资 | revert `Creator cannot contribute` / `Contribution must be positive` | PASS | -| 前端 40/60 预算 vs 合约 `floor(2t/5)` | 317 组金额完全一致 | PASS | - -### 链上现状快照(2026-10-21 19:xx) - -| # | 名称 | 状态 | 目标 | 已筹 | 托管 | 截止时间 | +| Funded project: approval by a non-backer | Revert `Backers only` | PASS | +| Approval before evidence submission | Revert `Approval not open` | PASS | +| Approval after approval / duplicate vote | Revert `Approval not open` / `Already approved` | PASS | +| Withdrawal before milestone approval | Revert `Milestone not withdrawable` | PASS | +| Withdrawal of an already withdrawn milestone | Revert `Milestone not withdrawable` | PASS | +| Withdrawal by a non-creator | Revert `Creator only` | PASS | +| Total 100 wei, escrow 39 wei: withdrawal | Failure, paired with a successful 40 wei probe; consistent with M1 = 40 wei | PASS | +| Fabricated total 0.012 ETH, escrow 0.0048 ETH minus 1 wei: withdrawal | Failure, paired with a successful 0.0048 ETH probe | PASS | +| Milestone 2 withdrawal (`currentMilestone = 1`) | Call succeeds; remaining-balance transfer was not inspected | PASS | +| Submit milestone 2 evidence before milestone 1 withdrawal | Revert `Wrong milestone` | PASS | +| Failed project: backer refund | Call succeeds; escrow clearing and unchanged `totalRaised` were not inspected | PASS | +| Failed project: repeated refund / non-backer refund | Revert `No refund available` | PASS | +| Refund / finalize on a successful project | Revert `Project not failed` / `Funding closed` | PASS | +| Finalize after the deadline without reaching the target | Call succeeds from an unrelated account | PASS | +| Contribute after the deadline | Revert `Deadline reached` | PASS | +| Creator self-contribution / zero contribution | Revert `Creator cannot contribute` / `Contribution must be positive` | PASS | +| Frontend 40/60 budgets versus the local `floor(2t/5)` formula | All 317 amounts match | PASS | + +### Historical chain snapshot (2026-10-21 19:xx) + +Amounts are in ETH. The original snapshot did not specify a timezone. + +| ID | Name | Status | Target | Raised | Escrow | Deadline | | --- | --- | --- | --- | --- | --- | --- | | 0 | DemoProject | Funding | 0.005 | 0.0005 | 0.0005 | 2026-10-22 18:13 | | 1 | Demo project 2 | Funding | 0.0001 | 0 | 0 | 2026-10-22 18:19 | -合约余额 `0.0005 ETH` = 两个项目托管之和,账实相符。两个项目都还是 Funding 状态、没有提交过成果 —— 和"审批/提款/退款还没测"的说法一致。 +The recorded contract balance of `0.0005 ETH` equaled the sum of the two project escrow balances. Both projects were still Funding with no submitted evidence, consistent with the reported absence of completed manual approval, withdrawal, and refund testing at that point. --- -## 五、还需要人工用测试币验证的部分 +## 5. Manual checks outstanding at the time -模拟测试能覆盖 require 条件和金额计算,但**覆盖不到钱包交互本身**。以下建议由有 Sepolia ETH 的同学用两个账户(A 发起人、B 支持者)走一遍: +The simulations did not cover actual wallet interactions. The following checklist was proposed for teammates with Sepolia ETH using two accounts: A as creator and B as backer. It is a historical checklist, not a statement that all these checks remain outstanding today; consult the current end-to-end record for their actual status. -| 场景 | 关注点 | +| Scenario | Expected observation | | --- | --- | -| 真实签名 + 等待确认 | 提示条依次出现"等待钱包确认 → 交易处理中 → 已确认" | -| 在 MetaMask 里点拒绝 | 显示"Request rejected in MetaMask",可以重试,不能显示成功 | -| 余额不足(出资额 > 余额) | 显示"Insufficient Sepolia ETH for the amount and gas" | -| 中途切换账户 / 切换网络 | 地址、角色按钮、Sepolia 提示同步更新;旧账户的"你已投票"状态不残留 | -| 刷新页面 | 金额、成果、审批权重、提款记录从链上正确读回 | -| Etherscan | 每笔交易可查且状态为 Success,金额与页面一致 | -| 完整 0.01 ETH 流程 | 提款 0.004 + 0.006,托管归零,状态变 Completed | +| Real signing and confirmation | Feedback progresses from awaiting wallet confirmation to transaction pending to confirmed. | +| Reject in MetaMask | `Request rejected in MetaMask` appears, retry remains possible, and no success is shown. | +| Insufficient balance (contribution exceeds balance) | `Insufficient Sepolia ETH for the amount and gas` appears. | +| Switch account or network during use | Address, role-specific controls, and network notice update; the previous account's approval indicator does not remain. | +| Refresh the page | Amounts, evidence, approval weight, and withdrawal records reload correctly from chain. | +| Etherscan | Each transaction is visible with Success status and amounts consistent with the UI. | +| Complete a 0.01 ETH flow | Withdraw 0.004 + 0.006 ETH, reduce escrow to zero, and reach Completed. | -前端代码里 `transact()` 已经做了"每次重新取 signer + 校验账户未变 + 等 1 个确认 + 检查 receipt.status",这部分实现是可靠的,主要待验证的是真实钱包下的 UI 反馈。 +The historical code review noted that `transact()` fetched a fresh signer, checked for an account change, waited for one confirmation, and checked `receipt.status`. Those safeguards were present in the reviewed code; they did not by themselves prove correct behavior with a real wallet. --- -## 六、界面改版(第二轮) +## 6. Historical interface redesign -在保证逻辑不变的前提下重做了样式与交互,重点解决"看起来简陋"和"点了卡片像没反应"。 +The styles and interactions were reworked with the intention of preserving application logic, improving the visual presentation, and making card selection clearer. -| 方面 | 改动 | +| Area | Recorded change | | --- | --- | -| 视觉体系 | 统一设计变量(背景、卡片、边框、主色、成功/警告/危险色)、圆角与阴影;标题层级收紧字距;表单聚焦态改为描边 + 光圈 | -| 头部 | 吸顶 + 毛玻璃;品牌图标;导航改为胶囊按钮;网络状态胶囊(未连接灰 / Sepolia 绿 / 错误网络红);已连接时钱包按钮变蓝底显示地址 | -| 首屏 | 主标题 + 一句说明 + 右侧"出资 → 提交成果 → 审批放款"三步卡片;创建页不再显示首屏,直接进表单 | -| 项目卡 | 状态徽章改为带圆点的彩色胶囊(Funding 蓝 / Successful 绿 / Failed 红 / Completed 灰 / 待结算 橙);进度条渐变并按状态换色;卡片悬停浮起、选中显示蓝色描边 | -| 筛选 | 新增"全部 / 我创建的 / 我出资的 / 待我审批"四个筛选,带数量;未连接钱包时禁用并提示;筛选只作用于当前页,无结果时给出明确空状态 | -| 详情 | 选中项目后自动平滑滚动到详情;详情右上角加关闭按钮;关键数字改为四宫格统计卡;阶段卡改为"编号圆点 + 状态胶囊 + 预算/已释放 + 审批进度条" | -| 金额文案 | Funding 阶段不再写死"Budget after successful funding",改为"Projected budget / —",并注明"based on X ETH raised so far",避免把动态值当成最终预算 | -| 反馈 | 交易提示改为右下角浮层 toast,按状态配色,带加载动画、Etherscan 链接和关闭按钮;成功 7 秒、失败 12 秒后自动收起 | -| 加载 | 首次加载显示 4 张骨架卡;列表右上角显示"Updated 20:48:52 · auto-refresh 15s" | -| 响应式 | 去掉 `min-width: 1000px`;1000px 以下单列、720px 以下头部换行、统计卡单列、toast 贴底,430px 宽度可正常使用 | +| Visual system | Shared tokens for backgrounds, cards, borders, primary/success/warning/error colors, radii, and shadows; tighter heading letter spacing; outlined focus states with a glow. | +| Header | Sticky translucent header, brand icon, pill navigation, and network badges: gray when disconnected, green for Sepolia, red for the wrong network. The connected wallet button displayed the address on blue. | +| Introductory section | Title, description, and a three-step contribution → evidence → approval/release guide; omitted on the creation page to show the form directly. | +| Project cards | Dot-and-pill status badges: blue Funding, green Successful, red Failed, gray Completed, and orange awaiting finalization. Gradient progress bars, hover elevation, and a blue selected outline. | +| Filters | All projects / Created by me / I backed / Needs my approval, with counts. Wallet-dependent filters disabled while disconnected, with a hint. Filtering applied to the current page and showed an explicit empty state. | +| Details | Smooth scroll after selection, a close button, four statistic cards, and milestone cards showing a numbered marker, status, budget/released amount, and approval progress. | +| Amount labels | Replaced `Budget after successful funding` during Funding with `Projected budget` or `—`, and clarified the amount raised so far. | +| Feedback | Bottom-right, status-colored toasts with a spinner, Etherscan link, and close button; automatic dismissal after 7 seconds for success and 12 seconds for failure. | +| Loading | Four skeleton cards on initial load and an `Updated 20:48:52 · auto-refresh 15s` label. | +| Responsive layout | Removed `min-width: 1000px`; single-column layout below 1000px, wrapping header and single-column statistics below 720px, and bottom-positioned toasts. Checked at 430px. | -筛选谓词从 `App.jsx` 抽到 `utils.js`(`matchesFilter`),并补了 10 条单元测试,方便后续改动。 +The filter predicate moved from `App.jsx` to `utils.js` as `matchesFilter`, with 10 helper assertions included in the recorded total. -截图见交付目录:`ui-explore.png`(列表)、`ui-detail.png`(详情)、`ui-create.png`(创建)、`ui-connected.png` + `ui-toast.png`(已连接钱包与错误 toast)、`ui-mobile.png`(430px)。 +The original delivery referenced `ui-explore.png` (list), `ui-detail.png` (details), `ui-create.png` (creation), `ui-connected.png` and `ui-toast.png` (connected wallet and error toast), and `ui-mobile.png` (430px). These historical delivery filenames are retained as references; those images are not included in the current repository evidence directory. --- -## 七、本次改动清单 +## 7. Historical change inventory + +This inventory describes the work recorded in the original report, not the changes made by the present translation. -| 文件 | 改动 | +| File | Recorded change | | --- | --- | -| `.env.example` | 新增:`VITE_CONTRACT_ADDRESS` / `VITE_SEPOLIA_RPC_URL` 模板 + 说明 | -| `.gitignore` | 新增:忽略 `node_modules/`、`dist/`、`.env.local`、测试产物 | -| `vite.config.js` | 新增:启用 `@vitejs/plugin-react`,固定端口 5173 | -| `src/contract.js` | 地址校验和容错(大小写不一致时按全小写重试) | -| `src/styles.css` | 重写:设计变量 + 组件样式 + 响应式断点;第二轮:左右分栏、详情栏吸顶滚动、卡片元信息 | -| `src/App.jsx` | 重构布局与交互:首屏、筛选、自动滚动、关闭按钮、toast、骨架屏、更新时间;第二轮:详情右侧常驻栏、卡片倒计时/阶段、合约信息卡 | -| `src/utils.js` | 新增 `matchesFilter()`,供列表筛选与单元测试共用 | -| `simulate-tests.mjs` | 新增:76 项模拟测试(含筛选谓词),`node simulate-tests.mjs` 可复跑 | -| `verify.mjs` | 新增:链上状态 + ABI/字节码一致性检查 | - -> 两个测试脚本只用于测试,不参与前端构建;不想留在仓库里可以直接删。 +| `.env.example` | Added a `VITE_CONTRACT_ADDRESS` / `VITE_SEPOLIA_RPC_URL` template and explanations. | +| `.gitignore` | Added exclusions for `node_modules/`, `dist/`, `.env.local`, and test output. | +| `vite.config.js` | Enabled `@vitejs/plugin-react` and set port 5173. | +| `src/contract.js` | Added lowercase retry for address-checksum validation. | +| `src/styles.css` | Reworked design tokens, component styles, and responsive breakpoints; later added side-by-side columns, sticky scrollable details, and card metadata. | +| `src/App.jsx` | Reworked the introduction, filters, scrolling, close controls, toasts, skeletons, and update time; later added the right-side detail panel, countdowns/milestone positions, and a contract information card. | +| `src/utils.js` | Added `matchesFilter()` for shared list filtering and helper tests. | +| `simulate-tests.mjs` | Added 76 simulation/helper assertions, including filter checks. The original rerun command was `node simulate-tests.mjs`; its old ABI/layout/live-state assumptions make it unsuitable for current regression testing. | +| `verify.mjs` | Added chain-state reads and preliminary ABI-selector/bytecode checks, rather than complete source-to-bytecode verification. | + +> Both scripts were test tools outside the frontend build. The original report described them as optional to retain; they are now retained as historical tooling. Running the simulation script would overwrite `simulation-results.json`. --- -## 八、建议的下一步 +## 8. Next steps proposed in the original report + +These are historical recommendations, not current submission requirements or instructions to configure the newer deployment with the old address. -1. **先修地址**:`.env.local` 用 `0x9b824CA674432B390E30A5164a76c04EeAa8f686`(或拉这次改动,容错已生效)。 -2. **谁有币谁走第五节**,把交易哈希和截图贴回群里 —— 这是目前唯一还缺的一环。 -3. **可选的产品化**:项目详情加"分享链接"(把选中项目写进 URL,刷新后仍能定位);创建页加实时预算预览(输入目标就显示 40/60 两阶段金额)。 -4. **合约层面**(可选,答辩时是加分点):README 已经承认"支持者不审批资金会永久锁定",可以加一个审批截止时间 + 超时后发起人可提取、或支持者可按比例退出。 +1. **Correct the old address**: use `0x9b824CA674432B390E30A5164a76c04EeAa8f686` in `.env.local`, or use the checksum-tolerant code. +2. **Complete the manual checklist in Section 5** with funded test accounts and share transaction hashes and screenshots. The original report called this the remaining acceptance gap at that time; later evidence must be assessed separately. +3. **Optional product improvements**: a shareable project URL that preserves selection after refresh, and a live 40/60 budget preview on the creation form. +4. **Optional contract improvement proposed then**: address the old README's limitation that non-approval could lock funds indefinitely by adding an approval deadline and a timeout path, such as creator withdrawal or proportional backer exit. This was a historical design suggestion, not a validated design or a guarantee of assessment credit. The newer contract's implemented timeout/refund rules supersede that open-ended proposal. --- -## 九、UI 第二轮调整(本次) +## 9. Historical second-round UI adjustments -第一轮把视觉语言定下来了,第二轮解决的是"点了卡片像没反应"和"详情太长要自己滚"这两个实际操作问题: +After the initial visual work, the second round focused on clearer card selection and easier access to long project details. -| 调整 | 原因 | +| Adjustment | Reason | | --- | --- | -| 列表 + 详情改成左右分栏(≥1120px) | 详情常驻右栏并吸顶,点卡片不用再滚动;未选中时右栏显示规则说明,不会空一块 | -| 右栏内容超过视口时内部滚动 | 详情比一屏长,吸顶元素如果不可滚动,底部内容永远看不到 | -| 卡片增加倒计时 / 阶段位置 | 众筹最需要"还剩多久",之前只有绝对时间戳;已结束的项目改显示阶段位置 | -| 卡片底部增加"你已出资"标记 | 组员测试时能一眼看出哪些项目自己参与过 | -| 列表下方加合约信息卡 | 地址可一键复制,顺手填掉分栏后的空白区域;也避免再把地址复制错 | -| 里程碑文案压缩(预算合并成一行、门槛说明缩短) | 右栏变窄后原来两行文案会挤成四行,右栏总高度从 ~1260px 降到 ~1100px | -| 窄屏(≤1120px)自动折叠成单列 | 单列时详情排在列表下方,选中项目后自动滚到详情;未选中时隐藏空占位 | +| Side-by-side list and details at ≥1120px | Kept sticky details in the right column so selection did not require scrolling; an explanation occupied the column when no project was selected. | +| Internal scrolling when the right panel exceeded the viewport | Kept the bottom of a long sticky detail panel reachable. | +| Countdown / milestone position on cards | Showed time remaining during funding, and milestone position afterward. | +| Contribution badge at the bottom of cards | Made projects backed by the connected account easy to identify. | +| Contract information card below the list | Provided one-click address copying and used the space beneath the cards. | +| Shorter milestone copy, including a one-line budget and shorter threshold explanation | Reduced wrapping in the narrower right column; the recorded panel height decreased from about 1260px to about 1100px. | +| Single-column layout on narrow screens (≤1120px) | Placed details below the list, scrolled to them after selection, and hid the empty placeholder. | diff --git a/docs/automated-testing.md b/docs/automated-testing.md index 5c6fccb..a5dea43 100644 --- a/docs/automated-testing.md +++ b/docs/automated-testing.md @@ -1,10 +1,10 @@ -# 连续状态自动化测试 +# Automated Testing -本测试从新部署的合约开始,通过本地签名交易逐步建立真实状态,验证前一步的结果能被后续操作正确使用。它补充 Sepolia 手动测试以及原先的 `eth_call + state override` 模拟测试。 +The contract tests start from a fresh deployment and build state through locally signed transactions, checking that later operations correctly use the results of earlier steps. They complement manual Sepolia testing and the original `eth_call + state override` simulations. -## 运行 +## Run the tests -在项目根目录执行: +From the project root, run: ```powershell npm ci @@ -12,37 +12,51 @@ npm test npm run build ``` -依赖未变化时可直接 `npm test`。执行脚本为 `tests/milestone-fund.test.mjs`,使用 Node 内置测试运行器和 EthereumJS VM,每次创建干净的内存状态。临时账户随机生成并仅存于进程内;不读取钱包密钥、不连接 RPC,不消耗 Sepolia ETH,也不操作已经验收的项目 #002/#003。 +If dependencies have not changed, run `npm test` directly. The contract test entry point, `tests/milestone-fund.test.mjs`, uses Node's built-in test runner and EthereumJS VM, creating clean in-memory state for each test. Temporary accounts are generated randomly and exist only within the process. The tests do not read wallet keys, connect to RPC, consume Sepolia ETH or modify the historical acceptance-test projects #002/#003. `npm test` also runs offline regression tests for frontend utilities, simulated wallets and the deployment verifier. -## 编译和执行配置 +## Compilation and execution settings -| 配置 | 编译器 | 优化 | 编译目标 | 用途 | +| Profile | Compiler | Optimizer | Compilation target | Purpose | | --- | --- | --- | --- | --- | -| repository-default | solc 0.8.24 | 开启,runs 200 | Paris | 仓库现有编译脚本的配置 | -| sepolia-reproduction | solc 0.8.34 | 关闭,runs 200 | Osaka | 已核对的现有 Sepolia 部署配置,源码单元 MilestoneFund.sol,LF 换行 | +| repository-default | solc 0.8.24 | Enabled, 200 runs | Paris | Compiler settings used by the repository's current compilation script and the new Sepolia instance; deployment consistency is verified separately | +| sepolia-reproduction | solc 0.8.34 | Disabled, 200 runs | Osaka | Retains the compiler settings of the old 2026-10-22 deployment, with source unit MilestoneFund.sol and LF line endings; these settings now test the current source and do not reproduce the new deployment | -两套编译配置均在 **Osaka VM / 本地 chain ID 31337** 下执行;没有声称测试了两个不同运行时硬分叉。依赖锁定为 `@ethereumjs/* 10.1.3`,Solidity 编译器分别由 `solc` 与 `solc-deployed` 提供。编译结果的 ABI 会与前端提交的 ABI 比较,防止接口过期。 +Both compilation profiles execute on **Osaka VM / local chain ID 31337**; this does not claim coverage of two different runtime hard forks. Dependencies are pinned to `@ethereumjs/* 10.1.3`, with the Solidity compilers provided by `solc` and `solc-deployed`. The compiled ABI is compared with the committed frontend ABI to detect an outdated interface. -## 场景与判据 +## Scenarios and assertions -5 类连续状态场景各执行两遍,共 10 项测试: +The current contract suite contains 15 scenarios that carry state across successive transactions. Each runs under both compilation profiles, giving 30 tests: -| 场景 | 关键验证 | +| Scenario | Key assertions | | --- | --- | -| 两阶段成功流程 | B 累计出资 50、C 出资 50;恰好 50% 不批准;分别放款 40/60;第二阶段票重从 0 开始,按原总出资作分母;Completed 且托管归零。穿插权限、重复提交/投票/提款和越阶段拒绝。 | -| 超募、舍入和小额 | 目标 100、实收 101,分配 40/61;目标 1、实收 1,第一阶段允许释放 0 并推进,第二阶段释放剩余 1;达标关闭出资、不遗漏尾数。 | -| 多项目资金隔离 | 成功项目先释放 40;失败项目两位支持者各退累计出资 25;成功项目再释放 60。每个中间状态核对合约余额等于两个项目托管总和,记录和退款标志按项目隔离。 | -| 精确截止时间 | 截止前 1 秒可出资、不可 finalize;恰好截止时不可出资、无关账户可 finalize;单纯时间经过不会自动把存储状态变为 Failed。 | -| 收款失败回滚 | 测试接收合约拒收 ETH,提款和退款必须回滚账目;允许收款后原操作能成功,金额、标志和阶段正确恢复。 | +| Successful two-stage flow | B contributes a cumulative 50 and C contributes 50; exactly 50% does not approve a milestone; payouts are 40/60. Second-stage approval weight starts at 0 and uses total original contributions as the denominator. The project reaches Completed with zero escrow. Permission checks, duplicate submissions/votes/withdrawals and attempts to skip stages are interleaved with the successful flow. | +| Contribution cap, excess refunds and small amounts | For a target of 100 and two contributions of 51, only 100 is accepted, the excess 2 is returned in the transaction, and payouts are 40/60. A target of 1 produces payouts of 0/1. Reaching the target closes funding, with no remainder lost. | +| Fund isolation between projects | A successful project first releases 40; two backers in a failed project each reclaim their cumulative contribution of 25; the successful project then releases 60. At every intermediate step, the contract balance equals the two projects' combined escrow, and records and refund flags remain isolated by project. | +| Exact funding deadline | One second before the deadline, contributions are allowed and finalization is rejected. At the deadline, contributions are rejected and an unrelated account can finalize. Time passing alone does not change the stored status to Failed. | +| Rollback when a recipient rejects ETH | A test receiver rejects ETH, so withdrawals and refunds must revert their accounting changes. After receipt is enabled, retrying succeeds with correct amounts, flags and milestone state. | +| Separate release and payout claim | Any account can release an approved milestone, crediting the creator's claimable balance without transferring ETH. Only the creator can claim to a chosen recipient. Claims remain possible after both stages complete; duplicate releases, duplicate claims and invalid recipients are rejected. | +| Rejecting creator and expiry refunds | A creator that rejects ETH does not block release. After the second stage expires and the remaining escrow is refunded, the creator can still claim the first stage's released funds to another address. | +| Mixed payout paths | Crediting the first-stage payout and directly withdrawing the second-stage payout leaves the first-stage balance available to claim. | +| Approval timeout and refund order | Refunds are unavailable before expiry, and new approvals are rejected after expiry. Both possible claim orders for two backers produce the same refund amounts; duplicate refunds are rejected. | +| Second-stage submission timeout | Releasing the first stage starts a new submission window. Refunds use the fixed remaining pool, with checks at the exact deadline and for rounding remainders. | +| Retry after a failed expiry refund | A failed ETH transfer rolls back the refund state and accounting. The refund can be retried after the recipient accepts ETH. | +| Protection for approved milestones | An approved milestone cannot be refunded even after its approval deadline. | +| Timeout without evidence submission | If the creator fails to submit evidence after funding succeeds, late submission is rejected. Backers can claim refunds, changing the project status to Expired. | +| Zero first-stage payout | A zero first-stage payout skips the ETH transfer and advances the project even if the creator rejects ETH. A nonzero second-stage withdrawal still requires a successful transfer. | +| Constructor arguments | Constructor arguments determine the approval and submission timeouts; refunds become claimable when the configured short window expires. | -失败交易检查回执失败、具体 revert 原因、合约 storage root 和余额不变、事件日志丢弃。普通账户的 nonce 和 gas 支出会改变,因此不比较整条链的状态根。成功提款/退款同时比较事件金额、项目余额与收款账户余额,并加回交易实际 Gas 费。 +For failed transactions, the tests check the failed receipt, specific revert reason, unchanged contract storage root and balance, and discarded event logs. Externally owned accounts still incur nonce changes and gas costs, so the tests do not compare the entire chain's state root. Successful withdrawals and refunds are checked against event amounts, project balances and recipient balances, accounting for the transaction's actual gas fee. -`tests/fixtures/PaymentReceiver.sol` 仅用于验证收款失败;它不是生产合约。测试时间由本地块头控制,不需要等待真实截止时间。 +`tests/fixtures/PaymentReceiver.sol` is used only to test rejected payments; it is not a production contract. Test time is controlled through local block headers, so the tests do not wait for real deadlines. -## 结果与范围 +`tests/utils.test.mjs` covers pure functions for amounts, percentages, budgets, URLs, filtering, deadlines and refund display states. `tests/wallet.test.mjs` covers configuration, wallet discovery, network checks, contract reads, call arguments and error mapping. These tests use simulated objects and do not constitute acceptance testing of real MetaMask interactions or React components. The offline regressions in `tests/deployment-verification.test.mjs` check bytecode comparisons and match classifications without accessing Sepolia. -2026-10-22:**10/10 通过,0 失败**。最终执行输出见 [TAP 记录](evidence/automated/continuous-state.tap);复核应以重新运行的输出为准。 +## Results and scope -这是本地合约连续交易测试,不自动覆盖网页布局、MetaMask 确认、RPC 可用性或浏览器刷新。真实 Sepolia 成功流程、失败退款、钱包操作与截图另见 [手动测试记录](e2e-test-record.md)。源码与当前链上部署的一致性由 [独立部署核验](deployment-verification.md) 证明。 +On 2026-11-07, `npm test -- --test-reporter=tap` ran against baseline commit `4a77279` plus the changes on `feature/verify-deployment-evidence`: **124/124 passed, 0 failed, 0 skipped** (21 suites; 30 contract tests, 81 utility and simulated-wallet tests, and 13 deployment-verification regressions). The complete output is in the [current TAP record](evidence/automated/regression-2026-11-07.tap). `npm run build -- --base=/dapp/` also passed. -参考实现 API:[EthereumJS VM 官方文档](https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/vm)。 +Historical baseline: on 2026-10-22, **10/10 passed, 0 failed**. The original [TAP record](evidence/automated/continuous-state.tap) is unchanged. It applies to the old contract and test set and is not evidence that the current 30 contract tests or the added frontend and deployment-verification regressions passed. + +These local tests do not automatically cover page layout, real MetaMask confirmations, RPC availability or browser refreshes. The [manual test record](e2e-test-record.md) contains the new Sepolia success flow's 13 transactions and 13 screenshots, along with historical evidence and the remaining acceptance checks. See [Deployment Verification](deployment-verification.md) for the source match level at a specified address and fixed block. Passing local tests does not replace verification of deployment consistency. + +API reference: [EthereumJS VM documentation](https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/vm). diff --git a/docs/deployment-verification.md b/docs/deployment-verification.md index bb49673..b18eb0e 100644 --- a/docs/deployment-verification.md +++ b/docs/deployment-verification.md @@ -1,88 +1,156 @@ -# 现有 Sepolia 部署复现核对 +# Sepolia Deployment Verification -2026-10-22 已从当前源码复现现有合约的**完整运行时代码,包括 CBOR metadata 尾部**。链上地址为 `0x9b824CA674432B390E30A5164a76c04EeAa8f686`,网络为 Ethereum Sepolia,chain ID `11155111`。 +## Current version: 2026-11-07 -匹配配置是 **Solidity 0.8.34、关闭优化、Osaka、源码单元名 `MilestoneFund.sol`、LF 换行**。仓库原有 `compile:contract` 使用的 **0.8.24、开启优化、Paris** 产生另一份运行时代码,不能用它声称重现了当前实例。该旧配置可继续用于按该配置进行的其他编译或新部署;本次核验保留它和现有 ABI,不要求重新部署当前合约。 +The source baseline is `4a77279`. This update fixes the verification script and adds tests, documentation and evidence; the contract and frontend ABI are unchanged. Verification now uses the compiler's `evm.deployedBytecode.immutableReferences` output to check each immutable variable's complete byte ranges and every occurrence of that variable. All executable bytes outside those ranges must match exactly. A metadata-only difference is not classified as an immutable substitution match. -## 1. 固定区块证据 +| Item | Result of this read-only verification | +| --- | --- | +| Network / contract | Sepolia (11155111) / `0x5A5AeaE5553Feb5c5b27FEe5ec8b24E3ED2B964F` | +| Fixed block | `12081918`, 2026-11-07 14:34:12 (UTC+8) | +| Block hash | `0xbfe3890624a11ff65b401da54ab681175848e71e5e3dd6cbefe6421a2d282752` | +| Compiler settings | Solidity 0.8.24, optimizer enabled / 200 runs, Paris, viaIR disabled | +| Match level / exit code | `immutable-substitution-match` / `0` | +| Immutables | Two variables, each appearing twice: four 32-byte ranges in total, each containing `600` | +| Metadata | `metadataMatch=false`; `fullMatch=false`, `substitutedFullMatch=false` | + +The executable code matches after substituting immutable values at the positions identified by the compiler. **This is not a claim that the complete runtime, including metadata, matches.** The values were read from the runtime at the fixed block; the constructor arguments in the deployment transaction were not independently verified. This is not a security audit. No transaction was signed or sent. The script rechecked the block hash after comparison. + +- [Verification results, settings and file hashes](evidence/deployment/verification-2026-11-07-compiler-references.json) +- [On-chain runtime](evidence/deployment/verification-2026-11-07-compiler-references-runtime.hex), [Standard JSON compiler input](evidence/deployment/verification-2026-11-07-compiler-references-standard-input.json), [compiler metadata](evidence/deployment/verification-2026-11-07-compiler-references-metadata.json) +- [Compiler-identified immutable ranges and values](evidence/deployment/verification-2026-11-07-compiler-references-immutable.json) + +The earlier files saved on the same day, `verification-12080309-2026-11-07T01-09-15-627Z*`, used the old heuristic based on two-byte differences and are retained as historical evidence. The current conclusion is based on this `schemaVersion: 2` record. The new record adds `immutableReferences`, `metadataMatch` and `substitutedFullMatch`. Each slot records its variable ID, complete byte range, hexadecimal value and decimal string, avoiding loss of integer precision. + +### Recheck the current deployment + +```bash +npm ci +npm run verify:deployment +# Recheck this fixed block; new files are generated without overwriting existing evidence. +node scripts/verify-deployment.mjs --address 0x5A5AeaE5553Feb5c5b27FEe5ec8b24E3ED2B964F --block 12081918 +``` + +| Exit code | Meaning in the current script | +| --- | --- | +| `0` | `full-match`: every byte of the original runtime matches; or `immutable-substitution-match`: executable code matches after substitution within compiler-declared ranges, with metadata equality reported separately | +| `2` | `executable-only-match`: executable code matches, metadata differs, and no actual immutable substitution occurs | +| `3` | Reading and compilation completed, but no candidate met the matching criteria | +| `1` | An error, such as an RPC or compilation failure, invalid arguments, missing contract code, or an existing output file | + +The script does not read `.env.local`. CLI arguments take precedence over environment variables; the default address is shown above. Run `node scripts/verify-deployment.mjs --help` to see the supported environment variables and options. The search stops at an immutable substitution match. A metadata mismatch does not mean that every possible compiler input has been tried. + +Recheck this evidence offline, without RPC access: + +```bash +node --input-type=module <<'JS' +import fs from 'node:fs'; +import solc from 'solc'; +import { compareRuntime } from './scripts/verify-deployment.mjs'; +const prefix = 'docs/evidence/deployment/verification-2026-11-07-compiler-references'; +const input = JSON.parse(fs.readFileSync(prefix + '-standard-input.json', 'utf8')); +const output = JSON.parse(solc.compile(JSON.stringify(input))); +const errors = (output.errors || []).filter(e => e.severity === 'error'); +if (errors.length) throw new Error(errors.map(e => e.formattedMessage).join('\n')); +const artifact = output.contracts['MilestoneFund.sol'].MilestoneFund.evm.deployedBytecode; +const saved = fs.readFileSync(prefix + '-runtime.hex', 'utf8').trim(); +const result = compareRuntime('0x' + artifact.object, saved, artifact.immutableReferences); +console.log(result); +if (!result.immutableMatch || result.metadataMatch) process.exitCode = 1; +JS +``` + +The offline rerun produced the same match level, and the SHA-256 hashes of all accompanying evidence files were verified. The failure path was also checked using an unreachable local RPC endpoint: the script reported `verification-error`, exited with code 1, and did not create success evidence. Run `node --test tests/deployment-verification.test.mjs` for regression tests covering false positives, false negatives and the saved historical evidence. Full test results are documented in [Automated Testing](automated-testing.md). + +## Historical record: initial deployment on 2026-10-22 + +The following record applies only to the initial source version and old address. It preserves the evidence and conclusions from that date and does not establish anything about the current source or new address. To recheck the old deployment, use the historical worktree specified below. + +On 2026-10-22, the source at that time reproduced the deployed contract's **complete runtime bytecode, including the CBOR metadata trailer**. The contract address was `0x9b824CA674432B390E30A5164a76c04EeAa8f686` on Ethereum Sepolia, chain ID `11155111`. + +The matching settings were **Solidity 0.8.34, optimizer disabled, Osaka, source unit name `MilestoneFund.sol`, and LF line endings**. The repository's original `compile:contract` settings, **0.8.24, optimizer enabled, Paris**, produced different runtime bytecode and could not substantiate a reproduction of that deployment. Those repository settings remained usable for other compilations or new deployments. The verification retained both those settings and the existing ABI; it did not require redeploying the contract. + +### 1. Evidence at a fixed block -| 项目 | 结果 | +| Item | Result | | --- | --- | -| 固定区块 | `11966764` | -| 区块哈希 | `0xde0a441229659355ce5cd74e25c0a5e81a666412bd0a618601cc5fc2ab8ecf18` | -| 区块时间 | 2026-10-22 11:07:36,北京时间 UTC+8 | -| 链上运行时代码 | 15,664 字节 | -| 完整 runtime Keccak-256 | `0xbc583b4ce58bf4e2536884cc463c753de01f711ab07f4096c0ca8c97bd7d6ac0` | -| 剥离有效 CBOR metadata 及长度字段后 | 15,611 字节 | -| 执行部分 Keccak-256 | `0xbada2cf00f14da52219ab0e2686e2aba87f573656e5ca38e328de44c4b4e0078` | -| CBOR 的 `solc` 字节 | `00 08 22`,解码为 `0.8.34`,末尾 `22` 是十六进制34 | -| 编译出的 ABI 与仓库 ABI | 一致,未重写 ABI 文件 | +| Fixed block | `11966764` | +| Block hash | `0xde0a441229659355ce5cd74e25c0a5e81a666412bd0a618601cc5fc2ab8ecf18` | +| Block time | 2026-10-22 11:07:36, Beijing time (UTC+8) | +| On-chain runtime | 15,664 bytes | +| Full runtime Keccak-256 | `0xbc583b4ce58bf4e2536884cc463c753de01f711ab07f4096c0ca8c97bd7d6ac0` | +| After removing valid CBOR metadata and its length field | 15,611 bytes | +| Executable section Keccak-256 | `0xbada2cf00f14da52219ab0e2686e2aba87f573656e5ca38e328de44c4b4e0078` | +| CBOR `solc` bytes | `00 08 22`, decoded as `0.8.34`; the final `22` is hexadecimal for 34 | +| Compiled ABI versus repository ABI | Identical; the ABI file was not rewritten | -证据文件相对于本文件所在目录: +Evidence files, relative to this document: -- [核验结果和全部尝试配置](evidence/deployment/verification-11966764.json) -- [固定区块完整 runtime](evidence/deployment/verification-11966764-runtime.hex) -- [成功匹配的完整 Standard JSON 编译输入](evidence/deployment/verification-11966764-standard-input.json) -- [成功匹配的编译器 metadata](evidence/deployment/verification-11966764-metadata.json) +- [Verification results and all attempted settings](evidence/deployment/verification-11966764.json) +- [Complete runtime at the fixed block](evidence/deployment/verification-11966764-runtime.hex) +- [Complete Standard JSON input for the matching compilation](evidence/deployment/verification-11966764-standard-input.json) +- [Compiler metadata for the matching compilation](evidence/deployment/verification-11966764-metadata.json) -主结果包含各证据文件的 SHA-256、原始源码与规范化源码的哈希、编译器完整版本、配置、代码哈希和固定区块。runtime 文件是从该区块读取的原始十六进制代码,可用于离线比较。本次只通过 RPC 读取链ID、区块和合约代码,没有账户签名或发送交易。 +The main result records the SHA-256 hash of each evidence file, hashes of the original and normalized source, the full compiler version, compiler settings, code hashes and the fixed block. The runtime file contains the original hexadecimal bytecode read at that block and can be used for offline comparison. This verification only read the chain ID, block and contract code through RPC; no account signed or sent a transaction. -## 2. 完整匹配的配置及源码字节 +### 2. Settings and source bytes for the full match -| 编译项 | 匹配值 | +| Compiler setting | Matching value | | --- | --- | -| npm 编译器别名 | `solc-deployed` | -| 完整编译器版本 | `0.8.34+commit.80d5c536.Emscripten.clang` | -| optimizer | `enabled: false`、`runs: 200` | +| npm compiler alias | `solc-deployed` | +| Full compiler version | `0.8.34+commit.80d5c536.Emscripten.clang` | +| optimizer | `enabled: false`, `runs: 200` | | EVM | `osaka` | -| viaIR | `false`,编译输入使用默认关闭值 | -| 源码单元路径 | `MilestoneFund.sol` | -| 源码内容 | 仓库 `contracts/MilestoneFund.sol`,仅将 CRLF 换行为 LF | -| metadata | 默认 `bytecodeHash: ipfs`,附加 CBOR | -| 合约 | `MilestoneFund` | +| viaIR | `false`; the compiler input used the default disabled setting | +| Source unit path | `MilestoneFund.sol` | +| Source content | The repository's `contracts/MilestoneFund.sol`, with only CRLF line endings converted to LF | +| metadata | Default `bytecodeHash: ipfs`, with CBOR appended | +| Contract | `MilestoneFund` | -这里的“源码单元路径”是 Standard JSON `sources` 对象的键,不是要求重命名仓库文件。匹配输入已经保存,复跑时可直接使用,不必手工猜测 Remix 工作区目录。 +The "source unit path" is the key in the Standard JSON `sources` object; it does not require renaming the repository file. The matching input is saved and can be reused directly, without guessing the Remix workspace directory. -此次读取的 Windows 工作区源码为9,482字节,SHA-256为 `61958cddee7960cc46aae542ddc83fe8f118c10c347e7313bc470c5a183f4a5b`。仅转换为 LF 后为9,291字节,SHA-256为 `4600e1658299004ebfe8ed9bd9e342c98436fd5b9db400dadf8c5ff64ffb69c4`。转换只在内存中进行,磁盘源码未改动。 +The source read from the Windows workspace was 9,482 bytes, with SHA-256 `61958cddee7960cc46aae542ddc83fe8f118c10c347e7313bc470c5a183f4a5b`. After converting line endings to LF, it was 9,291 bytes, with SHA-256 `4600e1658299004ebfe8ed9bd9e342c98436fd5b9db400dadf8c5ff64ffb69c4`. The conversion took place only in memory; the source file on disk was unchanged. -采用相同0.8.34配置、但保留CRLF时,剥离metadata后的执行部分完全一致,完整runtime不一致。改成LF后,完整runtime才一致。源码路径、空白字符及编译设置会影响metadata;Solidity将metadata哈希和编译器标记放入运行时代码尾部。[Solidity官方metadata说明](https://docs.soliditylang.org/en/latest/metadata.html) +With the same 0.8.34 settings but CRLF line endings, the executable section matched after removing metadata, while the complete runtime did not. The complete runtime matched only after converting to LF. Source paths, whitespace and compiler settings affect metadata; Solidity appends the metadata hash and compiler identifier to the runtime bytecode. [Solidity metadata documentation](https://docs.soliditylang.org/en/latest/metadata.html) -原有本地编译器为 `0.8.24+commit.e11b9ed9.Emscripten.clang`。其原有优化开启、200 runs、Paris配置输出9,196字节,完整代码和剥离metadata后的执行部分均不匹配现有部署。该差异不能仅解释为换行或metadata差异。 +The original local compiler was `0.8.24+commit.e11b9ed9.Emscripten.clang`. With the original settings of optimizer enabled, 200 runs and Paris, it produced 9,196 bytes. Neither the complete runtime nor the executable section with metadata removed matched that deployment. Line endings or metadata alone could not explain the difference. -## 3. 复跑线上只读核验 +### 3. Recheck the old deployment without sending transactions -在仓库根目录安装锁定依赖后运行: +Use the historical source and script in a separate worktree to avoid mixing the current source and default new address with the old block: ```powershell +git worktree add --detach ../dapp-verification-v1 7d4eba9 +cd ../dapp-verification-v1 npm ci -node scripts/verify-deployment.mjs --block 11966764 +node scripts/verify-deployment.mjs --address 0x9b824CA674432B390E30A5164a76c04EeAa8f686 --block 11966764 ``` -默认输出到 `docs/evidence/deployment/` 下带区块号和时间的新文件,不覆盖本次证据。省略 `--block` 时先取得最新区块,再固定该区块进行读取和比较,完成后重新核对区块哈希。 +By default, the script creates new files under `docs/evidence/deployment/`, named with the block number and timestamp, without overwriting the saved evidence. If `--block` is omitted, it first retrieves the latest block, uses that fixed block for reading and comparison, and rechecks its hash after completion. -也可指定RPC、合约和新输出文件名: +You can also specify the RPC endpoint, contract and a new output filename: ```powershell node scripts/verify-deployment.mjs --rpc https://ethereum-sepolia-rpc.publicnode.com --address 0x9b824CA674432B390E30A5164a76c04EeAa8f686 --block 11966764 --out docs/evidence/deployment/my-verification.json --timeout-ms 20000 $LASTEXITCODE ``` -地址参数接受合法Ethereum地址并验证checksum。环境变量支持 `SEPOLIA_RPC_URL` / `VITE_SEPOLIA_RPC_URL`、`CONTRACT_ADDRESS` / `VITE_CONTRACT_ADDRESS`、`VERIFY_BLOCK`;CLI参数优先。脚本不会自行读取 `.env.local`。默认只访问公共RPC,不需要私钥。输出中仅记录RPC的origin和完整端点哈希,省略路径及凭据。 +The address argument accepts valid Ethereum addresses and validates the checksum. Supported environment variables are `SEPOLIA_RPC_URL` / `VITE_SEPOLIA_RPC_URL`, `CONTRACT_ADDRESS` / `VITE_CONTRACT_ADDRESS`, and `VERIFY_BLOCK`; CLI arguments take precedence. The script does not automatically read `.env.local`. It uses a public RPC endpoint by default and requires no private key. The output records only the RPC origin and a hash of the complete endpoint, omitting the path and credentials. -| 退出码 | 含义 | +| Exit code | Meaning | | --- | --- | -| `0` | 至少一个候选配置与完整runtime逐字节一致 | -| `2` | 只有剥离有效CBOR metadata后的执行部分一致 | -| `3` | 有效读取与编译完成,但没有匹配候选 | -| `1` | RPC失败、超时、网络错误、编译失败、无合约代码、参数错误或输出文件已存在等;不能判为通过 | +| `0` | At least one candidate matches every byte of the complete runtime | +| `2` | Only the executable section matches after valid CBOR metadata is removed | +| `3` | Reading and compilation completed successfully, but no candidate matched | +| `1` | An RPC failure, timeout, network error, compilation failure, missing contract code, invalid argument, existing output file or other error; this is not a pass | -脚本先比较仓库原配置,再有限尝试两个已安装编译器、优化开关及所支持的EVM配置;只有执行部分匹配时,才尝试两种源码单元路径和LF/CRLF换行。最多编译64次,遇到完整匹配立即停止,本次实际编译8次。不会自动下载其他编译器、无限搜索或写入 `src/abi`、`artifacts`。 +The script first checks the repository's original settings, then tries a bounded set of combinations of the two installed compilers, optimizer settings and supported EVM targets. Only when the executable section matches does it try the two source unit paths and LF/CRLF line endings. It allows at most 64 compilations and stops immediately on a full match; this historical run required 8 compilations. It does not download other compilers, search indefinitely, or write to `src/abi` or `artifacts`. -编译采用 Standard JSON 输入,并显式检查编译器返回的错误,不能只看编译进程是否退出成功。[Solidity官方编译器接口说明](https://docs.soliditylang.org/en/latest/using-the-compiler.html#compiler-input-and-output-json-description) +Compilation uses Standard JSON input and explicitly checks errors returned by the compiler; a successful process exit alone is insufficient. [Solidity compiler interface documentation](https://docs.soliditylang.org/en/latest/using-the-compiler.html#compiler-input-and-output-json-description) -## 4. 使用已保存证据离线复跑 +### 4. Recheck the saved evidence offline -以下PowerShell命令不访问RPC,只用保存的Standard JSON重新编译,再与保存的链上runtime逐字节比较: +The following PowerShell command does not access RPC. It recompiles the saved Standard JSON input and compares the result byte for byte with the saved on-chain runtime: ```powershell @' @@ -101,10 +169,10 @@ if (actual !== saved) process.exitCode = 1; '@ | node --input-type=module ``` -本次线上核验退出0;上述离线复跑也得到完整匹配。另以不可达的本机RPC进行失败检查,脚本返回 `verification-error`、退出1,没有误报通过或生成成功证据。 +The historical online verification exited with code 0, and the offline rerun above also produced a full match. A failure check using an unreachable local RPC endpoint returned `verification-error` and exit code 1, without reporting a false pass or creating success evidence. -## 5. 结论范围 +### 5. Scope of the historical conclusion -该证据证明:保存的源码和配置可以生成与指定地址在指定区块的运行时代码完全相同的字节,包括metadata。它比函数selector或ABI相同的检查更强,但不等于安全审计,也不单独证明部署交易的创建字节码或部署者操作历史。 +The evidence establishes that the saved source and settings can generate exactly the same runtime bytes, including metadata, as the specified address at the specified block. This is stronger than checking function selectors or ABI equality, but it is not a security audit and does not independently establish the deployment transaction's creation bytecode or the deployer's actions. -如果以后换了地址、源码或配置而结果仅为 `executable-only-match`,需要准确保留这个级别;要进一步获得完整匹配,应向部署组员取得当时的完整Standard JSON编译输入或metadata文件、精确编译器版本、源码单元路径和原始源码字节。当前这份实例已经完整复现,无须为了统一旧README配置而重部署。 +If a later change to the address, source or settings produces only an `executable-only-match`, that match level must be reported accurately. To pursue a full match, obtain the original complete Standard JSON input or metadata file, exact compiler version, source unit path and original source bytes from the team member who deployed the contract. This historical instance was fully reproduced and did not need redeployment merely to align it with the old README settings. diff --git a/docs/e2e-test-record.md b/docs/e2e-test-record.md index a347fde..de0334e 100644 --- a/docs/e2e-test-record.md +++ b/docs/e2e-test-record.md @@ -1,213 +1,290 @@ -# Sepolia 端到端测试记录 - -## 当前结论 - -- 项目 #002 的成功业务流程已通过:创建、两位支持者出资、两阶段各自提交成果与审批,以及 40% / 60% 提款,共 11 笔成功交易均已取得回执。 -- 最终状态为 `Completed`,项目托管余额为 0,两个阶段累计释放 `0.0001 ETH`。每个阶段 B 单独投票均为 50% 且不能通过,C 投票后为 100% 并通过。 -- 重复投票、50% 时提款、第一阶段重复提款、完成后再次提款、提前结算、提前退款及重复退款共 7 项拒绝路径已通过固定区块只读模拟核验;这些模拟没有发送交易。 -- 已收到按完成页复查步骤回传的 #002 顶部截图,显示 Completed、项目托管为 0,与后续固定区块状态一致;属于人工截图证据,未自动捕获浏览器刷新事件。 -- 独立退款项目 #003 已通过:只筹得 `0.00003 ETH`,未达到 `0.0002 ETH` 目标;截止后结算为 Failed,B 领取原额退款,项目托管归零,重复退款被拒绝。 -- 两条手动业务流程合计 15 笔成功交易、17 张原始截图均已保存。 -- 连续状态自动化测试已完成:5 类场景分别使用仓库默认配置和现有 Sepolia 部署配置编译,共 10 项测试全部通过;测试交易在本地内存 EVM 中执行,未发送到 Sepolia。详见[自动化测试说明](automated-testing.md)。 -- 部署复现已完成:当前合约源码按 Solidity 0.8.34、关闭优化、Osaka、源码单元名 `MilestoneFund.sol`、LF 换行编译,与固定区块的完整运行时代码(包括 metadata)逐字节一致。前端 `npm run build` 也已通过。详见[部署核验记录](deployment-verification.md)。 - -## 测试基准 - -- 日期:2026-10-22(北京时间,UTC+8)。 -- 工作分支:`feat/e2e-and-deployment`。 -- 测试源码提交:`75e9190d277b573131d5018836af575cb8011fbc`。 -- 网络:Ethereum Sepolia,chain ID `11155111`。 -- 合约:`0x9b824CA674432B390E30A5164a76c04EeAa8f686`。 -- 项目:`#002` / `HQC-E2E-Success-1022`。 -- 目标:`0.0001 ETH`;筹款截止:2026-10-23 18:00(北京时间)。 -- 独立退款测试项目:`#003` / `HQC-E2E-Refund-1022`,目标 `0.0002 ETH`,截止 2026-10-22 11:00(北京时间)。 -- 真实交易由测试者通过网页及 MetaMask 操作;本记录中的回执与状态核验仅使用只读 RPC。 -- 合约源码保持上述基准提交的内容;本次补充的是测试、核验脚本和文档。固定区块 `11966764` 的运行时代码已完整匹配,准确编译输入及原始链上代码均已保存。 - -## 账户 - -| 角色 | 地址 | +# Sepolia End-to-End Test Record + +> This page keeps separate records for the current and original contracts. Both runs used project ID `2`; distinguish them by **contract address and date**. Their transactions and screenshots must not be mixed. + +## Current successful workflow (2026-11-07) + +The successful workflow on the new version is complete: **13 successful transactions, 13 corresponding block-state snapshots, and 13 original screenshots supplied by the tester**. Every receipt has `status=1`; senders, target contract, functions, arguments, and events were checked through read-only queries. Both milestones demonstrated that exactly 50% approval weight does not approve a milestone, while 100% does. Each payout was first released to the claimable balance and then claimed separately. The final project status is Completed, with both project escrow and claimable payout at 0. + +### Test baseline and evidence + +| Item | Record | | --- | --- | -| A / 项目创建者 | `0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4` | -| B / 支持者 | `0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E` | -| C / 支持者 | `0x3851E2C69AE098447Adc8038dC71817aBaf39bc8` | +| Test date / transaction period | 2026-11-07, 14:46:24–15:04:00 (Asia/Shanghai / UTC+8) | +| Network / chain ID | Ethereum Sepolia / `11155111` | +| Contract | `0x5A5AeaE5553Feb5c5b27FEe5ec8b24E3ED2B964F` | +| Project | `#002` / `Test Project 03` | +| Target / two contributions | 0.0001 ETH; B and C each contributed 0.00005 ETH | +| Funding deadline | 2026-11-08 18:00 (UTC+8) | +| Submission / approval windows | Both read as 600 seconds from the contract; the operations in this run were completed within the windows. Timeout paths were not tested | +| First / second milestone amounts | 0.00004 ETH / 0.00006 ETH | +| Block range | `12081978`–`12082066`; each transaction's block hash was checked again after collection | +| Local code reference | `4a77279`; at test time, the working tree also contained uncommitted verification, test, and documentation changes. The contract and frontend ABI were unchanged. See the [deployment verification record](deployment-verification.md) for the deployment match level | +| Web entry point | The test instructions used the [GitHub Pages demo](https://misaka10111.github.io/dapp/). The deployed frontend build's commit was not independently established, and the browser version was not recorded | + +| Role | Transaction sender in this run | +| --- | --- | +| A / creator and payout recipient | `0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4` | +| B / backer | `0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E` | +| C / backer | `0x3851E2C69AE098447Adc8038dC71817aBaf39bc8` | + +- [Raw on-chain transactions, receipts, decoded events, and reads at fixed blocks](evidence/2026-11-07-project-002/chain-evidence.json): all 13 steps are stored in `steps[0..12]`. Each contains `rawTransaction`, `rawReceipt`, `decodedCall`, `events`, `snapshot`, and `readCalls`. All amounts are stored as wei strings. +- [Screenshot manifest and SHA-256 hashes](evidence/2026-11-07-project-002/screenshots.json): the 13 uploaded PNGs were copied unchanged, without cropping, compression, or editing. The manifest retains their original attachment names, dimensions, byte counts, and visible states. +- The tester signed transactions using the web page and MetaMask. Evidence collection used read-only RPC calls; it did not send transactions, deploy contracts, or operate the wallet. -## 已完成的操作 +### Step-by-step results -| 操作 | 预期 | 核验结果 | 交易 / 证据 | +The block states are read-only snapshots **at the end of each block**, not intra-transaction traces. The states and amounts below were cross-checked against the corresponding snapshots and screenshots. The tester separately confirmed the browser refresh. + +| Operation | Block | Verification result | Evidence | | --- | --- | --- | --- | -| A 创建项目 | 项目目标为 0.0001 ETH,初始筹款及托管为 0 | PASS:补查取得回执 status=1;A 直接调用 createProject,ProjectCreated 的项目编号、创建者、目标及截止时间与区块 11966404 的初始状态相符;Funding、两阶段均未提交 | [创建交易](https://sepolia.etherscan.io/tx/0xd5fbd668c4046fcd56d19bbf2d9b8e77496f5fa2b8a1df2176938c93930f2ced);`01-project-created.png` | -| B 出资 0.00005 ETH | 筹款 50%,继续 Funding | PASS:回执 status=1;交易调用 contribute(2),value=50000000000000 wei;ContributionReceived 事件金额及地址一致;页面显示 50% | [B 的交易](https://sepolia.etherscan.io/tx/0x6bc8c49885a02a4e09ca36963bbdfe402fcef420a55befaa879a7cd39fb04a19);`02-b-funded-50-percent.png` | -| C 出资 0.00005 ETH | 累计 0.0001 ETH,立即 Successful | PASS:回执 status=1;contribute(2) 金额正确;同一回执包含 ContributionReceived 与 FundingSuccessful(projectId=2,totalRaised=100000000000000) | [C 的交易](https://sepolia.etherscan.io/tx/0x69e08785c3725d6eed03cc69d74a983dd4a365456e9a72628f8397b2fed69c0b);`03-funded-100-percent.png` | -| A 提交第一阶段成果 | 第一阶段进入 In review,初始审批权重为 0 | PASS:回执 status=1;A 调用 submitEvidence(2,0,...),EvidenceSubmitted 的文字及链接与页面一致;submitted=true、approved=false、approvalWeight=0 | [成果提交交易](https://sepolia.etherscan.io/tx/0xd70e3aff6fd5adc3f9d18c1b6a44945ddc98fc7dbe39ced86eb67cd7517fef04);`04-milestone-1-in-review.png` | -| B 单独批准第一阶段 | 权重恰好 50%,阶段尚未通过 | PASS:回执 status=1;B 调用 approveMilestone(2,0),ApprovalCast 权重为 50000000000000 wei;approved=false,页面仍为 In review | [B 首次审批交易](https://sepolia.etherscan.io/tx/0x2891bf404058a864dc474237fb5f99a94e02ce75df972e32ff4b42b11646f4f3);`05-milestone-1-b-approved-50-percent.png` | -| 50% 时 A 尝试提款(只读模拟) | 合约拒绝提款 | PASS:在区块 11966534 以 A 为 from,eth_call withdrawMilestone(2,0) 回滚 Milestone not withdrawable;未发送交易、未支付 Gas | `milestone-1-b-approval-11966534.json` 中 readOnlyChecks | -| B 重复审批(只读模拟) | 合约拒绝同一支持者重复投票 | PASS:在同一区块以 B 为 from,eth_call approveMilestone(2,0) 回滚 Already approved;未发送交易、未支付 Gas | `milestone-1-b-approval-11966534.json` 中 readOnlyChecks | -| C 批准第一阶段 | 累计权重达到 100%,阶段批准 | PASS:回执 status=1;C 调用 approveMilestone(2,0),包含 ApprovalCast 与 MilestoneApproved(2,0);approvalWeight=100000000000000 wei、approved=true;尚未提款 | [C 首次审批交易](https://sepolia.etherscan.io/tx/0xc5f2356e29f4e3efa651d1f418d6ab52132d174005d6b7cf9005ce9fe8e72253);`06-milestone-1-approved-100-percent.png` | -| A 第一阶段提款 | 释放 0.00004 ETH,托管剩余 0.00006 ETH,进入第二阶段 | PASS:回执 status=1;A 调用 withdrawMilestone(2,0),FundsWithdrawn 金额为 40000000000000 wei;第一阶段 withdrawn=true,项目 currentMilestone=1、escrowBalance=60000000000000 wei | [第一阶段提款交易](https://sepolia.etherscan.io/tx/0x9cfb87e7bfd0b00af3f42dd8f80cdbecaff96c38200684ad7fbc7023a62e941f);`07-milestone-1-released.png` | -| A 重复提取第一阶段(只读模拟) | 合约拒绝重复提款 | PASS:在区块 11966558 以 A 为 from,eth_call withdrawMilestone(2,0) 回滚 Wrong milestone,因为当前里程碑已推进至索引 1;未发送交易、未支付 Gas | `milestone-1-withdrawal-11966558.json` 中 readOnlyChecks | -| A 提交第二阶段成果 | 第二阶段进入 In review,审批权重为 0 | PASS:回执 status=1;A 调用 submitEvidence(2,1,...),EvidenceSubmitted 文字及链接与页面一致;第二阶段 submitted=true、approved=false、approvalWeight=0;托管仍为 0.00006 ETH | [第二阶段成果提交交易](https://sepolia.etherscan.io/tx/0x0b101e99c5b2086f924422243404536a73bc041f14e3869daf30eaba9f0979fb);`08-milestone-2-in-review.png` | -| B 单独批准第二阶段 | 权重恰好 50%,阶段尚未通过 | PASS:回执 status=1;本合约发出的 ApprovalCast 记录 projectId=2、milestone=1、backer=B、weight=50000000000000 wei;第二阶段 approved=false、B 已投票而 C 尚未投票;该笔采用包装调用路径,顶层目标地址不是本合约 | [B 第二阶段审批交易](https://sepolia.etherscan.io/tx/0x936b5a5f82a32d9eb1ca0d0ddc6e1d2eb5c1629793210530825cc85f72331517);`09-milestone-2-b-approved-50-percent.png` | -| C 批准第二阶段 | 累计权重达到 100%,阶段批准 | PASS:回执 status=1;C 调用 approveMilestone(2,1),包含 ApprovalCast 与 MilestoneApproved(2,1);approvalWeight=100000000000000 wei、approved=true;剩余 0.00006 ETH 尚未提取 | [C 第二阶段审批交易](https://sepolia.etherscan.io/tx/0x4a39eac1c34b8498d21abda8c8eb102fedb0f2f419a3d2d3432446d9740a28a8);`10-milestone-2-approved-100-percent.png` | -| A 第二阶段提款 | 释放剩余 0.00006 ETH;Completed;项目托管归零 | PASS:回执 status=1;A 调用 withdrawMilestone(2,1),FundsWithdrawn 金额为 60000000000000 wei,并触发 ProjectCompleted(2);状态=3、currentMilestone=2、escrowBalance=0;两阶段累计释放等于总筹款 | [最终提款交易](https://sepolia.etherscan.io/tx/0x96c60c2f0f292f642c966216b7f027127024da7f14d363b5e7523b4557f39569);`11-milestone-2-ready-to-withdraw.png`、`12-milestone-2-released.png` | -| 项目完成后再次提款(只读模拟) | 合约拒绝再次提款 | PASS:在区块 11966612 以 A 为 from,eth_call withdrawMilestone(2,1) 回滚 Project not successful;未发送交易、未支付 Gas | `milestone-2-withdrawal-11966612.json` 中 readOnlyChecks | -| 完成页复查(人工截图) | 完成页显示 Completed、项目托管为 0 | PASS(人工截图核对):按刷新复查步骤回传的截图显示 Completed、Held in escrow=0 ETH 及两阶段全部释放提示,与区块 11966656 的项目 #002 状态一致;未自动捕获刷新事件 | `13-completed-overview.png`;后续状态见项目 #003 出资证据中的 latestObservation.completedProject2 | - -项目 #002 图片位于 `docs/evidence/2026-10-22-project-002/`;项目 #003 图片位于 `docs/evidence/2026-10-22-project-003/`。均为测试者提供的原始截图副本。 - -## 固定区块快照 - -### 创建后(补查创建交易) - -- 区块:`11966404`,区块时间:2026-10-22 09:55:00(北京时间)。 -- 区块哈希:`0x8b7daba16642bf10fd98a850d8806c0ca2fb2db73d286ab72d35f816c2fc813c`。 -- 项目 `Funding`、`currentMilestone=0`、`totalRaised=escrowBalance=0`;目标 `0.0001 ETH`,截止 `1792749600`;两个里程碑均未提交、批准或提款。 -- 完整交易、回执、事件和固定区块状态:[原始 JSON](evidence/2026-10-22-project-002/project-creation-11966404.json)。 - -### 筹款成功后 - -- 区块:`11966479`,区块时间:2026-10-22 10:10:00(北京时间)。 -- 区块哈希:`0x1b0e7dc9e4967863341b602b3059677f8cb0f52eead01a92c9b189941d323726`。 -- B 出资交易区块:`11966421`;C 出资交易区块:`11966443`。 -- 状态:`Successful`(枚举值 1);当前里程碑索引 0,即第一阶段。 -- `totalRaised = escrowBalance = 0.0001 ETH`。 -- B、C 记录的出资各为 `0.00005 ETH`,每人占总出资 50%。 -- 两个里程碑均未提交成果、未批准、未提款;approvalWeight 和 withdrawnAmount 均为 0。 -- 完整交易、回执、事件与固定区块状态:[原始 JSON](evidence/2026-10-22-project-002/contributions-11966479.json)。 - -### 第一阶段成果提交后 - -- 区块:`11966501`(成果提交交易所在区块),区块时间:2026-10-22 10:14:24(北京时间)。 -- 区块哈希:`0x39d2a66ab3fe32463209857a55dbc88e111dbf8d530e5f7065957b970f21b430`。 -- 第一阶段:`submitted=true`、`approved=false`、`withdrawn=false`,审批权重和已提款金额均为 0;页面显示 `In review`、`0%`。 -- 第一阶段成果链接:`https://github.com/misaka10111/dapp`。 -- 项目仍为 `Successful`,当前里程碑索引 0;`totalRaised = escrowBalance = 0.0001 ETH`。第二阶段仍未提交。 -- 完整交易、回执、事件与固定区块状态:[原始 JSON](evidence/2026-10-22-project-002/milestone-1-evidence-11966501.json)。 - -### B 首次审批后:恰好 50% 的边界 - -- 区块:`11966534`(B 首次审批交易所在区块),区块时间:2026-10-22 10:21:00(北京时间)。 -- 区块哈希:`0xb5f6ad90e8902fdb72b7bb681f8897cca689bb12ad66ddeb09dd1b36dd0146f7`。 -- 第一阶段:`approvalWeight = 0.00005 ETH`,占 `totalRaised = 0.0001 ETH` 的 50%;`submitted=true`、`approved=false`、`withdrawn=false`、`withdrawnAmount=0`。 -- B 的 `hasApproved=true`,C 的 `hasApproved=false`;两人的出资权重仍各为 `0.00005 ETH`。 -- 项目仍为 `Successful`,当前里程碑索引 0,托管余额仍为 `0.0001 ETH`。 -- 同一区块的只读 `eth_call` 确认:A 提款回滚 `Milestone not withdrawable`,B 重复审批回滚 `Already approved`。两项是基于真实链上状态的模拟调用,未产生交易回执,也未改变链上状态。 -- 完整交易、回执、事件、固定区块状态及两项回滚数据:[原始 JSON](evidence/2026-10-22-project-002/milestone-1-b-approval-11966534.json)。 - -### C 审批后:第一阶段通过 - -- 区块:`11966546`(C 首次审批交易所在区块),区块时间:2026-10-22 10:23:24(北京时间)。 -- 区块哈希:`0x13e0d65e832210c1b993abde23f1b2e10dc28a69b812e7bda8159588d6428fe2`。 -- 对比前一区块 `11966545`:第一阶段由权重 `0.00005 ETH`、`approved=false` 变为权重 `0.0001 ETH`、`approved=true`,页面显示 `100%` 和 `Approved`。 -- B、C 的 `hasApproved` 均为 true;第一阶段仍为 `withdrawn=false`、`withdrawnAmount=0`。 -- 项目仍为 `Successful`,当前里程碑索引 0;托管余额仍为 `0.0001 ETH`,审批本身未释放资金。第二阶段尚未提交、批准或提款。 -- 完整交易、回执、事件及前后区块状态:[原始 JSON](evidence/2026-10-22-project-002/milestone-1-c-approval-11966546.json)。 - -### 第一阶段提款后:释放 40%,进入第二阶段 - -- 区块:`11966558`(第一阶段提款交易所在区块),区块时间:2026-10-22 10:25:48(北京时间)。 -- 区块哈希:`0x0c581d6319f59797cc21b51442fb407881424b3d2a5a91ed71d93959867a2b99`。 -- 对比前一区块 `11966557`:托管余额由 `0.0001 ETH` 降为 `0.00006 ETH`,减少量与 FundsWithdrawn 事件及第一阶段 `withdrawnAmount = 0.00004 ETH` 一致。 -- 第一阶段 `withdrawn=true`,页面显示 `Released: 0.00004 ETH`;项目 `currentMilestone=1`,即进入第二阶段,状态仍为 `Successful`。 -- `totalRaised` 仍为 `0.0001 ETH`;第二阶段 `submitted=false`、`approved=false`、`withdrawn=false`、`approvalWeight=0`。B、C 对第二阶段的 `hasApproved` 均为 false,需要分别重新投票。 -- 同一区块只读模拟 A 再次提取第一阶段,回滚 `Wrong milestone`;没有发送第二笔提款交易。 -- 完整交易、回执、事件、前后区块状态及重复提款回滚数据:[原始 JSON](evidence/2026-10-22-project-002/milestone-1-withdrawal-11966558.json)。 - -### 第二阶段成果提交后 - -- 区块:`11966571`(第二阶段成果提交交易所在区块),区块时间:2026-10-22 10:28:24(北京时间)。 -- 区块哈希:`0x3e7050462d78a71d2221591e543a8a84bed800094b68c265c8228789010f9930`。 -- 第二阶段 `submitted=true`、`approved=false`、`withdrawn=false`、`approvalWeight=0`、`withdrawnAmount=0`;页面显示 `In review`、`0%`,阶段预算为 `0.00006 ETH`。 -- B、C 对第二阶段的 `hasApproved` 均为 false,第一阶段的投票没有自动计入第二阶段。 -- 第一阶段仍为已释放,提款金额 `0.00004 ETH`;项目 `currentMilestone=1`、状态 `Successful`,`totalRaised=0.0001 ETH`、`escrowBalance=0.00006 ETH`。 -- 完整交易、回执、事件与固定区块状态:[原始 JSON](evidence/2026-10-22-project-002/milestone-2-evidence-11966571.json)。 - -### B 第二阶段审批后:仍按原始出资计算 50% - -- 区块:`11966583`(B 第二阶段审批交易所在区块),区块时间:2026-10-22 10:30:48(北京时间)。 -- 区块哈希:`0x11bb47d1551926beae309aece12993d9ed6ff0a7d307d3cdf3e77ec8faee7f23`。 -- 第二阶段 `approvalWeight=0.00005 ETH`、`approved=false`、`withdrawn=false`;B 的 `hasApproved=true`、C 的 `hasApproved=false`,页面显示 `50%`、`In review`。 -- 分母仍为 `totalRaised=0.0001 ETH`;托管剩余 `0.00006 ETH` 不改变审批权重。第一阶段已提款金额仍为 `0.00004 ETH`。 -- 该笔交易由 B 发出,value=0,顶层目标为 `0xdb9B1e94B5b69Df7e401DDbedE43491141047dB3`,不是 MilestoneFund 合约;本合约的 ApprovalCast 事件与固定区块状态确认审批已生效,不能把该笔描述为顶层直接调用 approveMilestone。 -- 顶层 calldata 与 `redeemDelegations(bytes[],bytes32[],bytes[])` 的选择器及 ABI 编码匹配;解码得到的一条 executionCallData 包含 MilestoneFund 目标地址、value=0 和 `approveMilestone(2,1)`。此项为 calldata 解码核验,未执行交易 trace。 -- 完整交易、回执、事件与固定区块状态:[原始 JSON](evidence/2026-10-22-project-002/milestone-2-b-approval-11966583.json)。 - -### C 审批后:第二阶段通过 - -- 区块:`11966586`(C 第二阶段审批交易所在区块),区块时间:2026-10-22 10:31:24(北京时间)。 -- 区块哈希:`0xc100ca08082e61a4c9f774bf6923ddc17446ed8db41784ab7cbbf74e1b6c2385`。 -- 对比前一区块 `11966585`:第二阶段从权重 `0.00005 ETH`、`approved=false` 变为权重 `0.0001 ETH`、`approved=true`,页面显示 `100%`、`Approved`。 -- B、C 对第二阶段的 `hasApproved` 均为 true。第二阶段 `withdrawn=false`、`withdrawnAmount=0`;第一阶段已提款金额仍为 `0.00004 ETH`。 -- 项目仍为 `Successful`、`currentMilestone=1`、`totalRaised=0.0001 ETH`、`escrowBalance=0.00006 ETH`;最终提款尚未发生,项目尚未进入 Completed。 -- 完整交易、回执、事件及前后区块状态:[原始 JSON](evidence/2026-10-22-project-002/milestone-2-c-approval-11966586.json)。 - -### 第二阶段提款后:项目完成 - -- 区块:`11966612`(最终提款交易所在区块),区块时间:2026-10-22 10:36:48(北京时间)。 -- 区块哈希:`0x995e5144983aaf9ff686a9ad50a48fb3793ba96aa8694702410074af381c8dc6`。 -- 对比前一区块 `11966611`:状态从 `Successful` 变为 `Completed`(枚举值 3),`currentMilestone` 从 1 变为 2;项目托管从 `0.00006 ETH` 变为 0。 -- 第一阶段 `withdrawnAmount=0.00004 ETH`,第二阶段 `withdrawnAmount=0.00006 ETH`,两阶段 `withdrawn=true`;累计释放 `0.0001 ETH`,等于 `totalRaised`。 -- 回执同时包含 `FundsWithdrawn(2,1,60000000000000)` 与 `ProjectCompleted(2)`;第二阶段页面显示 `Released: 0.00006 ETH`。 -- 相邻区块末余额观察:A 的余额变化加回本次 Gas 费后为 `60000000000000 wei`,与提款金额一致;整个合约余额减少量也为该金额。合约全局余额仍为 `0.0005 ETH`,本项目托管余额为 0,两者不能混淆。相邻区块余额比较可能受其他交易影响,本次观察金额吻合。 -- 同一区块只读模拟 A 再次提款,回滚 `Project not successful`,未发送交易。 -- 当时用户提供了提款前按钮和提款后阶段截图;随后已补交项目顶部 Completed、托管为 0 的截图 `13-completed-overview.png`,完成页复查通过。刷新动作未由自动化独立捕获。 -- 完整交易、回执、事件、前后区块状态、余额观察和重复提款回滚数据:[原始 JSON](evidence/2026-10-22-project-002/milestone-2-withdrawal-11966612.json)。 - -## 独立退款项目 #003 - -- 项目名称:`HQC-E2E-Refund-1022`;创建者 A;目标 `0.0002 ETH`;截止 `1792638000`,即 2026-10-22 11:00:00(北京时间)。 -- 阶段目标:`Deliver the prototype.` 和 `Deliver the final demo.`。 - -| 操作 | 预期 | 核验结果 | 交易 / 证据 | +| 1. A creates the project | `12081978` | PASS: `ProjectCreated(2,A,…)`; Funding, with raised amount and escrow at 0 | [Transaction](https://sepolia.etherscan.io/tx/0xdae4720a2fef074f576e58196be44170c0b0b7d917b13f66e5f431fda9f87437) · [Screenshot](evidence/2026-11-07-project-002/01-project-created.png) | +| 2. B contributes 0.00005 ETH | `12082002` | PASS: `ContributionReceived`; Funding / 50%, with raised amount and escrow at 0.00005 ETH | [Transaction](https://sepolia.etherscan.io/tx/0xedac642f43028573ea475d58fb7bcfd44786a3025c46a6f099c51f182b379a44) · [Screenshot](evidence/2026-11-07-project-002/02-b-funded-50-percent.png) | +| 3. C contributes 0.00005 ETH | `12082012` | PASS: `ContributionReceived` + `FundingSuccessful`; Successful / 100%, with raised amount and escrow at 0.0001 ETH | [Transaction](https://sepolia.etherscan.io/tx/0x923e80b878d47111a62a2c0fc3d31cbc9618088563b9fef40b359e74aa2c40a2) · [Screenshot](evidence/2026-11-07-project-002/03-funded-100-percent.png) | +| 4. A submits evidence for the first milestone | `12082018` | PASS: `EvidenceSubmitted(2,0,…)`; submitted=true, approved=false, approval weight 0 | [Transaction](https://sepolia.etherscan.io/tx/0x204fb8a2f4f89ae7bfba84670f3e7f34d9893d44e5da143c209abd694442df0b) · [Screenshot](evidence/2026-11-07-project-002/04-milestone-1-in-review.png) | +| 5. B approves the first milestone | `12082025` | PASS: `ApprovalCast` weight 0.00005 ETH; exactly 50%, approved=false, with In review shown on the page | [Transaction](https://sepolia.etherscan.io/tx/0xbc76dde48a3cd6ef08cec196a38d34fb80e19497ee236e2e457fe28ffbd3b135) · [Screenshot](evidence/2026-11-07-project-002/05-milestone-1-b-approved-50-percent.png) | +| 6. C approves the first milestone | `12082028` | PASS: `ApprovalCast` + `MilestoneApproved`; weight 100%, approved=true | [Transaction](https://sepolia.etherscan.io/tx/0x23e8c1060d4c9801ba676bcff2ae11d630c19d600085597e861b6739693e0c5a) · [Screenshot](evidence/2026-11-07-project-002/06-milestone-1-approved-100-percent.png) | +| 7. A releases the first milestone | `12082036` | PASS: `MilestoneReleased` for 0.00004 ETH, with no `PayoutClaimed`; project escrow 0.00006 ETH, claimable payout 0.00004 ETH | [Transaction](https://sepolia.etherscan.io/tx/0x86b88633a205b2a362581028d21da3e7b23325ea637de915f1376624f31ebf9a) · [Screenshot](evidence/2026-11-07-project-002/07-milestone-1-released-payout-pending.png) | +| 8. A claims the first payout | `12082040` | PASS: `PayoutClaimed` records 0.00004 ETH paid to A; claimable payout returns to 0, while project escrow remains 0.00006 ETH | [Transaction](https://sepolia.etherscan.io/tx/0x370fabc64d77a8aced0470cfa195a4d7fe7c5e2f819781fd609249bfebbcbfec) · [Screenshot](evidence/2026-11-07-project-002/08-milestone-1-payout-claimed.png) | +| 9. A submits evidence for the second milestone | `12082045` | PASS: `EvidenceSubmitted(2,1,…)`; the second milestone starts with approval weight 0, while the first milestone's records are retained | [Transaction](https://sepolia.etherscan.io/tx/0xfaae62807e8ff377805dbb52ce49e1379fd5290c9213d85921d1663f24c664d4) · [Screenshot](evidence/2026-11-07-project-002/09-milestone-2-in-review.png) | +| 10. B approves the second milestone | `12082052` | PASS: `ApprovalCast` weight 0.00005 ETH; 50% of the original total contributions, approved=false | [Transaction](https://sepolia.etherscan.io/tx/0xcdb7134171df911933454aa6ef3156215d9e6e5aa4cfd7ca942c98d1262c7a91) · [Screenshot](evidence/2026-11-07-project-002/10-milestone-2-b-approved-50-percent.png) | +| 11. C approves the second milestone | `12082056` | PASS: `ApprovalCast` + `MilestoneApproved`; weight 100%, approved=true | [Transaction](https://sepolia.etherscan.io/tx/0x07cd037fa33f4a26f823e2a7ab5c6b3ffe0e5b13dc584859dbb71cc70ca7ab9a) · [Screenshot](evidence/2026-11-07-project-002/11-milestone-2-approved-100-percent.png) | +| 12. A releases the second milestone | `12082061` | PASS: `MilestoneReleased` for 0.00006 ETH + `ProjectCompleted`; Completed, project escrow 0, with 0.00006 ETH still claimable | [Transaction](https://sepolia.etherscan.io/tx/0x7614e7d2826c1d0e98e841e95fda7d933e9babab360596b23eb6e0311847d5e8) · [Screenshot](evidence/2026-11-07-project-002/12-completed-payout-pending.png) | +| 13. A claims the second payout and refreshes the page | `12082066` | PASS: `PayoutClaimed` records 0.00006 ETH paid to A; on-chain claimable payout and project escrow are 0. The tester confirmed that the screenshot was taken after refreshing | [Transaction](https://sepolia.etherscan.io/tx/0xe528db3575d57ebda35c078d75a3ea5eb8fda9178fd2fe367ac3a3f2fea4c345) · [Screenshot](evidence/2026-11-07-project-002/13-completed-after-refresh.png) | + +### Key states and scope of the conclusions + +- Block `12082036`: after the first milestone was released, project escrow was 0.00006 ETH and claimable payout was 0.00004 ETH. After the separate claim in block `12082040`, claimable payout was 0 and escrow remained 0.00006 ETH. +- Block `12082061`: after the second milestone was released, the project was already Completed, both milestones had `withdrawn=true`, and project escrow was 0, but `claimablePayouts(2)=0.00006 ETH`. Thus, `withdrawn` / `Released` means released from escrow; it does not by itself establish that the recipient has claimed the payout. +- Block `12082066`: the second `PayoutClaimed` event records A as the recipient and 0.00006 ETH as the amount. The total released across both milestones and the total claimed according to the events were each 0.0001 ETH. Final claimable payout and project escrow were 0. Historical `totalRaised` remained 0.0001 ETH, and B/C's original contributions remained 0.00005 ETH each. +- The tester explicitly confirmed that `13-completed-after-refresh.png` was taken "after refreshing." The image still shows Completed, two Released milestones, and 0 escrow; the claimable payout panel is absent. This is recorded as **manual refresh confirmation and screenshot verification**; the refresh event was not captured automatically. +- This run covered only the successful workflow and the default recipient A. It did not test excess contributions, timeout refunds, rejected signatures, wrong networks, alternative payout recipients, repeated operations, or permission rejections through direct calls. No transaction trace or independent wallet balance/gas reconciliation was performed. Claimed amounts were checked against successful receipts, `PayoutClaimed` events, and contract state. Outstanding scenarios are listed in the progress table at the end. + +## Historical conclusions (2026-10-22) + +- Project #002 passed the successful business workflow: creation, contributions from two backers, evidence submission and approval for both milestones, and 40% / 60% withdrawals. Receipts were obtained for all 11 successful transactions. +- The final status was `Completed`, project escrow was 0, and the two milestones released a total of `0.0001 ETH`. For each milestone, B's vote alone represented 50% and did not approve it; C's vote brought the weight to 100% and approved it. +- 7 rejection paths passed read-only simulation checks at fixed blocks: duplicate voting, withdrawal at 50%, repeated withdrawal of the first milestone, withdrawal after completion, early finalization, early refund, and duplicate refund. These simulations did not send transactions. +- A screenshot of the top of project #002's completion page was returned following the completion-page verification instructions. It showed Completed and 0 project escrow, consistent with subsequent state at a fixed block. This is manual screenshot evidence; the browser refresh event was not captured automatically. +- Independent refund project #003 passed: it raised only `0.00003 ETH`, below its `0.0002 ETH` target. It was finalized as Failed after the deadline; B claimed the original contribution, project escrow became 0, and a duplicate refund was rejected. +- The two manual business workflows produced a total of 15 successful transactions and 17 original screenshots, all retained. +- The continuous-state automated tests available at the time passed: 5 scenarios were compiled using both the repository-default and old Sepolia deployment configurations, for 10 passing tests. Transactions ran in a local in-memory EVM and were not sent to Sepolia. See the [automated testing guide](automated-testing.md) for current coverage. +- The original deployment was reproduced: the contract source at the baseline commit below, compiled with Solidity 0.8.34, optimization disabled, Osaka, source-unit name `MilestoneFund.sol`, and LF line endings, matched the full runtime code at the fixed block byte for byte, including metadata. The frontend `npm run build` also passed at the time. See the [deployment verification record](deployment-verification.md). + +## Historical test baseline + +- Date: 2026-10-22 (Beijing time, UTC+8). +- Working branch: `feat/e2e-and-deployment`. +- Tested source commit: `75e9190d277b573131d5018836af575cb8011fbc`. +- Network: Ethereum Sepolia, chain ID `11155111`. +- Contract: `0x9b824CA674432B390E30A5164a76c04EeAa8f686`. +- Project: `#002` / `HQC-E2E-Success-1022`. +- Target: `0.0001 ETH`; funding deadline: 2026-10-23 18:00 (Beijing time). +- Independent refund test project: `#003` / `HQC-E2E-Refund-1022`, target `0.0002 ETH`, deadline 2026-10-22 11:00 (Beijing time). +- The tester performed real transactions through the web page and MetaMask. Receipt and state verification in this record used read-only RPC calls only. +- The contract source remained at the baseline commit above; this work added tests, verification scripts, and documentation. The runtime code at fixed block `11966764` was fully matched, and the exact compiler input and original on-chain code were saved. + +## Accounts + +| Role | Address | +| --- | --- | +| A / project creator | `0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4` | +| B / backer | `0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E` | +| C / backer | `0x3851E2C69AE098447Adc8038dC71817aBaf39bc8` | + +## Completed operations + +| Operation | Expected result | Verification result | Transaction / evidence | | --- | --- | --- | --- | -| A 创建退款测试项目 | Funding,目标 0.0002 ETH,初始筹款及托管为 0 | PASS:回执 status=1;ProjectCreated 记录项目 3、A、目标和截止;创建区块状态与参数相符。顶层为包装调用,解码出的内层 createProject 参数一致 | [创建交易](https://sepolia.etherscan.io/tx/0x91a97815ddb95f1568707dd3bc7c8537b85ba5770dd59058bb6ca19c898e3ca1);`project-creation-11966641.json` | -| B 出资 0.00003 ETH | 目标完成度 15%,继续 Funding | PASS:回执 status=1;B 直接调用 contribute(3),value=30000000000000 wei;ContributionReceived 事件一致,无 FundingSuccessful;出资、总筹款及托管均为 0.00003 ETH,refunded=false | [B 出资交易](https://sepolia.etherscan.io/tx/0x0aab5ef7f63041f863e6b942ce80f286eda016d46fba5a1dc42721c853718fb4);`01-funded-15-percent.png`、`contribution-11966646.json` | -| 到期前结算(只读模拟) | 合约拒绝提前结算 | PASS:在区块 11966646 以 B 为 from,eth_call finalizeFunding(3) 回滚 Deadline not reached;未发送交易、未支付 Gas | 出资证据中的 readOnlyChecks | -| 尚未失败时退款(只读模拟) | 合约拒绝提前退款 | PASS:在同一区块以 B 为 from,eth_call claimRefund(3) 回滚 Project not failed;未发送交易、未支付 Gas | 出资证据中的 readOnlyChecks | -| B 到期后结算 | Funding 转为 Failed,开放退款,托管暂不变 | PASS:回执 status=1;B 直接调用 finalizeFunding(3),产生 FundingFailed(3);回执区块时间超过截止,状态由 0 变为 2,托管仍为 0.00003 ETH,B 尚未退款 | [结算交易](https://sepolia.etherscan.io/tx/0x067497600a670f6660090ee4b23334beb8ca3e5a3d10dbdc2e6332244bb3af83);`02-awaiting-finalization.png`、`03-failed-refund-available.png` | -| B 领取退款 | 原始出资 0.00003 ETH 退回 B,项目托管归零 | PASS:回执 status=1;包装交易解码出的内层调用为 claimRefund(3),RefundClaimed 记录 B 和 30000000000000 wei;refunded=true,escrowBalance=0,历史 totalRaised 和 contribution 保留 | [退款交易](https://sepolia.etherscan.io/tx/0xcb774a9adad688000b85c79246ce497e01321dbdb926632ff7892f5109bb3842);`04-refunded-escrow-zero.png` | -| B 重复领取退款(只读模拟) | 合约拒绝重复退款 | PASS:在区块 11966731 以 B 为 from,eth_call claimRefund(3) 回滚 No refund available;未发送交易、未支付 Gas | `claim-refund-11966731.json` 中 readOnlyChecks | - -### 创建与出资快照 - -- 创建区块 `11966641`,2026-10-22 10:42:48(北京时间);区块哈希 `0x101a82359cbf7c243c5e0ffe8dbb5b51f867c80f389af41b7f14120edf4ef0af`。状态 Funding,初始总筹款和托管均 0,两个阶段均未提交。 -- B 出资区块 `11966646`,2026-10-22 10:43:48(北京时间);区块哈希 `0xe2703aaa42a679df6beb114df965ea0dfbea2e8671851548dfe203a880be2a5a`。 -- 出资后 `totalRaised=escrowBalance=0.00003 ETH`,`target=0.0002 ETH`、`status=Funding`、`currentMilestone=0`;B 出资记录为 0.00003 ETH,`refunded=false`。 -- 后续核验区块 `11966656`,2026-10-22 10:45:48(北京时间);区块哈希 `0x65ababefb984ee4656d82051dc36d6493348e9afb30892c2275fe8f8406940d2`。当时距截止尚有 852 秒,仍未结算或退款。项目 #002 同区块仍为 Completed、托管为 0。 -- 证据:[创建 JSON](evidence/2026-10-22-project-003/project-creation-11966641.json)、[出资、拒绝路径及后续状态 JSON](evidence/2026-10-22-project-003/contribution-11966646.json)。 - -### 到期结算后:开放退款 - -- 区块:`11966728`,2026-10-22 11:00:24(北京时间),晚于截止 24 秒。 -- 区块哈希:`0x73a74e96e116828b037afae3ed47f4346898662f022fbc76780e9107810c433f`。 -- 对比前一区块 `11966727`,项目从 `Funding`(0)变为 `Failed`(2);`target=0.0002 ETH`、`totalRaised=0.00003 ETH`、`escrowBalance=0.00003 ETH` 均未改变。 -- B 的 `contribution=0.00003 ETH`、`refunded=false`。结算只开放退款,没有自动返还资金;页面显示 `Failed` 和 `Claim refund · 0.00003 ETH`。 -- 证据:[结算 JSON](evidence/2026-10-22-project-003/finalize-funding-11966728.json)。 - -### 领取退款后:原额返还、托管归零 - -- 区块:`11966731`,2026-10-22 11:01:00(北京时间)。 -- 区块哈希:`0x82d86f311854bb1c41c83c6ddbde189eec30fb9400bc18f655ea1fbc63b34443`。 -- 对比前一区块 `11966730`,项目托管从 `0.00003 ETH` 变为 0;B 的 `refunded` 从 false 变为 true;状态仍为 `Failed`,历史 `totalRaised` 和 B 的 `contribution` 仍为 `0.00003 ETH`。 -- 合约事件 `RefundClaimed(3,B,30000000000000)` 确认退款金额;相邻区块末 B 的余额变化加回本次 Gas 费后为 `30000000000000 wei`,合约余额减少量也为该金额。余额差可能受同区块其他交易影响,本次观察金额吻合。 -- 该笔顶层为 `redeemDelegations(bytes[],bytes32[],bytes[])` 包装路径;按匹配 ABI 解码得到唯一内层目标为 MilestoneFund、value=0、`claimRefund(3)`。未请求交易 trace,未推断钱包配置。 -- 固定区块只读模拟 B 再次执行 `claimRefund(3)`,回滚 `No refund available`,防重复退款验证通过。 -- 两个里程碑仍未提交、批准或提款;截图显示 `Your original contribution has been refunded.`,Held in escrow 为 0。 -- 证据:[退款、余额观察及重复退款拒绝 JSON](evidence/2026-10-22-project-003/claim-refund-11966731.json)。 - -## 自动化测试与部署核验 - -| 测试 | 预期 | 状态 | +| A creates the project | Target 0.0001 ETH, initial raised amount and escrow 0 | PASS: receipt status=1 was retrieved retrospectively. A directly called createProject; the project ID, creator, target, and deadline in ProjectCreated matched the initial state at block 11966404. Funding, with neither milestone submitted | [Creation transaction](https://sepolia.etherscan.io/tx/0xd5fbd668c4046fcd56d19bbf2d9b8e77496f5fa2b8a1df2176938c93930f2ced); `01-project-created.png` | +| B contributes 0.00005 ETH | 50% funded, remains Funding | PASS: receipt status=1; the transaction called contribute(2), value=50000000000000 wei. The ContributionReceived event amount and address matched; the page showed 50% | [B's transaction](https://sepolia.etherscan.io/tx/0x6bc8c49885a02a4e09ca36963bbdfe402fcef420a55befaa879a7cd39fb04a19); `02-b-funded-50-percent.png` | +| C contributes 0.00005 ETH | Total 0.0001 ETH, immediately Successful | PASS: receipt status=1; contribute(2) had the correct amount. The same receipt contained ContributionReceived and FundingSuccessful(projectId=2,totalRaised=100000000000000) | [C's transaction](https://sepolia.etherscan.io/tx/0x69e08785c3725d6eed03cc69d74a983dd4a365456e9a72628f8397b2fed69c0b); `03-funded-100-percent.png` | +| A submits evidence for the first milestone | First milestone enters In review, initial approval weight 0 | PASS: receipt status=1; A called submitEvidence(2,0,...). EvidenceSubmitted text and URL matched the page; submitted=true, approved=false, approvalWeight=0 | [Evidence submission transaction](https://sepolia.etherscan.io/tx/0xd70e3aff6fd5adc3f9d18c1b6a44945ddc98fc7dbe39ced86eb67cd7517fef04); `04-milestone-1-in-review.png` | +| B alone approves the first milestone | Exactly 50% weight, milestone not yet approved | PASS: receipt status=1; B called approveMilestone(2,0), with ApprovalCast weight 50000000000000 wei. approved=false; the page remained In review | [B's first approval transaction](https://sepolia.etherscan.io/tx/0x2891bf404058a864dc474237fb5f99a94e02ce75df972e32ff4b42b11646f4f3); `05-milestone-1-b-approved-50-percent.png` | +| A attempts withdrawal at 50% (read-only simulation) | Contract rejects withdrawal | PASS: at block 11966534, eth_call withdrawMilestone(2,0) with from=A reverted with Milestone not withdrawable. No transaction was sent and no gas was paid | readOnlyChecks in `milestone-1-b-approval-11966534.json` | +| B approves again (read-only simulation) | Contract rejects a duplicate vote by the same backer | PASS: at the same block, eth_call approveMilestone(2,0) with from=B reverted with Already approved. No transaction was sent and no gas was paid | readOnlyChecks in `milestone-1-b-approval-11966534.json` | +| C approves the first milestone | Combined weight reaches 100%, milestone approved | PASS: receipt status=1; C called approveMilestone(2,0), emitting ApprovalCast and MilestoneApproved(2,0). approvalWeight=100000000000000 wei, approved=true; no withdrawal yet | [C's first approval transaction](https://sepolia.etherscan.io/tx/0xc5f2356e29f4e3efa651d1f418d6ab52132d174005d6b7cf9005ce9fe8e72253); `06-milestone-1-approved-100-percent.png` | +| A withdraws the first milestone | Releases 0.00004 ETH, leaves 0.00006 ETH in escrow, advances to the second milestone | PASS: receipt status=1; A called withdrawMilestone(2,0), with FundsWithdrawn amount 40000000000000 wei. First milestone withdrawn=true; project currentMilestone=1, escrowBalance=60000000000000 wei | [First withdrawal transaction](https://sepolia.etherscan.io/tx/0x9cfb87e7bfd0b00af3f42dd8f80cdbecaff96c38200684ad7fbc7023a62e941f); `07-milestone-1-released.png` | +| A withdraws the first milestone again (read-only simulation) | Contract rejects repeated withdrawal | PASS: at block 11966558, eth_call withdrawMilestone(2,0) with from=A reverted with Wrong milestone because the current milestone had advanced to index 1. No transaction was sent and no gas was paid | readOnlyChecks in `milestone-1-withdrawal-11966558.json` | +| A submits evidence for the second milestone | Second milestone enters In review, approval weight 0 | PASS: receipt status=1; A called submitEvidence(2,1,...). EvidenceSubmitted text and URL matched the page. Second milestone submitted=true, approved=false, approvalWeight=0; escrow remained 0.00006 ETH | [Second evidence submission transaction](https://sepolia.etherscan.io/tx/0x0b101e99c5b2086f924422243404536a73bc041f14e3869daf30eaba9f0979fb); `08-milestone-2-in-review.png` | +| B alone approves the second milestone | Exactly 50% weight, milestone not yet approved | PASS: receipt status=1; this contract's ApprovalCast recorded projectId=2, milestone=1, backer=B, weight=50000000000000 wei. Second milestone approved=false; B had voted and C had not. This used a wrapped call; the top-level target was not this contract | [B's second approval transaction](https://sepolia.etherscan.io/tx/0x936b5a5f82a32d9eb1ca0d0ddc6e1d2eb5c1629793210530825cc85f72331517); `09-milestone-2-b-approved-50-percent.png` | +| C approves the second milestone | Combined weight reaches 100%, milestone approved | PASS: receipt status=1; C called approveMilestone(2,1), emitting ApprovalCast and MilestoneApproved(2,1). approvalWeight=100000000000000 wei, approved=true; the remaining 0.00006 ETH had not been withdrawn | [C's second approval transaction](https://sepolia.etherscan.io/tx/0x4a39eac1c34b8498d21abda8c8eb102fedb0f2f419a3d2d3432446d9740a28a8); `10-milestone-2-approved-100-percent.png` | +| A withdraws the second milestone | Releases the remaining 0.00006 ETH; Completed; project escrow becomes 0 | PASS: receipt status=1; A called withdrawMilestone(2,1), emitting FundsWithdrawn for 60000000000000 wei and ProjectCompleted(2). status=3, currentMilestone=2, escrowBalance=0; total released across both milestones equaled total raised | [Final withdrawal transaction](https://sepolia.etherscan.io/tx/0x96c60c2f0f292f642c966216b7f027127024da7f14d363b5e7523b4557f39569); `11-milestone-2-ready-to-withdraw.png`, `12-milestone-2-released.png` | +| Withdrawal after completion (read-only simulation) | Contract rejects another withdrawal | PASS: at block 11966612, eth_call withdrawMilestone(2,1) with from=A reverted with Project not successful. No transaction was sent and no gas was paid | readOnlyChecks in `milestone-2-withdrawal-11966612.json` | +| Completion-page recheck (manual screenshot) | Page shows Completed and project escrow 0 | PASS (manual screenshot check): the screenshot returned following the refresh instructions showed Completed, Held in escrow=0 ETH, and the message that both milestones had been released. It matched project #002's state at block 11966656; the refresh event was not captured automatically | `13-completed-overview.png`; subsequent state is in latestObservation.completedProject2 within project #003's contribution evidence | + +Project #002 images are in `docs/evidence/2026-10-22-project-002/`; project #003 images are in `docs/evidence/2026-10-22-project-003/`. All are copies of original screenshots supplied by the tester. + +## Snapshots at fixed blocks + +### After creation (creation transaction retrieved retrospectively) + +- Block: `11966404`, block time: 2026-10-22 09:55:00 (Beijing time). +- Block hash: `0x8b7daba16642bf10fd98a850d8806c0ca2fb2db73d286ab72d35f816c2fc813c`. +- Project `Funding`, `currentMilestone=0`, `totalRaised=escrowBalance=0`; target `0.0001 ETH`, deadline `1792749600`. Neither milestone had been submitted, approved, or withdrawn. +- Full transaction, receipt, events, and state at the fixed block: [raw JSON](evidence/2026-10-22-project-002/project-creation-11966404.json). + +### After successful funding + +- Block: `11966479`, block time: 2026-10-22 10:10:00 (Beijing time). +- Block hash: `0x1b0e7dc9e4967863341b602b3059677f8cb0f52eead01a92c9b189941d323726`. +- B's contribution transaction block: `11966421`; C's contribution transaction block: `11966443`. +- Status: `Successful` (enum value 1); current milestone index 0, the first milestone. +- `totalRaised = escrowBalance = 0.0001 ETH`. +- B and C each had a recorded contribution of `0.00005 ETH`, representing 50% of the total each. +- Neither milestone had evidence submitted, approval, or a withdrawal; approvalWeight and withdrawnAmount were both 0. +- Full transactions, receipts, events, and state at the fixed block: [raw JSON](evidence/2026-10-22-project-002/contributions-11966479.json). + +### After evidence submission for the first milestone + +- Block: `11966501` (the evidence submission transaction's block), block time: 2026-10-22 10:14:24 (Beijing time). +- Block hash: `0x39d2a66ab3fe32463209857a55dbc88e111dbf8d530e5f7065957b970f21b430`. +- First milestone: `submitted=true`, `approved=false`, `withdrawn=false`; approval weight and withdrawn amount were both 0. The page showed `In review`, `0%`. +- First milestone evidence URL: `https://github.com/misaka10111/dapp`. +- The project remained `Successful`, current milestone index 0; `totalRaised = escrowBalance = 0.0001 ETH`. The second milestone had not yet been submitted. +- Full transaction, receipt, events, and state at the fixed block: [raw JSON](evidence/2026-10-22-project-002/milestone-1-evidence-11966501.json). + +### After B's first approval: the exact 50% boundary + +- Block: `11966534` (B's first approval transaction's block), block time: 2026-10-22 10:21:00 (Beijing time). +- Block hash: `0xb5f6ad90e8902fdb72b7bb681f8897cca689bb12ad66ddeb09dd1b36dd0146f7`. +- First milestone: `approvalWeight = 0.00005 ETH`, 50% of `totalRaised = 0.0001 ETH`; `submitted=true`, `approved=false`, `withdrawn=false`, `withdrawnAmount=0`. +- B had `hasApproved=true`, C had `hasApproved=false`; their contribution weights remained `0.00005 ETH` each. +- The project remained `Successful`, current milestone index 0, with escrow still at `0.0001 ETH`. +- Read-only `eth_call` checks at the same block confirmed that A's withdrawal reverted with `Milestone not withdrawable` and B's duplicate approval reverted with `Already approved`. Both were simulated calls against real on-chain state; neither produced a transaction receipt or changed on-chain state. +- Full transaction, receipt, events, state at the fixed block, and both revert results: [raw JSON](evidence/2026-10-22-project-002/milestone-1-b-approval-11966534.json). + +### After C's approval: first milestone approved + +- Block: `11966546` (C's first approval transaction's block), block time: 2026-10-22 10:23:24 (Beijing time). +- Block hash: `0x13e0d65e832210c1b993abde23f1b2e10dc28a69b812e7bda8159588d6428fe2`. +- Compared with the preceding block `11966545`, the first milestone changed from weight `0.00005 ETH`, `approved=false` to weight `0.0001 ETH`, `approved=true`. The page showed `100%` and `Approved`. +- Both B and C had `hasApproved` set to true; the first milestone still had `withdrawn=false`, `withdrawnAmount=0`. +- The project remained `Successful`, current milestone index 0; escrow remained `0.0001 ETH`. Approval itself did not release funds. The second milestone had not been submitted, approved, or withdrawn. +- Full transaction, receipt, events, and states at the transaction block and the preceding block: [raw JSON](evidence/2026-10-22-project-002/milestone-1-c-approval-11966546.json). + +### After the first withdrawal: 40% released, second milestone opened + +- Block: `11966558` (the first withdrawal transaction's block), block time: 2026-10-22 10:25:48 (Beijing time). +- Block hash: `0x0c581d6319f59797cc21b51442fb407881424b3d2a5a91ed71d93959867a2b99`. +- Compared with the preceding block `11966557`, escrow decreased from `0.0001 ETH` to `0.00006 ETH`. The decrease matched the FundsWithdrawn event and the first milestone's `withdrawnAmount = 0.00004 ETH`. +- The first milestone had `withdrawn=true`; the page showed `Released: 0.00004 ETH`. The project had `currentMilestone=1`, advancing to the second milestone, and remained `Successful`. +- `totalRaised` remained `0.0001 ETH`. The second milestone had `submitted=false`, `approved=false`, `withdrawn=false`, `approvalWeight=0`. B and C both had `hasApproved` set to false for the second milestone and needed to vote separately again. +- A read-only simulation at the same block of A withdrawing the first milestone again reverted with `Wrong milestone`. No second withdrawal transaction was sent. +- Full transaction, receipt, events, states at the transaction block and the preceding block, and the repeated-withdrawal revert result: [raw JSON](evidence/2026-10-22-project-002/milestone-1-withdrawal-11966558.json). + +### After evidence submission for the second milestone + +- Block: `11966571` (the second evidence submission transaction's block), block time: 2026-10-22 10:28:24 (Beijing time). +- Block hash: `0x3e7050462d78a71d2221591e543a8a84bed800094b68c265c8228789010f9930`. +- Second milestone: `submitted=true`, `approved=false`, `withdrawn=false`, `approvalWeight=0`, `withdrawnAmount=0`. The page showed `In review`, `0%`, with a milestone budget of `0.00006 ETH`. +- B and C both had `hasApproved` set to false for the second milestone; first-milestone votes were not automatically carried over. +- The first milestone remained released, with a withdrawn amount of `0.00004 ETH`. The project had `currentMilestone=1`, status `Successful`, `totalRaised=0.0001 ETH`, `escrowBalance=0.00006 ETH`. +- Full transaction, receipt, events, and state at the fixed block: [raw JSON](evidence/2026-10-22-project-002/milestone-2-evidence-11966571.json). + +### After B's second approval: 50% still based on original contributions + +- Block: `11966583` (B's second approval transaction's block), block time: 2026-10-22 10:30:48 (Beijing time). +- Block hash: `0x11bb47d1551926beae309aece12993d9ed6ff0a7d307d3cdf3e77ec8faee7f23`. +- Second milestone: `approvalWeight=0.00005 ETH`, `approved=false`, `withdrawn=false`; B had `hasApproved=true`, C had `hasApproved=false`. The page showed `50%`, `In review`. +- The denominator remained `totalRaised=0.0001 ETH`; the remaining escrow of `0.00006 ETH` did not change voting weight. The first milestone's withdrawn amount remained `0.00004 ETH`. +- B sent this transaction with value=0 to top-level target `0xdb9B1e94B5b69Df7e401DDbedE43491141047dB3`, not the MilestoneFund contract. This contract's ApprovalCast event and state at the fixed block confirmed that the approval took effect; the transaction must not be described as a direct top-level call to approveMilestone. +- The top-level calldata matched the selector and ABI encoding of `redeemDelegations(bytes[],bytes32[],bytes[])`. The decoded executionCallData contained one call with the MilestoneFund target address, value=0, and `approveMilestone(2,1)`. This was calldata decoding verification; no transaction trace was performed. +- Full transaction, receipt, events, and state at the fixed block: [raw JSON](evidence/2026-10-22-project-002/milestone-2-b-approval-11966583.json). + +### After C's approval: second milestone approved + +- Block: `11966586` (C's second approval transaction's block), block time: 2026-10-22 10:31:24 (Beijing time). +- Block hash: `0xc100ca08082e61a4c9f774bf6923ddc17446ed8db41784ab7cbbf74e1b6c2385`. +- Compared with the preceding block `11966585`, the second milestone changed from weight `0.00005 ETH`, `approved=false` to weight `0.0001 ETH`, `approved=true`. The page showed `100%`, `Approved`. +- Both B and C had `hasApproved` set to true for the second milestone. The second milestone had `withdrawn=false`, `withdrawnAmount=0`; the first milestone's withdrawn amount remained `0.00004 ETH`. +- The project remained `Successful`, with `currentMilestone=1`, `totalRaised=0.0001 ETH`, `escrowBalance=0.00006 ETH`. The final withdrawal had not occurred, and the project had not entered Completed. +- Full transaction, receipt, events, and states at the transaction block and the preceding block: [raw JSON](evidence/2026-10-22-project-002/milestone-2-c-approval-11966586.json). + +### After the second withdrawal: project completed + +- Block: `11966612` (the final withdrawal transaction's block), block time: 2026-10-22 10:36:48 (Beijing time). +- Block hash: `0x995e5144983aaf9ff686a9ad50a48fb3793ba96aa8694702410074af381c8dc6`. +- Compared with the preceding block `11966611`, status changed from `Successful` to `Completed` (enum value 3), `currentMilestone` advanced from 1 to 2, and project escrow fell from `0.00006 ETH` to 0. +- First milestone `withdrawnAmount=0.00004 ETH`, second milestone `withdrawnAmount=0.00006 ETH`, with `withdrawn=true` for both. Total released was `0.0001 ETH`, equal to `totalRaised`. +- The receipt contained both `FundsWithdrawn(2,1,60000000000000)` and `ProjectCompleted(2)`. The second milestone showed `Released: 0.00006 ETH` on the page. +- Balance observations at adjacent block ends: A's balance change plus the gas paid for this transaction was `60000000000000 wei`, matching the withdrawal; the entire contract balance decreased by the same amount. The contract's total balance remained `0.0005 ETH`, while this project's escrow was 0; these are distinct balances. Other transactions can affect comparisons across adjacent blocks, but the observed amounts matched in this case. +- A read-only simulation at the same block of A withdrawing again reverted with `Project not successful`; no transaction was sent. +- The tester initially supplied screenshots of the withdrawal button before execution and the milestone after withdrawal. A later screenshot, `13-completed-overview.png`, showed Completed and 0 escrow at the top of the project page, passing the completion-page recheck. The refresh action was not independently captured by automation. +- Full transaction, receipt, events, states at the transaction block and the preceding block, balance observations, and the repeated-withdrawal revert result: [raw JSON](evidence/2026-10-22-project-002/milestone-2-withdrawal-11966612.json). + +## Independent refund project #003 + +- Project name: `HQC-E2E-Refund-1022`; creator A; target `0.0002 ETH`; deadline `1792638000`, or 2026-10-22 11:00:00 (Beijing time). +- Milestone goals: `Deliver the prototype.` and `Deliver the final demo.`. + +| Operation | Expected result | Verification result | Transaction / evidence | +| --- | --- | --- | --- | +| A creates the refund test project | Funding, target 0.0002 ETH, initial raised amount and escrow 0 | PASS: receipt status=1; ProjectCreated recorded project 3, A, target, and deadline. State at the creation block matched the arguments. The top-level call was wrapped; decoded inner createProject arguments matched | [Creation transaction](https://sepolia.etherscan.io/tx/0x91a97815ddb95f1568707dd3bc7c8537b85ba5770dd59058bb6ca19c898e3ca1); `project-creation-11966641.json` | +| B contributes 0.00003 ETH | 15% funded, remains Funding | PASS: receipt status=1; B directly called contribute(3), value=30000000000000 wei. ContributionReceived matched, with no FundingSuccessful event. Contribution, total raised, and escrow were all 0.00003 ETH; refunded=false | [B's contribution transaction](https://sepolia.etherscan.io/tx/0x0aab5ef7f63041f863e6b942ce80f286eda016d46fba5a1dc42721c853718fb4); `01-funded-15-percent.png`, `contribution-11966646.json` | +| Finalization before the deadline (read-only simulation) | Contract rejects early finalization | PASS: at block 11966646, eth_call finalizeFunding(3) with from=B reverted with Deadline not reached. No transaction was sent and no gas was paid | readOnlyChecks in the contribution evidence | +| Refund before the project has failed (read-only simulation) | Contract rejects early refund | PASS: at the same block, eth_call claimRefund(3) with from=B reverted with Project not failed. No transaction was sent and no gas was paid | readOnlyChecks in the contribution evidence | +| B finalizes after the deadline | Funding changes to Failed; refunds open, escrow initially unchanged | PASS: receipt status=1; B directly called finalizeFunding(3), emitting FundingFailed(3). The receipt block's timestamp was after the deadline; status changed from 0 to 2, escrow remained 0.00003 ETH, and B had not yet claimed a refund | [Finalization transaction](https://sepolia.etherscan.io/tx/0x067497600a670f6660090ee4b23334beb8ca3e5a3d10dbdc2e6332244bb3af83); `02-awaiting-finalization.png`, `03-failed-refund-available.png` | +| B claims a refund | Original contribution of 0.00003 ETH returned to B, project escrow becomes 0 | PASS: receipt status=1; the decoded inner call of the wrapped transaction was claimRefund(3). RefundClaimed recorded B and 30000000000000 wei; refunded=true, escrowBalance=0, with historical totalRaised and contribution retained | [Refund transaction](https://sepolia.etherscan.io/tx/0xcb774a9adad688000b85c79246ce497e01321dbdb926632ff7892f5109bb3842); `04-refunded-escrow-zero.png` | +| B claims a refund again (read-only simulation) | Contract rejects duplicate refund | PASS: at block 11966731, eth_call claimRefund(3) with from=B reverted with No refund available. No transaction was sent and no gas was paid | readOnlyChecks in `claim-refund-11966731.json` | + +### Creation and contribution snapshots + +- Creation block `11966641`, 2026-10-22 10:42:48 (Beijing time); block hash `0x101a82359cbf7c243c5e0ffe8dbb5b51f867c80f389af41b7f14120edf4ef0af`. Status Funding, initial total raised and escrow both 0, neither milestone submitted. +- B's contribution block `11966646`, 2026-10-22 10:43:48 (Beijing time); block hash `0xe2703aaa42a679df6beb114df965ea0dfbea2e8671851548dfe203a880be2a5a`. +- After contribution: `totalRaised=escrowBalance=0.00003 ETH`, `target=0.0002 ETH`, `status=Funding`, `currentMilestone=0`; B's recorded contribution was 0.00003 ETH, `refunded=false`. +- Subsequent verification block `11966656`, 2026-10-22 10:45:48 (Beijing time); block hash `0x65ababefb984ee4656d82051dc36d6493348e9afb30892c2275fe8f8406940d2`. The deadline was still 852 seconds away; neither finalization nor refund had occurred. At the same block, project #002 remained Completed with 0 escrow. +- Evidence: [creation JSON](evidence/2026-10-22-project-003/project-creation-11966641.json), [contribution, rejection checks, and subsequent state JSON](evidence/2026-10-22-project-003/contribution-11966646.json). + +### After finalization at expiry: refunds opened + +- Block: `11966728`, 2026-10-22 11:00:24 (Beijing time), 24 seconds after the deadline. +- Block hash: `0x73a74e96e116828b037afae3ed47f4346898662f022fbc76780e9107810c433f`. +- Compared with the preceding block `11966727`, the project changed from `Funding` (0) to `Failed` (2); `target=0.0002 ETH`, `totalRaised=0.00003 ETH`, and `escrowBalance=0.00003 ETH` were unchanged. +- B had `contribution=0.00003 ETH`, `refunded=false`. Finalization only opened refunds; it did not return funds automatically. The page showed `Failed` and `Claim refund · 0.00003 ETH`. +- Evidence: [finalization JSON](evidence/2026-10-22-project-003/finalize-funding-11966728.json). + +### After claiming the refund: original amount returned, escrow zero + +- Block: `11966731`, 2026-10-22 11:01:00 (Beijing time). +- Block hash: `0x82d86f311854bb1c41c83c6ddbde189eec30fb9400bc18f655ea1fbc63b34443`. +- Compared with the preceding block `11966730`, project escrow fell from `0.00003 ETH` to 0; B's `refunded` changed from false to true. Status remained `Failed`, and historical `totalRaised` and B's `contribution` remained `0.00003 ETH`. +- The contract event `RefundClaimed(3,B,30000000000000)` confirmed the refund amount. B's balance change between adjacent block ends plus the gas paid for this transaction was `30000000000000 wei`; the contract balance decreased by the same amount. Other transactions in those blocks could affect the balance difference, but the observed amounts matched in this case. +- The top-level call used the `redeemDelegations(bytes[],bytes32[],bytes[])` wrapper. Decoding with the matching ABI produced one inner call targeting MilestoneFund, with value=0 and `claimRefund(3)`. No transaction trace was requested, and no wallet configuration was inferred. +- A read-only simulation at the fixed block of B calling `claimRefund(3)` again reverted with `No refund available`, confirming duplicate-refund protection. +- Neither milestone had been submitted, approved, or withdrawn. The screenshot showed `Your original contribution has been refunded.` and Held in escrow at 0. +- Evidence: [refund, balance observations, and duplicate-refund rejection JSON](evidence/2026-10-22-project-003/claim-refund-11966731.json). + +## Historical automated tests and deployment verification + +| Test | Expected result | Status | | --- | --- | --- | -| 连续状态自动化测试 | 对每一步的余额、权重及阶段变化进行断言 | PASS:两组编译配置各 5 类场景,合计 10/10;包括完整放款、超额筹款与取整、多项目隔离及退款、截止边界、收款失败回滚与重试。见[实际运行输出](evidence/automated/continuous-state.tap) | -| 部署复现 | 记录编译器完整版本、优化配置、EVM 版本并核对部署 | PASS:`0.8.34+commit.80d5c536.Emscripten.clang`、优化关闭、Osaka;15,664 字节完整 runtime 与区块 11966764 一致,保存的输入离线复编也一致。见[核验结果](evidence/deployment/verification-11966764.json) | -| 前端构建 | 测试工具接入后生产构建正常 | PASS:`npm run build` 退出码 0 | +| Continuous-state automated tests | Assert balances, weights, and milestone changes at each step | PASS: 5 scenarios under each of two compiler configurations, 10/10 in total; covering complete payouts, excess funding and rounding, project isolation and refunds, deadline boundaries, and failed-payment rollback and retry. See the [actual run output](evidence/automated/continuous-state.tap) | +| Deployment reproduction | Record the full compiler version, optimization settings, and EVM version, then compare against the deployment | PASS: `0.8.34+commit.80d5c536.Emscripten.clang`, optimization disabled, Osaka. The full 15,664-byte runtime matched block 11966764; recompiling the saved input offline also matched. See the [verification result](evidence/deployment/verification-11966764.json) | +| Frontend build | Production build still works after adding the test tools | PASS: `npm run build` exited with code 0 | + +Tests for both compiler configurations ran in a local Osaka EVM. These are business-logic tests of two compiled outputs, not coverage of two execution hardfork environments. See the [automated testing guide](automated-testing.md) for commands and assertion scope. -两组编译配置的测试均在本地 Osaka EVM 中执行;这是两种编译产物的业务测试,不是两种执行硬分叉环境的覆盖。运行方法和断言范围见[自动化测试说明](automated-testing.md)。 +## Operational observations and limitations -## 操作观察与限制 +- A `could not coalesce error` message appeared during creation; the successfully created project #002 appeared on the page afterward. The successful creation transaction was subsequently retrieved, but the underlying details of the error were not obtained. Its cause, and whether it belonged to the same attempt as the successful creation, remain unknown. +- After switching to B, MetaMask initially indicated that B was not connected to localhost:5173. Once the connection was authorized, the page switched to B and the contribution succeeded. +- A hidden or disabled button only verifies the UI permission state. Proving that a direct contract call is rejected requires a separate call result or receipt. +- The two manual business workflows, successful payout and failed-funding refund, passed, as did the local continuous-state tests, deployment runtime reproduction, and frontend build described above. The completion page was checked through a manual screenshot; no automated browser-refresh test was performed. These results do not establish coverage of every possible input or constitute a security audit. -- 创建过程中曾出现 `could not coalesce error` 提示;随后页面出现了成功创建的项目 #002。已补查到成功创建交易,但尚未取得该错误对应的底层信息,不能确定其原因或是否与成功创建属于同一次尝试。 -- 切换到 B 后,MetaMask 最初显示 B 尚未连接 localhost:5173;授权连接后网页切换到 B,随后出资成功。 -- 页面隐藏或禁用某个按钮只能作为界面权限检查;直接调用合约被拒绝需要另有调用结果或回执证据。 -- 成功放款和失败退款两条手动业务流程、上述本地连续状态测试、部署运行时代码复现及前端构建均已通过。完成页通过人工截图复查,没有执行浏览器自动化刷新测试;这些结果不等于覆盖所有可能输入或完成安全审计。 +## Current-version acceptance progress (2026-11-07) + +The #002 successful workflow above is complete, with evidence for 13 additional transactions and 13 screenshots. Other scenarios are marked separately below; a successful workflow does not mean that all acceptance testing has passed. Use new projects for subsequent tests and retain this run's evidence and the historical evidence. The current contract is Sepolia `0x5A5AeaE5553Feb5c5b27FEe5ec8b24E3ED2B964F`; both approval and submission windows read as 600 seconds in this run. + +The local automated run on 2026-11-07 passed **124/124** tests (0 failures, 0 skipped), and the production build passed. See the [TAP record for this run](evidence/automated/regression-2026-11-07.tap) and [test coverage](automated-testing.md). Automated results and this manual acceptance evidence are recorded separately. + +| Scenario | Operation and acceptance criteria | Status | +| --- | --- | --- | +| Capped contributions | Submit a contribution exceeding the remaining target. Check that `ContributionReceived` records only the accepted amount, `ExcessRefunded` records the excess, and contributions close at the target. Amounts must agree with the page and account balance changes after accounting for gas. | Not run | +| Separate release and claim | For each milestone, call `releaseMilestone` before `claimPayout`. Confirm that escrow decreases, claimable payout increases, and claims remain possible after Completed. | PASS: both milestones passed in this run, with the default recipient A. Alternative recipients were not tested | +| Evidence submission timeout | After successful funding, do not submit evidence; wait for the on-chain deadline. Late submission must be rejected, backers must be able to claim the quoted refund, and the first successful refund must change status to Expired. | Not run | +| Approval timeout | Submit evidence without reaching strictly more than 50% approval weight. After expiry, new approvals must stop and backers must be able to claim refunds. A milestone approved before its deadline must remain releasable and must not be refundable. | Not run | +| Fixed refund pool after a partial release | Two backers contribute; release 40% for the first milestone and let the second milestone expire. Refund the remaining escrow in proportion to original contributions. After the first refund, the second backer's claimable amount must not shrink with the remaining balance; duplicate refunds must be rejected. Record any rounding remainder. | Not run | +| Browser and wallet regression | Switch between creator and backer accounts and check buttons and personal state. Check signature rejection, switching to the wrong network, and state restoration after refresh separately. | Partially passed: A/B/C switching, visible role-specific buttons, and refresh after completing the successful workflow were checked. Signature rejection, wrong networks, and refresh after a refund were not tested | + +After completing each item, save its transaction hashes, receipts, states at fixed blocks, and corresponding screenshots, and mark it passed, failed, or not tested. Record on-chain permission rejections separately from UI button visibility. Passing pure-function, simulated-wallet, or local contract tests does not replace this manual evidence. diff --git a/docs/evidence/2026-11-07-project-002/01-project-created.png b/docs/evidence/2026-11-07-project-002/01-project-created.png new file mode 100644 index 0000000..1010bef Binary files /dev/null and b/docs/evidence/2026-11-07-project-002/01-project-created.png differ diff --git a/docs/evidence/2026-11-07-project-002/02-b-funded-50-percent.png b/docs/evidence/2026-11-07-project-002/02-b-funded-50-percent.png new file mode 100644 index 0000000..fd895c9 Binary files /dev/null and b/docs/evidence/2026-11-07-project-002/02-b-funded-50-percent.png differ diff --git a/docs/evidence/2026-11-07-project-002/03-funded-100-percent.png b/docs/evidence/2026-11-07-project-002/03-funded-100-percent.png new file mode 100644 index 0000000..67c4539 Binary files /dev/null and b/docs/evidence/2026-11-07-project-002/03-funded-100-percent.png differ diff --git a/docs/evidence/2026-11-07-project-002/04-milestone-1-in-review.png b/docs/evidence/2026-11-07-project-002/04-milestone-1-in-review.png new file mode 100644 index 0000000..d677620 Binary files /dev/null and b/docs/evidence/2026-11-07-project-002/04-milestone-1-in-review.png differ diff --git a/docs/evidence/2026-11-07-project-002/05-milestone-1-b-approved-50-percent.png b/docs/evidence/2026-11-07-project-002/05-milestone-1-b-approved-50-percent.png new file mode 100644 index 0000000..ff8c00e Binary files /dev/null and b/docs/evidence/2026-11-07-project-002/05-milestone-1-b-approved-50-percent.png differ diff --git a/docs/evidence/2026-11-07-project-002/06-milestone-1-approved-100-percent.png b/docs/evidence/2026-11-07-project-002/06-milestone-1-approved-100-percent.png new file mode 100644 index 0000000..a0d54e7 Binary files /dev/null and b/docs/evidence/2026-11-07-project-002/06-milestone-1-approved-100-percent.png differ diff --git a/docs/evidence/2026-11-07-project-002/07-milestone-1-released-payout-pending.png b/docs/evidence/2026-11-07-project-002/07-milestone-1-released-payout-pending.png new file mode 100644 index 0000000..d877936 Binary files /dev/null and b/docs/evidence/2026-11-07-project-002/07-milestone-1-released-payout-pending.png differ diff --git a/docs/evidence/2026-11-07-project-002/08-milestone-1-payout-claimed.png b/docs/evidence/2026-11-07-project-002/08-milestone-1-payout-claimed.png new file mode 100644 index 0000000..85a56f2 Binary files /dev/null and b/docs/evidence/2026-11-07-project-002/08-milestone-1-payout-claimed.png differ diff --git a/docs/evidence/2026-11-07-project-002/09-milestone-2-in-review.png b/docs/evidence/2026-11-07-project-002/09-milestone-2-in-review.png new file mode 100644 index 0000000..ea700d4 Binary files /dev/null and b/docs/evidence/2026-11-07-project-002/09-milestone-2-in-review.png differ diff --git a/docs/evidence/2026-11-07-project-002/10-milestone-2-b-approved-50-percent.png b/docs/evidence/2026-11-07-project-002/10-milestone-2-b-approved-50-percent.png new file mode 100644 index 0000000..28a5960 Binary files /dev/null and b/docs/evidence/2026-11-07-project-002/10-milestone-2-b-approved-50-percent.png differ diff --git a/docs/evidence/2026-11-07-project-002/11-milestone-2-approved-100-percent.png b/docs/evidence/2026-11-07-project-002/11-milestone-2-approved-100-percent.png new file mode 100644 index 0000000..1d4814f Binary files /dev/null and b/docs/evidence/2026-11-07-project-002/11-milestone-2-approved-100-percent.png differ diff --git a/docs/evidence/2026-11-07-project-002/12-completed-payout-pending.png b/docs/evidence/2026-11-07-project-002/12-completed-payout-pending.png new file mode 100644 index 0000000..6b5e778 Binary files /dev/null and b/docs/evidence/2026-11-07-project-002/12-completed-payout-pending.png differ diff --git a/docs/evidence/2026-11-07-project-002/13-completed-after-refresh.png b/docs/evidence/2026-11-07-project-002/13-completed-after-refresh.png new file mode 100644 index 0000000..86ab43a Binary files /dev/null and b/docs/evidence/2026-11-07-project-002/13-completed-after-refresh.png differ diff --git a/docs/evidence/2026-11-07-project-002/chain-evidence.json b/docs/evidence/2026-11-07-project-002/chain-evidence.json new file mode 100644 index 0000000..f99905b --- /dev/null +++ b/docs/evidence/2026-11-07-project-002/chain-evidence.json @@ -0,0 +1,3710 @@ +{ + "schemaVersion": 1, + "observedAt": "2026-11-07T07:13:08.887Z", + "network": "Ethereum Sepolia", + "chainId": 11155111, + "contractAddress": "0x5A5AeaE5553Feb5c5b27FEe5ec8b24E3ED2B964F", + "projectId": "2", + "projectName": "Test Project 03", + "actors": { + "A": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "B": "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E", + "C": "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + }, + "sourceReference": { + "baseCommit": "4a77279e43b7a8e9eea7c7105a1ede3369ab2a07", + "abiSha256": "e9ae640a64991d4a3b024ad17a89d6acf89241b4a9d724f36aaf4c020f7d223f", + "contractSourceSha256": "072b7795986e5fdd3d9efbec3950c808fbe791f9b1829e1ecd08198a6c881bd1", + "deployedFrontendCommit": "not independently established" + }, + "rpc": "https://ethereum-sepolia-rpc.publicnode.com", + "scope": { + "transactions": "User supplied hashes; all 13 receipts and direct calls independently checked read-only.", + "snapshots": "Contract state read at the end of each transaction block; not intra-transaction traces. Every block hash rechecked after collection.", + "writes": "No signing, transaction sending, deployment or wallet operation performed by evidence collector.", + "refresh": "User-provided final screenshot and explicit confirmation; not an automated browser-refresh capture.", + "exclusions": [ + "No failed/rejected transaction paths exercised in this success run.", + "No transaction trace or independent recipient wallet balance reconciliation.", + "Timeout refunds and excess contributions not exercised." + ] + }, + "summary": { + "successfulReceipts": 13, + "validatedSnapshots": 13, + "allAssertionsPassed": true, + "firstBlock": 12081978, + "lastBlock": 12082066, + "totalRaisedWei": "100000000000000", + "releasedWei": "100000000000000", + "claimedWei": "100000000000000", + "finalStatus": "Completed", + "finalEscrowWei": "0", + "finalClaimablePayoutWei": "0" + }, + "timeoutReads": [ + { + "method": "APPROVAL_TIMEOUT", + "args": [], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000258", + "value": "600" + }, + { + "method": "SUBMISSION_TIMEOUT", + "args": [], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000258", + "value": "600" + } + ], + "steps": [ + { + "step": 1, + "actor": "A", + "transactionHash": "0xdae4720a2fef074f576e58196be44170c0b0b7d917b13f66e5f431fda9f87437", + "block": { + "number": 12081978, + "hash": "0x416343a62a748fae8fb3c17d06dbca94ba425a9b0309b8c00d3bea06d25d0540", + "timestamp": 1794033984, + "timeUTC": "2026-11-07T06:46:24.000Z", + "timeBeijing": "2026-11-07 14:46:24 UTC+08:00" + }, + "decodedCall": { + "name": "createProject", + "signature": "createProject(string,string,uint256,uint256,string,string)", + "args": { + "name": "Test Project 03", + "description": "End-to-end test of milestone approvals and separate release and payout.", + "target": "100000000000000", + "deadline": "1794132000", + "firstGoal": "Complete prototype verification", + "secondGoal": "Complete final delivery verification" + }, + "valueWei": "0" + }, + "events": [ + { + "name": "ProjectCreated", + "signature": "ProjectCreated(uint256,address,uint256,uint256)", + "args": { + "projectId": "2", + "creator": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "target": "100000000000000", + "deadline": "1794132000" + }, + "logIndex": 20 + } + ], + "snapshot": { + "project": { + "creator": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "name": "Test Project 03", + "description": "End-to-end test of milestone approvals and separate release and payout.", + "target": "100000000000000", + "deadline": "1794132000", + "totalRaised": "0", + "escrowBalance": "0", + "status": "0", + "currentMilestone": "0", + "successfulAt": "0" + }, + "milestones": [ + { + "goal": "Complete prototype verification", + "evidence": "", + "evidenceUrl": "", + "approvalWeight": "0", + "withdrawnAmount": "0", + "submittedAt": "0", + "submitted": false, + "approved": false, + "withdrawn": false + }, + { + "goal": "Complete final delivery verification", + "evidence": "", + "evidenceUrl": "", + "approvalWeight": "0", + "withdrawnAmount": "0", + "submittedAt": "0", + "submitted": false, + "approved": false, + "withdrawn": false + } + ], + "claimablePayoutWei": "0", + "contributionsWei": { + "B": "0", + "C": "0" + }, + "hasApproved": { + "milestone1": { + "B": false, + "C": false + }, + "milestone2": { + "B": false, + "C": false + } + } + }, + "readCalls": [ + { + "method": "getProject", + "args": [ + "2" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000406799e512b14cbdfccb7ef2acea9e6bcfb218c40000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000005af3107a4000000000000000000000000000000000000000000000000000000000006af0482000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f546573742050726f6a65637420303300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047456e642d746f2d656e642074657374206f66206d696c6573746f6e6520617070726f76616c7320616e642073657061726174652072656c6561736520616e64207061796f75742e00000000000000000000000000000000000000000000000000", + "value": { + "creator": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "name": "Test Project 03", + "description": "End-to-end test of milestone approvals and separate release and payout.", + "target": "100000000000000", + "deadline": "1794132000", + "totalRaised": "0", + "escrowBalance": "0", + "status": "0", + "currentMilestone": "0", + "successfulAt": "0" + } + }, + { + "method": "getMilestone", + "args": [ + "2", + 0 + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f436f6d706c6574652070726f746f7479706520766572696669636174696f6e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "value": { + "goal": "Complete prototype verification", + "evidence": "", + "evidenceUrl": "", + "approvalWeight": "0", + "withdrawnAmount": "0", + "submittedAt": "0", + "submitted": false, + "approved": false, + "withdrawn": false + } + }, + { + "method": "getMilestone", + "args": [ + "2", + 1 + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024436f6d706c6574652066696e616c2064656c697665727920766572696669636174696f6e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "value": { + "goal": "Complete final delivery verification", + "evidence": "", + "evidenceUrl": "", + "approvalWeight": "0", + "withdrawnAmount": "0", + "submittedAt": "0", + "submitted": false, + "approved": false, + "withdrawn": false + } + }, + { + "method": "claimablePayouts", + "args": [ + "2" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": "0" + }, + { + "method": "contributions", + "args": [ + "2", + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": "0" + }, + { + "method": "contributions", + "args": [ + "2", + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": "0" + }, + { + "method": "hasApproved", + "args": [ + "2", + 0, + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": false + }, + { + "method": "hasApproved", + "args": [ + "2", + 0, + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": false + }, + { + "method": "hasApproved", + "args": [ + "2", + 1, + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": false + }, + { + "method": "hasApproved", + "args": [ + "2", + 1, + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": false + } + ], + "rawTransaction": { + "type": "0x2", + "chainId": "0xaa36a7", + "nonce": "0xa", + "gas": "0x150e3c", + "maxFeePerGas": "0x59682f16", + "maxPriorityFeePerGas": "0x59682f00", + "to": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "value": "0x0", + "accessList": [], + "input": "0x935e128200000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000005af3107a4000000000000000000000000000000000000000000000000000000000006af04820000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000000f546573742050726f6a65637420303300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047456e642d746f2d656e642074657374206f66206d696c6573746f6e6520617070726f76616c7320616e642073657061726174652072656c6561736520616e64207061796f75742e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f436f6d706c6574652070726f746f7479706520766572696669636174696f6e000000000000000000000000000000000000000000000000000000000000000024436f6d706c6574652066696e616c2064656c697665727920766572696669636174696f6e00000000000000000000000000000000000000000000000000000000", + "r": "0x76537beab32febf973bbebe90495485ee2f7b5ae6505f8ae8ef58704da8f83af", + "s": "0x61adde359ce99859d116bbb05dfd78dcdcded33528b8f1987296ecde67d9f648", + "yParity": "0x1", + "v": "0x1", + "hash": "0xdae4720a2fef074f576e58196be44170c0b0b7d917b13f66e5f431fda9f87437", + "blockHash": "0x416343a62a748fae8fb3c17d06dbca94ba425a9b0309b8c00d3bea06d25d0540", + "blockNumber": "0xb85b3a", + "transactionIndex": "0x7", + "from": "0x406799e512b14cbdfccb7ef2acea9e6bcfb218c4", + "gasPrice": "0x59682f10", + "blockTimestamp": "0x6aeec940" + }, + "rawReceipt": { + "type": "0x2", + "status": "0x1", + "cumulativeGasUsed": "0x26b6f6", + "logs": [ + { + "address": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "topics": [ + "0xb5d890eb2df709d2f732ed81f328b444e49c1618ed8d64c53c0a040ec4040e1e", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x000000000000000000000000406799e512b14cbdfccb7ef2acea9e6bcfb218c4" + ], + "data": "0x00000000000000000000000000000000000000000000000000005af3107a4000000000000000000000000000000000000000000000000000000000006af04820", + "blockHash": "0x416343a62a748fae8fb3c17d06dbca94ba425a9b0309b8c00d3bea06d25d0540", + "blockNumber": "0xb85b3a", + "blockTimestamp": "0x6aeec940", + "transactionHash": "0xdae4720a2fef074f576e58196be44170c0b0b7d917b13f66e5f431fda9f87437", + "transactionIndex": "0x7", + "logIndex": "0x14", + "removed": false + } + ], + "logsBloom": "0x04000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000004010000000000000000000020000000000000900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000100000000", + "transactionHash": "0xdae4720a2fef074f576e58196be44170c0b0b7d917b13f66e5f431fda9f87437", + "transactionIndex": "0x7", + "blockHash": "0x416343a62a748fae8fb3c17d06dbca94ba425a9b0309b8c00d3bea06d25d0540", + "blockNumber": "0xb85b3a", + "gasUsed": "0x14df45", + "effectiveGasPrice": "0x59682f10", + "from": "0x406799e512b14cbdfccb7ef2acea9e6bcfb218c4", + "to": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "contractAddress": null + } + }, + { + "step": 2, + "actor": "B", + "transactionHash": "0xedac642f43028573ea475d58fb7bcfd44786a3025c46a6f099c51f182b379a44", + "block": { + "number": 12082002, + "hash": "0x7c03b0cf88505db7d54982e69c350c86db88c81bf7916ce1a086c3093686c1d6", + "timestamp": 1794034272, + "timeUTC": "2026-11-07T06:51:12.000Z", + "timeBeijing": "2026-11-07 14:51:12 UTC+08:00" + }, + "decodedCall": { + "name": "contribute", + "signature": "contribute(uint256)", + "args": { + "projectId": "2" + }, + "valueWei": "50000000000000" + }, + "events": [ + { + "name": "ContributionReceived", + "signature": "ContributionReceived(uint256,address,uint256)", + "args": { + "projectId": "2", + "backer": "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E", + "amount": "50000000000000" + }, + "logIndex": 155 + } + ], + "snapshot": { + "project": { + "creator": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "name": "Test Project 03", + "description": "End-to-end test of milestone approvals and separate release and payout.", + "target": "100000000000000", + "deadline": "1794132000", + "totalRaised": "50000000000000", + "escrowBalance": "50000000000000", + "status": "0", + "currentMilestone": "0", + "successfulAt": "0" + }, + "milestones": [ + { + "goal": "Complete prototype verification", + "evidence": "", + "evidenceUrl": "", + "approvalWeight": "0", + "withdrawnAmount": "0", + "submittedAt": "0", + "submitted": false, + "approved": false, + "withdrawn": false + }, + { + "goal": "Complete final delivery verification", + "evidence": "", + "evidenceUrl": "", + "approvalWeight": "0", + "withdrawnAmount": "0", + "submittedAt": "0", + "submitted": false, + "approved": false, + "withdrawn": false + } + ], + "claimablePayoutWei": "0", + "contributionsWei": { + "B": "50000000000000", + "C": "0" + }, + "hasApproved": { + "milestone1": { + "B": false, + "C": false + }, + "milestone2": { + "B": false, + "C": false + } + } + }, + "readCalls": [ + { + "method": "getProject", + "args": [ + "2" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000406799e512b14cbdfccb7ef2acea9e6bcfb218c40000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000005af3107a4000000000000000000000000000000000000000000000000000000000006af0482000000000000000000000000000000000000000000000000000002d79883d200000000000000000000000000000000000000000000000000000002d79883d2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f546573742050726f6a65637420303300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047456e642d746f2d656e642074657374206f66206d696c6573746f6e6520617070726f76616c7320616e642073657061726174652072656c6561736520616e64207061796f75742e00000000000000000000000000000000000000000000000000", + "value": { + "creator": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "name": "Test Project 03", + "description": "End-to-end test of milestone approvals and separate release and payout.", + "target": "100000000000000", + "deadline": "1794132000", + "totalRaised": "50000000000000", + "escrowBalance": "50000000000000", + "status": "0", + "currentMilestone": "0", + "successfulAt": "0" + } + }, + { + "method": "getMilestone", + "args": [ + "2", + 0 + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f436f6d706c6574652070726f746f7479706520766572696669636174696f6e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "value": { + "goal": "Complete prototype verification", + "evidence": "", + "evidenceUrl": "", + "approvalWeight": "0", + "withdrawnAmount": "0", + "submittedAt": "0", + "submitted": false, + "approved": false, + "withdrawn": false + } + }, + { + "method": "getMilestone", + "args": [ + "2", + 1 + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024436f6d706c6574652066696e616c2064656c697665727920766572696669636174696f6e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "value": { + "goal": "Complete final delivery verification", + "evidence": "", + "evidenceUrl": "", + "approvalWeight": "0", + "withdrawnAmount": "0", + "submittedAt": "0", + "submitted": false, + "approved": false, + "withdrawn": false + } + }, + { + "method": "claimablePayouts", + "args": [ + "2" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": "0" + }, + { + "method": "contributions", + "args": [ + "2", + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "value": "50000000000000" + }, + { + "method": "contributions", + "args": [ + "2", + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": "0" + }, + { + "method": "hasApproved", + "args": [ + "2", + 0, + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": false + }, + { + "method": "hasApproved", + "args": [ + "2", + 0, + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": false + }, + { + "method": "hasApproved", + "args": [ + "2", + 1, + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": false + }, + { + "method": "hasApproved", + "args": [ + "2", + 1, + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": false + } + ], + "rawTransaction": { + "type": "0x2", + "chainId": "0xaa36a7", + "nonce": "0x8", + "gas": "0x75e60", + "maxFeePerGas": "0x59682f19", + "maxPriorityFeePerGas": "0x59682f00", + "to": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "value": "0x2d79883d2000", + "accessList": [], + "input": "0xc1cbbca70000000000000000000000000000000000000000000000000000000000000002", + "r": "0x62a9bcbaf7bd3e2c8b347f30856b3127555d5c7b9b5b28fa7404ffb3615aeeee", + "s": "0x720c52845470f12cddbc24419fe3eef09ed9a6ff12d4009779a817a87a75e5a7", + "yParity": "0x1", + "v": "0x1", + "hash": "0xedac642f43028573ea475d58fb7bcfd44786a3025c46a6f099c51f182b379a44", + "blockHash": "0x7c03b0cf88505db7d54982e69c350c86db88c81bf7916ce1a086c3093686c1d6", + "blockNumber": "0xb85b52", + "transactionIndex": "0x4c", + "from": "0x26791c26fba3612eb49fa763fa47cfecd66b6a1e", + "gasPrice": "0x59682f12", + "blockTimestamp": "0x6aeeca60" + }, + "rawReceipt": { + "type": "0x2", + "status": "0x1", + "cumulativeGasUsed": "0x34ddc9b", + "logs": [ + { + "address": "0xfffffffffffffffffffffffffffffffffffffffe", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000026791c26fba3612eb49fa763fa47cfecd66b6a1e", + "0x0000000000000000000000005a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f" + ], + "data": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "blockHash": "0x7c03b0cf88505db7d54982e69c350c86db88c81bf7916ce1a086c3093686c1d6", + "blockNumber": "0xb85b52", + "blockTimestamp": "0x6aeeca60", + "transactionHash": "0xedac642f43028573ea475d58fb7bcfd44786a3025c46a6f099c51f182b379a44", + "transactionIndex": "0x4c", + "logIndex": "0x9a", + "removed": false + }, + { + "address": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "topics": [ + "0x865c884d49c8cecaef108efb20f7d282f26c0f9b0d24dd48e5592d4e02ec658d", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x00000000000000000000000026791c26fba3612eb49fa763fa47cfecd66b6a1e" + ], + "data": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "blockHash": "0x7c03b0cf88505db7d54982e69c350c86db88c81bf7916ce1a086c3093686c1d6", + "blockNumber": "0xb85b52", + "blockTimestamp": "0x6aeeca60", + "transactionHash": "0xedac642f43028573ea475d58fb7bcfd44786a3025c46a6f099c51f182b379a44", + "transactionIndex": "0x4c", + "logIndex": "0x9b", + "removed": false + } + ], + "logsBloom": "0x04000000000000000000000000000000000000080000000000000000000800000002010000000000000002000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000010002000000000000000000000000020000000000010000000000000004000000000000000000000000000000000000000000000000000000000000000020000000000000100000000000000000000000000000000000000000008000002000000000008000000000000000000000000000000000000008000400000000000000000000000000000000000000000008000000000000100000000", + "transactionHash": "0xedac642f43028573ea475d58fb7bcfd44786a3025c46a6f099c51f182b379a44", + "transactionIndex": "0x4c", + "blockHash": "0x7c03b0cf88505db7d54982e69c350c86db88c81bf7916ce1a086c3093686c1d6", + "blockNumber": "0xb85b52", + "gasUsed": "0x59d7a", + "effectiveGasPrice": "0x59682f12", + "from": "0x26791c26fba3612eb49fa763fa47cfecd66b6a1e", + "to": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "contractAddress": null + } + }, + { + "step": 3, + "actor": "C", + "transactionHash": "0x923e80b878d47111a62a2c0fc3d31cbc9618088563b9fef40b359e74aa2c40a2", + "block": { + "number": 12082012, + "hash": "0xf14d8cbc6a834bf7811c74e6ba9dabdcc80b620c6f4768df096189c2f9a576d5", + "timestamp": 1794034392, + "timeUTC": "2026-11-07T06:53:12.000Z", + "timeBeijing": "2026-11-07 14:53:12 UTC+08:00" + }, + "decodedCall": { + "name": "contribute", + "signature": "contribute(uint256)", + "args": { + "projectId": "2" + }, + "valueWei": "50000000000000" + }, + "events": [ + { + "name": "ContributionReceived", + "signature": "ContributionReceived(uint256,address,uint256)", + "args": { + "projectId": "2", + "backer": "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8", + "amount": "50000000000000" + }, + "logIndex": 22 + }, + { + "name": "FundingSuccessful", + "signature": "FundingSuccessful(uint256,uint256)", + "args": { + "projectId": "2", + "totalRaised": "100000000000000" + }, + "logIndex": 23 + } + ], + "snapshot": { + "project": { + "creator": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "name": "Test Project 03", + "description": "End-to-end test of milestone approvals and separate release and payout.", + "target": "100000000000000", + "deadline": "1794132000", + "totalRaised": "100000000000000", + "escrowBalance": "100000000000000", + "status": "1", + "currentMilestone": "0", + "successfulAt": "1794034392" + }, + "milestones": [ + { + "goal": "Complete prototype verification", + "evidence": "", + "evidenceUrl": "", + "approvalWeight": "0", + "withdrawnAmount": "0", + "submittedAt": "0", + "submitted": false, + "approved": false, + "withdrawn": false + }, + { + "goal": "Complete final delivery verification", + "evidence": "", + "evidenceUrl": "", + "approvalWeight": "0", + "withdrawnAmount": "0", + "submittedAt": "0", + "submitted": false, + "approved": false, + "withdrawn": false + } + ], + "claimablePayoutWei": "0", + "contributionsWei": { + "B": "50000000000000", + "C": "50000000000000" + }, + "hasApproved": { + "milestone1": { + "B": false, + "C": false + }, + "milestone2": { + "B": false, + "C": false + } + } + }, + "readCalls": [ + { + "method": "getProject", + "args": [ + "2" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000406799e512b14cbdfccb7ef2acea9e6bcfb218c40000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000005af3107a4000000000000000000000000000000000000000000000000000000000006af0482000000000000000000000000000000000000000000000000000005af3107a400000000000000000000000000000000000000000000000000000005af3107a400000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006aeecad8000000000000000000000000000000000000000000000000000000000000000f546573742050726f6a65637420303300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047456e642d746f2d656e642074657374206f66206d696c6573746f6e6520617070726f76616c7320616e642073657061726174652072656c6561736520616e64207061796f75742e00000000000000000000000000000000000000000000000000", + "value": { + "creator": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "name": "Test Project 03", + "description": "End-to-end test of milestone approvals and separate release and payout.", + "target": "100000000000000", + "deadline": "1794132000", + "totalRaised": "100000000000000", + "escrowBalance": "100000000000000", + "status": "1", + "currentMilestone": "0", + "successfulAt": "1794034392" + } + }, + { + "method": "getMilestone", + "args": [ + "2", + 0 + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f436f6d706c6574652070726f746f7479706520766572696669636174696f6e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "value": { + "goal": "Complete prototype verification", + "evidence": "", + "evidenceUrl": "", + "approvalWeight": "0", + "withdrawnAmount": "0", + "submittedAt": "0", + "submitted": false, + "approved": false, + "withdrawn": false + } + }, + { + "method": "getMilestone", + "args": [ + "2", + 1 + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024436f6d706c6574652066696e616c2064656c697665727920766572696669636174696f6e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "value": { + "goal": "Complete final delivery verification", + "evidence": "", + "evidenceUrl": "", + "approvalWeight": "0", + "withdrawnAmount": "0", + "submittedAt": "0", + "submitted": false, + "approved": false, + "withdrawn": false + } + }, + { + "method": "claimablePayouts", + "args": [ + "2" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": "0" + }, + { + "method": "contributions", + "args": [ + "2", + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "value": "50000000000000" + }, + { + "method": "contributions", + "args": [ + "2", + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "value": "50000000000000" + }, + { + "method": "hasApproved", + "args": [ + "2", + 0, + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": false + }, + { + "method": "hasApproved", + "args": [ + "2", + 0, + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": false + }, + { + "method": "hasApproved", + "args": [ + "2", + 1, + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": false + }, + { + "method": "hasApproved", + "args": [ + "2", + 1, + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": false + } + ], + "rawTransaction": { + "type": "0x2", + "chainId": "0xaa36a7", + "nonce": "0x3", + "gas": "0x7bbc5", + "maxFeePerGas": "0x59682f19", + "maxPriorityFeePerGas": "0x59682f00", + "to": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "value": "0x2d79883d2000", + "accessList": [], + "input": "0xc1cbbca70000000000000000000000000000000000000000000000000000000000000002", + "r": "0xc0c96d574efd8c446988b8203a05c4ad4a96641219d1fc2fe8e83e379be94cfb", + "s": "0x378631df4dcf408c1d28c3c1e6a0e28bcb508e683625d52d5ee278cdb7aabf78", + "yParity": "0x0", + "v": "0x0", + "hash": "0x923e80b878d47111a62a2c0fc3d31cbc9618088563b9fef40b359e74aa2c40a2", + "blockHash": "0xf14d8cbc6a834bf7811c74e6ba9dabdcc80b620c6f4768df096189c2f9a576d5", + "blockNumber": "0xb85b5c", + "transactionIndex": "0x6", + "from": "0x3851e2c69ae098447adc8038dc71817abaf39bc8", + "gasPrice": "0x59682f12", + "blockTimestamp": "0x6aeecad8" + }, + "rawReceipt": { + "type": "0x2", + "status": "0x1", + "cumulativeGasUsed": "0xfb2e2", + "logs": [ + { + "address": "0xfffffffffffffffffffffffffffffffffffffffe", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000003851e2c69ae098447adc8038dc71817abaf39bc8", + "0x0000000000000000000000005a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f" + ], + "data": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "blockHash": "0xf14d8cbc6a834bf7811c74e6ba9dabdcc80b620c6f4768df096189c2f9a576d5", + "blockNumber": "0xb85b5c", + "blockTimestamp": "0x6aeecad8", + "transactionHash": "0x923e80b878d47111a62a2c0fc3d31cbc9618088563b9fef40b359e74aa2c40a2", + "transactionIndex": "0x6", + "logIndex": "0x15", + "removed": false + }, + { + "address": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "topics": [ + "0x865c884d49c8cecaef108efb20f7d282f26c0f9b0d24dd48e5592d4e02ec658d", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x0000000000000000000000003851e2c69ae098447adc8038dc71817abaf39bc8" + ], + "data": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "blockHash": "0xf14d8cbc6a834bf7811c74e6ba9dabdcc80b620c6f4768df096189c2f9a576d5", + "blockNumber": "0xb85b5c", + "blockTimestamp": "0x6aeecad8", + "transactionHash": "0x923e80b878d47111a62a2c0fc3d31cbc9618088563b9fef40b359e74aa2c40a2", + "transactionIndex": "0x6", + "logIndex": "0x16", + "removed": false + }, + { + "address": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "topics": [ + "0x88bfb1cb787b5a4eccce541cbd9b445a7b77c97dad63984f8db4478be569e1b6", + "0x0000000000000000000000000000000000000000000000000000000000000002" + ], + "data": "0x00000000000000000000000000000000000000000000000000005af3107a4000", + "blockHash": "0xf14d8cbc6a834bf7811c74e6ba9dabdcc80b620c6f4768df096189c2f9a576d5", + "blockNumber": "0xb85b5c", + "blockTimestamp": "0x6aeecad8", + "transactionHash": "0x923e80b878d47111a62a2c0fc3d31cbc9618088563b9fef40b359e74aa2c40a2", + "transactionIndex": "0x6", + "logIndex": "0x17", + "removed": false + } + ], + "logsBloom": "0x44100000000000000000000000000000000000080000000000000000000000000002010000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000002000000000000000000000000000000000000002000000000000000000000000020000000000010000000000000004000000000000000000000000000000000000000000000000000000000000000020000000000000100000000000000000000004000000000000000000008000002002000000008000000000000000000000000000000000000008000400000000000000100000000000000000000000000008000000000000100000000", + "transactionHash": "0x923e80b878d47111a62a2c0fc3d31cbc9618088563b9fef40b359e74aa2c40a2", + "transactionIndex": "0x6", + "blockHash": "0xf14d8cbc6a834bf7811c74e6ba9dabdcc80b620c6f4768df096189c2f9a576d5", + "blockNumber": "0xb85b5c", + "gasUsed": "0x5fac3", + "effectiveGasPrice": "0x59682f12", + "from": "0x3851e2c69ae098447adc8038dc71817abaf39bc8", + "to": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "contractAddress": null + } + }, + { + "step": 4, + "actor": "A", + "transactionHash": "0x204fb8a2f4f89ae7bfba84670f3e7f34d9893d44e5da143c209abd694442df0b", + "block": { + "number": 12082018, + "hash": "0x016bb86edf82887b8d5cf9d405eb22deeeda85f6bc3d06477429778215325041", + "timestamp": 1794034464, + "timeUTC": "2026-11-07T06:54:24.000Z", + "timeBeijing": "2026-11-07 14:54:24 UTC+08:00" + }, + "decodedCall": { + "name": "submitEvidence", + "signature": "submitEvidence(uint256,uint8,string,string)", + "args": { + "projectId": "2", + "milestone": "0", + "evidence": "First milestone verification completed: project creation and funding by two backers on Sepolia. Project #002 reached its 0.0001 ETH target.", + "evidenceUrl": "https://github.com/misaka10111/dapp" + }, + "valueWei": "0" + }, + "events": [ + { + "name": "EvidenceSubmitted", + "signature": "EvidenceSubmitted(uint256,uint8,string,string)", + "args": { + "projectId": "2", + "milestone": "0", + "evidence": "First milestone verification completed: project creation and funding by two backers on Sepolia. Project #002 reached its 0.0001 ETH target.", + "evidenceUrl": "https://github.com/misaka10111/dapp" + }, + "logIndex": 23 + } + ], + "snapshot": { + "project": { + "creator": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "name": "Test Project 03", + "description": "End-to-end test of milestone approvals and separate release and payout.", + "target": "100000000000000", + "deadline": "1794132000", + "totalRaised": "100000000000000", + "escrowBalance": "100000000000000", + "status": "1", + "currentMilestone": "0", + "successfulAt": "1794034392" + }, + "milestones": [ + { + "goal": "Complete prototype verification", + "evidence": "First milestone verification completed: project creation and funding by two backers on Sepolia. Project #002 reached its 0.0001 ETH target.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "0", + "withdrawnAmount": "0", + "submittedAt": "1794034464", + "submitted": true, + "approved": false, + "withdrawn": false + }, + { + "goal": "Complete final delivery verification", + "evidence": "", + "evidenceUrl": "", + "approvalWeight": "0", + "withdrawnAmount": "0", + "submittedAt": "0", + "submitted": false, + "approved": false, + "withdrawn": false + } + ], + "claimablePayoutWei": "0", + "contributionsWei": { + "B": "50000000000000", + "C": "50000000000000" + }, + "hasApproved": { + "milestone1": { + "B": false, + "C": false + }, + "milestone2": { + "B": false, + "C": false + } + } + }, + "readCalls": [ + { + "method": "getProject", + "args": [ + "2" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000406799e512b14cbdfccb7ef2acea9e6bcfb218c40000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000005af3107a4000000000000000000000000000000000000000000000000000000000006af0482000000000000000000000000000000000000000000000000000005af3107a400000000000000000000000000000000000000000000000000000005af3107a400000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006aeecad8000000000000000000000000000000000000000000000000000000000000000f546573742050726f6a65637420303300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047456e642d746f2d656e642074657374206f66206d696c6573746f6e6520617070726f76616c7320616e642073657061726174652072656c6561736520616e64207061796f75742e00000000000000000000000000000000000000000000000000", + "value": { + "creator": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "name": "Test Project 03", + "description": "End-to-end test of milestone approvals and separate release and payout.", + "target": "100000000000000", + "deadline": "1794132000", + "totalRaised": "100000000000000", + "escrowBalance": "100000000000000", + "status": "1", + "currentMilestone": "0", + "successfulAt": "1794034392" + } + }, + { + "method": "getMilestone", + "args": [ + "2", + 0 + ], + "rawResult": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006aeecb20000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f436f6d706c6574652070726f746f7479706520766572696669636174696f6e00000000000000000000000000000000000000000000000000000000000000008b4669727374206d696c6573746f6e6520766572696669636174696f6e20636f6d706c657465643a2070726f6a656374206372656174696f6e20616e642066756e64696e672062792074776f206261636b657273206f6e205365706f6c69612e2050726f6a656374202330303220726561636865642069747320302e3030303120455448207461726765742e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002368747470733a2f2f6769746875622e636f6d2f6d6973616b6131303131312f646170700000000000000000000000000000000000000000000000000000000000", + "value": { + "goal": "Complete prototype verification", + "evidence": "First milestone verification completed: project creation and funding by two backers on Sepolia. Project #002 reached its 0.0001 ETH target.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "0", + "withdrawnAmount": "0", + "submittedAt": "1794034464", + "submitted": true, + "approved": false, + "withdrawn": false + } + }, + { + "method": "getMilestone", + "args": [ + "2", + 1 + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024436f6d706c6574652066696e616c2064656c697665727920766572696669636174696f6e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "value": { + "goal": "Complete final delivery verification", + "evidence": "", + "evidenceUrl": "", + "approvalWeight": "0", + "withdrawnAmount": "0", + "submittedAt": "0", + "submitted": false, + "approved": false, + "withdrawn": false + } + }, + { + "method": "claimablePayouts", + "args": [ + "2" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": "0" + }, + { + "method": "contributions", + "args": [ + "2", + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "value": "50000000000000" + }, + { + "method": "contributions", + "args": [ + "2", + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "value": "50000000000000" + }, + { + "method": "hasApproved", + "args": [ + "2", + 0, + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": false + }, + { + "method": "hasApproved", + "args": [ + "2", + 0, + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": false + }, + { + "method": "hasApproved", + "args": [ + "2", + 1, + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": false + }, + { + "method": "hasApproved", + "args": [ + "2", + 1, + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": false + } + ], + "rawTransaction": { + "type": "0x2", + "chainId": "0xaa36a7", + "nonce": "0xb", + "gas": "0x132f29", + "maxFeePerGas": "0x59682f19", + "maxPriorityFeePerGas": "0x59682f00", + "to": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "value": "0x0", + "accessList": [], + "input": "0x8182254b0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000008b4669727374206d696c6573746f6e6520766572696669636174696f6e20636f6d706c657465643a2070726f6a656374206372656174696f6e20616e642066756e64696e672062792074776f206261636b657273206f6e205365706f6c69612e2050726f6a656374202330303220726561636865642069747320302e3030303120455448207461726765742e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002368747470733a2f2f6769746875622e636f6d2f6d6973616b6131303131312f646170700000000000000000000000000000000000000000000000000000000000", + "r": "0x99f380fd089c26acd0934996e236d8d1766291aa558e319b336d7024c5002cce", + "s": "0x4cc83b93572c7ffcdc8cb4de90df0fcb1474b705ad2081f2d3e84f447e1fa8c2", + "yParity": "0x1", + "v": "0x1", + "hash": "0x204fb8a2f4f89ae7bfba84670f3e7f34d9893d44e5da143c209abd694442df0b", + "blockHash": "0x016bb86edf82887b8d5cf9d405eb22deeeda85f6bc3d06477429778215325041", + "blockNumber": "0xb85b62", + "transactionIndex": "0x8", + "from": "0x406799e512b14cbdfccb7ef2acea9e6bcfb218c4", + "gasPrice": "0x59682f12", + "blockTimestamp": "0x6aeecb20" + }, + "rawReceipt": { + "type": "0x2", + "status": "0x1", + "cumulativeGasUsed": "0x299f0d", + "logs": [ + { + "address": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "topics": [ + "0x3d01ce186fd86a00dbb015b5eba62a161d6d725ca1d4fb525edb2c9e47b604b6", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000008b4669727374206d696c6573746f6e6520766572696669636174696f6e20636f6d706c657465643a2070726f6a656374206372656174696f6e20616e642066756e64696e672062792074776f206261636b657273206f6e205365706f6c69612e2050726f6a656374202330303220726561636865642069747320302e3030303120455448207461726765742e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002368747470733a2f2f6769746875622e636f6d2f6d6973616b6131303131312f646170700000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x016bb86edf82887b8d5cf9d405eb22deeeda85f6bc3d06477429778215325041", + "blockNumber": "0xb85b62", + "blockTimestamp": "0x6aeecb20", + "transactionHash": "0x204fb8a2f4f89ae7bfba84670f3e7f34d9893d44e5da143c209abd694442df0b", + "transactionIndex": "0x8", + "logIndex": "0x17", + "removed": false + } + ], + "logsBloom": "0x04000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000020000000000000100000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000020000001000000000000000000000000000000000000008000000000000100000000", + "transactionHash": "0x204fb8a2f4f89ae7bfba84670f3e7f34d9893d44e5da143c209abd694442df0b", + "transactionIndex": "0x8", + "blockHash": "0x016bb86edf82887b8d5cf9d405eb22deeeda85f6bc3d06477429778215325041", + "blockNumber": "0xb85b62", + "gasUsed": "0x1303f7", + "effectiveGasPrice": "0x59682f12", + "from": "0x406799e512b14cbdfccb7ef2acea9e6bcfb218c4", + "to": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "contractAddress": null + } + }, + { + "step": 5, + "actor": "B", + "transactionHash": "0xbc76dde48a3cd6ef08cec196a38d34fb80e19497ee236e2e457fe28ffbd3b135", + "block": { + "number": 12082025, + "hash": "0x19caa7ba26cd12dc0cb42b514c5237e2aa4011a42471bb2dd2395dd952b2e657", + "timestamp": 1794034548, + "timeUTC": "2026-11-07T06:55:48.000Z", + "timeBeijing": "2026-11-07 14:55:48 UTC+08:00" + }, + "decodedCall": { + "name": "approveMilestone", + "signature": "approveMilestone(uint256,uint8)", + "args": { + "projectId": "2", + "milestone": "0" + }, + "valueWei": "0" + }, + "events": [ + { + "name": "ApprovalCast", + "signature": "ApprovalCast(uint256,uint8,address,uint256)", + "args": { + "projectId": "2", + "milestone": "0", + "backer": "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E", + "weight": "50000000000000" + }, + "logIndex": 21 + } + ], + "snapshot": { + "project": { + "creator": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "name": "Test Project 03", + "description": "End-to-end test of milestone approvals and separate release and payout.", + "target": "100000000000000", + "deadline": "1794132000", + "totalRaised": "100000000000000", + "escrowBalance": "100000000000000", + "status": "1", + "currentMilestone": "0", + "successfulAt": "1794034392" + }, + "milestones": [ + { + "goal": "Complete prototype verification", + "evidence": "First milestone verification completed: project creation and funding by two backers on Sepolia. Project #002 reached its 0.0001 ETH target.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "50000000000000", + "withdrawnAmount": "0", + "submittedAt": "1794034464", + "submitted": true, + "approved": false, + "withdrawn": false + }, + { + "goal": "Complete final delivery verification", + "evidence": "", + "evidenceUrl": "", + "approvalWeight": "0", + "withdrawnAmount": "0", + "submittedAt": "0", + "submitted": false, + "approved": false, + "withdrawn": false + } + ], + "claimablePayoutWei": "0", + "contributionsWei": { + "B": "50000000000000", + "C": "50000000000000" + }, + "hasApproved": { + "milestone1": { + "B": true, + "C": false + }, + "milestone2": { + "B": false, + "C": false + } + } + }, + "readCalls": [ + { + "method": "getProject", + "args": [ + "2" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000406799e512b14cbdfccb7ef2acea9e6bcfb218c40000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000005af3107a4000000000000000000000000000000000000000000000000000000000006af0482000000000000000000000000000000000000000000000000000005af3107a400000000000000000000000000000000000000000000000000000005af3107a400000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006aeecad8000000000000000000000000000000000000000000000000000000000000000f546573742050726f6a65637420303300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047456e642d746f2d656e642074657374206f66206d696c6573746f6e6520617070726f76616c7320616e642073657061726174652072656c6561736520616e64207061796f75742e00000000000000000000000000000000000000000000000000", + "value": { + "creator": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "name": "Test Project 03", + "description": "End-to-end test of milestone approvals and separate release and payout.", + "target": "100000000000000", + "deadline": "1794132000", + "totalRaised": "100000000000000", + "escrowBalance": "100000000000000", + "status": "1", + "currentMilestone": "0", + "successfulAt": "1794034392" + } + }, + { + "method": "getMilestone", + "args": [ + "2", + 0 + ], + "rawResult": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000002d79883d20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006aeecb20000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f436f6d706c6574652070726f746f7479706520766572696669636174696f6e00000000000000000000000000000000000000000000000000000000000000008b4669727374206d696c6573746f6e6520766572696669636174696f6e20636f6d706c657465643a2070726f6a656374206372656174696f6e20616e642066756e64696e672062792074776f206261636b657273206f6e205365706f6c69612e2050726f6a656374202330303220726561636865642069747320302e3030303120455448207461726765742e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002368747470733a2f2f6769746875622e636f6d2f6d6973616b6131303131312f646170700000000000000000000000000000000000000000000000000000000000", + "value": { + "goal": "Complete prototype verification", + "evidence": "First milestone verification completed: project creation and funding by two backers on Sepolia. Project #002 reached its 0.0001 ETH target.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "50000000000000", + "withdrawnAmount": "0", + "submittedAt": "1794034464", + "submitted": true, + "approved": false, + "withdrawn": false + } + }, + { + "method": "getMilestone", + "args": [ + "2", + 1 + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024436f6d706c6574652066696e616c2064656c697665727920766572696669636174696f6e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "value": { + "goal": "Complete final delivery verification", + "evidence": "", + "evidenceUrl": "", + "approvalWeight": "0", + "withdrawnAmount": "0", + "submittedAt": "0", + "submitted": false, + "approved": false, + "withdrawn": false + } + }, + { + "method": "claimablePayouts", + "args": [ + "2" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": "0" + }, + { + "method": "contributions", + "args": [ + "2", + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "value": "50000000000000" + }, + { + "method": "contributions", + "args": [ + "2", + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "value": "50000000000000" + }, + { + "method": "hasApproved", + "args": [ + "2", + 0, + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000001", + "value": true + }, + { + "method": "hasApproved", + "args": [ + "2", + 0, + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": false + }, + { + "method": "hasApproved", + "args": [ + "2", + 1, + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": false + }, + { + "method": "hasApproved", + "args": [ + "2", + 1, + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": false + } + ], + "rawTransaction": { + "type": "0x2", + "chainId": "0xaa36a7", + "nonce": "0x9", + "gas": "0x3e801", + "maxFeePerGas": "0x59682f19", + "maxPriorityFeePerGas": "0x59682f00", + "to": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "value": "0x0", + "accessList": [], + "input": "0xb7c5923300000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000", + "r": "0xcaf2614808b8e2037e1d6c3afc52c94ead082715f2bda493b9a6454516fe062", + "s": "0x4d17fb6643631e769cbc733a9a385b9cb2fde4e87c0b9b2171009ed234dd61bf", + "yParity": "0x0", + "v": "0x0", + "hash": "0xbc76dde48a3cd6ef08cec196a38d34fb80e19497ee236e2e457fe28ffbd3b135", + "blockHash": "0x19caa7ba26cd12dc0cb42b514c5237e2aa4011a42471bb2dd2395dd952b2e657", + "blockNumber": "0xb85b69", + "transactionIndex": "0x6", + "from": "0x26791c26fba3612eb49fa763fa47cfecd66b6a1e", + "gasPrice": "0x59682f12", + "blockTimestamp": "0x6aeecb74" + }, + "rawReceipt": { + "type": "0x2", + "status": "0x1", + "cumulativeGasUsed": "0xe80fc", + "logs": [ + { + "address": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "topics": [ + "0x094d71d4c000f8dd4cca693b241ce997610658e9df2713658824c0856472570d", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000026791c26fba3612eb49fa763fa47cfecd66b6a1e" + ], + "data": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "blockHash": "0x19caa7ba26cd12dc0cb42b514c5237e2aa4011a42471bb2dd2395dd952b2e657", + "blockNumber": "0xb85b69", + "blockTimestamp": "0x6aeecb74", + "transactionHash": "0xbc76dde48a3cd6ef08cec196a38d34fb80e19497ee236e2e457fe28ffbd3b135", + "transactionIndex": "0x6", + "logIndex": "0x15", + "removed": false + } + ], + "logsBloom": "0x04000000000000000000000000000000000000000000000000000000000800000000010000000000000002000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020010000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000020000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000008000000000000100000002", + "transactionHash": "0xbc76dde48a3cd6ef08cec196a38d34fb80e19497ee236e2e457fe28ffbd3b135", + "transactionIndex": "0x6", + "blockHash": "0x19caa7ba26cd12dc0cb42b514c5237e2aa4011a42471bb2dd2395dd952b2e657", + "blockNumber": "0xb85b69", + "gasUsed": "0x3db9b", + "effectiveGasPrice": "0x59682f12", + "from": "0x26791c26fba3612eb49fa763fa47cfecd66b6a1e", + "to": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "contractAddress": null + } + }, + { + "step": 6, + "actor": "C", + "transactionHash": "0x23e8c1060d4c9801ba676bcff2ae11d630c19d600085597e861b6739693e0c5a", + "block": { + "number": 12082028, + "hash": "0x1821e6b574e0f3a5f01f09a07cbeaf8412bd17627012d4e7e2f52ab41563d5a5", + "timestamp": 1794034584, + "timeUTC": "2026-11-07T06:56:24.000Z", + "timeBeijing": "2026-11-07 14:56:24 UTC+08:00" + }, + "decodedCall": { + "name": "approveMilestone", + "signature": "approveMilestone(uint256,uint8)", + "args": { + "projectId": "2", + "milestone": "0" + }, + "valueWei": "0" + }, + "events": [ + { + "name": "ApprovalCast", + "signature": "ApprovalCast(uint256,uint8,address,uint256)", + "args": { + "projectId": "2", + "milestone": "0", + "backer": "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8", + "weight": "50000000000000" + }, + "logIndex": 252 + }, + { + "name": "MilestoneApproved", + "signature": "MilestoneApproved(uint256,uint8)", + "args": { + "projectId": "2", + "milestone": "0" + }, + "logIndex": 253 + } + ], + "snapshot": { + "project": { + "creator": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "name": "Test Project 03", + "description": "End-to-end test of milestone approvals and separate release and payout.", + "target": "100000000000000", + "deadline": "1794132000", + "totalRaised": "100000000000000", + "escrowBalance": "100000000000000", + "status": "1", + "currentMilestone": "0", + "successfulAt": "1794034392" + }, + "milestones": [ + { + "goal": "Complete prototype verification", + "evidence": "First milestone verification completed: project creation and funding by two backers on Sepolia. Project #002 reached its 0.0001 ETH target.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "100000000000000", + "withdrawnAmount": "0", + "submittedAt": "1794034464", + "submitted": true, + "approved": true, + "withdrawn": false + }, + { + "goal": "Complete final delivery verification", + "evidence": "", + "evidenceUrl": "", + "approvalWeight": "0", + "withdrawnAmount": "0", + "submittedAt": "0", + "submitted": false, + "approved": false, + "withdrawn": false + } + ], + "claimablePayoutWei": "0", + "contributionsWei": { + "B": "50000000000000", + "C": "50000000000000" + }, + "hasApproved": { + "milestone1": { + "B": true, + "C": true + }, + "milestone2": { + "B": false, + "C": false + } + } + }, + "readCalls": [ + { + "method": "getProject", + "args": [ + "2" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000406799e512b14cbdfccb7ef2acea9e6bcfb218c40000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000005af3107a4000000000000000000000000000000000000000000000000000000000006af0482000000000000000000000000000000000000000000000000000005af3107a400000000000000000000000000000000000000000000000000000005af3107a400000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006aeecad8000000000000000000000000000000000000000000000000000000000000000f546573742050726f6a65637420303300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047456e642d746f2d656e642074657374206f66206d696c6573746f6e6520617070726f76616c7320616e642073657061726174652072656c6561736520616e64207061796f75742e00000000000000000000000000000000000000000000000000", + "value": { + "creator": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "name": "Test Project 03", + "description": "End-to-end test of milestone approvals and separate release and payout.", + "target": "100000000000000", + "deadline": "1794132000", + "totalRaised": "100000000000000", + "escrowBalance": "100000000000000", + "status": "1", + "currentMilestone": "0", + "successfulAt": "1794034392" + } + }, + { + "method": "getMilestone", + "args": [ + "2", + 0 + ], + "rawResult": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000005af3107a40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006aeecb20000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f436f6d706c6574652070726f746f7479706520766572696669636174696f6e00000000000000000000000000000000000000000000000000000000000000008b4669727374206d696c6573746f6e6520766572696669636174696f6e20636f6d706c657465643a2070726f6a656374206372656174696f6e20616e642066756e64696e672062792074776f206261636b657273206f6e205365706f6c69612e2050726f6a656374202330303220726561636865642069747320302e3030303120455448207461726765742e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002368747470733a2f2f6769746875622e636f6d2f6d6973616b6131303131312f646170700000000000000000000000000000000000000000000000000000000000", + "value": { + "goal": "Complete prototype verification", + "evidence": "First milestone verification completed: project creation and funding by two backers on Sepolia. Project #002 reached its 0.0001 ETH target.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "100000000000000", + "withdrawnAmount": "0", + "submittedAt": "1794034464", + "submitted": true, + "approved": true, + "withdrawn": false + } + }, + { + "method": "getMilestone", + "args": [ + "2", + 1 + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024436f6d706c6574652066696e616c2064656c697665727920766572696669636174696f6e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "value": { + "goal": "Complete final delivery verification", + "evidence": "", + "evidenceUrl": "", + "approvalWeight": "0", + "withdrawnAmount": "0", + "submittedAt": "0", + "submitted": false, + "approved": false, + "withdrawn": false + } + }, + { + "method": "claimablePayouts", + "args": [ + "2" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": "0" + }, + { + "method": "contributions", + "args": [ + "2", + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "value": "50000000000000" + }, + { + "method": "contributions", + "args": [ + "2", + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "value": "50000000000000" + }, + { + "method": "hasApproved", + "args": [ + "2", + 0, + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000001", + "value": true + }, + { + "method": "hasApproved", + "args": [ + "2", + 0, + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000001", + "value": true + }, + { + "method": "hasApproved", + "args": [ + "2", + 1, + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": false + }, + { + "method": "hasApproved", + "args": [ + "2", + 1, + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": false + } + ], + "rawTransaction": { + "type": "0x2", + "chainId": "0xaa36a7", + "nonce": "0x4", + "gas": "0x294cb", + "maxFeePerGas": "0x59682f19", + "maxPriorityFeePerGas": "0x59682f00", + "to": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "value": "0x0", + "accessList": [], + "input": "0xb7c5923300000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000", + "r": "0x6b72c9d098d42ae34636464415f0f3bbd020d3b74086e11c456c9f0cd6d9a0e9", + "s": "0x1c93890c8a0d0a0143c562f4ab5adb2bdf9c61cc08231da1d23f60631f24d1e6", + "yParity": "0x1", + "v": "0x1", + "hash": "0x23e8c1060d4c9801ba676bcff2ae11d630c19d600085597e861b6739693e0c5a", + "blockHash": "0x1821e6b574e0f3a5f01f09a07cbeaf8412bd17627012d4e7e2f52ab41563d5a5", + "blockNumber": "0xb85b6c", + "transactionIndex": "0x5d", + "from": "0x3851e2c69ae098447adc8038dc71817abaf39bc8", + "gasPrice": "0x59682f12", + "blockTimestamp": "0x6aeecb98" + }, + "rawReceipt": { + "type": "0x2", + "status": "0x1", + "cumulativeGasUsed": "0x36f68f5", + "logs": [ + { + "address": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "topics": [ + "0x094d71d4c000f8dd4cca693b241ce997610658e9df2713658824c0856472570d", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000003851e2c69ae098447adc8038dc71817abaf39bc8" + ], + "data": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "blockHash": "0x1821e6b574e0f3a5f01f09a07cbeaf8412bd17627012d4e7e2f52ab41563d5a5", + "blockNumber": "0xb85b6c", + "blockTimestamp": "0x6aeecb98", + "transactionHash": "0x23e8c1060d4c9801ba676bcff2ae11d630c19d600085597e861b6739693e0c5a", + "transactionIndex": "0x5d", + "logIndex": "0xfc", + "removed": false + }, + { + "address": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "topics": [ + "0x5bd776d6cd4ec262a0d9b560dc43fcd23bbf8162933a60acf2b23e2aed2a7e4c", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "blockHash": "0x1821e6b574e0f3a5f01f09a07cbeaf8412bd17627012d4e7e2f52ab41563d5a5", + "blockNumber": "0xb85b6c", + "blockTimestamp": "0x6aeecb98", + "transactionHash": "0x23e8c1060d4c9801ba676bcff2ae11d630c19d600085597e861b6739693e0c5a", + "transactionIndex": "0x5d", + "logIndex": "0xfd", + "removed": false + } + ], + "logsBloom": "0x44000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000080000000000020000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000000000000000000000000000800000000000000000000000000080000000000000000000020000000000000100000000000000000000000000000000000000000000000800002000000000000000000000000000000000000000000000000020000000000000000100000000000000000000000000008000000000000100000002", + "transactionHash": "0x23e8c1060d4c9801ba676bcff2ae11d630c19d600085597e861b6739693e0c5a", + "transactionIndex": "0x5d", + "blockHash": "0x1821e6b574e0f3a5f01f09a07cbeaf8412bd17627012d4e7e2f52ab41563d5a5", + "blockNumber": "0xb85b6c", + "gasUsed": "0x28b11", + "effectiveGasPrice": "0x59682f12", + "from": "0x3851e2c69ae098447adc8038dc71817abaf39bc8", + "to": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "contractAddress": null + } + }, + { + "step": 7, + "actor": "A", + "transactionHash": "0x86b88633a205b2a362581028d21da3e7b23325ea637de915f1376624f31ebf9a", + "block": { + "number": 12082036, + "hash": "0x733a6f365d32f114c61b1d06a5f2d8836e9567b923b0ecffd7d0fb603d20c5dc", + "timestamp": 1794034680, + "timeUTC": "2026-11-07T06:58:00.000Z", + "timeBeijing": "2026-11-07 14:58:00 UTC+08:00" + }, + "decodedCall": { + "name": "releaseMilestone", + "signature": "releaseMilestone(uint256,uint8)", + "args": { + "projectId": "2", + "milestone": "0" + }, + "valueWei": "0" + }, + "events": [ + { + "name": "MilestoneReleased", + "signature": "MilestoneReleased(uint256,uint8,uint256)", + "args": { + "projectId": "2", + "milestone": "0", + "amount": "40000000000000" + }, + "logIndex": 4 + } + ], + "snapshot": { + "project": { + "creator": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "name": "Test Project 03", + "description": "End-to-end test of milestone approvals and separate release and payout.", + "target": "100000000000000", + "deadline": "1794132000", + "totalRaised": "100000000000000", + "escrowBalance": "60000000000000", + "status": "1", + "currentMilestone": "1", + "successfulAt": "1794034392" + }, + "milestones": [ + { + "goal": "Complete prototype verification", + "evidence": "First milestone verification completed: project creation and funding by two backers on Sepolia. Project #002 reached its 0.0001 ETH target.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "100000000000000", + "withdrawnAmount": "40000000000000", + "submittedAt": "1794034464", + "submitted": true, + "approved": true, + "withdrawn": true + }, + { + "goal": "Complete final delivery verification", + "evidence": "", + "evidenceUrl": "", + "approvalWeight": "0", + "withdrawnAmount": "0", + "submittedAt": "0", + "submitted": false, + "approved": false, + "withdrawn": false + } + ], + "claimablePayoutWei": "40000000000000", + "contributionsWei": { + "B": "50000000000000", + "C": "50000000000000" + }, + "hasApproved": { + "milestone1": { + "B": true, + "C": true + }, + "milestone2": { + "B": false, + "C": false + } + } + }, + "readCalls": [ + { + "method": "getProject", + "args": [ + "2" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000406799e512b14cbdfccb7ef2acea9e6bcfb218c40000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000005af3107a4000000000000000000000000000000000000000000000000000000000006af0482000000000000000000000000000000000000000000000000000005af3107a400000000000000000000000000000000000000000000000000000003691d6afc00000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000006aeecad8000000000000000000000000000000000000000000000000000000000000000f546573742050726f6a65637420303300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047456e642d746f2d656e642074657374206f66206d696c6573746f6e6520617070726f76616c7320616e642073657061726174652072656c6561736520616e64207061796f75742e00000000000000000000000000000000000000000000000000", + "value": { + "creator": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "name": "Test Project 03", + "description": "End-to-end test of milestone approvals and separate release and payout.", + "target": "100000000000000", + "deadline": "1794132000", + "totalRaised": "100000000000000", + "escrowBalance": "60000000000000", + "status": "1", + "currentMilestone": "1", + "successfulAt": "1794034392" + } + }, + { + "method": "getMilestone", + "args": [ + "2", + 0 + ], + "rawResult": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000005af3107a40000000000000000000000000000000000000000000000000000000246139ca8000000000000000000000000000000000000000000000000000000000006aeecb20000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000001f436f6d706c6574652070726f746f7479706520766572696669636174696f6e00000000000000000000000000000000000000000000000000000000000000008b4669727374206d696c6573746f6e6520766572696669636174696f6e20636f6d706c657465643a2070726f6a656374206372656174696f6e20616e642066756e64696e672062792074776f206261636b657273206f6e205365706f6c69612e2050726f6a656374202330303220726561636865642069747320302e3030303120455448207461726765742e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002368747470733a2f2f6769746875622e636f6d2f6d6973616b6131303131312f646170700000000000000000000000000000000000000000000000000000000000", + "value": { + "goal": "Complete prototype verification", + "evidence": "First milestone verification completed: project creation and funding by two backers on Sepolia. Project #002 reached its 0.0001 ETH target.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "100000000000000", + "withdrawnAmount": "40000000000000", + "submittedAt": "1794034464", + "submitted": true, + "approved": true, + "withdrawn": true + } + }, + { + "method": "getMilestone", + "args": [ + "2", + 1 + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024436f6d706c6574652066696e616c2064656c697665727920766572696669636174696f6e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "value": { + "goal": "Complete final delivery verification", + "evidence": "", + "evidenceUrl": "", + "approvalWeight": "0", + "withdrawnAmount": "0", + "submittedAt": "0", + "submitted": false, + "approved": false, + "withdrawn": false + } + }, + { + "method": "claimablePayouts", + "args": [ + "2" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000246139ca8000", + "value": "40000000000000" + }, + { + "method": "contributions", + "args": [ + "2", + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "value": "50000000000000" + }, + { + "method": "contributions", + "args": [ + "2", + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "value": "50000000000000" + }, + { + "method": "hasApproved", + "args": [ + "2", + 0, + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000001", + "value": true + }, + { + "method": "hasApproved", + "args": [ + "2", + 0, + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000001", + "value": true + }, + { + "method": "hasApproved", + "args": [ + "2", + 1, + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": false + }, + { + "method": "hasApproved", + "args": [ + "2", + 1, + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": false + } + ], + "rawTransaction": { + "type": "0x2", + "chainId": "0xaa36a7", + "nonce": "0xc", + "gas": "0x7c395", + "maxFeePerGas": "0x59682f19", + "maxPriorityFeePerGas": "0x59682f00", + "to": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "value": "0x0", + "accessList": [], + "input": "0x0d23e08000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000", + "r": "0x420c98a743b6333b53667aacbf3a2f9f749d41872fcea36e8455f8d88fa3fe8e", + "s": "0x1ce9ec2713a85f55e47808ef43aac9b9b45a82379ec51738b24d10451274e6a5", + "yParity": "0x0", + "v": "0x0", + "hash": "0x86b88633a205b2a362581028d21da3e7b23325ea637de915f1376624f31ebf9a", + "blockHash": "0x733a6f365d32f114c61b1d06a5f2d8836e9567b923b0ecffd7d0fb603d20c5dc", + "blockNumber": "0xb85b74", + "transactionIndex": "0x7", + "from": "0x406799e512b14cbdfccb7ef2acea9e6bcfb218c4", + "gasPrice": "0x59682f11", + "blockTimestamp": "0x6aeecbf8" + }, + "rawReceipt": { + "type": "0x2", + "status": "0x1", + "cumulativeGasUsed": "0xc668c", + "logs": [ + { + "address": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "topics": [ + "0xb5e7231814419e5a5e888606251cb3b5325a5339501a127b8f728e49a0d86660", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x0000000000000000000000000000000000000000000000000000246139ca8000", + "blockHash": "0x733a6f365d32f114c61b1d06a5f2d8836e9567b923b0ecffd7d0fb603d20c5dc", + "blockNumber": "0xb85b74", + "blockTimestamp": "0x6aeecbf8", + "transactionHash": "0x86b88633a205b2a362581028d21da3e7b23325ea637de915f1376624f31ebf9a", + "transactionIndex": "0x7", + "logIndex": "0x4", + "removed": false + } + ], + "logsBloom": "0x04000000000000000000000000020000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000800000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000100000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000008000000000000100000000", + "transactionHash": "0x86b88633a205b2a362581028d21da3e7b23325ea637de915f1376624f31ebf9a", + "transactionIndex": "0x7", + "blockHash": "0x733a6f365d32f114c61b1d06a5f2d8836e9567b923b0ecffd7d0fb603d20c5dc", + "blockNumber": "0xb85b74", + "gasUsed": "0x600fe", + "effectiveGasPrice": "0x59682f11", + "from": "0x406799e512b14cbdfccb7ef2acea9e6bcfb218c4", + "to": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "contractAddress": null + } + }, + { + "step": 8, + "actor": "A", + "transactionHash": "0x370fabc64d77a8aced0470cfa195a4d7fe7c5e2f819781fd609249bfebbcbfec", + "block": { + "number": 12082040, + "hash": "0x4ebd7f0760f88090df32829251539e926378d1d8e5c74aa8e5bc1042cac8d320", + "timestamp": 1794034728, + "timeUTC": "2026-11-07T06:58:48.000Z", + "timeBeijing": "2026-11-07 14:58:48 UTC+08:00" + }, + "decodedCall": { + "name": "claimPayout", + "signature": "claimPayout(uint256,address)", + "args": { + "projectId": "2", + "recipient": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4" + }, + "valueWei": "0" + }, + "events": [ + { + "name": "PayoutClaimed", + "signature": "PayoutClaimed(uint256,address,uint256)", + "args": { + "projectId": "2", + "recipient": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "amount": "40000000000000" + }, + "logIndex": 3 + } + ], + "snapshot": { + "project": { + "creator": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "name": "Test Project 03", + "description": "End-to-end test of milestone approvals and separate release and payout.", + "target": "100000000000000", + "deadline": "1794132000", + "totalRaised": "100000000000000", + "escrowBalance": "60000000000000", + "status": "1", + "currentMilestone": "1", + "successfulAt": "1794034392" + }, + "milestones": [ + { + "goal": "Complete prototype verification", + "evidence": "First milestone verification completed: project creation and funding by two backers on Sepolia. Project #002 reached its 0.0001 ETH target.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "100000000000000", + "withdrawnAmount": "40000000000000", + "submittedAt": "1794034464", + "submitted": true, + "approved": true, + "withdrawn": true + }, + { + "goal": "Complete final delivery verification", + "evidence": "", + "evidenceUrl": "", + "approvalWeight": "0", + "withdrawnAmount": "0", + "submittedAt": "0", + "submitted": false, + "approved": false, + "withdrawn": false + } + ], + "claimablePayoutWei": "0", + "contributionsWei": { + "B": "50000000000000", + "C": "50000000000000" + }, + "hasApproved": { + "milestone1": { + "B": true, + "C": true + }, + "milestone2": { + "B": false, + "C": false + } + } + }, + "readCalls": [ + { + "method": "getProject", + "args": [ + "2" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000406799e512b14cbdfccb7ef2acea9e6bcfb218c40000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000005af3107a4000000000000000000000000000000000000000000000000000000000006af0482000000000000000000000000000000000000000000000000000005af3107a400000000000000000000000000000000000000000000000000000003691d6afc00000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000006aeecad8000000000000000000000000000000000000000000000000000000000000000f546573742050726f6a65637420303300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047456e642d746f2d656e642074657374206f66206d696c6573746f6e6520617070726f76616c7320616e642073657061726174652072656c6561736520616e64207061796f75742e00000000000000000000000000000000000000000000000000", + "value": { + "creator": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "name": "Test Project 03", + "description": "End-to-end test of milestone approvals and separate release and payout.", + "target": "100000000000000", + "deadline": "1794132000", + "totalRaised": "100000000000000", + "escrowBalance": "60000000000000", + "status": "1", + "currentMilestone": "1", + "successfulAt": "1794034392" + } + }, + { + "method": "getMilestone", + "args": [ + "2", + 0 + ], + "rawResult": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000005af3107a40000000000000000000000000000000000000000000000000000000246139ca8000000000000000000000000000000000000000000000000000000000006aeecb20000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000001f436f6d706c6574652070726f746f7479706520766572696669636174696f6e00000000000000000000000000000000000000000000000000000000000000008b4669727374206d696c6573746f6e6520766572696669636174696f6e20636f6d706c657465643a2070726f6a656374206372656174696f6e20616e642066756e64696e672062792074776f206261636b657273206f6e205365706f6c69612e2050726f6a656374202330303220726561636865642069747320302e3030303120455448207461726765742e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002368747470733a2f2f6769746875622e636f6d2f6d6973616b6131303131312f646170700000000000000000000000000000000000000000000000000000000000", + "value": { + "goal": "Complete prototype verification", + "evidence": "First milestone verification completed: project creation and funding by two backers on Sepolia. Project #002 reached its 0.0001 ETH target.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "100000000000000", + "withdrawnAmount": "40000000000000", + "submittedAt": "1794034464", + "submitted": true, + "approved": true, + "withdrawn": true + } + }, + { + "method": "getMilestone", + "args": [ + "2", + 1 + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024436f6d706c6574652066696e616c2064656c697665727920766572696669636174696f6e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "value": { + "goal": "Complete final delivery verification", + "evidence": "", + "evidenceUrl": "", + "approvalWeight": "0", + "withdrawnAmount": "0", + "submittedAt": "0", + "submitted": false, + "approved": false, + "withdrawn": false + } + }, + { + "method": "claimablePayouts", + "args": [ + "2" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": "0" + }, + { + "method": "contributions", + "args": [ + "2", + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "value": "50000000000000" + }, + { + "method": "contributions", + "args": [ + "2", + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "value": "50000000000000" + }, + { + "method": "hasApproved", + "args": [ + "2", + 0, + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000001", + "value": true + }, + { + "method": "hasApproved", + "args": [ + "2", + 0, + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000001", + "value": true + }, + { + "method": "hasApproved", + "args": [ + "2", + 1, + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": false + }, + { + "method": "hasApproved", + "args": [ + "2", + 1, + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": false + } + ], + "rawTransaction": { + "type": "0x2", + "chainId": "0xaa36a7", + "nonce": "0xd", + "gas": "0x2745a", + "maxFeePerGas": "0x59682f17", + "maxPriorityFeePerGas": "0x59682f00", + "to": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "value": "0x0", + "accessList": [], + "input": "0xb0110cc60000000000000000000000000000000000000000000000000000000000000002000000000000000000000000406799e512b14cbdfccb7ef2acea9e6bcfb218c4", + "r": "0xe3409600ad21971043b49ffa1ff665022f9fd024a054f472cf14f2f53eccbef1", + "s": "0xa405c92be3fe92cda68c048069405487119aea61086e44f927f5c3dd97d77a3", + "yParity": "0x0", + "v": "0x0", + "hash": "0x370fabc64d77a8aced0470cfa195a4d7fe7c5e2f819781fd609249bfebbcbfec", + "blockHash": "0x4ebd7f0760f88090df32829251539e926378d1d8e5c74aa8e5bc1042cac8d320", + "blockNumber": "0xb85b78", + "transactionIndex": "0x3", + "from": "0x406799e512b14cbdfccb7ef2acea9e6bcfb218c4", + "gasPrice": "0x59682f10", + "blockTimestamp": "0x6aeecc28" + }, + "rawReceipt": { + "type": "0x2", + "status": "0x1", + "cumulativeGasUsed": "0x72c21d", + "logs": [ + { + "address": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "topics": [ + "0xe97cee5a4c0549d3fdc81e322b718ddf0aeb3418ec87dce4f9a7fb28d117c312", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x000000000000000000000000406799e512b14cbdfccb7ef2acea9e6bcfb218c4" + ], + "data": "0x0000000000000000000000000000000000000000000000000000246139ca8000", + "blockHash": "0x4ebd7f0760f88090df32829251539e926378d1d8e5c74aa8e5bc1042cac8d320", + "blockNumber": "0xb85b78", + "blockTimestamp": "0x6aeecc28", + "transactionHash": "0x370fabc64d77a8aced0470cfa195a4d7fe7c5e2f819781fd609249bfebbcbfec", + "transactionIndex": "0x3", + "logIndex": "0x3", + "removed": false + }, + { + "address": "0xfffffffffffffffffffffffffffffffffffffffe", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000005a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "0x000000000000000000000000406799e512b14cbdfccb7ef2acea9e6bcfb218c4" + ], + "data": "0x0000000000000000000000000000000000000000000000000000246139ca8000", + "blockHash": "0x4ebd7f0760f88090df32829251539e926378d1d8e5c74aa8e5bc1042cac8d320", + "blockNumber": "0xb85b78", + "blockTimestamp": "0x6aeecc28", + "transactionHash": "0x370fabc64d77a8aced0470cfa195a4d7fe7c5e2f819781fd609249bfebbcbfec", + "transactionIndex": "0x3", + "logIndex": "0x4", + "removed": false + } + ], + "logsBloom": "0x04000000000000000000000000000000000000080000000000000000000000000002010000000000000000000000000000000000000000000000400000000000000000000000000000000028000000000000000000000000000000000000000000000000000000002000010002000000000000000000000000000010000000000000004000000000000000000000000000000000000000000000000000000000000000020000000000000900000000000000000000000000000000000000000000000002000000000008000000000000000000000000000000000000000000400000000000000000000000000000000000000000008000000000020100000000", + "transactionHash": "0x370fabc64d77a8aced0470cfa195a4d7fe7c5e2f819781fd609249bfebbcbfec", + "transactionIndex": "0x3", + "blockHash": "0x4ebd7f0760f88090df32829251539e926378d1d8e5c74aa8e5bc1042cac8d320", + "blockNumber": "0xb85b78", + "gasUsed": "0xb9ec", + "effectiveGasPrice": "0x59682f10", + "from": "0x406799e512b14cbdfccb7ef2acea9e6bcfb218c4", + "to": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "contractAddress": null + } + }, + { + "step": 9, + "actor": "A", + "transactionHash": "0xfaae62807e8ff377805dbb52ce49e1379fd5290c9213d85921d1663f24c664d4", + "block": { + "number": 12082045, + "hash": "0xad081e1b6712bce0e3e548dc86aa62a66e2d78ac1fcb332a8942e5786680c8d3", + "timestamp": 1794034788, + "timeUTC": "2026-11-07T06:59:48.000Z", + "timeBeijing": "2026-11-07 14:59:48 UTC+08:00" + }, + "decodedCall": { + "name": "submitEvidence", + "signature": "submitEvidence(uint256,uint8,string,string)", + "args": { + "projectId": "2", + "milestone": "1", + "evidence": "Final verification: both backers approved milestone 1. Its 0.00004 ETH payout was released and claimed separately. Requesting approval for the remaining 0.00006 ETH.", + "evidenceUrl": "https://github.com/misaka10111/dapp" + }, + "valueWei": "0" + }, + "events": [ + { + "name": "EvidenceSubmitted", + "signature": "EvidenceSubmitted(uint256,uint8,string,string)", + "args": { + "projectId": "2", + "milestone": "1", + "evidence": "Final verification: both backers approved milestone 1. Its 0.00004 ETH payout was released and claimed separately. Requesting approval for the remaining 0.00006 ETH.", + "evidenceUrl": "https://github.com/misaka10111/dapp" + }, + "logIndex": 51 + } + ], + "snapshot": { + "project": { + "creator": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "name": "Test Project 03", + "description": "End-to-end test of milestone approvals and separate release and payout.", + "target": "100000000000000", + "deadline": "1794132000", + "totalRaised": "100000000000000", + "escrowBalance": "60000000000000", + "status": "1", + "currentMilestone": "1", + "successfulAt": "1794034392" + }, + "milestones": [ + { + "goal": "Complete prototype verification", + "evidence": "First milestone verification completed: project creation and funding by two backers on Sepolia. Project #002 reached its 0.0001 ETH target.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "100000000000000", + "withdrawnAmount": "40000000000000", + "submittedAt": "1794034464", + "submitted": true, + "approved": true, + "withdrawn": true + }, + { + "goal": "Complete final delivery verification", + "evidence": "Final verification: both backers approved milestone 1. Its 0.00004 ETH payout was released and claimed separately. Requesting approval for the remaining 0.00006 ETH.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "0", + "withdrawnAmount": "0", + "submittedAt": "1794034788", + "submitted": true, + "approved": false, + "withdrawn": false + } + ], + "claimablePayoutWei": "0", + "contributionsWei": { + "B": "50000000000000", + "C": "50000000000000" + }, + "hasApproved": { + "milestone1": { + "B": true, + "C": true + }, + "milestone2": { + "B": false, + "C": false + } + } + }, + "readCalls": [ + { + "method": "getProject", + "args": [ + "2" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000406799e512b14cbdfccb7ef2acea9e6bcfb218c40000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000005af3107a4000000000000000000000000000000000000000000000000000000000006af0482000000000000000000000000000000000000000000000000000005af3107a400000000000000000000000000000000000000000000000000000003691d6afc00000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000006aeecad8000000000000000000000000000000000000000000000000000000000000000f546573742050726f6a65637420303300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047456e642d746f2d656e642074657374206f66206d696c6573746f6e6520617070726f76616c7320616e642073657061726174652072656c6561736520616e64207061796f75742e00000000000000000000000000000000000000000000000000", + "value": { + "creator": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "name": "Test Project 03", + "description": "End-to-end test of milestone approvals and separate release and payout.", + "target": "100000000000000", + "deadline": "1794132000", + "totalRaised": "100000000000000", + "escrowBalance": "60000000000000", + "status": "1", + "currentMilestone": "1", + "successfulAt": "1794034392" + } + }, + { + "method": "getMilestone", + "args": [ + "2", + 0 + ], + "rawResult": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000005af3107a40000000000000000000000000000000000000000000000000000000246139ca8000000000000000000000000000000000000000000000000000000000006aeecb20000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000001f436f6d706c6574652070726f746f7479706520766572696669636174696f6e00000000000000000000000000000000000000000000000000000000000000008b4669727374206d696c6573746f6e6520766572696669636174696f6e20636f6d706c657465643a2070726f6a656374206372656174696f6e20616e642066756e64696e672062792074776f206261636b657273206f6e205365706f6c69612e2050726f6a656374202330303220726561636865642069747320302e3030303120455448207461726765742e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002368747470733a2f2f6769746875622e636f6d2f6d6973616b6131303131312f646170700000000000000000000000000000000000000000000000000000000000", + "value": { + "goal": "Complete prototype verification", + "evidence": "First milestone verification completed: project creation and funding by two backers on Sepolia. Project #002 reached its 0.0001 ETH target.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "100000000000000", + "withdrawnAmount": "40000000000000", + "submittedAt": "1794034464", + "submitted": true, + "approved": true, + "withdrawn": true + } + }, + { + "method": "getMilestone", + "args": [ + "2", + 1 + ], + "rawResult": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006aeecc640000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024436f6d706c6574652066696e616c2064656c697665727920766572696669636174696f6e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a546696e616c20766572696669636174696f6e3a20626f7468206261636b65727320617070726f766564206d696c6573746f6e6520312e2049747320302e303030303420455448207061796f7574207761732072656c656173656420616e6420636c61696d65642073657061726174656c792e2052657175657374696e6720617070726f76616c20666f72207468652072656d61696e696e6720302e3030303036204554482e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002368747470733a2f2f6769746875622e636f6d2f6d6973616b6131303131312f646170700000000000000000000000000000000000000000000000000000000000", + "value": { + "goal": "Complete final delivery verification", + "evidence": "Final verification: both backers approved milestone 1. Its 0.00004 ETH payout was released and claimed separately. Requesting approval for the remaining 0.00006 ETH.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "0", + "withdrawnAmount": "0", + "submittedAt": "1794034788", + "submitted": true, + "approved": false, + "withdrawn": false + } + }, + { + "method": "claimablePayouts", + "args": [ + "2" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": "0" + }, + { + "method": "contributions", + "args": [ + "2", + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "value": "50000000000000" + }, + { + "method": "contributions", + "args": [ + "2", + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "value": "50000000000000" + }, + { + "method": "hasApproved", + "args": [ + "2", + 0, + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000001", + "value": true + }, + { + "method": "hasApproved", + "args": [ + "2", + 0, + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000001", + "value": true + }, + { + "method": "hasApproved", + "args": [ + "2", + 1, + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": false + }, + { + "method": "hasApproved", + "args": [ + "2", + 1, + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": false + } + ], + "rawTransaction": { + "type": "0x2", + "chainId": "0xaa36a7", + "nonce": "0xe", + "gas": "0x14e3c2", + "maxFeePerGas": "0x59682f16", + "maxPriorityFeePerGas": "0x59682f00", + "to": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "value": "0x0", + "accessList": [], + "input": "0x8182254b000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000a546696e616c20766572696669636174696f6e3a20626f7468206261636b65727320617070726f766564206d696c6573746f6e6520312e2049747320302e303030303420455448207061796f7574207761732072656c656173656420616e6420636c61696d65642073657061726174656c792e2052657175657374696e6720617070726f76616c20666f72207468652072656d61696e696e6720302e3030303036204554482e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002368747470733a2f2f6769746875622e636f6d2f6d6973616b6131303131312f646170700000000000000000000000000000000000000000000000000000000000", + "r": "0x6ea600c2cdc000d4268071a86d3ba0d03c22b8649cf025a19467f75ef44c06f7", + "s": "0x701bfb5a2ede1b536ae596c26d1b9e6fbcc8748ca4db78a99246b77a1e874a47", + "yParity": "0x0", + "v": "0x0", + "hash": "0xfaae62807e8ff377805dbb52ce49e1379fd5290c9213d85921d1663f24c664d4", + "blockHash": "0xad081e1b6712bce0e3e548dc86aa62a66e2d78ac1fcb332a8942e5786680c8d3", + "blockNumber": "0xb85b7d", + "transactionIndex": "0x28", + "from": "0x406799e512b14cbdfccb7ef2acea9e6bcfb218c4", + "gasPrice": "0x59682f10", + "blockTimestamp": "0x6aeecc64" + }, + "rawReceipt": { + "type": "0x2", + "status": "0x1", + "cumulativeGasUsed": "0x1333c0c", + "logs": [ + { + "address": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "topics": [ + "0x3d01ce186fd86a00dbb015b5eba62a161d6d725ca1d4fb525edb2c9e47b604b6", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x0000000000000000000000000000000000000000000000000000000000000001" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000a546696e616c20766572696669636174696f6e3a20626f7468206261636b65727320617070726f766564206d696c6573746f6e6520312e2049747320302e303030303420455448207061796f7574207761732072656c656173656420616e6420636c61696d65642073657061726174656c792e2052657175657374696e6720617070726f76616c20666f72207468652072656d61696e696e6720302e3030303036204554482e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002368747470733a2f2f6769746875622e636f6d2f6d6973616b6131303131312f646170700000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xad081e1b6712bce0e3e548dc86aa62a66e2d78ac1fcb332a8942e5786680c8d3", + "blockNumber": "0xb85b7d", + "blockTimestamp": "0x6aeecc64", + "transactionHash": "0xfaae62807e8ff377805dbb52ce49e1379fd5290c9213d85921d1663f24c664d4", + "transactionIndex": "0x28", + "logIndex": "0x33", + "removed": false + } + ], + "logsBloom": "0x04000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000020000000000000100000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000040000001000000000000000000000000000000000000008000000000000100000000", + "transactionHash": "0xfaae62807e8ff377805dbb52ce49e1379fd5290c9213d85921d1663f24c664d4", + "transactionIndex": "0x28", + "blockHash": "0xad081e1b6712bce0e3e548dc86aa62a66e2d78ac1fcb332a8942e5786680c8d3", + "blockNumber": "0xb85b7d", + "gasUsed": "0x14b520", + "effectiveGasPrice": "0x59682f10", + "from": "0x406799e512b14cbdfccb7ef2acea9e6bcfb218c4", + "to": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "contractAddress": null + } + }, + { + "step": 10, + "actor": "B", + "transactionHash": "0xcdb7134171df911933454aa6ef3156215d9e6e5aa4cfd7ca942c98d1262c7a91", + "block": { + "number": 12082052, + "hash": "0x20118fd383b121326c2012f0e5b6532063455b626e0d41738547be308e2d2d31", + "timestamp": 1794034872, + "timeUTC": "2026-11-07T07:01:12.000Z", + "timeBeijing": "2026-11-07 15:01:12 UTC+08:00" + }, + "decodedCall": { + "name": "approveMilestone", + "signature": "approveMilestone(uint256,uint8)", + "args": { + "projectId": "2", + "milestone": "1" + }, + "valueWei": "0" + }, + "events": [ + { + "name": "ApprovalCast", + "signature": "ApprovalCast(uint256,uint8,address,uint256)", + "args": { + "projectId": "2", + "milestone": "1", + "backer": "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E", + "weight": "50000000000000" + }, + "logIndex": 202 + } + ], + "snapshot": { + "project": { + "creator": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "name": "Test Project 03", + "description": "End-to-end test of milestone approvals and separate release and payout.", + "target": "100000000000000", + "deadline": "1794132000", + "totalRaised": "100000000000000", + "escrowBalance": "60000000000000", + "status": "1", + "currentMilestone": "1", + "successfulAt": "1794034392" + }, + "milestones": [ + { + "goal": "Complete prototype verification", + "evidence": "First milestone verification completed: project creation and funding by two backers on Sepolia. Project #002 reached its 0.0001 ETH target.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "100000000000000", + "withdrawnAmount": "40000000000000", + "submittedAt": "1794034464", + "submitted": true, + "approved": true, + "withdrawn": true + }, + { + "goal": "Complete final delivery verification", + "evidence": "Final verification: both backers approved milestone 1. Its 0.00004 ETH payout was released and claimed separately. Requesting approval for the remaining 0.00006 ETH.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "50000000000000", + "withdrawnAmount": "0", + "submittedAt": "1794034788", + "submitted": true, + "approved": false, + "withdrawn": false + } + ], + "claimablePayoutWei": "0", + "contributionsWei": { + "B": "50000000000000", + "C": "50000000000000" + }, + "hasApproved": { + "milestone1": { + "B": true, + "C": true + }, + "milestone2": { + "B": true, + "C": false + } + } + }, + "readCalls": [ + { + "method": "getProject", + "args": [ + "2" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000406799e512b14cbdfccb7ef2acea9e6bcfb218c40000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000005af3107a4000000000000000000000000000000000000000000000000000000000006af0482000000000000000000000000000000000000000000000000000005af3107a400000000000000000000000000000000000000000000000000000003691d6afc00000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000006aeecad8000000000000000000000000000000000000000000000000000000000000000f546573742050726f6a65637420303300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047456e642d746f2d656e642074657374206f66206d696c6573746f6e6520617070726f76616c7320616e642073657061726174652072656c6561736520616e64207061796f75742e00000000000000000000000000000000000000000000000000", + "value": { + "creator": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "name": "Test Project 03", + "description": "End-to-end test of milestone approvals and separate release and payout.", + "target": "100000000000000", + "deadline": "1794132000", + "totalRaised": "100000000000000", + "escrowBalance": "60000000000000", + "status": "1", + "currentMilestone": "1", + "successfulAt": "1794034392" + } + }, + { + "method": "getMilestone", + "args": [ + "2", + 0 + ], + "rawResult": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000005af3107a40000000000000000000000000000000000000000000000000000000246139ca8000000000000000000000000000000000000000000000000000000000006aeecb20000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000001f436f6d706c6574652070726f746f7479706520766572696669636174696f6e00000000000000000000000000000000000000000000000000000000000000008b4669727374206d696c6573746f6e6520766572696669636174696f6e20636f6d706c657465643a2070726f6a656374206372656174696f6e20616e642066756e64696e672062792074776f206261636b657273206f6e205365706f6c69612e2050726f6a656374202330303220726561636865642069747320302e3030303120455448207461726765742e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002368747470733a2f2f6769746875622e636f6d2f6d6973616b6131303131312f646170700000000000000000000000000000000000000000000000000000000000", + "value": { + "goal": "Complete prototype verification", + "evidence": "First milestone verification completed: project creation and funding by two backers on Sepolia. Project #002 reached its 0.0001 ETH target.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "100000000000000", + "withdrawnAmount": "40000000000000", + "submittedAt": "1794034464", + "submitted": true, + "approved": true, + "withdrawn": true + } + }, + { + "method": "getMilestone", + "args": [ + "2", + 1 + ], + "rawResult": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000002d79883d20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006aeecc640000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024436f6d706c6574652066696e616c2064656c697665727920766572696669636174696f6e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a546696e616c20766572696669636174696f6e3a20626f7468206261636b65727320617070726f766564206d696c6573746f6e6520312e2049747320302e303030303420455448207061796f7574207761732072656c656173656420616e6420636c61696d65642073657061726174656c792e2052657175657374696e6720617070726f76616c20666f72207468652072656d61696e696e6720302e3030303036204554482e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002368747470733a2f2f6769746875622e636f6d2f6d6973616b6131303131312f646170700000000000000000000000000000000000000000000000000000000000", + "value": { + "goal": "Complete final delivery verification", + "evidence": "Final verification: both backers approved milestone 1. Its 0.00004 ETH payout was released and claimed separately. Requesting approval for the remaining 0.00006 ETH.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "50000000000000", + "withdrawnAmount": "0", + "submittedAt": "1794034788", + "submitted": true, + "approved": false, + "withdrawn": false + } + }, + { + "method": "claimablePayouts", + "args": [ + "2" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": "0" + }, + { + "method": "contributions", + "args": [ + "2", + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "value": "50000000000000" + }, + { + "method": "contributions", + "args": [ + "2", + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "value": "50000000000000" + }, + { + "method": "hasApproved", + "args": [ + "2", + 0, + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000001", + "value": true + }, + { + "method": "hasApproved", + "args": [ + "2", + 0, + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000001", + "value": true + }, + { + "method": "hasApproved", + "args": [ + "2", + 1, + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000001", + "value": true + }, + { + "method": "hasApproved", + "args": [ + "2", + 1, + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": false + } + ], + "rawTransaction": { + "type": "0x2", + "chainId": "0xaa36a7", + "nonce": "0xa", + "gas": "0x3e80d", + "maxFeePerGas": "0x59682f16", + "maxPriorityFeePerGas": "0x59682f00", + "to": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "value": "0x0", + "accessList": [], + "input": "0xb7c5923300000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001", + "r": "0xd1ab5c4c82b6f0ac1357c514b0378cb5e1f00b623fc88ec6bb55a2f088f6e651", + "s": "0x8fa71ea6f17924dfde075d6c5412c9fa9ed3815566f12c77b91359a1ed09c8a", + "yParity": "0x0", + "v": "0x0", + "hash": "0xcdb7134171df911933454aa6ef3156215d9e6e5aa4cfd7ca942c98d1262c7a91", + "blockHash": "0x20118fd383b121326c2012f0e5b6532063455b626e0d41738547be308e2d2d31", + "blockNumber": "0xb85b84", + "transactionIndex": "0x59", + "from": "0x26791c26fba3612eb49fa763fa47cfecd66b6a1e", + "gasPrice": "0x59682f10", + "blockTimestamp": "0x6aeeccb8" + }, + "rawReceipt": { + "type": "0x2", + "status": "0x1", + "cumulativeGasUsed": "0x29ed6fb", + "logs": [ + { + "address": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "topics": [ + "0x094d71d4c000f8dd4cca693b241ce997610658e9df2713658824c0856472570d", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x00000000000000000000000026791c26fba3612eb49fa763fa47cfecd66b6a1e" + ], + "data": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "blockHash": "0x20118fd383b121326c2012f0e5b6532063455b626e0d41738547be308e2d2d31", + "blockNumber": "0xb85b84", + "blockTimestamp": "0x6aeeccb8", + "transactionHash": "0xcdb7134171df911933454aa6ef3156215d9e6e5aa4cfd7ca942c98d1262c7a91", + "transactionIndex": "0x59", + "logIndex": "0xca", + "removed": false + } + ], + "logsBloom": "0x04000000000000000000000000000000000000000000000000000000000800000000010000000000000002000000000000000000000000080000000000040000000000000000000000000000000000000000000000040000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000020000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000008000000000000100000002", + "transactionHash": "0xcdb7134171df911933454aa6ef3156215d9e6e5aa4cfd7ca942c98d1262c7a91", + "transactionIndex": "0x59", + "blockHash": "0x20118fd383b121326c2012f0e5b6532063455b626e0d41738547be308e2d2d31", + "blockNumber": "0xb85b84", + "gasUsed": "0x3dba7", + "effectiveGasPrice": "0x59682f10", + "from": "0x26791c26fba3612eb49fa763fa47cfecd66b6a1e", + "to": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "contractAddress": null + } + }, + { + "step": 11, + "actor": "C", + "transactionHash": "0x07cd037fa33f4a26f823e2a7ab5c6b3ffe0e5b13dc584859dbb71cc70ca7ab9a", + "block": { + "number": 12082056, + "hash": "0x6d00e2b2dde33aaceec6a7264c9687c81ccc301e8b5bbcf9bb22f519449470b5", + "timestamp": 1794034920, + "timeUTC": "2026-11-07T07:02:00.000Z", + "timeBeijing": "2026-11-07 15:02:00 UTC+08:00" + }, + "decodedCall": { + "name": "approveMilestone", + "signature": "approveMilestone(uint256,uint8)", + "args": { + "projectId": "2", + "milestone": "1" + }, + "valueWei": "0" + }, + "events": [ + { + "name": "ApprovalCast", + "signature": "ApprovalCast(uint256,uint8,address,uint256)", + "args": { + "projectId": "2", + "milestone": "1", + "backer": "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8", + "weight": "50000000000000" + }, + "logIndex": 3 + }, + { + "name": "MilestoneApproved", + "signature": "MilestoneApproved(uint256,uint8)", + "args": { + "projectId": "2", + "milestone": "1" + }, + "logIndex": 4 + } + ], + "snapshot": { + "project": { + "creator": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "name": "Test Project 03", + "description": "End-to-end test of milestone approvals and separate release and payout.", + "target": "100000000000000", + "deadline": "1794132000", + "totalRaised": "100000000000000", + "escrowBalance": "60000000000000", + "status": "1", + "currentMilestone": "1", + "successfulAt": "1794034392" + }, + "milestones": [ + { + "goal": "Complete prototype verification", + "evidence": "First milestone verification completed: project creation and funding by two backers on Sepolia. Project #002 reached its 0.0001 ETH target.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "100000000000000", + "withdrawnAmount": "40000000000000", + "submittedAt": "1794034464", + "submitted": true, + "approved": true, + "withdrawn": true + }, + { + "goal": "Complete final delivery verification", + "evidence": "Final verification: both backers approved milestone 1. Its 0.00004 ETH payout was released and claimed separately. Requesting approval for the remaining 0.00006 ETH.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "100000000000000", + "withdrawnAmount": "0", + "submittedAt": "1794034788", + "submitted": true, + "approved": true, + "withdrawn": false + } + ], + "claimablePayoutWei": "0", + "contributionsWei": { + "B": "50000000000000", + "C": "50000000000000" + }, + "hasApproved": { + "milestone1": { + "B": true, + "C": true + }, + "milestone2": { + "B": true, + "C": true + } + } + }, + "readCalls": [ + { + "method": "getProject", + "args": [ + "2" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000406799e512b14cbdfccb7ef2acea9e6bcfb218c40000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000005af3107a4000000000000000000000000000000000000000000000000000000000006af0482000000000000000000000000000000000000000000000000000005af3107a400000000000000000000000000000000000000000000000000000003691d6afc00000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000006aeecad8000000000000000000000000000000000000000000000000000000000000000f546573742050726f6a65637420303300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047456e642d746f2d656e642074657374206f66206d696c6573746f6e6520617070726f76616c7320616e642073657061726174652072656c6561736520616e64207061796f75742e00000000000000000000000000000000000000000000000000", + "value": { + "creator": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "name": "Test Project 03", + "description": "End-to-end test of milestone approvals and separate release and payout.", + "target": "100000000000000", + "deadline": "1794132000", + "totalRaised": "100000000000000", + "escrowBalance": "60000000000000", + "status": "1", + "currentMilestone": "1", + "successfulAt": "1794034392" + } + }, + { + "method": "getMilestone", + "args": [ + "2", + 0 + ], + "rawResult": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000005af3107a40000000000000000000000000000000000000000000000000000000246139ca8000000000000000000000000000000000000000000000000000000000006aeecb20000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000001f436f6d706c6574652070726f746f7479706520766572696669636174696f6e00000000000000000000000000000000000000000000000000000000000000008b4669727374206d696c6573746f6e6520766572696669636174696f6e20636f6d706c657465643a2070726f6a656374206372656174696f6e20616e642066756e64696e672062792074776f206261636b657273206f6e205365706f6c69612e2050726f6a656374202330303220726561636865642069747320302e3030303120455448207461726765742e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002368747470733a2f2f6769746875622e636f6d2f6d6973616b6131303131312f646170700000000000000000000000000000000000000000000000000000000000", + "value": { + "goal": "Complete prototype verification", + "evidence": "First milestone verification completed: project creation and funding by two backers on Sepolia. Project #002 reached its 0.0001 ETH target.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "100000000000000", + "withdrawnAmount": "40000000000000", + "submittedAt": "1794034464", + "submitted": true, + "approved": true, + "withdrawn": true + } + }, + { + "method": "getMilestone", + "args": [ + "2", + 1 + ], + "rawResult": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000005af3107a40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006aeecc640000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024436f6d706c6574652066696e616c2064656c697665727920766572696669636174696f6e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a546696e616c20766572696669636174696f6e3a20626f7468206261636b65727320617070726f766564206d696c6573746f6e6520312e2049747320302e303030303420455448207061796f7574207761732072656c656173656420616e6420636c61696d65642073657061726174656c792e2052657175657374696e6720617070726f76616c20666f72207468652072656d61696e696e6720302e3030303036204554482e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002368747470733a2f2f6769746875622e636f6d2f6d6973616b6131303131312f646170700000000000000000000000000000000000000000000000000000000000", + "value": { + "goal": "Complete final delivery verification", + "evidence": "Final verification: both backers approved milestone 1. Its 0.00004 ETH payout was released and claimed separately. Requesting approval for the remaining 0.00006 ETH.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "100000000000000", + "withdrawnAmount": "0", + "submittedAt": "1794034788", + "submitted": true, + "approved": true, + "withdrawn": false + } + }, + { + "method": "claimablePayouts", + "args": [ + "2" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": "0" + }, + { + "method": "contributions", + "args": [ + "2", + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "value": "50000000000000" + }, + { + "method": "contributions", + "args": [ + "2", + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "value": "50000000000000" + }, + { + "method": "hasApproved", + "args": [ + "2", + 0, + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000001", + "value": true + }, + { + "method": "hasApproved", + "args": [ + "2", + 0, + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000001", + "value": true + }, + { + "method": "hasApproved", + "args": [ + "2", + 1, + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000001", + "value": true + }, + { + "method": "hasApproved", + "args": [ + "2", + 1, + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000001", + "value": true + } + ], + "rawTransaction": { + "type": "0x2", + "chainId": "0xaa36a7", + "nonce": "0x5", + "gas": "0x294d7", + "maxFeePerGas": "0x59682f16", + "maxPriorityFeePerGas": "0x59682f00", + "to": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "value": "0x0", + "accessList": [], + "input": "0xb7c5923300000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001", + "r": "0xf1d467b8178efc32d53d142f2a281612b89a64202a798df4b8c8d704edfb4ca6", + "s": "0x1d26c48d56285c4465efc466e335cf10637909b028d1aa095b95a68eeb262e68", + "yParity": "0x1", + "v": "0x1", + "hash": "0x07cd037fa33f4a26f823e2a7ab5c6b3ffe0e5b13dc584859dbb71cc70ca7ab9a", + "blockHash": "0x6d00e2b2dde33aaceec6a7264c9687c81ccc301e8b5bbcf9bb22f519449470b5", + "blockNumber": "0xb85b88", + "transactionIndex": "0x5", + "from": "0x3851e2c69ae098447adc8038dc71817abaf39bc8", + "gasPrice": "0x59682f10", + "blockTimestamp": "0x6aeecce8" + }, + "rawReceipt": { + "type": "0x2", + "status": "0x1", + "cumulativeGasUsed": "0x6d9ff", + "logs": [ + { + "address": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "topics": [ + "0x094d71d4c000f8dd4cca693b241ce997610658e9df2713658824c0856472570d", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000003851e2c69ae098447adc8038dc71817abaf39bc8" + ], + "data": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "blockHash": "0x6d00e2b2dde33aaceec6a7264c9687c81ccc301e8b5bbcf9bb22f519449470b5", + "blockNumber": "0xb85b88", + "blockTimestamp": "0x6aeecce8", + "transactionHash": "0x07cd037fa33f4a26f823e2a7ab5c6b3ffe0e5b13dc584859dbb71cc70ca7ab9a", + "transactionIndex": "0x5", + "logIndex": "0x3", + "removed": false + }, + { + "address": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "topics": [ + "0x5bd776d6cd4ec262a0d9b560dc43fcd23bbf8162933a60acf2b23e2aed2a7e4c", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x0000000000000000000000000000000000000000000000000000000000000001" + ], + "data": "0x", + "blockHash": "0x6d00e2b2dde33aaceec6a7264c9687c81ccc301e8b5bbcf9bb22f519449470b5", + "blockNumber": "0xb85b88", + "blockTimestamp": "0x6aeecce8", + "transactionHash": "0x07cd037fa33f4a26f823e2a7ab5c6b3ffe0e5b13dc584859dbb71cc70ca7ab9a", + "transactionIndex": "0x5", + "logIndex": "0x4", + "removed": false + } + ], + "logsBloom": "0x44000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000080000000000060000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000080000000000000000000020000000000000100000000000000000000000000000000000000000000000800002000000000000000000000000000000000000000000000000040000000000000000100000000000000000000000000008000000000000100000002", + "transactionHash": "0x07cd037fa33f4a26f823e2a7ab5c6b3ffe0e5b13dc584859dbb71cc70ca7ab9a", + "transactionIndex": "0x5", + "blockHash": "0x6d00e2b2dde33aaceec6a7264c9687c81ccc301e8b5bbcf9bb22f519449470b5", + "blockNumber": "0xb85b88", + "gasUsed": "0x28b1d", + "effectiveGasPrice": "0x59682f10", + "from": "0x3851e2c69ae098447adc8038dc71817abaf39bc8", + "to": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "contractAddress": null + } + }, + { + "step": 12, + "actor": "A", + "transactionHash": "0x7614e7d2826c1d0e98e841e95fda7d933e9babab360596b23eb6e0311847d5e8", + "block": { + "number": 12082061, + "hash": "0x04acffd63f0d8a8c853f4df509864b455042a0b5beaa4c2712b58daac4b28c1b", + "timestamp": 1794034980, + "timeUTC": "2026-11-07T07:03:00.000Z", + "timeBeijing": "2026-11-07 15:03:00 UTC+08:00" + }, + "decodedCall": { + "name": "releaseMilestone", + "signature": "releaseMilestone(uint256,uint8)", + "args": { + "projectId": "2", + "milestone": "1" + }, + "valueWei": "0" + }, + "events": [ + { + "name": "MilestoneReleased", + "signature": "MilestoneReleased(uint256,uint8,uint256)", + "args": { + "projectId": "2", + "milestone": "1", + "amount": "60000000000000" + }, + "logIndex": 22 + }, + { + "name": "ProjectCompleted", + "signature": "ProjectCompleted(uint256)", + "args": { + "projectId": "2" + }, + "logIndex": 23 + } + ], + "snapshot": { + "project": { + "creator": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "name": "Test Project 03", + "description": "End-to-end test of milestone approvals and separate release and payout.", + "target": "100000000000000", + "deadline": "1794132000", + "totalRaised": "100000000000000", + "escrowBalance": "0", + "status": "3", + "currentMilestone": "2", + "successfulAt": "1794034392" + }, + "milestones": [ + { + "goal": "Complete prototype verification", + "evidence": "First milestone verification completed: project creation and funding by two backers on Sepolia. Project #002 reached its 0.0001 ETH target.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "100000000000000", + "withdrawnAmount": "40000000000000", + "submittedAt": "1794034464", + "submitted": true, + "approved": true, + "withdrawn": true + }, + { + "goal": "Complete final delivery verification", + "evidence": "Final verification: both backers approved milestone 1. Its 0.00004 ETH payout was released and claimed separately. Requesting approval for the remaining 0.00006 ETH.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "100000000000000", + "withdrawnAmount": "60000000000000", + "submittedAt": "1794034788", + "submitted": true, + "approved": true, + "withdrawn": true + } + ], + "claimablePayoutWei": "60000000000000", + "contributionsWei": { + "B": "50000000000000", + "C": "50000000000000" + }, + "hasApproved": { + "milestone1": { + "B": true, + "C": true + }, + "milestone2": { + "B": true, + "C": true + } + } + }, + "readCalls": [ + { + "method": "getProject", + "args": [ + "2" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000406799e512b14cbdfccb7ef2acea9e6bcfb218c40000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000005af3107a4000000000000000000000000000000000000000000000000000000000006af0482000000000000000000000000000000000000000000000000000005af3107a4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000006aeecad8000000000000000000000000000000000000000000000000000000000000000f546573742050726f6a65637420303300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047456e642d746f2d656e642074657374206f66206d696c6573746f6e6520617070726f76616c7320616e642073657061726174652072656c6561736520616e64207061796f75742e00000000000000000000000000000000000000000000000000", + "value": { + "creator": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "name": "Test Project 03", + "description": "End-to-end test of milestone approvals and separate release and payout.", + "target": "100000000000000", + "deadline": "1794132000", + "totalRaised": "100000000000000", + "escrowBalance": "0", + "status": "3", + "currentMilestone": "2", + "successfulAt": "1794034392" + } + }, + { + "method": "getMilestone", + "args": [ + "2", + 0 + ], + "rawResult": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000005af3107a40000000000000000000000000000000000000000000000000000000246139ca8000000000000000000000000000000000000000000000000000000000006aeecb20000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000001f436f6d706c6574652070726f746f7479706520766572696669636174696f6e00000000000000000000000000000000000000000000000000000000000000008b4669727374206d696c6573746f6e6520766572696669636174696f6e20636f6d706c657465643a2070726f6a656374206372656174696f6e20616e642066756e64696e672062792074776f206261636b657273206f6e205365706f6c69612e2050726f6a656374202330303220726561636865642069747320302e3030303120455448207461726765742e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002368747470733a2f2f6769746875622e636f6d2f6d6973616b6131303131312f646170700000000000000000000000000000000000000000000000000000000000", + "value": { + "goal": "Complete prototype verification", + "evidence": "First milestone verification completed: project creation and funding by two backers on Sepolia. Project #002 reached its 0.0001 ETH target.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "100000000000000", + "withdrawnAmount": "40000000000000", + "submittedAt": "1794034464", + "submitted": true, + "approved": true, + "withdrawn": true + } + }, + { + "method": "getMilestone", + "args": [ + "2", + 1 + ], + "rawResult": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000005af3107a400000000000000000000000000000000000000000000000000000003691d6afc000000000000000000000000000000000000000000000000000000000006aeecc640000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000024436f6d706c6574652066696e616c2064656c697665727920766572696669636174696f6e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a546696e616c20766572696669636174696f6e3a20626f7468206261636b65727320617070726f766564206d696c6573746f6e6520312e2049747320302e303030303420455448207061796f7574207761732072656c656173656420616e6420636c61696d65642073657061726174656c792e2052657175657374696e6720617070726f76616c20666f72207468652072656d61696e696e6720302e3030303036204554482e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002368747470733a2f2f6769746875622e636f6d2f6d6973616b6131303131312f646170700000000000000000000000000000000000000000000000000000000000", + "value": { + "goal": "Complete final delivery verification", + "evidence": "Final verification: both backers approved milestone 1. Its 0.00004 ETH payout was released and claimed separately. Requesting approval for the remaining 0.00006 ETH.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "100000000000000", + "withdrawnAmount": "60000000000000", + "submittedAt": "1794034788", + "submitted": true, + "approved": true, + "withdrawn": true + } + }, + { + "method": "claimablePayouts", + "args": [ + "2" + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000003691d6afc000", + "value": "60000000000000" + }, + { + "method": "contributions", + "args": [ + "2", + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "value": "50000000000000" + }, + { + "method": "contributions", + "args": [ + "2", + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "value": "50000000000000" + }, + { + "method": "hasApproved", + "args": [ + "2", + 0, + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000001", + "value": true + }, + { + "method": "hasApproved", + "args": [ + "2", + 0, + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000001", + "value": true + }, + { + "method": "hasApproved", + "args": [ + "2", + 1, + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000001", + "value": true + }, + { + "method": "hasApproved", + "args": [ + "2", + 1, + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000001", + "value": true + } + ], + "rawTransaction": { + "type": "0x2", + "chainId": "0xaa36a7", + "nonce": "0xf", + "gas": "0x5fdea", + "maxFeePerGas": "0x59682f16", + "maxPriorityFeePerGas": "0x59682f00", + "to": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "value": "0x0", + "accessList": [], + "input": "0x0d23e08000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001", + "r": "0x5ea7d164ad8050064b9aff0a60bad9726f0c2255ac115d4fe08015eac78a6c79", + "s": "0x3566155f87a6aa92951f0cdfa8176dafab4b6fe681c0bb27b14d1b6bc3f951e0", + "yParity": "0x1", + "v": "0x1", + "hash": "0x7614e7d2826c1d0e98e841e95fda7d933e9babab360596b23eb6e0311847d5e8", + "blockHash": "0x04acffd63f0d8a8c853f4df509864b455042a0b5beaa4c2712b58daac4b28c1b", + "blockNumber": "0xb85b8d", + "transactionIndex": "0x7", + "from": "0x406799e512b14cbdfccb7ef2acea9e6bcfb218c4", + "gasPrice": "0x59682f10", + "blockTimestamp": "0x6aeecd24" + }, + "rawReceipt": { + "type": "0x2", + "status": "0x1", + "cumulativeGasUsed": "0x117d23", + "logs": [ + { + "address": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "topics": [ + "0xb5e7231814419e5a5e888606251cb3b5325a5339501a127b8f728e49a0d86660", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x0000000000000000000000000000000000000000000000000000000000000001" + ], + "data": "0x00000000000000000000000000000000000000000000000000003691d6afc000", + "blockHash": "0x04acffd63f0d8a8c853f4df509864b455042a0b5beaa4c2712b58daac4b28c1b", + "blockNumber": "0xb85b8d", + "blockTimestamp": "0x6aeecd24", + "transactionHash": "0x7614e7d2826c1d0e98e841e95fda7d933e9babab360596b23eb6e0311847d5e8", + "transactionIndex": "0x7", + "logIndex": "0x16", + "removed": false + }, + { + "address": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "topics": [ + "0x60d8df137e489b6216738e436244ca4700bd6d0c8371d3c8d9c80b54538111b9", + "0x0000000000000000000000000000000000000000000000000000000000000002" + ], + "data": "0x", + "blockHash": "0x04acffd63f0d8a8c853f4df509864b455042a0b5beaa4c2712b58daac4b28c1b", + "blockNumber": "0xb85b8d", + "blockTimestamp": "0x6aeecd24", + "transactionHash": "0x7614e7d2826c1d0e98e841e95fda7d933e9babab360596b23eb6e0311847d5e8", + "transactionIndex": "0x7", + "logIndex": "0x17", + "removed": false + } + ], + "logsBloom": "0x04000000000000000000000000020000000000000000000000000000000000000000010000004000000008000000000000000000000000000000000000040000000000000000000000000000000000000000000000040000000000000000000000000000000000000400000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000100000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000008000000000000100000000", + "transactionHash": "0x7614e7d2826c1d0e98e841e95fda7d933e9babab360596b23eb6e0311847d5e8", + "transactionIndex": "0x7", + "blockHash": "0x04acffd63f0d8a8c853f4df509864b455042a0b5beaa4c2712b58daac4b28c1b", + "blockNumber": "0xb85b8d", + "gasUsed": "0x42105", + "effectiveGasPrice": "0x59682f10", + "from": "0x406799e512b14cbdfccb7ef2acea9e6bcfb218c4", + "to": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "contractAddress": null + } + }, + { + "step": 13, + "actor": "A", + "transactionHash": "0xe528db3575d57ebda35c078d75a3ea5eb8fda9178fd2fe367ac3a3f2fea4c345", + "block": { + "number": 12082066, + "hash": "0x95835da6bced0d9e871d944e78235683bafd323d3725b138e5dc0b1cb633f1c6", + "timestamp": 1794035040, + "timeUTC": "2026-11-07T07:04:00.000Z", + "timeBeijing": "2026-11-07 15:04:00 UTC+08:00" + }, + "decodedCall": { + "name": "claimPayout", + "signature": "claimPayout(uint256,address)", + "args": { + "projectId": "2", + "recipient": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4" + }, + "valueWei": "0" + }, + "events": [ + { + "name": "PayoutClaimed", + "signature": "PayoutClaimed(uint256,address,uint256)", + "args": { + "projectId": "2", + "recipient": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "amount": "60000000000000" + }, + "logIndex": 47 + } + ], + "snapshot": { + "project": { + "creator": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "name": "Test Project 03", + "description": "End-to-end test of milestone approvals and separate release and payout.", + "target": "100000000000000", + "deadline": "1794132000", + "totalRaised": "100000000000000", + "escrowBalance": "0", + "status": "3", + "currentMilestone": "2", + "successfulAt": "1794034392" + }, + "milestones": [ + { + "goal": "Complete prototype verification", + "evidence": "First milestone verification completed: project creation and funding by two backers on Sepolia. Project #002 reached its 0.0001 ETH target.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "100000000000000", + "withdrawnAmount": "40000000000000", + "submittedAt": "1794034464", + "submitted": true, + "approved": true, + "withdrawn": true + }, + { + "goal": "Complete final delivery verification", + "evidence": "Final verification: both backers approved milestone 1. Its 0.00004 ETH payout was released and claimed separately. Requesting approval for the remaining 0.00006 ETH.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "100000000000000", + "withdrawnAmount": "60000000000000", + "submittedAt": "1794034788", + "submitted": true, + "approved": true, + "withdrawn": true + } + ], + "claimablePayoutWei": "0", + "contributionsWei": { + "B": "50000000000000", + "C": "50000000000000" + }, + "hasApproved": { + "milestone1": { + "B": true, + "C": true + }, + "milestone2": { + "B": true, + "C": true + } + } + }, + "readCalls": [ + { + "method": "getProject", + "args": [ + "2" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000406799e512b14cbdfccb7ef2acea9e6bcfb218c40000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000005af3107a4000000000000000000000000000000000000000000000000000000000006af0482000000000000000000000000000000000000000000000000000005af3107a4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000006aeecad8000000000000000000000000000000000000000000000000000000000000000f546573742050726f6a65637420303300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047456e642d746f2d656e642074657374206f66206d696c6573746f6e6520617070726f76616c7320616e642073657061726174652072656c6561736520616e64207061796f75742e00000000000000000000000000000000000000000000000000", + "value": { + "creator": "0x406799E512b14CbDfCCB7EF2Acea9e6bCFB218C4", + "name": "Test Project 03", + "description": "End-to-end test of milestone approvals and separate release and payout.", + "target": "100000000000000", + "deadline": "1794132000", + "totalRaised": "100000000000000", + "escrowBalance": "0", + "status": "3", + "currentMilestone": "2", + "successfulAt": "1794034392" + } + }, + { + "method": "getMilestone", + "args": [ + "2", + 0 + ], + "rawResult": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000005af3107a40000000000000000000000000000000000000000000000000000000246139ca8000000000000000000000000000000000000000000000000000000000006aeecb20000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000001f436f6d706c6574652070726f746f7479706520766572696669636174696f6e00000000000000000000000000000000000000000000000000000000000000008b4669727374206d696c6573746f6e6520766572696669636174696f6e20636f6d706c657465643a2070726f6a656374206372656174696f6e20616e642066756e64696e672062792074776f206261636b657273206f6e205365706f6c69612e2050726f6a656374202330303220726561636865642069747320302e3030303120455448207461726765742e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002368747470733a2f2f6769746875622e636f6d2f6d6973616b6131303131312f646170700000000000000000000000000000000000000000000000000000000000", + "value": { + "goal": "Complete prototype verification", + "evidence": "First milestone verification completed: project creation and funding by two backers on Sepolia. Project #002 reached its 0.0001 ETH target.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "100000000000000", + "withdrawnAmount": "40000000000000", + "submittedAt": "1794034464", + "submitted": true, + "approved": true, + "withdrawn": true + } + }, + { + "method": "getMilestone", + "args": [ + "2", + 1 + ], + "rawResult": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000005af3107a400000000000000000000000000000000000000000000000000000003691d6afc000000000000000000000000000000000000000000000000000000000006aeecc640000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000024436f6d706c6574652066696e616c2064656c697665727920766572696669636174696f6e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a546696e616c20766572696669636174696f6e3a20626f7468206261636b65727320617070726f766564206d696c6573746f6e6520312e2049747320302e303030303420455448207061796f7574207761732072656c656173656420616e6420636c61696d65642073657061726174656c792e2052657175657374696e6720617070726f76616c20666f72207468652072656d61696e696e6720302e3030303036204554482e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002368747470733a2f2f6769746875622e636f6d2f6d6973616b6131303131312f646170700000000000000000000000000000000000000000000000000000000000", + "value": { + "goal": "Complete final delivery verification", + "evidence": "Final verification: both backers approved milestone 1. Its 0.00004 ETH payout was released and claimed separately. Requesting approval for the remaining 0.00006 ETH.", + "evidenceUrl": "https://github.com/misaka10111/dapp", + "approvalWeight": "100000000000000", + "withdrawnAmount": "60000000000000", + "submittedAt": "1794034788", + "submitted": true, + "approved": true, + "withdrawn": true + } + }, + { + "method": "claimablePayouts", + "args": [ + "2" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": "0" + }, + { + "method": "contributions", + "args": [ + "2", + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "value": "50000000000000" + }, + { + "method": "contributions", + "args": [ + "2", + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x00000000000000000000000000000000000000000000000000002d79883d2000", + "value": "50000000000000" + }, + { + "method": "hasApproved", + "args": [ + "2", + 0, + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000001", + "value": true + }, + { + "method": "hasApproved", + "args": [ + "2", + 0, + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000001", + "value": true + }, + { + "method": "hasApproved", + "args": [ + "2", + 1, + "0x26791C26Fba3612Eb49FA763fA47CfEcd66b6a1E" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000001", + "value": true + }, + { + "method": "hasApproved", + "args": [ + "2", + 1, + "0x3851E2C69AE098447Adc8038dC71817aBaf39bc8" + ], + "rawResult": "0x0000000000000000000000000000000000000000000000000000000000000001", + "value": true + } + ], + "rawTransaction": { + "type": "0x2", + "chainId": "0xaa36a7", + "nonce": "0x10", + "gas": "0x2745a", + "maxFeePerGas": "0x59682f16", + "maxPriorityFeePerGas": "0x59682f00", + "to": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "value": "0x0", + "accessList": [], + "input": "0xb0110cc60000000000000000000000000000000000000000000000000000000000000002000000000000000000000000406799e512b14cbdfccb7ef2acea9e6bcfb218c4", + "r": "0x212f6a9ffc29d2a85d9f047b6b5508c5c221aa70336e3d3817638949d396ed36", + "s": "0x5d665100d716400b7e3576e39fdcf0122a0f3484dd2d954519fafd8738dfe551", + "yParity": "0x0", + "v": "0x0", + "hash": "0xe528db3575d57ebda35c078d75a3ea5eb8fda9178fd2fe367ac3a3f2fea4c345", + "blockHash": "0x95835da6bced0d9e871d944e78235683bafd323d3725b138e5dc0b1cb633f1c6", + "blockNumber": "0xb85b92", + "transactionIndex": "0x11", + "from": "0x406799e512b14cbdfccb7ef2acea9e6bcfb218c4", + "gasPrice": "0x59682f10", + "blockTimestamp": "0x6aeecd60" + }, + "rawReceipt": { + "type": "0x2", + "status": "0x1", + "cumulativeGasUsed": "0x1c46044", + "logs": [ + { + "address": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "topics": [ + "0xe97cee5a4c0549d3fdc81e322b718ddf0aeb3418ec87dce4f9a7fb28d117c312", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x000000000000000000000000406799e512b14cbdfccb7ef2acea9e6bcfb218c4" + ], + "data": "0x00000000000000000000000000000000000000000000000000003691d6afc000", + "blockHash": "0x95835da6bced0d9e871d944e78235683bafd323d3725b138e5dc0b1cb633f1c6", + "blockNumber": "0xb85b92", + "blockTimestamp": "0x6aeecd60", + "transactionHash": "0xe528db3575d57ebda35c078d75a3ea5eb8fda9178fd2fe367ac3a3f2fea4c345", + "transactionIndex": "0x11", + "logIndex": "0x2f", + "removed": false + }, + { + "address": "0xfffffffffffffffffffffffffffffffffffffffe", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000005a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "0x000000000000000000000000406799e512b14cbdfccb7ef2acea9e6bcfb218c4" + ], + "data": "0x00000000000000000000000000000000000000000000000000003691d6afc000", + "blockHash": "0x95835da6bced0d9e871d944e78235683bafd323d3725b138e5dc0b1cb633f1c6", + "blockNumber": "0xb85b92", + "blockTimestamp": "0x6aeecd60", + "transactionHash": "0xe528db3575d57ebda35c078d75a3ea5eb8fda9178fd2fe367ac3a3f2fea4c345", + "transactionIndex": "0x11", + "logIndex": "0x30", + "removed": false + } + ], + "logsBloom": "0x04000000000000000000000000000000000000080000000000000000000000000002010000000000000000000000000000000000000000000000400000000000000000000000000000000028000000000000000000000000000000000000000000000000000000002000010002000000000000000000000000000010000000000000004000000000000000000000000000000000000000000000000000000000000000020000000000000900000000000000000000000000000000000000000000000002000000000008000000000000000000000000000000000000000000400000000000000000000000000000000000000000008000000000020100000000", + "transactionHash": "0xe528db3575d57ebda35c078d75a3ea5eb8fda9178fd2fe367ac3a3f2fea4c345", + "transactionIndex": "0x11", + "blockHash": "0x95835da6bced0d9e871d944e78235683bafd323d3725b138e5dc0b1cb633f1c6", + "blockNumber": "0xb85b92", + "gasUsed": "0xb9ec", + "effectiveGasPrice": "0x59682f10", + "from": "0x406799e512b14cbdfccb7ef2acea9e6bcfb218c4", + "to": "0x5a5aeae5553feb5c5b27fee5ec8b24e3ed2b964f", + "contractAddress": null + } + } + ] +} diff --git a/docs/evidence/2026-11-07-project-002/screenshots.json b/docs/evidence/2026-11-07-project-002/screenshots.json new file mode 100644 index 0000000..8ccb601 --- /dev/null +++ b/docs/evidence/2026-11-07-project-002/screenshots.json @@ -0,0 +1,148 @@ +{ + "schemaVersion": 1, + "date": "2026-11-07", + "timezone": "Asia/Shanghai", + "projectId": 2, + "projectName": "Test Project 03", + "network": "Ethereum Sepolia", + "contractAddress": "0x5A5AeaE5553Feb5c5b27FEe5ec8b24E3ED2B964F", + "provenance": "Original PNG attachments provided by the tester in chat; copied byte-for-byte without cropping, resizing or editing. Visible-state summaries describe screenshots and are not independent blockchain receipt verification.", + "refreshConfirmation": { + "file": "13-completed-after-refresh.png", + "source": "tester statement in chat", + "statement": "刷新后的", + "scope": "The tester explicitly identified the final screenshot as taken after browser refresh. The refresh action was not captured or executed by browser automation." + }, + "screenshots": [ + { + "sourceType": "user-provided screenshot", + "originalAttachment": "codex-clipboard-46be82d8-c774-462a-9d96-46672f445e55.png", + "file": "01-project-created.png", + "sha256": "6878485533f2946bb088d4f35ce1e7f192046118790a354c50401dbfc588b24f", + "bytes": 678925, + "width": 2372, + "height": 2960, + "visibleState": "A connected; project #002 / Test Project 03 is Funding; goal 0.0001 ETH; raised and held in escrow 0; both milestones Pending." + }, + { + "sourceType": "user-provided screenshot", + "originalAttachment": "codex-clipboard-784d7e09-b662-4fdf-b5ba-7fc98c11d609.png", + "file": "02-b-funded-50-percent.png", + "sha256": "3fb1cc69a84592cc36ce3844ec867326604adc942857dd77822b2cdd6ff78c58", + "bytes": 748830, + "width": 2392, + "height": 3088, + "visibleState": "B connected; project #002 remains Funding at 50%; raised, escrow and B contribution are 0.00005 ETH." + }, + { + "sourceType": "user-provided screenshot", + "originalAttachment": "codex-clipboard-e6395d41-c91d-4803-9a92-1acc86a2ff3d.png", + "file": "03-funded-100-percent.png", + "sha256": "7c7dfe3239bb0edafc84852e29aeb88f842d7c1af62e6d21ac5a9274fe914a8d", + "bytes": 707605, + "width": 2370, + "height": 2872, + "visibleState": "C connected; project #002 is Successful at 100%; raised and escrow are 0.0001 ETH; C contribution is 0.00005 ETH; milestone 1 awaits evidence." + }, + { + "sourceType": "user-provided screenshot", + "originalAttachment": "codex-clipboard-4fa8bd55-7808-4940-bf5f-f30cad9c6333.png", + "file": "04-milestone-1-in-review.png", + "sha256": "5b2d81df2cff9667401e097ce27cadb50c47a828e9eacb3c15ce93695fd3ae2b", + "bytes": 757314, + "width": 2394, + "height": 3118, + "visibleState": "A connected; milestone 1 is In review with submitted evidence and 0% approval weight; escrow remains 0.0001 ETH." + }, + { + "sourceType": "user-provided screenshot", + "originalAttachment": "codex-clipboard-80e6857d-3f8d-49dc-8c5a-cbfef8f5f75b.png", + "file": "05-milestone-1-b-approved-50-percent.png", + "sha256": "87b616d3097401af189e978c83c7fb60e331b785a44896d0514051172c03b1d5", + "bytes": 1123921, + "width": 2396, + "height": 3116, + "visibleState": "B connected; milestone 1 has 50% approval weight and remains In review; B is shown as having approved; escrow remains 0.0001 ETH." + }, + { + "sourceType": "user-provided screenshot", + "originalAttachment": "codex-clipboard-e3cb7394-180c-48db-a97e-b23a7865f2df.png", + "file": "06-milestone-1-approved-100-percent.png", + "sha256": "800ec34e445422d82a57b59f7edad1eab04630869364028be4b7ab666179c570", + "bytes": 1118361, + "width": 2398, + "height": 3100, + "visibleState": "C connected; milestone 1 is Approved at 100%; waiting for creator release; escrow remains 0.0001 ETH." + }, + { + "sourceType": "user-provided screenshot", + "originalAttachment": "codex-clipboard-de64f336-cee6-42e5-9811-d360a51288e9.png", + "file": "07-milestone-1-released-payout-pending.png", + "sha256": "84c35793ae4c58db5c0ac0d3635ab611af749a33dfd63956d358eecd86d941f4", + "bytes": 750072, + "width": 2396, + "height": 3108, + "visibleState": "A connected; milestone 1 is Released for 0.00004 ETH; creator payout available is 0.00004 ETH; escrow is 0.00006 ETH; milestone 2 awaits evidence." + }, + { + "sourceType": "user-provided screenshot", + "originalAttachment": "codex-clipboard-cd161f29-6d87-4751-a4c2-8a123dbd539e.png", + "file": "08-milestone-1-payout-claimed.png", + "sha256": "dcfb137309b5472c80cc79f2a7e0c6a2277c84c9dbe1b0c168f26b78cbaa6ef3", + "bytes": 744522, + "width": 2318, + "height": 3110, + "visibleState": "A connected; creator payout panel is absent after the reported claim; escrow remains 0.00006 ETH; milestone 1 remains Released; milestone 2 awaits evidence." + }, + { + "sourceType": "user-provided screenshot", + "originalAttachment": "codex-clipboard-6f9ca384-a0c8-4af1-b106-215d605f6991.png", + "file": "09-milestone-2-in-review.png", + "sha256": "0005327f3cc86b219040ff0c3911307d444411dfffc6fc17f4604852c89d80a0", + "bytes": 778318, + "width": 2338, + "height": 3128, + "visibleState": "A connected; milestone 1 remains Released; milestone 2 is In review with submitted evidence and 0% approval weight; escrow remains 0.00006 ETH." + }, + { + "sourceType": "user-provided screenshot", + "originalAttachment": "codex-clipboard-50031892-6f2f-4dd9-8475-2993a6151b8c.png", + "file": "10-milestone-2-b-approved-50-percent.png", + "sha256": "bb69769493376ec6251603ce0c4638b7b4b98846894e35c5152958868039aa57", + "bytes": 791672, + "width": 2318, + "height": 3118, + "visibleState": "B connected; milestone 2 has 50% approval weight and remains In review; B is shown as having approved; escrow remains 0.00006 ETH." + }, + { + "sourceType": "user-provided screenshot", + "originalAttachment": "codex-clipboard-719e056e-1b14-4be1-8a60-efdcd9930cdf.png", + "file": "11-milestone-2-approved-100-percent.png", + "sha256": "bcb4ef25773db7165b2ac70642845558aec82a975acb5e4b4dd5ebaee5e87d79", + "bytes": 807800, + "width": 2374, + "height": 3120, + "visibleState": "C connected; milestone 2 is Approved at 100%; waiting for creator release; escrow remains 0.00006 ETH." + }, + { + "sourceType": "user-provided screenshot", + "originalAttachment": "codex-clipboard-14e2ea26-ab30-4a5e-89e8-a2eca91f6b76.png", + "file": "12-completed-payout-pending.png", + "sha256": "c9b04d797621ba35c0960b21d0c6d72795514ab166110b6890dfcc8dd986ad5e", + "bytes": 787340, + "width": 2346, + "height": 3128, + "visibleState": "A connected; project #002 is Completed and both milestones are Released; creator payout available is 0.00006 ETH with Withdraw payout still available." + }, + { + "sourceType": "user-provided screenshot", + "originalAttachment": "codex-clipboard-41029491-06e2-41a6-b797-75771555d4b2.png", + "file": "13-completed-after-refresh.png", + "sha256": "0f55e2b6a5ce03be25fa5fe9bdd0b147b419c35e652805fdddd2d7eb0594bb47", + "bytes": 763364, + "width": 2326, + "height": 3126, + "visibleState": "A connected; project #002 remains Completed; raised total remains 0.0001 ETH; escrow is 0; both milestones are Released; creator payout panel is absent." + } + ] +} diff --git a/docs/evidence/automated/regression-2026-11-07.tap b/docs/evidence/automated/regression-2026-11-07.tap new file mode 100644 index 0000000..7d78992 --- /dev/null +++ b/docs/evidence/automated/regression-2026-11-07.tap @@ -0,0 +1,905 @@ + +> dapp@1.0.0 test +> node --test "tests/**/*.test.mjs" --test-reporter=tap + +TAP version 13 +# Subtest: identical runtime is a full match without inventing an immutable substitution +ok 1 - identical runtime is a full match without inventing an immutable substitution + --- + duration_ms: 0.772125 + type: 'test' + ... +# Subtest: compiler-declared immutable slots accept the complete value 1 +ok 2 - compiler-declared immutable slots accept the complete value 1 + --- + duration_ms: 0.365334 + type: 'test' + ... +# Subtest: compiler-declared immutable slots accept the complete value 256 +ok 3 - compiler-declared immutable slots accept the complete value 256 + --- + duration_ms: 0.20525 + type: 'test' + ... +# Subtest: compiler-declared immutable slots accept the complete value 600 +ok 4 - compiler-declared immutable slots accept the complete value 600 + --- + duration_ms: 0.212917 + type: 'test' + ... +# Subtest: compiler-declared immutable slots accept the complete value 604800 +ok 5 - compiler-declared immutable slots accept the complete value 604800 + --- + duration_ms: 0.193791 + type: 'test' + ... +# Subtest: different immutable variables may have different values +ok 6 - different immutable variables may have different values + --- + duration_ms: 0.146 + type: 'test' + ... +# Subtest: repeated references to the same immutable must contain the same value +ok 7 - repeated references to the same immutable must contain the same value + --- + duration_ms: 0.208875 + type: 'test' + ... +# Subtest: arbitrary zero-byte changes outside compiler references are not immutable substitutions +ok 8 - arbitrary zero-byte changes outside compiler references are not immutable substitutions + --- + duration_ms: 0.377125 + type: 'test' + ... +# Subtest: zero-byte differences without compiler references cannot pass verification +ok 9 - zero-byte differences without compiler references cannot pass verification + --- + duration_ms: 0.310291 + type: 'test' + ... +# Subtest: a metadata-only mismatch remains executable-only rather than becoming an immutable match +ok 10 - a metadata-only mismatch remains executable-only rather than becoming an immutable match + --- + duration_ms: 0.333084 + type: 'test' + ... +# Subtest: immutable substitution does not hide a metadata mismatch +ok 11 - immutable substitution does not hide a metadata mismatch + --- + duration_ms: 0.193667 + type: 'test' + ... +# Subtest: invalid or overlapping immutable ranges cannot authorize a match +ok 12 - invalid or overlapping immutable ranges cannot authorize a match + --- + duration_ms: 0.605542 + type: 'test' + ... +# Subtest: saved Sepolia runtime matches declared immutable values but not the saved compiler metadata +ok 13 - saved Sepolia runtime matches declared immutable values but not the saved compiler metadata + --- + duration_ms: 1.921458 + type: 'test' + ... +# Subtest: repository-default: two stages, strict majority, independent votes and 40/60 payments +ok 14 - repository-default: two stages, strict majority, independent votes and 40/60 payments + --- + duration_ms: 250.167042 + type: 'test' + ... +# Subtest: repository-default: contributions cap at the target and refund the excess; zero first payout preserves every wei +ok 15 - repository-default: contributions cap at the target and refund the excess; zero first payout preserves every wei + --- + duration_ms: 160.303042 + type: 'test' + ... +# Subtest: repository-default: interleaved projects isolate escrow, cumulative contributions and refunds +ok 16 - repository-default: interleaved projects isolate escrow, cumulative contributions and refunds + --- + duration_ms: 146.289042 + type: 'test' + ... +# Subtest: repository-default: exact deadline closes contributions and requires explicit finalization +ok 17 - repository-default: exact deadline closes contributions and requires explicit finalization + --- + duration_ms: 45.957917 + type: 'test' + ... +# Subtest: repository-default: rejected ETH payments roll back withdrawal and refund accounting +ok 18 - repository-default: rejected ETH payments roll back withdrawal and refund accounting + --- + duration_ms: 95.364167 + type: 'test' + ... +# Subtest: repository-default: anyone can release two approved milestones and only the creator can collect +ok 19 - repository-default: anyone can release two approved milestones and only the creator can collect + --- + duration_ms: 95.411833 + type: 'test' + ... +# Subtest: repository-default: a rejecting creator can redirect released funds after the next stage expires +ok 20 - repository-default: a rejecting creator can redirect released funds after the next stage expires + --- + duration_ms: 76.314375 + type: 'test' + ... +# Subtest: repository-default: a direct payout leaves earlier credited funds available +ok 21 - repository-default: a direct payout leaves earlier credited funds available + --- + duration_ms: 58.05125 + type: 'test' + ... +# Subtest: repository-default: approval timeout refunds both backers in either claim order +ok 22 - repository-default: approval timeout refunds both backers in either claim order + --- + duration_ms: 168.833375 + type: 'test' + ... +# Subtest: repository-default: stage-two submission expiry refunds fixed shares of the unpaid escrow +ok 23 - repository-default: stage-two submission expiry refunds fixed shares of the unpaid escrow + --- + duration_ms: 73.404458 + type: 'test' + ... +# Subtest: repository-default: an expiry refund that cannot be delivered can be retried +ok 24 - repository-default: an expiry refund that cannot be delivered can be retried + --- + duration_ms: 57.679209 + type: 'test' + ... +# Subtest: repository-default: an approved milestone cannot be refunded +ok 25 - repository-default: an approved milestone cannot be refunded + --- + duration_ms: 37.975125 + type: 'test' + ... +# Subtest: repository-default: submission timeout protects backers when the creator never submits +ok 26 - repository-default: submission timeout protects backers when the creator never submits + --- + duration_ms: 43.001 + type: 'test' + ... +# Subtest: repository-default: a zero first-stage payout skips the ETH transfer +ok 27 - repository-default: a zero first-stage payout skips the ETH transfer + --- + duration_ms: 71.694709 + type: 'test' + ... +# Subtest: repository-default: timeouts come from the constructor, so a demo can expire quickly +ok 28 - repository-default: timeouts come from the constructor, so a demo can expire quickly + --- + duration_ms: 40.616042 + type: 'test' + ... +# Subtest: sepolia-reproduction: two stages, strict majority, independent votes and 40/60 payments +ok 29 - sepolia-reproduction: two stages, strict majority, independent votes and 40/60 payments + --- + duration_ms: 154.698666 + type: 'test' + ... +# Subtest: sepolia-reproduction: contributions cap at the target and refund the excess; zero first payout preserves every wei +ok 30 - sepolia-reproduction: contributions cap at the target and refund the excess; zero first payout preserves every wei + --- + duration_ms: 180.334042 + type: 'test' + ... +# Subtest: sepolia-reproduction: interleaved projects isolate escrow, cumulative contributions and refunds +ok 31 - sepolia-reproduction: interleaved projects isolate escrow, cumulative contributions and refunds + --- + duration_ms: 156.383458 + type: 'test' + ... +# Subtest: sepolia-reproduction: exact deadline closes contributions and requires explicit finalization +ok 32 - sepolia-reproduction: exact deadline closes contributions and requires explicit finalization + --- + duration_ms: 47.048125 + type: 'test' + ... +# Subtest: sepolia-reproduction: rejected ETH payments roll back withdrawal and refund accounting +ok 33 - sepolia-reproduction: rejected ETH payments roll back withdrawal and refund accounting + --- + duration_ms: 101.693125 + type: 'test' + ... +# Subtest: sepolia-reproduction: anyone can release two approved milestones and only the creator can collect +ok 34 - sepolia-reproduction: anyone can release two approved milestones and only the creator can collect + --- + duration_ms: 100.014083 + type: 'test' + ... +# Subtest: sepolia-reproduction: a rejecting creator can redirect released funds after the next stage expires +ok 35 - sepolia-reproduction: a rejecting creator can redirect released funds after the next stage expires + --- + duration_ms: 78.878042 + type: 'test' + ... +# Subtest: sepolia-reproduction: a direct payout leaves earlier credited funds available +ok 36 - sepolia-reproduction: a direct payout leaves earlier credited funds available + --- + duration_ms: 63.508084 + type: 'test' + ... +# Subtest: sepolia-reproduction: approval timeout refunds both backers in either claim order +ok 37 - sepolia-reproduction: approval timeout refunds both backers in either claim order + --- + duration_ms: 206.577042 + type: 'test' + ... +# Subtest: sepolia-reproduction: stage-two submission expiry refunds fixed shares of the unpaid escrow +ok 38 - sepolia-reproduction: stage-two submission expiry refunds fixed shares of the unpaid escrow + --- + duration_ms: 86.853542 + type: 'test' + ... +# Subtest: sepolia-reproduction: an expiry refund that cannot be delivered can be retried +ok 39 - sepolia-reproduction: an expiry refund that cannot be delivered can be retried + --- + duration_ms: 65.1235 + type: 'test' + ... +# Subtest: sepolia-reproduction: an approved milestone cannot be refunded +ok 40 - sepolia-reproduction: an approved milestone cannot be refunded + --- + duration_ms: 37.731625 + type: 'test' + ... +# Subtest: sepolia-reproduction: submission timeout protects backers when the creator never submits +ok 41 - sepolia-reproduction: submission timeout protects backers when the creator never submits + --- + duration_ms: 41.808958 + type: 'test' + ... +# Subtest: sepolia-reproduction: a zero first-stage payout skips the ETH transfer +ok 42 - sepolia-reproduction: a zero first-stage payout skips the ETH transfer + --- + duration_ms: 75.989625 + type: 'test' + ... +# Subtest: sepolia-reproduction: timeouts come from the constructor, so a demo can expire quickly +ok 43 - sepolia-reproduction: timeouts come from the constructor, so a demo can expire quickly + --- + duration_ms: 42.205666 + type: 'test' + ... +# Subtest: deadline display + # Subtest: counts down to seconds and waits for an on-chain cutoff + ok 1 - counts down to seconds and waits for an on-chain cutoff + --- + duration_ms: 0.494417 + type: 'test' + ... + # Subtest: shows a closed window as soon as the snapshot says it is closed + ok 2 - shows a closed window as soon as the snapshot says it is closed + --- + duration_ms: 0.048166 + type: 'test' + ... + 1..2 +ok 44 - deadline display + --- + duration_ms: 0.89925 + type: 'suite' + ... +# Subtest: expiryRefundState + # Subtest: uses each unrefunded backer's on-chain quote after the first claim + ok 1 - uses each unrefunded backer's on-chain quote after the first claim + --- + duration_ms: 0.059042 + type: 'test' + ... + # Subtest: distinguishes a pending window, an unavailable quote and a zero share + ok 2 - distinguishes a pending window, an unavailable quote and a zero share + --- + duration_ms: 0.035459 + type: 'test' + ... + 1..2 +ok 45 - expiryRefundState + --- + duration_ms: 0.21525 + type: 'suite' + ... +# Subtest: shortAddress + # Subtest: keeps the first six and last four characters + ok 1 - keeps the first six and last four characters + --- + duration_ms: 0.081625 + type: 'test' + ... + # Subtest: returns an empty string for missing values + ok 2 - returns an empty string for missing values + --- + duration_ms: 0.207166 + type: 'test' + ... + # Subtest: keeps its current shape for inputs shorter than the window + ok 3 - keeps its current shape for inputs shorter than the window + --- + duration_ms: 0.198375 + type: 'test' + ... + 1..3 +ok 46 - shortAddress + --- + duration_ms: 0.698417 + type: 'suite' + ... +# Subtest: eth + # Subtest: formats whole and fractional ether without float drift + ok 1 - formats whole and fractional ether without float drift + --- + duration_ms: 0.352791 + type: 'test' + ... + # Subtest: renders the 40/60 payout amounts exactly + ok 2 - renders the 40/60 payout amounts exactly + --- + duration_ms: 0.159084 + type: 'test' + ... + # Subtest: falls back to zero when the value is missing + ok 3 - falls back to zero when the value is missing + --- + duration_ms: 0.165375 + type: 'test' + ... + 1..3 +ok 47 - eth + --- + duration_ms: 0.791417 + type: 'suite' + ... +# Subtest: percent + # Subtest: returns zero when there is nothing to compare against + ok 1 - returns zero when there is nothing to compare against + --- + duration_ms: 0.056042 + type: 'test' + ... + # Subtest: rounds down to two decimals after bigint division + ok 2 - rounds down to two decimals after bigint division + --- + duration_ms: 0.029333 + type: 'test' + ... + # Subtest: keeps exact values exact + ok 3 - keeps exact values exact + --- + duration_ms: 0.024167 + type: 'test' + ... + # Subtest: allows overshoot above 100 for overfunded projects + ok 4 - allows overshoot above 100 for overfunded projects + --- + duration_ms: 0.021458 + type: 'test' + ... + 1..4 +ok 48 - percent + --- + duration_ms: 0.174209 + type: 'suite' + ... +# Subtest: budget + # Subtest: splits 40/60 for a clean total + ok 1 - splits 40/60 for a clean total + --- + duration_ms: 0.044791 + type: 'test' + ... + # Subtest: keeps the remainder in stage two when 40% does not divide evenly + ok 2 - keeps the remainder in stage two when 40% does not divide evenly + --- + duration_ms: 0.020833 + type: 'test' + ... + # Subtest: never loses or invents a wei + ok 3 - never loses or invents a wei + --- + duration_ms: 0.067042 + type: 'test' + ... + # Subtest: handles the smallest possible escrow + ok 4 - handles the smallest possible escrow + --- + duration_ms: 0.021167 + type: 'test' + ... + 1..4 +ok 49 - budget + --- + duration_ms: 0.189125 + type: 'suite' + ... +# Subtest: positiveEth + # Subtest: parses valid amounts into wei + ok 1 - parses valid amounts into wei + --- + duration_ms: 0.261333 + type: 'test' + ... + # Subtest: rejects zero after parsing + ok 2 - rejects zero after parsing + --- + duration_ms: 0.204542 + type: 'test' + ... + # Subtest: rejects anything that is not a plain decimal + ok 3 - rejects anything that is not a plain decimal + --- + duration_ms: 0.124292 + type: 'test' + ... + 1..3 +ok 50 - positiveEth + --- + duration_ms: 0.620958 + type: 'suite' + ... +# Subtest: safeUrl + # Subtest: accepts http and https links + ok 1 - accepts http and https links + --- + duration_ms: 0.063541 + type: 'test' + ... + # Subtest: keeps path, query and hash intact + ok 2 - keeps path, query and hash intact + --- + duration_ms: 0.023542 + type: 'test' + ... + # Subtest: normalises scheme and host case + ok 3 - normalises scheme and host case + --- + duration_ms: 0.024209 + type: 'test' + ... + # Subtest: rejects non-http schemes and malformed input + ok 4 - rejects non-http schemes and malformed input + --- + duration_ms: 0.039625 + type: 'test' + ... + 1..4 +ok 51 - safeUrl + --- + duration_ms: 0.185542 + type: 'suite' + ... +# Subtest: matchesFilter + # Subtest: shows everything for the default filter + ok 1 - shows everything for the default filter + --- + duration_ms: 0.061083 + type: 'test' + ... + # Subtest: mine compares the creator case-insensitively + ok 2 - mine compares the creator case-insensitively + --- + duration_ms: 0.032042 + type: 'test' + ... + # Subtest: backed requires a non-zero contribution + ok 3 - backed requires a non-zero contribution + --- + duration_ms: 0.031542 + type: 'test' + ... + # Subtest: review needs an open, unapproved milestone the user backed + ok 4 - review needs an open, unapproved milestone the user backed + --- + duration_ms: 0.04475 + type: 'test' + ... + 1..4 +ok 52 - matchesFilter + --- + duration_ms: 0.203167 + type: 'suite' + ... +# Subtest: errorMessage + # Subtest: maps code 4001 + ok 1 - maps code 4001 + --- + duration_ms: 0.1415 + type: 'test' + ... + # Subtest: maps ACTION_REJECTED + ok 2 - maps ACTION_REJECTED + --- + duration_ms: 0.021541 + type: 'test' + ... + # Subtest: maps nested 4001 + ok 3 - maps nested 4001 + --- + duration_ms: 0.017167 + type: 'test' + ... + # Subtest: maps insufficient funds + ok 4 - maps insufficient funds + --- + duration_ms: 0.016416 + type: 'test' + ... + # Subtest: maps unknown chain + ok 5 - maps unknown chain + --- + duration_ms: 0.016708 + type: 'test' + ... + # Subtest: maps nested unknown chain + ok 6 - maps nested unknown chain + --- + duration_ms: 0.016209 + type: 'test' + ... + # Subtest: maps network error + ok 7 - maps network error + --- + duration_ms: 0.016167 + type: 'test' + ... + # Subtest: maps server error + ok 8 - maps server error + --- + duration_ms: 0.029084 + type: 'test' + ... + # Subtest: maps timeout + ok 9 - maps timeout + --- + duration_ms: 0.018583 + type: 'test' + ... + # Subtest: maps reason wins + ok 10 - maps reason wins + --- + duration_ms: 0.02425 + type: 'test' + ... + # Subtest: maps shortMessage next + ok 11 - maps shortMessage next + --- + duration_ms: 0.021791 + type: 'test' + ... + # Subtest: maps nested message next + ok 12 - maps nested message next + --- + duration_ms: 0.021959 + type: 'test' + ... + # Subtest: maps plain message last + ok 13 - maps plain message last + --- + duration_ms: 0.055125 + type: 'test' + ... + # Subtest: falls back to a generic message + ok 14 - falls back to a generic message + --- + duration_ms: 0.028292 + type: 'test' + ... + # Subtest: survives an ethers-style nested rejection + ok 15 - survives an ethers-style nested rejection + --- + duration_ms: 0.037792 + type: 'test' + ... + 1..15 +ok 53 - errorMessage + --- + duration_ms: 0.583458 + type: 'suite' + ... +# Subtest: module defaults without Vite env + # Subtest: node never reads .env.local, so the module starts unconfigured + ok 1 - node never reads .env.local, so the module starts unconfigured + --- + duration_ms: 0.234333 + type: 'test' + ... + 1..1 +ok 54 - module defaults without Vite env + --- + duration_ms: 0.605667 + type: 'suite' + ... +# Subtest: resolveConfig + # Subtest: accepts a checksummed address unchanged + ok 1 - accepts a checksummed address unchanged + --- + duration_ms: 0.91225 + type: 'test' + ... + # Subtest: restores checksum casing when the address was rewritten + ok 2 - restores checksum casing when the address was rewritten + --- + duration_ms: 0.792875 + type: 'test' + ... + # Subtest: trims both inputs + ok 3 - trims both inputs + --- + duration_ms: 0.376417 + type: 'test' + ... + # Subtest: treats the zero address as not configured + ok 4 - treats the zero address as not configured + --- + duration_ms: 0.429334 + type: 'test' + ... + # Subtest: reports unusable input instead of silently passing it through + ok 5 - reports unusable input instead of silently passing it through + --- + duration_ms: 0.181625 + type: 'test' + ... + # Subtest: keeps an empty address free of errors + ok 6 - keeps an empty address free of errors + --- + duration_ms: 0.119167 + type: 'test' + ... + # Subtest: tolerates missing arguments + ok 7 - tolerates missing arguments + --- + duration_ms: 0.41425 + type: 'test' + ... + 1..7 +ok 55 - resolveConfig + --- + duration_ms: 3.431125 + type: 'suite' + ... +# Subtest: injectedWallet + # Subtest: returns null when no wallet is installed + ok 1 - returns null when no wallet is installed + --- + duration_ms: 0.121667 + type: 'test' + ... + # Subtest: ignores a wallet that is not MetaMask + ok 2 - ignores a wallet that is not MetaMask + --- + duration_ms: 0.181708 + type: 'test' + ... + # Subtest: finds MetaMask inside a multi-wallet group + ok 3 - finds MetaMask inside a multi-wallet group + --- + duration_ms: 0.053167 + type: 'test' + ... + # Subtest: returns null when a group has no MetaMask entry + ok 4 - returns null when a group has no MetaMask entry + --- + duration_ms: 0.033 + type: 'test' + ... + 1..4 +ok 56 - injectedWallet + --- + duration_ms: 0.513625 + type: 'suite' + ... +# Subtest: browserProvider + # Subtest: explains what to install when no wallet exists + ok 1 - explains what to install when no wallet exists + --- + duration_ms: 0.148792 + type: 'test' + ... + # Subtest: wraps the injected MetaMask provider + ok 2 - wraps the injected MetaMask provider + --- + duration_ms: 0.157292 + type: 'test' + ... + 1..2 +ok 57 - browserProvider + --- + duration_ms: 0.335541 + type: 'suite' + ... +# Subtest: readProvider + # Subtest: uses the configured RPC endpoint when present + ok 1 - uses the configured RPC endpoint when present + --- + duration_ms: 0.374667 + type: 'test' + ... + # Subtest: falls back to the wallet when no RPC endpoint is configured + ok 2 - falls back to the wallet when no RPC endpoint is configured + --- + duration_ms: 0.038334 + type: 'test' + ... + # Subtest: fails with the setup hint when there is neither RPC nor wallet + ok 3 - fails with the setup hint when there is neither RPC nor wallet + --- + duration_ms: 0.039208 + type: 'test' + ... + 1..3 +ok 58 - readProvider + --- + duration_ms: 0.519875 + type: 'suite' + ... +# Subtest: checkedContract + # Subtest: refuses to load an unconfigured contract + ok 1 - refuses to load an unconfigured contract + --- + duration_ms: 0.131792 + type: 'test' + ... + # Subtest: surfaces the invalid-address reason + ok 2 - surfaces the invalid-address reason + --- + duration_ms: 0.570792 + type: 'test' + ... + # Subtest: rejects a network other than Sepolia + ok 3 - rejects a network other than Sepolia + --- + duration_ms: 0.086417 + type: 'test' + ... + # Subtest: rejects an address with no deployed code + ok 4 - rejects an address with no deployed code + --- + duration_ms: 0.068209 + type: 'test' + ... + # Subtest: binds the contract to the configured address + ok 5 - binds the contract to the configured address + --- + duration_ms: 0.525292 + type: 'test' + ... + # Subtest: checks the address from the injected config, not the module constant + ok 6 - checks the address from the injected config, not the module constant + --- + duration_ms: 0.640833 + type: 'test' + ... + 1..6 +ok 59 - checkedContract + --- + duration_ms: 2.098084 + type: 'suite' + ... +# Subtest: readExpiredRefundAmount + # Subtest: reads the contract quote for the selected project and account at the snapshot block + ok 1 - reads the contract quote for the selected project and account at the snapshot block + --- + duration_ms: 0.115083 + type: 'test' + ... + # Subtest: handles older deployments whose quote selector returns no data + ok 2 - handles older deployments whose quote selector returns no data + --- + duration_ms: 0.083 + type: 'test' + ... + # Subtest: propagates RPC failures and contract reverts with a reason + ok 3 - propagates RPC failures and contract reverts with a reason + --- + duration_ms: 0.075708 + type: 'test' + ... + 1..3 +ok 60 - readExpiredRefundAmount + --- + duration_ms: 0.321833 + type: 'suite' + ... +# Subtest: readMilestoneWindow + # Subtest: decodes the deadline and open flag from the same block snapshot + ok 1 - decodes the deadline and open flag from the same block snapshot + --- + duration_ms: 2.024917 + type: 'test' + ... + # Subtest: returns null when an older deployment has no window getter + ok 2 - returns null when an older deployment has no window getter + --- + duration_ms: 0.733833 + type: 'test' + ... + 1..2 +ok 61 - readMilestoneWindow + --- + duration_ms: 2.796542 + type: 'suite' + ... +# Subtest: refundAmountFromReceipt + # Subtest: uses the refund log emitted by the configured contract + ok 1 - uses the refund log emitted by the configured contract + --- + duration_ms: 1.739542 + type: 'test' + ... + 1..1 +ok 62 - refundAmountFromReceipt + --- + duration_ms: 1.767 + type: 'suite' + ... +# Subtest: switchToSepolia + # Subtest: asks for the Sepolia chain id in hex + ok 1 - asks for the Sepolia chain id in hex + --- + duration_ms: 0.146334 + type: 'test' + ... + # Subtest: fails with the setup hint when no wallet exists + ok 2 - fails with the setup hint when no wallet exists + --- + duration_ms: 0.073834 + type: 'test' + ... + # Subtest: propagates the 4001 rejection from MetaMask + ok 3 - propagates the 4001 rejection from MetaMask + --- + duration_ms: 0.061041 + type: 'test' + ... + 1..3 +ok 63 - switchToSepolia + --- + duration_ms: 0.325042 + type: 'suite' + ... +# Subtest: transaction payloads + # Subtest: contribute takes only the project id, value travels as override + ok 1 - contribute takes only the project id, value travels as override + --- + duration_ms: 0.205875 + type: 'test' + ... + # Subtest: approveMilestone keeps the (projectId, milestoneIndex) order + ok 2 - approveMilestone keeps the (projectId, milestoneIndex) order + --- + duration_ms: 0.221708 + type: 'test' + ... + # Subtest: withdrawMilestone mirrors the approval order + ok 3 - withdrawMilestone mirrors the approval order + --- + duration_ms: 0.157584 + type: 'test' + ... + # Subtest: a rejected wallet request becomes the retry hint users see + ok 4 - a rejected wallet request becomes the retry hint users see + --- + duration_ms: 0.188166 + type: 'test' + ... + 1..4 +ok 64 - transaction payloads + --- + duration_ms: 0.829208 + type: 'suite' + ... +# Subtest: fake wallet advertises the chain ids the checks rely on +ok 65 - fake wallet advertises the chain ids the checks rely on + --- + duration_ms: 0.055 + type: 'test' + ... +1..65 +# tests 124 +# suites 21 +# pass 124 +# fail 0 +# cancelled 0 +# skipped 0 +# todo 0 +# duration_ms 4715.690875 diff --git a/docs/evidence/deployment/verification-2026-11-07-compiler-references-immutable.json b/docs/evidence/deployment/verification-2026-11-07-compiler-references-immutable.json new file mode 100644 index 0000000..cd43b94 --- /dev/null +++ b/docs/evidence/deployment/verification-2026-11-07-compiler-references-immutable.json @@ -0,0 +1,35 @@ +{ + "explanation": "Slots come from solc immutableReferences. Every executable byte outside those ranges matches, and all occurrences of each variable contain the same on-chain value. Values are observed from runtime, not independently recovered from the deployment transaction. Metadata equality is recorded separately.", + "metadataMatch": false, + "substitutedFullMatch": false, + "slots": [ + { + "variableId": "52", + "position": 1046, + "length": 32, + "onChainValue": "0x0000000000000000000000000000000000000000000000000000000000000258", + "decimalValue": "600" + }, + { + "variableId": "52", + "position": 9324, + "length": 32, + "onChainValue": "0x0000000000000000000000000000000000000000000000000000000000000258", + "decimalValue": "600" + }, + { + "variableId": "55", + "position": 994, + "length": 32, + "onChainValue": "0x0000000000000000000000000000000000000000000000000000000000000258", + "decimalValue": "600" + }, + { + "variableId": "55", + "position": 9431, + "length": 32, + "onChainValue": "0x0000000000000000000000000000000000000000000000000000000000000258", + "decimalValue": "600" + } + ] +} diff --git a/docs/evidence/deployment/verification-2026-11-07-compiler-references-metadata.json b/docs/evidence/deployment/verification-2026-11-07-compiler-references-metadata.json new file mode 100644 index 0000000..5127ab2 --- /dev/null +++ b/docs/evidence/deployment/verification-2026-11-07-compiler-references-metadata.json @@ -0,0 +1 @@ +{"compiler":{"version":"0.8.24+commit.e11b9ed9"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"uint256","name":"approvalTimeout","type":"uint256"},{"internalType":"uint256","name":"submissionTimeout","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"projectId","type":"uint256"},{"indexed":true,"internalType":"uint8","name":"milestone","type":"uint8"},{"indexed":true,"internalType":"address","name":"backer","type":"address"},{"indexed":false,"internalType":"uint256","name":"weight","type":"uint256"}],"name":"ApprovalCast","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"projectId","type":"uint256"},{"indexed":true,"internalType":"address","name":"backer","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ContributionReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"projectId","type":"uint256"},{"indexed":true,"internalType":"uint8","name":"milestone","type":"uint8"},{"indexed":false,"internalType":"string","name":"evidence","type":"string"},{"indexed":false,"internalType":"string","name":"evidenceUrl","type":"string"}],"name":"EvidenceSubmitted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"projectId","type":"uint256"},{"indexed":true,"internalType":"address","name":"backer","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ExcessRefunded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"projectId","type":"uint256"}],"name":"FundingFailed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"projectId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalRaised","type":"uint256"}],"name":"FundingSuccessful","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"projectId","type":"uint256"},{"indexed":true,"internalType":"uint8","name":"milestone","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"FundsWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"projectId","type":"uint256"},{"indexed":true,"internalType":"uint8","name":"milestone","type":"uint8"}],"name":"MilestoneApproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"projectId","type":"uint256"},{"indexed":true,"internalType":"uint8","name":"milestone","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MilestoneReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"projectId","type":"uint256"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PayoutClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"projectId","type":"uint256"}],"name":"ProjectCompleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"projectId","type":"uint256"},{"indexed":true,"internalType":"address","name":"creator","type":"address"},{"indexed":false,"internalType":"uint256","name":"target","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"ProjectCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"projectId","type":"uint256"}],"name":"ProjectExpired","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"projectId","type":"uint256"},{"indexed":true,"internalType":"address","name":"backer","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RefundClaimed","type":"event"},{"inputs":[],"name":"APPROVAL_TIMEOUT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SUBMISSION_TIMEOUT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"projectId","type":"uint256"},{"internalType":"uint8","name":"milestone","type":"uint8"}],"name":"approveMilestone","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"projectId","type":"uint256"}],"name":"claimExpiredRefund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"projectId","type":"uint256"},{"internalType":"address payable","name":"recipient","type":"address"}],"name":"claimPayout","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"projectId","type":"uint256"}],"name":"claimRefund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimablePayouts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"projectId","type":"uint256"}],"name":"contribute","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"contributions","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"uint256","name":"target","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"string","name":"firstGoal","type":"string"},{"internalType":"string","name":"secondGoal","type":"string"}],"name":"createProject","outputs":[{"internalType":"uint256","name":"projectId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"projectId","type":"uint256"}],"name":"finalizeFunding","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"projectId","type":"uint256"},{"internalType":"address","name":"backer","type":"address"}],"name":"getExpiredRefundAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"projectId","type":"uint256"},{"internalType":"uint8","name":"milestone","type":"uint8"}],"name":"getMilestone","outputs":[{"components":[{"internalType":"string","name":"goal","type":"string"},{"internalType":"string","name":"evidence","type":"string"},{"internalType":"string","name":"evidenceUrl","type":"string"},{"internalType":"uint256","name":"approvalWeight","type":"uint256"},{"internalType":"uint256","name":"withdrawnAmount","type":"uint256"},{"internalType":"uint256","name":"submittedAt","type":"uint256"},{"internalType":"bool","name":"submitted","type":"bool"},{"internalType":"bool","name":"approved","type":"bool"},{"internalType":"bool","name":"withdrawn","type":"bool"}],"internalType":"struct MilestoneFund.Milestone","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"projectId","type":"uint256"}],"name":"getMilestoneWindow","outputs":[{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bool","name":"open","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"projectId","type":"uint256"}],"name":"getProject","outputs":[{"components":[{"internalType":"address payable","name":"creator","type":"address"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"uint256","name":"target","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"totalRaised","type":"uint256"},{"internalType":"uint256","name":"escrowBalance","type":"uint256"},{"internalType":"enum MilestoneFund.ProjectStatus","name":"status","type":"uint8"},{"internalType":"uint8","name":"currentMilestone","type":"uint8"},{"internalType":"uint256","name":"successfulAt","type":"uint256"}],"internalType":"struct MilestoneFund.Project","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint8","name":"","type":"uint8"},{"internalType":"address","name":"","type":"address"}],"name":"hasApproved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"projectCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"refunded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"projectId","type":"uint256"},{"internalType":"uint8","name":"milestone","type":"uint8"}],"name":"releaseMilestone","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"projectId","type":"uint256"},{"internalType":"uint8","name":"milestone","type":"uint8"},{"internalType":"string","name":"evidence","type":"string"},{"internalType":"string","name":"evidenceUrl","type":"string"}],"name":"submitEvidence","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"projectId","type":"uint256"},{"internalType":"uint8","name":"milestone","type":"uint8"}],"name":"withdrawMilestone","outputs":[],"stateMutability":"nonpayable","type":"function"}],"devdoc":{"kind":"dev","methods":{"constructor":{"params":{"approvalTimeout":"seconds backers have to approve submitted evidence","submissionTimeout":"seconds the creator has to submit evidence"}},"getMilestoneWindow(uint256)":{"details":"A zero deadline means there is no pending submission or approval."}},"stateVariables":{"APPROVAL_TIMEOUT":{"details":"Fixed at deployment and immutable afterwards, so the rules cannot be changed later by anyone. A short value is useful for demos."}},"title":"MilestoneFund Lite - two-stage, contribution-weighted crowdfunding.","version":1},"userdoc":{"kind":"user","methods":{"APPROVAL_TIMEOUT()":{"notice":"How long backers have to approve after evidence is submitted."},"SUBMISSION_TIMEOUT()":{"notice":"How long the creator has to submit evidence after each milestone opens."},"claimExpiredRefund(uint256)":{"notice":"Reclaim a share of the remaining escrow when the current milestone times out: either backers did not approve submitted evidence, or the creator never submitted it. Each share uses the same pool, frozen before the first refund."},"claimPayout(uint256,address)":{"notice":"The creator can collect the project's released payouts at a chosen address."},"contribute(uint256)":{"notice":"Contributions are capped at the target. Anything above the remaining amount is returned in the same transaction, so totalRaised never exceeds target."},"finalizeFunding(uint256)":{"notice":"Anyone may explicitly finalize an expired, unsuccessful campaign."},"getExpiredRefundAmount(uint256,address)":{"notice":"Returns the claimable expiry refund in wei, or zero if none is available."},"getMilestoneWindow(uint256)":{"notice":"The current submission or approval deadline and whether the window is open."},"releaseMilestone(uint256,uint8)":{"notice":"Advance an approved milestone and credit its payout without sending ETH."},"withdrawMilestone(uint256,uint8)":{"notice":"Release and pay an approved milestone to the creator in one transaction."}},"notice":"Educational prototype. No owner, admin withdrawal, or fee. Anyone can release an approved milestone. Only the creator can claim the released payout.","version":1}},"settings":{"compilationTarget":{"MilestoneFund.sol":"MilestoneFund"},"evmVersion":"paris","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":true,"runs":200},"remappings":[]},"sources":{"MilestoneFund.sol":{"keccak256":"0xe674b7b118b15b74d5f74355d1e7be0c7fd19aed379bc20c38ddfd296267c5d9","license":"MIT","urls":["bzz-raw://9d78fa41b2061ba97cdc0ebe21fffa0cbbe1a993a6cef3318e6b425815a77ca2","dweb:/ipfs/QmcH2m1Hsk2f4swkqcAPW328VvhFaiNTZSpSsofjsTa6Sn"]}},"version":1} diff --git a/docs/evidence/deployment/verification-2026-11-07-compiler-references-runtime.hex b/docs/evidence/deployment/verification-2026-11-07-compiler-references-runtime.hex new file mode 100644 index 0000000..657c28f --- /dev/null +++ b/docs/evidence/deployment/verification-2026-11-07-compiler-references-runtime.hex @@ -0,0 +1 @@ +0x60806040526004361061012a5760003560e01c8063935e1282116100ab578063c1cbbca71161006f578063c1cbbca714610390578063f0f3f2c8146103a3578063f247a4d0146103d0578063f368342814610404578063f8a75a6614610438578063fb0f05b71461047957600080fd5b8063935e1282146102f05780639a4f2f5e14610310578063b0110cc614610330578063b7c5923314610350578063bcfcc8d51461037057600080fd5b80634f1ff459116100f25780634f1ff459146102185780635b7baf641461026357806380436b58146102835780638182254b146102b05780638e7f5ee5146102d057600080fd5b8063056da8df1461012f5780630d23e080146101655780630d76e7301461018757806336fbad26146101bc5780633d891f59146101e0575b600080fd5b34801561013b57600080fd5b5061014f61014a3660046128b0565b610499565b60405161015c9190612922565b60405180910390f35b34801561017157600080fd5b506101856101803660046128b0565b6107a4565b005b34801561019357600080fd5b506101a76101a23660046129d9565b6108c0565b6040805192835290151560208301520161015c565b3480156101c857600080fd5b506101d260005481565b60405190815260200161015c565b3480156101ec57600080fd5b506101d26101fb366004612a0a565b600360209081526000928352604080842090915290825290205481565b34801561022457600080fd5b50610253610233366004612a0a565b600560209081526000928352604080842090915290825290205460ff1681565b604051901515815260200161015c565b34801561026f57600080fd5b5061018561027e3660046129d9565b6109be565b34801561028f57600080fd5b506101d261029e3660046129d9565b60096020526000908152604090205481565b3480156102bc57600080fd5b506101856102cb366004612a83565b610bf1565b3480156102dc57600080fd5b506101856102eb3660046128b0565b610eca565b3480156102fc57600080fd5b506101d261030b366004612b0d565b610ff1565b34801561031c57600080fd5b506101d261032b366004612a0a565b611402565b34801561033c57600080fd5b5061018561034b366004612a0a565b611462565b34801561035c57600080fd5b5061018561036b3660046128b0565b6115f9565b34801561037c57600080fd5b5061018561038b3660046129d9565b61192d565b61018561039e3660046129d9565b611b76565b3480156103af57600080fd5b506103c36103be3660046129d9565b611f36565b60405161015c9190612c1f565b3480156103dc57600080fd5b506101d27f000000000000000000000000000000000000000000000000000000000000025881565b34801561041057600080fd5b506101d27f000000000000000000000000000000000000000000000000000000000000025881565b34801561044457600080fd5b50610253610453366004612cda565b600460209081526000938452604080852082529284528284209052825290205460ff1681565b34801561048557600080fd5b506101856104943660046129d9565b61212f565b6104ee6040518061012001604052806060815260200160608152602001606081526020016000815260200160008152602001600081526020016000151581526020016000151581526020016000151581525090565b8260005481106105195760405162461bcd60e51b815260040161051090612d1a565b60405180910390fd5b60028360ff16106105605760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964206d696c6573746f6e6560781b6044820152606401610510565b600260008581526020019081526020016000208360ff166002811061058757610587612d43565b60070201604051806101200160405290816000820180546105a790612d59565b80601f01602080910402602001604051908101604052809291908181526020018280546105d390612d59565b80156106205780601f106105f557610100808354040283529160200191610620565b820191906000526020600020905b81548152906001019060200180831161060357829003601f168201915b5050505050815260200160018201805461063990612d59565b80601f016020809104026020016040519081016040528092919081815260200182805461066590612d59565b80156106b25780601f10610687576101008083540402835291602001916106b2565b820191906000526020600020905b81548152906001019060200180831161069557829003601f168201915b505050505081526020016002820180546106cb90612d59565b80601f01602080910402602001604051908101604052809291908181526020018280546106f790612d59565b80156107445780601f1061071957610100808354040283529160200191610744565b820191906000526020600020905b81548152906001019060200180831161072757829003601f168201915b505050918352505060038201546020820152600482015460408201526005820154606082015260069091015460ff8082161515608084015261010082048116151560a08401526201000090910416151560c09091015291505b5092915050565b8160005481106107c65760405162461bcd60e51b815260040161051090612d1a565b60065460ff16156107e95760405162461bcd60e51b815260040161051090612d8d565b6006805460ff191660019081179091556000848152602091909152604081206108159085908590612241565b90508060096000868152602001908152602001600020600082825461083a9190612dcb565b909155505060405181815260ff84169085907fb5e7231814419e5a5e888606251cb3b5325a5339501a127b8f728e49a0d866609060200160405180910390a38260ff166001036108b05760405184907f60d8df137e489b6216738e436244ca4700bd6d0c8371d3c8d9c80b54538111b990600090a25b50506006805460ff191690555050565b6000808260005481106108e55760405162461bcd60e51b815260040161051090612d1a565b600084815260016020819052604090912090600782015460ff16600481111561091057610910612be7565b1415801561093757506004600782015460ff16600481111561093457610934612be7565b14155b156109495760008093509350506109b8565b600085815260026020819052604082206007840154909161010090910460ff1690811061097857610978612d43565b6007020190508060060160019054906101000a900460ff16156109a3576000809450945050506109b8565b6109ae86838361245a565b9450844210935050505b50915091565b8060005481106109e05760405162461bcd60e51b815260040161051090612d1a565b60065460ff1615610a035760405162461bcd60e51b815260040161051090612d8d565b6006805460ff191660019081179091556000838152602091909152604090206002600782015460ff166004811115610a3d57610a3d612be7565b14610a7f5760405162461bcd60e51b8152602060048201526012602482015271141c9bda9958dd081b9bdd0819985a5b195960721b6044820152606401610510565b60008381526003602090815260408083203384529091529020548015801590610ac25750600084815260056020908152604080832033845290915290205460ff16155b610b045760405162461bcd60e51b81526020600482015260136024820152724e6f20726566756e6420617661696c61626c6560681b6044820152606401610510565b60008481526005602090815260408083203384529091528120805460ff19166001179055600683018054839290610b3c908490612dde565b9091555050604051818152339085907ff3f402280ef0a7905e124aa621b65eaeb2725c343e8b36d398ed78c29daf285c9060200160405180910390a3604051600090339083908381818185875af1925050503d8060008114610bba576040519150601f19603f3d011682016040523d82523d6000602084013e610bbf565b606091505b5050905080610be05760405162461bcd60e51b815260040161051090612df1565b50506006805460ff19169055505050565b856000548110610c135760405162461bcd60e51b815260040161051090612d1a565b600087815260016020526040902080546001600160a01b03163314610c4a5760405162461bcd60e51b815260040161051090612e1e565b6001600782015460ff166004811115610c6557610c65612be7565b14610c825760405162461bcd60e51b815260040161051090612e44565b60028760ff16108015610ca35750600781015460ff88811661010090920416145b610cbf5760405162461bcd60e51b815260040161051090612e74565b600088815260026020819052604082209060ff8a16908110610ce357610ce3612d43565b6007020190508060060160009054906101000a900460ff1615610d485760405162461bcd60e51b815260206004820152601a60248201527f45766964656e636520616c7265616479207375626d69747465640000000000006044820152606401610510565b610d5389838361245a565b4210610da15760405162461bcd60e51b815260206004820152601860248201527f5375626d697373696f6e2077696e646f7720636c6f73656400000000000000006044820152606401610510565b8515801590610db25750610fa08611155b610df15760405162461bcd60e51b815260206004820152601060248201526f496e76616c69642065766964656e636560801b6044820152606401610510565b8315801590610e0257506103e88411155b610e455760405162461bcd60e51b8152602060048201526014602482015273125b9d985b1a5908195d9a59195b98d94815549360621b6044820152606401610510565b60018101610e54878983612efb565b5060028101610e64858783612efb565b5060068101805460ff1916600117905542600582015560405160ff8916908a907f3d01ce186fd86a00dbb015b5eba62a161d6d725ca1d4fb525edb2c9e47b604b690610eb7908b908b908b908b90612fe5565b60405180910390a3505050505050505050565b816000548110610eec5760405162461bcd60e51b815260040161051090612d1a565b60065460ff1615610f0f5760405162461bcd60e51b815260040161051090612d8d565b60068054600160ff19909116811790915560008481526020919091526040902080546001600160a01b03163314610f585760405162461bcd60e51b815260040161051090612e1e565b6000610f65858584612241565b90508360ff16857f3e36457ef724bfc3f3e805fdc22d7f5feff6f8b7d4c9fa6f3665ce6c78bd584d83604051610f9d91815260200190565b60405180910390a38360ff16600103610fdc5760405185907f60d8df137e489b6216738e436244ca4700bd6d0c8371d3c8d9c80b54538111b990600090a25b8154610be0906001600160a01b031682612507565b60008915801590611003575060788a11155b61103e5760405162461bcd60e51b815260206004820152600c60248201526b496e76616c6964206e616d6560a01b6044820152606401610510565b871580159061104f5750610fa08811155b6110915760405162461bcd60e51b815260206004820152601360248201527224b73b30b634b2103232b9b1b934b83a34b7b760691b6044820152606401610510565b83158015906110a257506107d08411155b6110e35760405162461bcd60e51b8152602060048201526012602482015271125b9d985b1a5908199a5c9cdd0819dbd85b60721b6044820152606401610510565b81158015906110f457506107d08211155b6111365760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081cd958dbdb990819dbd85b606a1b6044820152606401610510565b600087116111865760405162461bcd60e51b815260206004820152601760248201527f546172676574206d75737420626520706f7369746976650000000000000000006044820152606401610510565b4286116111d55760405162461bcd60e51b815260206004820152601760248201527f446561646c696e65206d757374206265206675747572650000000000000000006044820152606401610510565b6000805490806111e483613017565b919050559050604051806101400160405280336001600160a01b031681526020018c8c8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250604080516020601f8d018190048102820181019092528b815291810191908c908c90819084018382808284376000920182905250938552505050602082018a905260408201899052606082018190526080820181905260a0909101908152600060208083018290526040928301829052848252600180825292909120835181546001600160a01b0319166001600160a01b039091161781559083015190918201906112e99082613030565b50604082015160028201906112fe9082613030565b50606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e08201518160070160006101000a81548160ff0219169083600481111561135157611351612be7565b02179055506101008281015160078301805461ff00191660ff909216909202179055610120909101516008909101556000818152600260205260409020611399858783612efb565b5060008181526002602052604090206007016113b6838583612efb565b506040805188815260208101889052339183917fb5d890eb2df709d2f732ed81f328b444e49c1618ed8d64c53c0a040ec4040e1e910160405180910390a39a9950505050505050505050565b60008260005481106114265760405162461bcd60e51b815260040161051090612d1a565b600084815260016020526040902061143e858261258b565b511561144e57600092505061079d565b61145985828661277d565b95945050505050565b8160005481106114845760405162461bcd60e51b815260040161051090612d1a565b60065460ff16156114a75760405162461bcd60e51b815260040161051090612d8d565b60068054600160ff199091168117909155600084815260209190915260409020546001600160a01b031633146114ef5760405162461bcd60e51b815260040161051090612e1e565b6001600160a01b0382166115455760405162461bcd60e51b815260206004820152601860248201527f496e76616c6964207061796f757420726563697069656e7400000000000000006044820152606401610510565b600083815260096020526040902054806115975760405162461bcd60e51b81526020600482015260136024820152724e6f207061796f757420617661696c61626c6560681b6044820152606401610510565b60008481526009602052604080822091909155516001600160a01b0384169085907fe97cee5a4c0549d3fdc81e322b718ddf0aeb3418ec87dce4f9a7fb28d117c312906115e79085815260200190565b60405180910390a36108b08382612507565b81600054811061161b5760405162461bcd60e51b815260040161051090612d1a565b600083815260016020819052604090912090600782015460ff16600481111561164657611646612be7565b146116635760405162461bcd60e51b815260040161051090612e44565b60028360ff161080156116845750600781015460ff84811661010090920416145b6116a05760405162461bcd60e51b815260040161051090612e74565b600084815260026020819052604082209060ff86169081106116c4576116c4612d43565b6007020190508060060160009054906101000a900460ff1680156116f257506006810154610100900460ff16155b6117325760405162461bcd60e51b815260206004820152601160248201527020b8383937bb30b6103737ba1037b832b760791b6044820152606401610510565b61173d85838361245a565b42106117845760405162461bcd60e51b8152602060048201526016602482015275105c1c1c9bdd985b081dda5b991bddc818db1bdcd95960521b6044820152606401610510565b6000858152600360209081526040808320338452909152902054806117da5760405162461bcd60e51b815260206004820152600c60248201526b4261636b657273206f6e6c7960a01b6044820152606401610510565b600086815260046020908152604080832060ff808a1685529083528184203385529092529091205416156118435760405162461bcd60e51b815260206004820152601060248201526f105b1c9958591e48185c1c1c9bdd995960821b6044820152606401610510565b600086815260046020908152604080832060ff8916845282528083203384529091528120805460ff19166001179055600383018054839290611886908490612dcb565b9091555050604051818152339060ff87169088907f094d71d4c000f8dd4cca693b241ce997610658e9df2713658824c0856472570d9060200160405180910390a4600283600501546118d89190613106565b826003015411156119255760068201805461ff00191661010017905560405160ff86169087907f5bd776d6cd4ec262a0d9b560dc43fcd23bbf8162933a60acf2b23e2aed2a7e4c90600090a35b505050505050565b80600054811061194f5760405162461bcd60e51b815260040161051090612d1a565b60065460ff16156119725760405162461bcd60e51b815260040161051090612d8d565b6006805460ff191660019081179091556000838152602091909152604081209061199c848361258b565b9050805160001481906119c25760405162461bcd60e51b8152600401610510919061311a565b5060006119d085843361277d565b905060008111611a185760405162461bcd60e51b81526020600482015260136024820152724e6f20726566756e6420617661696c61626c6560681b6044820152606401610510565b60008581526005602090815260408083203384529091529020805460ff19166001908117909155600784015460ff166004811115611a5857611a58612be7565b03611aac5760068301546000868152600760208190526040808320939093558501805460ff19166004179055905186917f1f58ad83ebbdef78bee5008c6a1261e64e23cadeaaa65721484c309a31b3dd4191a25b80836006016000828254611ac09190612dde565b9091555050604051818152339086907ff3f402280ef0a7905e124aa621b65eaeb2725c343e8b36d398ed78c29daf285c9060200160405180910390a3604051600090339083908381818185875af1925050503d8060008114611b3e576040519150601f19603f3d011682016040523d82523d6000602084013e611b43565b606091505b5050905080611b645760405162461bcd60e51b815260040161051090612df1565b50506006805460ff1916905550505050565b806000548110611b985760405162461bcd60e51b815260040161051090612d1a565b60065460ff1615611bbb5760405162461bcd60e51b815260040161051090612d8d565b6006805460ff1916600190811790915560008381526020919091526040812090600782015460ff166004811115611bf457611bf4612be7565b14611c325760405162461bcd60e51b815260206004820152600e60248201526d119d5b991a5b99c818db1bdcd95960921b6044820152606401610510565b80600401544210611c785760405162461bcd60e51b815260206004820152601060248201526f111958591b1a5b99481c995858da195960821b6044820152606401610510565b80546001600160a01b03163303611cd15760405162461bcd60e51b815260206004820152601960248201527f43726561746f722063616e6e6f7420636f6e74726962757465000000000000006044820152606401610510565b60003411611d215760405162461bcd60e51b815260206004820152601d60248201527f436f6e747269627574696f6e206d75737420626520706f7369746976650000006044820152606401610510565b600081600501548260030154611d379190612dde565b90506000813411611d485734611d4a565b815b90506000611d588234612dde565b6000878152600360209081526040808320338452909152812080549293508492909190611d86908490612dcb565b9250508190555081846005016000828254611da19190612dcb565b9250508190555081846006016000828254611dbc9190612dcb565b9091555050604051828152339087907f865c884d49c8cecaef108efb20f7d282f26c0f9b0d24dd48e5592d4e02ec658d9060200160405180910390a38015611ec657604051600090339083908381818185875af1925050503d8060008114611e40576040519150601f19603f3d011682016040523d82523d6000602084013e611e45565b606091505b5050905080611e8d5760405162461bcd60e51b8152602060048201526014602482015273115e18d95cdcc81c99599d5b990819985a5b195960621b6044820152606401610510565b604051828152339088907fe26b2dba2478a5741141a6da49466d62b0e4062c650f68f797052123302d0ea09060200160405180910390a3505b8360030154846005015403611b645742600885015560078401805460ff19166001179055600584015460405190815286907f88bfb1cb787b5a4eccce541cbd9b445a7b77c97dad63984f8db4478be569e1b69060200160405180910390a250506006805460ff1916905550505050565b611f3e61282d565b816000548110611f605760405162461bcd60e51b815260040161051090612d1a565b6000838152600160208181526040928390208351610140810190945280546001600160a01b03168452918201805491840191611f9b90612d59565b80601f0160208091040260200160405190810160405280929190818152602001828054611fc790612d59565b80156120145780601f10611fe957610100808354040283529160200191612014565b820191906000526020600020905b815481529060010190602001808311611ff757829003601f168201915b5050505050815260200160028201805461202d90612d59565b80601f016020809104026020016040519081016040528092919081815260200182805461205990612d59565b80156120a65780601f1061207b576101008083540402835291602001916120a6565b820191906000526020600020905b81548152906001019060200180831161208957829003601f168201915b50505091835250506003820154602082015260048083015460408301526005830154606083015260068301546080830152600783015460a09092019160ff16908111156120f5576120f5612be7565b600481111561210657612106612be7565b81526007820154610100900460ff16602082015260089091015460409091015291505b50919050565b8060005481106121515760405162461bcd60e51b815260040161051090612d1a565b600082815260016020526040812090600782015460ff16600481111561217957612179612be7565b146121b75760405162461bcd60e51b815260206004820152600e60248201526d119d5b991a5b99c818db1bdcd95960921b6044820152606401610510565b80600401544210156122025760405162461bcd60e51b8152602060048201526014602482015273111958591b1a5b99481b9bdd081c995858da195960621b6044820152606401610510565b60078101805460ff1916600217905560405183907fe9981212ab524b2711193a45899a72ea24566f65d0953cd9f50c0d7943401c8290600090a2505050565b60006001600783015460ff16600481111561225e5761225e612be7565b1461227b5760405162461bcd60e51b815260040161051090612e44565b60028360ff1610801561229c5750600782015460ff84811661010090920416145b6122b85760405162461bcd60e51b815260040161051090612e74565b600084815260026020819052604082209060ff86169081106122dc576122dc612d43565b6007020190508060060160019054906101000a900460ff16801561230b5750600681015462010000900460ff16155b6123575760405162461bcd60e51b815260206004820152601a60248201527f4d696c6573746f6e65206e6f7420776974686472617761626c650000000000006044820152606401610510565b60ff84161561236a5782600601546123b7565b600580846005015461237c919061312d565b612387906002613141565b6123919190613106565b600584600501546123a29190613106565b6123ad906002613141565b6123b79190612dcb565b6006808301805462ff0000191662010000179055600483018290558401805491935083916000906123e9908490612dde565b9091555050600783018054610100900460ff1690600161240883613158565b91906101000a81548160ff021916908360ff160217905550508360ff16600003612442576000858152600860205260409020429055612452565b60078301805460ff191660031790555b509392505050565b600681015460009060ff16156124a1577f0000000000000000000000000000000000000000000000000000000000000258826005015461249a9190612dcb565b9050612500565b6007830154600090610100900460ff16156124ca576000858152600860205260409020546124d0565b83600801545b90506124fc7f000000000000000000000000000000000000000000000000000000000000025882612dcb565b9150505b9392505050565b80600003612513575050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612560576040519150601f19603f3d011682016040523d82523d6000602084013e612565565b606091505b50509050806125865760405162461bcd60e51b815260040161051090612df1565b505050565b60606001600783015460ff1660048111156125a8576125a8612be7565b141580156125cf57506004600783015460ff1660048111156125cc576125cc612be7565b14155b15612603575060408051808201909152601281527150726f6a656374206e6f742061637469766560701b6020820152612777565b6007820154600261010090910460ff16106126465750604080518082019091526011815270141c9bda9958dd0818dbdb5c1b195d1959607a1b6020820152612777565b600083815260026020819052604082206007850154909161010090910460ff1690811061267557612675612d43565b6007020190508060060160019054906101000a900460ff16156126cd57505060408051808201909152601a81527f4d696c6573746f6e6520616c726561647920617070726f7665640000000000006020820152612777565b6126d884848361245a565b42101561276557600681015460ff16612726576040518060400160405280601c81526020017f5375626d697373696f6e2077696e646f77207374696c6c206f70656e0000000081525061275d565b6040518060400160405280601a81526020017f417070726f76616c2077696e646f77207374696c6c206f70656e0000000000008152505b915050612777565b50506040805160208101909152600081525b92915050565b60008381526005602090815260408083206001600160a01b038516845290915281205460ff16156127b057506000612500565b60006004600785015460ff1660048111156127cd576127cd612be7565b146127dc5783600601546127ec565b6000858152600760205260409020545b600585015460008781526003602090815260408083206001600160a01b038916845290915290205491925090612823908390613141565b6124fc9190613106565b60405180610140016040528060006001600160a01b031681526020016060815260200160608152602001600081526020016000815260200160008152602001600081526020016000600481111561288657612886612be7565b815260006020820181905260409091015290565b803560ff811681146128ab57600080fd5b919050565b600080604083850312156128c357600080fd5b823591506128d36020840161289a565b90509250929050565b6000815180845260005b81811015612902576020818501810151868301820152016128e6565b506000602082860101526020601f19601f83011685010191505092915050565b60208152600082516101208060208501526129416101408501836128dc565b91506020850151601f198086850301604087015261295f84836128dc565b935060408701519150808685030160608701525061297d83826128dc565b92505060608501516080850152608085015160a085015260a085015160c085015260c08501516129b160e086018215159052565b5060e08501516101006129c78187018315159052565b90950151151593019290925250919050565b6000602082840312156129eb57600080fd5b5035919050565b6001600160a01b0381168114612a0757600080fd5b50565b60008060408385031215612a1d57600080fd5b823591506020830135612a2f816129f2565b809150509250929050565b60008083601f840112612a4c57600080fd5b50813567ffffffffffffffff811115612a6457600080fd5b602083019150836020828501011115612a7c57600080fd5b9250929050565b60008060008060008060808789031215612a9c57600080fd5b86359550612aac6020880161289a565b9450604087013567ffffffffffffffff80821115612ac957600080fd5b612ad58a838b01612a3a565b90965094506060890135915080821115612aee57600080fd5b50612afb89828a01612a3a565b979a9699509497509295939492505050565b60008060008060008060008060008060c08b8d031215612b2c57600080fd5b8a3567ffffffffffffffff80821115612b4457600080fd5b612b508e838f01612a3a565b909c509a5060208d0135915080821115612b6957600080fd5b612b758e838f01612a3a565b909a50985060408d0135975060608d0135965060808d0135915080821115612b9c57600080fd5b612ba88e838f01612a3a565b909650945060a08d0135915080821115612bc157600080fd5b50612bce8d828e01612a3a565b915080935050809150509295989b9194979a5092959850565b634e487b7160e01b600052602160045260246000fd5b60058110612c1b57634e487b7160e01b600052602160045260246000fd5b9052565b60208152612c396020820183516001600160a01b03169052565b60006020830151610140806040850152612c576101608501836128dc565b91506040850151601f19858403016060860152612c7483826128dc565b92505060608501516080850152608085015160a085015260a085015160c085015260c085015160e085015260e0850151610100612cb381870183612bfd565b8601519050610120612cc98682018360ff169052565b959095015193019290925250919050565b600080600060608486031215612cef57600080fd5b83359250612cff6020850161289a565b91506040840135612d0f816129f2565b809150509250925092565b6020808252600f908201526e155b9adb9bdddb881c1c9bda9958dd608a1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600181811c90821680612d6d57607f821691505b60208210810361212957634e487b7160e01b600052602260045260246000fd5b6020808252600e908201526d1499595b9d1c985b9d0818d85b1b60921b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561277757612777612db5565b8181038181111561277757612777612db5565b602080825260139082015272115512081d1c985b9cd9995c8819985a5b1959606a1b604082015260600190565b6020808252600c908201526b43726561746f72206f6e6c7960a01b604082015260600190565b602080825260169082015275141c9bda9958dd081b9bdd081cdd58d8d95cdcd99d5b60521b604082015260600190565b6020808252600f908201526e57726f6e67206d696c6573746f6e6560881b604082015260600190565b634e487b7160e01b600052604160045260246000fd5b601f821115612586576000816000526020600020601f850160051c81016020861015612edc5750805b601f850160051c820191505b8181101561192557828155600101612ee8565b67ffffffffffffffff831115612f1357612f13612e9d565b612f2783612f218354612d59565b83612eb3565b6000601f841160018114612f5b5760008515612f435750838201355b600019600387901b1c1916600186901b178355612fb5565b600083815260209020601f19861690835b82811015612f8c5786850135825560209485019460019092019101612f6c565b5086821015612fa95760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b604081526000612ff9604083018688612fbc565b828103602084015261300c818587612fbc565b979650505050505050565b60006001820161302957613029612db5565b5060010190565b815167ffffffffffffffff81111561304a5761304a612e9d565b61305e816130588454612d59565b84612eb3565b602080601f831160018114613093576000841561307b5750858301515b600019600386901b1c1916600185901b178555611925565b600085815260208120601f198616915b828110156130c2578886015182559484019460019091019084016130a3565b50858210156130e05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601260045260246000fd5b600082613115576131156130f0565b500490565b60208152600061250060208301846128dc565b60008261313c5761313c6130f0565b500690565b808202811582820484141761277757612777612db5565b600060ff821660ff810361316e5761316e612db5565b6001019291505056fea264697066735822122014fe20bce634f36b1e01e2cf5402852675e2c8e6113f1744d954baa6a4c04f0864736f6c63430008180033 diff --git a/docs/evidence/deployment/verification-2026-11-07-compiler-references-standard-input.json b/docs/evidence/deployment/verification-2026-11-07-compiler-references-standard-input.json new file mode 100644 index 0000000..83a21c5 --- /dev/null +++ b/docs/evidence/deployment/verification-2026-11-07-compiler-references-standard-input.json @@ -0,0 +1,25 @@ +{ + "language": "Solidity", + "sources": { + "MilestoneFund.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\n/// @title MilestoneFund Lite - two-stage, contribution-weighted crowdfunding.\n/// @notice Educational prototype. No owner, admin withdrawal, or fee. Anyone can\n/// release an approved milestone. Only the creator can claim the released payout.\ncontract MilestoneFund {\n enum ProjectStatus { Funding, Successful, Failed, Completed, Expired }\n\n struct Project {\n address payable creator;\n string name;\n string description;\n uint256 target;\n uint256 deadline;\n uint256 totalRaised;\n uint256 escrowBalance;\n ProjectStatus status;\n uint8 currentMilestone;\n uint256 successfulAt;\n }\n\n struct Milestone {\n string goal;\n string evidence;\n string evidenceUrl;\n uint256 approvalWeight;\n // The amount released from escrow, including funds credited for later claim.\n uint256 withdrawnAmount;\n uint256 submittedAt;\n bool submitted;\n bool approved;\n bool withdrawn;\n }\n\n /// @notice How long backers have to approve after evidence is submitted.\n /// @dev Fixed at deployment and immutable afterwards, so the rules cannot be\n /// changed later by anyone. A short value is useful for demos.\n uint256 public immutable APPROVAL_TIMEOUT;\n /// @notice How long the creator has to submit evidence after each milestone opens.\n uint256 public immutable SUBMISSION_TIMEOUT;\n\n uint256 public projectCount;\n mapping(uint256 => Project) private projects;\n mapping(uint256 => Milestone[2]) private milestones;\n mapping(uint256 => mapping(address => uint256)) public contributions;\n mapping(uint256 => mapping(uint8 => mapping(address => bool))) public hasApproved;\n mapping(uint256 => mapping(address => bool)) public refunded;\n bool private entered;\n mapping(uint256 => uint256) private expiredRefundPools;\n mapping(uint256 => uint256) private secondMilestoneOpenedAt;\n mapping(uint256 => uint256) public claimablePayouts;\n\n event ProjectCreated(uint256 indexed projectId, address indexed creator, uint256 target, uint256 deadline);\n event ContributionReceived(uint256 indexed projectId, address indexed backer, uint256 amount);\n event FundingSuccessful(uint256 indexed projectId, uint256 totalRaised);\n event FundingFailed(uint256 indexed projectId);\n event EvidenceSubmitted(uint256 indexed projectId, uint8 indexed milestone, string evidence, string evidenceUrl);\n event ApprovalCast(uint256 indexed projectId, uint8 indexed milestone, address indexed backer, uint256 weight);\n event MilestoneApproved(uint256 indexed projectId, uint8 indexed milestone);\n event MilestoneReleased(uint256 indexed projectId, uint8 indexed milestone, uint256 amount);\n event FundsWithdrawn(uint256 indexed projectId, uint8 indexed milestone, uint256 amount);\n event PayoutClaimed(uint256 indexed projectId, address indexed recipient, uint256 amount);\n event ProjectCompleted(uint256 indexed projectId);\n event RefundClaimed(uint256 indexed projectId, address indexed backer, uint256 amount);\n event ExcessRefunded(uint256 indexed projectId, address indexed backer, uint256 amount);\n event ProjectExpired(uint256 indexed projectId);\n\n modifier validProject(uint256 projectId) {\n require(projectId < projectCount, \"Unknown project\");\n _;\n }\n\n modifier nonReentrant() {\n require(!entered, \"Reentrant call\");\n entered = true;\n _;\n entered = false;\n }\n\n /// @param approvalTimeout seconds backers have to approve submitted evidence\n /// @param submissionTimeout seconds the creator has to submit evidence\n constructor(uint256 approvalTimeout, uint256 submissionTimeout) {\n require(approvalTimeout > 0 && approvalTimeout <= 30 days, \"Invalid approval timeout\");\n require(submissionTimeout > 0 && submissionTimeout <= 30 days, \"Invalid submission timeout\");\n APPROVAL_TIMEOUT = approvalTimeout;\n SUBMISSION_TIMEOUT = submissionTimeout;\n }\n\n function createProject(\n string calldata name,\n string calldata description,\n uint256 target,\n uint256 deadline,\n string calldata firstGoal,\n string calldata secondGoal\n ) external returns (uint256 projectId) {\n require(bytes(name).length > 0 && bytes(name).length <= 120, \"Invalid name\");\n require(bytes(description).length > 0 && bytes(description).length <= 4000, \"Invalid description\");\n require(bytes(firstGoal).length > 0 && bytes(firstGoal).length <= 2000, \"Invalid first goal\");\n require(bytes(secondGoal).length > 0 && bytes(secondGoal).length <= 2000, \"Invalid second goal\");\n require(target > 0, \"Target must be positive\");\n require(deadline > block.timestamp, \"Deadline must be future\");\n projectId = projectCount++;\n projects[projectId] = Project(payable(msg.sender), name, description, target, deadline, 0, 0, ProjectStatus.Funding, 0, 0);\n milestones[projectId][0].goal = firstGoal;\n milestones[projectId][1].goal = secondGoal;\n emit ProjectCreated(projectId, msg.sender, target, deadline);\n }\n\n /// @notice Contributions are capped at the target. Anything above the remaining\n /// amount is returned in the same transaction, so totalRaised never exceeds target.\n function contribute(uint256 projectId) external payable validProject(projectId) nonReentrant {\n Project storage p = projects[projectId];\n require(p.status == ProjectStatus.Funding, \"Funding closed\");\n require(block.timestamp < p.deadline, \"Deadline reached\");\n require(msg.sender != p.creator, \"Creator cannot contribute\");\n require(msg.value > 0, \"Contribution must be positive\");\n uint256 remaining = p.target - p.totalRaised;\n uint256 accepted = msg.value > remaining ? remaining : msg.value;\n uint256 excess = msg.value - accepted;\n contributions[projectId][msg.sender] += accepted;\n p.totalRaised += accepted;\n p.escrowBalance += accepted;\n emit ContributionReceived(projectId, msg.sender, accepted);\n // Accounting is committed before the external call; a failed refund reverts everything.\n if (excess > 0) {\n (bool ok,) = payable(msg.sender).call{value: excess}(\"\");\n require(ok, \"Excess refund failed\");\n emit ExcessRefunded(projectId, msg.sender, excess);\n }\n if (p.totalRaised == p.target) {\n p.successfulAt = block.timestamp;\n p.status = ProjectStatus.Successful;\n emit FundingSuccessful(projectId, p.totalRaised);\n }\n }\n\n /// @notice Anyone may explicitly finalize an expired, unsuccessful campaign.\n function finalizeFunding(uint256 projectId) external validProject(projectId) {\n Project storage p = projects[projectId];\n require(p.status == ProjectStatus.Funding, \"Funding closed\");\n require(block.timestamp >= p.deadline, \"Deadline not reached\");\n p.status = ProjectStatus.Failed;\n emit FundingFailed(projectId);\n }\n\n function submitEvidence(uint256 projectId, uint8 milestone, string calldata evidence, string calldata evidenceUrl)\n external validProject(projectId)\n {\n Project storage p = projects[projectId];\n require(msg.sender == p.creator, \"Creator only\");\n require(p.status == ProjectStatus.Successful, \"Project not successful\");\n require(milestone < 2 && milestone == p.currentMilestone, \"Wrong milestone\");\n Milestone storage m = milestones[projectId][milestone];\n require(!m.submitted, \"Evidence already submitted\");\n require(block.timestamp < _milestoneDeadline(projectId, p, m), \"Submission window closed\");\n require(bytes(evidence).length > 0 && bytes(evidence).length <= 4000, \"Invalid evidence\");\n require(bytes(evidenceUrl).length > 0 && bytes(evidenceUrl).length <= 1000, \"Invalid evidence URL\");\n m.evidence = evidence;\n m.evidenceUrl = evidenceUrl;\n m.submitted = true;\n m.submittedAt = block.timestamp;\n emit EvidenceSubmitted(projectId, milestone, evidence, evidenceUrl);\n }\n\n function approveMilestone(uint256 projectId, uint8 milestone) external validProject(projectId) {\n Project storage p = projects[projectId];\n require(p.status == ProjectStatus.Successful, \"Project not successful\");\n require(milestone < 2 && milestone == p.currentMilestone, \"Wrong milestone\");\n Milestone storage m = milestones[projectId][milestone];\n require(m.submitted && !m.approved, \"Approval not open\");\n require(block.timestamp < _milestoneDeadline(projectId, p, m), \"Approval window closed\");\n uint256 weight = contributions[projectId][msg.sender];\n require(weight > 0, \"Backers only\");\n require(!hasApproved[projectId][milestone][msg.sender], \"Already approved\");\n hasApproved[projectId][milestone][msg.sender] = true;\n m.approvalWeight += weight;\n emit ApprovalCast(projectId, milestone, msg.sender, weight);\n // Equivalent to weight * 2 > total, without multiplication overflow.\n if (m.approvalWeight > p.totalRaised / 2) {\n m.approved = true;\n emit MilestoneApproved(projectId, milestone);\n }\n }\n\n /// @notice Release and pay an approved milestone to the creator in one transaction.\n function withdrawMilestone(uint256 projectId, uint8 milestone) external validProject(projectId) nonReentrant {\n Project storage p = projects[projectId];\n require(msg.sender == p.creator, \"Creator only\");\n uint256 amount = _releaseMilestone(projectId, milestone, p);\n emit FundsWithdrawn(projectId, milestone, amount);\n if (milestone == 1) emit ProjectCompleted(projectId);\n _sendPayout(p.creator, amount);\n }\n\n /// @notice Advance an approved milestone and credit its payout without sending ETH.\n function releaseMilestone(uint256 projectId, uint8 milestone) external validProject(projectId) nonReentrant {\n uint256 amount = _releaseMilestone(projectId, milestone, projects[projectId]);\n claimablePayouts[projectId] += amount;\n emit MilestoneReleased(projectId, milestone, amount);\n if (milestone == 1) emit ProjectCompleted(projectId);\n }\n\n /// @notice The creator can collect the project's released payouts at a chosen address.\n function claimPayout(uint256 projectId, address payable recipient) external validProject(projectId) nonReentrant {\n require(msg.sender == projects[projectId].creator, \"Creator only\");\n require(recipient != address(0), \"Invalid payout recipient\");\n uint256 amount = claimablePayouts[projectId];\n require(amount > 0, \"No payout available\");\n claimablePayouts[projectId] = 0;\n emit PayoutClaimed(projectId, recipient, amount);\n _sendPayout(recipient, amount);\n }\n\n function _releaseMilestone(uint256 projectId, uint8 milestone, Project storage p)\n private returns (uint256 amount)\n {\n require(p.status == ProjectStatus.Successful, \"Project not successful\");\n require(milestone < 2 && milestone == p.currentMilestone, \"Wrong milestone\");\n Milestone storage m = milestones[projectId][milestone];\n require(m.approved && !m.withdrawn, \"Milestone not withdrawable\");\n // floor(total * 2 / 5), split into quotient and remainder to avoid overflow.\n amount = milestone == 0\n ? (p.totalRaised / 5) * 2 + (p.totalRaised % 5) * 2 / 5\n : p.escrowBalance;\n m.withdrawn = true;\n m.withdrawnAmount = amount;\n p.escrowBalance -= amount;\n p.currentMilestone++;\n if (milestone == 0) {\n secondMilestoneOpenedAt[projectId] = block.timestamp;\n } else {\n p.status = ProjectStatus.Completed;\n }\n }\n\n function _sendPayout(address payable recipient, uint256 amount) private {\n if (amount == 0) return;\n (bool sent,) = recipient.call{value: amount}(\"\");\n require(sent, \"ETH transfer failed\");\n }\n\n function claimRefund(uint256 projectId) external validProject(projectId) nonReentrant {\n Project storage p = projects[projectId];\n require(p.status == ProjectStatus.Failed, \"Project not failed\");\n uint256 amount = contributions[projectId][msg.sender];\n require(amount > 0 && !refunded[projectId][msg.sender], \"No refund available\");\n refunded[projectId][msg.sender] = true;\n p.escrowBalance -= amount;\n emit RefundClaimed(projectId, msg.sender, amount);\n (bool sent,) = payable(msg.sender).call{value: amount}(\"\");\n require(sent, \"ETH transfer failed\");\n }\n\n /// @notice Reclaim a share of the remaining escrow when the current milestone times\n /// out: either backers did not approve submitted evidence, or the creator never\n /// submitted it. Each share uses the same pool, frozen before the first refund.\n function claimExpiredRefund(uint256 projectId) external validProject(projectId) nonReentrant {\n Project storage p = projects[projectId];\n string memory blocker = _expiredRefundBlocker(projectId, p);\n require(bytes(blocker).length == 0, blocker);\n uint256 amount = _expiredRefundAmount(projectId, p, msg.sender);\n require(amount > 0, \"No refund available\");\n\n refunded[projectId][msg.sender] = true;\n if (p.status == ProjectStatus.Successful) {\n expiredRefundPools[projectId] = p.escrowBalance;\n p.status = ProjectStatus.Expired;\n emit ProjectExpired(projectId);\n }\n p.escrowBalance -= amount;\n emit RefundClaimed(projectId, msg.sender, amount);\n (bool sent,) = payable(msg.sender).call{value: amount}(\"\");\n require(sent, \"ETH transfer failed\");\n }\n\n /// @notice Returns the claimable expiry refund in wei, or zero if none is available.\n function getExpiredRefundAmount(uint256 projectId, address backer)\n external view validProject(projectId) returns (uint256)\n {\n Project storage p = projects[projectId];\n if (bytes(_expiredRefundBlocker(projectId, p)).length != 0) return 0;\n return _expiredRefundAmount(projectId, p, backer);\n }\n\n /// @notice The current submission or approval deadline and whether the window is open.\n /// @dev A zero deadline means there is no pending submission or approval.\n function getMilestoneWindow(uint256 projectId)\n external view validProject(projectId) returns (uint256 deadline, bool open)\n {\n Project storage p = projects[projectId];\n if (p.status != ProjectStatus.Successful && p.status != ProjectStatus.Expired) return (0, false);\n Milestone storage m = milestones[projectId][p.currentMilestone];\n if (m.approved) return (0, false);\n deadline = _milestoneDeadline(projectId, p, m);\n open = block.timestamp < deadline;\n }\n\n function _expiredRefundBlocker(uint256 projectId, Project storage p) private view returns (string memory) {\n if (p.status != ProjectStatus.Successful && p.status != ProjectStatus.Expired) return \"Project not active\";\n if (p.currentMilestone >= 2) return \"Project completed\";\n Milestone storage m = milestones[projectId][p.currentMilestone];\n if (m.approved) return \"Milestone already approved\";\n if (block.timestamp < _milestoneDeadline(projectId, p, m)) {\n return m.submitted ? \"Approval window still open\" : \"Submission window still open\";\n }\n return \"\";\n }\n\n function _milestoneDeadline(uint256 projectId, Project storage p, Milestone storage m)\n private view returns (uint256)\n {\n if (m.submitted) return m.submittedAt + APPROVAL_TIMEOUT;\n uint256 openedAt = p.currentMilestone == 0 ? p.successfulAt : secondMilestoneOpenedAt[projectId];\n return openedAt + SUBMISSION_TIMEOUT;\n }\n\n function _expiredRefundAmount(uint256 projectId, Project storage p, address backer) private view returns (uint256) {\n if (refunded[projectId][backer]) return 0;\n uint256 pool = p.status == ProjectStatus.Expired ? expiredRefundPools[projectId] : p.escrowBalance;\n return contributions[projectId][backer] * pool / p.totalRaised;\n }\n\n function getProject(uint256 projectId) external view validProject(projectId) returns (Project memory) {\n return projects[projectId];\n }\n\n function getMilestone(uint256 projectId, uint8 milestone) external view validProject(projectId) returns (Milestone memory) {\n require(milestone < 2, \"Invalid milestone\");\n return milestones[projectId][milestone];\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "evmVersion": "paris", + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.deployedBytecode.object", + "evm.deployedBytecode.immutableReferences", + "metadata" + ] + } + } + } +} diff --git a/docs/evidence/deployment/verification-2026-11-07-compiler-references.json b/docs/evidence/deployment/verification-2026-11-07-compiler-references.json new file mode 100644 index 0000000..de7ea38 --- /dev/null +++ b/docs/evidence/deployment/verification-2026-11-07-compiler-references.json @@ -0,0 +1,400 @@ +{ + "schemaVersion": 2, + "observedAt": "2026-11-07T06:34:18.608Z", + "status": "immutable-substitution-match", + "chainId": 11155111, + "address": "0x5A5AeaE5553Feb5c5b27FEe5ec8b24E3ED2B964F", + "rpc": { + "origin": "https://ethereum-sepolia-rpc.publicnode.com", + "endpointSha256": "18dddd47c8f4b183a5b2322a292c534f78b4c31ed168fbbc1af18f41767f3899", + "credentialsAndPathOmitted": true + }, + "block": { + "number": 12081918, + "hash": "0xbfe3890624a11ff65b401da54ab681175848e71e5e3dd6cbefe6421a2d282752", + "timestamp": 1794033252, + "timeUTC": "2026-11-07T06:34:12.000Z", + "timeBeijing": "2026-11-07 14:34:12 UTC+08:00" + }, + "source": { + "file": "contracts/MilestoneFund.sol", + "sha256": "072b7795986e5fdd3d9efbec3950c808fbe791f9b1829e1ecd08198a6c881bd1", + "bytes": 16825, + "normalizedLfSha256": "072b7795986e5fdd3d9efbec3950c808fbe791f9b1829e1ecd08198a6c881bd1", + "normalizedLfBytes": 16825 + }, + "installedCompilers": [ + { + "package": "solc", + "version": "0.8.24+commit.e11b9ed9.Emscripten.clang" + }, + { + "package": "solc-deployed", + "version": "0.8.34+commit.80d5c536.Emscripten.clang" + } + ], + "onChain": { + "runtimeBytes": 12717, + "runtimeKeccak256": "0xc6c8e7749da17e6b4f18dd73312b0195eae53625685b0fbe18b727043b76b3c3", + "executableBytes": 12664, + "executableKeccak256": "0xbad2b1631e9e4788364a9189f5abd56eab3a0adb38192541ad079025bbfd3287", + "metadata": { + "recognized": true, + "cborBytes": 51, + "strippedBytes": 53, + "compilerVersion": "0.8.24", + "cborHex": "0xa264697066735822122014fe20bce634f36b1e01e2cf5402852675e2c8e6113f1744d954baa6a4c04f0864736f6c6343000818", + "fields": { + "ipfs": "0x122014fe20bce634f36b1e01e2cf5402852675e2c8e6113f1744d954baa6a4c04f08", + "solc": "0x000818" + } + } + }, + "search": { + "maxCompiles": 64, + "actualCompiles": 1, + "optimizerEnabled": [ + false, + true + ], + "optimizerRuns": [ + 200 + ], + "viaIR": false, + "compilerEvmCandidates": [ + { + "package": "solc", + "evmVersions": [ + "paris", + "shanghai", + "cancun" + ] + }, + { + "package": "solc-deployed", + "evmVersions": [ + "osaka", + "prague", + "cancun", + "shanghai", + "paris" + ] + } + ], + "metadataRefinements": { + "sourcePaths": [ + "MilestoneFund.sol", + "contracts/MilestoneFund.sol" + ], + "newlines": [ + "LF", + "CRLF" + ] + }, + "stoppedAfterFirstSourceProvenMatch": true + }, + "repositoryDefault": { + "id": 1, + "package": "solc", + "compilerVersion": "0.8.24+commit.e11b9ed9.Emscripten.clang", + "optimizer": { + "enabled": true, + "runs": 200 + }, + "evmVersion": "paris", + "viaIR": false, + "sourcePath": "MilestoneFund.sol", + "sourceVariant": "working-tree", + "sourceSha256": "072b7795986e5fdd3d9efbec3950c808fbe791f9b1829e1ecd08198a6c881bd1", + "sourceBytes": 16825, + "standardInputSha256": "4ebabcc9574fbe8b6d9594bee2c997c4305ead8e1878d07cfa3bf0c00a614e52", + "repositoryDefault": true, + "runtimeBytes": 12717, + "runtimeKeccak256": "0x8fa461507d819f985a060fb473ee0e42c8b4a34dd97ff30c370f9b1311a89e2f", + "executableBytes": 12664, + "executableKeccak256": "0xcc2f116bad17db28135030c2843e5603f8511fedc8387168ca629e616dfe304a", + "metadata": { + "recognized": true, + "cborBytes": 51, + "strippedBytes": 53, + "compilerVersion": "0.8.24", + "cborHex": "0xa2646970667358221220c1372e007e8039adf51e0a09f3f7002c377cf4299316a8d3475b24493b0a04c464736f6c6343000818", + "fields": { + "ipfs": "0x1220c1372e007e8039adf51e0a09f3f7002c377cf4299316a8d3475b24493b0a04c4", + "solc": "0x000818" + } + }, + "fullMatch": false, + "executableMatch": false, + "immutableMatch": true, + "immutableSlots": [ + { + "variableId": "52", + "position": 1046, + "length": 32, + "onChainValue": "0x0000000000000000000000000000000000000000000000000000000000000258", + "decimalValue": "600" + }, + { + "variableId": "52", + "position": 9324, + "length": 32, + "onChainValue": "0x0000000000000000000000000000000000000000000000000000000000000258", + "decimalValue": "600" + }, + { + "variableId": "55", + "position": 994, + "length": 32, + "onChainValue": "0x0000000000000000000000000000000000000000000000000000000000000258", + "decimalValue": "600" + }, + { + "variableId": "55", + "position": 9431, + "length": 32, + "onChainValue": "0x0000000000000000000000000000000000000000000000000000000000000258", + "decimalValue": "600" + } + ], + "metadataMatch": false, + "substitutedFullMatch": false, + "immutableReferences": { + "52": [ + { + "length": 32, + "start": 1046 + }, + { + "length": 32, + "start": 9324 + } + ], + "55": [ + { + "length": 32, + "start": 994 + }, + { + "length": 32, + "start": 9431 + } + ] + }, + "abiMatchesRepository": true + }, + "matchedCandidate": { + "id": 1, + "package": "solc", + "compilerVersion": "0.8.24+commit.e11b9ed9.Emscripten.clang", + "optimizer": { + "enabled": true, + "runs": 200 + }, + "evmVersion": "paris", + "viaIR": false, + "sourcePath": "MilestoneFund.sol", + "sourceVariant": "working-tree", + "sourceSha256": "072b7795986e5fdd3d9efbec3950c808fbe791f9b1829e1ecd08198a6c881bd1", + "sourceBytes": 16825, + "standardInputSha256": "4ebabcc9574fbe8b6d9594bee2c997c4305ead8e1878d07cfa3bf0c00a614e52", + "repositoryDefault": true, + "runtimeBytes": 12717, + "runtimeKeccak256": "0x8fa461507d819f985a060fb473ee0e42c8b4a34dd97ff30c370f9b1311a89e2f", + "executableBytes": 12664, + "executableKeccak256": "0xcc2f116bad17db28135030c2843e5603f8511fedc8387168ca629e616dfe304a", + "metadata": { + "recognized": true, + "cborBytes": 51, + "strippedBytes": 53, + "compilerVersion": "0.8.24", + "cborHex": "0xa2646970667358221220c1372e007e8039adf51e0a09f3f7002c377cf4299316a8d3475b24493b0a04c464736f6c6343000818", + "fields": { + "ipfs": "0x1220c1372e007e8039adf51e0a09f3f7002c377cf4299316a8d3475b24493b0a04c4", + "solc": "0x000818" + } + }, + "fullMatch": false, + "executableMatch": false, + "immutableMatch": true, + "immutableSlots": [ + { + "variableId": "52", + "position": 1046, + "length": 32, + "onChainValue": "0x0000000000000000000000000000000000000000000000000000000000000258", + "decimalValue": "600" + }, + { + "variableId": "52", + "position": 9324, + "length": 32, + "onChainValue": "0x0000000000000000000000000000000000000000000000000000000000000258", + "decimalValue": "600" + }, + { + "variableId": "55", + "position": 994, + "length": 32, + "onChainValue": "0x0000000000000000000000000000000000000000000000000000000000000258", + "decimalValue": "600" + }, + { + "variableId": "55", + "position": 9431, + "length": 32, + "onChainValue": "0x0000000000000000000000000000000000000000000000000000000000000258", + "decimalValue": "600" + } + ], + "metadataMatch": false, + "substitutedFullMatch": false, + "immutableReferences": { + "52": [ + { + "length": 32, + "start": 1046 + }, + { + "length": 32, + "start": 9324 + } + ], + "55": [ + { + "length": 32, + "start": 994 + }, + { + "length": 32, + "start": 9431 + } + ] + }, + "abiMatchesRepository": true + }, + "candidates": [ + { + "id": 1, + "package": "solc", + "compilerVersion": "0.8.24+commit.e11b9ed9.Emscripten.clang", + "optimizer": { + "enabled": true, + "runs": 200 + }, + "evmVersion": "paris", + "viaIR": false, + "sourcePath": "MilestoneFund.sol", + "sourceVariant": "working-tree", + "sourceSha256": "072b7795986e5fdd3d9efbec3950c808fbe791f9b1829e1ecd08198a6c881bd1", + "sourceBytes": 16825, + "standardInputSha256": "4ebabcc9574fbe8b6d9594bee2c997c4305ead8e1878d07cfa3bf0c00a614e52", + "repositoryDefault": true, + "runtimeBytes": 12717, + "runtimeKeccak256": "0x8fa461507d819f985a060fb473ee0e42c8b4a34dd97ff30c370f9b1311a89e2f", + "executableBytes": 12664, + "executableKeccak256": "0xcc2f116bad17db28135030c2843e5603f8511fedc8387168ca629e616dfe304a", + "metadata": { + "recognized": true, + "cborBytes": 51, + "strippedBytes": 53, + "compilerVersion": "0.8.24", + "cborHex": "0xa2646970667358221220c1372e007e8039adf51e0a09f3f7002c377cf4299316a8d3475b24493b0a04c464736f6c6343000818", + "fields": { + "ipfs": "0x1220c1372e007e8039adf51e0a09f3f7002c377cf4299316a8d3475b24493b0a04c4", + "solc": "0x000818" + } + }, + "fullMatch": false, + "executableMatch": false, + "immutableMatch": true, + "immutableSlots": [ + { + "variableId": "52", + "position": 1046, + "length": 32, + "onChainValue": "0x0000000000000000000000000000000000000000000000000000000000000258", + "decimalValue": "600" + }, + { + "variableId": "52", + "position": 9324, + "length": 32, + "onChainValue": "0x0000000000000000000000000000000000000000000000000000000000000258", + "decimalValue": "600" + }, + { + "variableId": "55", + "position": 994, + "length": 32, + "onChainValue": "0x0000000000000000000000000000000000000000000000000000000000000258", + "decimalValue": "600" + }, + { + "variableId": "55", + "position": 9431, + "length": 32, + "onChainValue": "0x0000000000000000000000000000000000000000000000000000000000000258", + "decimalValue": "600" + } + ], + "metadataMatch": false, + "substitutedFullMatch": false, + "immutableReferences": { + "52": [ + { + "length": 32, + "start": 1046 + }, + { + "length": 32, + "start": 9324 + } + ], + "55": [ + { + "length": 32, + "start": 994 + }, + { + "length": 32, + "start": 9431 + } + ] + }, + "abiMatchesRepository": true + } + ], + "comparisonScope": "Full match compares every runtime byte, including validated CBOR metadata. Executable-only comparison strips only the recognized CBOR trailer and its two-byte length and is not an immutable match. An immutable-substitution match permits changes only within solc immutableReferences, requires consistent values across all occurrences of each variable, and compares every other executable byte. Metadata equality is reported separately as metadataMatch; substitutedFullMatch also requires metadata equality. Immutable values are observed from runtime, not independently recovered from constructor arguments. This verifies runtime at the fixed block, not creation transaction provenance or security.", + "unchanged": [ + "contracts/MilestoneFund.sol", + "scripts/compile-contract.mjs", + "src/abi/MilestoneFund.json" + ], + "evidenceFiles": [ + { + "role": "on-chain-runtime", + "file": "verification-2026-11-07-compiler-references-runtime.hex", + "sha256": "832542e5f86b99bb7bb2c30bd35e82efff7846bf5e94d383fc0301c2b29a9624", + "bytes": 25437 + }, + { + "role": "matching-standard-input", + "file": "verification-2026-11-07-compiler-references-standard-input.json", + "sha256": "74a9b1fc352ac8c892685b5403656bb7bb28a0770b61b96c26deaea70f31f4e5", + "bytes": 17693 + }, + { + "role": "matching-compiler-metadata", + "file": "verification-2026-11-07-compiler-references-metadata.json", + "sha256": "d5d030e76f5cde94e1eee45f7b0908bfc5e2655d3217cfabb5f7e35ea18f0b04", + "bytes": 12927 + }, + { + "role": "immutable-substitution", + "file": "verification-2026-11-07-compiler-references-immutable.json", + "sha256": "72f4491f8996f6e94635a254610201749bb14dcf3d0ebf725bde74b8cd246dae", + "bytes": 1211 + } + ] +} diff --git a/scripts/verify-deployment.mjs b/scripts/verify-deployment.mjs index d85aae5..dfe362a 100644 --- a/scripts/verify-deployment.mjs +++ b/scripts/verify-deployment.mjs @@ -128,29 +128,49 @@ function splitRuntime(code) { } } -// Solidity emits immutable variables as two-byte zero placeholders in the -// compiled runtime; the constructor substitutes the actual values at deploy -// time. Return the placeholder slots when every executable difference is a -// zero placeholder locally with a non-zero on-chain word, otherwise null. -function immutableSubstitution(localExecutable, onChainExecutable) { +// Only the compiler can identify immutable placeholders. All other executable +// bytes must match, and each occurrence of one variable must contain one value. +function immutableSubstitution(localExecutable, onChainExecutable, references) { const local = Buffer.from(localExecutable.slice(2), "hex"); const onChainBytes = Buffer.from(onChainExecutable.slice(2), "hex"); - if (local.length !== onChainBytes.length) return null; - const differences = []; - for (let i = 0; i < local.length; i++) { - if (local[i] !== onChainBytes[i]) differences.push(i); - } - if (differences.length === 0 || differences.length % 2 !== 0) return null; + if (local.length !== onChainBytes.length || local.equals(onChainBytes)) return null; + const substituted = Buffer.from(local); + const covered = new Set(); const slots = []; - for (let i = 0; i < differences.length; i += 2) { - const position = differences[i]; - if (differences[i + 1] !== position + 1) return null; - if (local.readUInt16BE(position) !== 0) return null; - const onChainWord = onChainBytes.readUInt16BE(position); - if (onChainWord === 0) return null; - slots.push({ position, onChainWord }); + for (const [variableId, locations] of Object.entries(references)) { + let value; + for (const { start: position, length } of locations) { + if (!Number.isSafeInteger(position) || !Number.isSafeInteger(length) + || position < 0 || length <= 0 || position + length > local.length) return null; + for (let i = position; i < position + length; i++) { + if (covered.has(i) || local[i] !== 0) return null; + covered.add(i); + } + const onChainValue = "0x" + onChainBytes.subarray(position, position + length).toString("hex"); + if (value !== undefined && value !== onChainValue) return null; + value = onChainValue; + onChainBytes.copy(substituted, position, position, position + length); + slots.push({ variableId, position, length, onChainValue, decimalValue: BigInt(onChainValue).toString() }); + } } - return slots; + return slots.length > 0 && substituted.equals(onChainBytes) ? slots : null; +} + +export function compareRuntime(localRuntime, onChainRuntime, immutableReferences = {}) { + const local = splitRuntime(localRuntime); + const onChain = splitRuntime(onChainRuntime); + const recognized = local.metadata.recognized && onChain.metadata.recognized; + const fullMatch = localRuntime === onChainRuntime; + const executableMatch = recognized && local.executable === onChain.executable; + const immutableSlots = recognized + ? immutableSubstitution(local.executable, onChain.executable, immutableReferences) + : null; + const immutableMatch = immutableSlots !== null; + const metadataMatch = recognized && local.metadata.cborHex === onChain.metadata.cborHex; + return { + fullMatch, executableMatch, immutableMatch, immutableSlots, metadataMatch, + substitutedFullMatch: immutableMatch && metadataMatch, + }; } async function verify(config) { @@ -172,7 +192,7 @@ async function verify(config) { const onChain = splitRuntime(code); if (!onChain.metadata.recognized) throw new Error("Solidity CBOR metadata not recognized; refusing speculative stripping."); - const candidates = [], seen = new Set(); + const candidates = [], seen = new Map(); let best = null; const compilers = [ { label: "solc", compiler: solc, evms: ["paris", "shanghai", "cancun"] }, @@ -183,24 +203,22 @@ async function verify(config) { language: "Solidity", sources: { [sourcePath]: { content } }, settings: { optimizer: { enabled, runs: 200 }, evmVersion, - outputSelection: { "*": { "*": ["abi", "evm.deployedBytecode.object", "metadata"] } }, + outputSelection: { "*": { "*": ["abi", "evm.deployedBytecode.object", "evm.deployedBytecode.immutableReferences", "metadata"] } }, }, }; const compilerVersion = engine.compiler.version(); const key = compilerVersion + JSON.stringify(input); - if (seen.has(key)) return null; + if (seen.has(key)) return seen.get(key); if (seen.size >= 64) throw new Error("Bounded compiler search limit reached."); - seen.add(key); const output = JSON.parse(engine.compiler.compile(JSON.stringify(input))); const errors = (output.errors || []).filter((item) => item.severity === "error"); if (errors.length) throw new Error(errors.map((item) => item.formattedMessage).join("\n")); const artifact = output.contracts[sourcePath].MilestoneFund; const runtime = "0x" + artifact.evm.deployedBytecode.object; const split = splitRuntime(runtime); - const fullMatch = runtime === code; - const executableMatch = split.metadata.recognized && split.executable === onChain.executable; - const immutableSlots = executableMatch ? [] : immutableSubstitution(split.executable, onChain.executable); - const immutableMatch = immutableSlots !== null; + const immutableReferences = artifact.evm.deployedBytecode.immutableReferences || {}; + const comparison = compareRuntime(runtime, code, immutableReferences); + const { fullMatch, executableMatch, immutableMatch } = comparison; const summary = { id: candidates.length + 1, package: engine.label, compilerVersion, optimizer: { enabled, runs: 200 }, evmVersion, viaIR: false, @@ -208,9 +226,10 @@ async function verify(config) { standardInputSha256: sha256(JSON.stringify(input)), repositoryDefault, runtimeBytes: (runtime.length - 2) / 2, runtimeKeccak256: keccak256(runtime), executableBytes: (split.executable.length - 2) / 2, executableKeccak256: keccak256(split.executable), - metadata: split.metadata, fullMatch, executableMatch, immutableMatch, immutableSlots, + metadata: split.metadata, ...comparison, immutableReferences, abiMatchesRepository: JSON.stringify(artifact.abi) === JSON.stringify(repositoryAbi), }; + seen.set(key, summary); candidates.push(summary); // Rank: full byte match 3 > immutable-substitution match 2 > executable-only 1. const rank = fullMatch ? 3 : immutableMatch ? 2 : executableMatch ? 1 : 0; @@ -261,7 +280,9 @@ async function verify(config) { role: "immutable-substitution", file: stem + "-immutable.json", content: json({ - explanation: "Each slot is a two-byte immutable placeholder (zero in compiled runtime) substituted with the constructor value at deployment.", + explanation: "Slots come from solc immutableReferences. Every executable byte outside those ranges matches, and all occurrences of each variable contain the same on-chain value. Values are observed from runtime, not independently recovered from the deployment transaction. Metadata equality is recorded separately.", + metadataMatch: best.summary.metadataMatch, + substitutedFullMatch: best.summary.substitutedFullMatch, slots: best.summary.immutableSlots, }), }); @@ -271,7 +292,7 @@ async function verify(config) { if (fs.existsSync(filename)) throw new Error(`Refusing to overwrite evidence: ${filename}`); } const result = { - schemaVersion: 1, observedAt: new Date().toISOString(), status, + schemaVersion: 2, observedAt: new Date().toISOString(), status, chainId: 11155111, address: config.address, rpc: { origin: new URL(config.rpc).origin, endpointSha256: sha256(config.rpc), credentialsAndPathOmitted: true }, block: { number: block.number, hash: block.hash, timestamp: block.timestamp, timeUTC: new Date(block.timestamp * 1000).toISOString(), timeBeijing: new Date((block.timestamp + 28800) * 1000).toISOString().replace("T", " ").replace(".000Z", " UTC+08:00") }, @@ -280,7 +301,7 @@ async function verify(config) { onChain: { runtimeBytes: (code.length - 2) / 2, runtimeKeccak256: keccak256(code), executableBytes: (onChain.executable.length - 2) / 2, executableKeccak256: keccak256(onChain.executable), metadata: onChain.metadata }, search: { maxCompiles: 64, actualCompiles: candidates.length, optimizerEnabled: [false, true], optimizerRuns: [200], viaIR: false, compilerEvmCandidates: compilers.map((item) => ({ package: item.label, evmVersions: item.evms })), metadataRefinements: { sourcePaths: ["MilestoneFund.sol", "contracts/MilestoneFund.sol"], newlines: ["LF", "CRLF"] }, stoppedAfterFirstSourceProvenMatch: status === "full-match" || status === "immutable-substitution-match" }, repositoryDefault: candidates[0], matchedCandidate: best?.summary || null, candidates, - comparisonScope: "Full match compares every runtime byte, including validated CBOR metadata. Executable-only comparison strips only the recognized CBOR trailer and its two-byte length. An immutable-substitution match requires equal-length executables where every difference is a two-byte zero placeholder locally substituted with a non-zero on-chain constructor value; the slot positions and values are recorded in the immutable evidence file. No opcode normalization or selector-only comparison is used. This verifies runtime at the fixed block, not creation transaction provenance or security.", + comparisonScope: "Full match compares every runtime byte, including validated CBOR metadata. Executable-only comparison strips only the recognized CBOR trailer and its two-byte length and is not an immutable match. An immutable-substitution match permits changes only within solc immutableReferences, requires consistent values across all occurrences of each variable, and compares every other executable byte. Metadata equality is reported separately as metadataMatch; substitutedFullMatch also requires metadata equality. Immutable values are observed from runtime, not independently recovered from constructor arguments. This verifies runtime at the fixed block, not creation transaction provenance or security.", unchanged: ["contracts/MilestoneFund.sol", "scripts/compile-contract.mjs", "src/abi/MilestoneFund.json"], evidenceFiles: files.map((item) => ({ role: item.role, file: path.basename(item.file), sha256: sha256(item.content), bytes: Buffer.byteLength(item.content) })), }; @@ -294,12 +315,14 @@ async function verify(config) { } } -let config; -try { - config = options(); - if (config) process.exitCode = await verify(config); -} catch (error) { - const message = String(error?.shortMessage || error?.message || error); - console.error(json({ status: "verification-error", message: config?.rpc ? message.replaceAll(config.rpc, "[RPC URL]") : message })); - process.exitCode = 1; +if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) { + let config; + try { + config = options(); + if (config) process.exitCode = await verify(config); + } catch (error) { + const message = String(error?.shortMessage || error?.message || error); + console.error(json({ status: "verification-error", message: config?.rpc ? message.replaceAll(config.rpc, "[RPC URL]") : message })); + process.exitCode = 1; + } } diff --git a/simulate-tests.mjs b/simulate-tests.mjs index 11c065b..5c9c6b1 100644 --- a/simulate-tests.mjs +++ b/simulate-tests.mjs @@ -1,4 +1,9 @@ /** + * Historical v1 tool (2026-10-21), not current acceptance evidence. + * It imports the current ABI but assumes the old deployment storage layout + * and live state. Use npm test for current regression testing. + * Running this script overwrites simulation-results.json. + * * Simulates the deployed MilestoneFund bytecode on Sepolia using eth_call + * state overrides, so approval / withdrawal / refund logic can be verified * without spending test ETH or needing a private key. @@ -66,37 +71,37 @@ const enc = (fn, args = [], value) => iface.encodeFunctionData(fn, args); console.log("=== Part A: guards on the real deployed contract ===\n"); const code = await provider.getCode(REAL); -await expect("A", "getProject(未知 id) 被拒", { data: enc("getProject", [999]) }, "Unknown project"); -await expect("A", "getMilestone(0, 2) 被拒", { data: enc("getMilestone", [0, 2]) }, "Invalid milestone"); -await expect("A", "createProject 空名称被拒", { +await expect("A", "getProject(unknown ID) is rejected", { data: enc("getProject", [999]) }, "Unknown project"); +await expect("A", "getMilestone(0, 2) is rejected", { data: enc("getMilestone", [0, 2]) }, "Invalid milestone"); +await expect("A", "createProject rejects an empty name", { from: A, data: enc("createProject", ["", "d", 1n, BigInt(Math.floor(Date.now() / 1000) + 86400), "a", "b"]), }, "Invalid name"); -await expect("A", "createProject 目标为 0 被拒", { +await expect("A", "createProject rejects a zero target", { from: A, data: enc("createProject", ["n", "d", 0n, BigInt(Math.floor(Date.now() / 1000) + 86400), "a", "b"]), }, "Target must be positive"); -await expect("A", "createProject 过去截止时间被拒", { +await expect("A", "createProject rejects a past deadline", { from: A, data: enc("createProject", ["n", "d", 1n, 1000n, "a", "b"]), }, "Deadline must be future"); -const created = await expect("A", "createProject 合法参数成功(模拟,不广播)", { +const created = await expect("A", "createProject accepts valid parameters (simulation, no broadcast)", { from: A, data: enc("createProject", ["Sim", "sim", parseEther("0.01"), BigInt(Math.floor(Date.now() / 1000) + 86400), "g1", "g2"]), }, "ok"); if (created) { const id = BigInt(created); - record("A", "createProject 返回的新 id = projectCount", id === 2n, `id=${id}`); + record("A", "createProject returns the new ID = projectCount", id === 2n, `id=${id}`); } -await expect("A", "发起人不能给自己出资", { from: A, value: 1n, data: enc("contribute", [1]) }, "Creator cannot contribute"); -await expect("A", "0 金额出资被拒", { from: B, value: 0n, data: enc("contribute", [1]) }, "Contribution must be positive"); -await expect("A", "非发起人不能提交成果", { +await expect("A", "The creator cannot contribute to their own project", { from: A, value: 1n, data: enc("contribute", [1]) }, "Creator cannot contribute"); +await expect("A", "A zero contribution is rejected", { from: B, value: 0n, data: enc("contribute", [1]) }, "Contribution must be positive"); +await expect("A", "A non-creator cannot submit evidence", { from: B, data: enc("submitEvidence", [0, 0, "x", "https://example.com"]), }, "Creator only"); -await expect("A", "未达标项目不能提交成果", { +await expect("A", "An unfunded project cannot accept evidence", { from: A, data: enc("submitEvidence", [0, 0, "x", "https://example.com"]), }, "Project not successful"); -await expect("A", "未达标项目不能审批", { from: B, data: enc("approveMilestone", [0, 0]) }, "Project not successful"); -await expect("A", "未达标项目不能提款", { from: A, data: enc("withdrawMilestone", [0, 0]) }, "Project not successful"); -await expect("A", "进行中项目不能退款", { from: B, data: enc("claimRefund", [0]) }, "Project not failed"); -await expect("A", "截止前不能 finalize", { from: B, data: enc("finalizeFunding", [0]) }, "Deadline not reached"); -await expect("A", "截止前不能 finalize(项目 1)", { from: B, data: enc("finalizeFunding", [1]) }, "Deadline not reached"); +await expect("A", "An unfunded project cannot accept approval", { from: B, data: enc("approveMilestone", [0, 0]) }, "Project not successful"); +await expect("A", "An unfunded project cannot allow withdrawal", { from: A, data: enc("withdrawMilestone", [0, 0]) }, "Project not successful"); +await expect("A", "A project still funding cannot allow refunds", { from: B, data: enc("claimRefund", [0]) }, "Project not failed"); +await expect("A", "Cannot finalize before the deadline", { from: B, data: enc("finalizeFunding", [0]) }, "Deadline not reached"); +await expect("A", "Cannot finalize before the deadline (project 1)", { from: B, data: enc("finalizeFunding", [1]) }, "Deadline not reached"); // ---------------------------------------------------------------- Part B console.log("\n=== Part B: fabricated states on the deployed runtime bytecode ===\n"); @@ -157,147 +162,147 @@ async function scenario(name, { project, m0, m1, contributions = [], refunded = const SUCCESS = { creator: A, status: 1, currentMilestone: 0, totalRaised: parseEther("1"), escrowBalance: parseEther("1"), target: parseEther("1") }; // --- approval -await scenario("达标项目:未出资者审批被拒", { +await scenario("Funded project: approval by a non-backer is rejected", { project: SUCCESS, m0: { submitted: true }, contributions: [[B, parseEther("0.4")], [C, parseEther("0.6")]], }, D, enc("approveMilestone", [0, 0]), "Backers only"); -await scenario("达标项目:支持者可以审批阶段 1", { +await scenario("Funded project: a backer can approve milestone 1", { project: SUCCESS, m0: { submitted: true }, contributions: [[B, parseEther("0.4")], [C, parseEther("0.6")]], }, B, enc("approveMilestone", [0, 0]), "ok"); -await scenario("未提交成果时审批被拒", { +await scenario("Approval before evidence submission is rejected", { project: SUCCESS, m0: { submitted: false }, contributions: [[B, parseEther("0.4")]], }, B, enc("approveMilestone", [0, 0]), "Approval not open"); -await scenario("已通过后再次审批被拒", { +await scenario("Approval after the milestone is approved is rejected", { project: SUCCESS, m0: { submitted: true, approved: true }, contributions: [[B, parseEther("0.4")]], }, B, enc("approveMilestone", [0, 0]), "Approval not open"); -await scenario("重复投票被拒(hasApproved 已置位)", { +await scenario("Duplicate approval is rejected (hasApproved already set)", { project: SUCCESS, m0: { submitted: true }, contributions: [[B, parseEther("0.4")]], approvals: [[0, B]], }, B, enc("approveMilestone", [0, 0]), "Already approved"); // --- withdrawal -await scenario("阶段已批准:发起人可以提款", { +await scenario("Approved milestone: the creator can withdraw", { project: SUCCESS, m0: { submitted: true, approved: true }, }, A, enc("withdrawMilestone", [0, 0]), "ok"); -await scenario("阶段未批准:提款被拒", { +await scenario("Unapproved milestone: withdrawal is rejected", { project: SUCCESS, m0: { submitted: true, approved: false }, }, A, enc("withdrawMilestone", [0, 0]), "Milestone not withdrawable"); -await scenario("阶段已提款:不能重复提款", { +await scenario("Withdrawn milestone: duplicate withdrawal is rejected", { project: SUCCESS, m0: { submitted: true, approved: true, withdrawn: true }, }, A, enc("withdrawMilestone", [0, 0]), "Milestone not withdrawable"); -await scenario("非发起人提款被拒", { +await scenario("Withdrawal by a non-creator is rejected", { project: SUCCESS, m0: { submitted: true, approved: true }, }, B, enc("withdrawMilestone", [0, 0]), "Creator only"); // payout amount probes: totalRaised=100 wei -> M1 payout must be exactly 40 -await scenario("金额探针:total=100 时托管 39 不足以支付(说明 M1=40)", { +await scenario("Amount probe: total=100, escrow=39 is insufficient (consistent with M1=40)", { project: { ...SUCCESS, totalRaised: 100n, escrowBalance: 39n, target: 100n }, m0: { submitted: true, approved: true }, }, A, enc("withdrawMilestone", [0, 0]), "revert"); -await scenario("金额探针:total=100 时托管 40 刚好够(M1=40 确认)", { +await scenario("Amount probe: total=100, escrow=40 is sufficient (M1=40 probe)", { project: { ...SUCCESS, totalRaised: 100n, escrowBalance: 40n, target: 100n }, m0: { submitted: true, approved: true }, }, A, enc("withdrawMilestone", [0, 0]), "ok"); -await scenario("金额探针:total=7 时托管 2 刚好够(M1=floor(2*7/5)=2)", { +await scenario("Amount probe: total=7, escrow=2 is sufficient (M1=floor(2*7/5)=2)", { project: { ...SUCCESS, totalRaised: 7n, escrowBalance: 2n, target: 7n }, m0: { submitted: true, approved: true }, }, A, enc("withdrawMilestone", [0, 0]), "ok"); // overfunding: total 0.012 ETH -> M1 must be 0.0048, M2 0.0072 -await scenario("金额探针:超额出资 total=0.012 时托管 0.0048-1 不足(说明 M1=0.0048)", { +await scenario("Amount probe: overfunded total=0.012, escrow=0.0048-1 is insufficient (consistent with M1=0.0048)", { project: { ...SUCCESS, totalRaised: parseEther("0.012"), escrowBalance: parseEther("0.0048") - 1n, target: parseEther("0.01") }, m0: { submitted: true, approved: true }, }, A, enc("withdrawMilestone", [0, 0]), "revert"); -await scenario("金额探针:超额出资 total=0.012 时托管 0.0048 刚好够", { +await scenario("Amount probe: overfunded total=0.012, escrow=0.0048 is sufficient", { project: { ...SUCCESS, totalRaised: parseEther("0.012"), escrowBalance: parseEther("0.0048"), target: parseEther("0.01") }, m0: { submitted: true, approved: true }, }, A, enc("withdrawMilestone", [0, 0]), "ok"); -await scenario("阶段 2 未批准:提款被拒", { +await scenario("Milestone 2 unapproved: withdrawal is rejected", { project: { ...SUCCESS, currentMilestone: 1, escrowBalance: parseEther("0.6") }, m0: { submitted: true, approved: true, withdrawn: true }, m1: { submitted: true, approved: false }, }, A, enc("withdrawMilestone", [0, 1]), "Milestone not withdrawable"); -await scenario("已失败项目:不能继续出资", { +await scenario("Failed project: further contributions are rejected", { project: { creator: A, status: 2, deadline: 1n, target: parseEther("0.02") }, }, B, enc("contribute", [0]), "Funding closed", parseEther("0.001")); -await scenario("已失败项目:不能重复 finalize", { +await scenario("Failed project: repeated finalization is rejected", { project: { creator: A, status: 2, deadline: 1n, target: parseEther("0.02") }, }, B, enc("finalizeFunding", [0]), "Funding closed"); // second milestone -await scenario("阶段 2:当前阶段为 1 时可提款", { +await scenario("Milestone 2: withdrawal succeeds when currentMilestone is 1", { project: { ...SUCCESS, currentMilestone: 1, escrowBalance: parseEther("0.6") }, m0: { submitted: true, approved: true, withdrawn: true }, m1: { submitted: true, approved: true }, }, A, enc("withdrawMilestone", [0, 1]), "ok"); -await scenario("阶段顺序:阶段 1 未提款时不能提交阶段 2 成果", { +await scenario("Milestone order: cannot submit milestone 2 evidence before milestone 1 withdrawal", { project: { ...SUCCESS, currentMilestone: 0 }, m0: { submitted: true, approved: true }, }, A, enc("submitEvidence", [0, 1, "x", "https://example.com"]), "Wrong milestone"); // --- refund -await scenario("失败项目:支持者可以退款", { +await scenario("Failed project: a backer can claim a refund", { project: { creator: A, status: 2, totalRaised: parseEther("0.003"), escrowBalance: parseEther("0.003"), deadline: 1n }, contributions: [[B, parseEther("0.003")]], }, B, enc("claimRefund", [0]), "ok"); -await scenario("失败项目:已退款不能重复领取", { +await scenario("Failed project: a refunded backer cannot claim again", { project: { creator: A, status: 2, totalRaised: parseEther("0.003"), escrowBalance: 0n, deadline: 1n }, contributions: [[B, parseEther("0.003")]], refunded: [B], }, B, enc("claimRefund", [0]), "No refund available"); -await scenario("失败项目:未出资者不能退款", { +await scenario("Failed project: a non-backer cannot claim a refund", { project: { creator: A, status: 2, totalRaised: parseEther("0.003"), escrowBalance: parseEther("0.003"), deadline: 1n }, contributions: [[B, parseEther("0.003")]], }, C, enc("claimRefund", [0]), "No refund available"); -await scenario("成功项目不能退款", { +await scenario("A successful project cannot allow refunds", { project: SUCCESS, m0: { submitted: true }, contributions: [[B, parseEther("1")]], }, B, enc("claimRefund", [0]), "Project not failed"); // --- finalize / deadline -await scenario("已过截止且未达标:finalize 成功", { +await scenario("Deadline passed and target unmet: finalization succeeds", { project: { creator: A, status: 0, totalRaised: parseEther("0.003"), escrowBalance: parseEther("0.003"), deadline: 1n, target: parseEther("0.02") }, contributions: [[B, parseEther("0.003")]], }, D, enc("finalizeFunding", [0]), "ok"); -await scenario("未过截止:finalize 被拒", { +await scenario("Before the deadline: finalization is rejected", { project: { creator: A, status: 0, deadline: BigInt(Math.floor(Date.now() / 1000) + 3600), target: parseEther("0.02") }, }, D, enc("finalizeFunding", [0]), "Deadline not reached"); -await scenario("已过截止:出资被拒", { +await scenario("After the deadline: contributions are rejected", { project: { creator: A, status: 0, deadline: 1n, target: parseEther("0.02") }, }, B, enc("contribute", [0]), "Deadline reached", parseEther("0.001")); -await scenario("已达标:继续出资被拒", { +await scenario("Target reached: further contributions are rejected", { project: SUCCESS, }, B, enc("contribute", [0]), "Funding closed", 1n); -await scenario("成功项目:发起人可提交当前阶段成果", { +await scenario("Successful project: the creator can submit current milestone evidence", { project: SUCCESS, m0: { submitted: false }, }, A, enc("submitEvidence", [0, 0, "delivered", "https://github.com/misaka10111/dapp"]), "ok"); -await scenario("成功项目:同阶段成果不能重复提交", { +await scenario("Successful project: duplicate evidence for the same milestone is rejected", { project: SUCCESS, m0: { submitted: true }, }, A, enc("submitEvidence", [0, 0, "again", "https://example.com"]), "Evidence already submitted"); @@ -319,43 +324,43 @@ for (const t of totals) { break; } } -record("C", `前端 40/60 预算与合约一致(${totals.length} 组金额)`, budgetMismatch === null, budgetMismatch ?? ""); +record("C", `Frontend 40/60 budgets match the contract formula (${totals.length} amounts)`, budgetMismatch === null, budgetMismatch ?? ""); -record("C", "percent() 在 total=0 时不崩溃", percent(0n, 0n) === 0, `percent(0,0)=${percent(0n, 0n)}`); -record("C", "percent() 超额显示为 >100", percent(parseEther("0.012"), parseEther("0.01")) === 120, +record("C", "percent() handles total=0 without crashing", percent(0n, 0n) === 0, `percent(0,0)=${percent(0n, 0n)}`); +record("C", "percent() displays overfunding as >100", percent(parseEther("0.012"), parseEther("0.01")) === 120, `=${percent(parseEther("0.012"), parseEther("0.01"))}`); for (const bad of ["0", "-1", "1e3", ".5", "1,5", "abc", "1.1234567890123456789", "", " 0.01"]) { let rejected = false; try { positiveEth(bad); } catch { rejected = true; } - record("C", `positiveEth 拒绝非法金额 ${JSON.stringify(bad)}`, rejected); + record("C", `positiveEth rejects invalid amount ${JSON.stringify(bad)}`, rejected); } for (const good of ["0.01", "1", "0.000000000000000001"]) { let okAmount = true; try { positiveEth(good); } catch { okAmount = false; } - record("C", `positiveEth 接受合法金额 ${good}`, okAmount); + record("C", `positiveEth accepts valid amount ${good}`, okAmount); } -record("C", "safeUrl 拒绝 javascript: 伪协议", safeUrl("javascript:alert(1)") === null); -record("C", "safeUrl 拒绝非完整 URL", safeUrl("github.com/x") === null); -record("C", "safeUrl 接受 https 链接", safeUrl("https://github.com/misaka10111/dapp") !== null); -record("C", "eth() 正确显示 wei", eth(100n) === "0.0000000000000001", eth(100n)); -record("C", "errorMessage 识别 MetaMask 拒绝", errorMessage({ code: 4001 }).includes("rejected")); -record("C", "errorMessage 识别余额不足", errorMessage({ code: "INSUFFICIENT_FUNDS" }).includes("Insufficient")); +record("C", "safeUrl rejects the javascript: scheme", safeUrl("javascript:alert(1)") === null); +record("C", "safeUrl rejects an incomplete URL", safeUrl("github.com/x") === null); +record("C", "safeUrl accepts an https URL", safeUrl("https://github.com/misaka10111/dapp") !== null); +record("C", "eth() correctly formats wei", eth(100n) === "0.0000000000000001", eth(100n)); +record("C", "errorMessage recognizes MetaMask rejection", errorMessage({ code: 4001 }).includes("rejected")); +record("C", "errorMessage recognizes insufficient funds", errorMessage({ code: "INSUFFICIENT_FUNDS" }).includes("Insufficient")); // Project list filters (moved to utils.js so they stay testable) const owner = "0x80e171743f3FFA2E266d174FF8722364AE6914d7"; const sample = { creator: owner, status: 1n, submitted: true, approved: false, contribution: 10n, approvedNow: false }; -record("C", "筛选 all 命中所有项目", matchesFilter("all", sample, owner)); -record("C", "筛选 mine 大小写不敏感", matchesFilter("mine", sample, owner.toLowerCase())); -record("C", "筛选 mine 排除非创建者", !matchesFilter("mine", sample, B)); -record("C", "筛选 backed 只看有出资的项目", matchesFilter("backed", sample, B) && !matchesFilter("backed", { ...sample, contribution: 0n }, B)); -record("C", "筛选 review 命中待我审批", matchesFilter("review", sample, B)); -record("C", "筛选 review 排除已投票", !matchesFilter("review", { ...sample, approvedNow: true }, B)); -record("C", "筛选 review 排除未提交成果", !matchesFilter("review", { ...sample, submitted: false }, B)); -record("C", "筛选 review 排除已通过", !matchesFilter("review", { ...sample, approved: true }, B)); -record("C", "筛选 review 排除未出资者", !matchesFilter("review", { ...sample, contribution: 0n }, B)); -record("C", "筛选 backed 处理缺失 contribution", !matchesFilter("backed", { creator: owner }, B)); +record("C", "Filter all matches every project", matchesFilter("all", sample, owner)); +record("C", "Filter mine is case-insensitive", matchesFilter("mine", sample, owner.toLowerCase())); +record("C", "Filter mine excludes non-creators", !matchesFilter("mine", sample, B)); +record("C", "Filter backed matches only projects with a contribution", matchesFilter("backed", sample, B) && !matchesFilter("backed", { ...sample, contribution: 0n }, B)); +record("C", "Filter review matches projects awaiting my approval", matchesFilter("review", sample, B)); +record("C", "Filter review excludes an existing approval", !matchesFilter("review", { ...sample, approvedNow: true }, B)); +record("C", "Filter review excludes missing evidence", !matchesFilter("review", { ...sample, submitted: false }, B)); +record("C", "Filter review excludes approved milestones", !matchesFilter("review", { ...sample, approved: true }, B)); +record("C", "Filter review excludes non-backers", !matchesFilter("review", { ...sample, contribution: 0n }, B)); +record("C", "Filter backed handles a missing contribution", !matchesFilter("backed", { creator: owner }, B)); const passed = results.filter((r) => r.pass).length; console.log(`\n================ ${passed}/${results.length} passed, ${results.length - passed} failed ================`); diff --git a/tests/deployment-verification.test.mjs b/tests/deployment-verification.test.mjs new file mode 100644 index 0000000..9669e20 --- /dev/null +++ b/tests/deployment-verification.test.mjs @@ -0,0 +1,152 @@ +import assert from "node:assert/strict"; +import fs from "node:fs"; +import { test } from "node:test"; +import solc from "solc"; +import { compareRuntime } from "../scripts/verify-deployment.mjs"; + +const evidence = new URL("../docs/evidence/deployment/verification-12080309-2026-11-07T01-09-15-627Z", import.meta.url); +const input = JSON.parse(fs.readFileSync(new URL(evidence.href + "-standard-input.json"), "utf8")); +input.settings.outputSelection = { "*": { "*": ["evm.deployedBytecode.object", "evm.deployedBytecode.immutableReferences"] } }; +const output = JSON.parse(solc.compile(JSON.stringify(input))); +assert.deepEqual((output.errors || []).filter(({ severity }) => severity === "error"), []); +const artifact = output.contracts["MilestoneFund.sol"].MilestoneFund.evm.deployedBytecode; +const localRuntime = "0x" + artifact.object; +const references = artifact.immutableReferences; +const groups = Object.entries(references); +assert.ok(groups.length >= 2, "The fixture must contain both timeout variables"); +assert.ok(groups.every(([, slots]) => slots.length >= 2), "The fixture must exercise repeated immutable values"); + +function substitute(values = {}) { + const bytes = Buffer.from(artifact.object, "hex"); + for (const [id, slots] of groups) { + const value = BigInt(values[id] ?? 600); + for (const { start, length } of slots) { + const encoded = value.toString(16).padStart(length * 2, "0"); + assert.equal(encoded.length, length * 2); + Buffer.from(encoded, "hex").copy(bytes, start); + } + } + return "0x" + bytes.toString("hex"); +} + +function changeMetadata(runtime) { + const bytes = Buffer.from(runtime.slice(2), "hex"); + // Change only the last compiler-version byte inside the valid CBOR trailer. + assert.equal(bytes[bytes.length - 3], 0x18); + bytes[bytes.length - 3] = 0x19; + return "0x" + bytes.toString("hex"); +} + +test("identical runtime is a full match without inventing an immutable substitution", () => { + const result = compareRuntime(localRuntime, localRuntime, references); + assert.equal(result.fullMatch, true); + assert.equal(result.executableMatch, true); + assert.equal(result.metadataMatch, true); + assert.equal(result.immutableMatch, false); +}); + +for (const value of [1, 256, 600, 604800]) { + test(`compiler-declared immutable slots accept the complete value ${value}`, () => { + const values = Object.fromEntries(groups.map(([id]) => [id, value])); + const result = compareRuntime(localRuntime, substitute(values), references); + assert.equal(result.fullMatch, false); + assert.equal(result.executableMatch, false); + assert.equal(result.immutableMatch, true); + assert.equal(result.metadataMatch, true); + assert.equal(result.substitutedFullMatch, true); + assert.ok(result.immutableSlots.length > 0); + }); +} + +test("different immutable variables may have different values", () => { + const values = { [groups[0][0]]: 1, [groups[1][0]]: 604800 }; + assert.equal(compareRuntime(localRuntime, substitute(values), references).immutableMatch, true); +}); + +test("repeated references to the same immutable must contain the same value", () => { + const bytes = Buffer.from(substitute().slice(2), "hex"); + const { start, length } = groups[0][1][1]; + Buffer.from((601).toString(16).padStart(length * 2, "0"), "hex").copy(bytes, start); + const result = compareRuntime(localRuntime, "0x" + bytes.toString("hex"), references); + assert.equal(result.immutableMatch, false); + assert.equal(result.substitutedFullMatch, false); +}); + +test("arbitrary zero-byte changes outside compiler references are not immutable substitutions", () => { + const original = Buffer.from(artifact.object, "hex"); + const executableLength = original.length - 2 - original.readUInt16BE(original.length - 2); + const declared = new Set(groups.flatMap(([, slots]) => slots.flatMap(({ start, length }) => + Array.from({ length }, (_, offset) => start + offset)))); + let position = -1; + for (let i = 0; i + 1 < executableLength; i++) { + if (original[i] === 0 && original[i + 1] === 0 && !declared.has(i) && !declared.has(i + 1)) { + position = i; + break; + } + } + assert.ok(position >= 0, "The fixture needs zero bytes outside immutable references"); + for (const runtime of [localRuntime, substitute()]) { + const bytes = Buffer.from(runtime.slice(2), "hex"); + bytes.writeUInt16BE(600, position); + const result = compareRuntime(localRuntime, "0x" + bytes.toString("hex"), references); + assert.equal(result.fullMatch, false); + assert.equal(result.executableMatch, false); + assert.equal(result.immutableMatch, false); + assert.equal(result.substitutedFullMatch, false); + } +}); + +test("zero-byte differences without compiler references cannot pass verification", () => { + const result = compareRuntime(localRuntime, substitute()); + assert.equal(result.immutableMatch, false); + assert.equal(result.substitutedFullMatch, false); +}); + +test("a metadata-only mismatch remains executable-only rather than becoming an immutable match", () => { + const result = compareRuntime(localRuntime, changeMetadata(localRuntime), references); + assert.equal(result.fullMatch, false); + assert.equal(result.executableMatch, true); + assert.equal(result.metadataMatch, false); + assert.equal(result.immutableMatch, false); + assert.equal(result.substitutedFullMatch, false); +}); + +test("immutable substitution does not hide a metadata mismatch", () => { + const result = compareRuntime(localRuntime, changeMetadata(substitute()), references); + assert.equal(result.immutableMatch, true); + assert.equal(result.metadataMatch, false); + assert.equal(result.fullMatch, false); + assert.equal(result.substitutedFullMatch, false); +}); + +test("invalid or overlapping immutable ranges cannot authorize a match", () => { + const slot = groups[0][1][0]; + for (const invalid of [ + { invalid: [{ start: -1, length: 32 }] }, + { invalid: [{ start: 1.5, length: 32 }] }, + { invalid: [{ start: 0, length: 0 }] }, + { invalid: [{ start: artifact.object.length / 2, length: 32 }] }, + { ...references, duplicate: [slot] }, + { ...references, overlap: [{ start: slot.start + 1, length: slot.length }] }, + ]) { + const result = compareRuntime(localRuntime, substitute(), invalid); + assert.equal(result.immutableMatch, false); + assert.equal(result.substitutedFullMatch, false); + } +}); + +test("saved Sepolia runtime matches declared immutable values but not the saved compiler metadata", () => { + const deployed = fs.readFileSync(new URL(evidence.href + "-runtime.hex"), "utf8").trim(); + const result = compareRuntime(localRuntime, deployed, references); + assert.equal(result.immutableMatch, true); + assert.equal(result.fullMatch, false); + assert.equal(result.executableMatch, false); + assert.equal(result.metadataMatch, false); + assert.equal(result.substitutedFullMatch, false); + const bytes = Buffer.from(deployed.slice(2), "hex"); + for (const [, slots] of groups) { + for (const { start, length } of slots) { + assert.equal(BigInt("0x" + bytes.subarray(start, start + length).toString("hex")), 600n); + } + } +});