mirror of
https://github.com/luxfi/work-board.git
synced 2026-09-24 00:24:57 +00:00
`bounties(uint256)` returns eighteen components. This board declared thirteen, in an order that predates the reward asset being split from the stake asset. Every component is a static type, so the short list did not revert: it read thirteen words off the front of the answer and named them by the wrong list. Position 1 is `rewardKind`, an enum in 0..3, which came back as `token: 0x00…03`, and every address after it moved up one slot — funder read as approver, approver as arbiter, worker as a deadline. The board rendered, and credited the wrong people. The events were stale in the same way. `BountyProposed` carries ten parameters, not seven: `rewardKind`, `rewardTokenId` and `stakeToken` joined it when the assets were split, and with a seven-parameter fragment `issueRef` — the only dynamic member, so the one whose offset moves — decoded to noise. `BountyFunded` and `BountyCancelled` name their third parameter `reward`. `DisputeResolved`, `StakeSlashed` and `RewardRecovered` were not declared at all; `ActivityKind` already had names for two of them, so the activity log had been promising steps it could not read. All twelve lifecycle events are now read. The single `token` field is gone. A reward is `rewardKind` / `rewardToken` / `rewardTokenId` / `reward` and a stake is `stakeToken` / `stake`, because a reward may be an NFT while the worker's stake stays fungible. Both are read through one `Asset`, so the board can show a stake beside a reward without a second formatter. `parseReward` inferred the reward kind from whether the token address was zero; the kind is recorded now, so the inference is deleted rather than kept as a fallback, and `RewardType` takes the contract's name for it, `AssetKind`. `Task` stops carrying a derived copy of the reward: the render site reads it off the struct. `src/abi.test.ts` pins the eighteen names and types, then encodes a bounty whose every field differs and decodes it back through the fragment, so the order is measured by what it does and not only by what it says. Swapping funder and approver, dropping a component, or restoring the seven-parameter `BountyProposed` each fail it. Fixture rebuilt to the eighteen-field shape — in the old order it would have enshrined the decode it was written under. Its Pars address and the README's address tables were the superseded V1 set, which answers a different struct; both now name the deployment in lp-0020. Co-authored-by: Hanzo Dev <[email protected]>
39 lines
1.2 KiB
JSON
39 lines
1.2 KiB
JSON
{
|
|
"name": "work-board",
|
|
"private": true,
|
|
"version": "0.3.1",
|
|
"type": "module",
|
|
"description": "White-label on-chain community work platform (Zoo, Pars) \u2014 a Dework-style Overview / Board / Open Tasks / Leaderboards / Suggestions / task-detail surface reading the live Bounty / Escrow / Reputation / Karma work-market over JSON-RPC.",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "tsc --noEmit && vite build",
|
|
"test": "vitest run",
|
|
"preview": "vite preview"
|
|
},
|
|
"dependencies": {
|
|
"@hanzo/gui": "^8.3.1",
|
|
"@hanzogui/colors": "7.3.0",
|
|
"@hanzogui/config": "7.3.0",
|
|
"@hanzogui/core": "7.3.0",
|
|
"@hanzogui/lucide-icons-2": "7.3.0",
|
|
"@hanzogui/themes": "7.3.0",
|
|
"@hanzogui/web": "7.3.0",
|
|
"@luxfi/ui": "7.4.3",
|
|
"@tanstack/react-query": "^5.76.0",
|
|
"react": "^19.2.7",
|
|
"react-dom": "^19.2.7",
|
|
"react-native-web": "^0.21.0",
|
|
"viem": "^2.55.2"
|
|
},
|
|
"devDependencies": {
|
|
"@tailwindcss/vite": "^4.3.3",
|
|
"@types/react": "^19.2.17",
|
|
"@types/react-dom": "^19.2.3",
|
|
"@vitejs/plugin-react": "^6.0.3",
|
|
"tailwindcss": "^4.3.3",
|
|
"typescript": "^7.0.2",
|
|
"vite": "^8.1.5",
|
|
"vitest": "^4.1.11"
|
|
}
|
|
}
|