Closed Sylor-huang closed 3 months ago
Codes:
client = Eth::Client.create('rpc') abi = [ { "inputs": [ {"internalType": "uint256", "name": "deadline", "type": "uint256"}, {"internalType": "bytes32", "name": "attributeHash", "type": "bytes32"}, {"internalType": "bytes", "name": "signature", "type": "bytes"} ], "name": "mintSBT", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ] sbt_contract = Eth::Contract.from_abi(name: "SBTs", address: 'xxx', abi: abi) # res_data includes deadline, attributeHash, signature res = client.call(sbt_contract, "mintSBT", res_data["deadline"].to_i, res_data["attributeHash"].to_s, res_data["signature"].to_s, sender_key: 'wallet private key')
client.call get error: IOError: execution reverted
client.call
IOError: execution reverted
Please help, thanks.
@q9f please help, thanks.
execution reverted means that your ruby code is good but your contract execution failed on the evm.
execution reverted
to debug this, we would need to know more details about your transaction.
see https://metana.io/blog/evm-execution-reverted-errors
Codes:
client.call
get error:IOError: execution reverted
Please help, thanks.