def __init__(self, rpc_url: str, request_params: Optional[dict] = None) -> None
request_params = {
"proxies": {
"http": "http://localhost:<ProxyPort>",
"https": "http://localhost:<ProxyPort>"
}
}
from poseidon.evm import Chain
# 直接连接
chain = Chain("https://eth-sepolia.g.alchemy.com/v2/YOUR-API-KEY")
# 使用代理连接
proxy_params = {
"proxies": {
"http": "http://localhost:7890",
"https": "http://localhost:7890"
}
}
chain = Chain("https://eth-sepolia.g.alchemy.com/v2/YOUR-API-KEY", proxy_params)