Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add chain events to monorepo. #1987

Merged
merged 296 commits into from
Jul 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
296 commits
Select commit Hold shift + click to select a range
0ff9197
Add edgeware-beresheet chain to support list.
jnaviask Aug 28, 2020
30e372f
Rename edgeware-beresheet to edgeware-testnet.
jnaviask Aug 28, 2020
52a6af6
Updates
drewstone Sep 6, 2020
4e9415b
Add new session, imonline events, ensure it runs with no errors
drewstone Sep 6, 2020
7e3b85c
Spelling and caps
drewstone Sep 6, 2020
08f46b4
Fixes and successfully logs imonline and new session event data
drewstone Sep 6, 2020
9293b9b
Remove logs, may need to parse exposure.toHuman() differently for bet…
drewstone Sep 6, 2020
ede5bbd
Updates
drewstone Sep 6, 2020
344fe31
Version bump
drewstone Sep 6, 2020
7e15b1d
Merge pull request #19 from hicommonwealth/drew.newsession
drewstone Sep 6, 2020
fb486b4
Adds union type of all supported chains.
jnaviask Sep 8, 2020
7ead31c
Remove extraneous logging.
jnaviask Sep 8, 2020
e144598
Merge pull request #25 from hicommonwealth/jake.add-chain-t
drewstone Sep 8, 2020
8bc3e64
Update listener to use dev types.
jnaviask Sep 8, 2020
9b7d457
offences events
ns-mnawaz Sep 8, 2020
fa53936
Bump API version, add supportedBy helper.
jnaviask Sep 9, 2020
9cedcdc
Merge branch 'master' into mir.event-offences
drewstone Sep 9, 2020
5fe1cfa
offences events updates
ns-mnawaz Sep 9, 2020
0cb3339
offences events updates
ns-mnawaz Sep 9, 2020
72210b1
offences events updates
ns-mnawaz Sep 9, 2020
05d5464
Bump API version.
jnaviask Sep 9, 2020
6e10c46
offences events updates
ns-mnawaz Sep 9, 2020
70a835e
Version bump.
jnaviask Sep 10, 2020
c6be811
Merge pull request #26 from hicommonwealth/mir.event-offences
drewstone Sep 14, 2020
6e5ba40
Added eraPoints, commission, controllerId, NextSessionIds
nblogist Sep 15, 2020
035af90
new session now returns rewardDestination and eraPoints
nblogist Sep 15, 2020
7289fe6
Adding scraper script.
jnaviask Sep 24, 2020
ab9643b
Bump API and node types version.
jnaviask Oct 1, 2020
b94696b
Expose substrate fetcher methods.
jnaviask Oct 5, 2020
6b18e67
Separate council and technicalCommittee fetching.
jnaviask Oct 5, 2020
52ea149
Add explicit types to fetcher methods.
jnaviask Oct 5, 2020
4ab54bd
Edit labels
raykyri Oct 6, 2020
ff0f1c7
Add nvmrc
raykyri Oct 6, 2020
7a99f96
Further edits
raykyri Oct 6, 2020
5e124c3
Address changes
raykyri Oct 6, 2020
3af5b88
Merge pull request #30 from hicommonwealth/raymond.labels
raykyri Oct 6, 2020
53b053c
Version bump
raykyri Oct 7, 2020
bd7b18a
Bump for 2.0 on testnet.
jnaviask Oct 7, 2020
5179df5
Made Requested Chnages
nblogist Oct 12, 2020
29667f3
Bump node-types, fix Kusama decimals.
jnaviask Oct 15, 2020
efefaec
Bump edgeware node types.
jnaviask Oct 19, 2020
3ccd48a
Update API type initialization and listener CMD args.
jnaviask Oct 20, 2020
da5e39c
Bump versions and add basic error handling to listener.
jnaviask Nov 3, 2020
0ebbf79
Tests Passing
nblogist Nov 6, 2020
0e99327
Merge pull request #28 from hicommonwealth/adding-new-arguments-new-s…
drewstone Nov 9, 2020
2d59c31
Version bump
drewstone Nov 9, 2020
a02a974
Fixed tests with unwrap
nblogist Nov 10, 2020
c1a39af
removed an extra line
nblogist Nov 10, 2020
1261b6e
Add maxRange to poller and batch script.
jnaviask Nov 17, 2020
c34a242
Update logging and edge case for batch poller.
jnaviask Nov 17, 2020
3ea3e36
Update batch poller script.
jnaviask Nov 17, 2020
ceb0f55
Bump patch version.
jnaviask Nov 17, 2020
4e1d875
Add log event handler to poller.
jnaviask Nov 17, 2020
e078138
Add aggregateFirst flag.
jnaviask Nov 17, 2020
b5551c5
Add validator election event and enrich council with members.
jnaviask Dec 2, 2020
fe7c393
Fix processor test with election rounds.
jnaviask Dec 2, 2020
9258619
Merge pull request #34 from hicommonwealth/jake.councillor-validator-…
drewstone Dec 2, 2020
588e610
Bump version and fix build.
jnaviask Dec 2, 2020
73eb9d9
Chain events Listener: Archival Mode (#33)
YameenMalik Dec 2, 2020
77564c8
Version bump.
jnaviask Dec 2, 2020
935815d
Add democracy-voted extrinsic event and test. (#32)
jnaviask Dec 4, 2020
0af03a5
Merge branch 'master' into adding-new-arguments-new-session
Dec 4, 2020
96e187f
fixes for new session testing
Dec 7, 2020
0f9cedb
bumped version
Dec 7, 2020
196823f
Add contracts
zakhap Dec 8, 2020
d066d8e
Import SafeMath.sol from @openzepplin package directly
zakhap Dec 8, 2020
3aa3e7f
Generate typechain types for contracts
zakhap Dec 8, 2020
385d61f
Add truffle migration
zakhap Dec 8, 2020
fa52eca
Add ganache to yarn scripts for ease testing
zakhap Dec 9, 2020
4fead6f
Fix truffle migration, contracts launch successfully
zakhap Dec 9, 2020
9e9ef12
Add democracy seconding chain event. (#35)
jnaviask Dec 9, 2020
91a6d29
Merge branch 'master' into zak.marlince
zakhap Dec 9, 2020
63714a2
Add Marlin to Listener
zakhap Dec 9, 2020
c990d84
Add Marlin Types to src/marlin
zakhap Dec 9, 2020
c34bfdd
Add all previous types from first pass and subsequent filters
zakhap Dec 9, 2020
ed3737b
Remove derives to avoid treasury and council loading failures. (#37)
jnaviask Dec 9, 2020
eb8c376
Tidy types.ts for MPond inclusion
zakhap Dec 9, 2020
1c41bc2
Update all copy to MPond wherever relevant
zakhap Dec 9, 2020
5919ea4
Add subscriber.ts
zakhap Dec 9, 2020
00e308f
Add subscribeFunc and storageFetcher
zakhap Dec 9, 2020
182453d
Add processor
zakhap Dec 9, 2020
95330ed
Fix Moloch bug
zakhap Dec 9, 2020
dc0fba5
Export marlin via marlin/index.ts, and import into src/index.ts
zakhap Dec 9, 2020
e749412
Add index.d.ts to marlin contractTypes
zakhap Dec 9, 2020
cb8be12
Add to substrate labeler denom function
zakhap Dec 9, 2020
c92ae2a
Fix type errors in interfaces.ts
zakhap Dec 9, 2020
6ba217f
Add test command to package.json
zakhap Dec 9, 2020
8c9738d
Add marlin.spec.ts integration test, untested
zakhap Dec 9, 2020
fefd0f7
Add typechain generated fiels back to types
zakhap Dec 9, 2020
b9d15cb
Add enricher unit-tests
zakhap Dec 9, 2020
cd8a671
Fix Comp/MPond mixup in subscribeFunc.ts
zakhap Dec 9, 2020
efe1d1f
Processor and storageFetcher unit tests, untested
zakhap Dec 9, 2020
71c781d
Subscriber unit tests
zakhap Dec 9, 2020
3016b92
Merge branch 'master' into zak.marlince
zakhap Dec 9, 2020
826d843
Integration tests now working with MPond contracts, subscribeFunc eve…
zakhap Dec 10, 2020
d80c375
Remove logs from unit tests
zakhap Dec 10, 2020
f58e7c4
Fix marlin tests
zakhap Dec 10, 2020
1f3491e
modified to correclty process a block from past
Dec 10, 2020
0415341
script to get reward points for provided era
Dec 10, 2020
7278f6c
updated newSession event to work with old blocks
zohaib01khan Dec 10, 2020
ee13d27
Bump polkadot API version.
jnaviask Dec 10, 2020
a7f5306
Merge branch 'master' into zak.marlince
zakhap Dec 10, 2020
e712f9b
compGuardian to mpondGuardian
zakhap Dec 10, 2020
dafbe31
Merge pull request #38 from hicommonwealth/zak.marlince
raykyri Dec 11, 2020
d97ae83
Bump to beta version.
jnaviask Dec 11, 2020
50492a1
using `.at()` for fetching data
Dec 17, 2020
cd4a1a1
exposure api fix
Dec 17, 2020
0549605
typecasted rewardDestination to String
Dec 17, 2020
d9715a8
minor changes
Dec 23, 2020
0322615
updating endBlock on each iteration
Dec 23, 2020
32e0b29
minor updates
Dec 23, 2020
7bcbfde
passing startBlock as param to acrivhal mode
Dec 23, 2020
9a974fe
not retruning blocks from archive function casuses heap error
Dec 28, 2020
9fdf5b4
fixed collision of alias
Dec 28, 2020
490892c
updated logging
YameenMalik Dec 28, 2020
5b341c3
beta branch
raykyri Jan 2, 2021
b0c4276
beta branch
raykyri Jan 2, 2021
fc29720
Bump to beta versions.
jnaviask Jan 2, 2021
cfe5296
Fix build and version bump.
jnaviask Jan 2, 2021
8ffd808
Bump node-types version.
jnaviask Jan 2, 2021
c81694a
Remove internal wasm-crypto dep.
jnaviask Jan 2, 2021
0a29249
Bump version for new build.
jnaviask Jan 2, 2021
58d1944
Add stafi and cleanup API init.
jnaviask Jan 4, 2021
fc238b3
Merge branch 'master' into 2.10.2-18-beta
jnaviask Jan 4, 2021
5b1b5f9
Version bump.
jnaviask Jan 8, 2021
aa2e64a
in case not able to determine start range return
Jan 12, 2021
9ba1d4f
Merge branch 'enricher-fixes-for-archival-mode' of https://github.com…
Jan 12, 2021
4813db6
linearlized block processing and fixed waiting validators
Jan 12, 2021
b1cf372
minor linter issue
Jan 12, 2021
a1c4a03
when running in archival mode only polls past data and does not subsc…
Jan 15, 2021
60ef076
Merge branch 'master' into enricher-fixes-for-archival-mode
YameenMalik Jan 18, 2021
9cb5d11
Made dummy apis to pass tests
Jan 18, 2021
d5987f9
reverted factory name
Jan 18, 2021
1ed5d16
validator key often don't have stash id
Jan 19, 2021
198cfe2
fixed eraPoints issue returning 0 for all Validators and updated dumm…
Jan 20, 2021
fa539a5
Upgrade node types to latest.
jnaviask Jan 28, 2021
ea84329
Dependabot bump.
jnaviask Jan 28, 2021
412942e
minor spacing fixes
Feb 3, 2021
3677bfd
Merge branch 'master' into enricher-fixes-for-archival-mode
YameenMalik Feb 3, 2021
fa8ea5d
indent fixes
Feb 3, 2021
b3fc384
Merge branch 'enricher-fixes-for-archival-mode' of https://github.com…
Feb 3, 2021
7644a76
added spacing to ternary conditions
Feb 3, 2021
40b48ec
more indentation
Feb 3, 2021
36a475b
Merge pull request #39 from hicommonwealth/enricher-fixes-for-archiva…
drewstone Feb 4, 2021
234fe29
Revert "Enricher fixes for archival mode"
drewstone Feb 4, 2021
4bff63b
Merge pull request #44 from hicommonwealth/revert-39-enricher-fixes-f…
drewstone Feb 4, 2021
5c14429
Revert "Revert "Enricher fixes for archival mode"" (#45)
drewstone Feb 9, 2021
18bcb37
Bump to beta version with staking changes.
jnaviask Feb 9, 2021
b280ccf
Add Bounty-related events (#40)
zakhap Feb 18, 2021
d322f35
Bump beta version for bounties.
jnaviask Feb 18, 2021
68f2fcb
enhancement: add clover finance (#46)
maxwellfoley3 Mar 1, 2021
510627b
Bump beta version.
jnaviask Mar 1, 2021
1e3a4d3
add HydraDX integration (#47)
maxwellfoley3 Mar 2, 2021
a20b173
Fix hydra url.
jnaviask Mar 2, 2021
975d005
Bump beta version.
jnaviask Mar 2, 2021
8952a73
Bounty storage fetcher bug fix.
jnaviask Mar 3, 2021
e37a5d0
Add democracy voted events to eventToEntity().
jnaviask Mar 22, 2021
dff64c6
Add stronger switch on bounty storage fetcher.
jnaviask Mar 30, 2021
83e4517
Update edgeware types (#53)
drewstone Apr 2, 2021
739e719
Add timeout to substrate API create.
jnaviask Apr 2, 2021
0b07ec9
Add balance transfer event. (#48)
jnaviask Apr 15, 2021
3c66ff5
Bump version.
jnaviask Apr 15, 2021
e4fb68c
Add prettier plugin. (#56)
jnaviask Apr 22, 2021
0b11279
Bump web3 version.
jnaviask Apr 30, 2021
60d8d6f
Add explicit web3 deps.
jnaviask Apr 30, 2021
a8e40ba
Move polkadot libs to peer dependencies.
jnaviask May 3, 2021
5820e4c
Bump version.
jnaviask May 3, 2021
73ac27d
Bump and fix underlying types.
jnaviask May 6, 2021
33805a4
Bump CI node version.
jnaviask May 6, 2021
52b9719
Bump underscore from 1.12.0 to 1.12.1 (#57)
dependabot[bot] May 6, 2021
d4664bc
Fix clover types.
jnaviask May 11, 2021
fb66598
Add yalc documentation.
jnaviask May 21, 2021
c8b16b0
Add additional event handlers for bounties (#60)
raykyri May 21, 2021
6fe3063
Revert "Add additional event handlers for bounties (#60)"
jnaviask May 24, 2021
ca9097d
Add additional event handlers for bounties. (#61)
jnaviask May 24, 2021
94a621b
Bump version.
jnaviask May 24, 2021
e2709b1
Adds more bounty data based on the bounty status enum's content. (#62)
jnaviask May 26, 2021
13e6701
Bump version.
jnaviask May 26, 2021
d6d33b0
Migrate to github actions. (#64)
jnaviask Jun 8, 2021
b2dbaf1
Add support for tracking ERC20 token transfers (#58)
maxwellfoley3 Jun 9, 2021
a978dbd
Bump normalize-url from 4.5.0 to 4.5.1 (#65)
dependabot[bot] Jun 9, 2021
2db888f
Bump glob-parent from 5.1.1 to 5.1.2 (#66)
dependabot[bot] Jun 9, 2021
b683180
Bump version.
jnaviask Jun 9, 2021
906d138
Add tips support. (#59)
jnaviask Jun 16, 2021
f86abba
Fix event storageFetcher tests.
jnaviask Jun 16, 2021
e5691d0
Integrate AAVE governance events. (#63)
jnaviask Aug 2, 2021
9d10e53
Add dydx.
jnaviask Aug 2, 2021
ea0c125
Raises polling interval to 12s from 4s to reduce infura load. (#70)
jnaviask Aug 4, 2021
db2376e
Replace typescript-logging with tslog. (#71)
jnaviask Aug 5, 2021
646caeb
Revert "Replace typescript-logging with tslog. (#71)"
jnaviask Aug 9, 2021
74d8f67
Bump version.
jnaviask Aug 9, 2021
7f48e53
Bump patch version.
jnaviask Aug 13, 2021
2642785
Cleanup Marlin events. (#74)
jnaviask Aug 16, 2021
a7b3fcb
Fix compound description decoding error.
jnaviask Aug 24, 2021
5a1a74f
CE Listener classes (#75)
timolegros Aug 25, 2021
3c69593
Rename Marlin contracts to Compound.
jnaviask Aug 26, 2021
d92f313
Add frax and tribe to supported compound chains
zakhap Sep 17, 2021
09d214e
Add tribe to event types and listener networkUrls. Remove frax
zakhap Sep 18, 2021
86ceaa7
Bump version to 0.8.1
zakhap Sep 18, 2021
0f8a8e9
Bump polkadot versions and hydradx spec
zakhap Sep 20, 2021
e090eef
Swap edgeware listener endpoint.
jnaviask Sep 21, 2021
0b968bf
Fix tipClosing event storageFetcher marshaling.
jnaviask Sep 21, 2021
d0e06dd
Erc20 balance threshold (#77)
timolegros Sep 28, 2021
2c12ed4
Bump version.
jnaviask Sep 28, 2021
d556d58
Swap aaveproposal to onchainproposal.
jnaviask Sep 28, 2021
04961bf
Refactor ERC20 support. (#79)
jnaviask Oct 1, 2021
bcb8531
Bump version.
jnaviask Oct 1, 2021
915401c
Support Compound Governor Bravo contracts (#80)
adamlawrencium Oct 1, 2021
333faa6
Bump version.
jnaviask Oct 1, 2021
f782787
Ensure github actions pass and fix type bugs. (#82)
jnaviask Oct 1, 2021
812e603
Implement openzeppelin governance. (#83)
jnaviask Oct 4, 2021
cbf5665
Storage fetcher no longer only fetches events for proposals started w…
jnaviask Oct 4, 2021
175612d
Rewrite aave storage fetcher to be like compound.
jnaviask Oct 5, 2021
f8b573a
Tim.alchemy (#84)
timolegros Oct 5, 2021
5a2c995
auto-reconnect (#85)
timolegros Oct 5, 2021
7c3385a
Bump version.
jnaviask Oct 5, 2021
7194c26
Replace EventChains with SupportedNetwork. (#86)
jnaviask Oct 7, 2021
3329f8d
Update types to permit local testing.
jnaviask Oct 13, 2021
849796a
Create PULL_REQUEST_TEMPLATE.md (#89)
adamlawrencium Oct 14, 2021
c8e049e
Fix Bravo event decoding. (#90)
jnaviask Oct 15, 2021
b0d56f1
Update support for OZ standard. (#92)
jnaviask Oct 25, 2021
837821d
Improve CE logging to include filename, network, and chain/token name…
timolegros Oct 28, 2021
5242dde
Bump version.
jnaviask Oct 28, 2021
e54043e
Remove hard dependency on infura/alchemy ETH urls. (#93)
jnaviask Nov 2, 2021
26545c6
Tim.logging (#94)
timolegros Nov 2, 2021
aa5f151
Erc20 Approve events chain augmentation (#95)
timolegros Nov 3, 2021
28d6050
Remove edgeware-node-types dependency. (#96)
jnaviask Nov 8, 2021
915ea45
Avoid using latest tag in getBlock.
jnaviask Dec 15, 2021
cfe801f
Remove getBlock call.
jnaviask Dec 16, 2021
356a088
Remove latest tags.
jnaviask Dec 29, 2021
9bed43c
update license
dillchen Feb 10, 2022
7c78c93
Add listening/processing of ERC721 events. (#101)
jasoncox576 Apr 11, 2022
f2186f3
Version bump.
jnaviask Apr 11, 2022
054310e
Patch bump for erroneous publish.
jnaviask Apr 11, 2022
678dd0d
Integrate Commonwealth chain events. (#108)
jnaviask Jun 1, 2022
0ba98d1
Version bump.
jnaviask Jun 1, 2022
4b1650d
Enrich additional data in ProjectCreated. (#109)
jnaviask Jun 6, 2022
d304c9c
one liner (#110)
jnaviask Jun 16, 2022
9a26a8f
Version bump.
jnaviask Jun 16, 2022
06cd9b0
Fix BN conversion bug.
jnaviask Jun 16, 2022
791d3f3
Move chain events into folder.
jnaviask Jul 21, 2022
57d401f
Merge branch 'temp'
jnaviask Jul 21, 2022
e8244e3
Add chain events.
jnaviask Jul 21, 2022
b1f1d59
Update chain events import routes.
jnaviask Jul 21, 2022
933b8f7
Add chain events CI.
jnaviask Jul 21, 2022
634afb1
Rename CI packages.
jnaviask Jul 21, 2022
9e1f2e2
Add CI filters for paths.
jnaviask Jul 21, 2022
b84b00f
Attempt CI fix.
jnaviask Jul 21, 2022
1105f0b
Remove chain events failures from CI.
jnaviask Jul 21, 2022
2be0f90
Remove conditional testing.
jnaviask Jul 21, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
48 changes: 46 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: CI
on: [push]

jobs:
build:
name: Build
commonwealth:
name: Commonwealth Tests
runs-on: ubuntu-latest

defaults:
Expand Down Expand Up @@ -64,3 +64,47 @@ jobs:
with:
name: code-coverage-report
path: coverage

chain-events:
name: Chain Events Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/chain-events

steps:
- name: Checkout
uses: actions/checkout@v1

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install dependencies
run: yarn

- name: Run unit tests
run: yarn unit-test

# TODO: fix integration tests -- they currently fail
# - name: Run integration tests
# run: yarn integration-test

# TODO: reintegrate code coverage once we get nyc working with hardhat

# TODO: fix linter and then reintegrate using current ts version
# - name: Run linter
# run: yarn lint
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"keywords": [],
"workspaces": [
"packages/common-common",
"packages/chain-events",
"packages/token-balance-cache",
"packages/commonwealth"
],
Expand Down
42 changes: 42 additions & 0 deletions packages/chain-events/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"extends": [
"airbnb-base",
"plugin:prettier/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"plugins": ["@typescript-eslint"],
"parser": "@typescript-eslint/parser",
"settings": {
"import/extensions": [".js", ".ts"],
"import/resolver": {
"node": {},
"webpack": {
"config": "webpack/webpack.common.js"
}
}
},
"ignorePatterns": ["contractTypes", "eth", "dist"],
"rules": {
"@typescript-eslint/interface-name-prefix": "off",
"import/prefer-default-export": 0,
"import/extensions": 0,
"import/no-cycle": 0,
"import/order": ["error", {
"newlines-between": "always"
}],
"max-classes-per-file": "off",
"no-await-in-loop": "off",
"no-import-cycles": "off",
"no-nested-ternary": "off",
"no-param-reassign": "off",
"no-plusplus": "off",
"no-restricted-syntax": "off",
"no-underscore-dangle": "off",
"no-useless-constructor": "off",
"class-methods-use-this": "off"
}
}
16 changes: 16 additions & 0 deletions packages/chain-events/.github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!--- Provide a general summary of your changes in the Title above -->

## Description
<!--- Describe your changes in detail -->

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

## How has this been tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, tests ran to see how -->
<!--- your change affects other areas of the code, etc. -->

## Have proper tags been added (for bug, enhancement, breaking change)?
- [ ] yes
41 changes: 41 additions & 0 deletions packages/chain-events/.github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build
on: [push]

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install dependencies
run: yarn

- name: Run unit tests
run: yarn unit-test

- name: Run integration tests
run: yarn integration-test

# TODO: reintegrate code coverage once we get nyc working with hardhat

- name: Run linter
run: yarn lint
16 changes: 16 additions & 0 deletions packages/chain-events/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.DS_Store
/eth/build
/eth/artifacts
/eth/cache
node_modules/
.vscode
yarn-error.log
.nyc_output/
coverage/

.env
*.tgz

.yalc/
yalc.lock
/dist/
7 changes: 7 additions & 0 deletions packages/chain-events/.mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extension": [".spec.ts"],
"package": "./package.json",
"timeout": 60000,
"require": [ "jsdom-global/register", "tsconfig-paths/register", "@babel/register", "source-map-support/register" ],
"exit": true
}
1 change: 1 addition & 0 deletions packages/chain-events/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v14
6 changes: 6 additions & 0 deletions packages/chain-events/.nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "@istanbuljs/nyc-config-typescript",
"all": false,
"reporter": "html",
"include": [ "src/" ]
}
4 changes: 4 additions & 0 deletions packages/chain-events/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"arrowParens": "always",
"singleQuote": true
}
14 changes: 14 additions & 0 deletions packages/chain-events/.stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"ignoreFiles": "client/styles/lib/*",
"rules": {
"block-no-empty": null,
"color-no-invalid-hex": true,
"comment-empty-line-before": [ "always", {
"ignore": ["stylelint-commands", "after-comment"]
} ],
"declaration-colon-space-after": "always",
"indentation": 4,
"max-empty-lines": 2,
"unit-whitelist": ["px", "em", "rem", "%", "s", "vh", "deg", "ms"]
}
}
Loading