Skip to content

Commit

Permalink
chore(moonbeam): add balanceChecker contract
Browse files Browse the repository at this point in the history
  • Loading branch information
developerfred committed May 27, 2022
1 parent eb3883e commit 6e3d3c8
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { makeStyles } from '@masknet/theme'
import { isLessThan, pow10 } from '@masknet/web3-shared-base'
import { isLessThan, scale10 } from '@masknet/web3-shared-base'
import { memo, useEffect, useMemo, useState } from 'react'
import { useI18N } from '../../../../../utils'
import { useAsync, useAsyncFn, useUpdateEffect } from 'react-use'
Expand Down Expand Up @@ -94,10 +94,10 @@ const useStyles = makeStyles()((theme) => ({
}))

const minGasPriceOfChain: ChainIdOptionalRecord<BigNumber.Value> = {
[ChainId.BSC]: pow10(9).multipliedBy(5), // 5 Gwei
[ChainId.Conflux]: pow10(9).multipliedBy(5), // 5 Gwei
[ChainId.Matic]: pow10(9).multipliedBy(30), // 30 Gwei
[ChainId.Moonbeam]: pow10(9).multipliedBy(1), // 1 Gwei
[ChainId.BSC]: scale10(5, 9), // 5 Gwei
[ChainId.Conflux]: scale10(5, 9), // 5 Gwei
[ChainId.Matic]: scale10(30, 9), // 30 Gwei
[ChainId.Moonbeam]: scale10(1, 9), // 1 Gwei
}

export const Prior1559GasSetting = memo(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ import { WalletRPC } from '../../../Wallet/messages'
import { useNativeTokenPrice } from '../../hooks/useTokenPrice'
import type { GasSettingProps } from './types'
import { useGasSettingStyles } from './useGasSettingStyles'
import { pow10 } from '@masknet/web3-shared-base'
import { scale10 } from '@masknet/web3-shared-base'

const minGasPriceOfChain: ChainIdOptionalRecord<BigNumber.Value> = {
[ChainId.BSC]: pow10(9).multipliedBy(5), // 5 Gwei
[ChainId.Conflux]: pow10(9).multipliedBy(5), // 5 Gwei
[ChainId.Matic]: pow10(9).multipliedBy(30), // 30 Gwei
[ChainId.Moonbeam]: pow10(9).multipliedBy(1), // 1 Gwei
[ChainId.BSC]: scale10(5, 9), // 5 Gwei
[ChainId.Conflux]: scale10(5, 9), // 5 Gwei
[ChainId.Matic]: scale10(30, 9), // 30 Gwei
[ChainId.Moonbeam]: scale10(1, 9), // 1 Gwei
}

export const Prior1559GasSetting: FC<GasSettingProps> = memo(
Expand Down
2 changes: 1 addition & 1 deletion packages/web3-constants/evm/ethereum.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"Conflux": "",
"Harmony": "0xc119574d5fb333f5ac018658d4d8b5035e16bf39",
"Harmony_Test": "",
"Moonbeam": "0xC119574D5Fb333F5AC018658D4d8b5035E16bf39"
"Moonbeam": "0xf5056B96ab242C566002852d0b98ce0BcDf1af51"
},
"MULTICALL_ADDRESS": {
"Mainnet": "0x1F98415757620B543A52E61c46B32eB19261F984",
Expand Down
4 changes: 1 addition & 3 deletions packages/web3-constants/evm/rpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@
"Harmony_Test": ["https://api.s0.b.hmny.io/"],
"Moonbeam": [
"https://moonbeam.api.onfinality.io/rpc?apikey=e5e810e6-6162-4427-8ba3-d5ad8b9cf4c0",
"https://moonbeam.blastapi.io/905553b4-5acd-4f24-b473-ebca226a76c4",
"https://moonbeam.public.blastapi.io",
"https://moonbeam.api.onfinality.io/public"
"https://moonbeam.blastapi.io/905553b4-5acd-4f24-b473-ebca226a76c4"
]
},
"RPC_WEIGHTS": {
Expand Down
2 changes: 1 addition & 1 deletion packages/web3-constants/evm/token-list.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
"Conflux": ["https://tokens.r2d2.to/latest/1030/tokens.json"],
"Harmony": ["https://tokens.r2d2.to/latest/1666600000/tokens.json"],
"Harmony_Test": ["https://tokens.r2d2.to/latest/1666700000/tokens.json"],
"Moonbeam": ["https://token-list.sushi.com/"]
"Moonbeam": ["https://token-list.sushi.com/", "https://tokens.r2d2.to/latest/1284/tokens.json"]
}
}
2 changes: 1 addition & 1 deletion packages/web3-constants/evm/token.json
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,7 @@
"Conflux": "0x0000000000000000000000000000000000000000",
"Harmony": "0x0000000000000000000000000000000000000000",
"Harmony_Test": "0x0000000000000000000000000000000000000000",
"Moonbeam": "0x0000000000000000000000000000000000000802"
"Moonbeam": "0x0000000000000000000000000000000000000000"
},
"WETH_ADDRESS": {
"Mainnet": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
Expand Down

0 comments on commit 6e3d3c8

Please sign in to comment.