Skip to content

Commit

Permalink
Merge branch 'development' into fix/gateway-workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
fengtality authored Aug 20, 2023
2 parents 00c1e3f + 3afcafc commit 6de1997
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 56 deletions.
46 changes: 23 additions & 23 deletions postman/collections/Gateway API.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"id": "c2a569af-9bf2-4afd-86c6-57b52b4205a8"
},
{
"name": "network",
"name": "chain",
"item": [
{
"name": "status",
Expand All @@ -103,11 +103,11 @@
"urlencoded": []
},
"url": {
"raw": "https://{{host}}:{{port}}/network/status",
"raw": "https://{{host}}:{{port}}/chain/status",
"protocol": "https",
"host": ["{{host}}"],
"port": "{{port}}",
"path": ["network", "status"]
"path": ["chain", "status"]
}
},
"response": []
Expand All @@ -126,11 +126,11 @@
"urlencoded": []
},
"url": {
"raw": "https://{{host}}:{{port}}/network/config",
"raw": "https://{{host}}:{{port}}/chain/config",
"protocol": "https",
"host": ["{{host}}"],
"port": "{{port}}",
"path": ["network", "config"]
"path": ["chain", "config"]
}
},
"response": []
Expand All @@ -154,11 +154,11 @@
}
},
"url": {
"raw": "https://{{host}}:{{port}}/network/balances",
"raw": "https://{{host}}:{{port}}/chain/balances",
"protocol": "https",
"host": ["{{host}}"],
"port": "{{port}}",
"path": ["network", "balances"]
"path": ["chain", "balances"]
}
},
"response": []
Expand All @@ -182,11 +182,11 @@
}
},
"url": {
"raw": "https://{{host}}:{{port}}/network/poll",
"raw": "https://{{host}}:{{port}}/chain/poll",
"protocol": "https",
"host": ["{{host}}"],
"port": "{{port}}",
"path": ["network", "poll"]
"path": ["chain", "poll"]
}
},
"response": []
Expand All @@ -205,19 +205,19 @@
"raw": ""
},
"url": {
"raw": "https://{{host}}:{{port}}/network/tokens?chain={{chain}}&network={{network}}&tokenSymbols[]=UNI&tokenSymbols[]=WETH&tokenSymbols[]=LINK",
"raw": "https://{{host}}:{{port}}/chain/tokens?chain={{chain}}&network={{network}}&tokenSymbols[]=UNI&tokenSymbols[]=WETH&tokenSymbols[]=LINK",
"protocol": "https",
"host": ["{{host}}"],
"port": "{{port}}",
"path": ["network", "tokens"],
"path": ["chain", "tokens"],
"query": [
{
"key": "chain",
"value": "{{chain}}"
},
{
"key": "network",
"value": "{{network}}"
"key": "chain",
"value": "{{chain}}"
},
{
"key": "tokenSymbols[]",
Expand Down Expand Up @@ -357,11 +357,11 @@
}
},
"url": {
"raw": "https://{{host}}:{{port}}/evm/nonce",
"raw": "https://{{host}}:{{port}}/chain/nonce",
"protocol": "https",
"host": ["{{host}}"],
"port": "{{port}}",
"path": ["evm", "nonce"]
"path": ["chain", "nonce"]
}
},
"response": []
Expand All @@ -385,11 +385,11 @@
}
},
"url": {
"raw": "https://{{host}}:{{port}}/evm/nextNonce",
"raw": "https://{{host}}:{{port}}/chain/nextNonce",
"protocol": "https",
"host": ["{{host}}"],
"port": "{{port}}",
"path": ["evm", "nextNonce"]
"path": ["chain", "nextNonce"]
}
},
"response": []
Expand Down Expand Up @@ -444,11 +444,11 @@
}
},
"url": {
"raw": "https://{{host}}:{{port}}/evm/allowances",
"raw": "https://{{host}}:{{port}}/chain/allowances",
"protocol": "https",
"host": ["{{host}}"],
"port": "{{port}}",
"path": ["evm", "allowances"]
"path": ["chain", "allowances"]
}
},
"response": []
Expand All @@ -472,11 +472,11 @@
}
},
"url": {
"raw": "https://{{host}}:{{port}}/evm/approve",
"raw": "https://{{host}}:{{port}}/chain/approve",
"protocol": "https",
"host": ["{{host}}"],
"port": "{{port}}",
"path": ["evm", "approve"]
"path": ["chain", "approve"]
}
},
"response": []
Expand All @@ -500,11 +500,11 @@
}
},
"url": {
"raw": "https://{{host}}:{{port}}/evm/cancel",
"raw": "https://{{host}}:{{port}}/chain/cancel",
"protocol": "https",
"host": ["{{host}}"],
"port": "{{port}}",
"path": ["evm", "cancel"]
"path": ["chain", "cancel"]
}
},
"response": []
Expand Down
2 changes: 2 additions & 0 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,14 @@ export const startSwagger = async () => {

export const startGateway = async () => {
const port = ConfigManagerV2.getInstance().get('server.port');
const gateway_version="dev-1.19.0"; // gateway version
if (!ConfigManagerV2.getInstance().get('server.id')) {
ConfigManagerV2.getInstance().set(
'server.id',
Math.random().toString(16).substr(2, 14)
);
}
logger.info(`Gateway Version: ${gateway_version}`) // display gateway version
logger.info(`⚡️ Starting Gateway API on port ${port}...`);
if (ConfigManagerV2.getInstance().get('server.unsafeDevModeWithHTTP')) {
logger.info('Running in UNSAFE HTTP! This could expose private keys.');
Expand Down
2 changes: 1 addition & 1 deletion src/connectors/openocean/openocean.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export namespace OpenoceanConfig {
chainType: 'EVM',
availableNetworks: [
{ chain: 'avalanche', networks: ['avalanche'] },
{ chain: 'ethereum', networks: ['mainnet', 'arbitrum_one', 'optimism'] },
{ chain: 'ethereum', networks: ['mainnet', 'arbitrum', 'optimism'] },
{ chain: 'polygon', networks: ['mainnet'] },
{ chain: 'harmony', networks: ['mainnet'] },
{ chain: 'binance-smart-chain', networks: ['mainnet'] },
Expand Down
2 changes: 1 addition & 1 deletion src/connectors/openocean/openocean.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export class Openocean implements Uniswapish {
public get chainName(): string {
if (this._chain === 'ethereum' && this._network === 'mainnet') {
return 'eth';
} else if (this._chain === 'ethereum' && this._network === 'arbitrum_one') {
} else if (this._chain === 'ethereum' && this._network === 'arbitrum') {
return 'arbitrum';
} else if (this._chain === 'ethereum' && this._network === 'optimism') {
return 'optimism';
Expand Down
2 changes: 1 addition & 1 deletion src/connectors/sushiswap/sushiswap.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export namespace SushiswapConfig {
availableNetworks: [
{
chain: 'ethereum',
networks: ['mainnet', 'goerli', 'arbitrum_one'],
networks: ['mainnet', 'goerli', 'arbitrum'],
},
{ chain: 'avalanche', networks: ['avalanche', 'fuji'] },
{ chain: 'binance-smart-chain', networks: ['mainnet', 'testnet'] },
Expand Down
4 changes: 2 additions & 2 deletions src/templates/ethereum.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
networks:
arbitrum_one:
arbitrum:
chainID: 42161
nodeURL: https://rpc.ankr.com/arbitrum
tokenListType: FILE
tokenListSource: /home/gateway/conf/lists/arbitrum_one_coingecko_20230610.json
tokenListSource: /home/gateway/conf/lists/arbitrum_coingecko_20230610.json
nativeCurrencySymbol: ETH
gasPriceRefreshInterval: 60
arbitrum_rinkeby:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1424,7 +1424,7 @@
"chainId":42161,
"address":"0xff970a61a04b1ca14834a43f5de4533ebddb5cc8",
"name":"USD Coin Ethereum Bridged",
"symbol":"USDC.E",
"symbol":"USDC.e",
"decimals":6,
"logoURI":"https://assets.coingecko.com/coins/images/30691/thumb/usdc.png?1686280970"
},
Expand Down
2 changes: 1 addition & 1 deletion src/templates/sushiswap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ contractAddresses:
sushiswapRouterAddress: '0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F'
goerli:
sushiswapRouterAddress: '0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506'
arbitrum_one:
arbitrum:
sushiswapRouterAddress: '0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506'
avalanche:
avalanche:
Expand Down
2 changes: 1 addition & 1 deletion src/templates/uniswap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ contractAddresses:
uniswapV3SmartOrderRouterAddress: '0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45'
uniswapV3NftManagerAddress: '0xC36442b4a4522E871399CD717aBDD847Ab11FE88'
uniswapV3QuoterV2ContractAddress: '0x61fFE014bA17989E743c5F6cB21bF9697530B21e'
arbitrum_one:
arbitrum:
uniswapV3SmartOrderRouterAddress: '0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45'
uniswapV3NftManagerAddress: '0xC36442b4a4522E871399CD717aBDD847Ab11FE88'
uniswapV3QuoterV2ContractAddress: '0x61fFE014bA17989E743c5F6cB21bF9697530B21e'
Expand Down
Loading

0 comments on commit 6de1997

Please sign in to comment.