Skip to content

Commit 3a4063d

Browse files
authored
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
1 parent a6abae3 commit 3a4063d

22 files changed

+692
-34
lines changed

.github/scripts/slither-comment.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Ref: https://github.com/marketplace/actions/slither-action#example-workflow-markdown-report
2+
3+
module.exports = async ({ github, context, header, body }) => {
4+
const collapse_details = '<details> <summary> Click me to view the full report </summary>';
5+
const close_details = '</details>';
6+
7+
const comment = [header, collapse_details, body, close_details].join("\n");
8+
9+
const { data: comments } = await github.rest.issues.listComments({
10+
owner: context.repo.owner,
11+
repo: context.repo.repo,
12+
issue_number: context.payload.number,
13+
});
14+
15+
const botComment = comments.find(
16+
(comment) =>
17+
// github-actions bot user
18+
comment.user.id === 41898282 && comment.body.startsWith(header)
19+
);
20+
21+
const commentFn = botComment ? "updateComment" : "createComment";
22+
23+
await github.rest.issues[commentFn]({
24+
owner: context.repo.owner,
25+
repo: context.repo.repo,
26+
body: comment,
27+
...(botComment
28+
? { comment_id: botComment.id }
29+
: { issue_number: context.payload.number }),
30+
});
31+
};

.github/workflows/test.yml renamed to .github/workflows/build.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
name: test
1+
name: Foundry Build CI/CD
22

3-
on: workflow_dispatch
4-
5-
env:
6-
FOUNDRY_PROFILE: ci
3+
# Controls when the workflow will run
4+
on:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
branches: [main]
79

810
jobs:
911
check:
@@ -32,3 +34,6 @@ jobs:
3234
run: |
3335
forge test -vvv
3436
id: test
37+
38+
- name: Run snapshot and Generate Summary
39+
run: NO_COLOR=1 forge snapshot --gas-report >> $GITHUB_STEP_SUMMARY

.github/workflows/slither.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Slither Static Analysis
2+
3+
# Runs only on PR merging to main
4+
on:
5+
pull_request:
6+
branches: [ main ]
7+
types: [ opened, reopened, synchronize, ready_for_review ]
8+
9+
workflow_dispatch:
10+
11+
jobs:
12+
analyze:
13+
runs-on: ubuntu-latest
14+
15+
# Do not run when PR is still a draft
16+
if: ${{ !github.event.pull_request.draft }}
17+
18+
env:
19+
commit_url: ${{ github.server_url }}/${{ github.repository }}/blob/${{ github.event.pull_request.head.sha }}/
20+
21+
steps:
22+
- uses: actions/checkout@v3
23+
24+
- name: Run Slither
25+
uses: crytic/slither-action@v0.4.0
26+
id: slither
27+
with:
28+
fail-on: none
29+
slither-args: --checklist --show-ignored-findings --markdown-root ${{ env.commit_url }}
30+
31+
32+
- name: Create/update checklist as PR comment
33+
uses: actions/github-script@v7
34+
env:
35+
REPORT: ${{ steps.slither.outputs.stdout }}
36+
with:
37+
script: |
38+
const script = require('.github/scripts/slither-comment')
39+
const header = '# Slither report'
40+
const body = process.env.REPORT
41+
await script({ github, context, header, body })

README.md

Lines changed: 39 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,37 +29,58 @@ The Helper contracts provide APIs for parsing collaterals and converting into So
2929

3030
The Helper contracts have been deployed to testnet, and can be used by both on-chain and off-chain programs.
3131

