trufflesuite / drizzle

Reactive Ethereum dapp UI suite
906 stars 238 forks source link

Fix/abi spec v0.6.0 breaking change #79

Closed ghost closed 4 years ago

ghost commented 4 years ago

This PR fixes #74 .

These changes allow drizzle to properly distinguish between functions that need to be bound to cacheCall vs cacheSend. Also included are unit tests and a separate UI test (see test-0.6.0-ABI under ui-tests) to verify that drizzle can consume 0.6.0+ ABI artifacts while preserving backwards compatibility with 0.5.0+ artifacts. The UI test uses a solc 0.6.0+ contract that incorporates both payable and nonpayable functions.

To run the unit tests:

  1. In root dir: yarn
  2. Run unit tests: yarn test

To run the UI test:

  1. In root dir: yarn
  2. In another terminal, deploy a local blockchain: yarn ganache
  3. Change dir to the truffleV6 project: cd ui-tests/truffleV6
  4. Compile and migrate the 0.6.0 contract: yarn ganache:deploy
  5. Change dir to ui test: ../test-0.6.0-ABI
  6. Launch the ui test yarn serve:ui

CC: @nicholaspai - please review and let us know if there are any changes or missing items. Thank you!

Co-authored by @MalloryLeeWong Thanks @cds-amal for your feedback and guidance.

ikropotov commented 4 years ago

@xMNG @cds-amal @nicholaspai Is it going to develop/master/release any time soon (or #76)?

cds-amal commented 4 years ago

@ikropotov Apologies for the delay. Things have been hectic for the last few weeks. I've moved this as ready for review so we can get it out the door.

OnlyOneJMJQ commented 4 years ago

Tested on my local and it looks good to me. Thanks for your hard work @xMNG and @MalloryLeeWong! Looking forward to any future contributions! Again apologies for the delay in getting this looked at and merged.