__init__
方法定义
def __init__(self, chain: Chain, private_key: HexBytes) -> None参数说明
参数
类型
说明
成员变量
变量
类型
说明
示例代码
from poseidon.evm import Chain, Account
from hexbytes import HexBytes
# 连接到链
chain = Chain("https://eth-sepolia.g.alchemy.com/v2/YOUR-API-KEY")
# 导入账户
private_key = HexBytes("0x...") # 你的私钥
account = Account(chain, private_key)
print(f"Account Address: {account.address}")最后更新于