What is the function for FormatTypes.json in ethers v6? #4364
Replies: 3 comments 2 replies
-
It doesn't look like your function is using FormatTypes. Can you post the code around the line number mentioned in the error's stack trace? |
Beta Was this translation helpful? Give feedback.
-
I also use ethers v6. I found this somewhere online, but can't remember where. |
Beta Was this translation helpful? Give feedback.
-
@MeisterStein if you are still facing the issue, try |
Beta Was this translation helpful? Give feedback.
-
I am new to web3 and learning by following a course from freeCodeCamp but the problem is that the course uses ethers v5.7 and I am adamant on learning to use ethers v6 as I do not want to learn outdated things. So I am running into a lot of errors while trying to follow the course. Sometimes the course uses some functions that have been depreceted or changed in some ways in v6 which gives me problems. Such as this one which i am unable to solve at all-
I want to update the abi in the constants folder of my frontend when the contract is deployed each time this is the code that I am trying to use.
But it seems like the FormatTypes function has changed because I am getting this error-
I have managed to find the page in the ethers v6 docs( link )for the FormatTypes function but I am unable to implement the same. Could someone help and explain to me how can i implement this funciton to update the abi.json file in the constants folder with the contract ABI in the json format.
Here is a link to my repo-
link to repo
Could someone also guide me of the process I should do the next time i run into an issue in which the course has an ethers v5 specific function and I want the v6 version of it.
Beta Was this translation helpful? Give feedback.
All reactions