You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To do that , the only way right now would be to slice off the function name and then use ethabi decode function. But even then , the eth decode fails.
// Following function was used inside the mapping file.
function decodeUserOpInput(userOpInput: string): void {
const inputParams = userOpInput.slice(10);
log.info("{}", [inputParams]);
const decoded = ethereum.decode("((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],address)", Bytes.fromHexString(inputParams));
if (decoded == null) {
return;
}
// log.info("{}",[decoded.toTuple()[1].toString()]);
}
Since the mapping decoding did not work , I tried doing it with ethabi and the following code had to be used to break it down.
The ethabi needed multiple params to debug due to the following issue - rust-ethereum/ethabi#245
Hi, I have been trying to decode below input in the said decode signature and the ethereum.decode function from @graphprotocol/graph-ts@v0.28.1 is not able to decode and always returns null. I have mentioned the expected output below.
I have the following bytecode which is an input of the following tx
To do that , the only way right now would be to slice off the function name and then use ethabi decode function. But even then , the eth decode fails.
The ABI for the tx input is
Since the mapping decoding did not work , I tried doing it with ethabi and the following code had to be used to break it down.
The ethabi needed multiple params to debug due to the following issue - rust-ethereum/ethabi#245
I want to understand if it's possible to do it using the current implementation in the graph-ts library or if there is any work around for this ?
The text was updated successfully, but these errors were encountered: