Skip to main content

Truffle Deployment

Environment Setup

  1. Check whether you Mac has Homebrew installed: If the command fails, then install Homebrew: /bin/bash -c "$(curl -fsSL"
  2. sudo apt install nodejs npm
  3. Install OpenZeppelin contracts. At the root of this project. npm install openzeppelin-solidity
  4. 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;
  5. Deploy the contract to the Optimism-Goerli network truffle migrate --reset --network Optimism
  6. From the output of the above command, find the address of the RubyETH contract, suppose it is:


Update the Javascript code with the above address in src/rubyClient.js

rubyApp.contracts.rubyETHContract = new rubyApp.web3.eth.Contract(rubyETHabi, YOUR_RUBYETH_CONTRACT_ADDRESS_HERE);