-
Notifications
You must be signed in to change notification settings - Fork 152
Open
Description
Hey team,
I'm working on a real-world use case and wanted to share a gap I found in the current documentation, especially for developers following the recommended dApp setup.
๐ Summary of the Problem
- I learned how to create smart contracts and successfully deployed a custom one on the devnet. Everything worked smoothly up to this point.
- To build a frontend for users to interact with the contract, I followed the usual path โ using the
template-dappas recommended (it includes theping-pongexamples). - I removed the ping-pong logic and adapted it to my contract, which returns a custom type that I need to decode.
- For that, I referred to the v13 SDK JS cookbook to follow best practices and avoid using the now outdated
SmartContract.createQuery()method (still present in the template-dapp). - However, I hit some issues right away:
- The code sample in the cookbook uses
apiNetworkProvider, which isnโt defined in thetemplate-dappcontext. - After digging, I found it is defined earlier in the cookbook, but that setup isnโt compatible with the template-dapp structure. I had to reverse-engineer how to plug it in correctly.
- The code sample in the cookbook uses
- Once I got past that, I reached the main blocker: the example for decoding a custom type simply does not work. I tried both
getCustomType()andgetStruct()with no success, and couldnโt find a working example that bridges the gap betweentemplate-dappand decoding with ABI in the frontend. Even after reading through SDK v14 resources and cross-checking with older tutorials, I couldn't get the decoding to work from the frontend as documented. I eventually made it work another way โ but it took hours of trial and error.
โ Why This Matters
This flow is the first thing new developers will try when building on MultiversX with custom logic. The experience should be smooth โ especially when the recommended template and cookbooks don't align anymore.
๐ Priority
Medium-High โ This blocks progress for developers building real apps with custom return types.
๐ Offer to Help
Happy to:
- Share my repo with a working version
- Provide code snippets
- Record a short video (~4 minutes) showing exactly where the friction
- Or even jump on a call
Letโs improve this together! ๐
Tags: documentation, sdk-js, v13, v14, abi, custom-types, frontend, template-dapp
Jotenks66andreibancioiu
Metadata
Metadata
Assignees
Labels
No labels