-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Context
Arweave puzzle weave9 has a prize of 100 DAI (ERC-20 token on Ethereum), not ETH. The current data model uses Chain enum to imply both the blockchain and the currency, which breaks for ERC-20 tokens — chain: "ethereum" with prize: 100 would be misread as 100 ETH.
Problem
The Chain enum serves double duty:
- Blockchain the address lives on (Ethereum)
- Currency of the prize (implicitly ETH for Ethereum)
For ERC-20 tokens these diverge — the address is on Ethereum but the prize is in DAI.
Proposal
Add an optional currency field to the puzzle data model:
Affected files:
src/puzzle.rs— addcurrency: Option<&'static str>fieldbuild.rs— codegen for currency fielddata/schemas/definitions.schema.json— add currency to schemadata/arweave.jsonc— add weave9 entry with currency fieldsrc/cli.rs— display currency in stats/show output
Blocked puzzle
- weave9: chain Ethereum, address
0x6f85d220c70abb69a1205b96b566c1ed5d9c3831, prize 100 DAI, status claimed (2020-06-08), sourcehttps://arweave.net/1--NRFY3naNwTlxBSRjzDPNUq-Cn1yLG2RmgGHZem9c
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
{ "name": "weave9", "chain": "ethereum", "currency": "dai", // new field, defaults to chain's native token if absent "prize": 100, // ... }