5 通过data 发送交易,提示 'message': 'invalid remainder' 问题怎么解决?

我fork了以太坊主链,通过input data 发送交易,提示错误信息: 'message': 'invalid remainder'

input data的来源:https://etherscan.io/tx/0x79b5b12223bb9881a979599fd4b409fab482e4dd15d4af094411c6967ef42ed5

部分代码:

params = {
    'from': from_address,
    'nonce': nonce,
    'to': contract_address,
    'value': w3.toWei(amount, 'ether'),
    'gas': gas,
    'maxFeePerGas': w3.toWei(gas_fee, 'gwei'),
    'maxPriorityFeePerGas': w3.toWei(priorityfee, 'gwei'),
    'chainId': chainId,
    'data': input_data,
}
signed_tx = w3.eth.account.signTransaction(params, private_key=MY_PRIVATE_KEY)
txn = w3.eth.sendRawTransaction(signed_tx.rawTransaction)
print(w3.toHex(txn))
请先 登录 后评论

4 个回答

Tiny熊 - 布道者
  擅长:智能合约,以太坊
请先 登录 后评论
Phi·Wallet - 区块链爱好者和从业者
请先 登录 后评论
Phi·Wallet - 区块链爱好者和从业者
请先 登录 后评论
0xsha - 程序员
请先 登录 后评论
  • 3 关注
  • 0 收藏,1299 浏览
  • 0xsha 提出于 2022-10-01 01:23

相似问题