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

Squash #211

Merged
merged 332 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
332 commits
Select commit Hold shift + click to select a range
fab3b4c
home page button
daodesigner Jun 9, 2022
1259e25
changes
daodesigner Jun 9, 2022
ac2d7d5
fix(app): fixed babel error that converts ** to .pow causing build fa…
daodesigner Jun 9, 2022
dc40032
feat(cli): crate prague erc20, mint with 18 decimals
daodesigner Jun 9, 2022
d0acebf
stub out vkregistry
daodesigner Jun 9, 2022
4887e7b
v0.3.1
daodesigner Jun 9, 2022
b5e0f74
bump npm version
daodesigner Jun 9, 2022
4a2dc84
v0.3.2
daodesigner Jun 9, 2022
104c797
Merge pull request #122 from quadratic-funding/feat/vote
0xjei Jun 9, 2022
375b63c
fix: numeric overflow when passing initial supply of ERC20 token to c…
0xjei Jun 9, 2022
c3542f7
message hook
daodesigner Jun 9, 2022
6f7d38b
v0.3.3
daodesigner Jun 9, 2022
abe27c5
feat: track SimpleHackathon contract as a recipient registry in the s…
0xjei Jun 9, 2022
44eaeea
fix: missing SimpleHackathon source on subgraph.yaml
0xjei Jun 9, 2022
aa8d6d7
fix: build error due to missing data source
0xjei Jun 9, 2022
1a3bab8
feat: add basic signup command; minors and code lint
0xjei Jun 9, 2022
571e243
v0.4.0
daodesigner Jun 9, 2022
f3a096b
revert: revern npm deploy
daodesigner Jun 9, 2022
1b26712
v1.0.0
daodesigner Jun 9, 2022
68e6766
revert: npm revert to 0.3.3
daodesigner Jun 9, 2022
7e84da4
v1.0.1
daodesigner Jun 9, 2022
5b87e65
Merge branch 'npm' into cohort/ethPrague-jei
daodesigner Jun 9, 2022
d430fb3
WIP: sigup patch
daodesigner Jun 9, 2022
735765b
patch - use pubkey to generate unserialized contract params for signup
daodesigner Jun 9, 2022
0254747
feat(cli): dothething command to batch all the other commands
daodesigner Jun 10, 2022
677aaa1
v1.1.0
daodesigner Jun 10, 2022
1ac8fb7
deploy round cli
daodesigner Jun 10, 2022
cb4f445
v1.2.0
daodesigner Jun 10, 2022
c4eb8dd
fix(cli): patch prague deploy
daodesigner Jun 10, 2022
9d31ae6
v1.3.0
daodesigner Jun 10, 2022
40775b2
Merge pull request #121 from quadratic-funding/cohort/ethPrague-jei
daodesigner Jun 10, 2022
e50f68f
Merge pull request #123 from quadratic-funding/npm
daodesigner Jun 10, 2022
a32f044
WIP:vote
daodesigner Jun 10, 2022
2986a30
squash and merge
daodesigner Jun 10, 2022
b689285
Merge pull request #127 from quadratic-funding/cohort/ethPrague-hotfix
daodesigner Jun 10, 2022
44ba7a1
copy changes
daodesigner Jun 10, 2022
c059952
Merge pull request #132 from quadratic-funding/cohort/ethPrague-hotfix
daodesigner Jun 10, 2022
69d3e65
revert to hash router for IPFS
daodesigner Jun 10, 2022
3012fe8
Merge pull request #133 from quadratic-funding/cohort/ethPrague-hotfix
daodesigner Jun 10, 2022
8ec55ac
recipient ids
daodesigner Jun 10, 2022
4dbb5db
messages test
daodesigner Jun 10, 2022
6c5f760
Merge pull request #134 from quadratic-funding/feat/vote
daodesigner Jun 10, 2022
5a9f16d
Merge branch 'cohort/ethPrague-hotfix' of https://github.com/quadrati…
daodesigner Jun 10, 2022
ffd187c
vote in batches
daodesigner Jun 10, 2022
5a6da8f
refactor: update contents for Ballot, Quickstart and Settings drawers…
0xjei Jun 10, 2022
c7ebaad
Merge branch 'cohort/ethPrague-jei' into cohort/ethPrague-hotfix
daodesigner Jun 10, 2022
6058984
fund user wallets
daodesigner Jun 10, 2022
6c33b5e
Merge pull request #135 from quadratic-funding/cohort/ethPrague-hotfix
daodesigner Jun 10, 2022
fa88a46
hardcode prague pubkeys
daodesigner Jun 10, 2022
31ca2a3
Merge pull request #137 from quadratic-funding/feat/fund
daodesigner Jun 10, 2022
e85c07e
Merge pull request #136 from quadratic-funding/cohort/ethPrague-jei
daodesigner Jun 10, 2022
aec08b6
feat(cli): command to fund user wallets for ethPrague
daodesigner Jun 11, 2022
c970170
v1.4.0
daodesigner Jun 11, 2022
19e846e
remove unused deps
daodesigner Jun 11, 2022
b06ddf7
patch
daodesigner Jun 11, 2022
545fc38
docs(cli): command description
daodesigner Jun 11, 2022
4a67d64
v1.4.1
daodesigner Jun 11, 2022
bea0f87
Merge pull request #140 from quadratic-funding/feat/fund
daodesigner Jun 11, 2022
f1b11db
feat(app): graceful error handling on MACI key input
daodesigner Jun 11, 2022
0b3a653
v1.5.0
daodesigner Jun 11, 2022
8d9ebdb
add two projects
daodesigner Jun 11, 2022
db3f344
experimental navbabr
daodesigner Jun 11, 2022
5f826ae
lint and update button text
daodesigner Jun 11, 2022
85a0019
update maci input
daodesigner Jun 11, 2022
6ecde86
trim extra space from macikey input
daodesigner Jun 11, 2022
fed87a2
ballot changes
daodesigner Jun 11, 2022
bda85ac
better error messages
daodesigner Jun 11, 2022
883058b
quick fix - ballot page qr scan
daodesigner Jun 11, 2022
c51cdef
clean up
daodesigner Jun 11, 2022
b7cd322
revert
daodesigner Jun 11, 2022
2857833
success toast after tx is confirmed
daodesigner Jun 11, 2022
6093571
fix qr scanning on ballot
daodesigner Jun 11, 2022
839fa1f
Fix unable to run pre-commit hook in Ubuntu
baumstern Jun 12, 2022
eab14a3
voting closed
daodesigner Jun 13, 2022
af01221
Merge pull request #141 from quadratic-funding/fix-hook
daodesigner Jun 23, 2022
5c87081
feat(ethbarcelona cli): configure cli for eth barcelona: polygon support
daodesigner Jun 29, 2022
e1ecb76
clean up ethPrague constants
daodesigner Jun 29, 2022
0ff3ab0
feat(polygon support): gas price tweaks, eject csv of public keys on …
daodesigner Jun 29, 2022
45f6f07
v1.6.0
daodesigner Jun 29, 2022
bfdf3bd
v2.0.0
daodesigner Jun 29, 2022
9c2b76e
update git head
daodesigner Jun 29, 2022
95e5253
update git head for npm
daodesigner Jun 29, 2022
c60ba45
style(cli): nit formating
daodesigner Jun 29, 2022
47562ac
v2.0.1
daodesigner Jun 29, 2022
35cbab0
base website changes
daodesigner Jun 29, 2022
5e59b1a
feat(all): ethBarcelona changes
daodesigner Jul 6, 2022
1bc8854
routing+
daodesigner Jul 6, 2022
1e83688
project page nav bug fix
daodesigner Jul 6, 2022
f72f450
nit: copy change on settings screen
daodesigner Jul 6, 2022
9a88f84
feat(ethbarcelona: cli easy setup): change max projects
daodesigner Jul 8, 2022
7212ea9
v2.1.0
daodesigner Jul 8, 2022
3aa5872
fix: duration
daodesigner Jul 8, 2022
1318459
ens
daodesigner Jul 8, 2022
f3dc8eb
fix, upgrade alchemy node
daodesigner Jul 8, 2022
aca8181
recover signup
daodesigner Jul 8, 2022
d77491d
chore: improve guide and settings drawers
0xjei Jul 8, 2022
e4616bc
Merge pull request #146 from quadratic-funding/cohort/ethBcn-jei
daodesigner Jul 9, 2022
b5994a8
Barcelona voting ready
daodesigner Jul 9, 2022
8d0574d
prod
daodesigner Jul 9, 2022
83b2de6
add project
daodesigner Jul 14, 2022
3bb445d
nit: text
daodesigner Jul 14, 2022
4c89e0f
update polygon rpc
daodesigner Jul 27, 2022
5eede7c
v2.2.0
daodesigner Jul 27, 2022
294d24c
bump version
daodesigner Jul 27, 2022
b2ce0e5
v2.2.1
daodesigner Jul 27, 2022
4904ee2
bugfix: verify macikeypair is valid length
daodesigner Jul 27, 2022
3c417a5
ethLatam
daodesigner Jul 28, 2022
d907b40
Merge branch 'main' into cohort/ethLatam
daodesigner Jul 28, 2022
c029365
v2.3.0
daodesigner Jul 28, 2022
38772ad
Merge pull request #1 from quadratic-funding/cohort/ethLatam
0xTobias Jul 28, 2022
bb3028a
bump version
daodesigner Jul 29, 2022
3e24cce
v2.3.1
daodesigner Jul 29, 2022
93b0c05
favicon + bg + title + navvar
0xTobias Jul 30, 2022
0b7f5c9
i18next
0xTobias Jul 31, 2022
efd5671
fix all links contrast
0xTobias Jul 31, 2022
0f74df8
home buttons
0xTobias Jul 31, 2022
50ec2d0
better buttons + better ballot page
0xTobias Jul 31, 2022
997baf9
YES BACKGROUND
0xTobias Jul 31, 2022
8f151a8
feat: adapt Ballot page to fit figma designs
Jul 31, 2022
9e23eae
chore: remove console warnings
Jul 31, 2022
facff95
Merge pull request #2 from 0xTobias/ballot-page-changes
0xTobias Aug 1, 2022
59bd76b
fix: responsive home
0xTobias Aug 4, 2022
fd24cf2
feat: new english texts + delete begin and settings page
0xTobias Aug 5, 2022
9b78488
feat: spanish translations
0xTobias Aug 6, 2022
c9a18b1
Merge pull request #4 from 0xTobias/feat/spanish-translations
Aug 6, 2022
b99b037
feat: update Ballot and BallotOption styles to support mobile views
Aug 5, 2022
56c8386
chore: refactor components disposition for mobile viewport
Aug 5, 2022
57f2724
styles: update all buttons and inputs to match ETH LATAM DS
Aug 6, 2022
8030153
chore: rebase to main and fix minor issues post rebase
Aug 6, 2022
471e74d
chore: prune unneeded code
Aug 6, 2022
8dc436f
chore: prune unneeded code, refactor BallotExplainer to display the a…
Aug 6, 2022
a270647
feat: add transaltions to MagikButton, Ballot and BallotOption
Aug 6, 2022
6c8e3bd
feat: make BallotExplainer Accordion compliant with Figma designs
Aug 6, 2022
5bc73c3
feat: add lang select component
Aug 6, 2022
e9f6fd7
feat: add missing translations, update some Accordion styles
Aug 6, 2022
48ac3e4
fix: update swapped translations
Aug 6, 2022
f292f9b
Merge pull request #3 from 0xTobias/feat/ballot-view-mobile-support
0xTobias Aug 6, 2022
6b0dd46
chore: refactor link font size upscale
Aug 7, 2022
254404d
feat: apply page
0xTobias Aug 7, 2022
ba7bbd7
feat: add titles
0xTobias Aug 7, 2022
d56ed5e
Merge pull request #5 from 0xTobias/feat/apply-page
Aug 8, 2022
7395889
remove Barcelona projects from the page
Aug 12, 2022
f11de54
squash and merge ethlatam changes
daodesigner Aug 13, 2022
e378cb8
Merge branch '0xTobias-main' into cohort/ethLatam
daodesigner Aug 13, 2022
d6d71d3
fix merge conflict
daodesigner Aug 13, 2022
d06a043
fix ballot page and add projects
daodesigner Aug 13, 2022
558d5e9
maci public keys quickcheck
daodesigner Aug 13, 2022
108404e
v2.4.0
daodesigner Aug 13, 2022
1330989
v3.0.0
daodesigner Aug 13, 2022
6d49088
Merge pull request #6 from quadratic-funding/cohort/ethLatam
0xTobias Aug 13, 2022
f6d00a6
fix: fix projects mobile
0xTobias Aug 13, 2022
ed34b5c
fix:connect wallet on mobile
0xTobias Aug 13, 2022
5cca95e
Merge pull request #7 from 0xTobias/feat/add-projects
0xTobias Aug 13, 2022
3043e2f
ethLatam contracts update
daodesigner Aug 14, 2022
91355c8
bump npm version
daodesigner Aug 14, 2022
ac7d632
v3.1.0
daodesigner Aug 14, 2022
85f80dd
feat: add expediente crypto
0xTobias Aug 14, 2022
e15d941
fix: fix commNode images
0xTobias Aug 14, 2022
2eb6d8a
feat: update Expediente Crypto logo picture
Aug 14, 2022
9426432
Merge pull request #152 from 0xTobias/main
daodesigner Aug 15, 2022
d0a0aa2
update public key white list and set voting contract
daodesigner Aug 15, 2022
c85a011
reduce number of rpc requests
daodesigner Sep 8, 2022
ae8a5bb
code cleanup
daodesigner Sep 23, 2022
a9e0d03
Merge pull request #7 from emn178/translations
daodesigner Sep 23, 2022
4391488
Merge pull request #8 from emn178/dev
daodesigner Sep 23, 2022
dac8013
test round
daodesigner Sep 23, 2022
8d7c8b8
ethTaiwan live vote tally feature
daodesigner Sep 26, 2022
0bd2437
Merge pull request #183 from emn178/cohort/ethtaiwan
daodesigner Sep 27, 2022
7068288
npm version bump
daodesigner Sep 27, 2022
cea25fc
v3.4.2
daodesigner Sep 27, 2022
90281da
npm version bump, fix bin file for cli
daodesigner Sep 27, 2022
be8b132
v3.4.5
daodesigner Sep 27, 2022
91b4b48
new grantround
daodesigner Sep 27, 2022
9a1c97b
Merge pull request #9 from quadratic-funding/feat/i1n8
daodesigner Sep 27, 2022
b8e9d7f
Merge pull request #10 from emn178/cohort/ethtaiwan
emn178 Sep 27, 2022
34b07c4
fix fast tally results
daodesigner Sep 27, 2022
a6dd441
Merge pull request #184 from emn178/cohort/ethtaiwan
daodesigner Sep 27, 2022
fe9833a
npm version bump
daodesigner Sep 27, 2022
a988f38
v3.5.1
daodesigner Sep 27, 2022
91fd28f
nit: change matching pool amount to USDC instead of DAI
daodesigner Sep 27, 2022
d2fb0c5
Merge pull request #185 from emn178/cohort/ethtaiwan
daodesigner Sep 27, 2022
c11b282
npm version bump
daodesigner Sep 27, 2022
142d979
v3.5.3
daodesigner Sep 27, 2022
e0df50a
update locale
emn178 Sep 28, 2022
3a134bd
Merge pull request #188 from emn178/main
daodesigner Oct 12, 2022
a6a4720
clean up code
daodesigner Oct 12, 2022
340c92a
basic branding changes
daodesigner Oct 12, 2022
725f9a6
Merge pull request #1 from quadratic-funding/cohort/zkplayground
zkplayground Oct 12, 2022
bbd30cf
Merge pull request #2 from zkplayground/dev
zkplayground Oct 12, 2022
f375517
refactor(font): replace Helvetica with Noto Sans TC
jimxjim Oct 13, 2022
a3ba0e6
Merge pull request #3 from jimxjim/refactor/font
zkplayground Oct 13, 2022
2129a26
modified localized text
Oct 17, 2022
b124d34
modified for zkplayground stage 1
Oct 17, 2022
407b69b
Merge pull request #4 from zkplayground/dev
zkplayground Oct 18, 2022
d7d6090
Merge pull request #190 from zkplayground/main
daodesigner Oct 19, 2022
ea16c32
npm version bump, suport goerli
daodesigner Oct 19, 2022
a375232
v3.5.4
daodesigner Oct 19, 2022
5237110
Update zk projects info
zkplayground Oct 19, 2022
26ec76a
Minor update
zkplayground Oct 19, 2022
91affd3
Modified some usage of text
zkplayground Oct 20, 2022
b9be4e2
minor update
zkplayground Oct 20, 2022
bf306e0
Merge pull request #193 from zkplayground/dev
daodesigner Oct 25, 2022
517d1a6
config zkplayground contracts and MACI keys
daodesigner Oct 26, 2022
76b1df9
v3.5.5
daodesigner Oct 26, 2022
b550780
npm version bump
daodesigner Oct 26, 2022
2ffee05
Merge pull request #5 from quadratic-funding/cohort/zkplayground
daodesigner Oct 26, 2022
e5dc704
feat: modify the projects data and the provider network setting
jimxjim Oct 27, 2022
3e3637c
Merge pull request #194 from jimxjim/dev
daodesigner Nov 1, 2022
3f52198
recover from project signup step
daodesigner Nov 1, 2022
809a565
feat: delete the keys of stateIndexByPubKey and userSignUps which are…
jimxjim Nov 1, 2022
12c8e02
point to poll contract on goerli
daodesigner Nov 2, 2022
aa60551
Merge pull request #195 from jimxjim/feat/recover
daodesigner Nov 2, 2022
1ed3bd4
tally - set grantround start block manually, qol changes
daodesigner Nov 7, 2022
98c39d4
reduce number of ballots
daodesigner Nov 7, 2022
dcdaedc
v3.7.0
daodesigner Nov 7, 2022
6c9e4d1
npm version bump
daodesigner Nov 7, 2022
cd8310b
v3.7.2
daodesigner Nov 7, 2022
3191cee
update grant round address
daodesigner Nov 7, 2022
b9da115
nit: formating
daodesigner Nov 15, 2022
d29fd72
wip: ethporto <> transformers website
daodesigner Mar 3, 2023
f0b8947
new MACI/QFI contracts following proxy pattern and separation of conc…
daodesigner Mar 7, 2023
40ff2b2
ethporto ui theme
daodesigner Mar 7, 2023
e72ead6
refactor
daodesigner Mar 9, 2023
4a3937a
refactor - gitignore
daodesigner Mar 9, 2023
79e9f95
missing deps for es5 shim
daodesigner Mar 9, 2023
d39e23e
complete the refactor
daodesigner Mar 9, 2023
5532432
remove unused components
daodesigner Mar 9, 2023
2fa1822
fix dapp build error caused by typechain build, pin the needed contra…
daodesigner Mar 9, 2023
ff28da9
simplify the UI
daodesigner Mar 9, 2023
b8cadf8
Merge branch 'cohort/ethporto' into cohort/transformers
daodesigner Mar 9, 2023
2597ae2
Merge pull request #199 from quadratic-funding/cohort/transformers
daodesigner Mar 9, 2023
7c127b4
nit copy
daodesigner Mar 9, 2023
53959ce
Merge pull request #200 from quadratic-funding/jubjub
daodesigner Mar 9, 2023
5eb560c
Add basic /about page
samajammin Mar 14, 2023
cccc1fd
Remove unused imports
samajammin Mar 14, 2023
f260ae4
Update copy
samajammin Mar 15, 2023
6a3ccc0
Update copy
samajammin Mar 15, 2023
418a875
Remove unused imports
samajammin Mar 15, 2023
5917ca6
Merge pull request #201 from quadratic-funding/ethporto-about
samajammin Mar 15, 2023
c3d1057
e2e tests
daodesigner Mar 16, 2023
bb218a0
Merge pull request #202 from quadratic-funding/jubjub
daodesigner Mar 16, 2023
6f016fb
nit: clean up branding
daodesigner Mar 16, 2023
6b3ca49
Merge branch 'cohort/ethporto' into jubjub
daodesigner Mar 16, 2023
7995806
internationalization, PT
daodesigner Mar 16, 2023
4ef7754
project info for transformers proposals
daodesigner Mar 16, 2023
3ea9ae5
randomize projects
daodesigner Mar 16, 2023
0f9b688
CTA
daodesigner Mar 16, 2023
a3f248c
remove tooltips from nav
daodesigner Mar 16, 2023
19bf546
landing page explanation
daodesigner Mar 16, 2023
678a7e8
start voting
daodesigner Mar 17, 2023
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
  •  
  •  
  •  
