I checked there isn’t already an issue for the bug I encountered.
Hello, this is my first post as a programmer, please don’t judge harshly, thank you.
Issue:
I’m using the 0x Next.js swap dApp example from the 0x documentation on the Polygon network in my application. Everything works correctly except for “MATIC”.
I can’t swap this token; it doesn’t recognize the balance and says there’s insufficient balance. What could be the problem?
I cant sell MATIC token, but can buy MATIC correct
Check existing issues
- [X] I checked there isn’t already an issue for the bug I encountered.
Describe the bug
Hello, this is my first post as a programmer, please don’t judge harshly, thank you.
Issue:
I’m using the 0x Next.js swap dApp example from the 0x documentation on the Polygon network in my application. Everything works correctly except for “MATIC”.
I can’t swap this token; it doesn’t recognize the balance and says there’s insufficient balance. What could be the problem?
I cant sell MATIC token, but can buy MATIC correct
In the console, I see errors like:
ContractFunctionExecutionError
at getContractError (getContractError.js:31:12)
at simulateContract (simulateContract.js:49:98)
at async prepareWriteContract (chunk-OKULXQAF.js:2132:31)
Caused by: ContractFunctionZeroDataError
at getContractError (getContractError.js:20:17)
at simulateContract (simulateContract.js:49:98)
at async prepareWriteContract (chunk-OKULXQAF.js:2132:31)
I hope I’ve reached the right place, thank you.
My code: GitHub Repository
Link to Minimal Reproducible Example
No response
Steps To Reproduce
- fork https://github.com/petrolozynskyi/0x-nextjs-demo-app
- run in terminal “npm i”
3.run in terminal “npm run dev”
4.Connect Wallet
5.Click to Wallet in left corner, and choose network(Polygon)
and try to swap MATIC to something other
What Wagmi package(s) are you using?
@wagmi/core
Wagmi Package(s) Version(s)
^1.1.0
Viem Version
^0.3.50
TypeScript Version
5.0.4
Petro Lozynskyi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.