Skip to content

Commit 7f3f55b

Browse files
committed
feat: add upgradeable contracts and testnet deployment
- Remove ipfs from CI/CD (not needed, storage has pinning-api) - Add Create2Factory for deterministic addresses - Add L1StakeManagerUpgradeable with UUPS proxy - Add deploy-testnet-full.ts for multi-chain deployment - Configure XLP registration and liquidity deposit
1 parent aa38ff8 commit 7f3f55b

File tree

252 files changed

+28977
-33801
lines changed

Some content is hidden

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

252 files changed

+28977
-33801
lines changed

.github/workflows/deploy-mainnet.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
needs: validate-prerequisites
9292
strategy:
9393
matrix:
94-
app: [bazaar, gateway, leaderboard, ipfs, documentation, indexer, compute, intents, monitoring, storage]
94+
app: [bazaar, gateway, leaderboard, documentation, indexer, compute, monitoring, storage]
9595
steps:
9696
- uses: actions/checkout@v4
9797

.github/workflows/deploy-testnet.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
needs: validate
3838
strategy:
3939
matrix:
40-
app: [bazaar, gateway, leaderboard, ipfs, documentation, indexer, compute, intents, monitoring, storage]
40+
app: [bazaar, gateway, leaderboard, documentation, indexer, compute, monitoring, storage]
4141
steps:
4242
- uses: actions/checkout@v4
4343

.gitmodules

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,29 @@
2828
[submodule "packages/contracts/lib/optimism"]
2929
path = packages/contracts/lib/optimism
3030
url = https://github.com/ethereum-optimism/optimism
31+
32+
# Vendor apps (private - will skip for users without access)
33+
[submodule "vendor/hyperscape"]
34+
path = vendor/hyperscape
35+
url = git@github.com:elizaos/hyperscape.git
36+
ignore = untracked
37+
38+
[submodule "vendor/babylon"]
39+
path = vendor/babylon
40+
url = git@github.com:elizaos/babylon.git
41+
ignore = untracked
42+
43+
[submodule "vendor/cloud"]
44+
path = vendor/cloud
45+
url = git@github.com:elizaos/cloud.git
46+
ignore = untracked
47+
48+
[submodule "vendor/otc-agent"]
49+
path = vendor/otc-agent
50+
url = git@github.com:elizaos/otc-agent.git
51+
ignore = untracked
52+
53+
[submodule "vendor/launchpad"]
54+
path = vendor/launchpad
55+
url = git@github.com:elizaos/launchpad.git
56+
ignore = untracked

