-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Txn.asset_sender() gives different values in runtime and TestNet #729
Comments
Thanks for reporting. We are going to fix it next week and include it in the next release, hopefully end of the next week. |
Resolved in #737. |
This issue is still present in v5.0.1 The changes in #737 are not present in the module available on npm. I went through the Take a look at this screenshot I can confirm that the package version is latest I have tried deleting the |
@vuvoth any updates on this? |
Describe the bug
I have a smart contract in which I verify the amount, ID and sender of the asset received in a group transaction. I am sending the NFT in the second transaction and the function call is the first transaction.
While unit testing I am using the
runtime
and I am able to verify the value ofGtxn[1].asset_sender()
to the stored address in the smart contract. However I was getting an assertion error for this when I deployed it on theTestNet
and called the same function.Note that in both cases
clawback
address was not set.After some debugging I found that in the
TestNet
, the same smart contract was comparing the stored address of the sender toGlobal.zero_address()
whose value isAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ
.This address was getting returned from
Gtxn[1].asset_sender()
however, while using AlgoBuilder runtime, I was getting the actual address of the sender instead.I created the NFT like this:
If I print the asset details using
runtime.getAssetDef(nft_id)
I get the following:Expected Behavior
As mentioned here https://developer.algorand.org/docs/get-details/transactions/transactions/#assetsender it is supposed to return
ZeroAddress
Current Behavior
Gtxn[1].asset_sender()
returningGlobal.zero_address()
inTestNet
Gtxn[1].asset_sender()
returning Sender's address in Algobuilder RuntimePossible Solution
Steps to Reproduce
Environment
The text was updated successfully, but these errors were encountered: