Created a gasProxy.sol contract which allows the controller to execute a transaction and have some of it's gas refunded using gas tokens.
Created a corresponding gasRefundable.sol contract which integrates with the CHI gas token by default.
Opted to use the gas token address directly instead of resolving ENS to reduce gas cost overhead.
Gas token address and parameters are settable by the controller in case where we need to change the gas token to a different one.
Added gasToken.sol and gasBurner.sol mock contracts to help with testing.
Added the new contracts to the various CI jobs.
Formatted the new contracts with prettier.
Added tests cases for the gas proxy and gas refundable settings.
Testing
Ran the security tools on contracts related to the gas proxy.
Successfully ran existing gas proxy and gas refundable test cases.
Tested the gas token and gas proxy integration on Ropsten and the Development network.
Update
Opted to use structs in method parameters and return values to make the interface cleaner.
Note that this requires the use of pragma experimental ABIEncoderV2; even though since 0.6.0 it's no longer experimental:
You still have to explicitly activate it using pragma experimental ABIEncoderV2; - we kept the same pragma, even though it is not considered experimental anymore.
Changes
Testing
Update
pragma experimental ABIEncoderV2;
even though since 0.6.0 it's no longer experimental: