Skip to content

Latest commit

 

History

History
 
 

run-solidity-contract

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Running a Solidity smart contract using @ethereumjs/vm

This directory contains an example on how to run smart contracts written in Solidity.

The example does these things:

  1. Compiles the contract contracts/Greeter.sol
  2. Instantiates a VM
  3. Creates an account
  4. Funds the account with 1 ETH
  5. Deploys the Greeter contract
  6. Calls a constant function
  7. Sends a transaction to the contract, modifying its state
  8. Calls a constant function to verify the state change

Installation

  1. Run npm i in the root of this project
  2. Run npm i in this directory

Running the example

  1. Run npm run example in this directory