transmute-industries / transmute-framework

TypeScript dApp Framework
https://framework.transmute.industries/
42 stars 8 forks source link

Help! Gas prices should be constants. #85

Open OR13 opened 6 years ago

OR13 commented 6 years ago

There are many places where we call truffle directly, and we are using magic numbers instead of configurable values.

  createEventStore = async (factory, fromAddress) => {
    let tx = await factory.createEventStore({
      from: fromAddress,
      gas: 4000000
    });

    let fsa = getFSAFromEventArgs(tx.logs[0].args);
    return {
      events: [fsa],
      tx: tx
    };
  };

It would be better to switch these to values imported from a GasPriceConfig.ts module at the top level. That way we could change them all from one place after the library has been built without rebuilding it.