Skip to content

fix(CRYMAD): chain 7373 native currency is CMX-R, not CMX-U - #3194

Open
Cliffyclif wants to merge 4 commits into
DefiLlama:mainfrom
Cliffyclif:fix-crymad-l2-native-currency
Open

Cliffyclif wants to merge 4 commits into
DefiLlama:mainfrom
Cliffyclif:fix-crymad-l2-native-currency

Conversation

@Cliffyclif

Copy link
Copy Markdown
Contributor

Corrects the two CRYMAD Chain entries added in #2860. All three changes are factual fixes to
chains we operate, verified against the live RPCs today. No name or shortName is touched, so
the duplicate-key and existing-chain checks in validate-chain-files.js pass unchanged.

1. Chain 7373's native currency was wrong (the important one)

The L2 entry declared its native currency as CMX-U / "CRYMADX UTILITY". Chain 7373's native
coin is CMX-R
, the same coin as its L1. Wallets read this field to tell users which asset pays
gas, so the current entry tells them to expect a token that is not the gas asset.

CMX-U is not a native coin on any chain. It is issued per project by a factory contract deployed
at 0x12410649AeAaE5988F566Bb68B09028eE84508dB on 7373, which is verifiable as contract code on
that chain. Chain 1475's entry already correctly says CMX-R and is unchanged here.

2. Both chains support EIP-1559, which neither entry listed

Verified on both RPCs today:

chain 1475 chain 7373
baseFeePerGas in latest block 0x0 0x32
eth_maxPriorityFeePerGas 0x3b9aca00 0xf4240
eth_feeHistory returns baseFeePerGas returns baseFeePerGas

Chain 1475's base fee is zero by design, which is why it can look like a pre-1559 chain. The
opcode and the RPC surface are both present, so EIP1559 belongs in features.

3. Chain 7373 is an L2 of 1475 and was not marked as one

Added parent: { type: "L2", chain: "eip155-1475" }. Confirmed live: the OP Stack L1Block
predeploy at 0x4200000000000000000000000000000000000015 on 7373 reports an L1 block number that
tracks chain 1475's head exactly (both read 907951 at the time of checking). No bridges entry is
included, because we do not yet publish a public bridge UI and would rather list nothing than list
something that does not work.

Notes for the reviewer

  • Both files were checked against the rules in .github/scripts/validate-chain-files.js, including
    the shortName and name equality checks against the published rpcs.json, and the requirement
    that parent.chain already exists there. Chain 1475 is published, so the parent reference
    resolves.
  • The diff deliberately does not reformat the files. They do not satisfy the repository's Prettier
    config, but neither do the originals, and no workflow enforces Prettier on this directory.
  • shortName for 7373 stays CMX-U even though it now reads oddly against a CMX-R currency,
    because changing it is rejected by CI for an already-published chain. Happy to follow up
    separately if maintainers would prefer it renamed.

Chain 7373's native coin is CMX-R, the same coin as its L1. The entry declared
CMX-U, which is not a native coin on any chain: it is issued per project by a
factory contract on 7373. Wallets read nativeCurrency to name the gas asset.

Also marks 7373 as an L2 of eip155-1475 and records EIP1559 support, which the
chain has (baseFeePerGas is present and eth_feeHistory answers).
Chain 1475 supports EIP1559. Its base fee is zero by design, which makes it look
like a pre-1559 chain, but baseFeePerGas is present in every block and both
eth_maxPriorityFeePerGas and eth_feeHistory answer.
shortName still read CMX-U, the utility token on the other chain, so chainlist
would have published 7373 under the wrong ticker. cmxr-l2 matches the entry now
merged into ethereum-lists/chains. Also restores the end-of-file newline this
branch had dropped.
@myfxpaddy

Copy link
Copy Markdown

Friendly ping. This one is a correction rather than a new listing: chain 7373's native currency is CMX-R, not CMX-U. They are two different assets and the current entry attributes the wrong one.

Verifiable against the canonical registry, which has both chains merged:

curl -s https://chainid.network/chains.json | jq '.[] | select(.chainId==7373) | .nativeCurrency'

CI is green and the branch is still mergeable. Happy to rebase if it has gone stale.

The canonical entry merged in ethereum-lists/chains uses different values
for four fields. This brings them into line so the two sources agree.

  name           CRYMAD Chain Mainnet Network -> CRYMAD Chain
  nativeCurrency CRYMADX REAL                 -> CryMadX
  shortName      CMX-R                        -> cmxr
  explorer name  crymadchain explorers        -> CRYMAD Chain Explorer

Verify with:
  curl -s https://chainid.network/chains.json | jq '.[] | select(.chainId==1475)'
@Cliffyclif

Copy link
Copy Markdown
Contributor Author

Pushed one more commit to this branch, same class of fix.

Chain 1475's entry here disagreed with the canonical entry merged into ethereum-lists/chains in four places. This brings them into line:

field was now
name CRYMAD Chain Mainnet Network CRYMAD Chain
nativeCurrency.name CRYMADX REAL CryMadX
shortName CMX-R cmxr
explorer name crymadchain explorers CRYMAD Chain Explorer

Reproducible against the canonical source:

curl -s https://chainid.network/chains.json | jq '.[] | select(.chainId==1475)'

Happy to split this into its own PR if you would rather keep this one to the 7373 native currency correction.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants