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

blast support #5463

Merged
merged 39 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
7cba957
assets
dereknelson Feb 20, 2024
dd11f3c
mostly types
dereknelson Feb 21, 2024
f376e31
avax colors
dereknelson Feb 21, 2024
4a65b26
avax native currency
dereknelson Feb 22, 2024
d22d84f
added proxy url and contract addys
dereknelson Feb 22, 2024
d47398d
bump swaps for avax support
dereknelson Feb 22, 2024
628839c
added remote config defaults
dereknelson Feb 22, 2024
29f7ab3
added avax gas getter
dereknelson Feb 26, 2024
14a1a49
rename swap registry import
dereknelson Feb 26, 2024
24fdbe9
overwrote vals to avax
dereknelson Feb 26, 2024
9de21eb
Merge branch 'develop' into @derek/avalanche
dereknelson Feb 26, 2024
52bac90
L + ratio + i see beauty in things you wouldnt begin to ponder
dereknelson Feb 26, 2024
debd6ab
added remote config
dereknelson Feb 26, 2024
6573412
avax imports/gas estimations
dereknelson Feb 27, 2024
c9d8a48
deleted some unused shit
dereknelson Feb 27, 2024
3b86767
avax nft support
dereknelson Feb 27, 2024
a61d415
types
dereknelson Feb 28, 2024
35966ab
added bips
dereknelson Feb 28, 2024
d9bf1a0
added avax to default config
dereknelson Feb 28, 2024
6e3804c
dark mode avax
dereknelson Feb 28, 2024
cc77570
Merge branch 'develop' into @derek/avalanche
dereknelson Feb 28, 2024
d288c77
Merge remote-tracking branch 'origin/develop' into @derek/avalanche
skylarbarrera Mar 1, 2024
4aa9972
updated param from base to avalanche
dereknelson Mar 5, 2024
5c148be
avax -> avalanche
dereknelson Mar 5, 2024
1bb0b9e
cleanup
dereknelson Mar 5, 2024
7cbb71c
added assets to xcode
dereknelson Mar 5, 2024
37536e3
added blast assets
dereknelson Mar 5, 2024
36aeded
added network type & badge
dereknelson Mar 5, 2024
fc46edc
Merge branch 'develop' into @derek/avalanche
dereknelson Mar 5, 2024
f4c470e
Merge branch 'develop' into @derek/blast
dereknelson Mar 5, 2024
001b7d8
merge branch '@derek/avalanche' into '@derek/blast'
dereknelson Mar 5, 2024
bc4785a
wagmi bump no dice
dereknelson Mar 6, 2024
3781733
we do a little blasting off
dereknelson Mar 6, 2024
5b2aaa7
Merge branch 'develop' into @derek/blast
dereknelson Mar 7, 2024
f4617ba
Merge branch 'develop' into @derek/blast
dereknelson Mar 7, 2024
1308b32
bumped viem & used it for blast chain
dereknelson Mar 7, 2024
e78f22d
added explain sheet
dereknelson Mar 7, 2024
e2d5cf2
colors
dereknelson Mar 8, 2024
9588118
bips
dereknelson Mar 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions globals.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ declare module 'react-native-dotenv' {
export const AVALANCHE_MAINNET_RPC: string;
export const AVALANCHE_MAINNET_RPC_DEV: string;
export const AVALANCHE_FUJI_RPC: string;
export const BLAST_MAINNET_RPC: string;
export const POLYGON_MAINNET_RPC: string;
export const ARBITRUM_MAINNET_RPC: string;
export const BSC_MAINNET_RPC: string;
Expand Down
23 changes: 23 additions & 0 deletions ios/Images.xcassets/badges/blast.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "blast.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "blast@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "blast@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions ios/Images.xcassets/badges/blastBadge.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "blastBadge.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "blastBadge@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "blastBadge@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "blastBadgeDark.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "blastBadgeDark@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "blastBadgeDark@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "blastBadgeLarge.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "blastBadgeLarge@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "blastBadgeLarge@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "blastBadgeLargeDark.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "blastBadgeLargeDark@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "blastBadgeLargeDark@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "blastBadgeNoShadow.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "blastBadgeNoShadow@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "blastBadgeNoShadow@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
"@types/react-redux": "7.1.9",
"@types/url-join": "4.0.1",
"@unstoppabledomains/resolution": "7.1.4",
"@wagmi/chains": "1.6.0",
"@wagmi/chains": "1.8.0",
"@walletconnect/client": "1.8.0",
"@walletconnect/core": "2.11.2",
"@walletconnect/legacy-utils": "2.0.0",
Expand Down
Binary file added src/assets/badges/blast.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/badges/blast@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/badges/blast@3x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/badges/blastBadge.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/badges/blastBadge@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/badges/blastBadge@3x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/badges/blastBadgeDark.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/badges/blastBadgeDark@2x.png
Binary file added src/assets/badges/blastBadgeDark@3x.png
Binary file added src/assets/badges/blastBadgeLarge.png
Binary file added src/assets/badges/blastBadgeLarge@2x.png
Binary file added src/assets/badges/blastBadgeLarge@3x.png
Binary file added src/assets/badges/blastBadgeLargeDark.png
Binary file added src/assets/badges/blastBadgeLargeDark@2x.png
Binary file added src/assets/badges/blastBadgeLargeDark@3x.png
Binary file added src/assets/badges/blastBadgeNoShadow.png
Binary file added src/assets/badges/blastBadgeNoShadow@2x.png
Binary file added src/assets/badges/blastBadgeNoShadow@3x.png
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import BaseBadge from '@/assets/badges/baseBadge.png';
import BaseBadgeDark from '@/assets/badges/baseBadgeDark.png';
import AvalancheBadge from '@/assets/badges/avalancheBadge.png';
import AvalancheBadgeDark from '@/assets/badges/avalancheBadgeDark.png';
import BlastBadge from '@/assets/badges/blastBadge.png';
import BlastBadgeDark from '@/assets/badges/blastBadgeDark.png';
import { Network } from '@/networks/types';

interface FastChainBadgeProps {
Expand Down Expand Up @@ -55,6 +57,10 @@ const AssetIconsByTheme: {
dark: AvalancheBadgeDark,
light: AvalancheBadge,
},
[Network.blast]: {
dark: BlastBadgeDark,
light: BlastBadge,
},
};

export const FastChainBadge = React.memo(function FastChainBadge({ network, theme }: FastChainBadgeProps) {
Expand Down
8 changes: 8 additions & 0 deletions src/components/coin-icon/ChainBadge.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ import AvalancheBadge from '../../assets/badges/avalancheBadge.png';
import AvalancheBadgeDark from '../../assets/badges/avalancheBadgeDark.png';
import AvalancheBadgeLarge from '../../assets/badges/avalancheBadgeLarge.png';
import AvalancheBadgeLargeDark from '../../assets/badges/avalancheBadgeLargeDark.png';
import BlastBadge from '../../assets/badges/blastBadge.png';
import BlastBadgeDark from '../../assets/badges/blastBadgeDark.png';
import BlastBadgeLarge from '../../assets/badges/blastBadgeLarge.png';
import BlastBadgeLargeDark from '../../assets/badges/blastBadgeLargeDark.png';
import { Centered } from '../layout';
import styled from '@/styled-thing';
import { position as positions } from '@/styles';
Expand Down Expand Up @@ -82,6 +86,8 @@ export default function ChainBadge({
val = isDarkMode ? BaseBadgeLargeDark : BaseBadgeLarge;
} else if (network === Network.avalanche) {
val = isDarkMode ? AvalancheBadgeLargeDark : AvalancheBadgeLarge;
} else if (network === Network.blast) {
val = isDarkMode ? BlastBadgeLargeDark : BlastBadgeLarge;
}
} else {
if (network === Network.arbitrum) {
Expand All @@ -98,6 +104,8 @@ export default function ChainBadge({
val = isDarkMode ? BaseBadgeDark : BaseBadge;
} else if (network === Network.avalanche) {
val = isDarkMode ? AvalancheBadgeDark : AvalancheBadge;
} else if (network === Network.blast) {
val = isDarkMode ? BlastBadgeDark : BlastBadge;
}
}
return val;
Expand Down
1 change: 1 addition & 0 deletions src/components/gas/GasSpeedButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ const GasSpeedButton = ({
case networkTypes.arbitrum:
case networkTypes.zora:
case networkTypes.base:
case networkTypes.blast:
default:
return { mainnet_address: ETH_ADDRESS, symbol: 'ETH' };
}
Expand Down
3 changes: 3 additions & 0 deletions src/handlers/web3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export const proxyRpcEndpoint = (chainId: number, customEndpoint?: string) => {
zora_mainnet_rpc,
avalanche_mainnet_rpc,
ethereum_mainnet_rpc,
blast_mainnet_rpc,
} = getRemoteConfig();
if (rpc_proxy_enabled) {
return `${RPC_PROXY_BASE_URL}/${chainId}/${RPC_PROXY_API_KEY}${
Expand All @@ -88,6 +89,8 @@ export const proxyRpcEndpoint = (chainId: number, customEndpoint?: string) => {
return zora_mainnet_rpc;
case Network.avalanche:
return avalanche_mainnet_rpc;
case Network.blast:
return blast_mainnet_rpc;
case Network.gnosis:
case Network.mainnet:
default:
Expand Down
2 changes: 2 additions & 0 deletions src/helpers/networkTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export enum Network {
zora = 'zora',
gnosis = 'gnosis',
avalanche = 'avalanche',
blast = 'blast',
}

// We need to keep this one until
Expand All @@ -24,4 +25,5 @@ export default {
zora: 'zora' as Network,
gnosis: 'gnosis' as Network,
avalanche: 'avalanche' as Network,
blast: 'blast' as Network,
};
10 changes: 10 additions & 0 deletions src/model/remoteConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
ZORA_MAINNET_RPC,
AVALANCHE_MAINNET_RPC,
AVALANCHE_MAINNET_RPC_DEV,
BLAST_MAINNET_RPC,
} from 'react-native-dotenv';
import { RainbowError, logger } from '@/logger';
import { getNetwork, saveNetwork } from '@/handlers/localstorage/globalSettings';
Expand All @@ -42,6 +43,7 @@ interface RainbowConfig extends Record<string, string | boolean | number> {
zora_mainnet_rpc: string;
base_mainnet_rpc: string;
avalanche_mainnet_rpc: string;
blast_mainnet_rpc: string;
swagg_enabled: boolean;
trace_call_block_number_offset: number;
profiles_enabled: boolean;
Expand All @@ -56,6 +58,7 @@ interface RainbowConfig extends Record<string, string | boolean | number> {
mainnet_enabled: boolean;
goerli_enabled: boolean;
avalanche_enabled: boolean;
blast_enabled: boolean;

arbitrum_tx_enabled: boolean;
base_tx_enabled: boolean;
Expand All @@ -67,8 +70,10 @@ interface RainbowConfig extends Record<string, string | boolean | number> {
mainnet_tx_enabled: boolean;
goerli_tx_enabled: boolean;
avalanche_tx_enabled: boolean;
blast_tx_enabled: boolean;

base_swaps_enabled: boolean;
blast_swaps_enabled: boolean;
mints_enabled: boolean;
points_enabled: boolean;
points_fully_enabled: boolean;
Expand All @@ -93,6 +98,7 @@ const DEFAULT_CONFIG: RainbowConfig = {
base: 200,
zora: 200,
avalanche: 200,
blast: 200,
}),
ethereum_goerli_rpc: __DEV__ ? ETHEREUM_GOERLI_RPC_DEV : ETHEREUM_GOERLI_RPC,
ethereum_mainnet_rpc: __DEV__ ? ETHEREUM_MAINNET_RPC_DEV : ETHEREUM_MAINNET_RPC,
Expand All @@ -106,6 +112,7 @@ const DEFAULT_CONFIG: RainbowConfig = {
zora_mainnet_rpc: ZORA_MAINNET_RPC,
base_mainnet_rpc: __DEV__ ? BASE_MAINNET_RPC_DEV : BASE_MAINNET_RPC,
avalanche_mainnet_rpc: __DEV__ ? AVALANCHE_MAINNET_RPC_DEV : AVALANCHE_MAINNET_RPC,
blast_mainnet_rpc: BLAST_MAINNET_RPC,
swagg_enabled: true,
trace_call_block_number_offset: 20,
profiles_enabled: true,
Expand All @@ -118,6 +125,7 @@ const DEFAULT_CONFIG: RainbowConfig = {
base_enabled: true,
op_chains_enabled: true,
avalanche_enabled: true,
blast_enabled: true,

mainnet_enabled: true,

Expand All @@ -131,12 +139,14 @@ const DEFAULT_CONFIG: RainbowConfig = {
zora_tx_enabled: true,
op_chains_tx_enabled: true,
avalanche_tx_enabled: true,
blast_tx_enabled: true,

mainnet_tx_enabled: true,

goerli_tx_enabled: true,

base_swaps_enabled: false,
blast_swaps_enabled: false,
mints_enabled: true,
points_enabled: true,
points_fully_enabled: true,
Expand Down