Created
March 4, 2025 09:00
-
-
Save sparrowDom/7871112fd2b53c1200f8dbb80f931a2c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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