Lesson-5 : Ethers.js /SimpleStorage #6576
-
async function main() { const wallet = new ethers.Wallet( const abi = fs.readFileSync("./SimpleStorage_sol_SimpleStorage.abi", "utf8"); main() |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Downgrade ethers to 5.4. To downgrade:
|
Beta Was this translation helpful? Give feedback.
-
To anyone going through the same trouble.
Then you'll get an error 'could not detect network' note: your solidity compiler version should be "0.8.7-fixed". |
Beta Was this translation helpful? Give feedback.
To anyone going through the same trouble.
downgrade:
Then you'll get an error 'could not detect network'
now you'll have to open the settings in the ganache( top right corner with the gear option), head to server, change the host name to 192.XXX.XXX, port number to 8545 and network id to 1337.
Also, copy the pass key again from a different index after making changes
It should work.
note: your solidity compiler version should be "0.8.7-fixed".
to change compiler version type this command-
" yarn remove solc " (It should remove your current compiler version)
then,
" yarn add solc@"0.8.7-fixed "
this wi…