feat: Implement Web3 Wallet Management & Transaction Infrastructure (#73)#751
Open
sureshchouksey8 wants to merge 2 commits into
Open
Conversation
|
Maintainer-facing review assist for #73 / PR #751. I am not claiming this bounty or asking maintainers to prefer a specific submitter. I checked the visible diff for PR #751 against the #73 acceptance criteria and the current What this PR appears to cover well:
Acceptance gaps I would resolve before marking #73 complete:
Suggested merge bar:
|
…racking (Spectral-Finance#73) Addresses reviewer feedback on PR Spectral-Finance#751: 1. Wallet Type System (WalletTypes): - Typed boundaries for :local, :hd, :hardware, :multisig wallets - Clear descriptive errors for unimplemented types (HD/BIP-32, hardware/Ledger, multisig/Safe) - Wallet record struct with chain_ids, label, metadata 2. Multi-Chain Balance Monitoring (BalanceMonitor): - GenServer polling ETH balances across Ethereum, Polygon, Arbitrum, Optimism, Base - Watch/unwatch API with configurable RPC endpoints per chain - BalanceLens for agent-facing balance queries 3. Transaction History Tracking (TransactionHistory): - ETS-backed recording of pending, confirmed, failed, replaced transactions - Per-address listing with chain_id filtering and pagination - TransactionHistoryLens for agent-facing history queries 4. Lazy Nonce Initialization (TransactionManager): - Decoupled wallet creation from live RPC dependency - Nonce only fetched on first actual transaction send - Allows wallet import/generation without network access 5. Enhanced CreateWalletPrism: - Wallet type selection with validation - Multi-chain balance registration on creation - Optional TransactionManager startup
Author
|
Thank you @MyTH-zyxeon for the thorough review assist! I have addressed all three acceptance gaps in the latest push: 1. Wallet Type Coverage:
2. Multi-Chain Balance & History:
3. Lazy Nonce Init (Decoupled from RPC):
All new modules include comprehensive unit tests. Ready for review! |
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.
Description
This PR implements a comprehensive, non-custodial Web3 Wallet Management and Transaction Infrastructure for the Lux framework (Issue #73).
Prior to this change, all agents shared a single global Ethereum account, which caused nonce conflicts, lacked privacy/isolation, stored credentials in plaintext, and had no resilience against stuck transactions or gas price fluctuations.
This implementation introduces:
secp256k1and Keccak-256 (EIP-55 checksummed).TransactionManager): Spawns a dedicated processor per wallet address to sequentially execute transactions with dynamic EIP-1559 gas pricing, nonce caching, and automatic speed-up gas escalations (+15% gas) if a transaction gets stuck.CreateWalletPrismandSendTransactionPrismto support multi-agent swarms.Changes
1. Web3 Infrastructure & Core Modules
2. Lux Prisms
3. Application supervisor Tree
Lux.Web3.TransactionManagerRegistryandLux.Web3.TransactionManagerSupervisorchild processes inLux.Application.Verification & Testing
The implementation has been verified with a complete unit test suite mocking blockchain state.
All tests can be executed via:
mix testBounty Payout Information
Please send the $2,000 bounty payout to the following PayPal link:
https://paypal.me/sureshc26