Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion packages/doc/src/stories/widgets/Pool.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Primary.args = {
supportAMMV3: true,
supportChainIds: [
1, 42161, 137, 56, 10, 43114, 1313161554, 1030, 8453, 59144, 534352, 169,
5000, 200901, 48900, 196, 543210, 177, 43111, 988, 421614, 53457,
5000, 200901, 48900, 196, 543210, 177, 43111, 988, 421614, 53457, 173
],
// onlyChainId: 688689,
showSubmissionSubmittedDialog: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/dodoex-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dodoex/api",
"version": "3.6.0",
"version": "3.8.0",
"description": "DODO API Kit",
"source": "src/index.ts",
"types": "dist/types/index.d.ts",
Expand Down
8 changes: 8 additions & 0 deletions packages/dodoex-api/src/chainConfig/basicToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,12 @@ export const basicTokenMap: {
wrappedTokenSymbol: 'USDT0',
wrappedTokenAddress: '0x779Ded0c9e1022225f8E0630b35a9b54bE713736',
},
[ChainId.ENI]: {
...DEFAULT_BASIC_TOKEN,
symbol: 'EGAS',
name: 'EGAS',
showDecimals: 6,
wrappedTokenSymbol: 'WEGAS',
wrappedTokenAddress: '0x6D1e851446F4D004AE2A72F9AfEd85e8829A205E',
},
};
2 changes: 2 additions & 0 deletions packages/dodoex-api/src/chainConfig/chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,6 @@ export enum ChainId {

STABLE_TESTNET = 2201,
STABLE = 988,

ENI = 173,
}
15 changes: 15 additions & 0 deletions packages/dodoex-api/src/chainConfig/contractConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
pharosAtlanticTestnet,
stableTestnet,
stable,
eni
} from '@dodoex/dodo-contract-request';
import { ChainId } from './chain';

Expand Down Expand Up @@ -543,6 +544,20 @@ const contractMap: {
DODO_DPP_PROXY: stable.DODODppProxy,
DODO_MINEV3_PROXY: stable.DODOMineV3Proxy,
},
[ChainId.ENI]: {
MULTI_CALL: eni.MulticallWithValid,
DODO_APPROVE: eni.DODOApprove,
ERC20_HELPER: eni.ERC20Helper,

ROUTE_V2_DATA_FETCH: eni.DODOV2RouteHelper,
ROUTE_V1_DATA_FETCH: eni.DODOV1PmmHelper,
CALLEE_HELPER: eni.DODOCalleeHelper,

DODO_PROXY: eni.DODOV2Proxy02,
DODO_DSP_PROXY: eni.DODODspProxy,
DODO_DPP_PROXY: eni.DODODppProxy,
DODO_MINEV3_PROXY: eni.DODOMineV3Proxy,
},
};

export default contractMap;
1 change: 1 addition & 0 deletions packages/dodoex-api/src/chainConfig/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ export const platformIdMap: {
[ChainId.PHAROS_ATLANTIC_TESTNET]: 'pharos-atlantic-testnet',
[ChainId.STABLE_TESTNET]: 'stable-testnet',
[ChainId.STABLE]: 'stable',
[ChainId.ENI]: 'eni',
};
6 changes: 3 additions & 3 deletions packages/dodoex-widgets/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dodoex/widgets",
"version": "3.15.0",
"version": "3.19.0",
"description": "DODO Widgets",
"source": "src/index.tsx",
"types": "dist/types/index.d.ts",
Expand Down Expand Up @@ -58,10 +58,10 @@
},
"dependencies": {
"@babel/runtime": "^7.17.0",
"@dodoex/api": "^3.6.0",
"@dodoex/api": "^3.7.0",
"@dodoex/components": "^3.3.0",
"@dodoex/contract-request": "^1.3.0",
"@dodoex/dodo-contract-request": "^1.32.0",
"@dodoex/dodo-contract-request": "^1.34.0",
"@dodoex/icons": "^2.1.0",
"@emotion/react": "^11.10.0",
"@emotion/styled": "^11.10.0",
Expand Down
11 changes: 11 additions & 0 deletions packages/dodoex-widgets/src/assets/logo/networks/eni.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions packages/dodoex-widgets/src/constants/chainList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { ReactComponent as BitlayerLogo } from '../assets/logo/networks/bitlayer
import { ReactComponent as BSCLogo } from '../assets/logo/networks/bsc.svg';
import { ReactComponent as CFXLogo } from '../assets/logo/networks/cfx.svg';
import { ReactComponent as DODOchainLogo } from '../assets/logo/networks/dodochain.svg';
import { ReactComponent as ENILogo } from '../assets/logo/networks/eni.svg';
import { ReactComponent as ETHereumLogo } from '../assets/logo/networks/eth.svg';
import { ReactComponent as HashKeyLogo } from '../assets/logo/networks/haskey.svg';
import { ReactComponent as HemiLogo } from '../assets/logo/networks/hemi.svg';
Expand Down Expand Up @@ -322,6 +323,14 @@ export const chainListMap: Map<ChainId, ChainListItem> = new Map([
name: 'Stable',
},
],
[
ChainId.ENI,
{
chainId: ChainId.ENI,
logo: ENILogo,
name: 'ENI Mainnet',
},
],
]);

