Skip to content

Instantly share code, notes, and snippets.

@dmfxyz
Created April 1, 2022 02:00
Show Gist options
  • Save dmfxyz/b8468bae2b2a1a60a33f02445b1b7f90 to your computer and use it in GitHub Desktop.
Save dmfxyz/b8468bae2b2a1a60a33f02445b1b7f90 to your computer and use it in GitHub Desktop.

This Works

$foundry-docker-tutorial> forge create --rpc-url $RPC_URL --constructor-args "ForgeNFT" "FNFT" "https://ethereum.org" --private-key $PRIVATE_KEY ./src/NFT.sol:NFT
[⠒] Compiling...
No files changed, compilation skipped
Deployer: 0x496e09fcb240c33b8fda3b4b74d81697c03b6b3d
Deployed to: 0x06dbba6b2059a68ba34457546efd0c6f152a363b
Transaction hash: 0x5993d047faf2a3f7c69d5e01ff7cd1928927a1a1097aa011b5d52fa8cbe1a616

This doesn't work

$foundry-docker-tutorial> forge create --rpc-url $RPC_URL --private-key $PRIVATE_KEY --constructor-args "ForgeNFT" "FNFT" "https://ethereum.org" ./src/NFT.sol:NFT
error: The following required arguments were not provided:
    <CONTRACT>

USAGE:
    forge create --rpc-url <RPC_URL> --private-key <PRIVATE_KEY> --constructor-args <constructor_args>... <CONTRACT>

For more information try --help
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment