This guide shows you how to deploy smart contracts on Plasma using Foundry, Hardhat, and Ethers.js. Plasma is fully EVM compatible, so contracts written for Ethereum require no code changes.
.bashrc
or .zshrc
file
foundry.toml
with Plasma testnet settings:
.env
file in your project root:
src/SimpleStorage.sol
, then deploy:
hardhat.config.js
:
.env
file in your project root:
scripts/deploy.js
:
contracts/SimpleStorage.sol
, then deploy:
.env
file in your project root:
compile.js
to compile your Solidity contract:
SimpleStorage.sol
, then compile:
deploy.js
:
Error [ERR_REQUIRE_ESM]: require() of ES Module
, this typically means: