这是indexloc提供的服务,不要输入任何密码
Skip to content

sync / Gateway staging -> master for Hummingbot version 2.7.0 #485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 53 commits into from
Jul 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
eef2ede
bump version tyo 2.7
rapcmia Jun 10, 2025
cdc0bc2
Merge pull request #461 from hummingbot/update-development-2.7.0
rapcmia Jun 10, 2025
d8291f8
fix: correct ConfigTemplatesDir path for Docker container initialization
fengtality Jun 23, 2025
5a658f0
fix: fix Uniswap AMM remove-liquidity error handling and improve erro…
fengtality Jun 24, 2025
d85592d
fix: remove unnecessary NFT approval checks from Uniswap V3 operations
fengtality Jun 24, 2025
0c890a9
Merge pull request #465 from hummingbot/core-2.7-fix
rapcmia Jun 27, 2025
064a65d
fix: fix Uniswap router BUY orders and improve gas handling
fengtality Jun 30, 2025
43ac63b
cleanup: remove AlphaRouter workaround and test README
fengtality Jun 30, 2025
f6aef69
cleanup: remove safety checks from execute-swap
fengtality Jun 30, 2025
cedb2cf
Merge branch 'development' into core-2.7-fix
fengtality Jun 30, 2025
adbeffb
Merge pull request #471 from hummingbot/core-2.7-fix
rapcmia Jul 1, 2025
2ec2682
Merge branch 'staging' into development
nikspz Jul 1, 2025
3879fb3
Stop the startup spam from loading a full Solana instance for an exam…
WuonParticle Jun 24, 2025
eef8c5a
Stop the startup spam from loading multiple Ethereum instances to get…
WuonParticle Jun 24, 2025
f3c58aa
refactor: run linter and apply fixes
WuonParticle Jun 16, 2025
5db8200
fix: reference bigint-buffer to avoid warning
WuonParticle Jun 11, 2025
e3e182e
add auto linting
WuonParticle Jun 17, 2025
1e1d4e5
fix: correct Jupiter quote-swap estimateAmountIn for BUY orders
fengtality Jul 1, 2025
0bf0557
Add support for #src paths in src, test, and test-scripts .ts files.
WuonParticle Jun 18, 2025
c504b65
lock file changes for import paths
WuonParticle Jul 1, 2025
c2f1706
Merge branch 'development' into core-2.7-fix
fengtality Jul 1, 2025
508403f
Merge branch 'core-2.7-fix' of github.com:hummingbot/gateway into Wuo…
fengtality Jul 1, 2025
052ac11
Save current changes before updating PR
fengtality Jul 1, 2025
5479551
Merge pull request #478 from hummingbot/WuonParticle-feat/startup_noise
fengtality Jul 1, 2025
987daa5
Merge branch 'development' into feat/lint
fengtality Jul 1, 2025
489cdb9
Merge pull request #475 from WuonParticle/feat/lint
fengtality Jul 1, 2025
ebc487a
Merge branch 'development' into feat/import_aliases
fengtality Jul 1, 2025
ad86d4e
Merge pull request #474 from WuonParticle/feat/import_aliases
fengtality Jul 1, 2025
6bf9f24
Merge branch 'development' into core-2.7-fix
fengtality Jul 1, 2025
37c4dac
Merge pull request #477 from hummingbot/core-2.7-fix
nikspz Jul 2, 2025
ca08722
Tweak address example handling for Ethereum and Solana classes
WuonParticle Jul 2, 2025
794e389
make walletAddressExample usage consistent and remove dynamic schema …
WuonParticle Jul 2, 2025
1c8bb77
Add base src dir support, Optimize transform pattern, reference speci…
WuonParticle Jun 18, 2025
fff10f2
add node version requirement to make sure imports works correctly.
WuonParticle Jul 1, 2025
6818a9c
fix unescaped from LLM suggestion.
WuonParticle Jul 2, 2025
23397ae
Add base aliases so import '#src' works without a trailing slash
WuonParticle Jul 2, 2025
deb9f0c
Store the .tsbuildinfo outside the project root
WuonParticle Jul 2, 2025
cb42830
add dist and coverage to exclude.
WuonParticle Jul 2, 2025
427532e
fix the #src and #test pathing using tsc-alias
WuonParticle Jul 2, 2025
ba99380
add dist dir to clean script
WuonParticle Jul 2, 2025
2d9b4bb
add json files to auto lint.
WuonParticle Jul 2, 2025
7801f04
fix deprecated lines in husky pre-commit file
WuonParticle Jul 2, 2025
9a31cb4
Merge pull request #479 from WuonParticle/feat/startup_noise
fengtality Jul 2, 2025
5265d86
Merge branch 'development' into feat/import_aliases_development
fengtality Jul 2, 2025
1f59224
Merge pull request #480 from WuonParticle/feat/import_aliases_develop…
fengtality Jul 2, 2025
2588d06
Merge branch 'development' into feat/lint
fengtality Jul 2, 2025
3dae0b3
Merge pull request #481 from WuonParticle/feat/lint
fengtality Jul 2, 2025
5681a37
docs: update documentation with current API endpoints and architecture
fengtality Jul 2, 2025
1e411c4
refactor: create generic AI agent instructions file with symlinks
fengtality Jul 2, 2025
7f63d82
Merge pull request #482 from hummingbot/feat/update-documentation
fengtality Jul 2, 2025
82d824e
Merge pull request #472 from hummingbot/development
rapcmia Jul 3, 2025
45878dd
update ver to 2.7.0
rapcmia Jul 3, 2025
3eda5d2
Merge pull request #483 from hummingbot/update-staging-2.7.0
rapcmia Jul 3, 2025
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
9 changes: 4 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,10 @@ module.exports = {
'import/no-duplicates': 'warn'
},
settings: {
'import/resolver': {
'node': {
'extensions': ['.js', '.jsx', '.ts', '.tsx']
}
}
'import/resolver': [
['typescript', { alwaysTryTypes: true, project: './tsconfig.json' }],
['node', { extensions: ['.js', '.jsx', '.ts', '.tsx'] }],
],
},
overrides: [
{
Expand Down
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm lint-staged
112 changes: 112 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# AI Agent Instructions

This file provides guidance to AI coding assistants when working with code in this repository.

## Build & Command Reference
- Build: `pnpm build`
- Start server: `pnpm start --passphrase=<PASSPHRASE>`
- Start in dev mode: `pnpm start --passphrase=<PASSPHRASE> --dev` (HTTP mode, no SSL)
- Run all tests: `pnpm test`
- Run specific test file: `GATEWAY_TEST_MODE=dev jest --runInBand path/to/file.test.ts`
- Run tests with coverage: `pnpm test:cov`
- Lint code: `pnpm lint`
- Format code: `pnpm format`
- Type check: `pnpm typecheck`
- Initial setup: `pnpm setup` (creates configs and copies certificates)
- Clean install: `pnpm clean` (removes node_modules, coverage, logs, dist)

## Architecture Overview

### Gateway Pattern
- RESTful API gateway providing standardized endpoints for blockchain and DEX interactions
- Built with Fastify framework using TypeBox for schema validation
- Supports both HTTP (dev mode) and HTTPS (production) protocols
- Swagger documentation auto-generated at `/docs` (http://localhost:15888/docs in dev mode)

### Module Organization
- **Chains**: Blockchain implementations (Ethereum, Solana)
- Each chain implements standard methods: balances, tokens, status, allowances
- Singleton pattern with network-specific instances via `getInstance()`

- **Connectors**: DEX protocol implementations (Jupiter, Meteora, Raydium, Uniswap)
- Support for AMM (V2-style), CLMM (V3-style), and simple swap operations
- Each connector organized into operation-specific route files
- Standardized request/response schemas across all connectors

### API Route Structure
- Chain routes: `/chains/{chain}/{operation}`
- Connector routes: `/connectors/{dex}/{type}/{operation}`
- Config routes: `/config/*`
- Wallet routes: `/wallet/*`

## Coding Style Guidelines
- TypeScript with ESNext target and CommonJS modules
- 2-space indentation (no tabs)
- Single quotes for strings
- Semicolons required
- Arrow functions preferred over function declarations
- Explicit typing encouraged (TypeBox for API schemas)
- Unused variables prefixed with underscore (_variable)
- Error handling: Use Fastify's httpErrors for API errors

## Project Structure
- `src/`: Source code
- `chains/`: Chain-specific implementations (ethereum, solana)
- `connectors/`: DEX and protocol connectors (jupiter, meteora, raydium, uniswap)
- `services/`: Core services and utilities
- `schemas/`: API schemas, interfaces and type definitions
- `json/`: JSON schema files
- `trading-types/`: Shared trading types (AMM, CLMM, swap)
- `config/`: Configuration-related routes and utils
- `wallet/`: Wallet management routes
- `test/`: Test files mirroring src structure
- `mocks/`: Mock data organized by module type
- `conf/`: Runtime configuration (created by setup)
- `lists/`: Token lists for each network

## Best Practices
- Create tests for all new functionality (minimum 75% coverage for PRs)
- Use the logger for debug/errors (not console.log)
- Use Fastify's httpErrors for API error responses:
- `fastify.httpErrors.badRequest('Invalid input')`
- `fastify.httpErrors.notFound('Resource not found')`
- `fastify.httpErrors.internalServerError('Something went wrong')`
- Create route files in dedicated routes/ folders
- Define schemas using TypeBox
- Prefer async/await over promise chains
- Follow singleton pattern for chains/connectors

## Adding New Features
- Follow existing patterns in chains/connectors directories
- Create corresponding test files with mock data
- Use TypeBox for all request/response schema definitions
- Register new routes in appropriate route files
- Update chain.routes.ts or connector.routes.ts to list new modules

## Configuration
- Chain configs: `src/templates/{chain}.yml`
- Connector configs: `src/templates/{connector}.yml`
- Token lists: `src/templates/lists/{network}.json`
- All configs validated against JSON schemas in `src/templates/json/`

## Supported Networks
### Ethereum Networks
- Mainnet, Sepolia, Arbitrum, Avalanche, Base, BSC, Celo, Optimism, Polygon, World Chain

### Solana Networks
- Mainnet, Devnet

## Supported DEX Connectors
- **Jupiter** (Solana): Token swaps via aggregator
- **Meteora** (Solana): CLMM operations
- **Raydium** (Solana): AMM and CLMM operations
- **Uniswap** (Ethereum/EVM): V2 AMM, V3 CLMM, and Universal Router swaps

## Environment Variables
- `GATEWAY_PASSPHRASE`: Set passphrase for wallet encryption
- `GATEWAY_TEST_MODE=dev`: Run tests in development mode
- `START_SERVER=true`: Required to start the server
- `DEV=true`: Run in HTTP mode (Docker)

## Hummingbot Gateway Endpoint Standardization
- This repo standardized DEX and chain endpoints that are used by Hummingbot strategies. See this branch for the matching code, especially the Gateway connector classes https://github.com/hummingbot/hummingbot/tree/development
92 changes: 0 additions & 92 deletions CLAUDE.md

This file was deleted.

1 change: 1 addition & 0 deletions CLAUDE.md
1 change: 1 addition & 0 deletions GEMINI.md
Loading