0

我正在 Ropsten 上尝试此代码,但一直失败:

contract_instance = w3.eth.contract(address="0xC36442b4a4522E871399CD717aBDD847Ab11FE88", abi=liq_ABI)

tx_hash = contract_instance.functions.mint(
    (
        '0x31F42841c2db5173425b5223809CF3A38FEde360',
        '0xc778417E063141139Fce010982780140Aa0cD5Ab',
        3000,
        49548,
        50549,
        w3.toWei(0.001,'ether'),
        w3.toWei(0.17,'ether'),
        w3.toWei(0,'ether'),
        w3.toWei(0,'ether'),
        wallet_address,
        round(time.time()) + 60*20,
    )
).buildTransaction({
    'from': wallet_address,
    'chainId': 3,
    'gas': 300000,
    'gasPrice': w3.toWei(500, 'gwei'),
    'nonce': w3.eth.getTransactionCount(wallet_address),
    'value': Web3.toWei(0, 'ether')
})
print(tx_hash)
signed_tx = w3.eth.account.signTransaction(tx_hash, private_key=wallet_key)
tx = w3.eth.sendRawTransaction(signed_tx.rawTransaction)

交易失败:https ://ropsten.etherscan.io/tx/0xc2f3d6ffff164df331dd4b46fc65dadc5dba8f135f6e13ef1cd383a73a2d0c4b

4

0 回答 0