16 changes: 8 additions & 8 deletions .github/workflows/contracts-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ jobs:

- name: Run Unit Test
run: |
yarn workspace @quadratic-funding/contracts run typechain
yarn workspace @quadratic-funding/contracts run test:unit
yarn workspace @qfi/contracts run typechain
yarn workspace @qfi/contracts run test:unit

- name: Lint
run: |
yarn workspace @quadratic-funding/contracts run lint:solidity
yarn workspace @quadratic-funding/contracts run lint:js
yarn workspace @qfi/contracts run lint:solidity
yarn workspace @qfi/contracts run lint:js

qv-test:
runs-on: ubuntu-20.04
Expand All @@ -55,8 +55,8 @@ jobs:

- name: Run QV Test
run: |
yarn workspace @quadratic-funding/contracts run typechain
yarn workspace @quadratic-funding/contracts test:qv
yarn workspace @qfi/contracts run typechain
yarn workspace @qfi/contracts test:qv

qf-test:
runs-on: ubuntu-20.04
Expand All @@ -74,5 +74,5 @@ jobs:

- name: Run QF Test
run: |
yarn workspace @quadratic-funding/contracts run typechain
yarn workspace @quadratic-funding/contracts run test:qf
yarn workspace @qfi/contracts run typechain
yarn workspace @qfi/contracts run test:qf
8 changes: 4 additions & 4 deletions .github/workflows/contracts-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ jobs:

