Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: deprecate goerli #102

Merged
merged 4 commits into from
Apr 12, 2024
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
12 changes: 0 additions & 12 deletions src/contracts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ export const ContractInfos: ContractInfosType = {
abi: valueDappAbi,
address: "0x009c403BdFaE357d82AAef2262a163287c30B739",
},
[EvmChainId.EthereumGoerli]: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這邊也有對應到一些其他鏈 goerli testnet 的合約 也可以一起拿掉

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

abi: valueDappAbi,
address: "0x009c403BdFaE357d82AAef2262a163287c30B739",
},
[EvmChainId.Bsc]: {
abi: valueDappAbi,
address: "0x009c403BdFaE357d82AAef2262a163287c30B739",
Expand Down Expand Up @@ -45,18 +41,10 @@ export const ContractInfos: ContractInfosType = {
abi: valueDappAbi,
address: "0x806243c7368a90D957592B55875eF4C3353C5bEa",
},
[EvmChainId.ArbitrumTestnet]: {
abi: valueDappAbi,
address: "0x009c403BdFaE357d82AAef2262a163287c30B739",
},
[EvmChainId.Optimism]: {
abi: valueDappAbi,
address: "0x806243c7368a90D957592B55875eF4C3353C5bEa",
},
[EvmChainId.OptimismTestnet]: {
abi: valueDappAbi,
address: "0x009c403BdFaE357d82AAef2262a163287c30B739",
},
[OtherChain.Aptos]: {
address:
"0x4282ed29feb89781cd4da44a5bb1d23ff7e31a9dd64536233792efe78b4a494d",
Expand Down
52 changes: 2 additions & 50 deletions src/services/evm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ export const supportedChains = [
],
environment: "mainnet",
},
{
name: "Ethereum Goerli",
chainId: "0x5",
rpcUrls: ["https://rpc.ankr.com/eth_goerli"],
faucet: "https://goerlifaucet.com/",
environment: "testnet",
},
{
name: "Ethereum Sepolia",
chainId: "0xaa36a7",
Expand All @@ -42,13 +35,6 @@ export const supportedChains = [
rpcUrls: ["https://arb1.arbitrum.io/rpc"],
environment: "mainnet",
},
{
name: "Arbitrum Goerli Testnet",
chainId: "0x66eed",
rpcUrls: ["https://goerli-rollup.arbitrum.io/rpc"],
faucet: "https://faucet.triangleplatform.com/arbitrum/goerli",
environment: "testnet",
},
{
name: "Arbitrum Sepolia Testnet",
chainId: "0x66eee",
Expand Down Expand Up @@ -101,13 +87,6 @@ export const supportedChains = [
rpcUrls: ["https://mainnet.optimism.io"],
environment: "mainnet",
},
{
name: "Optimism Testnet",
chainId: "0x1a4",
rpcUrls: ["https://goerli.optimism.io"],
faucet: "https://faucet.paradigm.xyz/",
environment: "testnet",
},
{
name: "Optimism Sepolia Testnet",
chainId: "0xaa37dc",
Expand All @@ -121,13 +100,6 @@ export const supportedChains = [
rpcUrls: ["https://mainnet.base.org"],
environment: "mainnet",
},
{
name: "Base Goerli Testnet",
chainId: "0x14a33",
rpcUrls: ["https://goerli.base.org"],
faucet: "https://faucet.quicknode.com/base/goerli",
environment: "testnet",
},
{
name: "Base Sepolia Testnet",
chainId: "0x14a34",
Expand All @@ -141,13 +113,6 @@ export const supportedChains = [
rpcUrls: ["https://rpc.zora.energy"],
environment: "mainnet",
},
{
name: "Zora Goerli Testnet",
chainId: "0x3E7",
rpcUrls: ["https://testnet.rpc.zora.energy"],
faucet: "https://testnet.zora.co",
environment: "testnet",
},
{
name: "Zora Sepolia Testnet",
chainId: "0x3b9ac9ff",
Expand All @@ -161,12 +126,6 @@ export const supportedChains = [
rpcUrls: ["https://rpc.scroll.io"],
environment: "mainnet",
},
{
name: "Scroll Goerli Testnet",
chainId: "0x82751",
rpcUrls: ["https://alpha-rpc.scroll.io/l2"],
environment: "testnet",
},
{
name: "Scroll Sepolia Testnet",
chainId: "0x8274f",
Expand All @@ -180,13 +139,6 @@ export const supportedChains = [
rpcUrls: ["https://rpc.linea.build"],
environment: "mainnet",
},
{
name: "Linea Goerli Testnet",
chainId: "0xe704",
rpcUrls: ["https://rpc.goerli.linea.build"],
faucet: "https://faucet.goerli.linea.build/",
environment: "testnet",
},
{
name: "zKatana Sepolia Testnet",
chainId: "0x133e40",
Expand All @@ -211,11 +163,11 @@ export const supportedChains = [
const bloctoSDK = new BloctoSDK({
ethereum: {
// (required) chainId to be used
chainId: isMainnet ? "0x1" : "0x5",
chainId: isMainnet ? "0x1" : "0xaa36a7",
// (required for Ethereum) JSON RPC endpoint
rpc: isMainnet
? `https://mainnet.infura.io/v3/${process.env.REACT_APP_INFURA_KEY}`
: "https://rpc.ankr.com/eth_goerli",
: "https://ethereum-sepolia.blockpi.network/v1/rpc/public",
walletServer: process.env.REACT_APP_WALLET_SERVER,
},
appId: process.env.REACT_APP_DAPP_ID,
Expand Down
3 changes: 0 additions & 3 deletions src/types/ChainTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,14 @@ export enum EvmChain {

export enum EvmChainId {
Ethereum = "0x1",
EthereumGoerli = "0x5",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這邊還有對應到一些其他鏈 goerli testnet 的 chain id

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bsc = "0x38",
BscTestnet = "0x61",
Polygon = "0x89",
PolygonTestnet = "0x13881",
Avalanche = "0xa86a",
AvalancheTestnet = "0xa869",
Arbitrum = "0xa4b1",
ArbitrumTestnet = "0x66eed",
Optimism = "0x000a",
OptimismTestnet = "0x01a4",
}

export type ChainsType = OtherChain;
Expand Down