Skip to content

Commit

Permalink
feat(billboard): add scripts for static analyzers and billboard deplo…
Browse files Browse the repository at this point in the history
…yment
  • Loading branch information
robertu7 committed Nov 20, 2023
1 parent 6e68e00 commit d0454af
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .env.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ THESPACE_TEAM_TOKENS=
THESPACE_INCENTIVES_ADDRESS=
THESPACE_INCENTIVES_TOKENS=
THESPACE_LP_ADDRESS=
THESPACE_LP_TOKENS=
THESPACE_LP_TOKENS=
BILLBOARD_REGISTRY_ADDRESS=
1 change: 1 addition & 0 deletions .env.polygon-mainnet.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ THESPACE_INCENTIVES_ADDRESS=
THESPACE_INCENTIVES_TOKENS=
THESPACE_LP_ADDRESS=
THESPACE_LP_TOKENS=
BILLBOARD_REGISTRY_ADDRESS=
3 changes: 2 additions & 1 deletion .env.polygon-mumbai.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ THESPACE_TEAM_TOKENS=
THESPACE_INCENTIVES_ADDRESS=
THESPACE_INCENTIVES_TOKENS=
THESPACE_LP_ADDRESS=
THESPACE_LP_TOKENS=
THESPACE_LP_TOKENS=
BILLBOARD_REGISTRY_ADDRESS=
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@
"solidity.formatter": "prettier",
"[solidity]": {
"editor.defaultFormatter": "NomicFoundation.hardhat-solidity"
}
},
"solidity.packageDefaultDependenciesContractsDirectory": "src",
"solidity.packageDefaultDependenciesDirectory": "lib"
}
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ Testing
make test
```

Static Analyzers

```bash
make analyze-billboard
```

## Deployment

### Deploy on Local Node:
Expand Down
1 change: 1 addition & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ remappings = [
]
verbosity = 3
gas_reports = ["*"]
solc_version = "0.8.22"

[profile.ci]
fuzz_runs = 1024
Expand Down
3 changes: 3 additions & 0 deletions slither.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"filter_paths": "lib"
}

0 comments on commit d0454af

Please sign in to comment.