Hey hows it going I did this step by step. The Abi gets fetched but when I want to see the name and total supply this error occurs: TypeError: Cannot read properties of undefined (reading 'JsonRpcProvider') at getAbi (C:\Users\asuar\Fetch ABI\getAbi.js:14:43) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) What can I do so it will work?
The number of decimal places is not dependent on the datatype. It is dependent on the token's contract. You can see the number of decimals on the token's deployed contract on etherscan. For example. WETH has 18 decimals. WBTC has 8 decimals. It's arbitrary and decided by the token's creator.
Learn to use all the Uniswap swap and liquidity functionality with code. bit.ly/3JkXYqL
Wow, that was easy. Great youtube channel you got. I can learn a lot from you I can see. Thanks.
Thanks brother!
love your content bro
dude you are full surprising in all videos.
aweso0O0ome as always
nice job. super clear and easy to follow
Thanks brother. Glad it was helpful
Hey hows it going I did this step by step. The Abi gets fetched but when I want to see the name and total supply this error occurs: TypeError: Cannot read properties of undefined (reading 'JsonRpcProvider')
at getAbi (C:\Users\asuar\Fetch ABI\getAbi.js:14:43)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
What can I do so it will work?
I bet you're using the new version of ethersJS 6, which I think is "ethers.JsonRpcProvider" instead of "ethers.providers.JsonRpcProvider"
why do we need to call toString on totalSupply? was totalSupply originally?
It could have been my mistake. But some functions do require numeric inputs as strings
The number I get is in uint256. How would I display the totalSupply with the decimal point where it should be?
The number of decimal places is not dependent on the datatype. It is dependent on the token's contract. You can see the number of decimals on the token's deployed contract on etherscan.
For example. WETH has 18 decimals. WBTC has 8 decimals. It's arbitrary and decided by the token's creator.
How to omit contract address from eth?
Sorry I don't understand. Can you elaborate?
bad idea for everyone to rely on the same trusted third party
Yea. A lot of crypto isn't as "decentralized" as people think