Hi Donnie,
This is now correct, so yes, you must have misunderstood…
Here, I was telling you that, earlier, you had correctly imported Destroyable.sol into helloWorld.sol, but then you removed it.
The changes you’ve made to Destroyable are also correct
Now, the only error that I get is after the deployment. it states. “currently you have no contract instances to interact with.”
Where are you seeing this error message? This will always be displayed in orange under Deployed Contracts in the Deploy & Run Transactions panel before you have clicked on the orange Deploy button. Before clicking on this button you need to make sure that:
- all 3 contracts compile without any errors;
- helloWorld.sol is open on your screen;
- you have selected HelloWorld from the dropdown menu in the Contract field (just above the Deploy button).
I have copies of the exact same contracts you have posted, and have made the same changes I’ve told you to make and checked that you’ve made them… and my HelloWorld deploys no problem.
Are you importing the exact same file names in terms of exact spelling, capital/lower case letters etc.? e.g. if the Destroyable file is destroy.sol
then you need to import "./destroy.sol"
and not "./Destroyable.sol"
Another problem could be that you haven’t got all 3 files within the same folder. The file paths…
"./Destroyable.sol"
// or
"Destroyable.sol"
… will only locate the file if it is in the same folder as the file you are importing it into. You can check this in Remix in the workspace you’re using in the File Explorers tab (at the top of the menu). If you have created any workspace sub-folders, and you haven’t got all 3 .sol files in the same folder, then you need to ensure that they are. I haven’t found a way to move files in Remix between folders, so you would need to create a new file in the correct folder, then cut and paste your code into the new file. Make sure you delete the old file, and that your new file has the same name as the old one.
If none of the above solve the problem, then post all of your code in all 3 files, and tell us exactly what names you have saved each file as.