Skip to content

Conversation

@HAPPYS1NGH
Copy link
Contributor

🚀 Feature: Set Default EVM Address Method

Summary:
Added a new setDefaultEvmAddress method to the offchain-manager package that allows users to set the same EVM address across all EVM-compatible chains with a single method call.

Key Changes:

  • New Method: setDefaultEvmAddress(subname, address)
  • 🔗 EVM Chain Support: Automatically sets address for 17 EVM-compatible chains:
    • Ethereum, Arbitrum, Optimism, Base, Polygon, BSC, Avalanche, Gnosis, zkSync, Linea, Scroll, Unichain, Berachain, WorldChain, Zora, Celo, and Monad
  • 📚 Enhanced Documentation: Updated README with usage examples
  • 🧪 Example Integration: Added to basic-usage.ts example
  • 🏷️ Chain Metadata: Added evm flag to chain metadata for EVM compatibility identification

Technical Implementation:

  • Uses existing _setDefaultEthereumAddress private action
  • Leverages chain metadata filtering to identify EVM-compatible chains
  • Maintains backward compatibility with existing address record methods
  • Includes proper TypeScript types and JSDoc documentation

Benefits:

  • 🎯 Simplified UX: One method call instead of 17 individual calls
  • Performance: Batch operation for better efficiency
  • 🔒 Consistency: Ensures same address across all EVM chains
  • 📖 Developer Experience: Clear documentation and examples

Files Modified:

  • packages/offchain-manager/src/offchain-client/index.ts - Added public method
  • packages/offchain-manager/src/offchain-client/private-actions.ts - Added private implementation
  • packages/offchain-manager/src/dto/chains.ts - Enhanced chain metadata
  • packages/offchain-manager/README.md - Updated documentation
  • packages/offchain-manager/examples/basic-usage.ts - Added usage example

@HAPPYS1NGH HAPPYS1NGH requested a review from nenadmitt October 20, 2025 21:17
@HAPPYS1NGH
Copy link
Contributor Author

Changelog (if want to publish)

[1.0.8] - 2025-10-21

Added

  • Set Default EVM Address Method: Added setDefaultEvmAddress method to set a default EVM address for all EVM-compatible chains
  • Enhanced Chain Metadata: Added evm flag to chain metadata to indicate EVM compatibility for various chains
  • Comprehensive EVM Support: Method automatically sets address for 17 EVM-compatible chains (Ethereum, Arbitrum, Optimism, Base, Polygon, BSC, Avalanche, Gnosis, zkSync, Linea, Scroll, Unichain, Berachain, WorldChain, Zora, Celo, and Monad)

Enhanced

  • Developer Experience: Updated README.md with usage examples for the new setDefaultEvmAddress method
  • Documentation: Added comprehensive JSDoc documentation with examples
  • Examples: Updated basic-usage.ts to demonstrate the new functionality

"""
Format changelog input for proper markdown formatting.
This handles the conversion from single-line GitHub input to properly formatted markdown.
"""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@HAPPYS1NGH HAPPYS1NGH merged commit a5689c5 into release Oct 20, 2025
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