export const isTestNet = (chainId: ChainId) => {
Expand Down
9 changes: 9 additions & 0 deletions packages/dodoex-widgets/src/constants/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ export const rpcServerMap: {
[ChainId.STABLE]: [
'https://partners-rpc.stable.xyz/dodo.88b3272adaac2ddaa08f13c049824412d7bffe24a2c760089f6c480115ac00e1',
],
[ChainId.ENI]: [
'https://rpc.eniac.network',
'https://rpc1.eniac.network',
'https://rpc2.eniac.network',
],
};

export const getRpcSingleUrlMap = (newRpcServerMap?: {
Expand Down Expand Up @@ -132,6 +137,7 @@ export const scanUrlDomainMap: {
[ChainId.PHAROS_ATLANTIC_TESTNET]: 'atlantic.pharosscan.xyz',
[ChainId.STABLE_TESTNET]: 'testnet.stablescan.xyz',
[ChainId.STABLE]: 'stablescan.xyz',
[ChainId.ENI]: 'scan.eniac.network',
};

export const ThegraphKeyMap: {
Expand Down Expand Up @@ -172,6 +178,7 @@ export const ThegraphKeyMap: {
[ChainId.PHAROS_ATLANTIC_TESTNET]: 'pharos-atlantic-testnet',
[ChainId.STABLE_TESTNET]: 'stable-testnet',
[ChainId.STABLE]: 'stable',
[ChainId.ENI]: 'eni',
};

export const blockTimeMap: {
Expand Down Expand Up @@ -212,6 +219,7 @@ export const blockTimeMap: {
[ChainId.PHAROS_ATLANTIC_TESTNET]: 2777,
[ChainId.STABLE_TESTNET]: 700,
[ChainId.STABLE]: 988,
[ChainId.ENI]: 1000,
};

export const dexKeysMap: {
Expand Down Expand Up @@ -252,4 +260,5 @@ export const dexKeysMap: {
[ChainId.PHAROS_ATLANTIC_TESTNET]: [],
[ChainId.STABLE_TESTNET]: [],
[ChainId.STABLE]: [],
[ChainId.ENI]: [],
};
39 changes: 7 additions & 32 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1409,10 +1409,10 @@
ethers "^6.13.2"
https-proxy-agent "^7.0.5"

"@dodoex/dodo-contract-request@^1.32.0":
version "1.32.0"
resolved "https://registry.yarnpkg.com/@dodoex/dodo-contract-request/-/dodo-contract-request-1.32.0.tgz#71fc5627d658946f75cb2f00849d7f9d618a997e"
integrity sha512-gWOdBIiHGWmZzryoV781qKqz3z6eFUfjaTe62VcO0xiBLM51aCpiXTX44jqpYvHbURdFCGgeDO9Br49ac68jUA==
"@dodoex/dodo-contract-request@^1.34.0":
version "1.34.0"
resolved "https://registry.yarnpkg.com/@dodoex/dodo-contract-request/-/dodo-contract-request-1.34.0.tgz#eec8675678aa43eccd38b5744970e4aaaf52f4dd"
integrity sha512-/vsLhH7upXPpTI97pK2Zr9sNR+FVV5nNSDSe4qnEjFWp9IJNa0YFwjoBMR2QnqDHLH7PTt5B0Q1jzFZ/8MbDEA==
dependencies:
typescript "^5"

Expand Down Expand Up @@ -20398,7 +20398,7 @@ string-length@^4.0.1:
char-regex "^1.0.2"
strip-ansi "^6.0.0"

"string-width-cjs@npm:string-width@^4.2.0":
"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand All @@ -20416,15 +20416,6 @@ string-width@^1.0.1:
is-fullwidth-code-point "^1.0.0"
strip-ansi "^3.0.0"

"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

string-width@^2.1.0, string-width@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
Expand Down Expand Up @@ -20524,7 +20515,7 @@ string_decoder@~1.1.1:
dependencies:
safe-buffer "~5.1.0"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand Down Expand Up @@ -20552,13 +20543,6 @@ strip-ansi@^5.1.0:
dependencies:
ansi-regex "^4.1.0"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^7.0.1, strip-ansi@^7.1.0:
version "7.1.2"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.2.tgz#132875abde678c7ea8d691533f2e7e22bb744dba"
Expand Down Expand Up @@ -22122,7 +22106,7 @@ workerpool@^6.5.1:
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544"
integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand All @@ -22148,15 +22132,6 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0:
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
Expand Down
Loading