32+
#### Testnet
33+
34+
| | Network | Address |
35+
| --- | --- | --- |
36+
| `EnclaveIdentityHelper.sol` | Automata Testnet | [0xfd4a34b578B352FE1896CDafaEb0f45f993352Bf](https://explorer-testnet.ata.network/address/0xfd4a34b578B352FE1896CDafaEb0f45f993352Bf) |
37+
| | Ethereum Holesky Testnet | [0xEea41Ae0cB09A478b80425Ae61c85e445E83c415](https://holesky.etherscan.io/address/0xEea41Ae0cB09A478b80425Ae61c85e445E83c415) |
38+
| `FmspcTcbHelper.sol` | Automata Testnet | [0xC2A662e08A35513596E22D0aC236Ce72e59125EE](https://explorer-testnet.ata.network/address/0xC2A662e08A35513596E22D0aC236Ce72e59125EE) |
39+
| | Ethereum Holesky Testnet | [0xc728DD0FcD76CD9166F66e1CD8002dE86d6525B8](https://holesky.etherscan.io/address/0xc728DD0FcD76CD9166F66e1CD8002dE86d6525B8) |
40+
| `PCKHelper.sol` | Automata Testnet | [0x5213c0e3Ab478dbc83E8afFF8909717332E4f8E1](https://explorer-testnet.ata.network/address/0x5213c0e3Ab478dbc83E8afFF8909717332E4f8E1) |
41+
| | Ethereum Holesky Testnet | [0xDe20629a87C371668bB371ef1d77D9D167E52021](https://holesky.etherscan.io/address/0xDe20629a87C371668bB371ef1d77D9D167E52021) |
42+
| `X509CRLHelper.sol` | Automata Testnet | [0x12C1E13Aa2a238EAb15c2e2b6AC670266bc3C814](https://explorer-testnet.ata.network/address/0x12C1E13Aa2a238EAb15c2e2b6AC670266bc3C814) |
43+
| | Ethereum Holesky Testnet | [0x3ACBfad7460e2fae32A31f863e1A38F7a002cEA8](https://holesky.etherscan.io/address/0x3ACBfad7460e2fae32A31f863e1A38F7a002cEA8) |
44+
45+
#### Mainnet
3246
| | Network | Address |
3347
| --- | --- | --- |
34-
| `EnclaveIdentityHelper.sol` | testnet | [0xfd4a34b578B352FE1896CDafaEb0f45f993352Bf](https://explorer-testnet.ata.network/address/0xfd4a34b578B352FE1896CDafaEb0f45f993352Bf) |
35-
| | mainnet (preview) | [0x13BECaa512713Ac7C2d7a04ba221aD5E02D43DFE](https://explorer.ata.network/address/0x13BECaa512713Ac7C2d7a04ba221aD5E02D43DFE) |
36-
| `FmspcTcbHelper.sol` | testnet | [0xC2A662e08A35513596E22D0aC236Ce72e59125EE](https://explorer-testnet.ata.network/address/0xC2A662e08A35513596E22D0aC236Ce72e59125EE) |
37-
| | mainnet (preview) | [0xc99bf04c31bf3d026b5b47b2574fc19c1459b732](https://explorer.ata.network/address/0xc99bf04c31bf3d026b5b47b2574fc19c1459b732) |
38-
| `PCKHelper.sol` | testnet | [0x5213c0e3Ab478dbc83E8afFF8909717332E4f8E1](https://explorer-testnet.ata.network/address/0x5213c0e3Ab478dbc83E8afFF8909717332E4f8E1) |
39-
| | mainnet (preview) | [0x3e2fe733E444313A93Fa3f9AEd3bB203048dDE70](https://explorer.ata.network/address/0x3e2fe733E444313A93Fa3f9AEd3bB203048dDE70) |
40-
| `X509CRLHelper.sol` | testnet | [0x12C1E13Aa2a238EAb15c2e2b6AC670266bc3C814](https://explorer-testnet.ata.network/address/0x12C1E13Aa2a238EAb15c2e2b6AC670266bc3C814) |
41-
| | mainnet (preview) | [0x2567245dE6E349C8B7AA82fD6FF854b844A0aEF9](https://explorer.ata.network/address/0x2567245dE6E349C8B7AA82fD6FF854b844A0aEF9) |
48+
| `EnclaveIdentityHelper.sol` | Automata Mainnet (preview) | [0x13BECaa512713Ac7C2d7a04ba221aD5E02D43DFE](https://explorer.ata.network/address/0x13BECaa512713Ac7C2d7a04ba221aD5E02D43DFE) |
49+
| `FmspcTcbHelper.sol` | Automata Mainnet (preview) | [0xc99bf04c31bf3d026b5b47b2574fc19c1459b732](https://explorer.ata.network/address/0xc99bf04c31bf3d026b5b47b2574fc19c1459b732) |
50+
| `PCKHelper.sol` | Automata Mainnet (preview) | [0x3e2fe733E444313A93Fa3f9AEd3bB203048dDE70](https://explorer.ata.network/address/0x3e2fe733E444313A93Fa3f9AEd3bB203048dDE70) |
51+
| `X509CRLHelper.sol` | Automata Mainnet (preview) | [0x2567245dE6E349C8B7AA82fD6FF854b844A0aEF9](https://explorer.ata.network/address/0x2567245dE6E349C8B7AA82fD6FF854b844A0aEF9) |
4252

43-
### Base Contracts
53+
### Base libraries and Automata DAO contracts
4454

45-
The Base contracts are libraries that provide the Data Access Object (DAO) APIs with similar designs inspired from the [Design Guide for Intel SGX PCCS](https://download.01.org/intel-sgx/sgx-dcap/1.21/linux/docs/SGX_DCAP_Caching_Service_Design_Guide.pdf).
55+
The base contracts are libraries that provide the Data Access Object (DAO) APIs with similar designs inspired from the [Design Guide for Intel SGX PCCS](https://download.01.org/intel-sgx/sgx-dcap/1.21/linux/docs/SGX_DCAP_Caching_Service_Design_Guide.pdf).
4656

4757
Base contracts are dependent on Helper contracts to parse collaterals, and contains implementation of basic collateral authenticity check functions for upserts. Smart contract developers are encouraged to extend the base contracts to build their own custom implementation of on-chain PCCS.
4858

4959
<!-- Click [here](./src/bases/) to learn more about each DAOs. -->
5060

5161
Our DAO implementation can be found in the [`automata_pccs`](./src/automata_pccs/) directory, and are deployed to testnet.
5262

63+
#### Testnet
64+
65+
| | Network | Address |
66+
| --- | --- | --- |
67+
| `AutomataEnclaveIdentityDao.sol` | Automata Testnet | [0x413272890ab9F155a47A5F90a404Fb51aa259087](https://explorer-testnet.ata.network/address/0x413272890ab9F155a47A5F90a404Fb51aa259087) |
68+
| | Ethereum Holesky Testnet | [0x9f4b0fB3A95072bD133082e9683A3536669EFE07](https://holesky.etherscan.io/address/0x9f4b0fB3A95072bD133082e9683A3536669EFE07) |
69+
| `AutomataFmspcTcbDao.sol` | Automata Testnet | [0x7c04B466DebA13D48116b1339C62b35B9805E5A0](https://explorer-testnet.ata.network/address/0x7c04B466DebA13D48116b1339C62b35B9805E5A0) |
70+
| | Ethereum Holesky Testnet | [0xaB5074445E5ae3C650553d5a7560B3A7121635B9](https://holesky.etherscan.io/address/0xaB5074445E5ae3C650553d5a7560B3A7121635B9) |
71+
| `AutomataPckDao.sol` | Automata Testnet | [0x6D4cA6AE5315EBBcb4331c82531db0ad8853Eb31](https://explorer-testnet.ata.network/address/0x6D4cA6AE5315EBBcb4331c82531db0ad8853Eb31) |
72+
| | Ethereum Holesky Testnet | [0x5B2d7781E3c44966769484daBCdc435EFD281c34](https://holesky.etherscan.io/address/0x5B2d7781E3c44966769484daBCdc435EFD281c34) |
73+
| `AutomataPcsDao.sol` | Automata Testnet | [0xD0335cbC73CA2f8EDd98a2BE3909f55642F414D7](https://explorer-testnet.ata.network/address/0xD0335cbC73CA2f8EDd98a2BE3909f55642F414D7) |
74+
| | Ethereum Holesky Testnet | [0x66FdB4E72d2F4a7e2081bf83F1FfACC9bbCb384b](https://holesky.etherscan.io/address/0x66FdB4E72d2F4a7e2081bf83F1FfACC9bbCb384b) |
75+
76+
### Mainnet
77+
5378
| | Network | Address |
5479
| --- | --- | --- |
55-
| `AutomataEnclaveIdentityDao.sol` | testnet | [0x413272890ab9F155a47A5F90a404Fb51aa259087](https://explorer-testnet.ata.network/address/0x413272890ab9F155a47A5F90a404Fb51aa259087) |
56-
| | mainnet (preview) | [0x28111536292b34f37120861A46B39BF39187d73a](https://explorer.ata.network/address/0x28111536292b34f37120861A46B39BF39187d73a) |
57-
| `AutomataFmspcTcbDao.sol` | testnet | [0x7c04B466DebA13D48116b1339C62b35B9805E5A0](https://explorer-testnet.ata.network/address/0x7c04B466DebA13D48116b1339C62b35B9805E5A0) |
58-
| | mainnet (preview) | [0x868c18869f68E0E0b0b7B2B4439f7fDDd0421e6b](https://explorer.ata.network/address/0x868c18869f68E0E0b0b7B2B4439f7fDDd0421e6b) |
59-
| `AutomataPckDao.sol` | testnet | [0x6D4cA6AE5315EBBcb4331c82531db0ad8853Eb31](https://explorer-testnet.ata.network/address/0x6D4cA6AE5315EBBcb4331c82531db0ad8853Eb31) |
60-
| | mainnet (preview) | [0xeCc198936FcA3Ca1fDc97B8612B32185908917B0](https://explorer.ata.network/address/0xeCc198936FcA3Ca1fDc97B8612B32185908917B0) |
61-
| `AutomataPcsDao.sol` | testnet | [0xD0335cbC73CA2f8EDd98a2BE3909f55642F414D7](https://explorer-testnet.ata.network/address/0xD0335cbC73CA2f8EDd98a2BE3909f55642F414D7) |
62-
| | mainnet (preview) | [0x86f8865bce8be62cb8096b5b94fa3fb3a6ed330c](https://explorer.ata.network/address/0x86f8865bce8be62cb8096b5b94fa3fb3a6ed330c) |
80+
| `AutomataEnclaveIdentityDao.sol` | Automata Mainnet (preview) | [0x28111536292b34f37120861A46B39BF39187d73a](https://explorer.ata.network/address/0x28111536292b34f37120861A46B39BF39187d73a) |
81+
| `AutomataFmspcTcbDao.sol` | Automata Mainnet (preview) | [0x868c18869f68E0E0b0b7B2B4439f7fDDd0421e6b](https://explorer.ata.network/address/0x868c18869f68E0E0b0b7B2B4439f7fDDd0421e6b) |
82+
| `AutomataPckDao.sol` | Automata Mainnet (preview) | [0xeCc198936FcA3Ca1fDc97B8612B32185908917B0](https://explorer.ata.network/address/0xeCc198936FcA3Ca1fDc97B8612B32185908917B0) |
83+
| `AutomataPcsDao.sol` | Automata Mainnet (preview) | [0x86f8865bce8be62cb8096b5b94fa3fb3a6ed330c](https://explorer.ata.network/address/0x86f8865bce8be62cb8096b5b94fa3fb3a6ed330c) |
6384

6485
---
6586

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"transactions": [
3+
{
4+
"hash": "0xf8dad7ed1df383b23241f479f1a2a09b0a99cbf242a984ca1345b65be38a5037",
5+
"transactionType": "CALL",
6+
"contractName": null,
7+
"contractAddress": "0x528538ab97aa4f7d3397b3ca0a4a6f5d9cf52f97",
8+
"function": "updateDao(address,address,address,address)",
9+
"arguments": [
10+
"0x66FdB4E72d2F4a7e2081bf83F1FfACC9bbCb384b",
11+
"0x5B2d7781E3c44966769484daBCdc435EFD281c34",
12+
"0xaB5074445E5ae3C650553d5a7560B3A7121635B9",
13+
"0x9f4b0fB3A95072bD133082e9683A3536669EFE07"
14+
],
15+
"transaction": {
16+
"from": "0xdc3bda6d40f0e33e0dfa4aef9604b66195e6c5dc",
17+
"to": "0x528538ab97aa4f7d3397b3ca0a4a6f5d9cf52f97",
18+
"gas": "0xb87b",
19+
"value": "0x0",
20+
"input": "0x40070f2d00000000000000000000000066fdb4e72d2f4a7e2081bf83f1ffacc9bbcb384b0000000000000000000000005b2d7781e3c44966769484dabcdc435efd281c34000000000000000000000000ab5074445e5ae3c650553d5a7560b3a7121635b90000000000000000000000009f4b0fb3a95072bd133082e9683a3536669efe07",
21+
"nonce": "0x10",
22+
"chainId": "0x4268"
23+
},
24+
"additionalContracts": [],
25+
"isFixedGasLimit": false
26+
}
27+
],
28+
"receipts": [
29+
{
30+
"status": "0x1",
31+
"cumulativeGasUsed": "0x286c78",
32+
"logs": [],
33+
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
34+
"type": "0x2",
35+
"transactionHash": "0xf8dad7ed1df383b23241f479f1a2a09b0a99cbf242a984ca1345b65be38a5037",
36+
"transactionIndex": "0x13",
37+
"blockHash": "0xc3e11d60b12c88caa2a5070f3644768927443479537cf580bc3e6c6c77efb38b",
38+
"blockNumber": "0x24b699",
39+
"gasUsed": "0x8590",
40+
"effectiveGasPrice": "0x5f5e109",
41+
"from": "0xdc3bda6d40f0e33e0dfa4aef9604b66195e6c5dc",
42+
"to": "0x528538ab97aa4f7d3397b3ca0a4a6f5d9cf52f97",
43+
"contractAddress": null
44+
}
45+
],
46+
"libraries": [],
47+
"pending": [],
48+
"returns": {},
49+
"timestamp": 1727269520,
50+
"chain": 17000,
51+
"commit": "fbc73d7"
52+
}

0 commit comments

Comments
 (0)