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
6 changes: 0 additions & 6 deletions .github/dependabot.yml

This file was deleted.

81 changes: 81 additions & 0 deletions .github/scripts/tempo-check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
#!/bin/bash
set -euo pipefail

echo -e "\n=== INIT TEMPO PROJECT ==="
tmp_dir=$(mktemp -d)
cd "$tmp_dir"
forge init -n tempo tempo-check
cd tempo-check

echo -e "\n=== FORGE TEST (LOCAL) ==="
forge test

echo -e "\n=== FORGE SCRIPT (LOCAL) ==="
forge script script/Mail.s.sol

echo -e "\n=== START TEMPO FORK TESTS ==="

echo -e "\n=== TEMPO VERSION ==="
cast client --rpc-url $TEMPO_RPC_URL

echo -e "\n=== FORGE TEST (FORK) ==="
forge test --rpc-url $TEMPO_RPC_URL

echo -e "\n=== FORGE SCRIPT (FORK) ==="
forge script script/Mail.s.sol --rpc-url $TEMPO_RPC_URL

echo -e "\n=== CREATE AND FUND ADDRESS ==="
read ADDR PK < <(cast wallet new --json | jq -r '.[0] | "\(.address) \(.private_key)"')

for i in {1..100}; do
OUT=$(cast rpc tempo_fundAddress "$ADDR" --rpc-url "$TEMPO_RPC_URL" 2>&1 || true)

if echo "$OUT" | jq -e 'arrays' >/dev/null 2>&1; then
echo "$OUT" | jq
break
fi

echo "[$i] $OUT"
sleep 0.2
done

printf "\naddress: %s\nprivate_key: %s\n" "$ADDR" "$PK"

echo -e "\n=== WAIT FOR BLOCKS TO MINE ==="
sleep 5

# If `VERIFIER_URL` is set, add the `--verify` flag to forge commands.
VERIFY_ARGS=()
if [[ -n "${VERIFIER_URL:-}" ]]; then
VERIFY_ARGS+=(--verify --retries 10 --delay 10)
fi

echo -e "\n=== FORGE SCRIPT DEPLOY ==="
forge script script/Mail.s.sol --private-key $PK --rpc-url $TEMPO_RPC_URL --broadcast ${VERIFY_ARGS[@]+"${VERIFY_ARGS[@]}"}

echo -e "\n=== FORGE SCRIPT DEPLOY WITH FEE TOKEN ==="
forge script --fee-token 2 script/Mail.s.sol --private-key $PK --rpc-url $TEMPO_RPC_URL --broadcast ${VERIFY_ARGS[@]+"${VERIFY_ARGS[@]}"}
forge script --fee-token 3 script/Mail.s.sol --private-key $PK --rpc-url $TEMPO_RPC_URL --broadcast ${VERIFY_ARGS[@]+"${VERIFY_ARGS[@]}"}

echo -e "\n=== FORGE CREATE DEPLOY ==="
forge create src/Mail.sol:Mail --private-key $PK --rpc-url $TEMPO_RPC_URL --broadcast ${VERIFY_ARGS[@]+"${VERIFY_ARGS[@]}"} --constructor-args 0x20c0000000000000000000000000000000000000

echo -e "\n=== FORGE CREATE DEPLOY WITH FEE TOKEN ==="
forge create --fee-token 2 src/Mail.sol:Mail --private-key $PK --rpc-url $TEMPO_RPC_URL --broadcast ${VERIFY_ARGS[@]+"${VERIFY_ARGS[@]}"} --constructor-args 0x20c0000000000000000000000000000000000000
forge create --fee-token 3 src/Mail.sol:Mail --private-key $PK --rpc-url $TEMPO_RPC_URL --broadcast ${VERIFY_ARGS[@]+"${VERIFY_ARGS[@]}"} --constructor-args 0x20c0000000000000000000000000000000000000

echo -e "\n=== CAST ERC20 TRANSFER WITH FEE TOKEN ==="
cast erc20 transfer --fee-token 2 0x20c0000000000000000000000000000000000002 0x4ef5DFf69C1514f4Dbf85aA4F9D95F804F64275F 123456 --rpc-url $TEMPO_RPC_URL --private-key $PK
cast erc20 transfer --fee-token 3 0x20c0000000000000000000000000000000000002 0x4ef5DFf69C1514f4Dbf85aA4F9D95F804F64275F 123456 --rpc-url $TEMPO_RPC_URL --private-key $PK

