'InnerTxnBuilder' is not defined

Hello,

I’m trying to setup a payment from a smart contract to the calling address by using InnerTxnBuilder more specifically I’m using this code:

    return Seq([
        InnerTxnBuilder.Begin(),
        InnerTxnBuilder.SetFields({
            TxnField.type_enum: TxnType.Payment,
            TxnField.amount: amount,
            TxnField.receiver: receiver,
            TxnField.fee: Global.min_txn_fee()
        }),
        InnerTxnBuilder.Submit(),
    ])

When trying to compile and build the .teal file I’m getting an error NameError: name ‘InnerTxnBuilder’ is not defined

Any ideas why? I am importing pyteal on my pyteal code.

Thanks!

Did you install pyteal a few months ago? You’ll likely need to update your pyteal library.

1 Like

Thank you, that was the issue, I was using version 4 instead of 5.

Cheers!

Is there any way to accompish the same functionality with version 4 in case I run into cross compatibility issues?

Nevermind, the app seems to be working fine. Thanks!