Skip to content

Conversation

abarmat
Copy link
Contributor

@abarmat abarmat commented Apr 28, 2020

This PR adds running a lint and test script when pushing

@abarmat abarmat requested a review from davekay100 April 28, 2020 13:18
@abarmat abarmat added the enhancement New feature or request label Apr 28, 2020
@abarmat abarmat self-assigned this Apr 29, 2020
@abarmat
Copy link
Contributor Author

abarmat commented Apr 29, 2020

@davekaj

  • Committing on the repo will run prettier --write on the files that are being added.
  • Pushing will run lint and tests.

Note:

  • You can always pass --no-verify to skip the hooks.
  • We have like 100 tests, so it takes time to run before pushing. If we see it is too much we can remove it. Maybe Buidler run the tests faster.

I would like to left both flattening and ABI extraction for a CI task that export them to an NPM package.

@abarmat abarmat changed the title build: add husky rule for push build: add husky rules Apr 29, 2020
@abarmat abarmat merged commit 4bd9973 into feat/staking-allocation Apr 29, 2020
@abarmat abarmat deleted the chore/husky branch April 29, 2020 14:34
abarmat added a commit that referenced this pull request May 4, 2020
* stlye: increase max line

* tests: remove unused test

* curation: refactor and natspec update

* disputes: update reward calculation and natspec

* tests: remove unused and add new defaults

* staking: rewrite first version with stake+allocate

* staking: add channel data

* staking: fix test

* staking: add thawing period

* staking: add token locking for withdrawal

* staking:
- add "low-level" stake balance logic in a library
- add and improve stake, unstake, allocate, slash functions
- add withdraw unlocked tokens after thawing period
- add support for thawing averaging when multiple unstake request
- move slashingPercent settings and calculations to dispute contract

* staking: add tests

* staking: add more test

* staking: add unstake weighted avg tests

* tests: equal -> eq

* staking: add more tests

* curation: rename functions

* staking: add channel multisig creation

* staking: channel settlement according to incoming token address

* staking:
- use underscore for private methods as convention
- actually create the conterfactual multisig channel
- fix tests

* staking: add rebate pool

* staking: avoid distribution of curation fees if subgraph not curated

* build: fix and improve deploy script (#175)

* build:
- deploy script using await/async
- deploy missing new contracts
- add a config file with desired deploy parameters
* build: remove web3 dependency in config file
* build: add tx hash when calling setters and better logging

* staking: remove channel proxy channel creation in favor of tracking channels by index node signer address

* staking: delete rebate pool when all settlements claimed

* staking: add channelDisputePeriod

* staking:
- allow max settlement to be zero
- add event for rebate claim
- setter for curation

* staking: allow to restake when claiming the rebate

* staking: do not allow to slash more funds than staked

* staking: add channel dispute period restriction to claim

* staking: check condition to avoid unstaking more funds that exist at the moment of withdrawal

* staking: remove unallocate public call (for now) as only way to unallocate from subgraph must be to settle

* disputes: chain id (#176)

* staking: add more comments

* epochs: remove unused redundant block number data (#177)

* build: add husky rules (#178)

* build: add husky rule for push

* build: add husky config file

* build: husky lint-staged

* build: setup husky in package.json

* build: process un-prettyfied files

* staking: add setter for curation fee percentage and more tests

* staking: address review improvements

* staking: remove unused import

* staking: rename index node stake tokens to make it clearer

* staking: remove totalTokens and totalFees unused state
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants