trident icon indicating copy to clipboard operation
trident copied to clipboard

💡 [REQUEST] - Access instruction Return value in Fuzz Tests

Open IaroslavMazur opened this issue 4 months ago • 2 comments

Summary

Problem

Currently, Trident's execute_transaction method doesn't allow accessing the Result<T> value returned by the executing instruction.

This limitation is especially troublesome in the context of View instructions, as they don't change the state of the blockchain - and, therefore, their Result<T> value is the only method there is to test the correctness of the respective instructions.

Current Workaround

None

Basic Example

let result = self.trident.execute_transaction(&mut my_tx, Some("MyTx"));
let returned_value = result.unwrap();

Drawbacks

None

Unresolved questions

No response

Implementation PR

No response

Reference Issues

No response

IaroslavMazur avatar Oct 16 '25 12:10 IaroslavMazur

Yes, good idea, we will have a look at it !

lukacan avatar Oct 24 '25 07:10 lukacan

Yes, good idea, we will have a look at it !

Looking forward to this!

IaroslavMazur avatar Oct 24 '25 09:10 IaroslavMazur