eth_cancelPrivateTransaction
eth_cancelPrivateTransaction RPC Method
Parameters:
txHash - string - The transaction hash for the private transaction to be canceled. A transaction can only be requested to be canceled if the request is made from the same endpoint the eth_sendPrivateTransaction call was made from
Returns:
result - It is true if the transaction is successfully canceled, otherwise false
Code Examples:
ethererumvar myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"method": "eth_cancelPrivateTransaction",
"params": [
{
"txHash": "PRIVATE_TX_HASH"
}
],
"id": 1,
"jsonrpc": "2.0"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.ebs.ezat.io/core/api/v1.0/rpc/ethererum/mainnet?x-api-key-id=API-KEY-ID&x-api-key=API-KEY", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Last updated