Created
April 1, 2025 11:44
-
-
Save sparrowDom/2c46513b4e77dd9a72de3fd44407d0d3 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 inputElements = encDataElement.parentElement.querySelectorAll('.TracePoint__InputParams .TracePoint__VariableName'); | |
let dataElement; | |
for (const input of inputElements) { | |
if (input.textContent === 'data') { | |
dataElement = input.parentElement; | |
} | |
} | |
if(!dataElement) { | |
throw new Error("Can not find the input element with the text 'data' "); | |
} | |
const encodedDataEl = dataElement.querySelector('.TracePoint__VariableValue > div > div > div > span'); | |
console.log(`to decode schedule/execute transaction run:\ncast cdd "scheduleBatch(address[],uint256[],bytes[],bytes32,bytes32,uint256)" ${encodedDataEl.textContent}`); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment