Skip to main content

Configure Foundry

Foundry is a blazing fast, portable,modular toolkit for Ethereum application development written in Rust.

Introduction

This page details several parameters required to configure Foundry. The Foundry framework isn't described here; find that in the Foundry documentation.

Prerequisites

  • cURL

Foundry configuration

Unlike other toolkits, Foundry doesn't have a config file to hold the chain parameters, instead, parameters are passed into commands.

  1. The following command deploys a contract using a script:
forge script script/TestERC20/DeployTestERC20.s.sol:DeployTestERC20Script --broadcast --rpc-url $RPC_URL_DEVNET --legacy --skip-simulation

The parameters for forge script command include:

  • --rpc-url: RPC URL
  • --skip-simulation: This parameter skips the on-chain simulation which doesn't work on Neon EVM.
  • --broadcast: This parameter broadcasts the transaction.
  • --legacy: This parameter is being passed to use legacy transactions (Neon EVM currently doesn't support EIP-1559 transactions)
  1. The following command deploys a contract directly without a script:
forge create --rpc-url $RPC_URL_DEVNET \
--private-key $PRIVATE_KEY \
--constructor-args "Test ERC20 Token" "TERC20" --legacy \
src/TestERC20/TestERC20.sol:TestERC20

The parameters for forge create command include:

  • --rpc-url: RPC URL
  • --private-key: The private key of the transaction signer
  • --constructor-args: The constructor arguments to be passed to the contract that is being deployed
  • --legacy: This parameter is being passed to use legacy transactions (Neon EVM currently doesn't support EIP-1559 transactions)

What next? See the tutorial on how to use Foundry to deploy on Neon EVM.

Was this page helpful?