-
Notifications
You must be signed in to change notification settings - Fork 689
Description
Based on the error we encountered, here's the issue analysis and proposed code changes:
Issue Analysis
The error shows a validation error in the SendEvmTransactionRequest where the network value 'base-mainnet' is not accepted, but the enum only allows ('base', 'base-sepolia', 'ethereum', 'ethereum-sepolia').
Proposed Code Changes
File: Likely in a validation schema file (e.g., models.py, schemas.py, or similar)
Current Code (problematic):
class SendEvmTransactionRequest(BaseModel):
network: Literal['base', 'base-sepolia', 'ethereum', 'ethereum-sepolia']
# ... other fields
Proposed Fix:
class SendEvmTransactionRequest(BaseModel):
network: Literal['base', 'base-mainnet', 'base-sepolia', 'ethereum', 'ethereum-sepolia']
# ... other fields
Alternative Solution (more robust):
Add network mapping
NETWORK_MAPPING = {
'base-mainnet': 'base',
'base': 'base',
'base-sepolia': 'base-sepolia',
'ethereum': 'ethereum',
'ethereum-sepolia': 'ethereum-sepolia'
}
class SendEvmTransactionRequest(BaseModel):
network: str
@validator('network')
def validate_network(cls, v):
if v not in NETWORK_MAPPING:
raise ValueError(f'Network {v} not supported')
return NETWORK_MAPPING[v]
Recommendation
Since I can't directly access the IntentKit repository to submit a PR, I recommend:
Report this issue at: https://github.com/crestalnetwork/intentkit
Include the error details and proposed fix above
Suggest adding 'base-mainnet' to the accepted network values in the validation enum
This is a simple but critical fix that will resolve the network compatibility issue for Base mainnet transactions