Frameworks - nreinhol/lem_sim GitHub Wiki

Truffle

Truffle is a development environment, testing framework and asset pipeline for Ethereum, aiming to make life as an Ethereum developer easier. With Truffle, you get:

  • Built-in smart contract compilation, linking, deployment and binary management.
  • Automated contract testing with Mocha and Chai.
  • Configurable build pipeline with support for custom build processes.
  • Scriptable deployment & migrations framework.
  • Network management for deploying to many public & private networks.
  • Interactive console for direct contract communication.
  • Instant rebuilding of assets during development.
  • External script runner that executes scripts within a Truffle environment.

Homepage: https://truffleframework.com/
Github: https://github.com/trufflesuite/truffle

Usage: truffle <command> [options]

Commands:  
  build     Execute build pipeline (if configuration present)  
  compile   Compile contract source files  
  config    Set user-level configuration options  
  console   Run a console with contract abstractions and commands available  
  create    Helper to create new contracts, migrations and tests  
  debug     Interactively debug any transaction on the blockchain (experimental)  
  deploy    (alias for migrate)  
  develop   Open a console with a local development blockchain  
  exec      Execute a JS module within this Truffle environment  
  help      List all commands or provide information about a specific command  
  init      Initialize new and empty Ethereum project  
  install   Install a package from the Ethereum Package Registry  
  migrate   Run migrations to deploy contracts  
  networks  Show addresses for deployed contracts on each network  
  obtain    Fetch and cache a specified compiler  
  opcode    Print the compiled opcodes for a given contract  
  publish   Publish a package to the Ethereum Package Registry  
  run       Run a third-party command  
  test      Run JavaScript and Solidity tests  
  unbox     Download a Truffle Box, a pre-built Truffle project  
  version   Show version number and exit  
  watch     Watch filesystem for changes and rebuild the project automatically  

Ganache CLI

Ganache CLI, part of the Truffle suite of Ethereum development tools, is the command line version of Ganache, your personal blockchain for Ethereum development.

Ganache CLI uses ethereumjs to simulate full client behavior and make developing Ethereum applications faster, easier, and safer. It also includes all popular RPC functions and features (like events) and can be run deterministically to make development a breeze.

Homepage: https://truffleframework.com/
Github: https://github.com/trufflesuite/ganache-cli

Commands:
-a or --accounts:               Specify the number of accounts to generate at startup.
-e or --defaultBalanceEther:    Amount of ether to assign each test account. Default is 100.
-b or --blockTime:              Specify blockTime in seconds for automatic mining. If you don't specify this flag, ganache will instantly mine a new block for every transaction. Using the this flag is discouraged unless you have tests which require a specific mining interval
-g or --gasPrice:               The price of gas in wei (defaults to 20000000000)
-l or --gasLimit:               The block gas limit (defaults to 0x6691b7)
-q or --quiet:                  Run ganache-cli without any logs.
-v or --verbose:                Log all requests and responses to stdout

To use or change any of these commands, you have to configure it in the docker-compose.yml file. This file can be found in path/to/lem_sim/docker-compose.yml and looks like the following:

version: "3"

services:
  ganache:
    image: trufflesuite/ganache-cli:v6.4.1 
    ports:
      - "8545:8545"
    command: ["-a 3", "-e 100"]
  agents:
    build: .
    depends_on:
      - ganache 

Configure the parameter in the brackets of the command flag.
In this example: command: ["-a 3", "-e 100"] , the local blockchain contains three accounts with a default balance of 100 ether.

⚠️ **GitHub.com Fallback** ⚠️