Skip to content

Take native currency metadata from the EIP-155 chain list (POL, CELO, ...) - #19

Merged
llbartekll merged 1 commit into
llbartekll:mainfrom
manuelwedler:fix/native-currency-chainid-network
Oct 21, 2026
Merged

llbartekll merged 1 commit into
llbartekll:mainfrom
manuelwedler:fix/native-currency-chainid-network

Conversation

@manuelwedler

Copy link
Copy Markdown
Contributor

Problem

native_token_meta used a short hand-written table:

  • Chain 137 rendered the native currency as MATIC. Polygon renamed it to POL, and the EIP-155 chain list uses POL.
  • A chain that is not in the table fell back to ETH. For example, Celo (42220) showed 448 ETH and Gnosis (100) showed ETH and not XDAI.

The @ethereum-sourcify/clear-signing runner takes these values from chainid.network/chains_mini.json. Thus the registry CI shows the Rust job red and the Sourcify job green for the same descriptor. Examples:

Change

  • scripts/generate_native_currencies.py generates crates/clear-signing/src/native_currencies.rs from chains_mini.json. The file is a sorted static array of (chain_id, symbol, name, decimals) with 2,821 chains.
  • native_token_meta does a binary search on that array. It also takes decimals from the list, as Sourcify does.
  • An unknown chain still falls back to ETH with 18 decimals, so the behavior for unknown chains does not change.

Notes

  • The generated file is about 100 KB of source, and its data goes into the binary. If that is too large for the mobile bindings, we can filter the list, for example to the chains that the registry uses. Tell me if you prefer that.
  • Some test chains also change to the values in the list, for example 97 to tBNB and 421613 to AGOR.
  • chain_name does not change in this PR. PR Render chainId values with EIP-155 reference names #18 handles it.

Tests

  • I updated test_native_token_meta (137 → POL, and new checks for 80001 MATIC, 42220 CELO and 100 XDAI) and the QuickSwap integration test (108 POL).
  • I added a test that makes sure the generated table is sorted.
  • cargo test --workspace --locked passes.
  • I ran cs-test on all testsv2 files of registry master:
    • before: 15 failures
    • after: 3 failures, and the change causes no new failures
    • The 3 remaining failures do not come from the native currency.
  • The registry PRs listed above now pass with cs-test.

native_token_meta used a short hand-written table. Chain 137 rendered as
MATIC (now POL), and chains not in the table, such as Celo (42220) and
Gnosis (100), rendered as ETH. Generate the table from
chainid.network/chains_mini.json, the source that the Sourcify runner uses.
@llbartekll
llbartekll merged commit 8eae8b5 into llbartekll:main Oct 21, 2026
2 of 3 checks passed
llbartekll added a commit that referenced this pull request Oct 21, 2026
…22)

* fix: match an interpolation placeholder for one element of an array field

A placeholder such as {_swapData.[0].fromAmount} did not match the
display field _swapData.[].fromAmount, so the whole interpolatedIntent
was dropped. When no field matches exactly, match the array field and
format the named element with its format and element-scoped params.

