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

Issue 927 security monitor #950

Closed
wants to merge 2,041 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2041 commits
Select commit Hold shift + click to select a range
4ca41d4
refactor(DiamondTestSetup): rename ICollectableDustFacet to collectab…
rndquu Oct 6, 2023
9f85d17
refactor(DiamondTestSetup): rename IChefFacet to chefFacet
rndquu Oct 6, 2023
8dbc683
refactor(DiamondTestSetup): rename IBondingCurveFacet to bondingCurve…
rndquu Oct 6, 2023
edf5f53
refactor(DiamondTestSetup): rename IAccessControl to accessControlFacet
rndquu Oct 6, 2023
c119128
docs: auto generate NATSPEC docs
github-actions[bot] Oct 7, 2023
e61277f
test: update
molecula451 Oct 7, 2023
bb3baaf
test: update cspell
molecula451 Oct 7, 2023
41e53b8
test: update cspell
molecula451 Oct 7, 2023
613c065
refactor: update creditclock to facet
molecula451 Oct 8, 2023
6c7fef9
test: update cspell
molecula451 Oct 9, 2023
0f1a293
test: update cspell
molecula451 Oct 9, 2023
17e79d3
Merge pull request #811 from molecula451/spell
rndquu Oct 9, 2023
97fc4c5
refactor: update natspec and purge test
molecula451 Oct 9, 2023
000bdb6
Merge pull request #805 from rndquu/ci/foundry-sep-23
rndquu Oct 12, 2023
1d686bc
feat(ui): apply diamond architecture to staking page (#804)
bojan07 Oct 12, 2023
995e3e2
test: remove unused
molecula451 Oct 13, 2023
5f11059
Merge pull request #820 from molecula451/fix
rndquu Oct 13, 2023
a2d5241
chore(UI): some fixes (#822)
molecula451 Oct 16, 2023
8c446fa
feat(ui): apply diamond architecture to the credits page (#823)
bojan07 Oct 16, 2023
97989f1
Update CONTRIBUTING.md
0x4007 Oct 17, 2023
fad6671
Merge branch 'ubiquity:development' into facet-clock
molecula451 Oct 20, 2023
f091f2b
feat(ui): apply diamond architecture to the remained or missed compon…
bojan07 Oct 24, 2023
8e774ee
Merge pull request #813 from molecula451/facet-clock
rndquu Oct 24, 2023
af8370b
docs: auto generate NATSPEC docs
github-actions[bot] Oct 24, 2023
7c3a0bb
Feature/616 (#825)
rndquu Oct 24, 2023
df84ee4
docs: auto generate NATSPEC docs
github-actions[bot] Oct 24, 2023
6e45c80
Update ubiquibot-config.yml
0x4007 Oct 25, 2023
7a70182
fix incorrect coverage values in the compare test coverage workflow (…
gitcoindev Oct 31, 2023
cf74a62
refactor: remove IJar related files (#834)
rndquu Nov 15, 2023
b7f59cf
docs: auto generate NATSPEC docs
github-actions[bot] Nov 15, 2023
10739ec
Feature/pool v2 (#832)
rndquu Nov 17, 2023
6011c61
docs: auto generate NATSPEC docs
github-actions[bot] Nov 17, 2023
581a9e3
chore: add format command to contracts
gitcoindev Nov 20, 2023
9a87459
chore: enforce prettier-plugin-solidity for lint-stages solidity files
gitcoindev Nov 20, 2023
fee9131
chore: ugrade prettier-plugin-solidity to 1.2.0 and format:all using
gitcoindev Nov 20, 2023
60bf159
chore: prettier update for IUbiquityGovernance.sol
gitcoindev Nov 20, 2023
68e45a2
test: update facet
molecula451 Nov 20, 2023
4826318
test: restore branching
molecula451 Nov 20, 2023
f091cd4
Merge pull request #840 from gitcoindev/feature/format-contracts-pret…
gitcoindev Nov 21, 2023
a7946df
docs: auto generate NATSPEC docs
github-actions[bot] Nov 21, 2023
9814b50
test: upgrade to facet
molecula451 Nov 22, 2023
cacea0c
test: upgrade to facet
molecula451 Nov 22, 2023
d1515ea
test: upgrade to facet
molecula451 Nov 22, 2023
c22e3a5
test: upgrade to facet
molecula451 Nov 22, 2023
abbb586
test: upgrade to facet
molecula451 Nov 22, 2023
39962c5
build: add mainnet migration
rndquu Nov 22, 2023
c41a33d
test: upgrade to facet
molecula451 Nov 22, 2023
e18f161
test: increase ChefFacet test coverage to 100% (#837)
gitcoindev Nov 22, 2023
ffeaddd
test: increase AccessControlFacet test coverage to 100% (#836)
gitcoindev Nov 22, 2023
d2866b2
docs: auto generate NATSPEC docs
github-actions[bot] Nov 22, 2023
53163d4
Merge branch 'ubiquity:development' into development
molecula451 Nov 22, 2023
510defd
chore: remove wallet keys on readme
molecula451 Nov 22, 2023
d3e0288
build: add testnet migration
rndquu Nov 23, 2023
5eabf42
build: add Governance testnet migration
rndquu Nov 23, 2023
eb86460
refactor: remove testnet migrations
rndquu Nov 23, 2023
de680c9
build: add mainnet Governance migration
rndquu Nov 23, 2023
0e4fc7d
chore: update gitignore
rndquu Nov 23, 2023
c3ceceb
docs: update deploy docs
rndquu Nov 23, 2023
020d31a
refactor: remove old deploy
rndquu Nov 23, 2023
0ecb8c6
build: do not compile old contracts
rndquu Nov 24, 2023
628aee4
refactor: remove duplicated interfaces
rndquu Nov 24, 2023
e54be58
ci: exclude old contracts from slither
rndquu Nov 24, 2023
904396c
ci: fix yarn audit (#845)
rndquu Nov 24, 2023
49689a6
test:update readme
molecula451 Nov 25, 2023
1274354
Merge branch 'development' into feat/827
rndquu Nov 27, 2023
c4feaa9
docs: add reasons for omitted facets
rndquu Nov 27, 2023
261eabe
refactor: rename old to deprecated
rndquu Nov 27, 2023
b4791ff
docs: more explicit migration comments
rndquu Nov 27, 2023
3554844
chore: remove ERC1155 interface
molecula451 Nov 28, 2023
c29b403
chore: revamped isIdInclude in array for depositors lists
molecula451 Nov 28, 2023
c84a9cb
Merge pull request #841 from molecula451/facet
rndquu Nov 28, 2023
e8860cc
docs: auto generate NATSPEC docs
github-actions[bot] Nov 28, 2023
b050bb9
fix: resolve conflicts
rndquu Nov 28, 2023
456b890
Merge branch 'ubiquity:development' into development
molecula451 Nov 29, 2023
c950b0a
feat: move collateral address to .env
rndquu Dec 2, 2023
bc36823
Merge pull request #842 from rndquu/feat/827
gitcoindev Dec 4, 2023
8fd2ec2
docs: auto generate NATSPEC docs
github-actions[bot] Dec 4, 2023
fd10db0
test: update readme
molecula451 Dec 8, 2023
5bc5c62
Merge branch 'ubiquity:development' into improved-readme
molecula451 Dec 8, 2023
619e5b4
Merge branch 'ubiquity:development' into development
molecula451 Dec 8, 2023
f5cf579
test: update
molecula451 Dec 9, 2023
747674d
test: update
molecula451 Dec 9, 2023
12d1043
test: update
molecula451 Dec 9, 2023
dd1fe9b
test: update
molecula451 Dec 9, 2023
637e290
test: update
molecula451 Dec 9, 2023
b1f5a0a
Merge pull request #843 from molecula451/improved-readme
gitcoindev Dec 9, 2023
2d8a5c6
Merge branch 'ubiquity:development' into development
molecula451 Dec 10, 2023
d037ef4
refactor: refactor UbiquityPool
rndquu Dec 14, 2023
b7267f1
Merge pull request #852 from rndquu/refactor/ubiquity-pool
gitcoindev Dec 14, 2023
12f83bb
docs: auto generate NATSPEC docs
github-actions[bot] Dec 14, 2023
a1d9ec9
Bugfix/fix collateral twap (#844)
gitcoindev Dec 21, 2023
ae51df9
docs: auto generate NATSPEC docs
github-actions[bot] Dec 21, 2023
f6bd4c9
chore: Integrate solhint with a few rules to enforce contract convent…
molecula451 Dec 21, 2023
460740e
chore: add .solhint.json to enforce kebab case exception list
gitcoindev Dec 21, 2023
dae4cd3
Merge pull request #853 from gitcoindev/add-solhint-to-enforce-kebab-…
gitcoindev Dec 21, 2023
ff8e2f6
feat: add oracle migrations
rndquu Dec 22, 2023
4ffa8c9
fix: fix build warnings
rndquu Dec 22, 2023
40df6b4
test: add testLoupeFacetAddressesEqualsTheListOfAvailableFacets (#854)
gitcoindev Dec 22, 2023
de1b619
docs: auto generate NATSPEC docs
github-actions[bot] Dec 22, 2023
597b7db
test: add test_setPoolRevertsWhenFirstAddressIsNotDollarToken test case
gitcoindev Dec 22, 2023
8b2c969
test: verify getCreditReturnedForDollars and (#856)
gitcoindev Dec 22, 2023
6977307
docs: auto generate NATSPEC docs
github-actions[bot] Dec 22, 2023
2f736bc
chore: update environment variable property names
0x4007 Dec 23, 2023
ce7cdee
chore: update environment variable property names
0x4007 Dec 23, 2023
916e9dc
chore: bump node version to lts
0x4007 Dec 23, 2023
8b4a74f
Merge pull request #858 from ubiquity/chore/update-env-vars
0x4007 Dec 23, 2023
f4cc20b
fix: updated config schema
0x4007 Dec 23, 2023
e160bf5
Merge pull request #857 from gitcoindev/forge-test-twap-oracle-facet-…
gitcoindev Dec 24, 2023
d0bebb1
docs: auto generate NATSPEC docs
github-actions[bot] Dec 24, 2023
603b21c
refactor: rename chainLinkPriceFeedLusdUsd to chainLinkPriceFeedLusd
rndquu Dec 25, 2023
24dbf9f
refactor: move staleness threshold to state var
rndquu Dec 25, 2023
aed79e7
Merge pull request #855 from rndquu/feat/twap-migration
rndquu Dec 26, 2023
9e41ca5
docs: auto generate NATSPEC docs
github-actions[bot] Dec 26, 2023
c8bedfe
test: implement MockFacet skeleton and initial facetCut tests
gitcoindev Dec 27, 2023
5bc784c
test: add diamond cut initializer tests
gitcoindev Dec 27, 2023
a143a1f
test: add diamond cut add facet tests
gitcoindev Dec 27, 2023
d48309a
test: add diamond cut facet replace test
gitcoindev Dec 27, 2023
216e321
test: add testCutFacetRemoveFacetFunctions test
gitcoindev Dec 27, 2023
fc408f6
Merge pull request #859 from gitcoindev/test-diamond-cut
rndquu Dec 29, 2023
84449f4
docs: auto generate NATSPEC docs
github-actions[bot] Dec 29, 2023
cbd28a4
feat: switch to OpenZeppelin implementation of EnumerableSet (#861)
gitcoindev Dec 29, 2023
7f3e00a
docs: auto generate NATSPEC docs
github-actions[bot] Dec 29, 2023
00bd546
Merge branch 'ubiquity:development' into development
molecula451 Dec 30, 2023
9400402
chore: Update missing natspec (#847)
molecula451 Dec 30, 2023
f99f7e7
docs: auto generate NATSPEC docs
github-actions[bot] Dec 30, 2023
0ba7e3e
fix: use forge for coverage
rndquu Jan 2, 2024
2d1cfeb
Merge pull request #863 from rndquu/fix/coverage-script
rndquu Jan 2, 2024
ef84b45
Merge branch 'ubiquity:development' into development
molecula451 Jan 3, 2024
fde791c
chore: deprecate coverage
molecula451 Jan 4, 2024
8fa47c9
Merge pull request #864 from molecula451/coverage-script
gitcoindev Jan 4, 2024
c707b76
chore: temporarily disable storage changes workflow for pull requests
gitcoindev Jan 19, 2024
a1412a9
chore: temporarily disable CodeQL analysis workflow for pull requests
gitcoindev Jan 19, 2024
90597ff
chore: temporarily disable CodeQL analysis workflow for push
gitcoindev Jan 19, 2024
1f19cd0
Merge pull request #878 from gitcoindev/switch-contracts-storage-chan…
gitcoindev Jan 19, 2024
6a0e878
chore: limit diamond storage check API calls
gitcoindev Jan 24, 2024
c216cd2
Merge pull request #884 from gitcoindev/feat-limit-api-requests-diamo…
gitcoindev Jan 24, 2024
5a8cbb3
Revert "chore: temporarily disable storage changes workflow for pull …
molecula451 Jan 24, 2024
47717c1
Feat limit api requests core contracts check and graphql only on push…
gitcoindev Jan 24, 2024
38c3656
chore: update config and a default wallet connect key (#888)
molecula451 Jan 27, 2024
06f2fdf
feat: more strict redemptionDelayBlocks (#905)
gitcoindev Feb 26, 2024
b13db91
docs: auto generate NATSPEC docs
github-actions[bot] Feb 26, 2024
703f559
feat: protect protocol upgradeability loss (#904)
gitcoindev Feb 27, 2024
49ab47b
docs: auto generate NATSPEC docs
github-actions[bot] Feb 27, 2024
4924ab0
feat: prevent duplicate collateral tokens (#903)
gitcoindev Feb 27, 2024
363cf41
docs: auto generate NATSPEC docs
github-actions[bot] Feb 27, 2024
94b3f6d
chore: upload audit
molecula451 Feb 29, 2024
5f9b8fd
chore: upload audit
molecula451 Feb 29, 2024
11ca430
chore: update
molecula451 Feb 29, 2024
9f88242
chore: upload audit report (#906)
molecula451 Feb 29, 2024
acc5800
chore: Fix review (#907)
rndquu Mar 1, 2024
6e892cd
docs: auto generate NATSPEC docs
github-actions[bot] Mar 1, 2024
8be8cd6
update: codeowners
rndquu Mar 2, 2024
670ac49
Merge pull request #909 from ubiquity/rndquu-patch-3
0x4007 Mar 2, 2024
d2378a3
fix: use msg.sender on Ubiquistick NFT mint (#911)
rndquu Mar 4, 2024
4eea344
docs: auto generate NATSPEC docs
github-actions[bot] Mar 4, 2024
49f9572
fix: check selector length (#912)
rndquu Mar 4, 2024
31fdfd0
docs: auto generate NATSPEC docs
github-actions[bot] Mar 4, 2024
f9ddab6
Merge branch 'ubiquity:development' into development
molecula451 Mar 14, 2024
91d8f50
ci: use latest cloudflare deploy
rndquu Mar 19, 2024
e526fa6
ci: build dapp to root folder
rndquu Mar 19, 2024
b168483
Merge pull request #913 from rndquu/ci/deploy-v2
rndquu Mar 19, 2024
441b82f
ci: use deploy artifact name
rndquu Mar 19, 2024
82b5492
Merge pull request #915 from rndquu/ci/use-artifact-name
rndquu Mar 19, 2024
c016c6d
fix: set last byte to 0 in lib storages (#919)
rndquu Mar 20, 2024
f2abec3
docs: auto generate NATSPEC docs
github-actions[bot] Mar 20, 2024
898d45c
fix: add missing nonReentrant modifiers (#918)
rndquu Mar 20, 2024
f1144a8
fix: check collateral exists on chainlink set (#917)
rndquu Mar 20, 2024
59ccb55
docs: auto generate NATSPEC docs
github-actions[bot] Mar 20, 2024
4ce85ac
refactor(migration): deploy collateral in testnet
rndquu Mar 25, 2024
ec549d1
fix: fix anvil deployment
rndquu Mar 27, 2024
501e69f
Merge pull request #920 from rndquu/refactor/testnet-deploy-collateral
rndquu Mar 28, 2024
b06fada
docs: auto generate NATSPEC docs
github-actions[bot] Mar 28, 2024
79656bd
refactor: use before() and after() in migrations
rndquu Mar 28, 2024
27613ce
feat: mint initial liquidity
rndquu Mar 28, 2024
f395120
feat: deploy metapool in mainnet
rndquu Mar 28, 2024
f50f3be
fix: fix build
rndquu Mar 28, 2024
56c893a
feat: add balances() to ICurveStableSwapMetaNG
rndquu Mar 29, 2024
cb82336
docs: use live RPCs
rndquu Mar 30, 2024
b595120
Merge pull request #921 from rndquu/feat/curve-migration
gitcoindev Mar 30, 2024
6fad4c3
docs: auto generate NATSPEC docs
github-actions[bot] Mar 30, 2024
9662858
docs: audit link
0x4007 Apr 1, 2024
aaa853f
Merge branch 'ubiquity:development' into development
molecula451 Apr 3, 2024
527db32
feat: add collateral ratio setter
rndquu Apr 4, 2024
d145f3a
feat: add governance pool setter
rndquu Apr 4, 2024
abd3024
feat: add ETH/USD price feed setter
rndquu Apr 4, 2024
5fc9468
feat: fetch Governance USD price
rndquu Apr 5, 2024
535dafb
feat: add fractional mints
rndquu Apr 5, 2024
8b3bfb1
feat: add fractional redeems
rndquu Apr 5, 2024
a9cd4a6
feat: add fractional redeem collection
rndquu Apr 5, 2024
92bc566
Merge pull request #922 from rndquu/feat/fractional-pool
gitcoindev Apr 6, 2024
9181675
docs: auto generate NATSPEC docs
github-actions[bot] Apr 6, 2024
1d5ee18
Merge branch 'ubiquity:development' into development
molecula451 Apr 8, 2024
05aa442
chore: update maintance and wording
molecula451 Apr 8, 2024
d685705
chore: update maintance and wording
molecula451 Apr 8, 2024
e2263fb
chore: update
molecula451 Apr 9, 2024
819d349
chore: update
molecula451 Apr 9, 2024
4630f2a
chore: unsupport goerli on all stuff as the network its gettting depr…
molecula451 Apr 9, 2024
46c93ff
chore: update
molecula451 Apr 9, 2024
2addb34
chore: update
molecula451 Apr 10, 2024
9cf5ccc
chore: update
molecula451 Apr 10, 2024
5914363
chore: deprecate deployments.json
molecula451 Apr 11, 2024
9141a5a
chore: deprecate deployments.json
molecula451 Apr 11, 2024
b1ba9f6
chore: update readme SMT
molecula451 Apr 11, 2024
2eddcfb
feat: fractional mainnet migration (#924)
rndquu Apr 11, 2024
a1b11e1
docs: auto generate NATSPEC docs
github-actions[bot] Apr 11, 2024
f28f3f7
chore: update
molecula451 Apr 16, 2024
6c19305
chore: update
molecula451 Apr 16, 2024
57235bb
chore: update
molecula451 Apr 16, 2024
90bb311
chore: update
molecula451 Apr 16, 2024
7faf8e5
chore: update
molecula451 Apr 16, 2024
3afad00
Merge pull request #923 from molecula451/update-chore
rndquu Apr 17, 2024
d65516f
docs: auto generate NATSPEC docs
github-actions[bot] Apr 17, 2024
562529d
feat: cap collateral ratio to 100% (#932)
gitcoindev Apr 20, 2024
ca2ec33
docs: auto generate NATSPEC docs
github-actions[bot] Apr 20, 2024
8aaa03c
feat: add ICurveStableSwapNG (#933)
rndquu Apr 24, 2024
db2a5d0
docs: auto generate NATSPEC docs
github-actions[bot] Apr 24, 2024
92549be
feat: add plain pool migration
rndquu Apr 25, 2024
de86212
docs: update
rndquu Apr 25, 2024
447ec1d
Merge pull request #935 from rndquu/feat/migration-curve-plain
rndquu Apr 26, 2024
5db9383
docs: auto generate NATSPEC docs
github-actions[bot] Apr 26, 2024
1827e39
chore(deps): add typechain
0x4007 May 13, 2024
e4c1fae
chore: add deployment logs
0x4007 May 13, 2024
a5ddded
test: add skeleton for UbiquityPoolFacet fuzz tests
gitcoindev May 24, 2024
fe834cb
test: assume max collateral ratio between 0 and 1_000_000 (100%)
gitcoindev May 24, 2024
b6e432d
test: set up correct fuzz parameters in testMintDollar_FuzzDollarPric…
gitcoindev May 27, 2024
dc0125c
test: set up correct fuzz parameters in testMintDollar_FuzzDollarAmou…
gitcoindev May 27, 2024
df22fef
chore: increase max_test_rejects to 90000
gitcoindev May 27, 2024
485efe1
test: set correct parameters for collateral and governance slippage fuzz
gitcoindev May 29, 2024
809f149
test: minting fuzz tests parameters tweaks
gitcoindev May 29, 2024
eaa29b3
test: use ABDKMathQuad to fuzz fractional mint
gitcoindev May 30, 2024
222355d
test: add Dollar redeem fuzz tests skeleton
gitcoindev May 30, 2024
e9e0e6c
test: add testRedeemDollar_FuzzDollarPriceUsdTooHigh
gitcoindev Jun 4, 2024
60651d5
test: add redeem fuzz tests InsufficientCollateralAvailable Collatera…
gitcoindev Jun 5, 2024
3a58107
test: add testRedeemDollar_FuzzGovernanceAmountSlippage
gitcoindev Jun 6, 2024
478e4df
test: add testRedeemDollar_FuzzRedemptionDelayBlocks
gitcoindev Jun 6, 2024
ab85a33
test: add testMintDollar_FuzzCorrectDollarAmountMinted
gitcoindev Jun 14, 2024
fce4ecb
test: add testMintDollar_FuzzCorrectDollarAmountRedeemed
gitcoindev Jun 15, 2024
62d4c8a
test: set dollarOutMin>99 at testMintDollar_FuzzDollarAmountSlippage
gitcoindev Jun 16, 2024
320f710
test: increase max_test_rejects for long running fuzz tests
gitcoindev Jun 16, 2024
62e1e64
chore: add initial jest tests for UI
molecula451 Jun 20, 2024
28e7dd5
chore: move new fuzz tests to separate folders structure
gitcoindev Jun 21, 2024
7dce7be
chore: update import paths after moving fuzz tests
gitcoindev Jun 21, 2024
565aaa6
Merge pull request #940 from gitcoindev/ubiquitypoolfacet-fuzz-tests
rndquu Jun 24, 2024
64ab8b9
docs: auto generate NATSPEC docs
github-actions[bot] Jun 24, 2024
3315f8e
Merge branch 'ubiquity:development' into development
molecula451 Jun 25, 2024
59e059c
chore: update RPC
molecula451 Jun 26, 2024
9ff5ddc
chore: clean branch
molecula451 Jun 26, 2024
bb70cdd
Merge pull request #947 from molecula451/update-rpc
gitcoindev Jun 26, 2024
5bb26bb
chore: skip check_storage_layout check if provide_contracts job retur…
gitcoindev Jun 26, 2024
cea94a0
Merge pull request #948 from gitcoindev/fix-storage-collision-workflows
rndquu Jun 27, 2024
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
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# infura key created at infura.io
INFURA_ID=XXXXXX
NEXT_PUBLIC_JSON_RPC_URL=XXXXXX
NEXT_PUBLIC_WALLET_CONNECT_ID=XXXXXX
NEXT_PUBLIC_DEBUG=
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist/
.next/
dist/_next/
!.solhint.json
7 changes: 6 additions & 1 deletion .eslintrc → .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-function": "off",
"prettier/prettier": "warn"
"prettier/prettier": [
"warn",
{
"endOfLine": "auto"
}
]
},
"env": {
"browser": true,
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @rndquu
23 changes: 23 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Contributing
- We welcome everybody to participate in improving the codebase.
- We offer financial incentives for solved issues.
- Please learn how to contribute via the DevPool [here](https://dao.ubq.fi/devpool).

### Coding Styleguide

- We use camelCase for identifiers (variable, function, method names) do not use snake_case
- `NFT` should be `Nft` in identifers e.g. `creditNft`
- Do not refer to token symbols directly in identifiers, instead write the intent of the token. We have the ability to update the names of the tokens (as we already have done on Ethereum mainnet) which leads to confusion.
- `uAD` ⮕ `dollar`
- `uCR` ⮕ `credit`
- `uCR-NFT` ⮕ `creditNft`
- `UBQ` ⮕ `governance`

- We generally should not use "Ubiquity" in identifers and filenames. This is the Ubiquity Dollar repository so Ubiquity is implied.
- The exception is when we are working in third party contexts, for example the Curve (3pool) metapool related code, it is good to write ubiquityDollar because the other assets in the pool are USDC, USDT and DAI (other types of dollars!)

#### Contract Renames

- We rebranded "Bonding" to "Staking" to disambiguate our bonds (e.g. Chicken Bonds) branding.
- We rebranded "Debts" to "Credits" because it has a positive connotation for the users.
- We rebranded "Ubiquity Algorithmic Dollar" to "Ubiquity Dollar" because the term "algorithmic" is contentious in this context after Luna.
6 changes: 6 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Resolves #

<!--
- You must link the issue number e.g. "Resolves #1234"
- Please do not replace the keyword "Resolves" https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword
-->
5 changes: 5 additions & 0 deletions .github/ubiquibot-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
payments:
evmNetworkId: 100
basePriceMultiplier: 3
issueCreatorMultiplier: 3
maxPermitPrice: 1000
51 changes: 51 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build & Test

on:
push:
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
build-and-test:
name: Build & Test
runs-on: ubuntu-22.04

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "20.10.0"

- name: Install dependencies
run: sudo apt -y update && sudo apt -y install libusb-1.0-0-dev libudev-dev

- name: Setup Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly-5be158ba6dc7c798a6f032026fe60fc01686b33b

- name: Yarn Install
run: yarn install --mode=skip-build && yarn allow-scripts

- name: Setup Forge
run: yarn workspace @ubiquity/contracts forge:install

- name: Build All
env:
FOUNDRY_DENY_WARNINGS: true
run: yarn build

- name: Test All
run: yarn test:all

- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: static
path: packages/dapp/dist
35 changes: 35 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CodeQL Analysis

on:
pull_request:
push:
branches:
- development

jobs:
code-ql-analysis:
name: CodeQL Analysis
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ["javascript", "typescript"]
# CodeQL currently supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Modified to support codebase. Currently no support for Solidity Language

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Init CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
14 changes: 14 additions & 0 deletions .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Conventional Commits

on:
pull_request:
push:
branches: [development]

jobs:
conventional-commits:
name: Conventional Commits
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ubiquity/action-conventional-commits@master
71 changes: 71 additions & 0 deletions .github/workflows/core-contracts-storage-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Check For Core Contracts Storage Changes

on:
push:
branches:
- development
pull_request:

jobs:
provide_contracts:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Foundry
uses: onbjerg/foundry-toolchain@v1
with:
version: nightly

- name: Narrow down test matrix scope to changed contracts to limit API requests
id: changed-contracts
uses: tj-actions/changed-files@v42
with:
files_yaml: |
contracts:
- packages/contracts/src/dollar/core/*.sol

- name: Set contracts matrix
id: set-matrix
working-directory: packages/contracts
if: steps.changed-contracts.outputs.contracts_any_changed == 'true'
env:
CHANGED_CONTRACTS: ${{ steps.changed-contracts.outputs.contracts_all_changed_files }}
run: |
for CONTRACT in "$CHANGED_CONTRACTS"; do
echo ${CONTRACT} | xargs basename -a | cut -d'.' -f1 | xargs -I{} echo src/dollar/core/{}.sol:{} >> contracts.txt
done
echo "matrix=$(cat contracts.txt | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT

outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}

check_storage_layout:
needs: provide_contracts
runs-on: ubuntu-latest
if: ${{ needs.provide_contracts.outputs.matrix != '[]' && needs.provide_contracts.outputs.matrix != '' }}

strategy:
matrix:
contract: ${{ fromJSON(needs.provide_contracts.outputs.matrix) }}

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Foundry
uses: onbjerg/foundry-toolchain@v1
with:
version: nightly

- name: Check For Core Contracts Storage Changes
uses: Rubilmax/foundry-storage-check@main
with:
workingDirectory: packages/contracts
contract: ${{ matrix.contract }}
failOnRemoval: true

119 changes: 119 additions & 0 deletions .github/workflows/coverage-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: Compare Test Coverage
# This compares test coverage and throws an error if test coverage is lower than the previous run.

on:
push:
branches: [development]
pull_request:
branches: [development]

jobs:
test-coverage:
name: Compare Test Coverage
runs-on: ubuntu-22.04
permissions:
contents: read

steps:
- name: Checkout development branch
uses: actions/checkout@v3
with:
ref: development
path: development

- name: Setup Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly-5be158ba6dc7c798a6f032026fe60fc01686b33b

- name: Install dependencies
run: sudo apt-get install lcov

- name: Get development branch coverage
id: coverage-development
working-directory: development/packages/contracts
run: |
# generates lcov.info
forge build && forge coverage --report lcov

# Merge lcov files
lcov \
--rc lcov_branch_coverage=1 \
--add-tracefile lcov.info \
--output-file merged-lcov.info

# Filter out node_modules, test, and mock files
lcov \
--rc lcov_branch_coverage=1 \
--remove merged-lcov.info \
--output-file filtered-lcov.info \
"*node_modules*" \
"*test*" \
"*mock*" \
"*scripts*" \
"src/dollar/mocks/*" \
"src/dollar/utils/*" \
"src/deprecated/*" \
"test/*" \

# Generate summary
COVERAGE_DEVELOPMENT_OUTPUT=$(lcov \
--rc lcov_branch_coverage=1 \
--list filtered-lcov.info)

echo COVERAGE=$(echo "${COVERAGE_DEVELOPMENT_OUTPUT}" | tail -n 1 | cut -d % -f 1 | cut -d \| -f 2) >> $GITHUB_OUTPUT

- name: Delete development branch folder
run: rm -rf development

- name: Checkout code in PR branch
uses: actions/checkout@v3

- name: Get PR branch coverage
id: coverage-pr
working-directory: packages/contracts
run: |
# generates lcov.info
forge build && forge coverage --report lcov

# Merge lcov files
lcov \
--rc lcov_branch_coverage=1 \
--add-tracefile lcov.info \
--output-file merged-lcov.info

# Filter out node_modules, test, and mock files
lcov \
--rc lcov_branch_coverage=1 \
--remove merged-lcov.info \
--output-file filtered-lcov.info \
"*node_modules*" \
"*test*" \
"*mock*" \
"*scripts*" \
"src/dollar/mocks/*" \
"src/dollar/utils/*" \
"src/deprecated/*" \
"test/*" \

# Generate summary
COVERAGE_DEVELOPMENT_OUTPUT=$(lcov \
--rc lcov_branch_coverage=1 \
--list filtered-lcov.info)
echo COVERAGE=$(echo "${COVERAGE_DEVELOPMENT_OUTPUT}" | tail -n 1 | cut -d % -f 1 | cut -d \| -f 2) >> $GITHUB_OUTPUT

- name: Print coverages
run: |
echo Development branch coverage: ${{ steps.coverage-development.outputs.COVERAGE }}
echo PR branch coverage: ${{ steps.coverage-pr.outputs.COVERAGE }}

- name: Compare coverages
if: ${{ steps.coverage-development.outputs.COVERAGE > steps.coverage-pr.outputs.COVERAGE }}
run: |
echo "Error: test coverage decreased"
exit 1

- name: Upload test coverage report to coveralls.io
uses: coverallsapp/github-action@v2
with:
file: packages/contracts/filtered-lcov.info
27 changes: 27 additions & 0 deletions .github/workflows/create-diagram.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Create Diagram
on:
workflow_dispatch: {}
push:
branches:
- main
jobs:
create-diagram:
name: Create Diagram
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Update Diagram (Contracts)
uses: githubocto/repo-visualizer@main
with:
excluded_paths: "ignore,.github"
output_file: "utils/diagram-contracts.svg"
root_path: "packages/contracts/"
commit_message: "docs(diagram): contracts"
- name: Update Diagram (User Interface)
uses: githubocto/repo-visualizer@main
with:
excluded_paths: "ignore,.github"
output_file: "utils/diagram-ui.svg"
root_path: "packages/dapp/"
commit_message: "docs(diagram): ui"
Loading
Loading