Incorrect Input and Output types after fuels version update to v0.39

Hello guys!!!
After the fuels update to v0.39, I found an error with types that provided for Script entity in peace of that I copied in Fuel Applications Amm

This function that returns this DataType which contains vectors of Inputs and Outputs that are imported from fuels::tx:

So, after this update, I can’t pass the same types as I used before due to incorrect Input types import.

We did add an Input type in this PR

Can you use these import statements in your module instead, and try with either types?

use fuels::tx::Input;
use fuels_types::input::Input as FuelsInput;

I’ll see with the other contributors if there is something we missed regarding symbols exports.

I already found a solution
Just replaced this (input from tx)

let input_predicate = Input::CoinPredicate {
    utxo_id: predicate_coin_utxo_id,
    tx_pointer: TxPointer::default(),
    owner: predicate.address().into(),
    amount: amount0,
    asset_id: asset0,
    maturity: 0,
    predicate: predicate.code(),
    predicate_data: vec![],

to this (input from types)

   let coin = Coin {
            amount: amount0,
            block_created: 0,
            asset_id: asset0,
            utxo_id: predicate_coin_utxo_id,
            maturity: 0,
            owner: predicate.address().clone(),
            status: fuels::types::coin::CoinStatus::default(),
        let input_predicate = Input::ResourcePredicate {
            resource: Resource::Coin(coin),
            code: predicate_code.clone().into(),

But I have spent a lot of time to understand this -_-

And on the new version no way to get code from the predicate instance, that because I had to pass predicate_code as argument into this func

Sorry about that, we did export two symbols without noticing.

1 Like

The exports were changed as part of this PR and so this problem should not happen anymore.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.