Foundry

In this walkthrough, we'll create a basic Foundry project.

  1. Fund your wallet with BTC on StratoVM Testnet

  2. Download and install Foundry:

curl -L https://foundry.paradigm.xyz | bash

Open a new terminal, and call foundryup to install the latest release.

Create a Foundry project

To create a Foundry project, run:

forge init stratovm-tutorial

And change into the directory:

cd stratovm-tutorial

Running forge init sets up a sample contract, test, and script for Counter.sol.

Deploy a smart contract

Deploy your contract using the following syntax:

forge create --rpc-url https://bitcoin-l2-349313-testnet.tc.l2aas.com/rpc src/Counter.sol:Counter --private-key YOUR_PRIVATE_KEY
  • Replace YOUR_PRIVATE_KEY with your wallet's private key.

Last updated