This forum is a read-only archive. Posting, replying and signing in are disabled.

'InnerTxnBuilder' is not defined

kubot

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!

✔ Solved by nullun in post #2
nullun

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

✔ Solution
kubot

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

Cheers!

kubot

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