Skip to content
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

sync gateway / staging -> main for gateway Hummingbot version 1.24.0 #273

Merged
merged 48 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
c5a41b9
fix: pancakeswap sdk version
0xcodercrane Dec 14, 2023
f360f07
feat: support pancakeswap v3
0xcodercrane Dec 15, 2023
64c8c59
chore: remove console
0xcodercrane Dec 15, 2023
a791d83
fix: speed up
0xcodercrane Dec 19, 2023
bac98fc
fix: build
0xcodercrane Dec 19, 2023
ea8cc3a
fix: execute trade for pancakeswap
0xcodercrane Dec 19, 2023
5d0f25a
fix: use pancakeswap smart router address as default
0xcodercrane Dec 21, 2023
bdcd07a
feat: execute trade works with pancakeswap v3
0xcodercrane Dec 21, 2023
45052d9
fix: allowed pool types
0xcodercrane Dec 27, 2023
154695e
Merge branch 'hummingbot:main' into fix/pancakeswap-v3
0xcodercrane Dec 27, 2023
276f847
fix/ Update version on development to dev-1.24.0
nikspz Dec 28, 2023
37c64e0
Update app.ts
nikspz Dec 28, 2023
d4c0594
Merge pull request #262 from hummingbot/Update-version-on-development…
nikspz Dec 28, 2023
0f1b6de
chore: revert xdc dependencies
0xcodercrane Jan 3, 2024
d9e3f5e
ci(test): testnet to mainnet
0xcodercrane Jan 3, 2024
7b76834
Merge branch 'development' into fix/pancakeswap-v3
rapcmia Jan 3, 2024
d5b1edb
chore: upgrade to mainnet
0xcodercrane Jan 4, 2024
595aae5
ci(test): update for sdk v3
0xcodercrane Jan 5, 2024
f7b0981
Merge pull request #251 from 0xcodercrane/fix/pancakeswap-v3
fengtality Jan 7, 2024
179bb85
(feat) add initial configs
OjusWiZard Nov 23, 2023
82daab0
(feat) add utility functions and dependencies
OjusWiZard Nov 23, 2023
67a30eb
(feat) add QuipuSwap class
OjusWiZard Nov 24, 2023
a85d236
(feat) add quipuswap controller
OjusWiZard Nov 24, 2023
c6cc30b
(feat) add quipuswap in connector routes
OjusWiZard Nov 28, 2023
0b7e4da
(fix) resolve server stuck on initializing issue
OjusWiZard Nov 29, 2023
4b47efa
(fix) resolve initializing sequence of quipuswap
OjusWiZard Nov 29, 2023
cbfdfc5
(fix) resolve inaccurate pricing APIs
OjusWiZard Dec 2, 2023
818b520
fix (tokens): support correct casing
OjusWiZard Dec 7, 2023
7e6b72a
feat (quipuswap): add tests for quipuswap class and controller
OjusWiZard Dec 14, 2023
20ef7e7
fix (axios): revert to version ^0.21.1
OjusWiZard Dec 14, 2023
3681e56
feat: add support for ghostnet
OjusWiZard Dec 19, 2023
d57b773
Revert "fix (axios): revert to version ^0.21.1"
OjusWiZard Dec 19, 2023
b1aba35
fix: use tezos token list
OjusWiZard Jan 8, 2024
3c1a713
fix (yarn.lock): xdc dependencies
OjusWiZard Jan 9, 2024
038d4c4
chore: ankr no longer working
0xcodercrane Jan 9, 2024
10d8a42
Merge pull request #264 from 0xcodercrane/post-fix-pancakeswapv3-inte…
fengtality Jan 10, 2024
725f677
Merge branch 'development' into feat/quipu
fengtality Jan 10, 2024
c7de538
Merge pull request #252 from OjusWiZard/feat/quipu
fengtality Jan 10, 2024
3f9992b
add separate dexalot token list
vic-en Jan 15, 2024
88cd00f
Merge branch 'development' into fix/dexalot
vic-en Jan 16, 2024
b81b9c7
Merge pull request #266 from CoinAlpha/fix/dexalot
rapcmia Jan 17, 2024
d14deef
Merge pull request #269 from hummingbot/development
nikspz Jan 22, 2024
e0dd788
fix/ Update package.json to 1.24.0
nikspz Jan 22, 2024
a2ec0f9
Update app.ts
nikspz Jan 22, 2024
a84b816
Merge pull request #270 from hummingbot/Update-package.json-to-1.24.0
nikspz Jan 22, 2024
706725a
Gas price update
alvaro-mota-funttastic Jan 22, 2024
aa585d5
Merge pull request #272 from Team-Kujira/fix/kujira/gas-price-change
nikspz Jan 26, 2024
f7ed517
Merge pull request #274 from hummingbot/development
nikspz Jan 26, 2024
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
13 changes: 9 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hummingbot-gateway",
"version": "1.23.0",
"version": "1.24.0",
"description": "Middleware that helps Hummingbot clients access standardized DEX API endpoints on different blockchain networks",
"main": "index.js",
"license": "Apache-2.0",
Expand Down Expand Up @@ -32,12 +32,14 @@
"@ethersproject/networks": "5.7.0",
"@ethersproject/providers": "5.7.0",
"@ethersproject/solidity": "5.7.0",
"@injectivelabs/sdk-ts": "^1.10.58",
"@harmony-js/core": "^0.1.57",
"@harmony-js/utils": "^0.1.56",
"@improbable-eng/grpc-web": "^0.13.0",
"@pancakeswap/sdk": "^2.4.5",
"@injectivelabs/sdk-ts": "^1.10.58",
"@pancakeswap/sdk": "^4.0.0",
"@pancakeswap/smart-router": "^4.2.1",
"@pancakeswap/swap-sdk-core": "^1.0.0",
"@pancakeswap/tokens": "^0.1.6",
"@pancakeswap/v3-core": "^1.0.2",
"@pancakeswap/v3-periphery": "^1.0.2",
"@pancakeswap/v3-sdk": "^3.7.0",
Expand Down Expand Up @@ -77,6 +79,7 @@
"express": "^4.17.1",
"express-winston": "^4.1.0",
"fs-extra": "^10.0.0",
"graphql-request": "^6.1.0",
"http-status-codes": "2.2.0",
"immutable": "^4.2.4",
"js-yaml": "^4.1.0",
Expand All @@ -90,15 +93,17 @@
"near-api-js": "1.0.0",
"promise-retry": "^2.0.1",
"quickswap-sdk": "^3.0.8",
"quipuswap-v3-sdk": "^0.0.7",
"swagger-ui-express": "^4.1.6",
"swap-router-sdk": "^1.21.1",
"tslib": "^2.3.1",
"uuid": "^8.3.2",
"vvs-sdk": "^2.4.0",
"web3": "^1.7.3",
"winston": "^3.3.3",
"winston-daily-rotate-file": "^4.5.5",
"xsswap-sdk": "^1.0.1",
"xrpl": "^2.7.0",
"xsswap-sdk": "^1.0.1",
"yarn": "^1.22.17"
},
"devDependencies": {
Expand Down
24 changes: 18 additions & 6 deletions src/amm/amm.controllers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ import {
trade as plentyTrade,
estimateGas as plentyEstimateGas,
} from '../connectors/plenty/plenty.controllers';
import {
price as quipuPrice,
trade as quipuTrade,
estimateGas as quipuEstimateGas,
} from '../connectors/quipuswap/quipuswap.controllers';
import {
getInitializedChain,
getConnector,
Expand All @@ -75,20 +80,23 @@ import {
import { Algorand } from '../chains/algorand/algorand';
import { Tinyman } from '../connectors/tinyman/tinyman';
import { Plenty } from '../connectors/plenty/plenty';
import { QuipuSwap } from '../connectors/quipuswap/quipuswap';

export async function price(req: PriceRequest): Promise<PriceResponse> {
const chain = await getInitializedChain<
Algorand | Ethereumish | Nearish | Tezosish
>(req.chain, req.network);
const connector: Uniswapish | RefAMMish | Tinyman | Plenty =
await getConnector<Uniswapish | RefAMMish | Tinyman | Plenty>(
const connector: Uniswapish | RefAMMish | Tinyman | Plenty | QuipuSwap =
await getConnector<Uniswapish | RefAMMish | Tinyman | Plenty | QuipuSwap>(
req.chain,
req.network,
req.connector
);

if (connector instanceof Plenty) {
return plentyPrice(<Tezosish>chain, connector, req);
} else if (connector instanceof QuipuSwap) {
return quipuPrice(<Tezosish>chain, connector, req);
} else if ('routerAbi' in connector) {
// we currently use the presence of routerAbi to distinguish Uniswapish from RefAMMish
return uniswapPrice(<Ethereumish>chain, connector, req);
Expand All @@ -103,15 +111,17 @@ export async function trade(req: TradeRequest): Promise<TradeResponse> {
const chain = await getInitializedChain<
Algorand | Ethereumish | Nearish | Tezosish
>(req.chain, req.network);
const connector: Uniswapish | RefAMMish | Tinyman | Plenty =
await getConnector<Uniswapish | RefAMMish | Tinyman | Plenty>(
const connector: Uniswapish | RefAMMish | Tinyman | Plenty | QuipuSwap =
await getConnector<Uniswapish | RefAMMish | Tinyman | Plenty | QuipuSwap>(
req.chain,
req.network,
req.connector
);

if (connector instanceof Plenty) {
return plentyTrade(<Tezosish>chain, connector, req);
} else if (connector instanceof QuipuSwap) {
return quipuTrade(<Tezosish>chain, connector, req);
} else if ('routerAbi' in connector) {
// we currently use the presence of routerAbi to distinguish Uniswapish from RefAMMish
return uniswapTrade(<Ethereumish>chain, connector, req);
Expand Down Expand Up @@ -190,15 +200,17 @@ export async function estimateGas(
const chain = await getInitializedChain<
Algorand | Ethereumish | Nearish | Tezosish
>(req.chain, req.network);
const connector: Uniswapish | RefAMMish | Tinyman | Plenty =
await getConnector<Uniswapish | RefAMMish | Plenty>(
const connector: Uniswapish | RefAMMish | Tinyman | Plenty | QuipuSwap =
await getConnector<Uniswapish | RefAMMish | Plenty | QuipuSwap>(
req.chain,
req.network,
req.connector
);

if (connector instanceof Plenty) {
return plentyEstimateGas(<Tezosish>chain, connector);
} else if (connector instanceof QuipuSwap) {
return quipuEstimateGas(<Tezosish>chain, connector);
} else if ('routerAbi' in connector) {
// we currently use the presence of routerAbi to distinguish Uniswapish from RefAMMish
return uniswapEstimateGas(<Ethereumish>chain, connector);
Expand Down
2 changes: 1 addition & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const startSwagger = async () => {

export const startGateway = async () => {
const port = ConfigManagerV2.getInstance().get('server.port');
const gateway_version="1.23.0"; // gateway version
const gateway_version="1.24.0"; // gateway version
if (!ConfigManagerV2.getInstance().get('server.id')) {
ConfigManagerV2.getInstance().set(
'server.id',
Expand Down
3 changes: 3 additions & 0 deletions src/chains/tezos/tezos.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ export class TezosBase {
if (spender === 'plenty') {
// plenty doesn't need an allowance
return { value: constants.MaxUint256, decimals: tokenDecimals };
} else if (spender === 'quipuswap') {
// quipuswap doesn't need an allowance
return { value: constants.MaxUint256, decimals: tokenDecimals };
}

let value = BigNumber.from(0);
Expand Down
7 changes: 7 additions & 0 deletions src/connectors/connectors.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { CurveConfig } from './curve/curveswap.config';
import { PlentyConfig } from './plenty/plenty.config';
import { XRPLCLOBConfig } from './xrpl/xrpl.clob.config';
import { KujiraConfig } from './kujira/kujira.config';
import { QuipuswapConfig } from './quipuswap/quipuswap.config';

export namespace ConnectorsRoutes {
export const router = Router();
Expand Down Expand Up @@ -162,6 +163,12 @@ export namespace ConnectorsRoutes {
'Enter your kujira account number (input 0 if unsure) >>> ',
},
},
{
name: 'quipuswap',
trading_type: QuipuswapConfig.config.tradingTypes,
chain_type: QuipuswapConfig.config.chainType,
available_networks: QuipuswapConfig.config.availableNetworks,
}
],
});
})
Expand Down
Loading
Loading