Giter Site home page Giter Site logo

moonbeam-truffle-box's Introduction

Moonbeam

Moonbeam Truffle Box

The first release of a Truffle box for Moonbeam. With it you will find a Truffle boilerplate setup to get started deploying smart contracts on Moonbeam quickly.

Getting started

To get started with the Moonbeam Truffle box, if you have Truffle installed globally, you can execute:

mkdir moonbeam-truffle-box && cd moonbeam-truffle-box
truffle unbox PureStake/moonbeam-truffle-box

Nevertheless, the box has also Truffle as a dependency in case you do not want to have it installed globally. In such a case, you can directly clone the following repository:

git clone https://github.com/PureStake/moonbeam-truffle-box
cd moonbeam-truffle-box

With the files in your local system, the next step is to install all dependencies by running:

npm install

Note: We noticed that if you are using npm v7.0.15 you might have some errors when running npm install. To fix this you can downgrade npm to an older release such as 6.14.9 or 7.0.8 by running, for exmaple, npm install -g [email protected].

The dependencies installed are the following:

  • Minimist
  • EthereumJS wallet: a lightweight wallet implementation.
  • Web3 Provider Engine: a tool for composing custom Web3 providers.
  • Truffle: this is not needed if you have installed it globally.
  • Moonbeam Truffle Plugin: a tool to easily create your own standalone Moonbeam node for development (uses Docker).

Networks

Moonbeam Truffle Box is pre-configured with two networks: standalone and TestNet. To deploy in the standalone network please check the Moonbeam Truffle Pluggin section to install and start your own local node.

node_modules/.bin/truffle migrate --network dev
node_modules/.bin/truffle migrate --network moonbase

Note: if you have Truffle installed globally, you can replace node_modules/.bin/truffle for truffle.

Moonbeam Truffle Plugin

The plugin is used to get you started with a local standalone Moonbeam node quickly. You can check all available commands with the help flag:

./node_modules/.bin/truffle run moonbeam --help

The following commands are available:

Install

In this context, installing means downloading the Docker image of the Moonbeam standalone node (requires Docker to be installed).

node_modules/.bin/truffle run moonbeam install

Start

Start the standalone Moonbeam node.

node_modules/.bin/truffle run moonbeam start

Stop

Stop the standalone Moonbeam node. This will remove the container, thus purging the chain.

node_modules/.bin/truffle run moonbeam stop

Pause

Pause the standalone Moonbeam node.

node_modules/.bin/truffle run moonbeam pause

Unpause

Unpause the standalone Moonbeam node.

node_modules/.bin/truffle run moonbeam unpause

Status

Shows the status of the standalone Moonbeam node.

node_modules/.bin/truffle run moonbeam status

Remove

Removes the Docker image of the Moonbeam standalone node.

node_modules/.bin/truffle run moonbeam remove

Contact Us

We welcome any feedback, so feel free to reach out through our official Discord Channel.

moonbeam-truffle-box's People

Contributors

albertov19 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.