Truffle Deployment
Environment Setup
- Check whether you Mac has Homebrew installed: If the command fails, then install Homebrew: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- sudo apt install nodejs npm
- Install OpenZeppelin contracts. At the root of this project. npm install openzeppelin-solidity
- 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;
- Deploy the contract to the Optimism-Goerli network truffle migrate --reset --network Optimism
- From the output of the above command, find the address of the RubyETH contract, suppose it is:
0x05149A02DC230588964Dd6D6F196eF38d523c0Fa
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);