Instruction data#
Trident generates random instruction data for you.
Important
Currently, it is however required, that you manually assign the random fuzzer data to the instruction data. It is done using the IxOps
trait and its method get_data
.
- Go to the
trident-tests/fuzz_tests/<FUZZ_TEST_NAME>/fuzz_instructions.rs
file and complete the pre-generatedget_data
methods for each instruction.
fn get_data(
&self,
_client: &mut impl FuzzClient,
_fuzz_accounts: &mut FuzzAccounts,
) -> Result<Self::IxData, FuzzingError> {
let data = fuzz_example1::instruction::Invest {
amount: self.data.amount,
};
Ok(data)
}
Tip
Consider checking the Examples section for more tips.