-
Notifications
You must be signed in to change notification settings - Fork 313
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
Getting 'undefined' as a return value when invoking a getter smartcontract function #1049
Comments
There's a few things I'd suggest here:
|
Thank you for your response and suggestions, @Shaptic . Replying to each of the points you mentioned:
This is the newly deployed smart contract address: CBG7QFA5CWUIJ6QQQSCWS33UNV6TN3EVQHRZLR5VYJWT5X73J6Y46U7A. You can see all the function calls and successful transactions that have occurred under this deployed smart contract address by visiting this page: https://stellar.expert/explorer/testnet/contract/CBG7QFA5CWUIJ6QQQSCWS33UNV6TN3EVQHRZLR5VYJWT5X73J6Y46U7A
|
I see, thanks for the clarifications.
But the bug report is about you getting The reason why I said your transaction failed is because of the console output in your second screenshot ( For example, you use the |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedI'm a frontend and smart contract developer. I've contributed to Projects here on onlydust How I plan on tackling this issueTo implement this,
ETA: 48hrs |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedhello i am a frontend dev and blockchain developer How I plan on tackling this issueplease kindly assign me and i'll get straight to work |
To demonstrate the issue, I built a small full-stack dApp called "Anonymous Feedback dApp" using ReactJS, TailwindCSS, Stellar-SDK, Soroban-SDK, and Freighter Wallet.
GitHub : https://github.com/bhupendra-chouhan/Anonymous-Feedback-Soroban
Please refer to the project's README file for a detailed explanation of the issue, along with the installation/setup guide and steps to reproduce it (screenshots included).
Issue:
In the code below, there is a function named
contractInt()
, which is used to invoke contract functions. While it successfully stores data on-chain when invoking a setter function, the problem occurs when I try to retrieve a return value using thereturnValue()
method from a getter function. Instead of the expected output, I receive 'undefined'.Screenshots of Issue (You can reproduce the issue by following the screenshots):
Creating a Feedback and Storing it onchain by invoking the
send_feedback()
smartcontract function:Result:
4
Undefined
Fetching a feedback with feedback-id
4
by invoking thefetch_feedback()
smartcontract function:Result:
Feedback Number 4
Undefined
The text was updated successfully, but these errors were encountered: