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

MAINNET Upgrade December 2023 #84

Merged
merged 188 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
188 commits
Select commit Hold shift + click to select a range
8d76456
Token symbol uniqueness (#57)
amarinkovic Apr 10, 2023
23fcaae
ci: fix branch scopes
amarinkovic Apr 12, 2023
a5e6255
feat: add support for sepolia
amarinkovic Apr 12, 2023
e4b60f0
feat: run anvil in docker
amarinkovic Apr 18, 2023
61ee9a2
chore: remove a CI step not needed anymore
amarinkovic Apr 18, 2023
cbe9a4e
Merge branch 'main' into dev
amarinkovic May 8, 2023
fd191c1
ci: reformat test workflow summary
amarinkovic May 8, 2023
d7e6a8b
ci: reformat test workflow summary
amarinkovic May 8, 2023
2106193
fix: sepolia upgrade hash make target
amarinkovic May 10, 2023
c85bc98
Merge branch 'main' into dev
amarinkovic May 15, 2023
d46f696
Update local node scripts (#64)
amarinkovic May 17, 2023
c9254fb
Merge branch 'main' into dev
amarinkovic May 24, 2023
b25e14e
chore: add make commands to initialize and upgrade a new diamond on a…
kevin-fruitful May 25, 2023
912f12d
refactor: align boostrap with new deployment scripts
amarinkovic May 25, 2023
63ec6e7
fix: prep upgrade script method ref
amarinkovic May 25, 2023
bec8977
feat: script anvil upgrade flow
amarinkovic May 25, 2023
634871d
Merge branch 'main' into dev
amarinkovic May 25, 2023
62e7dfb
chore: update gitignore for mnemonic files
amarinkovic May 25, 2023
7ed7c99
ci: fix upgrade hash report
amarinkovic May 25, 2023
c8cbd67
chore: remove stale goerli broadcasts
amarinkovic May 25, 2023
8539604
fix: upgrade stack too deep error
amarinkovic May 25, 2023
23ecd22
refactor: add some makefile targets for sepolia
amarinkovic May 26, 2023
c6cf96e
fix: write the array of selectors to the same memory location to avoi…
kevin-fruitful May 26, 2023
9650068
chore: add deploy-contract-sepolia command, commit broadcast files
kevin-fruitful May 26, 2023
9f8ab66
chore: minor makefile arg fix
amarinkovic May 26, 2023
e594a5f
chore: sepolia upgrade broadcasts
amarinkovic May 26, 2023
2f1dd12
refactor(prep-upgrade): pull out generate function
amarinkovic May 26, 2023
bdb4921
chore: update prettier config
amarinkovic May 26, 2023
9db8489
ci: don't generate upgrade hashes
amarinkovic May 26, 2023
5f9cb72
chore: bump to v3.5.0
amarinkovic May 26, 2023
ddadef5
feat: .env format proposal
tgeorgas May 29, 2023
4990633
feat: .env format proposal
tgeorgas May 29, 2023
11fdd89
chore: add sepolia broadcasts, acl facet updated
amarinkovic May 29, 2023
dcc8c1e
fix: add back simple policy info struct (#68)
amarinkovic Jun 2, 2023
a677dee
Hotfix execute limit offer (#67)
kevin-fruitful Jun 2, 2023
78a76ec
fix(erc20-wrapper): allowance function modifiers
amarinkovic Jun 2, 2023
000fc01
doc: update interface reference
amarinkovic Jun 2, 2023
f8a4471
fix: remove duplicate target
amarinkovic Jun 2, 2023
974169d
feat: add forking makefile targets
amarinkovic Jun 2, 2023
b719120
fix: deploy-mainnet-fork permissions
amarinkovic Jun 2, 2023
a8dfd4e
chore: upgrade sepolia diamond to v3.5.1
amarinkovic Jun 2, 2023
f81f439
ci: fix coverage env vars
amarinkovic Jun 2, 2023
8426b50
fix: mainnet fork target for owner balance
amarinkovic Jun 5, 2023
df57816
Emit dividend withdrawn event (#59)
amarinkovic Jun 6, 2023
1a1ff6f
Deployer adapter script (#70)
amarinkovic Jun 23, 2023
52d7a08
Enhance Fee and Commission Payment Routing for Marketplace and Polici…
kevin-fruitful Jun 23, 2023
971844c
Merge branch 'main' into dev
amarinkovic Jun 30, 2023
da740ea
chore(deployer): fix mainnet fork upgrade flow
amarinkovic Jun 30, 2023
afeaff2
Refactor fees (#72)
amarinkovic Jun 30, 2023
f2b4061
chore: deployer script output formatting
amarinkovic Jun 30, 2023
383ebf4
chore: upgrade sepolia to v3.6.0
amarinkovic Jul 3, 2023
ac885f7
chore(verification-util): pull out network into vars
amarinkovic Jul 3, 2023
05dc9e5
rerfactor: generic fee schedule getter
amarinkovic Jul 3, 2023
b8df3b8
chore: bump package version to v3.6.1
amarinkovic Jul 3, 2023
509f7d3
doc: fix natspec
amarinkovic Jul 3, 2023
c55c93a
chore: broadcasts for v3.6.1
amarinkovic Jul 3, 2023
5587662
chore: remove hotfix test
amarinkovic Jul 3, 2023
cea9c3a
fix: add view modifier to isObjectTokenizable
amarinkovic Jul 4, 2023
867e743
test(fees): trading fees coverage
amarinkovic Jul 4, 2023
1ee0aa8
test(fees): fix variable name typo
amarinkovic Jul 4, 2023
62ff8ff
feat(fees): add zero premium fee support for platform
amarinkovic Jul 6, 2023
55ee879
chore: clean up pre policy setup in tests; clean up unused foundry props
amarinkovic Jul 6, 2023
b08e1ce
chore: fix linter
amarinkovic Jul 6, 2023
9516bc1
chore: add platform flag for running docker on ARM CPUs
amarinkovic Jul 14, 2023
67e4291
Calculate the trading fee on matching offer(s) schedule (#74)
amarinkovic Jul 19, 2023
dd8a666
Fork Sanity Tests for Contract Upgrades (#76)
kevin-fruitful Jul 26, 2023
a57f35d
fix: calculate fee allocations breakdown
amarinkovic Aug 25, 2023
a9158b9
fix: setup default fee schedules inthe init diamond
amarinkovic Aug 30, 2023
98a1c0e
fix: reintroduce order matching rounding parameter
amarinkovic Aug 31, 2023
b4a8f3d
fix: dividend withdraw fuzz test
amarinkovic Aug 31, 2023
5232fc5
chore: 4x the number of max rejects for fuzzing
amarinkovic Aug 31, 2023
a635f5e
Update access control part 1 (#77)
kevin-fruitful Sep 18, 2023
834e40b
Withdraw restriction (#78)
kevin-fruitful Sep 19, 2023
478c0b4
fix: add contract verification to deployer script
amarinkovic Sep 20, 2023
8481c55
chore: ignore macos files
amarinkovic Sep 20, 2023
f71485e
chore: upgrade sepolia to v3.6.2
amarinkovic Sep 20, 2023
37e5840
chore: update email in package.json
kevin-fruitful Sep 20, 2023
03006b4
Roles part 1 refinement (#79)
kevin-fruitful Sep 21, 2023
6254da6
chore: upgrade sepolia to v3.6.3 smart contracts
amarinkovic Sep 21, 2023
c90e4bf
refactor: deployer only to verify when not forking
amarinkovic Sep 21, 2023
ddc1971
fix: deployer account resolution
amarinkovic Sep 26, 2023
25b1e8e
doc: deployer script explainer
amarinkovic Sep 26, 2023
bbf060f
Prevent role demotion (IM-24357) (#80)
kevin-fruitful Sep 27, 2023
28c613a
test: hRoles - pretty print roles
kevin-fruitful Sep 29, 2023
33656dd
feat: update SmartDeploy to pass in init diamond address
kevin-fruitful Sep 29, 2023
db1add3
feat: command anvil-upgrade-init-addr
kevin-fruitful Sep 29, 2023
a757930
fix: prepare for upgrade, add custom init and getters
amarinkovic Sep 29, 2023
95b25c7
chore: update forge-std
kevin-fruitful Oct 2, 2023
64d0471
deployment: add helper commands for anvil deployment; add script to d…
kevin-fruitful Oct 2, 2023
0295a1c
chore: gitignore generated file
kevin-fruitful Oct 2, 2023
c9b546b
chore: add custom solhit config in script folder
kevin-fruitful Oct 2, 2023
faf91d3
test: add cHr helper method to pretty print commission receivers
kevin-fruitful Oct 2, 2023
206ac51
chore: remove redundant getter
amarinkovic Oct 2, 2023
b9584a8
chore: fix typos
kevin-fruitful Oct 2, 2023
4540da1
chore: remove redundant scripts for deploying contracts
kevin-fruitful Oct 2, 2023
bde9637
deployment: update prep-upgrade.js to take in an init contract address
kevin-fruitful Oct 2, 2023
3f614a8
Merge branch 'main' into dev
amarinkovic Oct 3, 2023
18639cf
chore: rm S03UpgradeDiamond.s.sol
kevin-fruitful Oct 4, 2023
78f871e
feat: command bn-mainnet
kevin-fruitful Oct 4, 2023
8690865
feat: command bn-sepolia
kevin-fruitful Oct 6, 2023
ffbf34a
test: hSetEntity
kevin-fruitful Oct 9, 2023
769294f
test: add hCreateEntity
kevin-fruitful Oct 10, 2023
06b6e30
feat command tf - toggle fork
kevin-fruitful Oct 10, 2023
4970508
test: toggle testing upgrades on a fork
kevin-fruitful Oct 12, 2023
80a5245
test: fix missing import
kevin-fruitful Oct 12, 2023
c9f4eb2
feat: add usdc support in tests
amarinkovic Oct 12, 2023
a2a7fda
chore: simplify build process for deployments and tests
kevin-fruitful Oct 13, 2023
13da7ed
chore: update forge-std
kevin-fruitful Oct 13, 2023
7ad7528
chore: upgrade sepolia - hasGroupPrivilege is included
kevin-fruitful Oct 13, 2023
1d62edb
chore: bump solc to 0.8.20
kevin-fruitful Oct 18, 2023
ebd7833
Order book sorting problem with small amounts (#82)
amarinkovic Oct 18, 2023
9d3d4b3
refactor: use updated openzeppelin ECDSA lib
kevin-fruitful Oct 18, 2023
c834f60
chore: bump oz, rename ozv4 to oz
kevin-fruitful Oct 18, 2023
054586f
chore: update path in slither configs; update remappings.txt
kevin-fruitful Oct 18, 2023
76e627a
chore: update libs; set oz branch to merge/release-v5.0
kevin-fruitful Oct 18, 2023
ac1b94a
Merge branch 'main' into dev
kevin-fruitful Oct 18, 2023
11f3dad
Fix typos (#85)
omahs Oct 19, 2023
1407bb9
chore: bump slither-action to v0.3.0
amarinkovic Oct 19, 2023
4146c79
ci: use slither from builder image
amarinkovic Oct 19, 2023
cd6a20c
ci: add back solc install to pipeline
amarinkovic Oct 19, 2023
2c21aba
ci: slither continue on error
amarinkovic Oct 19, 2023
2e78123
ci: cleanup slither setup
amarinkovic Oct 19, 2023
c916abb
Double locked balance (#81)
amarinkovic Oct 20, 2023
dacfcac
refactor: simplify supported external address checking
amarinkovic Oct 23, 2023
862334c
test: better offer printing
amarinkovic Oct 23, 2023
db0b9f8
chore: apply formatting for linter
amarinkovic Oct 24, 2023
5fad228
test: move forking logic from setup into test
kevin-fruitful Oct 24, 2023
a9f6adc
chore: do not append metadata bytecode hash to runtime bytecode
kevin-fruitful Oct 25, 2023
e651557
Object types for Nayms objects (#86)
kevin-fruitful Oct 25, 2023
8e5fdb7
Always validate token symbol and name length (#88)
amarinkovic Oct 25, 2023
0208737
refactor: use typed errors for token name and symbol checks
amarinkovic Oct 26, 2023
f1bbdd2
chore: rm unwanted test file
kevin-fruitful Oct 30, 2023
dc4aee7
Double release funds (#89)
amarinkovic Oct 31, 2023
027aa95
Fix claim payments post maturation (#90)
amarinkovic Oct 31, 2023
776ca6b
test: minor fix to testOnlyRolesInGroupPayDividendFromEntityCanPayDiv…
kevin-fruitful Oct 31, 2023
96e2659
test: move helper function fundEntityWeth to D03ProtocolDefaults
kevin-fruitful Oct 31, 2023
62a1283
test: move helper function fundEntityUsdc to D03ProtocolDefaults
kevin-fruitful Oct 31, 2023
83fb296
chore: publich base goerli adddress
amarinkovic Nov 6, 2023
4eeea06
Start using Gemforge (#92)
amarinkovic Nov 13, 2023
88b8d5b
chore: bump gemforge to v2.6.4
amarinkovic Nov 13, 2023
6bd47a1
chore: cleanup unused scripts and make targets
amarinkovic Nov 13, 2023
553c8d3
npm: update package structure
amarinkovic Nov 13, 2023
9f843bb
ci: fix npm workflow, add mnemonic file
amarinkovic Nov 14, 2023
ee2bea2
ci: fix build env vars for npm workflow
amarinkovic Nov 14, 2023
6b4e789
test: move helper function fundEntityUsdc, fundEntityWeth to D03Proto…
kevin-fruitful Nov 15, 2023
245b73a
refactor: name variables in mapping variables in AppStorage
kevin-fruitful Nov 15, 2023
b0bf98e
chore: add deployment target for goerli
amarinkovic Nov 15, 2023
250d4e4
chore: update filtered abi file name
amarinkovic Nov 15, 2023
7ed527e
forge install: solady
kevin-fruitful Nov 15, 2023
bca8c85
chore: cleanup remappings.txt
kevin-fruitful Nov 15, 2023
3741272
test: add view modifier
kevin-fruitful Nov 15, 2023
44efae6
test: use env vars to get diamond address for fork tests
kevin-fruitful Nov 15, 2023
75869f6
test: prevent execution flow termination when adding an existing supp…
kevin-fruitful Nov 15, 2023
d5d9e8d
chore: update npm publishing workflow
amarinkovic Nov 15, 2023
dbd35c6
chore: update local target deployed addresses
amarinkovic Nov 16, 2023
49bbd9b
chore: bump version to 3.7.4
amarinkovic Nov 16, 2023
77873e3
chore: update bootstrap script to align with gemforge
amarinkovic Nov 16, 2023
4c3d11f
doc: update folder tree
amarinkovic Nov 17, 2023
fbd0ad7
chore: fix abi path in npm package
amarinkovic Nov 17, 2023
48c0492
chore: update env var example
amarinkovic Nov 17, 2023
2c6ac83
chore: bump version to 3.7.6
amarinkovic Nov 17, 2023
2b11447
chore: fix eslint warnings
amarinkovic Nov 17, 2023
68af713
feat: skip verification for fork targets
amarinkovic Nov 17, 2023
f1a190f
feat: add sepolia fork target
amarinkovic Nov 17, 2023
4cfcf46
doc: update readme
amarinkovic Nov 17, 2023
312ac7c
ci: remove obsolete workflow
amarinkovic Nov 20, 2023
c934d2c
chore: use shared mnemonic for forks
amarinkovic Nov 20, 2023
ae3ca56
chore: cleanup sepolia fork deployment info
amarinkovic Nov 20, 2023
8e9ceda
chore: update forge-std
kevin-fruitful Nov 20, 2023
6e4d6c1
feat: add base mainnet and fork
amarinkovic Nov 21, 2023
904f155
fix: null pointer on first deployment
amarinkovic Nov 21, 2023
aa43448
ci: add base rpc secrets
amarinkovic Nov 21, 2023
1c2b562
feat: add getter for totalDividends
kevin-fruitful Nov 23, 2023
1e1a2ac
fix: tokenized vault library function modifier
amarinkovic Nov 23, 2023
46354c8
fix: calculate upgrade ID offchain
amarinkovic Nov 23, 2023
b33fbba
fix: don't auto approve mainnetFork upgrade
amarinkovic Nov 23, 2023
c8eb58c
feat: add getter for objectTokenSymbol
kevin-fruitful Nov 27, 2023
0ea4269
refactor: highlight upgrade ID in the console output of the deploy sc…
amarinkovic Nov 27, 2023
22fdb81
chore: new base goerli deployment
amarinkovic Nov 29, 2023
b5b53b0
chore: fix eslint config
amarinkovic Nov 30, 2023
d96383d
feat: support L2 verifier url config
amarinkovic Nov 30, 2023
3cb97e4
chore: set custom verifier URL for base mainnet
amarinkovic Dec 1, 2023
047cb10
chore: setup dedicated wallet config for mainnet
amarinkovic Dec 1, 2023
9aacb63
ci: fix missing mnemonic file issue
amarinkovic Dec 1, 2023
985da14
fix: gemforge wallets configuration
amarinkovic Dec 1, 2023
5fdff44
chore: cleanup event field names
amarinkovic Dec 5, 2023
89a7567
minimum sell amounts (#93)
kevin-fruitful Dec 6, 2023
af09204
ci: disable solstat, until fixed
amarinkovic Dec 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
export LOCAL_RPC_URL=
export ETH_MAINNET_RPC_URL=
export ETH_GOERLI_RPC_URL=
export ETH_SEPOLIA_RPC_URL=
export BASE_GOERLI_RPC_URL=
export ETH_GOERLI_RPC_URL=
export ETHERSCAN_API_KEY=
export NAYMS_SALT=
export OWNER_ACCOUNT_KEY=
export SYSTEM_ADMIN_1=
export BOOL_FORK_TEST=
export TESTS_FORK_UPGRADE_DIAMOND=
export TESTS_FORK_DIAMOND_ADDRESS_1=
export TESTS_FORK_DIAMOND_ADDRESS_11155111=
export TESTS_FORK_DIAMOND_ADDRESS_31337=
export TESTS_FORK_DIAMOND_ADDRESS_84531=
export FORK_BLOCK_1=
export FORK_BLOCK_11155111=
export FORK_BLOCK_31337=
export FORK_BLOCK_31337=
export FORK_BLOCK_84531=
14 changes: 0 additions & 14 deletions .env.proposal

This file was deleted.

37 changes: 18 additions & 19 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
module.exports = {
env: {
browser: false,
es2021: true,
mocha: true,
node: true,
},
extends: [
"standard",
"plugin:prettier/recommended",
"plugin:node/recommended",
],
parserOptions: {
ecmaVersion: 12,
},
overrides: [
{
files: ["hardhat.config.js"],
globals: { task: true },
env: {
browser: false,
es2021: true,
mocha: true,
node: true,
},
],
eslint: {
runtime: "node"
},
extends: ["standard", "plugin:prettier/recommended", "plugin:node/recommended"],
parserOptions: {
ecmaVersion: 12,
},
overrides: [
{
files: ["hardhat.config.js"],
globals: { task: true },
},
],
};
8 changes: 4 additions & 4 deletions .gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ T02UserTest:testGetUserIdFromAddress() (gas: 13111)
T02UserTest:testSetEntityFailsIfNotSysAdmin() (gas: 17858)
T02UserTest:testSetNonExistingEntity() (gas: 21330)
T03NaymsOwnershipTest:testFuzz_TransferOwnership(address,address,address) (runs: 256, μ: 115399, ~: 115399)
T03NaymsOwnershipTest:testTransferOwernship() (gas: 80801)
T03NaymsOwnershipTest:testTransferOwernshipFailsIfNewOwnerIsSysAdmin() (gas: 63812)
T03NaymsOwnershipTest:testTransferOwernshipFailsIfNewOwnerIsSysManager() (gas: 102978)
T03NaymsOwnershipTest:testTransferOwernshipFailsIfNotSysAdmin() (gas: 17824)
T03NaymsOwnershipTest:testTransferOwnership() (gas: 80801)
T03NaymsOwnershipTest:testTransferOwnershipFailsIfNewOwnerIsSysAdmin() (gas: 63812)
T03NaymsOwnershipTest:testTransferOwnershipFailsIfNewOwnerIsSysManager() (gas: 102978)
T03NaymsOwnershipTest:testTransferOwnershipFailsIfNotSysAdmin() (gas: 17824)
T03SystemFacetTest:testD03CreateEntity() (gas: 18686)
T03SystemFacetTest:testGetObjectMeta() (gas: 250099)
T03SystemFacetTest:testIsObject() (gas: 239012)
Expand Down
3 changes: 3 additions & 0 deletions .gemforge/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.json
*.sol
*.log
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: "16"
node-version: 20
cache: "yarn"
registry-url: "https://registry.npmjs.org"
scope: "@nayms"
Expand Down
20 changes: 14 additions & 6 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: "16.x"
node-version: 20
registry-url: "https://registry.npmjs.org"
always-auth: true

- name: Install solc
run: svm install 0.7.6 && svm install 0.8.17 && svm use 0.8.17
run: svm install 0.7.6 && svm install 0.8.20 && svm use 0.8.20

- name: Fix ownership
run: git config --global --add safe.directory /__w/contracts-v3/contracts-v3
Expand All @@ -41,14 +41,22 @@ jobs:

- name: Install Node dependencies
run: yarn

- name: Prepare build
run: make prep-build
- name: Drop-in Test Wallet
run: echo "test test test test test test test test test test test junk" > ./nayms_mnemonic.txt

- name: Build solidity contracts
run: make build
env:
ETH_MAINNET_RPC_URL: ${{ secrets.ETH_MAINNET_RPC_URL }}
ETH_SEPOLIA_RPC_URL: ${{ secrets.ETH_SEPOLIA_RPC_URL }}
ETH_GOERLI_RPC_URL: ${{ secrets.ETH_GOERLI_RPC_URL }}
BASE_GOERLI_RPC_URL: ${{ secrets.BASE_GOERLI_RPC_URL }}

- name: Filter ABI
run: make filter-abi

- name: Publish to NPM
run: npm publish
run: rm src/generated/.gitignore && npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
10 changes: 5 additions & 5 deletions .github/workflows/solstat.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: solstat
on:
push:
branches:
- main
pull_request:
# push:
# branches:
# - main
# pull_request:
workflow_dispatch: {}
workflow_call:

Expand All @@ -26,7 +26,7 @@ jobs:
submodules: recursive

- name: Make solstat report
run: solstat --path ./src/diamonds/nayms/
run: solstat --path ./src/

- name: Publish solstat report
run: cat solstat_report.md >> $GITHUB_STEP_SUMMARY
52 changes: 21 additions & 31 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,13 @@ jobs:
with:
submodules: recursive

- uses: actions/setup-node@v3
with:
node-version: 20
cache: "yarn"

- name: Install solc
run: svm install 0.7.6 && svm install 0.8.17 && svm use 0.8.17
run: svm install 0.7.6 && svm install 0.8.20 && svm use 0.8.20

- name: Fix ownership
run: git config --global --add safe.directory /__w/contracts-v3/contracts-v3
Expand All @@ -36,18 +41,26 @@ jobs:
- name: Install Node dependencies
run: yarn

- name: Prepare build
run: make prep-build
- name: Drop-in Test Wallet
run: echo "test test test test test test test test test test test junk" > ./nayms_mnemonic.txt && echo "test test test test test test test test test test test junk" > ./nayms_mnemonic_mainnet.txt

- name: Build solidity contracts
run: make build
env:
ETH_MAINNET_RPC_URL: ${{ secrets.ETH_MAINNET_RPC_URL }}
ETH_SEPOLIA_RPC_URL: ${{ secrets.ETH_SEPOLIA_RPC_URL }}
ETH_GOERLI_RPC_URL: ${{ secrets.ETH_GOERLI_RPC_URL }}
BASE_MAINNET_RPC_URL: ${{ secrets.BASE_MAINNET_RPC_URL }}
BASE_GOERLI_RPC_URL: ${{ secrets.BASE_GOERLI_RPC_URL }}

- name: Tests - local
run: make test
env:
ETH_MAINNET_RPC_URL: ${{ secrets.ETH_MAINNET_RPC_URL }}
ETH_SEPOLIA_RPC_URL: ${{ secrets.ETH_SEPOLIA_RPC_URL }}
ETH_GOERLI_RPC_URL: ${{ secrets.ETH_GOERLI_RPC_URL }}
run: make test
BASE_MAINNET_RPC_URL: ${{ secrets.BASE_MAINNET_RPC_URL }}
BASE_GOERLI_RPC_URL: ${{ secrets.BASE_GOERLI_RPC_URL }}

- name: Coverage report
env:
Expand All @@ -61,35 +74,12 @@ jobs:
path-to-lcov: "./lcov-filtered.info"

- name: Slither Static Analyser
uses: crytic/[email protected]
id: slither
with:
sarif: results.sarif
target: src/diamonds/nayms
slither-args: --exclude solc-version,assembly-usage,naming-convention,low-level-calls --ignore-compile
continue-on-error: true
env:
SOLC_VERSION: 0.8.20
run: make slither

- name: Upload Slither SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ steps.slither.outputs.sarif }}

# - name: Generate upgrade hashes
# env:
# ETH_MAINNET_RPC_URL: ${{ secrets.ETH_MAINNET_RPC_URL }}
# ETH_GOERLI_RPC_URL: ${{ secrets.ETH_GOERLI_RPC_URL }}
# ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
# run: |
# make upgrade-hash-mainnet
# make upgrade-hash-goerli
# make upgrade-hash-sepolia

# echo "### Upgrade hash" >> $GITHUB_STEP_SUMMARY
# echo " - mainnet \`$(jq --raw-output '.returns.upgradeHash.value' broadcast/SmartDeploy.s.sol/1/dry-run/hash-latest.json || echo "Not Available")\`" >> $GITHUB_STEP_SUMMARY
# echo "> $(jq --raw-output '.returns.cut.value' broadcast/SmartDeploy.s.sol/1/dry-run/hash-latest.json || echo "Not Available")" >> $GITHUB_STEP_SUMMARY

# echo " - goerli \`$(jq --raw-output '.returns.upgradeHash.value' broadcast/SmartDeploy.s.sol/5/dry-run/hash-latest.json || echo "Not Available")\`" >> $GITHUB_STEP_SUMMARY
# echo "> $(jq --raw-output '.returns.cut.value' broadcast/SmartDeploy.s.sol/5/dry-run/hash-latest.json || echo "Not Available")" >> $GITHUB_STEP_SUMMARY

# echo " - sepolia \`$(jq --raw-output '.returns.upgradeHash.value' broadcast/SmartDeploy.s.sol/11155111/dry-run/hash-latest.json || echo "Not Available")\`" >> $GITHUB_STEP_SUMMARY
# echo "> $(jq --raw-output '.returns.cut.value' broadcast/SmartDeploy.s.sol/11155111/dry-run/hash-latest.json || echo "Not Available") >> $GITHUB_STEP_SUMMARY
sarif_file: results.sarif
59 changes: 0 additions & 59 deletions .github/workflows/upgrade-goerli-diamond.yml

This file was deleted.

9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ anvil*.json

# yarn v1, node
node_modules
yarn-*.log

# Hardhat files
cache
Expand All @@ -34,6 +35,7 @@ facetsdeployed.txt
.vscode/slither-results.json

.history
.DS_Store

bin/
.idea/.gitignore
Expand All @@ -42,6 +44,7 @@ bin/
.idea/modules.xml
.idea/runConfigurations.xml
.idea/vcs.xml
.metals

broadcast/**/31337/*

Expand All @@ -53,8 +56,8 @@ broadcast/**/dry-run
# coverage report
cov-html

# macOS
.DS_Store
# Gemforge
# gemforge.deployments.json

# Generated files
script/deployment/S03UpgradeDiamond.s.sol
script/deployment/S03UpgradeDiamond.s.sol
14 changes: 11 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,20 @@
[submodule "lib/solidity-lib"]
path = lib/solidity-lib
url = https://github.com/uniswap/solidity-lib
[submodule "lib/ozv4"]
path = lib/ozv4
url = https://github.com/openzeppelin/openzeppelin-contracts
[submodule "lib/v3-periphery-foundry"]
path = lib/v3-periphery-foundry
url = https://github.com/gakonst/v3-periphery-foundry
[submodule "lib/solidity-stringutils"]
path = lib/solidity-stringutils
url = https://github.com/arachnid/solidity-stringutils
[submodule "lib/oz"]
path = lib/oz
url = https://github.com/openzeppelin/openzeppelin-contracts
branch = merge/release-v5.0
[submodule "lib/diamond-2-hardhat"]
path = lib/diamond-2-hardhat
url = https://github.com/gemstation/diamond-2-hardhat
branch = gemforge-2
[submodule "lib/solady"]
path = lib/solady
url = https://github.com/Vectorized/solady
Loading