'InnerTxnBuilder' is not defined - General - Algorand
‘InnerTxnBuilder’ is not defined
post by kubot on Oct 12, 2022
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!
post by nullun on Oct 12, 2022
Did you install pyteal a few months ago? You’ll likely need to update your pyteal library.
post by kubot on Oct 12, 2022
Thank you, that was the issue, I was using version 4 instead of 5.
Cheers!
post by kubot on Oct 12, 2022
Is there any way to accompish the same functionality with version 4 in case I run into cross compatibility issues?
post by kubot on Oct 12, 2022
Nevermind, the app seems to be working fine. Thanks!