Raze Network
Search…
Truffle Deployment Guide

Environment Setup

0. Check whether you Mac has Homebrew installed:
brew -v
If the command fails, then install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  1. 1.
    Install node.js and npm.
MacOS:
brew install node
node -v
Ubuntu:
sudo apt update
sudo apt install nodejs npm
node -v
2. Install Truffle
npm install -g truffle
truffle version
3. Install OpenZeppelin contracts. At the root of this project.
npm install openzeppelin-solidity

Compile and Migrate

  1. 1.
    Replace the mnemonic variable content with YOUR secret words in truffle.js. (NOTE: your secret words should be held privately in your wallet)
...
var mnemonic = YOUR_SECRET_WORDS_HERE;
...
2. Compile the contract
truffle compile --all
3. Deployment
Deploy the contract to the BSC testnet
truffle migrate --reset --network bsc_testnet
OR, deploy the contract to the BSC mainnet
truffle migrate --reset --network bsc_mainnet
4. From the output of the above command, find the address of the RazeETH contract, suppose it is:
0x05149A02DC230588964Dd6D6F196eF38d523c0Fa
Update the Javascript code with the above address in src/razeClient.js
razeApp.contracts.razeETHContract = new razeApp.web3.eth.Contract(razeETHabi, YOUR_RAZEETH_CONTRACT_ADDRESS_HERE);