def call_function_with_parameters(self, value: Wei, gas_price: Optional[Wei], gas_limit: int, function_name: str, *args: Optional[Any]) -> Optional[TransactionReceiptData]
# 调用合约函数并发送 ETH
receipt = contract.call_function_with_parameters(
value=Web3.to_wei(0.1, 'ether'), # 发送 0.1 ETH
gas_price=Web3.to_wei(50, 'gwei'), # 使用 50 Gwei 的 gas 价格
gas_limit=100000, # 设置 gas 限制为 100000
"deposit", # 函数名
"0x..." # 函数参数
)
if receipt and receipt.transaction_status:
print(f"Transaction successful: {receipt.transaction_hash.hex()}")