Skip to content

Commit e4ef61a

Browse files
feat_: integrate base chain
Signed-off-by: Brian Sztamfater <[email protected]>
1 parent a4e36d4 commit e4ef61a

File tree

31 files changed

+3593
-10
lines changed

31 files changed

+3593
-10
lines changed

.codeclimate.yml

+1
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ exclude_patterns:
4242
- "static/"
4343
- "t/"
4444
- "images/qr-assets.go"
45+
- "contracts/hop/l2Contracts/l2BaseBridge/l2BaseBridge.go"

api/backend_test.go

+8
Original file line numberDiff line numberDiff line change
@@ -1527,6 +1527,8 @@ func TestWalletConfigOnLoginAccount(t *testing.T) {
15271527
alchemyArbitrumSepoliaToken := "alchemy-arbitrum-sepolia-token"
15281528
alchemyOptimismMainnetToken := "alchemy-optimism-mainnet-token"
15291529
alchemyOptimismSepoliaToken := "alchemy-optimism-sepolia-token"
1530+
alchemyBaseMainnetToken := "alchemy-base-mainnet-token"
1531+
alchemyBaseSepoliaToken := "alchemy-base-sepolia-token"
15301532
raribleMainnetAPIKey := "rarible-mainnet-api-key" // nolint: gosec
15311533
raribleTestnetAPIKey := "rarible-testnet-api-key" // nolint: gosec
15321534

@@ -1565,6 +1567,8 @@ func TestWalletConfigOnLoginAccount(t *testing.T) {
15651567
AlchemyArbitrumSepoliaToken: alchemyArbitrumSepoliaToken,
15661568
AlchemyOptimismMainnetToken: alchemyOptimismMainnetToken,
15671569
AlchemyOptimismSepoliaToken: alchemyOptimismSepoliaToken,
1570+
AlchemyBaseMainnetToken: alchemyBaseMainnetToken,
1571+
AlchemyBaseSepoliaToken: alchemyBaseSepoliaToken,
15681572
RaribleMainnetAPIKey: raribleMainnetAPIKey,
15691573
RaribleTestnetAPIKey: raribleTestnetAPIKey,
15701574
},
@@ -1585,6 +1589,8 @@ func TestWalletConfigOnLoginAccount(t *testing.T) {
15851589
require.Equal(t, b.config.WalletConfig.AlchemyAPIKeys[arbitrumSepoliaChainID], alchemyArbitrumSepoliaToken)
15861590
require.Equal(t, b.config.WalletConfig.AlchemyAPIKeys[optimismChainID], alchemyOptimismMainnetToken)
15871591
require.Equal(t, b.config.WalletConfig.AlchemyAPIKeys[optimismSepoliaChainID], alchemyOptimismSepoliaToken)
1592+
require.Equal(t, b.config.WalletConfig.AlchemyAPIKeys[baseChainID], alchemyBaseMainnetToken)
1593+
require.Equal(t, b.config.WalletConfig.AlchemyAPIKeys[baseSepoliaChainID], alchemyBaseSepoliaToken)
15881594
require.Equal(t, b.config.WalletConfig.RaribleMainnetAPIKey, raribleMainnetAPIKey)
15891595
require.Equal(t, b.config.WalletConfig.RaribleTestnetAPIKey, raribleTestnetAPIKey)
15901596

@@ -1846,6 +1852,8 @@ func TestRestoreKeycardAccountAndLogin(t *testing.T) {
18461852
"alchemyArbitrumSepoliaToken": "",
18471853
"alchemyOptimismMainnetToken": "",
18481854
"alchemyOptimismSepoliaToken": "",
1855+
"alchemyBaseMainnetToken": "",
1856+
"alchemyBaseSepoliaToken": "",
18491857
},
18501858
"torrentConfigEnabled": false,
18511859
"torrentConfigPort": 0,

api/default_networks.go

+50
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ const (
1414
sepoliaChainID uint64 = 11155111
1515
optimismChainID uint64 = 10
1616
optimismSepoliaChainID uint64 = 11155420
17+
baseChainID uint64 = 8453
18+
baseSepoliaChainID uint64 = 84532
1719
arbitrumChainID uint64 = 42161
1820
arbitrumSepoliaChainID uint64 = 421614
1921
sntSymbol = "SNT"
@@ -114,6 +116,52 @@ func optimismSepolia(stageName string) params.Network {
114116
}
115117
}
116118

119+
func base(stageName string) params.Network {
120+
return params.Network{
121+
ChainID: baseChainID,
122+
ChainName: "Base",
123+
DefaultRPCURL: fmt.Sprintf("https://%s.api.status.im/nodefleet/base/mainnet/", stageName),
124+
DefaultFallbackURL: fmt.Sprintf("https://%s.api.status.im/infura/base/mainnet/", stageName),
125+
DefaultFallbackURL2: fmt.Sprintf("https://%s.api.status.im/grove/base/mainnet/", stageName),
126+
RPCURL: "https://base-mainnet.infura.io/v3/",
127+
FallbackURL: "https://base-archival.rpc.grove.city/v1/",
128+
BlockExplorerURL: "https://basescan.org",
129+
IconURL: "network/Network=Base",
130+
ChainColor: "#E90101",
131+
ShortName: "base",
132+
NativeCurrencyName: "Ether",
133+
NativeCurrencySymbol: "ETH",
134+
NativeCurrencyDecimals: 18,
135+
IsTest: false,
136+
Layer: 2,
137+
Enabled: true,
138+
RelatedChainID: baseSepoliaChainID,
139+
}
140+
}
141+
142+
func baseSepolia(stageName string) params.Network {
143+
return params.Network{
144+
ChainID: baseSepoliaChainID,
145+
ChainName: "Base",
146+
DefaultRPCURL: fmt.Sprintf("https://%s.api.status.im/nodefleet/base/sepolia/", stageName),
147+
DefaultFallbackURL: fmt.Sprintf("https://%s.api.status.im/infura/base/sepolia/", stageName),
148+
DefaultFallbackURL2: fmt.Sprintf("https://%s.api.status.im/grove/base/sepolia/", stageName),
149+
RPCURL: "https://base-sepolia.infura.io/v3/",
150+
FallbackURL: "https://base-sepolia-archival.rpc.grove.city/v1/",
151+
BlockExplorerURL: "https://sepolia.basescan.org/",
152+
IconURL: "network/Network=Base",
153+
ChainColor: "#E90101",
154+
ShortName: "oeth",
155+
NativeCurrencyName: "Ether",
156+
NativeCurrencySymbol: "ETH",
157+
NativeCurrencyDecimals: 18,
158+
IsTest: true,
159+
Layer: 2,
160+
Enabled: false,
161+
RelatedChainID: baseChainID,
162+
}
163+
}
164+
117165
func arbitrum(stageName string) params.Network {
118166
return params.Network{
119167
ChainID: arbitrumChainID,
@@ -168,6 +216,8 @@ func defaultNetworks(stageName string) []params.Network {
168216
optimismSepolia(stageName),
169217
arbitrum(stageName),
170218
arbitrumSepolia(stageName),
219+
base(stageName),
220+
baseSepolia(stageName),
171221
}
172222
}
173223

api/default_networks_test.go

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ func TestBuildDefaultNetworks(t *testing.T) {
3434
case optimismSepoliaChainID:
3535
case arbitrumChainID:
3636
case arbitrumSepoliaChainID:
37+
case baseChainID:
38+
case baseSepoliaChainID:
3739
default:
3840
err = errors.Errorf("unexpected chain id: %d", n.ChainID)
3941
}

api/defaults.go

+6
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,12 @@ func buildWalletConfig(request *requests.WalletSecretsConfig, statusProxyEnabled
215215
if request.AlchemyOptimismSepoliaToken != "" {
216216
walletConfig.AlchemyAPIKeys[optimismSepoliaChainID] = request.AlchemyOptimismSepoliaToken
217217
}
218+
if request.AlchemyBaseMainnetToken != "" {
219+
walletConfig.AlchemyAPIKeys[baseChainID] = request.AlchemyBaseMainnetToken
220+
}
221+
if request.AlchemyBaseSepoliaToken != "" {
222+
walletConfig.AlchemyAPIKeys[baseSepoliaChainID] = request.AlchemyBaseSepoliaToken
223+
}
218224
if request.StatusProxyMarketUser != "" {
219225
walletConfig.StatusProxyMarketUser = request.StatusProxyMarketUser
220226
}

contracts/community-tokens/deployer/address.go

+2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ var contractAddressByChainID = map[uint64]common.Address{
1313
1: common.HexToAddress("0xB3Ef5B0825D5f665bE14394eea41E684CE96A4c5"), // Mainnet
1414
10: common.HexToAddress("0x31463D22750324C8721FF7751584EF62F2ff93b3"), // Optimism
1515
42161: common.HexToAddress("0x744Fd6e98dad09Fb8CCF530B5aBd32B56D64943b"), // Arbitrum
16+
8453: common.HexToAddress(""), // Base
1617
11155111: common.HexToAddress("0xCDE984e57cdb88c70b53437cc694345B646371f9"), // Sepolia
1718
421614: common.HexToAddress("0x7Ff554af5b6624db2135E4364F416d1D397f43e6"), // Arbitrum Sepolia
1819
11155420: common.HexToAddress("0xcE2A896eEA2F585BC0C3753DC8116BbE2AbaE541"), // Optimism Sepolia
20+
84532: common.HexToAddress(""), // Base Sepolia
1921
}
2022

2123
func ContractAddress(chainID uint64) (common.Address, error) {

contracts/gas-price-oracle/address.go

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ var ErrorNotAvailableOnChainID = errors.New("not available for chainID")
1313
var contractAddressByChainID = map[uint64]common.Address{
1414
wallet_common.OptimismMainnet: common.HexToAddress("0x8527c030424728cF93E72bDbf7663281A44Eeb22"),
1515
wallet_common.OptimismSepolia: common.HexToAddress("0x5230210c2b4995FD5084b0F5FD0D7457aebb5010"),
16+
wallet_common.BaseMainnet: common.HexToAddress("0x8527c030424728cF93E72bDbf7663281A44Eeb22"),
17+
wallet_common.BaseSepolia: common.HexToAddress("0x5230210c2b4995FD5084b0F5FD0D7457aebb5010"),
1618
}
1719

1820
func ContractAddress(chainID uint64) (common.Address, error) {

contracts/hop/L2_BaseBrige.abi

+1
Large diffs are not rendered by default.

contracts/hop/address.go

+44
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ var hopBridgeContractAddresses = map[string]map[uint64]map[string]common.Address
4848
CctpL2Bridge: common.HexToAddress("0x6504BFcaB789c35325cA4329f1f41FaC340bf982"),
4949
CctpMessageTransmitter: common.HexToAddress("0xC30362313FBBA5cf9163F0bb16a0e01f01A896ca"),
5050
},
51+
walletCommon.BaseMainnet: {
52+
L2CanonicalToken: common.HexToAddress("0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 "),
53+
CctpL2Bridge: common.HexToAddress("0xe7F40BF16AB09f4a6906Ac2CAA4094aD2dA48Cc2"),
54+
CctpMessageTransmitter: common.HexToAddress("0xAD09780d193884d503182aD4588450C416D6F9D4"),
55+
},
5156
walletCommon.EthereumSepolia: {
5257
L1CanonicalToken: common.HexToAddress("0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238"),
5358
CctpL1Bridge: common.HexToAddress("0x05fda2db623fa6a89a2db33550848ab2006a4427"),
@@ -60,6 +65,10 @@ var hopBridgeContractAddresses = map[string]map[uint64]map[string]common.Address
6065
L2CanonicalToken: common.HexToAddress("0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d"),
6166
CctpL2Bridge: common.HexToAddress("0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5"),
6267
},
68+
walletCommon.BaseSepolia: {
69+
L2CanonicalToken: common.HexToAddress("0x036CbD53842c5426634e7929541eC2318f3dCF7e"),
70+
CctpL2Bridge: common.HexToAddress("0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5"),
71+
},
6372
},
6473
"USDC.e": {
6574
walletCommon.EthereumMainnet: {
@@ -94,6 +103,19 @@ var hopBridgeContractAddresses = map[string]map[uint64]map[string]common.Address
94103
L2SaddleSwap: common.HexToAddress("0x10541b07d8Ad2647Dc6cD67abd4c03575dade261"),
95104
L2SaddleLpToken: common.HexToAddress("0xB67c014FA700E69681a673876eb8BAFAA36BFf71"),
96105
},
106+
walletCommon.BaseMainnet: {
107+
L1CanonicalBridge: common.HexToAddress("0x0000000000000000000000000000000000000000"),
108+
L1MessengerWrapper: common.HexToAddress("0x4a55e8e407609A3046804ca500BeF6F5ebaCb6F9"),
109+
L2CanonicalBridge: common.HexToAddress("0x0000000000000000000000000000000000000000"),
110+
L2CanonicalToken: common.HexToAddress("0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA"),
111+
L2Bridge: common.HexToAddress("0x46ae9BaB8CEA96610807a275EBD36f8e916b5C61"),
112+
CctpL2Bridge: common.HexToAddress("0xe7F40BF16AB09f4a6906Ac2CAA4094aD2dA48Cc2"),
113+
CctpMessageTransmitter: common.HexToAddress("0xAD09780d193884d503182aD4588450C416D6F9D4"),
114+
L2HopBridgeToken: common.HexToAddress("0x74fa978EaFFa312bC92e76dF40FcC1bFE7637Aeb"),
115+
L2AmmWrapper: common.HexToAddress("0x7D269D3E0d61A05a0bA976b7DBF8805bF844AF3F"),
116+
L2SaddleSwap: common.HexToAddress("0x022C5cE6F1Add7423268D41e08Df521D5527C2A0"),
117+
L2SaddleLpToken: common.HexToAddress("0x3b507422EBe64440f03BCbE5EEe4bdF76517f320"),
118+
},
97119
walletCommon.EthereumSepolia: {
98120
L1CanonicalToken: common.HexToAddress("0x95B01328BA6f4de261C4907fB35eE3c4968e9CEF"),
99121
CctpL1Bridge: common.HexToAddress("0x98bc5b835686e1a00e6c2168af162905899e93d6"),
@@ -191,6 +213,17 @@ var hopBridgeContractAddresses = map[string]map[uint64]map[string]common.Address
191213
L2SaddleSwap: common.HexToAddress("0x652d27c0F72771Ce5C76fd400edD61B406Ac6D97"),
192214
L2SaddleLpToken: common.HexToAddress("0x59745774Ed5EfF903e615F5A2282Cae03484985a"),
193215
},
216+
walletCommon.BaseMainnet: {
217+
L1CanonicalBridge: common.HexToAddress("0x0000000000000000000000000000000000000000"),
218+
L1MessengerWrapper: common.HexToAddress("0x17B5ACE1cD6b0d033431873826937F499Eec2C95"),
219+
L2CanonicalBridge: common.HexToAddress("0x0000000000000000000000000000000000000000"),
220+
L2CanonicalToken: common.HexToAddress("0x4200000000000000000000000000000000000006"),
221+
L2Bridge: common.HexToAddress("0x3666f603Cc164936C1b87e207F36BEBa4AC5f18a"),
222+
L2HopBridgeToken: common.HexToAddress("0xC1985d7a3429cDC85E59E2E4Fcc805b857e6Ee2E"),
223+
L2AmmWrapper: common.HexToAddress("0x10541b07d8Ad2647Dc6cD67abd4c03575dade261"),
224+
L2SaddleSwap: common.HexToAddress("0x0ce6c85cF43553DE10FC56cecA0aef6Ff0DD444d"),
225+
L2SaddleLpToken: common.HexToAddress("0x0ce6c85cF43553DE10FC56cecA0aef6Ff0DD444d"),
226+
},
194227
},
195228
"HOP": {
196229
walletCommon.EthereumMainnet: {
@@ -219,6 +252,17 @@ var hopBridgeContractAddresses = map[string]map[uint64]map[string]common.Address
219252
L2SaddleSwap: common.HexToAddress("0x0000000000000000000000000000000000000000"),
220253
L2SaddleLpToken: common.HexToAddress("0x0000000000000000000000000000000000000000"),
221254
},
255+
walletCommon.BaseMainnet: {
256+
L1CanonicalBridge: common.HexToAddress("0x0000000000000000000000000000000000000000"),
257+
L1MessengerWrapper: common.HexToAddress("0x86eD3B8AD6b721fD3a2Fa73c227987Fb9AD3D1Ae"),
258+
L2CanonicalBridge: common.HexToAddress("0x0000000000000000000000000000000000000000"),
259+
L2CanonicalToken: common.HexToAddress("0xc5102fE9359FD9a28f877a67E36B0F050d81a3CC"),
260+
L2Bridge: common.HexToAddress("0xe22D2beDb3Eca35E6397e0C6D62857094aA26F52"),
261+
L2HopBridgeToken: common.HexToAddress("0xc5102fE9359FD9a28f877a67E36B0F050d81a3CC"),
262+
L2AmmWrapper: common.HexToAddress("0x0000000000000000000000000000000000000000"),
263+
L2SaddleSwap: common.HexToAddress("0x0000000000000000000000000000000000000000"),
264+
L2SaddleLpToken: common.HexToAddress("0x0000000000000000000000000000000000000000"),
265+
},
222266
},
223267
"SNX": {
224268
walletCommon.EthereumMainnet: {

contracts/hop/l2Contracts/l2BaseBridge/l2BaseBridge.go

+3,392
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mobile/callog/status_request_log.go

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ var sensitiveKeys = []string{
3232
"alchemyArbitrumSepoliaToken",
3333
"alchemyOptimismMainnetToken",
3434
"alchemyOptimismSepoliaToken",
35+
"alchemyBaseMainnetToken",
36+
"alchemyBaseSepoliaToken",
3537
"statusProxyMarketUser",
3638
"statusProxyMarketPassword",
3739
"statusProxyBlockchainUser",

protocol/requests/create_account.go

+2
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ type WalletSecretsConfig struct {
102102
AlchemyArbitrumSepoliaToken string `json:"alchemyArbitrumSepoliaToken"`
103103
AlchemyOptimismMainnetToken string `json:"alchemyOptimismMainnetToken"`
104104
AlchemyOptimismSepoliaToken string `json:"alchemyOptimismSepoliaToken"`
105+
AlchemyBaseMainnetToken string `json:"alchemyBaseMainnetToken"`
106+
AlchemyBaseSepoliaToken string `json:"alchemyBaseSepoliaToken"`
105107

106108
StatusProxyStageName string `json:"statusProxyStageName"`
107109
StatusProxyMarketUser string `json:"statusProxyMarketUser"`

services/wallet/activity/activity.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ func getActivityEntries(ctx context.Context, deps FilterDependencies, addresses
454454
networks = joinItems(chainIDs, nil)
455455
}
456456

457-
layer2Chains := []uint64{common.OptimismMainnet, common.OptimismSepolia, common.ArbitrumMainnet, common.ArbitrumSepolia}
457+
layer2Chains := []uint64{common.OptimismMainnet, common.OptimismSepolia, common.ArbitrumMainnet, common.ArbitrumSepolia, common.BaseMainnet, common.BaseSepolia}
458458
layer2Networks := joinItems(layer2Chains, func(chainID uint64) string {
459459
return fmt.Sprintf("%d", chainID)
460460
})

services/wallet/common/const.go

+9-2
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,23 @@ const (
3737
BinanceChainID uint64 = 56 // obsolete?
3838
BinanceTestChainID uint64 = 97 // obsolete?
3939
AnvilMainnet uint64 = 31337
40+
BaseMainnet uint64 = 8453
41+
BaseSepolia uint64 = 84532
4042
)
4143

4244
var (
4345
SupportedNetworks = map[uint64]bool{
4446
EthereumMainnet: true,
4547
OptimismMainnet: true,
4648
ArbitrumMainnet: true,
49+
BaseMainnet: true,
4750
}
4851

4952
SupportedTestNetworks = map[uint64]bool{
5053
EthereumSepolia: true,
5154
OptimismSepolia: true,
5255
ArbitrumSepolia: true,
56+
BaseSepolia: true,
5357
}
5458
)
5559

@@ -84,9 +88,9 @@ func (c ChainID) ToUint() uint64 {
8488

8589
func (c ChainID) IsMainnet() bool {
8690
switch uint64(c) {
87-
case EthereumMainnet, OptimismMainnet, ArbitrumMainnet:
91+
case EthereumMainnet, OptimismMainnet, ArbitrumMainnet, BaseMainnet:
8892
return true
89-
case EthereumSepolia, OptimismSepolia, ArbitrumSepolia:
93+
case EthereumSepolia, OptimismSepolia, ArbitrumSepolia, BaseSepolia:
9094
return false
9195
case UnknownChainID:
9296
return false
@@ -102,6 +106,8 @@ func AllChainIDs() []ChainID {
102106
ChainID(OptimismSepolia),
103107
ChainID(ArbitrumMainnet),
104108
ChainID(ArbitrumSepolia),
109+
ChainID(BaseMainnet),
110+
ChainID(BaseSepolia),
105111
}
106112
}
107113

@@ -110,4 +116,5 @@ var AverageBlockDurationForChain = map[ChainID]time.Duration{
110116
ChainID(EthereumMainnet): time.Duration(12000) * time.Millisecond,
111117
ChainID(OptimismMainnet): time.Duration(400) * time.Millisecond,
112118
ChainID(ArbitrumMainnet): time.Duration(300) * time.Millisecond,
119+
ChainID(BaseMainnet): time.Duration(400) * time.Millisecond,
113120
}

services/wallet/onramp/provider_mercuryo.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func (p *MercuryoProvider) GetCryptoOnRamp(ctx context.Context) (CryptoOnRamp, e
5353
Hostname: "mercuryo.io",
5454
SupportsSinglePurchase: true,
5555
SupportsRecurrentPurchase: true,
56-
SupportedChainIDs: []uint64{walletCommon.EthereumMainnet, walletCommon.ArbitrumMainnet, walletCommon.OptimismMainnet},
56+
SupportedChainIDs: []uint64{walletCommon.EthereumMainnet, walletCommon.ArbitrumMainnet, walletCommon.OptimismMainnet, walletCommon.BaseMainnet},
5757
URLsNeedParameters: true,
5858
SiteURL: mercuryioNoFeesBaseURL,
5959
RecurrentSiteURL: mercuryioNoFeesBaseURL + "&widget_flow=recurrent",

services/wallet/onramp/provider_moonpay.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func (p *MoonPayProvider) GetCryptoOnRamp(ctx context.Context) (CryptoOnRamp, er
3434
Hostname: "moonpay.com",
3535
SupportsSinglePurchase: true,
3636
SupportsRecurrentPurchase: false,
37-
SupportedChainIDs: []uint64{walletCommon.EthereumMainnet, walletCommon.ArbitrumMainnet, walletCommon.OptimismMainnet},
37+
SupportedChainIDs: []uint64{walletCommon.EthereumMainnet, walletCommon.ArbitrumMainnet, walletCommon.OptimismMainnet, walletCommon.BaseMainnet},
3838
URLsNeedParameters: false,
3939
SiteURL: moonpayURL,
4040
}

services/wallet/onramp/provider_ramp.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func (p *RampProvider) GetCryptoOnRamp(ctx context.Context) (CryptoOnRamp, error
3434
Hostname: "ramp.network",
3535
SupportsSinglePurchase: true,
3636
SupportsRecurrentPurchase: false,
37-
SupportedChainIDs: []uint64{walletCommon.EthereumMainnet, walletCommon.ArbitrumMainnet, walletCommon.OptimismMainnet},
37+
SupportedChainIDs: []uint64{walletCommon.EthereumMainnet, walletCommon.ArbitrumMainnet, walletCommon.OptimismMainnet, walletCommon.BaseMainnet},
3838
URLsNeedParameters: false,
3939
SiteURL: rampSiteURL,
4040
}

services/wallet/router/common.go

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ func getChainPriority(chainID uint64) int {
4141
return 2
4242
case common.ArbitrumMainnet, common.ArbitrumSepolia:
4343
return 3
44+
case common.BaseMainnet, common.BaseSepolia:
45+
return 4
4446
default:
4547
return 0
4648
}

services/wallet/router/fees/fees.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ func (f *FeeManager) getBaseFee(ctx context.Context, client chain.ClientInterfac
158158
switch chainID {
159159
case common.EthereumSepolia,
160160
common.OptimismSepolia,
161-
common.ArbitrumSepolia:
161+
common.ArbitrumSepolia,
162+
common.BaseSepolia:
162163
config = params.SepoliaChainConfig
163164
}
164165
baseFee := misc.CalcBaseFee(config, header)

0 commit comments

Comments
 (0)