From d0454afb290e32c3ae65d2dcfcb4d72eb0638f9b Mon Sep 17 00:00:00 2001 From: robertu <4065233+robertu7@users.noreply.github.com> Date: Mon, 20 Nov 2023 16:53:35 +0800 Subject: [PATCH] feat(billboard): add scripts for static analyzers and billboard deployment --- .env.local.example | 3 ++- .env.polygon-mainnet.example | 1 + .env.polygon-mumbai.example | 3 ++- .vscode/settings.json | 4 +++- Makefile | 12 +++++++++++- README.md | 6 ++++++ foundry.toml | 1 + slither.config.json | 3 +++ 8 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 slither.config.json diff --git a/.env.local.example b/.env.local.example index 1b1086a..ff963a6 100644 --- a/.env.local.example +++ b/.env.local.example @@ -16,4 +16,5 @@ THESPACE_TEAM_TOKENS= THESPACE_INCENTIVES_ADDRESS= THESPACE_INCENTIVES_TOKENS= THESPACE_LP_ADDRESS= -THESPACE_LP_TOKENS= \ No newline at end of file +THESPACE_LP_TOKENS= +BILLBOARD_REGISTRY_ADDRESS= diff --git a/.env.polygon-mainnet.example b/.env.polygon-mainnet.example index 7b5fc35..f940fcf 100644 --- a/.env.polygon-mainnet.example +++ b/.env.polygon-mainnet.example @@ -18,3 +18,4 @@ THESPACE_INCENTIVES_ADDRESS= THESPACE_INCENTIVES_TOKENS= THESPACE_LP_ADDRESS= THESPACE_LP_TOKENS= +BILLBOARD_REGISTRY_ADDRESS= diff --git a/.env.polygon-mumbai.example b/.env.polygon-mumbai.example index c768d11..40dfc38 100644 --- a/.env.polygon-mumbai.example +++ b/.env.polygon-mumbai.example @@ -17,4 +17,5 @@ THESPACE_TEAM_TOKENS= THESPACE_INCENTIVES_ADDRESS= THESPACE_INCENTIVES_TOKENS= THESPACE_LP_ADDRESS= -THESPACE_LP_TOKENS= \ No newline at end of file +THESPACE_LP_TOKENS= +BILLBOARD_REGISTRY_ADDRESS= diff --git a/.vscode/settings.json b/.vscode/settings.json index 05a475b..831a723 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,5 +4,7 @@ "solidity.formatter": "prettier", "[solidity]": { "editor.defaultFormatter": "NomicFoundation.hardhat-solidity" - } + }, + "solidity.packageDefaultDependenciesContractsDirectory": "src", + "solidity.packageDefaultDependenciesDirectory": "lib" } \ No newline at end of file diff --git a/Makefile b/Makefile index e899a63..63eabd9 100644 --- a/Makefile +++ b/Makefile @@ -11,10 +11,16 @@ coverage :; forge coverage --report=summary build: clean forge build test: - forge test --gas-report + forge test --gas-report -vvv trace: clean forge test -vvvvv --gas-report +# Static Analyzers +analyze-logbook :; slither src/Logbook/Logbook.sol +analyze-the-space :; slither src/TheSpace/TheSpace.sol +analyze-curation :; slither src/Curation/Curation.sol +analyze-billboard :; slither src/Billboard/Billboard.sol + # Deployments ## Logbook deploy-logbook: clean @@ -36,3 +42,7 @@ deploy-snapper: clean ## Curation deploy-curation: clean @forge create Curation --rpc-url ${ETH_RPC_URL} --private-key ${DEPLOYER_PRIVATE_KEY} --legacy --verify --etherscan-api-key ${ETHERSCAN_API_KEY} + +## Billboard +deploy-billboard: clean + @forge create Billboard --rpc-url ${ETH_RPC_URL} --private-key ${DEPLOYER_PRIVATE_KEY} --constructor-args ${BILLBOARD_REGISTRY_ADDRESS} 1 "Billboard" "BLBD" --legacy \ No newline at end of file diff --git a/README.md b/README.md index 4b8133f..0feeb83 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,12 @@ Testing make test ``` +Static Analyzers + +```bash +make analyze-billboard +``` + ## Deployment ### Deploy on Local Node: diff --git a/foundry.toml b/foundry.toml index e25d440..0106e48 100644 --- a/foundry.toml +++ b/foundry.toml @@ -9,6 +9,7 @@ remappings = [ ] verbosity = 3 gas_reports = ["*"] +solc_version = "0.8.22" [profile.ci] fuzz_runs = 1024 diff --git a/slither.config.json b/slither.config.json new file mode 100644 index 0000000..532595d --- /dev/null +++ b/slither.config.json @@ -0,0 +1,3 @@ +{ + "filter_paths": "lib" +}