Repository navigation
feat: add name, symbol, and decimals to erc4626Abi - #5656
Merged
Merged
Conversation
|
@mortezashojaei is attempting to deploy a commit to the Wevm Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: 5f7dc38 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This was referenced Nov 24, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #5655
Why
EIP-4626 says vaults MUST implement ERC-20's optional metadata extensions.
erc4626Abialready includes the ERC-20 share functions (balanceOf,totalSupply,transfer, …) but notname,symbol, ordecimals. As a result,functionName: 'decimals'witherc4626Abifails to type-check and throwsAbiFunctionNotFoundErrorat runtime.Public code works around this by spreading the ABIs together (
[...erc20Abi, ...erc4626Abi]in gskril/evm-portfolio, fassko/flare-smart-accounts and 0xPolygon/polygon-agent-cli). Other projects switch toerc20Abifor these calls on the vault address (yearn/yearn.fi) or redeclare a vault ABI withdecimals()(yearn/vault-pnl-logs). Permalinks are in #5655.What
src/constants/abis.ts: addsdecimals() view returns (uint8),name() view returns (string)andsymbol() view returns (string)toerc4626Abi. They matcherc20Abiand keep the existing alphabetical order and key style.src/constants/abis.test.ts: updates the existingexports abisinline snapshot.Usage
Validation
SKIP_GLOBAL_SETUP=true pnpm test --run --update all src/constants/abis.test.ts, then the same command without--update all: 1 passed. The snapshot diff contains only the three new entries.tsc -p src/tsconfig.json --noEmit: passes.biome checkon the changed files: clean.decimals: number) and returnsSavings Dai/sDAI/18for sDAI andSteakhouse USDC/steakUSDC/18for steakUSDC.main'sabis.ts, thename,symbolanddecimalsentries are type errors.Compatibility
This only adds ABI entries. There are no new exports or dependencies. Code that spreads
erc20Abiintoerc4626Abikeeps working.AI assistance
I prepared this with help from an AI coding assistant (Claude Code). I reviewed the evidence, diff, and test results.