This box has all you need to get start using the Plant Shop at RSK Network. It includes network configs for Mainnet and Testnet.
-
Install Truffle globally.
npm install -g truffle
-
Download the box. This also takes care of installing the necessary dependencies.
truffle unbox plant-shop
-
Run the development console. You can start a truffle console for any RSK network
# Console for Mainnet truffle console --network mainnet # Console forn Testnet truffle console --network testnet
-
Compile and migrate the smart contracts. Note inside the development console we don't preface commands with
truffle
.compile # Migrate for Mainnet migrate --network mainnet # Migrate for Testnet migrate --network testnet
-
Run the
liteserver
development server (outside the development console) for front-end hot reloading. Smart contract changes must be manually recompiled and migrated.// Serves the front-end on http://localhost:3000 npm run dev
-
How do I use this with the EthereumJS TestRPC?
It's as easy as modifying the config file! Check out our documentation on adding network configurations. Depending on the port you're using, you'll also need to update line 16 of
src/js/app.js
.