I have finished the Store feature of the ShadowGas contract.

Interaction with the contract can be done via buidler tasks and the console.


git clone https://github.com/TraylorBoy/ShadowGas.git

cd ShadowGas

yarn install

After installing, you will need to create a .env file and modify the shadow.config.js and the buidler.config.js files


SHADOWGAS="" - Contract Address
WALLET="" - Wallet Address
PRIVATEKEY="" - Wallet Private Key
KOVAN="" - Kovan Infura url
ROPSTEN="" - Ropsten Infura url
MAINNET="" - Mainnet Infura url
ETHERSCAN="" - Etherscan API Key
ETH_GAS_STATION="" - EthGasStation API Key


RefuelChiAmt - Mint Chi Amount
RefuelLgtAmt - Mint Lgt Amount
EmptyChiAmt - Transfer Chi Amount
EmptyLgtAmt - Transfer Lgt Amount
EmptyChiTo - Address to transfer Chi to
EmptyLgtTo - Address to transfer Lgt to
GasLimit - Gas Limit
GasSpeed - Gas Speed ("fast", "average", "slow") 

Gas Price is retrieved from:

https://ethgasstation.info/ https://etherscan.io/gastracker

I am working on a Gas Oracle which may change this feature



module.exports = {
  defaultNetwork: "Kovan",

You may modify the exported properties in the buidler.config.js file.


* <GAS_TOKEN> should be either: Chi or Lgt*


npx buidler refuel --token <GAS_TOKEN>

Mints either Chi or Lgt tokens and stores them at contract’s address


npx buidler tank --token <GAS_TOKEN>

Retrieves Chi or Lgt token balance at contract’s address


Refuel 13 Chi and Lgt tokens

Refuel amount can be modified via the shadow.config.js file

npx buidler refuel --token Chi

Alt Text

npx buidler refuel --token Lgt

Alt Text

Retrieve Chi and Lgt tank balances

npx buidler tank --token Chi

Alt Text

npx buidler tank --token Lgt

Alt Text

I will post the Transfer feature tomorrow!

The repo for the project is located here: https://github.com/TraylorBoy/ShadowGas

This post is also available on DEV.