Skip to content

Commit 6a29c3d

Browse files
aditya520anihamdejayantkm30m
authored
Express Relay Docs (#339)
Express Relay Docs V1 Co-authored-by: ani <anirudhtx@gmail.com> Co-authored-by: Jayant Krishnamurthy <jayantkrishnamurthy@gmail.com> Co-authored-by: Amin Moghaddam <amin@pyth.network>
1 parent eed849b commit 6a29c3d

28 files changed

+1361
-0
lines changed

components/AddressTable.tsx

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import { StyledTd } from "./Table";
2+
3+
const AddressTable = ({
4+
entries,
5+
explorer,
6+
}: {
7+
entries: { name: string; value: string }[];
8+
explorer: string;
9+
}) => {
10+
return (
11+
<table>
12+
<tbody>
13+
{entries.map(({ name, value }) => {
14+
const component = (
15+
<code
16+
className={
17+
"nx-border-black nx-border-opacity-[0.04] nx-bg-opacity-[0.03] nx-bg-black nx-break-words nx-rounded-md nx-border nx-py-0.5 nx-px-[.25em] nx-text-[.9em] dark:nx-border-white/10 dark:nx-bg-white/10 "
18+
}
19+
>
20+
{value}
21+
</code>
22+
);
23+
const addLink =
24+
explorer.includes("$ADDRESS") && value.startsWith("0x");
25+
return (
26+
<tr key={name}>
27+
<StyledTd>{name}</StyledTd>
28+
<StyledTd>
29+
{addLink ? (
30+
<a
31+
href={explorer.replace("$ADDRESS", value)}
32+
className={
33+
"nx-text-primary-600 nx-underline nx-decoration-from-font [text-underline-position:from-font]"
34+
}
35+
target={"_blank"}
36+
>
37+
{component}
38+
</a>
39+
) : (
40+
component
41+
)}
42+
</StyledTd>
43+
</tr>
44+
);
45+
})}
46+
</tbody>
47+
</table>
48+
);
49+
};
50+
51+
export default AddressTable;

components/icons/CodeIcon.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const CodeIcon = ({ className }: { className: string }) => {
2+
return (
3+
<svg
4+
xmlns="http://www.w3.org/2000/svg"
5+
viewBox="0 0 1024 1024"
6+
fill="currentColor"
7+
height="1em"
8+
width="1em"
9+
>
10+
<path d="M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" />
11+
</svg>
12+
);
13+
};
14+
15+
export default CodeIcon;

components/icons/ContractIcon.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const ContractIcon = ({ className }: { className: string }) => {
2+
return (
3+
<svg
4+
xmlns="http://www.w3.org/2000/svg"
5+
fill="none"
6+
viewBox="0 0 24 24"
7+
strokeWidth={1.5}
8+
stroke="currentColor"
9+
className={className}
10+
>
11+
<path
12+
strokeLinecap="round"
13+
strokeLinejoin="round"
14+
d="M10.125 2.25h-4.5c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125v-9M10.125 2.25h.375a9 9 0 0 1 9 9v.375M10.125 2.25A3.375 3.375 0 0 1 13.5 5.625v1.5c0 .621.504 1.125 1.125 1.125h1.5a3.375 3.375 0 0 1 3.375 3.375M9 15l2.25 2.25L15 12"
15+
/>
16+
</svg>
17+
);
18+
};
19+
20+
export default ContractIcon;

components/icons/QuestionMarkIcon.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const QuestionMarkIcon = ({ className }: { className: string }) => {
2+
return (
3+
<svg
4+
xmlns="http://www.w3.org/2000/svg"
5+
fill="currentColor"
6+
viewBox="0 0 16 16"
7+
height="1em"
8+
width="1em"
9+
>
10+
<path
11+
fillRule="evenodd"
12+
d="M4.475 5.458c-.284 0-.514-.237-.47-.517C4.28 3.24 5.576 2 7.825 2c2.25 0 3.767 1.36 3.767 3.215 0 1.344-.665 2.288-1.79 2.973-1.1.659-1.414 1.118-1.414 2.01v.03a.5.5 0 01-.5.5h-.77a.5.5 0 01-.5-.495l-.003-.2c-.043-1.221.477-2.001 1.645-2.712 1.03-.632 1.397-1.135 1.397-2.028 0-.979-.758-1.698-1.926-1.698-1.009 0-1.71.529-1.938 1.402-.066.254-.278.461-.54.461h-.777zM7.496 14c.622 0 1.095-.474 1.095-1.09 0-.618-.473-1.092-1.095-1.092-.606 0-1.087.474-1.087 1.091S6.89 14 7.496 14z"
13+
/>
14+
</svg>
15+
);
16+
};
17+
18+
export default QuestionMarkIcon;

components/icons/SearchIcon.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const SearchIcon = ({ className }: { className: string }) => {
2+
return (
3+
<svg
4+
xmlns="http://www.w3.org/2000/svg"
5+
fill="none"
6+
viewBox="0 0 24 24"
7+
strokeWidth={1.5}
8+
stroke="currentColor"
9+
className={className}
10+
>
11+
<path
12+
strokeLinecap="round"
13+
strokeLinejoin="round"
14+
d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"
15+
/>
16+
</svg>
17+
);
18+
};
19+
20+
export default SearchIcon;
513 KB
Loading
520 KB
Loading
495 KB
Loading
623 KB
Loading

images/express_relay/express_relay_schematic.svg

Lines changed: 21 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)