- name: Lint
run: |
yarn workspace @quadratic-funding/contracts run lint:solidity
yarn workspace @quadratic-funding/contracts run lint:js
yarn workspace @qfi/contracts run lint:solidity
yarn workspace @qfi/contracts run lint:js

- name: Test Contract
run: |
yarn workspace @quadratic-funding/contracts run generate:abi
yarn workspace @quadratic-funding/contracts run test:coverage
yarn workspace @qfi/contracts run generate:abi
yarn workspace @qfi/contracts run test:coverage

- name: Upload coverage report
uses: codecov/codecov-action@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/subgraph-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ jobs:

- name: Build
run: |
CI=false yarn workspace @quadratic-funding/subgraph codegen
CI=false yarn workspace @quadratic-funding/subgraph build
CI=false yarn workspace @qfi/subgraph codegen
CI=false yarn workspace @qfi/subgraph build
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
/node_modules
/.pnp
.pnp.js
.vscode

# testing
/coverage
Expand All @@ -28,3 +29,4 @@ notes/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
7 changes: 4 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh

BASE_DIR="$( cd "$( dirname "$0" )" && pwd )"

# Return `true` if files under `packages/contracts/contracts/` directory has been changed or added. Otherwise, return `false`
is_contracts_changed()
Expand Down Expand Up @@ -32,6 +33,6 @@ npx lint-staged
RETURN_CODE=$(is_contracts_changed)
if [ $RETURN_CODE = "true" ]; then
# Run contract tests
npx yarn workspace @quadratic-funding/contracts typechain
npx yarn workspace @quadratic-funding/contracts test:unit
fi
npx yarn workspace @qfi/contracts typechain
npx yarn workspace @qfi/contracts test:unit
fi
32 changes: 32 additions & 0 deletions .husky/scripts/_pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

# Return `true` if files under `packages/contracts/contracts/` directory has been changed or added. Otherwise, return `false`
is_contracts_changed()
{
result="false"
git_changes=$(git diff --cached --name-status)

while read -r line; do
changed_file_path=$(echo "$line" | awk '/packages/ {print $2}')
file_status=$(echo "$line" | cut -c 1)

if [ "$file_status" = 'A' ] || [ "$file_status" = 'M' ]
then
case $changed_file_path in packages/contracts/contracts/*)
result="true"
esac
fi
done <<< "$git_changes"

echo "$result"
}

# Check lint for all subpackage
npx lint-staged

RETURN_CODE=$(is_contracts_changed)
if [ $RETURN_CODE = "true" ]; then
# Run contract tests
npx yarn workspace @quadratic-funding/contracts typechain
npx yarn workspace @quadratic-funding/contracts test:unit
fi
Loading
Loading