Trying to understand how to work with predicates. Predicate code in the backend, currently it's the predicate from the documentation: https://fuellabs.github.io/fuels-ts/guide/predicates/
Steps in frontend:
- connect to testnet
- setup predicate
- trying to do a transaction and letting the predicate be fulfilled, as here (but running into error): https://github.com/FuelLabs/fuels-ts/blob/eda13d72c32f72652a34f926c4b9cf42ac36556c/packages/predicate/src/predicate.test.ts#L96
The error that's thrown is "Error: Invalid struct UtxoId. Field "outputIndex" not present. (argument="UtxoId", value={"transactionId":"0x0000000000000000000000000000000000000000000000000000000000000001"}, code=INVALID_ARGUMENT, version=0.41.0)"
caused by predicate.sendTransaction(request);
(App.tsx
). It seems like it is caused by request.toTransactionBytes()
which is one of the steps within sendTransaction
.