How slvler/etherscan-service works
Main Components
a. Client Application Layer
• Represents the Laravel application using this package
b. Package Core Components
• EtherServiceProvider (Main service provider)
• EtherScanService (Core service class)
• Resource handlers (Balance)
• Exception handlers
c. External Service Layer
• Etherscan.io API
[Client Laravel Application]
• ↓
[EtherServiceProvider]
• ↓
[EtherScanService]
• ↙ ↓ ↘
[Balance] [Exceptions] [Config]
• ↓
[Etherscan.io API]
Component Details
• Blue: Client application
• Green: Package core components
• Yellow: Resource handlers
• Red: Exception handlers
• Purple: External API service
• Gray: Configuration components
b. Connection Types:
Specific Elements
a. Service Provider Layer:
• EtherServiceProvider as the entry point
• Config binding process
• Service registration flow
b. Service Layer:
• EtherScanService with its main methods:
• balance()
• balance_multiple()
• transactions_normal()
• transactions_internal()
• etc.
c. Resource Handlers:
• Balance class and its relationship with the service
• Potential expansion points for future resources
d. Exception Handling:
• Three exception types:
• ErrorException
• MissingApiKey
• MissingArgumentException
e. Configuration:
• Config/etherscan.php integration
• Environment variable dependencies
Notes for Implementation
• Clear separation between package components and external services
• API integration points
• Error handling flow
• Configuration management process
Optional Additions
• Testing workflow integration