Hi. I'm following an old tutorial (version 0.5.0) and it has a script for truffle.config.js. The problem is that my Mac won't let me install truffle and I was trying to compile it with hardhat but it throws a lot of errors. Does anyone know a way to fix it without having to do it all over again?

Mar 24, 2022, 9:02 PM
on my pc also had the same problem and i didn't find a solution in any forum. I'm just using hardhat to compile my contracts
Mar 24, 2022, 9:04 PM
yeah, thanks. I also google it and wasnt find the answer. The thing is that the script was made and I want to see the UI. But I do not know how to make the script from 0 yet
Mar 24, 2022, 9:05 PM
are using react for the interface and yarn start doesn't work?
Mar 24, 2022, 9:09 PM
this is the script I am using. I put on the terminal: npx hardhat compile
and gives me a lots of things that I have to modify...
Haven´t seen the front part yet
Mar 24, 2022, 9:11 PM
make sure your pragma version is same as hardhat config
if in your main file is : ^0.8.0, then in hardhat you need to also insert ^0.8.0
Mar 24, 2022, 9:14 PM
Yes, I check that. But is more like a "memory" or "calldata" that needs to be in every part...
Mar 24, 2022, 9:14 PM
oh I already know the problem
you forgot to insert "memory" right after typing your variable, for example:

string memory _test
Mar 24, 2022, 9:15 PM
yes, but there are like a lots of variables. I just fork the repo. Maybe on truffle doesnt need to do or for an older version? Because I would have to change like 200 lines and even that I dont know if solve the issue
Mar 24, 2022, 9:17 PM
create a copy of this code and test if it solves
Mar 24, 2022, 9:18 PM
Btw on the screen you put we can see the first words of the mnemonic, I hope you are aware of the security risk of that but yeah, never do that with stuff for which you have assets on mainnets, if you have something on that wallet move them to somewhere else now
Mar 25, 2022, 1:26 AM

© 2024 Draquery.com All rights reserved.