Skip to content
Merged
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
4 changes: 4 additions & 0 deletions docs/evm-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ Mask Network fetches on-chain data from various data sources. Therefore, you can

- <https://api.coingecko.com/api/v3/asset_platforms>

### Web3 Constants Compile Config

Add the chain name to `compileConstants()` in `packages/web3-constants/compile-constants.ts`.

### Token List

The team maintains a token list <https://github.com/DimensionDev/Mask-Token-List>. So free feel to create one for the chain. And add the token list link to `packages/web3-constants/evm/token-list.json`.
Expand Down
8 changes: 4 additions & 4 deletions packages/mask/src/components/shared/ApplicationBoard.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { Fragment } from 'react'
import { makeStyles } from '@masknet/theme'
import { useChainId } from '@masknet/web3-shared-evm'
import { useActivatedPluginsSNSAdaptor, useCurrentWeb3NetworkPluginID } from '@masknet/plugin-infra'
import type { Plugin } from '@masknet/plugin-infra'
import { useActivatedPluginsSNSAdaptor, useCurrentWeb3NetworkPluginID, Plugin, useAccount } from '@masknet/plugin-infra'
import { getCurrentSNSNetwork } from '../../social-network-adaptor/utils'
import { activatedSocialNetworkUI } from '../../social-network'

