Skip to content

TMP: Gas Station #9

Description

@Evert0x

TMP-9: Gas station


tmp: 9
title: Gas Station
author: Evert Kors (@Evert0x)
discussions-to: #9
status: Draft
type: Module
created: 2021/02/04
requires (*optional):
replaces (*optional):


Simple Summary

THX modules support the _msgSender() function to retrieve the signer/sender of the transaction. This allows gas less transactions. This module provides a point of entry to these gas less calls.

Abstract

This module can be used for gas less transactions

Motivation

...

Specification

Interface

interface IGasStation {
    event Result(bool success, bytes data);

    function initializeGasStation(address _admin) external;

    function getGasStationAdmin() external view returns (address);

    function getLatestNonce(address _signer) external view returns (uint256);

    function call(
        bytes calldata _call,
        uint256 _nonce,
        bytes memory _sig
    ) external;

    function setSigning(bool _enabled) external;
}

Storage

 
library LibGasStationStorage {
  bytes32 constant GASSTATION_STORAGE_POSITION = keccak256(
    "diamond.standard.gasstation.storage"
  );

  struct GSStorage {
    address admin;
    mapping(address => uint256) signerNonce;
    uint256 lockCounter;
    bool enabled;
  }
}

Rationale

Backwards Compatibility

Reference Implementation

Security Considerations

Copyright

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions