Skip to content
This repository was archived by the owner on Oct 10, 2024. It is now read-only.

Conversation

@nostdm
Copy link
Contributor

@nostdm nostdm commented Jul 27, 2020

Changes

  • 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.

@nostdm nostdm force-pushed the controller-gas-token branch from 872f810 to 1ef8a58 Compare July 27, 2020 08:39
@nostdm nostdm requested review from i-stam and mischat July 27, 2020 08:40
Copy link
Contributor

@mischat mischat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there are some changes in there, with my comments, that we should discuss or change accordingly.

@nostdm nostdm force-pushed the controller-gas-token branch from 5a8314c to 068d372 Compare July 28, 2020 10:21
@nostdm nostdm force-pushed the controller-gas-token branch from 9295eba to a78ab8a Compare July 30, 2020 09:23
@nostdm nostdm force-pushed the controller-gas-token branch from a78ab8a to c3a1261 Compare July 30, 2020 09:46
@nostdm nostdm force-pushed the controller-gas-token branch from f48f339 to f6a3e6f Compare July 31, 2020 11:51
@nostdm nostdm merged commit 11e3788 into master Aug 3, 2020
@nostdm nostdm deleted the controller-gas-token branch August 3, 2020 09:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants