cyclofinance / cyclofinance/cyclo.sol

Pull cyToken `decimals` from on-chain instead of canonical JSON

Open
#44 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Solidity
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Each entry in `cyclo.sol/canonical/cyclo-site-tokens.json` carries the vault's `decimals` as a hardcoded number. The vault is an ERC20 with a `decimals()` accessor — read it via `readContract({ functionName: 'decimals' })` keyed by `(chainId, vaultAddress)`, cache, and drop the `decimals` field from the canonical JSON. Eliminates one drift surface and unblocks part of cyclofinance/cyclo.site#373.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with cyclo.sol/canonical/cyclo-site-tokens.json and search the repository for the code that reads each entry and calls readContract. Trace how chainId and vaultAddress are available, then verify the fetched decimals are cached by that pair and that consumers no longer depend on the JSON field. Done means the canonical entries omit decimals and the on-chain value is used.

Written by the indexing model from the issue text.

Assessment

Tech stack
solidity
Domain
blockchain
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.