EthereumCommonwealth / etherwallet

Ethereum Classic blockchain interaction web tool.
https://ethereumproject.github.io/etherwallet/
BSD 4-Clause "Original" or "Old" License
14 stars 17 forks source link

Fix/contract call-#218 #240

Closed j-chimienti closed 6 years ago

j-chimienti commented 6 years ago

fixes #218

screen shot 2018-08-23 at 10 09 10 am

issue:

finding contract abi via name runs into errors if multiple functions w/ same name

changes:

updates to ethFuncs, uiFuncs, and contract class to handle multiple functions in abi w/ same name

  1. contract class and ethFuncs / uiFuncs accept contract interaction to accept function or name of function

    • see ethFuncs.prepContractData for ex
  2. Promisify sending tx or executing contract to make code more maintainable

    • separate error handling from casual code
    • remove nesting and awkward code patterns
  3. reduce rewritten code for user notification

    • sending tx / contract function displays errors to user (successful txs default as well)

testing

https://github.com/EthereumCommonwealth/etherwallet/issues/218#issuecomment-415083751

j-chimienti commented 6 years ago

fixes #241

sendcontracttx

Validation

  1. clear rawTx and signedTx if user changes values

  2. add tx unit

  3. set gasLimit and value as numbers

  4. gasLimit min = 21,000

  5. value min = 0

todo:

  1. add tx unit select
  2. set max value of tx.gasLimit based on api call