Raze Network
Search…
Truffle Deployment Guide

Environment Setup

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

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)
1
...
2
var mnemonic = YOUR_SECRET_WORDS_HERE;
3
...
Copied!
2. Compile the contract
1
truffle compile --all
Copied!
3. Deployment
Deploy the contract to the BSC testnet
1
truffle migrate --reset --network bsc_testnet
Copied!
OR, deploy the contract to the BSC mainnet
1
truffle migrate --reset --network bsc_mainnet
Copied!
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
1
razeApp.contracts.razeETHContract = new razeApp.web3.eth.Contract(razeETHabi, YOUR_RAZEETH_CONTRACT_ADDRESS_HERE);
Copied!
Last modified 15d ago