Skip to content

Commit c1fe24b

Browse files
committed
Merge remote-tracking branch 'origin/main' into feature/aiken-multisig
2 parents 6c54ecc + de3e317 commit c1fe24b

File tree

54 files changed

+6609
-4431
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+6609
-4431
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Daily Balance Snapshots
2+
3+
# This workflow takes daily snapshots of wallet balances and stores them in the database.
4+
# API requests require SNAPSHOT_AUTH_TOKEN secret to be set in GitHub repository settings.
5+
6+
on:
7+
schedule:
8+
# Run at midnight UTC every day
9+
- cron: '0 0 * * *'
10+
# Allow manual triggering for testing
11+
workflow_dispatch:
12+
13+
jobs:
14+
snapshot-balances:
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 300 # 5 hours timeout (GitHub Actions max is 6 hours)
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: '18'
26+
cache: 'npm'
27+
28+
29+
- name: Install script dependencies
30+
run: |
31+
cd scripts
32+
npm install
33+
34+
- name: Run batch snapshot orchestration
35+
run: |
36+
cd scripts
37+
npm start
38+
env:
39+
API_BASE_URL: "https://multisig.meshjs.dev"
40+
SNAPSHOT_AUTH_TOKEN: ${{ secrets.SNAPSHOT_AUTH_TOKEN }}
41+
BATCH_SIZE: 5
42+
DELAY_BETWEEN_BATCHES: 10
43+
MAX_RETRIES: 3
44+
REQUEST_TIMEOUT: 45
45+
ENABLE_WARM_UP: true
46+
47+
- name: Notify on failure
48+
if: failure()
49+
# Send failure notification
50+
run: |
51+
echo "❌ Daily balance snapshot job failed"
52+
if [ -n "${{ secrets.SNAPSHOT_ERROR_DISCORD_WEBHOOK_URL }}" ]; then
53+
curl -X POST -H 'Content-type: application/json' \
54+
--data "{\"content\":\"❌ Daily balance snapshots failed. Check the GitHub Actions logs.\"}" \
55+
${{ secrets.SNAPSHOT_ERROR_DISCORD_WEBHOOK_URL }} || echo "Failed to send Discord notification"
56+
else
57+
echo "SNAPSHOT_ERROR_DISCORD_WEBHOOK_URL not configured, skipping notification"
58+
fi

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
A comprehensive, enterprise-grade multi-signature wallet solution built on Cardano, designed for teams, DAOs, and organizations to securely manage treasury funds and participate in governance.
44

5+
56
[![Next.js](https://img.shields.io/badge/Next.js-14.2.4-black)](https://nextjs.org/)
67
[![TypeScript](https://img.shields.io/badge/TypeScript-5.5.3-blue)](https://www.typescriptlang.org/)
78
[![Prisma](https://img.shields.io/badge/Prisma-6.4.1-2D3748)](https://www.prisma.io/)

0 commit comments

Comments
 (0)