* ci: update android-actions/setup-android to v4 (#24)

Google no longer serves the legacy SDK package 'tools'. setup-android v3
installs 'tools platform-tools' by default, so sdkmanager fails with
"Failed to find package 'tools'" and the Android job is red on every PR.
v4 installs only 'platform-tools' (fix in v4.0.2).

* fix: take native currency metadata from the EIP-155 chain list (#19)

native_token_meta used a short hand-written table. Chain 137 rendered as
MATIC (now POL), and chains not in the table, such as Celo (42220) and
Gnosis (100), rendered as ETH. Generate the table from
chainid.network/chains_mini.json, the source that the Sourcify runner uses.

* fix: render calldata fields on array paths as nested calls (#20)

A calldata field with an array path (calls.[].data) went through
format_value and rendered raw hex, and the resolver did not load the
descriptors of the inner calls. Render each element with the nested
calldata renderer in the calldata and EIP-712 flows, expand array data
paths in the resolver, and scope all element-relative path params
(calleePath, amountPath, spenderPath, selectorPath, chainIdPath,
collectionPath) to the element, not only tokenPath.

---------

Co-authored-by: Bartosz Rozwarski <bartus000@gmail.com>
llbartekll added a commit that referenced this pull request Oct 21, 2026
…23)

* fix: accept definitions without a label and apply the $ref label

A display definition without label failed to parse ('data did not match
any variant of untagged enum DisplayField'), so the whole descriptor was
rejected. The schema does not require label, and a reference's label
overrides the definition's. Make Simple.label default to empty, and add
the optional label to Reference and apply it when the reference expands.

* ci: update android-actions/setup-android to v4 (#24)

Google no longer serves the legacy SDK package 'tools'. setup-android v3
installs 'tools platform-tools' by default, so sdkmanager fails with
"Failed to find package 'tools'" and the Android job is red on every PR.
v4 installs only 'platform-tools' (fix in v4.0.2).

* fix: take native currency metadata from the EIP-155 chain list (#19)

native_token_meta used a short hand-written table. Chain 137 rendered as
MATIC (now POL), and chains not in the table, such as Celo (42220) and
Gnosis (100), rendered as ETH. Generate the table from
chainid.network/chains_mini.json, the source that the Sourcify runner uses.

* fix: render calldata fields on array paths as nested calls (#20)

A calldata field with an array path (calls.[].data) went through
format_value and rendered raw hex, and the resolver did not load the
descriptors of the inner calls. Render each element with the nested
calldata renderer in the calldata and EIP-712 flows, expand array data
paths in the resolver, and scope all element-relative path params
(calleePath, amountPath, spenderPath, selectorPath, chainIdPath,
collectionPath) to the element, not only tokenPath.

* Match an interpolation placeholder for one element of an array field (#22)

* fix: match an interpolation placeholder for one element of an array field

A placeholder such as {_swapData.[0].fromAmount} did not match the
display field _swapData.[].fromAmount, so the whole interpolatedIntent
was dropped. When no field matches exactly, match the array field and
format the named element with its format and element-scoped params.

* ci: update android-actions/setup-android to v4 (#24)

Google no longer serves the legacy SDK package 'tools'. setup-android v3
installs 'tools platform-tools' by default, so sdkmanager fails with
"Failed to find package 'tools'" and the Android job is red on every PR.
v4 installs only 'platform-tools' (fix in v4.0.2).

* fix: take native currency metadata from the EIP-155 chain list (#19)

native_token_meta used a short hand-written table. Chain 137 rendered as
MATIC (now POL), and chains not in the table, such as Celo (42220) and
Gnosis (100), rendered as ETH. Generate the table from
chainid.network/chains_mini.json, the source that the Sourcify runner uses.

* fix: render calldata fields on array paths as nested calls (#20)

A calldata field with an array path (calls.[].data) went through
format_value and rendered raw hex, and the resolver did not load the
descriptors of the inner calls. Render each element with the nested
calldata renderer in the calldata and EIP-712 flows, expand array data
paths in the resolver, and scope all element-relative path params
(calleePath, amountPath, spenderPath, selectorPath, chainIdPath,
collectionPath) to the element, not only tokenPath.

---------

Co-authored-by: Bartosz Rozwarski <bartus000@gmail.com>

---------

Co-authored-by: Bartosz Rozwarski <bartus000@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
llbartekll added a commit that referenced this pull request Oct 21, 2026
* Render chainId values with EIP-155 reference names (#14)

The spec defines the chainId format as converting the value "to a
Blockchain name using EIP-155 reference values", with "Ethereum Mainnet"
as the example for 1. Use the `name` fields from the chainid.network
EIP-155 list, so 137 renders as "Polygon Mainnet" instead of "Polygon"
and matches @ethereum-sourcify/clear-signing.

Adds a calldata/EIP-712 parity test for the chainId format.

* ci: update android-actions/setup-android to v4 (#24)

Google no longer serves the legacy SDK package 'tools'. setup-android v3
installs 'tools platform-tools' by default, so sdkmanager fails with
"Failed to find package 'tools'" and the Android job is red on every PR.
v4 installs only 'platform-tools' (fix in v4.0.2).

* fix: take native currency metadata from the EIP-155 chain list (#19)

native_token_meta used a short hand-written table. Chain 137 rendered as
MATIC (now POL), and chains not in the table, such as Celo (42220) and
Gnosis (100), rendered as ETH. Generate the table from
chainid.network/chains_mini.json, the source that the Sourcify runner uses.

* fix: render calldata fields on array paths as nested calls (#20)

A calldata field with an array path (calls.[].data) went through
format_value and rendered raw hex, and the resolver did not load the
descriptors of the inner calls. Render each element with the nested
calldata renderer in the calldata and EIP-712 flows, expand array data
paths in the resolver, and scope all element-relative path params
(calleePath, amountPath, spenderPath, selectorPath, chainIdPath,
collectionPath) to the element, not only tokenPath.

* Match an interpolation placeholder for one element of an array field (#22)

* fix: match an interpolation placeholder for one element of an array field

A placeholder such as {_swapData.[0].fromAmount} did not match the
display field _swapData.[].fromAmount, so the whole interpolatedIntent
was dropped. When no field matches exactly, match the array field and
format the named element with its format and element-scoped params.

* ci: update android-actions/setup-android to v4 (#24)

Google no longer serves the legacy SDK package 'tools'. setup-android v3
installs 'tools platform-tools' by default, so sdkmanager fails with
"Failed to find package 'tools'" and the Android job is red on every PR.
v4 installs only 'platform-tools' (fix in v4.0.2).

* fix: take native currency metadata from the EIP-155 chain list (#19)

native_token_meta used a short hand-written table. Chain 137 rendered as
MATIC (now POL), and chains not in the table, such as Celo (42220) and
Gnosis (100), rendered as ETH. Generate the table from
chainid.network/chains_mini.json, the source that the Sourcify runner uses.

* fix: render calldata fields on array paths as nested calls (#20)

A calldata field with an array path (calls.[].data) went through
format_value and rendered raw hex, and the resolver did not load the
descriptors of the inner calls. Render each element with the nested
calldata renderer in the calldata and EIP-712 flows, expand array data
paths in the resolver, and scope all element-relative path params
(calleePath, amountPath, spenderPath, selectorPath, chainIdPath,
collectionPath) to the element, not only tokenPath.

---------

Co-authored-by: Bartosz Rozwarski <bartus000@gmail.com>

* Accept definitions without a label and apply the $ref label override (#23)

* fix: accept definitions without a label and apply the $ref label

A display definition without label failed to parse ('data did not match
any variant of untagged enum DisplayField'), so the whole descriptor was
rejected. The schema does not require label, and a reference's label
overrides the definition's. Make Simple.label default to empty, and add
the optional label to Reference and apply it when the reference expands.

* ci: update android-actions/setup-android to v4 (#24)

Google no longer serves the legacy SDK package 'tools'. setup-android v3
installs 'tools platform-tools' by default, so sdkmanager fails with
"Failed to find package 'tools'" and the Android job is red on every PR.
v4 installs only 'platform-tools' (fix in v4.0.2).

* fix: take native currency metadata from the EIP-155 chain list (#19)

native_token_meta used a short hand-written table. Chain 137 rendered as
MATIC (now POL), and chains not in the table, such as Celo (42220) and
Gnosis (100), rendered as ETH. Generate the table from
chainid.network/chains_mini.json, the source that the Sourcify runner uses.

* fix: render calldata fields on array paths as nested calls (#20)

A calldata field with an array path (calls.[].data) went through
format_value and rendered raw hex, and the resolver did not load the
descriptors of the inner calls. Render each element with the nested
calldata renderer in the calldata and EIP-712 flows, expand array data
paths in the resolver, and scope all element-relative path params
(calleePath, amountPath, spenderPath, selectorPath, chainIdPath,
collectionPath) to the element, not only tokenPath.

* Match an interpolation placeholder for one element of an array field (#22)

* fix: match an interpolation placeholder for one element of an array field

A placeholder such as {_swapData.[0].fromAmount} did not match the
display field _swapData.[].fromAmount, so the whole interpolatedIntent
was dropped. When no field matches exactly, match the array field and
format the named element with its format and element-scoped params.

* ci: update android-actions/setup-android to v4 (#24)

Google no longer serves the legacy SDK package 'tools'. setup-android v3
installs 'tools platform-tools' by default, so sdkmanager fails with
"Failed to find package 'tools'" and the Android job is red on every PR.
v4 installs only 'platform-tools' (fix in v4.0.2).

* fix: take native currency metadata from the EIP-155 chain list (#19)

native_token_meta used a short hand-written table. Chain 137 rendered as
MATIC (now POL), and chains not in the table, such as Celo (42220) and
Gnosis (100), rendered as ETH. Generate the table from
chainid.network/chains_mini.json, the source that the Sourcify runner uses.

* fix: render calldata fields on array paths as nested calls (#20)

A calldata field with an array path (calls.[].data) went through
format_value and rendered raw hex, and the resolver did not load the
descriptors of the inner calls. Render each element with the nested
calldata renderer in the calldata and EIP-712 flows, expand array data
paths in the resolver, and scope all element-relative path params
(calleePath, amountPath, spenderPath, selectorPath, chainIdPath,
collectionPath) to the element, not only tokenPath.

---------

Co-authored-by: Bartosz Rozwarski <bartus000@gmail.com>

---------

Co-authored-by: Bartosz Rozwarski <bartus000@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* style: cargo fmt

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Manuel Wedler <manuel@wedler.dev>
Co-authored-by: Bartosz Rozwarski <bartus000@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
llbartekll added a commit that referenced this pull request Oct 21, 2026
* fix: fall back to the raw token ID for an unknown NFT collection

ERC-7730 nftName: 'fallback to a raw int token ID if not' found. Both
flows rendered '#<id>' when the collection name was unknown, and the
EIP-712 flow did so also when no collection address resolved.

* ci: update android-actions/setup-android to v4 (#24)

Google no longer serves the legacy SDK package 'tools'. setup-android v3
installs 'tools platform-tools' by default, so sdkmanager fails with
"Failed to find package 'tools'" and the Android job is red on every PR.
v4 installs only 'platform-tools' (fix in v4.0.2).

* fix: take native currency metadata from the EIP-155 chain list (#19)

native_token_meta used a short hand-written table. Chain 137 rendered as
MATIC (now POL), and chains not in the table, such as Celo (42220) and
Gnosis (100), rendered as ETH. Generate the table from
chainid.network/chains_mini.json, the source that the Sourcify runner uses.

* fix: render calldata fields on array paths as nested calls (#20)

A calldata field with an array path (calls.[].data) went through
format_value and rendered raw hex, and the resolver did not load the
descriptors of the inner calls. Render each element with the nested
calldata renderer in the calldata and EIP-712 flows, expand array data
paths in the resolver, and scope all element-relative path params
(calleePath, amountPath, spenderPath, selectorPath, chainIdPath,
collectionPath) to the element, not only tokenPath.

* Match an interpolation placeholder for one element of an array field (#22)

* fix: match an interpolation placeholder for one element of an array field

A placeholder such as {_swapData.[0].fromAmount} did not match the
display field _swapData.[].fromAmount, so the whole interpolatedIntent
was dropped. When no field matches exactly, match the array field and
format the named element with its format and element-scoped params.

* ci: update android-actions/setup-android to v4 (#24)

Google no longer serves the legacy SDK package 'tools'. setup-android v3
installs 'tools platform-tools' by default, so sdkmanager fails with
"Failed to find package 'tools'" and the Android job is red on every PR.
v4 installs only 'platform-tools' (fix in v4.0.2).

* fix: take native currency metadata from the EIP-155 chain list (#19)

native_token_meta used a short hand-written table. Chain 137 rendered as
MATIC (now POL), and chains not in the table, such as Celo (42220) and
Gnosis (100), rendered as ETH. Generate the table from
chainid.network/chains_mini.json, the source that the Sourcify runner uses.

* fix: render calldata fields on array paths as nested calls (#20)

A calldata field with an array path (calls.[].data) went through
format_value and rendered raw hex, and the resolver did not load the
descriptors of the inner calls. Render each element with the nested
calldata renderer in the calldata and EIP-712 flows, expand array data
paths in the resolver, and scope all element-relative path params
(calleePath, amountPath, spenderPath, selectorPath, chainIdPath,
collectionPath) to the element, not only tokenPath.

---------

Co-authored-by: Bartosz Rozwarski <bartus000@gmail.com>

* Accept definitions without a label and apply the $ref label override (#23)

* fix: accept definitions without a label and apply the $ref label

A display definition without label failed to parse ('data did not match
any variant of untagged enum DisplayField'), so the whole descriptor was
rejected. The schema does not require label, and a reference's label
overrides the definition's. Make Simple.label default to empty, and add
the optional label to Reference and apply it when the reference expands.

* ci: update android-actions/setup-android to v4 (#24)

Google no longer serves the legacy SDK package 'tools'. setup-android v3
installs 'tools platform-tools' by default, so sdkmanager fails with
"Failed to find package 'tools'" and the Android job is red on every PR.
v4 installs only 'platform-tools' (fix in v4.0.2).

* fix: take native currency metadata from the EIP-155 chain list (#19)

native_token_meta used a short hand-written table. Chain 137 rendered as
MATIC (now POL), and chains not in the table, such as Celo (42220) and
Gnosis (100), rendered as ETH. Generate the table from
chainid.network/chains_mini.json, the source that the Sourcify runner uses.

* fix: render calldata fields on array paths as nested calls (#20)

A calldata field with an array path (calls.[].data) went through
format_value and rendered raw hex, and the resolver did not load the
descriptors of the inner calls. Render each element with the nested
calldata renderer in the calldata and EIP-712 flows, expand array data
paths in the resolver, and scope all element-relative path params
(calleePath, amountPath, spenderPath, selectorPath, chainIdPath,
collectionPath) to the element, not only tokenPath.

* Match an interpolation placeholder for one element of an array field (#22)

* fix: match an interpolation placeholder for one element of an array field

A placeholder such as {_swapData.[0].fromAmount} did not match the
display field _swapData.[].fromAmount, so the whole interpolatedIntent
was dropped. When no field matches exactly, match the array field and
format the named element with its format and element-scoped params.

* ci: update android-actions/setup-android to v4 (#24)

Google no longer serves the legacy SDK package 'tools'. setup-android v3
installs 'tools platform-tools' by default, so sdkmanager fails with
"Failed to find package 'tools'" and the Android job is red on every PR.
v4 installs only 'platform-tools' (fix in v4.0.2).

* fix: take native currency metadata from the EIP-155 chain list (#19)

native_token_meta used a short hand-written table. Chain 137 rendered as
MATIC (now POL), and chains not in the table, such as Celo (42220) and
Gnosis (100), rendered as ETH. Generate the table from
chainid.network/chains_mini.json, the source that the Sourcify runner uses.

* fix: render calldata fields on array paths as nested calls (#20)

A calldata field with an array path (calls.[].data) went through
format_value and rendered raw hex, and the resolver did not load the
descriptors of the inner calls. Render each element with the nested
calldata renderer in the calldata and EIP-712 flows, expand array data
paths in the resolver, and scope all element-relative path params
(calleePath, amountPath, spenderPath, selectorPath, chainIdPath,
collectionPath) to the element, not only tokenPath.

---------

Co-authored-by: Bartosz Rozwarski <bartus000@gmail.com>

---------

Co-authored-by: Bartosz Rozwarski <bartus000@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* Render chainId values with EIP-155 reference names (#18)

* Render chainId values with EIP-155 reference names (#14)

The spec defines the chainId format as converting the value "to a
Blockchain name using EIP-155 reference values", with "Ethereum Mainnet"
as the example for 1. Use the `name` fields from the chainid.network
EIP-155 list, so 137 renders as "Polygon Mainnet" instead of "Polygon"
and matches @ethereum-sourcify/clear-signing.

Adds a calldata/EIP-712 parity test for the chainId format.

* ci: update android-actions/setup-android to v4 (#24)

Google no longer serves the legacy SDK package 'tools'. setup-android v3
installs 'tools platform-tools' by default, so sdkmanager fails with
"Failed to find package 'tools'" and the Android job is red on every PR.
v4 installs only 'platform-tools' (fix in v4.0.2).

* fix: take native currency metadata from the EIP-155 chain list (#19)

native_token_meta used a short hand-written table. Chain 137 rendered as
MATIC (now POL), and chains not in the table, such as Celo (42220) and
Gnosis (100), rendered as ETH. Generate the table from
chainid.network/chains_mini.json, the source that the Sourcify runner uses.

* fix: render calldata fields on array paths as nested calls (#20)

A calldata field with an array path (calls.[].data) went through
format_value and rendered raw hex, and the resolver did not load the
descriptors of the inner calls. Render each element with the nested
calldata renderer in the calldata and EIP-712 flows, expand array data
paths in the resolver, and scope all element-relative path params
(calleePath, amountPath, spenderPath, selectorPath, chainIdPath,
collectionPath) to the element, not only tokenPath.

* Match an interpolation placeholder for one element of an array field (#22)

* fix: match an interpolation placeholder for one element of an array field

A placeholder such as {_swapData.[0].fromAmount} did not match the
display field _swapData.[].fromAmount, so the whole interpolatedIntent
was dropped. When no field matches exactly, match the array field and
format the named element with its format and element-scoped params.

* ci: update android-actions/setup-android to v4 (#24)

Google no longer serves the legacy SDK package 'tools'. setup-android v3
installs 'tools platform-tools' by default, so sdkmanager fails with
"Failed to find package 'tools'" and the Android job is red on every PR.
v4 installs only 'platform-tools' (fix in v4.0.2).

* fix: take native currency metadata from the EIP-155 chain list (#19)

native_token_meta used a short hand-written table. Chain 137 rendered as
MATIC (now POL), and chains not in the table, such as Celo (42220) and
Gnosis (100), rendered as ETH. Generate the table from
chainid.network/chains_mini.json, the source that the Sourcify runner uses.

* fix: render calldata fields on array paths as nested calls (#20)

A calldata field with an array path (calls.[].data) went through
format_value and rendered raw hex, and the resolver did not load the
descriptors of the inner calls. Render each element with the nested
calldata renderer in the calldata and EIP-712 flows, expand array data
paths in the resolver, and scope all element-relative path params
(calleePath, amountPath, spenderPath, selectorPath, chainIdPath,
collectionPath) to the element, not only tokenPath.

---------

Co-authored-by: Bartosz Rozwarski <bartus000@gmail.com>

* Accept definitions without a label and apply the $ref label override (#23)

* fix: accept definitions without a label and apply the $ref label

A display definition without label failed to parse ('data did not match
any variant of untagged enum DisplayField'), so the whole descriptor was
rejected. The schema does not require label, and a reference's label
overrides the definition's. Make Simple.label default to empty, and add
the optional label to Reference and apply it when the reference expands.

* ci: update android-actions/setup-android to v4 (#24)

Google no longer serves the legacy SDK package 'tools'. setup-android v3
installs 'tools platform-tools' by default, so sdkmanager fails with
"Failed to find package 'tools'" and the Android job is red on every PR.
v4 installs only 'platform-tools' (fix in v4.0.2).

* fix: take native currency metadata from the EIP-155 chain list (#19)

native_token_meta used a short hand-written table. Chain 137 rendered as
MATIC (now POL), and chains not in the table, such as Celo (42220) and
Gnosis (100), rendered as ETH. Generate the table from
chainid.network/chains_mini.json, the source that the Sourcify runner uses.

* fix: render calldata fields on array paths as nested calls (#20)

A calldata field with an array path (calls.[].data) went through
format_value and rendered raw hex, and the resolver did not load the
descriptors of the inner calls. Render each element with the nested
calldata renderer in the calldata and EIP-712 flows, expand array data
paths in the resolver, and scope all element-relative path params
(calleePath, amountPath, spenderPath, selectorPath, chainIdPath,
collectionPath) to the element, not only tokenPath.

* Match an interpolation placeholder for one element of an array field (#22)

* fix: match an interpolation placeholder for one element of an array field

A placeholder such as {_swapData.[0].fromAmount} did not match the
display field _swapData.[].fromAmount, so the whole interpolatedIntent
was dropped. When no field matches exactly, match the array field and
format the named element with its format and element-scoped params.

* ci: update android-actions/setup-android to v4 (#24)

Google no longer serves the legacy SDK package 'tools'. setup-android v3
installs 'tools platform-tools' by default, so sdkmanager fails with
"Failed to find package 'tools'" and the Android job is red on every PR.
v4 installs only 'platform-tools' (fix in v4.0.2).

* fix: take native currency metadata from the EIP-155 chain list (#19)

native_token_meta used a short hand-written table. Chain 137 rendered as
MATIC (now POL), and chains not in the table, such as Celo (42220) and
Gnosis (100), rendered as ETH. Generate the table from
chainid.network/chains_mini.json, the source that the Sourcify runner uses.

* fix: render calldata fields on array paths as nested calls (#20)

A calldata field with an array path (calls.[].data) went through
format_value and rendered raw hex, and the resolver did not load the
descriptors of the inner calls. Render each element with the nested
calldata renderer in the calldata and EIP-712 flows, expand array data
paths in the resolver, and scope all element-relative path params
(calleePath, amountPath, spenderPath, selectorPath, chainIdPath,
collectionPath) to the element, not only tokenPath.

---------

Co-authored-by: Bartosz Rozwarski <bartus000@gmail.com>

---------

Co-authored-by: Bartosz Rozwarski <bartus000@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* style: cargo fmt

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Manuel Wedler <manuel@wedler.dev>
Co-authored-by: Bartosz Rozwarski <bartus000@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Bartosz Rozwarski <bartus000@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: RyukTheCoder <154742563+RyukTheCoder@users.noreply.github.com>
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.

2 participants