Skip to content

Instantly share code, notes, and snippets.

@sparrowDom
Created March 4, 2025 09:00
Show Gist options
  • Save sparrowDom/7871112fd2b53c1200f8dbb80f931a2c to your computer and use it in GitHub Desktop.
Save sparrowDom/7871112fd2b53c1200f8dbb80f931a2c to your computer and use it in GitHub Desktop.
javascript:(function(){
if (!window.location.toString().match("^https://dashboard.tenderly.co/")) {
throw new Error("Potential phishing detected. Url doesn't match dashboard tenderly")
}
var aTags = document.getElementsByTagName("span");
var searchText = "encodeTransactionData";
var encDataElement;
for (var i = 0; i < aTags.length; i++) {
if (aTags[i].textContent == searchText) {
encDataElement = aTags[i];
break;
}
}
if (!encDataElement) {
throw new Error("Can not find 'encodeTransactionData' span element")
}
const valElement = encDataElement.parentElement.querySelector('.TracePoint__OutputParams .TracePoint__VariableValue');
if (!valElement) {
throw new Error("Can not find the element that displays the output value of 'encodeTransactionData'")
}
const returnValue = valElement.textContent;
console.log(`Message hash of the transaction: 0x${returnValue.substring(returnValue.length - 64)}`)
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment