abridged / dao-help

Template created to facilitate Collab19, an international relief fund using Ethereum
https://collab19.live
11 stars 7 forks source link

Gas price is hardcoded in membership token transfer flow #5

Open adklempner opened 4 years ago

adklempner commented 4 years ago

In the flow TRF ERC20 Token, node Contract Executor, the gas price is hard coded:

let overrides = {
    // The maximum units of gas for the transaction to use
    gasLimit: 800000,

    // The price (in wei) per unit of gas
    gasPrice: ethers.utils.parseUnits('8.0', 'gwei'),

};

As the average gas price on the network grew, I had to keep rewriting the value so that transactions for membership tokens would succeed relatively quickly. It would be easier if the gas price for this transaction (and perhaps other transactions?) was a global const. However, I'm not sure how this would interact with the other gas-related global constants, min_eth_for_gas_fee and gas_buffer

Ideally, the gas price would be determined by data from something like the Eth Gas Station API

kedMertens commented 4 years ago

Hi! I'm participating in DAO Hack Month and would like to resolve that issue as a part of my project, it is ok? The project is aiming to propose additional features and some improvements of dao-help