-
Notifications
You must be signed in to change notification settings - Fork 59
feat: Add Solana support to Hello frontend example #296
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
c8e2f47
Support Solana wallet connections
hernan-clich c0cbd18
Add support for solanaCall function
hernan-clich 067e904
Remove rancid log
hernan-clich 9da056e
Refactored explorer urls to fns
hernan-clich 8efb83c
Importing typed solana util from wallet lib
hernan-clich e586a41
Bump wallet and toolkit
hernan-clich bb826b0
Restore support for eip6963 evm path
hernan-clich 98ccc34
Address network type mismatch case
hernan-clich 211e883
Remove unnecessary property
hernan-clich 69f2f41
Add onSigningStart callback to Solana handler
hernan-clich 9826c1e
Using supported chain chainId property
hernan-clich File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,79 @@ | ||
export interface SupportedChain { | ||
explorerUrl: string; | ||
explorerUrl: (txHash: string) => string; | ||
name: string; | ||
chainId: number; | ||
chainType: 'EVM' | 'SOL'; | ||
icon: string; | ||
colorHex: string; | ||
} | ||
|
||
export const SUPPORTED_CHAINS: SupportedChain[] = [ | ||
{ | ||
explorerUrl: 'https://sepolia.arbiscan.io/tx/', | ||
explorerUrl: (txHash: string) => `https://sepolia.arbiscan.io/tx/${txHash}`, | ||
name: 'Arbitrum Sepolia', | ||
chainId: 421614, | ||
chainType: 'EVM', | ||
icon: '/logos/arbitrum-logo.svg', | ||
colorHex: '#28446A', | ||
}, | ||
{ | ||
explorerUrl: 'https://testnet.snowtrace.io/tx/', | ||
explorerUrl: (txHash: string) => | ||
`https://testnet.snowtrace.io/tx/${txHash}`, | ||
name: 'Avalanche Fuji', | ||
chainId: 43113, | ||
chainType: 'EVM', | ||
icon: '/logos/avalanche-logo.svg', | ||
colorHex: '#FF394A', | ||
}, | ||
{ | ||
explorerUrl: 'https://sepolia.basescan.org/tx/', | ||
explorerUrl: (txHash: string) => | ||
`https://sepolia.basescan.org/tx/${txHash}`, | ||
name: 'Base Sepolia', | ||
chainId: 84532, | ||
chainType: 'EVM', | ||
icon: '/logos/base-logo.svg', | ||
colorHex: '#0052FF', | ||
}, | ||
{ | ||
explorerUrl: 'https://testnet.bscscan.com/tx/', | ||
explorerUrl: (txHash: string) => `https://testnet.bscscan.com/tx/${txHash}`, | ||
name: 'BSC Testnet', | ||
chainId: 97, | ||
chainType: 'EVM', | ||
icon: '/logos/bsc-logo.svg', | ||
colorHex: '#E1A411', | ||
}, | ||
{ | ||
explorerUrl: 'https://sepolia.etherscan.io/tx/', | ||
explorerUrl: (txHash: string) => | ||
`https://sepolia.etherscan.io/tx/${txHash}`, | ||
name: 'Ethereum Sepolia', | ||
chainId: 11155111, | ||
chainType: 'EVM', | ||
icon: '/logos/ethereum-logo.svg', | ||
colorHex: '#3457D5', | ||
}, | ||
{ | ||
explorerUrl: 'https://amoy.polygonscan.com/tx/', | ||
explorerUrl: (txHash: string) => | ||
`https://amoy.polygonscan.com/tx/${txHash}`, | ||
name: 'Polygon Amoy', | ||
chainId: 80002, | ||
chainType: 'EVM', | ||
icon: '/logos/polygon-logo.svg', | ||
colorHex: '#692BD7', | ||
}, | ||
{ | ||
explorerUrl: (txHash: string) => | ||
`https://solscan.io/tx/${txHash}?cluster=devnet`, | ||
name: 'Solana Devnet', | ||
chainId: 901, | ||
chainType: 'SOL', | ||
icon: '/logos/solana-logo.svg', | ||
colorHex: '#9945FF', | ||
}, | ||
]; | ||
|
||
export const SUPPORTED_CHAIN_IDS = SUPPORTED_CHAINS.map( | ||
(chain) => chain.chainId | ||
); | ||
|
||
export const ZETACHAIN_ATHENS_BLOCKSCOUT_EXPLORER_URL = | ||
'https://zetachain-testnet.blockscout.com/tx/'; | ||
export const ZETACHAIN_ATHENS_BLOCKSCOUT_EXPLORER_URL = (txHash: string) => | ||
`https://zetachain-testnet.blockscout.com/tx/${txHash}`; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.