Skip to content

Let Vagrant build an Ubuntu 22.04 LTS ("Jammy Jellyfish") machine to use Geth + Foundry (+ Hardhat)

Notifications You must be signed in to change notification settings

Dakavon/foundry-vagrant-env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VM for Ethereum smart contract development

on the basis of Ubuntu 22.04 LTS ("Jammy Jellyfish") with pre-installed software e.g. Foundry + Hardhat (*) to get started straight away.

(* Hardhat needs a local installation within a project.)

See bootstrap.sh for software versions.

Get started

Download and install Vagrant for your system

➡️ https://www.vagrantup.com/downloads

Download and install Virtualbox for your system (because Vagrant relies on "providers")

➡️ https://www.oracle.com/virtualization/technologies/vm/downloads/virtualbox-downloads.html (or https://download.virtualbox.org/virtualbox)

    $ sudo dpkg -i virtualbox-_VERSION_~Ubuntu~_PLATFORM.deb
    $ sudo apt-get install --fix-broken install

Prepare development environment

  1. Clone this repo

    $ git clone git@github.com:Dakavon/foundry-vagrant-env.git
  2. Go into the download folder and prepare development environment with

    $ cd foundry-vagrant-env
    $ vagrant up
  3. Wait until it is finished :)

  4. The Vagrant VM is now running. To shut it down, you can enter the following:

    $ vagrant halt

Run development environment

  1. If you haven't already create a DAPPS folder within your users home folder, e.g. vua terminal

    $ mkdir ~/DAPPS
  2. Open VM installation folder in a terminal

  3. Start VM and log in

    $ vagrant up && vagrant ssh
  4. Go to ~DAPPS folder inside the VM

    vagrant@devVM:~$  cd ~/DAPPS/
  5. Clone project from _REPOSITORY_ to your DAPPS folder (likely from outside the VM due to public-key authentication)

    $ git clone git@github.com:_REPOSITORY_

    and go to _PROJECT_ folder inside the VM

    vagrant@devVM:~/DAPPS$  cd _PROJECT_

    and e.g.

    • install dependencies via

      vagrant@devVM:~/DAPPS$  npm install
    • or use hardhat within project through local installation

      vagrant@devVM:~/DAPPS/_PROJECT_$   npm install --save-dev hardhat
  6. Or set up a new _PROJECT_ with Foundry

    vagrant@devVM:~/DAPPS$  mkdir _PROJECT_ && cd _PROJECT_
    vagrant@devVM:~/DAPPS/_PROJECT_$  forge init _PROJECT_NAME_

    In case forge is not available, try

    vagrant@devVM:~/DAPPS/_PROJECT_$  foundryup

Delete development environment

  1. Go to the download folder and delete development environment with
    $ cd foundry-vagrant-env
    $ vagrant destroy

About

Let Vagrant build an Ubuntu 22.04 LTS ("Jammy Jellyfish") machine to use Geth + Foundry (+ Hardhat)

Resources

Stars

Watchers

Forks

Languages