Hey guys,
I’ve just migrated the multisig wallet I wrote earlier to VS Code and am playing around with it in the terminal. It mostly works, but I have a question:
Here is a printout of one of the events:
{
logIndex: 0,
transactionIndex: 0,
transactionHash: '0x67cc5b4a6482b2274b1e5a1d2c963d5741448e6655ef3cf9cb8d6735c35620cc',
blockHash: '0x415d1fc7c6d6ffe8ce76a829722aa3b6fcd0e4b339268a5b57c74822a97fb04b',
blockNumber: 18,
address: '0x77D87CA0A19bc212C34F147a227a56a31fC6EFf1',
type: 'mined',
id: 'log_2d5773d4',
event: 'approvalMade',
args: [Result]
}
I can obviously see that the event has been emitted, but how do I see the actual information? I think I need to access the “args: [Result]”, but how do I do that?
Also, I’m having a bit of difficulty reading this function. It is an extra function meant to show which requests still need to be approved:
function getPendingRequests() public returns(Request[] memory) {
reset();
for(uint counter = 0; counter < requests.length; counter++) {
if(requests[counter].numberOfApprovals < 2) {
pendingRequests.push(requests[counter]);
}
}
return pendingRequests;
}
The function istelf works. I expect a struct as output, but instead get a bunch of gibberish that I cannot make sense of.
{
tx: '0x2ed54d8cd0f01ed14d73fd88ed28e8358111a7b563fd9b2bf15201777fd13e73',
receipt: {
transactionHash: '0x2ed54d8cd0f01ed14d73fd88ed28e8358111a7b563fd9b2bf15201777fd13e73',
transactionIndex: 0,
blockHash: '0xfcaaa21714ddaf2d79a5f0af810f75ae37e3be1fb1cdc4f46caa599ea9d666f8',
blockNumber: 29,
from: '0x6e2dc94cf97c29e0a2260e81762627751a3d8cc8',
to: '0x77d87ca0a19bc212c34f147a227a56a31fc6eff1',
gasUsed: 93419,
cumulativeGasUsed: 93419,
contractAddress: null,
logs: [],
status: true,
logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
rawLogs: []
},
logs: []
}
In Remix I can get the information in the “decoded output” of the transaction, but how can I access it with VS Code?
Thx in advance
Em