feat: bridges, PMM, flash workflow, token-aggregation, and deployment docs

- CCIP/trustless bridge contracts, GRU tokens, DEX/PMM tests, reserve vault.
- Token-aggregation service routes, planner, chain config, relay env templates.
- Config snapshots and multi-chain deployment markdown updates.
- gitignore services/btc-intake/dist/ (tsc output); do not track dist.

Run forge build && forge test before deploy (large solc graph).

Made-with: Cursor
This commit is contained in:
defiQUG
2026-04-07 23:40:52 -07:00
parent 0fb7bba07b
commit 76aa419320
289 changed files with 28367 additions and 824 deletions

View File

@@ -6,8 +6,40 @@ import { describe, it, expect, beforeAll } from '@jest/globals';
import { GraphQLClient } from 'graphql-request';
const GRAPHQL_URL = process.env.GRAPHQL_URL || 'http://localhost:4000/graphql';
const runIntegration = process.env.RUN_EMONEY_GRAPHQL_INTEGRATION === '1';
const describeIfConfigured = runIntegration ? describe : describe.skip;
describe('GraphQL API Integration Tests', () => {
type TokenQueryResult = {
token: {
code: string;
address: string;
name: string;
symbol: string;
policy: {
lienMode: string;
};
};
};
type TriggersQueryResult = {
triggers: {
items: Array<{
triggerId: string;
rail: string;
state: string;
}>;
total: number;
};
};
type DeployTokenMutationResult = {
deployToken: {
code: string;
address: string;
};
};
describeIfConfigured('GraphQL API Integration Tests', () => {
let client: GraphQLClient;
beforeAll(() => {
@@ -34,7 +66,7 @@ describe('GraphQL API Integration Tests', () => {
}
`;
const data = await client.request(query, { code: 'USDW' });
const data = await client.request<TokenQueryResult>(query, { code: 'USDW' });
expect(data).toHaveProperty('token');
expect(data.token).toHaveProperty('code');
});
@@ -53,7 +85,7 @@ describe('GraphQL API Integration Tests', () => {
}
`;
const data = await client.request(query, {
const data = await client.request<TriggersQueryResult>(query, {
filter: { state: 'PENDING' },
paging: { limit: 10, offset: 0 },
});
@@ -74,7 +106,7 @@ describe('GraphQL API Integration Tests', () => {
}
`;
const data = await client.request(mutation, {
const data = await client.request<DeployTokenMutationResult>(mutation, {
input: {
name: 'Test Token',
symbol: 'TEST',
@@ -88,4 +120,3 @@ describe('GraphQL API Integration Tests', () => {
});
});
});

View File

@@ -7,13 +7,14 @@ import axios from 'axios';
const BASE_URL = process.env.API_URL || 'http://localhost:3000';
const API_KEY = process.env.API_KEY || 'test-key';
const runIntegration = process.env.RUN_EMONEY_API_INTEGRATION === '1';
const describeIfConfigured = runIntegration ? describe : describe.skip;
describe('REST API Integration Tests', () => {
describeIfConfigured('REST API Integration Tests', () => {
let accessToken: string;
beforeAll(async () => {
// TODO: Get OAuth2 token
// accessToken = await getAccessToken();
accessToken = process.env.ACCESS_TOKEN || 'test-token';
});
describe('Token Operations', () => {
@@ -102,4 +103,3 @@ describe('REST API Integration Tests', () => {
});
});
});