2021-10-27 12:11:16 +00:00
|
|
|
|
import React, { useEffect, useRef } from "react";
|
2021-08-18 12:41:18 +00:00
|
|
|
|
import { getLayout } from "../src/layouts/AppLayout";
|
|
|
|
|
import {
|
|
|
|
|
Heading,
|
|
|
|
|
Text,
|
|
|
|
|
Stack,
|
|
|
|
|
Fade,
|
|
|
|
|
chakra,
|
2021-08-23 16:08:02 +00:00
|
|
|
|
Accordion,
|
|
|
|
|
AccordionItem,
|
|
|
|
|
AccordionButton,
|
|
|
|
|
AccordionPanel,
|
|
|
|
|
AccordionIcon,
|
2021-11-17 14:01:41 +00:00
|
|
|
|
Link,
|
2021-08-18 12:41:18 +00:00
|
|
|
|
} from "@chakra-ui/react";
|
|
|
|
|
import Scrollable from "../src/components/Scrollable";
|
2021-11-17 14:01:41 +00:00
|
|
|
|
import RouterLink from "next/link";
|
2021-08-18 12:41:18 +00:00
|
|
|
|
|
|
|
|
|
const Welcome = () => {
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
if (typeof window !== "undefined") {
|
|
|
|
|
document.title = `Welcome to moonstream.to!`;
|
|
|
|
|
}
|
|
|
|
|
}, []);
|
|
|
|
|
|
2021-08-18 14:08:19 +00:00
|
|
|
|
const scrollRef = useRef();
|
2021-08-18 12:41:18 +00:00
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Scrollable>
|
2021-08-18 14:08:19 +00:00
|
|
|
|
<Stack px="7%" pt={4} w="100%" spacing={4} ref={scrollRef}>
|
2021-10-27 12:11:16 +00:00
|
|
|
|
{/* <StepProgress
|
2021-08-18 12:41:18 +00:00
|
|
|
|
numSteps={ui.onboardingSteps.length}
|
|
|
|
|
currentStep={ui.onboardingStep}
|
2021-09-21 18:37:48 +00:00
|
|
|
|
colorScheme="blue"
|
2021-08-18 12:41:18 +00:00
|
|
|
|
buttonCallback={progressButtonCallback}
|
|
|
|
|
buttonTitles={[
|
|
|
|
|
"Moonstream basics",
|
|
|
|
|
"Setup subscriptions",
|
|
|
|
|
"How to read stream",
|
|
|
|
|
]}
|
|
|
|
|
style="arrows"
|
2021-10-27 12:11:16 +00:00
|
|
|
|
/> */}
|
2021-08-18 12:41:18 +00:00
|
|
|
|
|
2021-10-27 12:11:16 +00:00
|
|
|
|
{true && (
|
2021-08-18 12:41:18 +00:00
|
|
|
|
<Fade in>
|
2021-10-27 12:11:16 +00:00
|
|
|
|
<Stack spacing={4} pb={14}>
|
2021-08-18 12:41:18 +00:00
|
|
|
|
<Stack
|
2021-09-07 20:53:48 +00:00
|
|
|
|
px={[0, 12, null]}
|
2021-08-18 12:41:18 +00:00
|
|
|
|
// mt={24}
|
|
|
|
|
bgColor="gray.50"
|
|
|
|
|
borderRadius="xl"
|
|
|
|
|
boxShadow="xl"
|
|
|
|
|
py={4}
|
|
|
|
|
>
|
|
|
|
|
<Heading as="h4" size="md">
|
2021-08-23 12:58:30 +00:00
|
|
|
|
Greetings traveler!
|
2021-08-18 12:41:18 +00:00
|
|
|
|
</Heading>
|
|
|
|
|
<Text fontWeight="semibold" pl={2}>
|
2021-11-17 14:01:41 +00:00
|
|
|
|
We are very excited welcome you on board!
|
2021-08-18 12:41:18 +00:00
|
|
|
|
</Text>
|
|
|
|
|
|
|
|
|
|
<Text fontWeight="semibold" pl={2}>
|
|
|
|
|
Moonstream is a product which helps anyone participate in
|
2021-08-23 12:58:30 +00:00
|
|
|
|
decentralized finance.
|
2021-08-18 12:41:18 +00:00
|
|
|
|
</Text>
|
|
|
|
|
<Text fontWeight="semibold" pl={2}>
|
2021-08-23 12:58:30 +00:00
|
|
|
|
Moonstream is meant to give you critical insights you’ll need
|
|
|
|
|
to succeed in your crypto quest!
|
2021-08-18 12:41:18 +00:00
|
|
|
|
</Text>
|
|
|
|
|
</Stack>
|
|
|
|
|
<Stack
|
2021-09-07 20:53:48 +00:00
|
|
|
|
px={[0, 12, null]}
|
2021-08-18 12:41:18 +00:00
|
|
|
|
// mt={24}
|
|
|
|
|
bgColor="gray.50"
|
|
|
|
|
borderRadius="xl"
|
|
|
|
|
boxShadow="xl"
|
|
|
|
|
py={4}
|
|
|
|
|
>
|
2021-08-23 16:08:02 +00:00
|
|
|
|
<Accordion allowToggle>
|
|
|
|
|
<AccordionItem borderWidth={0}>
|
|
|
|
|
<h2>
|
|
|
|
|
<AccordionButton borderWidth={0}>
|
|
|
|
|
<Heading as="h4" size="md">
|
|
|
|
|
How does Moonstream work?
|
|
|
|
|
</Heading>
|
|
|
|
|
<AccordionIcon />
|
|
|
|
|
</AccordionButton>
|
|
|
|
|
</h2>
|
|
|
|
|
<AccordionPanel pb={4} borderWidth={0}>
|
|
|
|
|
<Stack direction="column">
|
|
|
|
|
<chakra.span fontWeight="semibold" pl={2}>
|
|
|
|
|
<Text fontWeight="bold" display="inline">
|
|
|
|
|
We run nodes
|
|
|
|
|
</Text>{" "}
|
|
|
|
|
- Get precise and accurate data by querying our
|
|
|
|
|
database. You’re getting the same data miners have
|
|
|
|
|
access to and you don’t have to maintain your own
|
|
|
|
|
node.
|
|
|
|
|
</chakra.span>
|
|
|
|
|
<chakra.span fontWeight="semibold" pl={2}>
|
|
|
|
|
<Text fontWeight="bold" display="inline">
|
|
|
|
|
We crawl data
|
|
|
|
|
</Text>{" "}
|
|
|
|
|
- We analyze millions of transactions, data, and smart
|
|
|
|
|
contract code to link them together.
|
|
|
|
|
</chakra.span>
|
2021-08-18 12:41:18 +00:00
|
|
|
|
|
2021-08-23 16:08:02 +00:00
|
|
|
|
<chakra.span fontWeight="semibold" pl={2}>
|
|
|
|
|
<Text fontWeight="bold" display="inline">
|
|
|
|
|
We provide data
|
|
|
|
|
</Text>
|
|
|
|
|
- You can fetch data through our front end or through
|
|
|
|
|
API.
|
|
|
|
|
</chakra.span>
|
2021-08-18 12:41:18 +00:00
|
|
|
|
|
2021-08-23 16:08:02 +00:00
|
|
|
|
<chakra.span fontWeight="semibold" pl={2}>
|
|
|
|
|
<Text fontWeight="bold" display="inline">
|
|
|
|
|
We analyze data
|
|
|
|
|
</Text>
|
|
|
|
|
- We find the most interesting information and
|
|
|
|
|
highlight it
|
|
|
|
|
</chakra.span>
|
|
|
|
|
</Stack>
|
|
|
|
|
</AccordionPanel>
|
|
|
|
|
</AccordionItem>
|
2021-11-17 14:01:41 +00:00
|
|
|
|
<AccordionItem borderWidth={0}>
|
|
|
|
|
<h2>
|
|
|
|
|
<AccordionButton borderWidth={0}>
|
|
|
|
|
<Heading as="h4" size="md">
|
|
|
|
|
How do I build my smart contract dashboard?
|
|
|
|
|
</Heading>
|
|
|
|
|
<AccordionIcon />
|
|
|
|
|
</AccordionButton>
|
|
|
|
|
</h2>
|
|
|
|
|
<AccordionPanel pb={4} borderWidth={0}>
|
|
|
|
|
<Stack direction="column">
|
|
|
|
|
<chakra.span fontWeight="semibold" pl={2}>
|
|
|
|
|
<Text fontWeight="bold" display="inline">
|
|
|
|
|
1. Subscribe
|
|
|
|
|
</Text>{" "}
|
2021-11-17 14:47:22 +00:00
|
|
|
|
- Tell us what addresses you want Moonstream to track
|
|
|
|
|
the activity of. You can do this at{" "}
|
2021-11-17 14:01:41 +00:00
|
|
|
|
<RouterLink passHref href="/subscriptions">
|
|
|
|
|
<Link color="orange.500">subscriptions page</Link>
|
|
|
|
|
</RouterLink>{" "}
|
|
|
|
|
or simply by just clicking + on navigation bar of this
|
|
|
|
|
page.
|
|
|
|
|
</chakra.span>
|
|
|
|
|
<chakra.span fontWeight="semibold" pl={2}>
|
|
|
|
|
<Text fontWeight="bold" display="inline">
|
|
|
|
|
2. Provide ABI to subscription
|
|
|
|
|
</Text>{" "}
|
2021-11-17 14:47:22 +00:00
|
|
|
|
- If that address is a smart contract, provide an{" "}
|
|
|
|
|
<Link
|
|
|
|
|
color="orange.500"
|
|
|
|
|
href="https://docs.soliditylang.org/en/develop/abi-spec.html"
|
|
|
|
|
>
|
|
|
|
|
ABI
|
|
|
|
|
</Link>{" "}
|
|
|
|
|
for that contract. You can upload one at{" "}
|
2021-11-17 14:01:41 +00:00
|
|
|
|
<RouterLink passHref href="/subscriptions">
|
|
|
|
|
<Link color="orange.500">subscriptions page</Link>
|
|
|
|
|
</RouterLink>
|
2021-11-17 14:47:22 +00:00
|
|
|
|
. If you are not sure what an ABI is, ask us on{" "}
|
2021-11-17 14:01:41 +00:00
|
|
|
|
<Link
|
|
|
|
|
color="orange.500"
|
|
|
|
|
isExternal
|
|
|
|
|
href={"https://discord.gg/K56VNUQGvA"}
|
|
|
|
|
>
|
|
|
|
|
Discord
|
|
|
|
|
</Link>{" "}
|
|
|
|
|
. <br />
|
2021-11-17 14:47:22 +00:00
|
|
|
|
Your dashboard will contain analytics for all the
|
|
|
|
|
interfaces listed in your ABI. Customization is coming
|
|
|
|
|
soon.
|
2021-11-17 14:01:41 +00:00
|
|
|
|
</chakra.span>
|
|
|
|
|
|
|
|
|
|
<chakra.span fontWeight="semibold" pl={2}>
|
|
|
|
|
<Text fontWeight="bold" display="inline">
|
|
|
|
|
3. Create your dashboard
|
|
|
|
|
</Text>{" "}
|
|
|
|
|
- Press {`"New dashboard"`} on sidebar, or from + on
|
|
|
|
|
navbar menu. Fill in name, select subscriptons you
|
|
|
|
|
like to track to and checkbox what are you interested
|
|
|
|
|
in. If there is no ABI - tracking contract specific
|
2021-11-17 14:47:22 +00:00
|
|
|
|
elements {`won't`} be available.
|
2021-11-17 14:01:41 +00:00
|
|
|
|
</chakra.span>
|
|
|
|
|
|
|
|
|
|
<chakra.span fontWeight="semibold" pl={2}>
|
|
|
|
|
<Text fontWeight="bold" display="inline">
|
|
|
|
|
4. Get some coffee -
|
|
|
|
|
</Text>{" "}
|
|
|
|
|
Your dashboard will appear on sidebar right away after
|
2021-11-17 14:47:22 +00:00
|
|
|
|
successful creation. However, populating initially
|
|
|
|
|
with data will take some time. Our crawlers run in a 5
|
|
|
|
|
minute cycle, they will start from newest block and
|
|
|
|
|
will move down till genesis block.
|
2021-11-17 14:01:41 +00:00
|
|
|
|
</chakra.span>
|
|
|
|
|
</Stack>
|
|
|
|
|
</AccordionPanel>
|
|
|
|
|
</AccordionItem>
|
2021-08-23 16:08:02 +00:00
|
|
|
|
</Accordion>
|
2021-08-18 12:41:18 +00:00
|
|
|
|
</Stack>
|
|
|
|
|
</Stack>
|
|
|
|
|
</Fade>
|
|
|
|
|
)}
|
2021-08-18 14:08:19 +00:00
|
|
|
|
|
2021-10-27 12:11:16 +00:00
|
|
|
|
{/* <ButtonGroup>
|
2021-08-18 12:41:18 +00:00
|
|
|
|
<Button
|
2021-09-21 18:37:48 +00:00
|
|
|
|
colorScheme="orange"
|
2021-08-18 12:41:18 +00:00
|
|
|
|
leftIcon={<ArrowLeftIcon />}
|
|
|
|
|
variant="outline"
|
|
|
|
|
hidden={ui.onboardingStep === 0}
|
|
|
|
|
disabled={ui.onboardingStep === 0}
|
2021-08-18 14:08:19 +00:00
|
|
|
|
onClick={() => {
|
|
|
|
|
ui.setOnboardingStep(ui.onboardingStep - 1);
|
|
|
|
|
scrollRef?.current?.scrollIntoView();
|
|
|
|
|
}}
|
2021-08-18 12:41:18 +00:00
|
|
|
|
>
|
2021-08-23 16:08:02 +00:00
|
|
|
|
Go back
|
2021-08-18 12:41:18 +00:00
|
|
|
|
</Button>
|
|
|
|
|
<Spacer />
|
|
|
|
|
<Button
|
2021-08-23 16:08:02 +00:00
|
|
|
|
colorScheme={
|
|
|
|
|
ui.onboardingStep < ui.onboardingSteps.length - 1
|
2021-09-21 18:37:48 +00:00
|
|
|
|
? `orange`
|
|
|
|
|
: `green`
|
2021-08-23 16:08:02 +00:00
|
|
|
|
}
|
|
|
|
|
variant={
|
|
|
|
|
ui.onboardingStep < ui.onboardingSteps.length - 1
|
|
|
|
|
? `solid`
|
|
|
|
|
: `outline`
|
|
|
|
|
}
|
|
|
|
|
rightIcon={
|
|
|
|
|
ui.onboardingStep < ui.onboardingSteps.length - 1 && (
|
|
|
|
|
<ArrowRightIcon />
|
|
|
|
|
)
|
|
|
|
|
}
|
2021-08-18 12:41:18 +00:00
|
|
|
|
onClick={() => handleNextClick()}
|
|
|
|
|
>
|
|
|
|
|
{ui.onboardingStep < ui.onboardingSteps.length - 1
|
|
|
|
|
? `Next`
|
2021-08-23 16:08:02 +00:00
|
|
|
|
: `Finish and move to stream`}
|
2021-08-18 12:41:18 +00:00
|
|
|
|
</Button>
|
2021-10-27 12:11:16 +00:00
|
|
|
|
</ButtonGroup> */}
|
2021-08-18 12:41:18 +00:00
|
|
|
|
</Stack>
|
|
|
|
|
</Scrollable>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
Welcome.getLayout = getLayout;
|
|
|
|
|
export default Welcome;
|