NOTE: Only Ubuntu 20.04 is supported
sudo apt update
sudo apt install curl
curl -sL https://deb.nodesource.com/setup_14.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt install nodejs
node -v && npm -v
apt-get install xclip
npm install -g truffle-export-abi
sudo apt install git
cd $HOME
rm -rfv ./liquidity-program/
git clone https://github.com/KiraCore/liquidity-program.git -b <branch_name>
Ganache will provide a personal blockchain to be used for local development and testing of smart contracts.
-
Open a browser and navigate to https://github.com/trufflesuite/ganache/releases
-
Download the latest Linux release which will be the *.AppImage file.
-
For example ganache-2.4.0-linux-x86_64.AppImage.
-
Once the download is complete, open a new terminal and change into the directory with the *.AppImage file.
-
Use chmod to make the file executable:
chmod a+x ganache-1.3.0-x86_64.AppImage
-
Now run the file
./ganache-1.3.0-x86_64.AppImage
- Install Google Chrome
$ sudo apt install gdebi-core wget $ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb $ sudo gdebi google-chrome-stable_current_amd64.deb $ google-chrome
Let's setup MetaMask account and we can use Seed Phrase of the MetaMask wallet with ganche testnet.
- Install MetaMask Google Chrome Extension
- Use the secret phrase of your MetaMask wallet as
PRIVATE_KEY
. - Enter MetaMask, create account and backup seed phrase
- Click three dots in the top right of the main menu and enter Account details view
- Click Export Private Key
Each deployment environment has a different set of mandatory environment variables. Add the secrets required for the deployment environment to .env
file of each working directory (e.g LIP_1, LIP_2, etc)
Make sure to provide the 64 character long hexa-decimal PRIVATE_KEY
. The associated address will inherit the tokens created by the contract deployment.
For example, To setup LIP_1's PRIVATE_KEY
LIP_ID="LIP_1"
echo "PRIVATE_KEY=0xXXX...XXX" > $HOME/liquidity-program/$LIP_ID/.env
Sign up for a free api key at https://infura.io/dashboard to deploy to public networks.
- Create an account on infura.io
- Create a new Project on your infura account
- Go to Settings Tab
- Use the Project ID as
INFURA_APIKEY
echo "INFURA_APIKEY=XXX...XXX" >> $HOME/liquidity-program/$LIP_ID/.env
- Generate the Etherscan API Key for free at https://etherscan.io/myapikey.
echo "ETHERSCAN_APIKEY=XXX...XXX" >> $HOME/liquidity-program/$LIP_ID/.env
- This environment variable should be set when Kira Token ERC20 (LIP_1) is deployed
echo "KIRA_TOKEN_ADDRESS=0xZZZ...ZZZ" >> $HOME/liquidity-program/$LIP_ID/.env
You can instantly get 1 Ropsten Test Ether per 24h per account by visiting https://faucet.ropsten.be/
You can instantly get 1 KEth per 24h per GitHub account by visiting https://faucet.kovan.network/ and submitting your Kovan address.