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

Merges current and ongoing work from devrel team #56

Merged
merged 68 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
5bdc805
Update pointer-contracts.mdx
cordt-sei May 16, 2024
3a302d0
Update EvmWalletConnect **L42 incomplete**
cordt-sei May 16, 2024
467f3a5
Update _meta.json
cordt-sei May 16, 2024
c6c5f7a
Delete pages/user-guides/setting-up-a-wallet.mdx
cordt-sei May 16, 2024
8be10f1
Delete pages/user-guides/signing-transactions.mdx
cordt-sei May 16, 2024
9290c6c
Create wallet-setup.mdx
cordt-sei May 16, 2024
eff5fb6
Add 'infrastructure' section, condense/reorg
cordt-sei May 16, 2024
13fd7d9
Create node-operators.mdx
cordt-sei May 16, 2024
10e36d4
Delete pages/node-configuration.mdx
cordt-sei May 16, 2024
812abd2
Delete pages/running-a-sei-node.mdx
cordt-sei May 16, 2024
849ffde
Update EvmWalletConnect.tsx
cordt-sei May 16, 2024
ae82431
update address linking guide
May 17, 2024
a7d89e2
Update address linking guide
May 17, 2024
1ab6de8
Adds 'VersionFetcher' component for versioning
Cordtus May 17, 2024
0562ac0
Merge branch 'devrel' of https://github.com/sei-protocol/sei-docs int…
cordt-sei May 17, 2024
a98a8dc
adds clarity+consistency across pointer types
cordt-sei May 18, 2024
66daf29
Adds custom green callout to globals.css
cordt-sei May 19, 2024
1b4330a
Clarifies pointer registration proc.
cordt-sei May 19, 2024
7100449
Further organizes and streamlines overall flow
cordt-sei May 20, 2024
ebb8ccc
formatting README.md
cordt-sei May 20, 2024
b389fe1
Moves 'oracles' to 'Infrastructure' section
cordt-sei May 20, 2024
3ea15b6
Fixes eco-apps reference
cordt-sei May 20, 2024
9057ccc
Adds full brand assets, rough brand kit
cordt-sei May 21, 2024
15f1a44
Merge remote-tracking branch 'origin/devrel' into devrel
duncand0nuts May 22, 2024
b34827b
remove branding assets
cordt-sei May 22, 2024
d082915
remove faucet info from getting tokens page
duncand0nuts May 22, 2024
5a4108e
Merge remote-tracking branch 'origin/devrel' into devrel
duncand0nuts May 22, 2024
aec4d25
(WIP) Added all the files for the For Developers section and rearrang…
codebycarson May 23, 2024
e238c4e
Split ecosystem and providers to their own pages
codebycarson May 23, 2024
e905c05
IBC updates
dssei May 23, 2024
cba4755
Precompile updates + IBC precompile
dssei May 23, 2024
143a5f0
JSON precompile
dssei May 23, 2024
65706b5
Oracle precompile + formatting
dssei May 23, 2024
fd34357
Pointers precompile added
dssei May 23, 2024
d9cf4bd
PointerView precompile + updated repo links
dssei May 23, 2024
85c7274
Removed extra block-explorers page, adjusted general staking and gove…
codebycarson May 24, 2024
e272a91
Merge pull request #58 from sei-protocol/feature/for-devs-docs-denys
codebycarson May 24, 2024
571ee32
Updates snapshot to generic source
cordt-sei May 24, 2024
7e32eaf
adds consistency to snapshot steps
cordt-sei May 24, 2024
5ea60f9
add to user quickstart, add wrapped sei page, add brdiging page
duncand0nuts May 24, 2024
a530d1b
Merge remote-tracking branch 'refs/remotes/origin/devrel' into devrel
duncand0nuts May 24, 2024
4a7070e
fixes URL typo
cordt-sei May 24, 2024
0b01ee3
fixes URL typo
cordt-sei May 24, 2024
26d5b51
add images
duncand0nuts May 24, 2024
bfa09a9
Merge remote-tracking branch 'refs/remotes/origin/devrel' into devrel
duncand0nuts May 24, 2024
e5ea963
fix imports and image names
duncand0nuts May 24, 2024
5d4b77a
Update frontend tutorial
mj850 May 24, 2024
6a9be05
doc tweaks
dssei May 24, 2024
8bc5617
Merge pull request #59 from sei-protocol/mj/dev-frontend
codebycarson May 24, 2024
fb36f9d
fix broken links
dssei May 24, 2024
0e3d8de
fix formatting
dssei May 24, 2024
1e69b0d
Merge pull request #60 from sei-protocol/feature/for-devs-docs-denys2
codebycarson May 24, 2024
ccc5ce2
Fixed build warnings
codebycarson May 24, 2024
88ddaec
Adds brand-kit, CSS + component
cordt-sei May 26, 2024
1c418c2
Changes walletconnect to mainnet
cordt-sei May 26, 2024
78c7cee
chore: Update import path for Logo component in theme.config.tsx and …
cordt-sei May 26, 2024
89c7a29
Merge branch 'devrel' into aurora-brand-kit
cordt-sei May 26, 2024
73bc68e
Merge pull request #61 from sei-protocol/aurora-brand-kit
cordt-sei May 26, 2024
2a5b65d
Update brand-kit.mdx
cordt-sei May 26, 2024
0e56a52
Update brand-kit.mdx
cordt-sei May 26, 2024
8fefc4e
Update brand-kit.mdx
cordt-sei May 26, 2024
e5e6503
Improved intro docs
codebycarson May 26, 2024
675ad0d
Final Formatting and Links
codebycarson May 27, 2024
243e6d9
Merge branch 'devrel' into feature/for-devs-docs
codebycarson May 27, 2024
b257451
Merge pull request #62 from sei-protocol/feature/for-devs-docs
codebycarson May 27, 2024
bd33b0b
adds finished wrap guide
cordt-sei May 27, 2024
305bbc5
Fixed bad formatting, moved oracle price feeder over, small typos
codebycarson May 27, 2024
12ae53f
Fix links (#64)
mj850 May 27, 2024
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
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Contributing to the Docs

## Quick Start

Ensure you have `yarn` installed (macOS users can Run `brew install yarn`)

1. Use `yarn` to install dependencies
Expand All @@ -12,25 +15,28 @@ You should always run `yarn build` before pushing any changes to validate that t
This documentation is created using [Nextra](https://nextra.site).

### Structure

Each page is generated from a single `.mdx` file under the `./pages` directory.

Each directory represents a page grouping. Each directory contains a `_meta.json` file, which dictates the order and name of the items in the navbar.

For more information on how the docs are structured, please refer to the [Nextra docs](https://nextra.site/docs/guide).

### Changing Content
All content submitted will be reviewed by a maintainer

To standardize the documentation, please follow the [style guide]() for instructions on how to format changes to the docs.
All content submitted will be reviewed by a maintainer

To standardize the documentation, please follow the [style guide](https://github.com/sei-protocol/sei-docs/blob/devrel/STYLE_GUIDE.mdx) for instructions on how to format changes to the docs.

## Open Source Contributors

As an open source and decentralized protocol, we **greatly appreciate** any contributions!
If you feel like the docs can be better in some way, please feel free to fork this repo and make a pull request or open an issue in this Repository.

### Make changes yourself
While the contents of this repository are not technical in nature, contributing requires a basic understanding of

While the contents of this repository are not technical in nature, contributing requires a basic understanding of:

- [Git](https://git-scm.com/downloads)
- Github

Expand All @@ -42,7 +48,10 @@ To propose changes directly, you can open a Pull Request against this repository
4. Commit and push your changes to your forked repository.
5. Once your changes have been pushed to your forked repository, [make a Pull Request](https://git-scm.com/downloads) against this repository. Ensure that your Pull Request follows the template so we can understand and review your changes clearly.

### Open an Issue.
### Open an Issue

Alternatively, if you have more general suggestions on how we can improve or correct these docs, you can [open an issue](https://github.com/sei-protocol/sei-docs/issues).

### Addding to the Ecosystem Apps list

We welcome contributions to our ecosystem apps section. Please follow the process detailed in [eco-apps](https://github.com/sei-protocol/sei-docs/tree/main/pages/eco-apps.mdx) to add your own apps.
59 changes: 59 additions & 0 deletions components/BrandKitGallery/BrandImage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// components/BrandKitGallery/BrandImage.tsx
import NextImage from 'next/image';
import styles from '../../styles/custom.module.css';
import { useState, useEffect } from 'react';

interface BrandImageProps {
url: string;
alt: string;
name: string;
}

const BrandImage = ({ url, alt, name }: BrandImageProps) => {
const [imageDimensions, setImageDimensions] = useState({ width: 0, height: 0 });
const [showModal, setShowModal] = useState(false);

useEffect(() => {
const img = new window.Image();
img.src = url;
img.onload = () => {
setImageDimensions({ width: img.width, height: img.height });
};
}, [url]);

const handleImageClick = () => {
setShowModal(true);
document.body.style.overflow = 'hidden';
};

const closeModal = () => {
setShowModal(false);
document.body.style.overflow = 'auto';
};

return (
<>
<div className={styles.imageWrapper}>
<div className={styles.imageContainer}>
<NextImage
src={url}
alt={alt}
width={imageDimensions.width}
height={imageDimensions.height}
className={styles.image}
onClick={handleImageClick}
/>
</div>
</div>
{showModal && (
<div className={styles.modal} onClick={closeModal}>
<div className={styles.modalContent}>
<NextImage src={url} alt={alt} layout="fill" objectFit="contain" />
</div>
</div>
)}
</>
);
};

export default BrandImage;
22 changes: 22 additions & 0 deletions components/BrandKitGallery/DownloadButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// components/BrandKitGallery/DownloadButton.tsx
import React from 'react';
import styles from '../../styles/custom.module.css';

const DownloadButton = ({ url, fileName, children }) => {
const handleDownload = () => {
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', fileName);
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
};

return (
<button className={styles.downloadButton} onClick={handleDownload}>
{children}
</button>
);
};

export default DownloadButton;
2 changes: 2 additions & 0 deletions components/BrandKitGallery/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { default as BrandImage } from './BrandImage';
export { default as DownloadButton } from './DownloadButton';
17 changes: 10 additions & 7 deletions components/EcosystemApps/EcosystemApps.tsx
Original file line number Diff line number Diff line change
@@ -1,36 +1,39 @@
import React, { useState, useMemo, useEffect } from 'react';
import { EcosystemCard, EcosystemCards } from '../EcosystemCard';
import appData from '../../data/appData'; // Ensure this import is correct
import appData, { Tag, tagPrettyNames } from '../../data/appData';

const EcosystemApps = () => {
const [searchTerm, setSearchTerm] = useState('');
const [allTags, setAllTags] = useState([]);
const [allTags, setAllTags] = useState<string[]>([]);

// Extract unique tags from appData
useEffect(() => {
const tags = new Set();
const tags = new Set<string>();
appData.forEach(app => app.tags.forEach(tag => tags.add(tag)));
setAllTags(Array.from(tags));
}, []);
// Filter by "title" and "tag" fields from appData.ts // Filter by "title" and "tag" fields from appData.ts

// Filter by "title" and "tag" fields from appData.ts
const filteredApps = useMemo(() => (
appData.filter(app =>
app.title.toLowerCase().includes(searchTerm.toLowerCase()) ||
app.tags.some(tag => tag.toLowerCase().includes(searchTerm.toLowerCase()))
app.tags.some(tag =>
tagPrettyNames[tag]?.some(prettyName => prettyName.toLowerCase().includes(searchTerm.toLowerCase()))
)
)
), [searchTerm]);

return (
<div>
<input
type="text"
placeholder="Search apps by name or tag..."
placeholder="Search apps by name or category..."
value={searchTerm}
onChange={(e) => setSearchTerm(e.target.value)}
className="w-full p-2 text-sm border rounded shadow-sm placeholder-gray-400"
/>
<div className="mt-2 mb-4 text-sm text-gray-600">
<strong>Filter by Tags:</strong> {allTags.join(', ')}
{allTags.join(', ')}
</div>
<EcosystemCards>
{filteredApps.length > 0 ? (
Expand Down
2 changes: 1 addition & 1 deletion components/EcosystemCard/EcosystemCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function EcosystemCard({ image, title, description, href }: EcosystemCardProps)
target="_blank"
rel="noopener noreferrer"
>
<div className="relative w-full"> {/* Adjust height as needed to match your design */}
<div className="relative w-full">
<Image src={image} alt={title} width={700} height={475} priority />
</div>
<div className="flex-1 p-4 bg-gray-100 dark:bg-gray-800">
Expand Down
73 changes: 73 additions & 0 deletions components/EvmWalletConnect/CustomConnectButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// components/EvmWalletConnect/CustomConnectButton.tsx
import { ConnectButton } from "@rainbow-me/rainbowkit";
import styled from 'styled-components';

const CustomButton = styled.button`
background: #001B2A; /* Dark color */
border: none;
color: #ECDEDE; /* Light color */
padding: 0.5rem 1rem;
font-size: 1rem;
cursor: pointer;
transition: color 0.3s, background 0.3s;
display: inline-block;
margin-top: 1rem;
margin-right: 0.5rem;
border-radius: 25px; /* Rounded corners */
text-align: center;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
font-family: 'Inter', sans-serif;

&:hover {
color: #001B2A; /* Dark color */
background: #ECDEDE; /* Light color */
}
`;

const CustomConnectButton = (props) => (
<ConnectButton.Custom>
{({ account, chain, openAccountModal, openConnectModal, openChainModal, mounted }) => {
const ready = mounted;
const connected = ready && account && chain;

return (
<div
{...(!ready && {
'aria-hidden': true,
'style': {
opacity: 0,
pointerEvents: 'none',
userSelect: 'none'
},
})}
>
{(() => {
if (!connected) {
return (
<CustomButton onClick={openConnectModal} type="button">
Connect Wallet
</CustomButton>
);
}

if (chain.unsupported) {
return (
<CustomButton onClick={openChainModal} type="button">
Wrong network
</CustomButton>
);
}

return (
<CustomButton onClick={openAccountModal} type="button">
{account.displayName}
</CustomButton>
);
})()}
</div>
);
}}
</ConnectButton.Custom>
);

export default CustomConnectButton;
89 changes: 43 additions & 46 deletions components/EvmWalletConnect/EvmWalletConnect.tsx
Original file line number Diff line number Diff line change
@@ -1,71 +1,68 @@
// components/EvmWalletConnect/EvmWalletConnect.tsx
import {
ConnectButton,
connectorsForWallets,
RainbowKitProvider,
connectorsForWallets,
RainbowKitProvider,
} from "@rainbow-me/rainbowkit";
import { injectedWallet, metaMaskWallet } from "@rainbow-me/rainbowkit/wallets";
import { Chain, configureChains, createConfig, WagmiConfig } from "wagmi";
import { publicProvider } from "wagmi/providers/public";
import "@rainbow-me/rainbowkit/styles.css";
import { ChainRpcUrls } from "viem/_types/types/chain";
import CustomConnectButton from './CustomConnectButton';

export default function EvmWalletConnect() {
const rpcUrl: ChainRpcUrls = {
http: ["https://evm-rpc-arctic-1.sei-apis.com"],
webSocket: ["wss://evm-ws-arctic-1.sei-apis.com"],
};
const seiDevnet: Chain = {
id: 713715,
name: "Sei EVM Devnet",
network: "sei",
nativeCurrency: {
decimals: 18,
name: "Sei",
symbol: "SEI",
},
rpcUrls: {
public: rpcUrl,
default: rpcUrl,
},
testnet: true,
blockExplorers: {
default: { name: "Seistream", url: "https://seistream.app/" },
},
};
const rpcUrl: ChainRpcUrls = {
http: ["https://evm-rpc.sei-apis.com"],
webSocket: ["wss://evm-ws.sei-apis.com"],
};
const sei: Chain = {
id: 531,
name: "Sei Network",
network: "Sei",
nativeCurrency: {
decimals: 18,
name: "Sei",
symbol: "SEI",
},
rpcUrls: {
public: rpcUrl,
default: rpcUrl,
},
testnet: true,
blockExplorers: {
default: { name: "Seitrace", url: "https://seitrace.com" },
},
};

const { chains, publicClient } = configureChains(
[seiDevnet],
[publicProvider()]
);
const { chains, publicClient } = configureChains(
[sei],
[publicProvider()]
);

const projectId = "385413c214cb74213e0679bc30dd4e4c";
const connectors = connectorsForWallets([
const projectId = "385413c214cb74213e0679bc30dd4e4c";
const connectors = connectorsForWallets([
{
groupName: "Recommended",
wallets: [
groupName: "Recommended",
wallets: [
injectedWallet({ chains }),
metaMaskWallet({ projectId, chains }),
],
],
},
]);
]);

const wagmiConfig = createConfig({
const wagmiConfig = createConfig({
autoConnect: false,
connectors,
publicClient,
});
});

return (
return (
<div className="my-4 flex justify-center">
<WagmiConfig config={wagmiConfig}>
<WagmiConfig config={wagmiConfig}>
<RainbowKitProvider chains={chains}>
<ConnectButton
accountStatus="address"
chainStatus="icon"
showBalance={false}
/>
<CustomConnectButton />
</RainbowKitProvider>
</WagmiConfig>
</WagmiConfig>
</div>
);
);
}
Loading
Loading