README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ bun install
1616
bun run dev
1717
```
1818

19-
No configuration needed.
19+
No configuration needed. Private vendor apps (hyperscape, babylon, cloud, etc.) are automatically cloned if you have access.
2020

2121
## What Starts
2222

@@ -113,10 +113,9 @@ Cross-chain intent system with ERC-7683 compatible contracts.
113113
### Quick Start
114114

115115
```bash
116-
# Start intent services
117-
cd apps/intents/aggregator && bun run src/index.ts # Port 4010
118-
cd apps/intents/solver && bun run src/index.ts # Port 4011
119-
cd apps/intents/viewer && bun run dev # Port 5173
116+
# Intent functionality is now part of Gateway
117+
cd apps/gateway && bun run dev # UI + A2A Server (ports 4001, 4003)
118+
cd apps/gateway && bun run dev:solver # Standalone solver agent
120119
```
121120

122121
### Deploy OIF Contracts
@@ -139,12 +138,11 @@ PRIVATE_KEY=$DEPLOYER_PRIVATE_KEY forge script script/DeployOIF.s.sol \
139138

140139
| Service | Port | Purpose |
141140
|---------|------|---------|
142-
| Aggregator | 4010 | REST API, A2A, MCP |
141+
| Gateway A2A | 4003 | REST API, A2A, MCP |
143142
| WebSocket | 4012 | Real-time updates |
144-
| Solver | 4011 | Intent fulfillment |
145-
| Viewer | 5173 | Web UI |
143+
| Gateway UI | 4001 | Web UI |
146144

147-
See `apps/intents/README.md` for full documentation.
145+
See `apps/gateway/README.md` for full documentation.
148146

149147
## Ethereum Interop Layer (EIL)
150148

apps/bazaar/app/api/a2a/route.ts

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ import {
66
PAYMENT_TIERS,
77
type PaymentRequirements
88
} from '@/lib/x402';
9+
import {
10+
checkBanStatus,
11+
getModeratorStats,
12+
getModerationCases,
13+
getModerationCase,
14+
getModerationStats,
15+
prepareStakeTransaction,
16+
prepareReportTransaction,
17+
prepareVoteTransaction,
18+
prepareChallengeTransaction,
19+
} from '@/lib/moderation-api';
920
import { Address } from 'viem';
1021

1122
const CORS_HEADERS = {
@@ -449,6 +460,143 @@ async function executeSkill(
449460
};
450461
}
451462

463+
// ============ MODERATION MARKETPLACE SKILLS ============
464+
465+
case 'check-ban-status': {
466+
const address = params.address as string;
467+
if (!address) throw new Error('Address required');
468+
469+
const status = await checkBanStatus(address);
470+
return {
471+
message: status.isBanned
472+
? `Address ${address.slice(0, 10)}... is ${status.isOnNotice ? 'on notice' : 'banned'}`
473+
: `Address ${address.slice(0, 10)}... is not banned`,
474+
data: { address, ...status },
475+
};
476+
}
477+
478+
case 'get-moderator-stats': {
479+
const address = params.address as string;
480+
if (!address) throw new Error('Address required');
481+
482+
const stats = await getModeratorStats(address);
483+
if (!stats) {
484+
return {
485+
message: `No moderator data for ${address.slice(0, 10)}...`,
486+
data: { address, isStaked: false },
487+
};
488+
}
489+
return {
490+
message: `${stats.tier} tier moderator with ${stats.winRate}% win rate`,
491+
data: stats,
492+
};
493+
}
494+
495+
case 'get-moderation-cases': {
496+
const cases = await getModerationCases({
497+
activeOnly: params.activeOnly as boolean,
498+
resolvedOnly: params.resolvedOnly as boolean,
499+
limit: params.limit as number || 20,
500+
});
501+
return {
502+
message: `Found ${cases.length} moderation cases`,
503+
data: { cases, count: cases.length },
504+
};
505+
}
506+
507+
case 'get-moderation-case': {
508+
const caseId = params.caseId as string;
509+
if (!caseId) throw new Error('Case ID required');
510+
511+
const caseData = await getModerationCase(caseId);
512+
if (!caseData) throw new Error('Case not found');
513+
514+
return {
515+
message: `Case ${caseData.status}: ${caseData.target.slice(0, 10)}... reported for ${caseData.reason.slice(0, 50)}`,
516+
data: caseData,
517+
};
518+
}
519+
520+
case 'get-moderation-stats': {
521+
const stats = await getModerationStats();
522+
return {
523+
message: `${stats.totalCases} total cases, ${stats.totalStaked} ETH staked`,
524+
data: stats,
525+
};
526+
}
527+
528+
case 'prepare-stake': {
529+
const amount = params.amount as string;
530+
if (!amount) throw new Error('Amount required');
531+
532+
const tx = prepareStakeTransaction(amount);
533+
return {
534+
message: `Prepared transaction to stake ${amount} ETH`,
535+
data: {
536+
action: 'sign-and-send',
537+
transaction: tx,
538+
note: 'Wait 24h after staking before voting power activates',
539+
},
540+
};
541+
}
542+
543+
case 'prepare-report': {
544+
const target = params.target as string;
545+
const reason = params.reason as string;
546+
const evidenceHash = params.evidenceHash as string;
547+
548+
if (!target || !reason || !evidenceHash) {
549+
throw new Error('target, reason, and evidenceHash required');
550+
}
551+
552+
const tx = prepareReportTransaction(target, reason, evidenceHash);
553+
return {
554+
message: `Prepared report against ${target.slice(0, 10)}...`,
555+
data: {
556+
action: 'sign-and-send',
557+
transaction: tx,
558+
warning: 'Your stake is at risk if the community votes to clear',
559+
},
560+
};
561+
}
562+
563+
case 'prepare-vote': {
564+
const caseId = params.caseId as string;
565+
const voteYes = params.voteYes as boolean;
566+
567+
if (!caseId || voteYes === undefined) {
568+
throw new Error('caseId and voteYes required');
569+
}
570+
571+
const tx = prepareVoteTransaction(caseId, voteYes);
572+
return {
573+
message: `Prepared vote ${voteYes ? 'BAN' : 'CLEAR'} for case ${caseId.slice(0, 10)}...`,
574+
data: {
575+
action: 'sign-and-send',
576+
transaction: tx,
577+
},
578+
};
579+
}
580+
581+
case 'prepare-challenge': {
582+
const caseId = params.caseId as string;
583+
const stakeAmount = params.stakeAmount as string;
584+
585+
if (!caseId || !stakeAmount) {
586+
throw new Error('caseId and stakeAmount required');
587+
}
588+
589+
const tx = prepareChallengeTransaction(caseId, stakeAmount);
590+
return {
591+
message: `Prepared challenge for case ${caseId.slice(0, 10)}...`,
592+
data: {
593+
action: 'sign-and-send',
594+
transaction: tx,
595+
warning: 'Challenge stake at risk if ban upheld',
596+
},
597+
};
598+
}
599+
452600
default:
453601
throw new Error('Unknown skill');
454602
}

0 commit comments

Comments
 (0)