Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 13 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# SPDX-FileCopyrightText: © 2025 Phala Network <[email protected]>
#
# SPDX-License-Identifier: Apache-2.0

[submodule "kms/auth-eth/lib/forge-std"]
path = kms/auth-eth/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "kms/auth-eth/lib/openzeppelin-contracts-upgradeable"]
path = kms/auth-eth/lib/openzeppelin-contracts-upgradeable
url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable
[submodule "kms/auth-eth/lib/openzeppelin-foundry-upgrades"]
path = kms/auth-eth/lib/openzeppelin-foundry-upgrades
url = https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades
21 changes: 21 additions & 0 deletions kms/auth-eth/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# SPDX-FileCopyrightText: © 2025 Phala Network <[email protected]>
#
# SPDX-License-Identifier: Apache-2.0

# Example environment configuration for local testing

# Server configuration
PORT=8000
HOST=127.0.0.1

# Ethereum configuration
ETH_RPC_URL=http://127.0.0.1:8545
KMS_CONTRACT_ADDR=0x0000000000000000000000000000000000000000

# For testing with local Anvil node (Foundry):
# ETH_RPC_URL=http://127.0.0.1:8545
# KMS_CONTRACT_ADDR=<deployed_contract_address>

# For testing with testnet:
# ETH_RPC_URL=https://rpc.sepolia.org
# KMS_CONTRACT_ADDR=<your_deployed_contract_address>
44 changes: 44 additions & 0 deletions kms/auth-eth/.github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# SPDX-FileCopyrightText: © 2025 Phala Network <[email protected]>
#
# SPDX-License-Identifier: Apache-2.0

name: CI

on:
push:
pull_request:
workflow_dispatch:

env:
FOUNDRY_PROFILE: ci

jobs:
check:
name: Foundry project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Show Forge version
run: |
forge --version

- name: Run Forge fmt
run: |
forge fmt --check
id: fmt

- name: Run Forge build
run: |
forge build --sizes
id: build

- name: Run Forge tests
run: |
forge test -vvv
id: test
9 changes: 8 additions & 1 deletion kms/auth-eth/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
/artifacts
/cache
/dist
/out
/out

# Test logs
anvil-test.log
anvil.log
deploy.log
server-test.log
.env.test
Loading