foundry icon indicating copy to clipboard operation
foundry copied to clipboard

Supports `rpc_endpoints` configuration in `forge create`

Open JaisPiyush opened this issue 2 years ago • 0 comments

Component

Forge

Describe the feature you would like

Instead of re-writing yhe entire create command, forge can introduce a network configuration system like hardhat where one could pass the network name and additional configs.

For e.g

$ forge create --rpc-url <your_rpc_url> \
    --constructor-args "ForgeUSD" "FUSD" 18 1000000000000000000000 \
    --private-key <your_private_key> \
    --etherscan-api-key <your_etherscan_api_key> \
    --verify \
    src/MyToken.sol:MyToken

Can be written as

$ forge create --network goerli \
    --constructor-args "ForgeUSD" "FUSD" 18 1000000000000000000000 \
    --verify \
    src/MyToken.sol:MyToken

In foundry.toml

[[profil.networks]]
  rpc_url ="..."
  etherscan_url ="..."
  private_key="${ENV_PRIVATE_KEY}"

Additional context

No response

JaisPiyush avatar Feb 09 '23 07:02 JaisPiyush