GasToken is an Ethereum ERC20 smart contract that lets users tokenize gas, an internal resource used in Ethereum to pay for transactions. The idea is simple: store gas when gas prices are low, release it when gas prices are high and experience lower transaction fees. GasTokens can be traded like any other ERC20 token.
The details on how GasToken works can be found here: https://gastoken.io
This repository contains the Solidity code for two GasToken variants (GST1 and GST2) and exhaustive test suites of those contracts' functionalities. The
contract/ folder contains our smart contracts, the
test/ folder contains our pyethereum.tester based test suite.
The code was tested using python 3.6.2 and Solidity Version: 0.4.18+commit.9cf6e910.Darwin.appleclang
$ python -m pip install -r requirements.txt
to install the required dependencies.
To run the tests for the Storage-based GasToken (GST1), run
$ python -m test.test_GST1
To run the tests for the Contract-based GasToken (GST2), run
$ python -m test.test_GST2
To run tests for the RLP encoding used in GST2, run
$ python -m test.test_rlp
We are a team of blockchain researchers from around the world:
- Lorenz Breidenbach (ETH Zürich, Cornell Tech, IC3)
- Phil Daian (Cornell Tech, IC3)
- Florian Tramèr (Stanford University)
We offer absolutely no support, guarantees, advice, or other help with GasToken. If you like it, use it.