echo -e "\n=== CAST ERC20 APPROVE WITH FEE TOKEN ==="
cast erc20 approve --fee-token 2 0x20c0000000000000000000000000000000000002 0x4ef5DFf69C1514f4Dbf85aA4F9D95F804F64275F 123456 --rpc-url $TEMPO_RPC_URL --private-key $PK
cast erc20 approve --fee-token 3 0x20c0000000000000000000000000000000000002 0x4ef5DFf69C1514f4Dbf85aA4F9D95F804F64275F 123456 --rpc-url $TEMPO_RPC_URL --private-key $PK

echo -e "\n=== CAST SEND WITH FEE TOKEN ==="
cast send --fee-token 2 --rpc-url $TEMPO_RPC_URL 0x86A2EE8FAf9A840F7a2c64CA3d51209F9A02081D 'increment()' --private-key $PK
cast send --fee-token 3 --rpc-url $TEMPO_RPC_URL 0x86A2EE8FAf9A840F7a2c64CA3d51209F9A02081D 'increment()' --private-key $PK

echo -e "\n=== CAST MKTX WITH FEE TOKEN ==="
cast mktx --fee-token 2 --rpc-url $TEMPO_RPC_URL 0x86A2EE8FAf9A840F7a2c64CA3d51209F9A02081D 'increment()' --private-key $PK
cast mktx --fee-token 3 --rpc-url $TEMPO_RPC_URL 0x86A2EE8FAf9A840F7a2c64CA3d51209F9A02081D 'increment()' --private-key $PK
32 changes: 0 additions & 32 deletions .github/workflows/bump-forge-std.yml

This file was deleted.

73 changes: 73 additions & 0 deletions .github/workflows/ci-tempo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: CI Tempo

permissions: {}

on:
push:
branches: [master]
pull_request:
workflow_dispatch:
inputs:
network:
description: "Tempo network to check"
required: true
type: choice
options:
- testnet
- devnet
- all

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always
RUSTC_WRAPPER: "sccache"

jobs:
sanity-check:
runs-on: depot-ubuntu-latest
timeout-minutes: 60
permissions:
contents: write
steps:
# Checkout the repository
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master
with:
toolchain: stable

- uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
- uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2

# Build and install forge and cast
- name: Build and install Forge and Cast
run: |
cargo install --path ./crates/forge --profile dev --force --locked
cargo install --path ./crates/cast --profile dev --force --locked

- name: Run Tempo check on testnet
if: |
github.event_name == 'pull_request' ||
github.event.inputs.network == 'testnet' ||
github.event.inputs.network == 'all'
env:
TEMPO_RPC_URL: ${{ secrets.TEMPO_TESTNET_RPC_URL }}
VERIFIER_URL: ${{ secrets.VERIFIER_URL }}
run: |
chmod +x ./.github/scripts/tempo-check.sh
./.github/scripts/tempo-check.sh

- name: Run Tempo check on devnet
if: |
github.event_name == 'pull_request' ||
github.event.inputs.network == 'devnet' ||
github.event.inputs.network == 'all'
env:
TEMPO_RPC_URL: ${{ secrets.TEMPO_DEVNET_RPC_URL }}
run: |
chmod +x ./.github/scripts/tempo-check.sh
./.github/scripts/tempo-check.sh
38 changes: 0 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@ jobs:
profile: default
secrets: inherit

docs:
uses: ./.github/workflows/docs.yml
permissions:
contents: read
pages: write
id-token: write
secrets: inherit

doctest:
runs-on: depot-ubuntu-latest
timeout-minutes: 30
Expand Down Expand Up @@ -139,49 +131,19 @@ jobs:
permissions:
contents: read

codeql:
name: analyze (${{ matrix.language }})
runs-on: ubuntu-latest
permissions:
security-events: write
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{matrix.language}}"

ci-success:
runs-on: ubuntu-latest
if: always()
permissions: {}
needs:
- test
- docs
- doctest
- typos
- clippy
- rustfmt
- forge-fmt
- crate-checks
- deny
- codeql
timeout-minutes: 30
steps:
- name: Decide whether the needed jobs succeeded or failed
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/dependencies.yml

This file was deleted.

101 changes: 0 additions & 101 deletions .github/workflows/docker-publish.yml

This file was deleted.

Loading
Loading