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

Post QS2 audit updates #69

Merged
merged 96 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 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
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
9 changes: 6 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ export LOCAL_RPC_URL=
export ETH_MAINNET_RPC_URL=
export ETH_GOERLI_RPC_URL=
export ETH_SEPOLIA_RPC_URL=
export ETH_MAINNET_API_KEY=
export ETH_GOERLI_API_KEY=
export ETHERSCAN_API_KEY=
export NAYMS_SALT=
export OWNER_ACCOUNT_KEY=
export OWNER_ACCOUNT_KEY=
export SYSTEM_ADMIN_1=
export BOOL_FORK_TEST=
export FORK_BLOCK_1=
export FORK_BLOCK_11155111=
export FORK_BLOCK_31337=
14 changes: 14 additions & 0 deletions .env.proposal
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export LOCAL_ID=123
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

local should be 31337. ID 123 is for some network called fuse sparknet: https://chainlist.org/chain/123

export LOCAL_RPC_URL=
export LOCAL_OWNER_ACCOUNT_KEY=

export MAINNET_ID=1
export MAINNET_RPC_URL=
export MAINNET_OWNER_ACCOUNT_KEY=

export SEPOLIA_ID=11155111
export SEPOLIA_RPC_URL=
export SEPOLIA_OWNER_ACCOUNT_KEY=

export ETHERSCAN_API_KEY=
export NAYMS_SALT=
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- main
- dev
pull_request:

jobs:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ jobs:
registry-url: "https://registry.npmjs.org"
always-auth: true

- name: Update path
run: echo "/root/.cargo/bin:/root/.foundry/bin" >> $GITHUB_PATH

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

Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/solstat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ jobs:
with:
submodules: recursive

- name: Update path
run: echo "/root/.cargo/bin:/root/.foundry/bin" >> $GITHUB_PATH

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

Expand Down
35 changes: 23 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- main
- dev
pull_request:

jobs:
Expand All @@ -23,9 +24,6 @@ jobs:
with:
submodules: recursive

- name: Update path
run: echo "/root/.cargo/bin:/root/.foundry/bin" >> $GITHUB_PATH

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

Expand All @@ -47,10 +45,13 @@ jobs:
- name: Tests - local
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

- name: Coverage report
env:
ETH_MAINNET_RPC_URL: ${{ secrets.ETH_MAINNET_RPC_URL }}
run: make coverage

- name: Coveralls
Expand All @@ -73,12 +74,22 @@ jobs:
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: |
echo "### Upgrade hash" >> $GITHUB_STEP_SUMMARY
echo " - mainnet \`$(make upgrade-hash-mainnet)\`" >> $GITHUB_STEP_SUMMARY
echo " - goerli \`$(make upgrade-hash-goerli)\`" >> $GITHUB_STEP_SUMMARY
# - 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
3 changes: 0 additions & 3 deletions .github/workflows/upgrade-goerli-diamond.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ jobs:
submodules: true
token: ${{ secrets.GITHUB_TOKEN }}

- name: Update path
run: echo "/root/.cargo/bin:/root/.foundry/bin" >> $GITHUB_PATH

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

Expand Down
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ results.sarif
anvil*.json

# SECURITY
nayms_mnemonic.txt
*mnemonic*.txt

# yarn v1, node
node_modules
Expand All @@ -31,6 +31,7 @@ facetsdeployed.txt
.vscode/dryrun.log
.vscode/targets.log
.vscode/launch.json
.vscode/slither-results.json

.history

Expand All @@ -48,3 +49,12 @@ broadcast/**/31337/*
NaymsDiamond.json

broadcast/**/dry-run

# coverage report
cov-html

# macOS
.DS_Store

# Generated files
script/deployment/S03UpgradeDiamond.s.sol
12 changes: 12 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{
"files": "*.sol",
"options": {
"parser": "solidity-parse",
"printWidth": 180,
"tabWidth": 4,
"useTabs": false,
Expand All @@ -16,6 +17,17 @@
"options": {
"parser": "json"
}
},
{
"files": "*.js",
"options": {
"parser": "flow",
"printWidth": 180,
"tabWidth": 4,
"useTabs": false,
"singleQuote": false,
"bracketSpacing": true
}
}
]
}
3 changes: 2 additions & 1 deletion .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"avoid-low-level-calls": "off",
"const-name-snakecase": "off",
"reason-string": "off",
"var-name-mixedcase": "off"
"var-name-mixedcase": "off",
"func-name-mixedcase": "off"
}
}
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@
".gas-snapshot": "julia"
},
"solidity.packageDefaultDependenciesContractsDirectory": "src",
"solidity.packageDefaultDependenciesDirectory": "lib"
"solidity.packageDefaultDependenciesDirectory": "lib",
"slither.solcPath": "",
"slither.hiddenDetectors": []
}
Loading
Loading