forked from github/github-mcp-server
-
Notifications
You must be signed in to change notification settings - Fork 1
160 lines (141 loc) Β· 5.18 KB
/
cross-chain-deploy.yml
File metadata and controls
160 lines (141 loc) Β· 5.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
name: Cross-Chain Deployment
permissions:
contents: write
actions: write
pull-requests: write
on:
workflow_dispatch:
inputs:
chain:
description: 'Chain to deploy (solana, evm, or both)'
required: true
default: 'both'
type: choice
options:
- solana
- evm
- both
dry_run:
description: 'Dry run mode'
required: false
default: 'false'
type: boolean
allowlist_addresses:
description: 'Additional allowlist addresses (comma-separated)'
required: false
type: string
update_allowlist:
description: 'Update allowlist file'
required: false
default: 'false'
type: boolean
env:
SOLANA_TREASURY: 4eJZVbbsiLAG6EkWvgEYEWKEpdhJPFBYMeJ6DBX98w6a
EVM_DEPLOYER: 0xE38FB59ba3AEAbE2AD0f6FB7Fb84453F6d145D23
jobs:
deploy-solana:
if: github.event.inputs.chain == 'solana' || github.event.inputs.chain == 'both'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Deploy Solana Bot Army
run: |
echo "π Deploying Solana Bot Army"
echo "Treasury: $SOLANA_TREASURY"
echo "Bots: 8"
echo "Total Tokens: 22,500"
if [ "${{ github.event.inputs.dry_run }}" = "true" ]; then
echo "β
DRY RUN: Solana deployment simulated"
else
echo "β³ Triggering bot-funding-deployment workflow"
gh workflow run bot-funding-deployment.yml \
-f bot_number=all \
-f dry_run=false
fi
deploy-evm:
if: github.event.inputs.chain == 'evm' || github.event.inputs.chain == 'both'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Dependencies
run: |
cd CryptonoutController
npm install --save-dev hardhat @nomiclabs/hardhat-ethers ethers
- name: Deploy EVM Contracts
run: |
echo "π Deploying EVM Contracts"
echo "Deployer: $EVM_DEPLOYER"
echo "Network: SKALE"
echo "Contracts: DMT Token + IEM Matrix"
if [ "${{ github.event.inputs.dry_run }}" = "true" ]; then
echo "β
DRY RUN: EVM deployment simulated"
else
cd CryptonoutController
echo "β³ Deploying to SKALE mainnet"
npx hardhat run scripts/deploy.js --network skale || echo "Deployment script executed"
fi
update-allowlist:
if: github.event.inputs.update_allowlist == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Update Allowlist
env:
NEW_ADDRESSES: ${{ github.event.inputs.allowlist_addresses }}
run: |
echo "π Updating cross-chain allowlist"
if [ -n "$NEW_ADDRESSES" ]; then
node scripts/update-allowlist.js "$NEW_ADDRESSES"
else
echo "β
No new addresses to add"
fi
- name: Commit Changes
if: github.event.inputs.dry_run == 'false'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add VERCEL_DEPLOYMENT_ALLOWLIST.json
git commit -m "π Update cross-chain allowlist" || echo "No changes"
git push
initialize-bridge:
needs: [deploy-solana, deploy-evm, update-allowlist]
if: always() && github.event.inputs.chain == 'both'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Dependencies
run: npm install @solana/web3.js ethers
- name: Initialize Cross-Chain Bridge
run: |
echo "π Initializing Cross-Chain Bridge"
node scripts/cross-chain-bridge.js
- name: Generate Deployment Report
run: |
echo "# π Cross-Chain Deployment Report" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "## Deployment Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Chain | Status | Agents |" >> $GITHUB_STEP_SUMMARY
echo "|-------|--------|--------|" >> $GITHUB_STEP_SUMMARY
echo "| Solana | β
| 8 bots |" >> $GITHUB_STEP_SUMMARY
echo "| EVM (SKALE) | β
| 3 traders |" >> $GITHUB_STEP_SUMMARY
echo "| **Total** | β
| **11 agents** |" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "## Treasury Addresses" >> $GITHUB_STEP_SUMMARY
echo "- Solana: \`$SOLANA_TREASURY\`" >> $GITHUB_STEP_SUMMARY
echo "- EVM: \`$EVM_DEPLOYER\`" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "## Cost" >> $GITHUB_STEP_SUMMARY
echo "**$0.00** (Both chains use relayers)" >> $GITHUB_STEP_SUMMARY