Skip to content
This repository has been archived by the owner on Jul 13, 2022. It is now read-only.

Events Support #451

Merged
merged 10 commits into from
Sep 27, 2018
Merged

Events Support #451

merged 10 commits into from
Sep 27, 2018

Conversation

slyfox42
Copy link
Contributor

@slyfox42 slyfox42 commented Sep 25, 2018

refs #442

📓 Overview

  • Added enum with event names for each contract that has events
  • Template now maps each event correctly to a function that calls the web3.contract[event] method to subscribe to that particular event
  • Modified BaseContract.ts. Now only contract that contain events extend this class, which now contains the methods once, allEvents and getPastEvents. BaseContract is passed the Events enum as generic from the inheriting classes.
  • Added the latest beta version of ganache-cli as dependency, which supports websocket, to run tests. In a later PR I will add a system that boots and bootstraps Ganache-cli before tests, similar to what we have in other packages.
  • Added unit tests for events

@slyfox42 slyfox42 changed the title Feature/events support Events Support Sep 25, 2018
@slyfox42 slyfox42 force-pushed the feature/events-support branch from 7cd3dbe to aa1682a Compare September 27, 2018 09:07
@slyfox42 slyfox42 merged commit 9aedbc7 into feature/abi-gen Sep 27, 2018
@slyfox42 slyfox42 deleted the feature/events-support branch September 27, 2018 10:52
slyfox42 added a commit that referenced this pull request Oct 5, 2018
* initial commit 🌅

* Initial Template (#450)

* initial commit

* added abi-gen script

* wip

* first tests

* working constant methods

* first contract tests

* template cleanup

* minor fix to tests

* removed abis folder

* removed typechain contracts

* commented non working circleci steps

* removed useless files

* rollback RigoToken test

* eslint ignoring generated files

* minor rollback

* fixes to package.json

* Events Support (#451)

* added getPastEvents method

* added allEvents function

* added once, missing test

* modified event partial

* fixed event partial

* now only contracts with events extend the baseContract

* fixed unit tests

* fixed return types of txFunctions

* removed test file, minor refactor

* Fix API build process (#453)

* initial commit 🌅

* minor fixes

* removed unused dependencies

* restored build-api circleci step

* fix to package.json

* minor fixes

* removed extra web3 instance

* fixed build script

* Update DApp with new API (#454)

* initial commit 🌅

* wip

* wip

* seems to be working

* removed ganache-cli dependency from api

* added contractFactory function

* refactoring and fixed errors

* restored build-dapp step in circleci config

* fixed stuck getId on API file

* refactor

* Fixed DApp unit tests (#462)

* updated babel and dependencies

* fixed blockchainservice tests

* fixed getVaultFees and getVaultSupply

* fixed getVaultTransactions

* fixed selectFirstVault and createVault epic

* updated snapshots temporarily

* fixed remaining unit tests

* removed babel-preset-react-app

* removed unused dependency. fixed babel dependency versions to avoid issues in the future

* fixed circleCI steps

* fix to babel-core version

* refactored code to avoid bugs

* fixed unit and feature tests

* using rawgit url with cdn

* fix to vaults feature test

* code refactor (#466)
slyfox42 added a commit that referenced this pull request Oct 5, 2018
* initial commit 🌅

* Initial Template (#450)

* initial commit

* added abi-gen script

* wip

* first tests

* working constant methods

* first contract tests

* template cleanup

* minor fix to tests

* removed abis folder

* removed typechain contracts

* commented non working circleci steps

* removed useless files

* rollback RigoToken test

* eslint ignoring generated files

* minor rollback

* fixes to package.json

* Events Support (#451)

* added getPastEvents method

* added allEvents function

* added once, missing test

* modified event partial

* fixed event partial

* now only contracts with events extend the baseContract

* fixed unit tests

* fixed return types of txFunctions

* removed test file, minor refactor

* Fix API build process (#453)

* initial commit 🌅

* minor fixes

* removed unused dependencies

* restored build-api circleci step

* fix to package.json

* minor fixes

* removed extra web3 instance

* fixed build script

* Update DApp with new API (#454)

* initial commit 🌅

* wip

* wip

* seems to be working

* removed ganache-cli dependency from api

* added contractFactory function

* refactoring and fixed errors

* restored build-dapp step in circleci config

* fixed stuck getId on API file

* refactor

* Fixed DApp unit tests (#462)

* updated babel and dependencies

* fixed blockchainservice tests

* fixed getVaultFees and getVaultSupply

* fixed getVaultTransactions

* fixed selectFirstVault and createVault epic

* updated snapshots temporarily

* fixed remaining unit tests

* removed babel-preset-react-app

* removed unused dependency. fixed babel dependency versions to avoid issues in the future

* fixed circleCI steps

* fix to babel-core version

* refactored code to avoid bugs

* fixed unit and feature tests

* using rawgit url with cdn

* fix to vaults feature test

* code refactor (#466)

* updated API readme
slyfox42 added a commit that referenced this pull request Oct 5, 2018
* initial commit 🌅

* Initial Template (#450)

* initial commit

* added abi-gen script

* wip

* first tests

* working constant methods

* first contract tests

* template cleanup

* minor fix to tests

* removed abis folder

* removed typechain contracts

* commented non working circleci steps

* removed useless files

* rollback RigoToken test

* eslint ignoring generated files

* minor rollback

* fixes to package.json

* Events Support (#451)

* added getPastEvents method

* added allEvents function

* added once, missing test

* modified event partial

* fixed event partial

* now only contracts with events extend the baseContract

* fixed unit tests

* fixed return types of txFunctions

* removed test file, minor refactor

* Fix API build process (#453)

* initial commit 🌅

* minor fixes

* removed unused dependencies

* restored build-api circleci step

* fix to package.json

* minor fixes

* removed extra web3 instance

* fixed build script

* Update DApp with new API (#454)

* initial commit 🌅

* wip

* wip

* seems to be working

* removed ganache-cli dependency from api

* added contractFactory function

* refactoring and fixed errors

* restored build-dapp step in circleci config

* fixed stuck getId on API file

* refactor

* Fixed DApp unit tests (#462)

* updated babel and dependencies

* fixed blockchainservice tests

* fixed getVaultFees and getVaultSupply

* fixed getVaultTransactions

* fixed selectFirstVault and createVault epic

* updated snapshots temporarily

* fixed remaining unit tests

* removed babel-preset-react-app

* removed unused dependency. fixed babel dependency versions to avoid issues in the future

* fixed circleCI steps

* fix to babel-core version

* refactored code to avoid bugs

* fixed unit and feature tests

* using rawgit url with cdn

* fix to vaults feature test

* code refactor (#466)

* updated createVault to estimate the gas amount rather than using hardcoded one
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant