-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Holesky Deployment and Github Actions (#6)
* holesky helper broadcasts, remapping, solc updates and untrack standard-json-inputs * updated README.md * network segregation * github actions and added slither * typo * update bot commenting script
- Loading branch information
1 parent
a6abae3
commit 3a4063d
Showing
22 changed files
with
692 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Ref: https://github.com/marketplace/actions/slither-action#example-workflow-markdown-report | ||
|
||
module.exports = async ({ github, context, header, body }) => { | ||
const collapse_details = '<details> <summary> Click me to view the full report </summary>'; | ||
const close_details = '</details>'; | ||
|
||
const comment = [header, collapse_details, body, close_details].join("\n"); | ||
|
||
const { data: comments } = await github.rest.issues.listComments({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: context.payload.number, | ||
}); | ||
|
||
const botComment = comments.find( | ||
(comment) => | ||
// github-actions bot user | ||
comment.user.id === 41898282 && comment.body.startsWith(header) | ||
); | ||
|
||
const commentFn = botComment ? "updateComment" : "createComment"; | ||
|
||
await github.rest.issues[commentFn]({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: comment, | ||
...(botComment | ||
? { comment_id: botComment.id } | ||
: { issue_number: context.payload.number }), | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Slither Static Analysis | ||
|
||
# Runs only on PR merging to main | ||
on: | ||
pull_request: | ||
branches: [ main ] | ||
types: [ opened, reopened, synchronize, ready_for_review ] | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
analyze: | ||
runs-on: ubuntu-latest | ||
|
||
# Do not run when PR is still a draft | ||
if: ${{ !github.event.pull_request.draft }} | ||
|
||
env: | ||
commit_url: ${{ github.server_url }}/${{ github.repository }}/blob/${{ github.event.pull_request.head.sha }}/ | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Run Slither | ||
uses: crytic/[email protected] | ||
id: slither | ||
with: | ||
fail-on: none | ||
slither-args: --checklist --show-ignored-findings --markdown-root ${{ env.commit_url }} | ||
|
||
|
||
- name: Create/update checklist as PR comment | ||
uses: actions/github-script@v7 | ||
env: | ||
REPORT: ${{ steps.slither.outputs.stdout }} | ||
with: | ||
script: | | ||
const script = require('.github/scripts/slither-comment') | ||
const header = '# Slither report' | ||
const body = process.env.REPORT | ||
await script({ github, context, header, body }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
broadcast/ConfigAutomataDao.s.sol/17000/updateStorageDao-latest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"transactions": [ | ||
{ | ||
"hash": "0xf8dad7ed1df383b23241f479f1a2a09b0a99cbf242a984ca1345b65be38a5037", | ||
"transactionType": "CALL", | ||
"contractName": null, | ||
"contractAddress": "0x528538ab97aa4f7d3397b3ca0a4a6f5d9cf52f97", | ||
"function": "updateDao(address,address,address,address)", | ||
"arguments": [ | ||
"0x66FdB4E72d2F4a7e2081bf83F1FfACC9bbCb384b", | ||
"0x5B2d7781E3c44966769484daBCdc435EFD281c34", | ||
"0xaB5074445E5ae3C650553d5a7560B3A7121635B9", | ||
"0x9f4b0fB3A95072bD133082e9683A3536669EFE07" | ||
], | ||
"transaction": { | ||
"from": "0xdc3bda6d40f0e33e0dfa4aef9604b66195e6c5dc", | ||
"to": "0x528538ab97aa4f7d3397b3ca0a4a6f5d9cf52f97", | ||
"gas": "0xb87b", | ||
"value": "0x0", | ||
"input": "0x40070f2d00000000000000000000000066fdb4e72d2f4a7e2081bf83f1ffacc9bbcb384b0000000000000000000000005b2d7781e3c44966769484dabcdc435efd281c34000000000000000000000000ab5074445e5ae3c650553d5a7560b3a7121635b90000000000000000000000009f4b0fb3a95072bd133082e9683a3536669efe07", | ||
"nonce": "0x10", | ||
"chainId": "0x4268" | ||
}, | ||
"additionalContracts": [], | ||
"isFixedGasLimit": false | ||
} | ||
], | ||
"receipts": [ | ||
{ | ||
"status": "0x1", | ||
"cumulativeGasUsed": "0x286c78", | ||
"logs": [], | ||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", | ||
"type": "0x2", | ||
"transactionHash": "0xf8dad7ed1df383b23241f479f1a2a09b0a99cbf242a984ca1345b65be38a5037", | ||
"transactionIndex": "0x13", | ||
"blockHash": "0xc3e11d60b12c88caa2a5070f3644768927443479537cf580bc3e6c6c77efb38b", | ||
"blockNumber": "0x24b699", | ||
"gasUsed": "0x8590", | ||
"effectiveGasPrice": "0x5f5e109", | ||
"from": "0xdc3bda6d40f0e33e0dfa4aef9604b66195e6c5dc", | ||
"to": "0x528538ab97aa4f7d3397b3ca0a4a6f5d9cf52f97", | ||
"contractAddress": null | ||
} | ||
], | ||
"libraries": [], | ||
"pending": [], | ||
"returns": {}, | ||
"timestamp": 1727269520, | ||
"chain": 17000, | ||
"commit": "fbc73d7" | ||
} |
Oops, something went wrong.