Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
9dcfdfb
feat(layer2): add integration Boba Network
developerfred Dec 27, 2021
472407e
feat(boba-network): add OolongSwap address
developerfred Dec 27, 2021
3c5a34a
Merge remote-tracking branch 'upstream/develop' into feat/integration…
developerfred Dec 27, 2021
73f9a99
Merge remote-tracking branch 'upstream/develop' into feat/integration…
developerfred Dec 27, 2021
06708b5
Merge remote-tracking branch 'upstream/develop' into feat/integration…
developerfred Dec 29, 2021
d83156e
Merge remote-tracking branch 'upstream/develop' into feat/integration…
developerfred Dec 29, 2021
d6b62cb
chore(Fantom): add wallet-network-icon
developerfred Dec 29, 2021
0e5062f
chore(boba): change onchange value type to string
developerfred Dec 29, 2021
0367a14
Merge remote-tracking branch 'upstream/develop' into feat/integration…
developerfred Dec 30, 2021
b26e0e6
Merge remote-tracking branch 'upstream/develop' into feat/integration…
developerfred Dec 31, 2021
20f857d
Merge remote-tracking branch 'origin/develop' into feat/integration-b…
developerfred Jan 5, 2022
c73ee72
feat(boba): add boba logo on evm constans and update balance checker …
developerfred Jan 5, 2022
ebff396
Merge remote-tracking branch 'origin/develop' into feat/integration-b…
developerfred Jan 5, 2022
51dc9f8
chore: improve chain id
septs Jan 5, 2022
e4fa11a
refactor: opensea api
septs Jan 5, 2022
3a2ef08
chore(boba): fixed review issues
developerfred Jan 5, 2022
9b00c33
Merge remote-tracking branch 'origin/develop' into feat/integration-b…
developerfred Jan 5, 2022
a2ca631
refactor: opensea api
septs Jan 5, 2022
8ec4718
chore(boba): fixed pr review NATIVE_TOKEN_ADDRESS and chainList
developerfred Jan 5, 2022
35b1ac0
Merge remote-tracking branch 'upstream/septs/chain-id' into feat/inte…
developerfred Jan 5, 2022
a11cd87
chore(boba): extract getTraderConstants(chainId) as variable
developerfred Jan 5, 2022
b58db43
Merge remote-tracking branch 'upstream/septs/chain-id' into feat/inte…
developerfred Jan 5, 2022
88dced6
Merge branch 'develop' into feat/integration-boba-network
developerfred Jan 6, 2022
eaa095b
Merge branch 'develop' into feat/integration-boba-network
developerfred Jan 6, 2022
e458f43
chore(boba): fixed supported networks
developerfred Jan 6, 2022
67c564f
Merge remote-tracking branch 'upstream/develop' into feat/integration…
developerfred Jan 7, 2022
777d2c0
chore(boba): fixed claimAllDialog
developerfred Jan 7, 2022
92a3c94
feat(boba): add maskbook contracts on boba rinkeby
developerfred Jan 7, 2022
32af3f0
Merge branch 'develop' into feat/integration-boba-network
developerfred Jan 10, 2022
9ed6b8b
chore(boba): fixed add Unknown word (jkoeaghipilijlahjplgbfiocjhldnap)
developerfred Jan 10, 2022
bd17202
Merge branch 'develop' into feat/integration-boba-network
developerfred Jan 11, 2022
1b95e9d
feat(boba): add contracts ito, balanceChecker, redPacket, nft RedPacket
developerfred Jan 12, 2022
8c92094
Merge remote-tracking branch 'upstream/develop' into feat/integration…
developerfred Jan 12, 2022
5505a84
chore(boba): add info on evm json files
developerfred Jan 12, 2022
7d40007
Merge branch 'develop' into feat/integration-boba-network
developerfred Jan 13, 2022
942f607
Merge remote-tracking branch 'upstream/develop' into feat/integration…
developerfred Jan 13, 2022
0dc8d5c
chore(boba): fixed boba network
developerfred Jan 13, 2022
4c6143f
feat(boba): add SwapperChan DEX
developerfred Jan 15, 2022
2a1f568
feat(boba): add senpaiswap dex
developerfred Jan 15, 2022
ba1662f
Merge branch 'develop' into feat/integration-boba-network
developerfred Jan 17, 2022
0673f97
Merge branch 'develop' into feat/integration-boba-network
developerfred Jan 18, 2022
5d705da
Merge branch 'develop' into feat/integration-boba-network
developerfred Jan 22, 2022
f00935c
feat(boba): update contract address
developerfred Jan 22, 2022
1d433de
Merge branch 'develop' into feat/integration-boba-network
developerfred Jan 25, 2022
2b3a0f5
Merge branch 'develop' into feat/integration-boba-network
developerfred Jan 26, 2022
2e6c51c
chore(boba): fixed review changes
developerfred Jan 27, 2022
6dad08a
chore(boba): support boba network
developerfred Jan 27, 2022
c696ff0
Merge branch 'develop' into feat/integration-boba-network
developerfred Feb 8, 2022
2d8a4ef
chore(boba): fixed trader plugin and debank api
developerfred Feb 9, 2022
abedde3
feat(boba): enable OoolongSwap, SwapperChan and SenpaiSwap
developerfred Feb 9, 2022
90ba426
fixup! feat(boba): enable OoolongSwap, SwapperChan and SenpaiSwap
UncleBill Feb 10, 2022
ec5abef
chore(boba): change BalanceChecker Address
developerfred Feb 10, 2022
6eecb9e
feat(boba): add interact with eth_sendRawTransaction for boba network
developerfred Feb 10, 2022
0508e41
feat(boba): add rollup_gasPrices
developerfred Feb 10, 2022
fccba27
chore(boba): add signedTransaction
developerfred Feb 10, 2022
8a53f7c
Merge branch 'develop' into feat/integration-boba-network
developerfred Mar 9, 2022
d86d720
Merge branch 'develop' into feat/integration-boba-network
developerfred Mar 9, 2022
39b038d
Merge branch 'develop' into feat/integration-boba-network
developerfred Mar 12, 2022
c687fad
Merge remote-tracking branch 'upstream/develop' into feat/integration…
developerfred Mar 19, 2022
fd74d7a
chore(boba): need rewritter web3.eth.sendSignedTransaction
developerfred Mar 21, 2022
23ae595
Merge remote-tracking branch 'upstream/develop' into feat/integration…
developerfred Mar 21, 2022
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: 9 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"pnpm-lock.yaml"
],
"words": [
"jugglerred",
"aave",
"adai",
"addrs",
Expand Down Expand Up @@ -116,6 +117,7 @@
"jailbroken",
"jsbi",
"jsonml",
"jugglered",
"juicebox",
"kdfparams",
"keccak",
Expand Down Expand Up @@ -165,7 +167,10 @@
"nftscan",
"nowallet",
"nums",
"ongswap",
"oolongswap",
"opensea",
"optmistic",
"overridable",
"overscan",
"pageable",
Expand Down Expand Up @@ -209,6 +214,8 @@
"sashimiswap",
"scroller",
"secp",
"senpai",
"senpaiswap",
"serializers",
"shink",
"signup",
Expand All @@ -223,6 +230,7 @@
"superrare",
"sushiswap",
"swappable",
"swapperchan",
"swither",
"tabindex",
"tablist",
Expand Down Expand Up @@ -252,6 +260,7 @@
"viet",
"viewbox",
"visualcompletion",
"waifu",
"walletconnect",
"wannaswap",
"wault",
Expand Down
15 changes: 8 additions & 7 deletions docs/evm-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,11 @@ Goto `chrome-extension://jkoeaghipilijlahjplgbfiocjhldnap/dashboard.html#/wallet

## Learn More

| Chain | Pull Request Link |
| --------- | ---------------------------------------------------- |
| CELO | <https://github.com/DimensionDev/Maskbook/pull/5052> |
| Fantom | <https://github.com/DimensionDev/Maskbook/pull/5036> |
| xDai | <https://github.com/DimensionDev/Maskbook/pull/4140> |
| Arbitrum | <https://github.com/DimensionDev/Maskbook/pull/3558> |
| Avalanche | <https://github.com/DimensionDev/Maskbook/pull/5289> |
| Chain | Pull Request Link |
| ------------ | ---------------------------------------------------- |
| CELO | <https://github.com/DimensionDev/Maskbook/pull/5052> |
| Fantom | <https://github.com/DimensionDev/Maskbook/pull/5036> |
| xDai | <https://github.com/DimensionDev/Maskbook/pull/4140> |
| Arbitrum | <https://github.com/DimensionDev/Maskbook/pull/3558> |
| Avalanche | <https://github.com/DimensionDev/Maskbook/pull/5289> |
| Boba Network | <https://github.com/DimensionDev/Maskbook/pull/5310> |
3 changes: 2 additions & 1 deletion packages/mask/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@
"web3-utils": "1.5.2",
"webextension-polyfill": "^0.8.0",
"z-schema": "^5.0.2",
"zod": "3.13.4"
"zod": "3.13.4",
"@ethereumjs/tx": "3.5.0"
},
"devDependencies": {
"@dimensiondev/webextension-shim": "0.0.3-20210823035705-4257e12",
Expand Down
1 change: 1 addition & 0 deletions packages/mask/shared/flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export const Flags = {
polygon_enabled: true,
arbitrum_enabled: true,
xdai_enabled: true,
boba_enabled: true,
avalanche_enabled: true,
fantom_enabled: true,
flow_enabled: true,
Expand Down
1 change: 1 addition & 0 deletions packages/mask/src/components/shared/ApplicationBoard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ const SUPPORTED_CHAIN_ID_LIST = [
ChainId.xDai,
ChainId.Celo,
ChainId.Fantom,
ChainId.Boba,
ChainId.Aurora,
ChainId.Avalanche,
]
Expand Down
Binary file added packages/mask/src/plugins/EVM/assets/boba.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions packages/mask/src/plugins/EVM/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,16 @@ export const PLUGIN_NETWORKS: Web3Plugin.NetworkDescriptor[] = [
iconColor: 'rgb(73, 169, 166)',
isMainnet: true,
},
{
ID: `${PLUGIN_ID}_boba`,
networkSupporterPluginID: PLUGIN_ID,
chainId: ChainId.Boba,
type: NetworkType.Boba,
name: 'Boba',
icon: new URL('./assets/boba.png', import.meta.url),
iconColor: 'rgb(53, 208, 127)',
isMainnet: true,
},
{
ID: `${PLUGIN_ID}_avalanche`,
networkSupporterPluginID: PLUGIN_ID,
Expand Down
1 change: 1 addition & 0 deletions packages/mask/src/plugins/ITO/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const base: Plugin.Shared.Definition = {
ChainId.Aurora,
ChainId.Avalanche,
ChainId.Fantom,
ChainId.Boba,
],
},
},
Expand Down
1 change: 1 addition & 0 deletions packages/mask/src/plugins/RedPacket/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const base: Plugin.Shared.Definition = {
ChainId.Matic,
ChainId.Arbitrum,
ChainId.xDai,
ChainId.Boba,
ChainId.Fantom,
ChainId.Avalanche,
ChainId.Aurora,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export function TraderView(props: TraderViewProps) {
} = coinId ? trendingById : trendingByKeyword
// #endregion

// #region swap
const coinSymbol = (trending?.coin.symbol || '').toLowerCase()

// #region swap
Expand Down
9 changes: 8 additions & 1 deletion packages/mask/src/plugins/Trader/apis/trader/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,16 @@ export async function getAvailableTraderProviders(chainId: ChainId) {
return [TradeProvider.SUSHISWAP]
case NetworkType.Fantom:
return [TradeProvider.SUSHISWAP]
case NetworkType.Boba:
return [
TradeProvider.OPENOCEAN,
TradeProvider.DODO,
TradeProvider.OOLONGSWAP,
TradeProvider.SWAPPERCHAN,
TradeProvider.SENPAISWAP,
]
case NetworkType.Aurora:
return [TradeProvider.DODO, TradeProvider.WANNASWAP, TradeProvider.TRISOLARIS]
case NetworkType.Boba:
case NetworkType.Fuse:
case NetworkType.Metis:
case NetworkType.Optimistic:
Expand Down
1 change: 1 addition & 0 deletions packages/mask/src/plugins/Trader/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const base: Plugin.Shared.Definition = {
ChainId.Aurora,
ChainId.Avalanche,
ChainId.Fantom,
ChainId.Boba,
],
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/mask/src/plugins/Trader/constants/0x.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ export const ZRX_BASE_URL: Record<NetworkType, string> = {
[NetworkType.Polygon]: 'https://polygon.api.0x.org/',
[NetworkType.Arbitrum]: 'https://arbitrum.api.0x.org/',
[NetworkType.xDai]: 'https://xdai.api.0x.org/',
[NetworkType.Boba]: 'https://boba.api.0x.org/',
[NetworkType.Avalanche]: 'https://avalanche.api.0x.org/',
[NetworkType.Celo]: 'https://celo.api.0x.org/',
[NetworkType.Fantom]: 'https://fantom.api.0x.org/',
[NetworkType.Aurora]: 'https://aurora.api.0x.org/',
[NetworkType.Boba]: '',
[NetworkType.Fuse]: '',
[NetworkType.Metis]: '',
[NetworkType.Optimistic]: '',
Expand Down
2 changes: 1 addition & 1 deletion packages/mask/src/plugins/Trader/constants/dodo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ export const networkNames: Record<NetworkType, string> = {
[NetworkType.Polygon]: 'matic',
[NetworkType.Arbitrum]: 'arbitrum',
[NetworkType.xDai]: 'xdai',
[NetworkType.Boba]: 'boba',
[NetworkType.Avalanche]: 'avalanche',
[NetworkType.Celo]: 'celo',
[NetworkType.Fantom]: 'fantom',
[NetworkType.Aurora]: 'aurora',
[NetworkType.Boba]: '',
[NetworkType.Fuse]: '',
[NetworkType.Metis]: '',
[NetworkType.Optimistic]: '',
Expand Down
3 changes: 3 additions & 0 deletions packages/mask/src/plugins/Trader/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ export * from './quickswap'
export * from './pancakeswap'
export * from './dodo'
export * from './bancor'
export * from './oolongswap'
export * from './swapperchan'
export * from './senpaiswap'
export * from './traderjoe'
export * from './pangolindex'
export * from './wannaswap'
Expand Down
13 changes: 13 additions & 0 deletions packages/mask/src/plugins/Trader/constants/jugglerred.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { ChainId, DAI, USDC, USDT, WBTC, WNATIVE, WNATIVE_ONLY } from '@masknet/web3-shared-evm'
import type { ERC20AgainstToken, ERC20TokenCustomizedBase } from './types'

/**
* Some tokens can only be swapped via certain pairs,
* so we override the list of bases that are considered for these tokens.
*/
export const JUGGLERRED_CUSTOM_BASES: ERC20TokenCustomizedBase = {}

export const JUGGLERRED_BASE_AGAINST_TOKENS: ERC20AgainstToken = {
...WNATIVE_ONLY,
[ChainId.Optimistic]: [WNATIVE, DAI, USDC, USDT, WBTC].map((x) => x[ChainId.Optimistic]),
}
13 changes: 13 additions & 0 deletions packages/mask/src/plugins/Trader/constants/oolongswap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { ChainId, USDC, USDT, WBTC, WNATIVE, OLO, BOBA, WNATIVE_ONLY } from '@masknet/web3-shared-evm'
import type { ERC20AgainstToken, ERC20TokenCustomizedBase } from './types'

/**
* Some tokens can only be swapped via certain pairs,
* so we override the list of bases that are considered for these tokens.
*/
export const OOLONGSWAP_CUSTOM_BASES: ERC20TokenCustomizedBase = {}

export const OOLONGSWAP_BASE_AGAINST_TOKENS: ERC20AgainstToken = {
...WNATIVE_ONLY,
[ChainId.Boba]: [WNATIVE, USDC, USDT, WBTC, OLO, BOBA].map((x) => x[ChainId.Boba]),
}
2 changes: 1 addition & 1 deletion packages/mask/src/plugins/Trader/constants/openocean.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ export const networkNames: Record<NetworkType, string> = {
[NetworkType.xDai]: 'xdai',
[NetworkType.Celo]: 'celo',
[NetworkType.Fantom]: 'fantom',
[NetworkType.Boba]: 'boba',
[NetworkType.Avalanche]: 'avalanche',
[NetworkType.Aurora]: 'aurora',
[NetworkType.Boba]: '',
[NetworkType.Fuse]: '',
[NetworkType.Metis]: '',
[NetworkType.Optimistic]: '',
Expand Down
13 changes: 13 additions & 0 deletions packages/mask/src/plugins/Trader/constants/senpaiswap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { ChainId, USDC, USDT, WBTC, WNATIVE, SENPAI, BOBA, WNATIVE_ONLY } from '@masknet/web3-shared-evm'
import type { ERC20AgainstToken, ERC20TokenCustomizedBase } from './types'

/**
* Some tokens can only be swapped via certain pairs,
* so we override the list of bases that are considered for these tokens.
*/
export const SENPAISWAP_CUSTOM_BASES: ERC20TokenCustomizedBase = {}

export const SENPAISWAP_BASE_AGAINST_TOKENS: ERC20AgainstToken = {
...WNATIVE_ONLY,
[ChainId.Boba]: [WNATIVE, USDC, USDT, WBTC, SENPAI, BOBA].map((x) => x[ChainId.Boba]),
}
13 changes: 13 additions & 0 deletions packages/mask/src/plugins/Trader/constants/swapperchan.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { ChainId, USDC, USDT, WBTC, WNATIVE, WAIFU, BOBA, WNATIVE_ONLY } from '@masknet/web3-shared-evm'
import type { ERC20AgainstToken, ERC20TokenCustomizedBase } from './types'

/**
* Some tokens can only be swapped via certain pairs,
* so we override the list of bases that are considered for these tokens.
*/
export const SWAPPERCHAN_CUSTOM_BASES: ERC20TokenCustomizedBase = {}

export const SWAPPERCHAN_BASE_AGAINST_TOKENS: ERC20AgainstToken = {
...WNATIVE_ONLY,
[ChainId.Boba]: [WNATIVE, USDC, USDT, WBTC, WAIFU, BOBA].map((x) => x[ChainId.Boba]),
}
3 changes: 3 additions & 0 deletions packages/mask/src/plugins/Trader/pipes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ export const resolveTradeProviderName = createLookupTableResolver<TradeProvider,
[TradeProvider.PANCAKESWAP]: 'PancakeSwap',
[TradeProvider.DODO]: 'DODO',
[TradeProvider.BANCOR]: 'Bancor',
[TradeProvider.OOLONGSWAP]: 'OolongSwap',
[TradeProvider.OPENOCEAN]: 'OpenOcean',
[TradeProvider.SWAPPERCHAN]: 'SwapperChain',
[TradeProvider.SENPAISWAP]: 'SenpaiSwap',
[TradeProvider.TRADERJOE]: 'TraderJoe',
[TradeProvider.PANGOLIN]: 'PangolinDex',
[TradeProvider.TRISOLARIS]: 'Trisolaris',
Expand Down
2 changes: 1 addition & 1 deletion packages/mask/src/plugins/Trader/trader/0x/constants.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { ChainId } from '@masknet/web3-shared-evm'

export const SUPPORTED_CHAIN_ID_LIST = [ChainId.Mainnet, ChainId.BSC, ChainId.Matic]
export const SUPPORTED_CHAIN_ID_LIST = [ChainId.Mainnet, ChainId.BSC, ChainId.Matic, ChainId.Boba]
2 changes: 1 addition & 1 deletion packages/mask/src/plugins/Trader/trader/0x/useTrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export function getNativeTokenLabel(networkType: NetworkType) {
case NetworkType.xDai:
case NetworkType.Celo:
case NetworkType.Fantom:
case NetworkType.Aurora:
case NetworkType.Boba:
case NetworkType.Aurora:
case NetworkType.Fuse:
case NetworkType.Metis:
case NetworkType.Avalanche:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ export const OPENOCEAN_SUPPORTED_CHAINS = [
ChainId.Fantom,
ChainId.Arbitrum,
ChainId.Avalanche,
ChainId.Boba,
]
Loading