'InnerTxnBuilder' is not defined


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([
            TxnField.type_enum: TxnType.Payment,
            TxnField.amount: amount,
            TxnField.receiver: receiver,
            TxnField.fee: Global.min_txn_fee()

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.


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.


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!