feat: add WCT token, balance operation, fix disconnect timeout#16
Merged
feat: add WCT token, balance operation, fix disconnect timeout#16
Conversation
Add WCT token (0xeF4461891DfB3AC8572cCf7C794664A8DD927945) to the Optimism token registry, enabling fund/drain with --token wct. Add balance CWP operation that returns native ETH + all registered ERC-20 balances for an account on a chain, making it possible to verify funds before staking. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The WalletConnect relay disconnect and WebSocket transport close can block for 30s+ waiting for acknowledgment. Add 5s and 3s timeouts respectively so CLI commands exit promptly after transactions complete. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
eip155:10) to the token registry, enablingfund --token wctanddrain --token wct. AddbalanceCWP operation that returns native ETH + all registered ERC-20 balances for an account on a chain.disconnect()(5s) andtransportClose()(3s) to prevent 30s+ hangs after transactions complete.Together these changes make the companion-wallet fully usable with staking-cli: fund WCT, check balances, then stake.
Test plan
npm run build— all 3 packages buildnpm run test— 142 tests pass (includes 6 new token tests + updated capabilities test)npm run lint— cleanwalletconnect-staking stake 0.1 1 --wallet companionsuccessfully (approve + createLock on Optimism mainnet)companion-wallet balancereturns ETH, USDC, WCT balances on Optimism🤖 Generated with Claude Code