Expand Down Expand Up @@ -32,6 +31,7 @@ export function ApplicationBoard() {
const snsAdaptorPlugins = useActivatedPluginsSNSAdaptor('any')
const currentWeb3Network = useCurrentWeb3NetworkPluginID()
const chainId = useChainId()
const account = useAccount()
const currentSNSNetwork = getCurrentSNSNetwork(activatedSocialNetworkUI.networkIdentifier)

return (
Expand All @@ -46,7 +46,7 @@ export function ApplicationBoard() {
currentWeb3NetworkSupportedChainIds === undefined ||
currentWeb3NetworkSupportedChainIds.supportedChainIds?.includes(chainId),
)

const isWalletConnectedRequired = currentWeb3NetworkSupportedChainIds !== undefined
const currentSNSIsSupportedNetwork =
cur.enableRequirement.networks.networks[currentSNSNetwork]
const isSNSEnabled =
Expand All @@ -56,7 +56,7 @@ export function ApplicationBoard() {
cur.ApplicationEntries.map((x) => {
return {
entry: x,
enabled: isWeb3Enabled && isSNSEnabled,
enabled: isSNSEnabled && (account ? isWeb3Enabled : !isWalletConnectedRequired),
pluginId: cur.ID,
}
}) ?? [],
Expand Down
1 change: 1 addition & 0 deletions packages/web3-constants/compile-constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ compileConstants(path.join(__dirname, 'evm'), [
'Fantom',
'Aurora',
'Aurora_Testnet',
'Conflux',
])

compileConstants(path.join(__dirname, 'solana'), ['Mainnet', 'Testnet', 'Devnet'])
Expand Down
9 changes: 6 additions & 3 deletions packages/web3-constants/evm/aave.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"Celo": "",
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
},
"AAVE_LENDING_POOL_ADDRESSES_PROVIDER_CONTRACT_ADDRESS": {
"Mainnet": "0xb53c1a33016b2dc2ff3653530bff1848a515c8c5",
Expand All @@ -37,7 +38,8 @@
"Celo": "",
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
},
"AAVE_PROTOCOL_DATA_PROVIDER_CONTRACT_ADDRESS": {
"Mainnet": "0x057835Ad21a177dbdd3090bB1CAE03EaCF78Fc6d",
Expand All @@ -57,6 +59,7 @@
"Celo": "",
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
}
}
3 changes: 2 additions & 1 deletion packages/web3-constants/evm/airdrop.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"Celo": "",
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
}
}
3 changes: 2 additions & 1 deletion packages/web3-constants/evm/artblocks.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"Celo": "",
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
}
}
9 changes: 6 additions & 3 deletions packages/web3-constants/evm/cryptoartai.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"Celo": "",
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
},
"ARTIST_ACCEPTING_BIDS_V2": {
"Mainnet": "0x78C889749f29D2965a76Ede3BBb232A9729Ccf0b",
Expand All @@ -37,7 +38,8 @@
"Celo": "",
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
},
"CANFT_MARKET": {
"Mainnet": "0x72d081953957723e540780a0C6bA31725469238E",
Expand All @@ -57,6 +59,7 @@
"Celo": "",
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
}
}
6 changes: 4 additions & 2 deletions packages/web3-constants/evm/dhedge.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"Celo": "",
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
},
"API_URL": {
"Mainnet": "https://api-v2.dhedge.org/graphql",
Expand All @@ -37,6 +38,7 @@
"Celo": "",
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
}
}
6 changes: 4 additions & 2 deletions packages/web3-constants/evm/ethereum.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
"Celo": "",
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
},
"ENS_REVERSE_RECORDS_ADDRESS": {
"Mainnet": "0x3671aE578E63FdF66ad4F3E12CC0c0d71Ac7510C",
Expand All @@ -79,6 +80,7 @@
"Celo": "",
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
}
}
6 changes: 4 additions & 2 deletions packages/web3-constants/evm/explorer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"Celo": [],
"Fantom": ["AST4WWPNEYDURUXG2GH32JZMYWEFDP999S"],
"Aurora": [],
"Aurora_Testnet": []
"Aurora_Testnet": [],
"Conflux": []
},
"EXPLORER_API": {
"Mainnet": "https://api.etherscan.io/api",
Expand All @@ -37,6 +38,7 @@
"Celo": "https://explorer.celo.org/api",
"Fantom": "https://api.ftmscan.com/api",
"Aurora": "https://explorer.mainnet.aurora.dev/api",
"Aurora_Testnet": "https://explorer.testnet.aurora.dev/api"
"Aurora_Testnet": "https://explorer.testnet.aurora.dev/api",
"Conflux": ""
}
}
12 changes: 8 additions & 4 deletions packages/web3-constants/evm/gitcoin.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"Celo": "",
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
},
"BULK_CHECKOUT_ADDRESS": {
"Mainnet": "0x7d655c57f71464B6f83811C55D84009Cd9f5221C",
Expand All @@ -37,7 +38,8 @@
"Celo": "",
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
},
"GITCOIN_ETH_ADDRESS": {
"Mainnet": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
Expand All @@ -57,7 +59,8 @@
"Celo": "",
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
},
"GITCOIN_TIP_PERCENTAGE": {
"Mainnet": 5,
Expand All @@ -77,6 +80,7 @@
"Celo": 0,
"Fantom": 0,
"Aurora": 0,
"Aurora_Testnet": 0
"Aurora_Testnet": 0,
"Conflux": 0
}
}
6 changes: 4 additions & 2 deletions packages/web3-constants/evm/good-ghosting.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"Celo": "",
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
},
"GOOD_GHOSTING_INCENTIVES_CONTRACT_ADDRESS": {
"Mainnet": "",
Expand All @@ -37,6 +38,7 @@
"Celo": "",
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
}
}
12 changes: 8 additions & 4 deletions packages/web3-constants/evm/ito.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"Celo": "",
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
},
"MASK_ITO_CONTRACT_ADDRESS": {
"Mainnet": "0x86812da3A623ab9606976078588b80C315E55FA3",
Expand All @@ -37,7 +38,8 @@
"Celo": "",
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
},
"ITO2_CONTRACT_ADDRESS": {
"Mainnet": "0xc2CFbF22d6Dc87D0eE18d38d73733524c109Ff46",
Expand Down Expand Up @@ -99,7 +101,8 @@
"Celo": "",
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
},
"DEFAULT_QUALIFICATION2_ADDRESS": {
"Mainnet": "0x4dC5f343Fe57E4fbDA1B454d125D396A3181272c",
Expand Down Expand Up @@ -140,6 +143,7 @@
"Celo": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-ito-celo",
"Fantom": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-ito-fantom",
"Aurora": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-ito-aurora",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
}
}
3 changes: 2 additions & 1 deletion packages/web3-constants/evm/lbp.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"Celo": "",
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
}
}
6 changes: 4 additions & 2 deletions packages/web3-constants/evm/lido.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"Celo": "",
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
},
"LIDO_REFERRAL_ADDRESS": {
"Mainnet": "0x934b510d4c9103e6a87aef13b816fb080286d649",
Expand All @@ -37,6 +38,7 @@
"Celo": "0x934b510d4c9103e6a87aef13b816fb080286d649",
"Fantom": "0x934b510d4c9103e6a87aef13b816fb080286d649",
"Aurora": "0x934b510d4c9103e6a87aef13b816fb080286d649",
"Aurora_Testnet": "0x934b510d4c9103e6a87aef13b816fb080286d649"
"Aurora_Testnet": "0x934b510d4c9103e6a87aef13b816fb080286d649",
"Conflux": ""
}
}
6 changes: 4 additions & 2 deletions packages/web3-constants/evm/mask-box.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"Celo": "",
"Fantom": "",
"Aurora": "0xf5056B96ab242C566002852d0b98ce0BcDf1af51",
"Aurora_Testnet": "0xB4D669bc117735FdA44e90e52795132187705B21"
"Aurora_Testnet": "0xB4D669bc117735FdA44e90e52795132187705B21",
"Conflux": ""
},
"MASK_BOX_CONTRACT_FROM_BLOCK": {
"Mainnet": 13687866,
Expand All @@ -37,6 +38,7 @@
"Celo": 0,
"Fantom": 0,
"Aurora": 57259004,
"Aurora_Testnet": 77919118
"Aurora_Testnet": 77919118,
"Conflux": 0
}
}
3 changes: 2 additions & 1 deletion packages/web3-constants/evm/openocean.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"Celo": "0x934B510D4C9103E6a87AEf13b816fb080286D649",
"Fantom": "0x934B510D4C9103E6a87AEf13b816fb080286D649",
"Aurora": "",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
}
}
9 changes: 6 additions & 3 deletions packages/web3-constants/evm/opensea-api.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"Celo": "",
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
},
"GET_SINGLE_ASSET_URL": {
"Mainnet": "https://api.opensea.io/api/v1/asset",
Expand All @@ -37,7 +38,8 @@
"Celo": "",
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
},
"GET_ASSETS_URL": {
"Mainnet": "https://api.opensea.io/api/v1/assets",
Expand All @@ -57,6 +59,7 @@
"Celo": "",
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
}
}
6 changes: 4 additions & 2 deletions packages/web3-constants/evm/pooltogether.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"Celo": "",
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
},
"MASK_POOL_ADDRESS": {
"Mainnet": "",
Expand All @@ -37,6 +38,7 @@
"Celo": "",
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": ""
"Aurora_Testnet": "",
"Conflux": ""
}
}
Loading