Replies: 1 comment 6 replies
-
Try with this and let me know if it works. forge script script/DeploySimpleStorage.s.sol:DeploySimpleStorage --rpc-url http://localhost:8545 --account defaultkey --sender 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 --broadcast --vvvv The difference between this and yours is that there is a space between the |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm encountering an error while deploying a contract using Forge:
forge script script/DeploySimpleStorage.s.sol: DeploySimpleStorage --rpc-url http://localhost:8545 --account defaultkey --sender 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 --broadcast -- --vvvv [⠒] Compiling... No files changed, compilation skipped Error: Could not find target contract
This is my DeploySimpleStorage.s.sol
`// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;
import {Script} from "forge-std/Script.sol";
import {SimpleStorage} from "../src/SimpleStorage.sol";
contract DeploySimpleStorage is Script {
function run() external returns (SimpleStorage) {
vm.startBroadcast();
SimpleStorage simpleStorage = new SimpleStorage();
vm.stopBroadcast();
return simpleStorage;
}
}
This is my SimpleStorage.sol
// SPDX-License-Identifier: MITpragma solidity ^0.8.18;
// pragma solidity ^0.8.0;
// pragma solidity >=0.8.0 <0.9.0;
contract SimpleStorage {
uint256 myFavoriteNumber;
}`
Ive tried checking the contract name and location and recompilling but the error still persist. Im just getting started so ill really appreciate al the help i can get
Beta Was this translation helpful? Give feedback.
All reactions