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

Staging to main - rootstock-101 track #286

Merged
merged 9 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
48 changes: 0 additions & 48 deletions TODO.md

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/academy/public/authors/dappadan.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/academy/public/track-rootstock-101.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 7 additions & 5 deletions apps/academy/src/components/mdx/QuizCompletedModals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ export interface QuizProps {
nextLessonTitle: string;
actualLessonTitle: string;
quizCompleted: boolean;
successMessage?: { message: string }[];
successMessage?: { message: string }[] | undefined;
successTitle?: string | undefined;
currentLessonPath: string;
actionButton?: { href: string; text: string } | null;
actionButton?: { href: string; text: string } | null | undefined;
partnerTwitterHandle?: string | undefined;
}

export type Answers = Record<string, number[]>;
Expand All @@ -38,9 +39,9 @@ const QuizCompletedModals = ({
"You answered all the quiz questions correctly, great job. Celebrate your learning on Twitter and advance to the next lesson below.",
},
],
// successTitle = "Lesson complete",
currentLessonPath,
actionButton,
partnerTwitterHandle,
}: QuizProps): JSX.Element => {
const [showDialog, setShowDialog] = useState(false);
// const [showKeepGoingModal, setShowKeepGoingModal] = useState(false);
Expand Down Expand Up @@ -114,8 +115,9 @@ const QuizCompletedModals = ({
<div className="flex flex-col gap-y-6">
<a
href={createTwitterIntentLink(
`I completed "${actualLessonTitle}" on @developer_dao Academy.
https://academy.developerdao.com${currentLessonPath}`,
partnerTwitterHandle === undefined
? `I completed "${actualLessonTitle}" on @developer_dao Academy. https://academy.developerdao.com${currentLessonPath}`
: `I completed "${actualLessonTitle}" lesson from ${partnerTwitterHandle} track on @developer_dao Academy. https://academy.developerdao.com${currentLessonPath}`,
)}
target="_blank"
>
Expand Down
7 changes: 5 additions & 2 deletions apps/academy/src/components/mdx/QuizStatusChecker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,18 @@ import Quiz from "./Quiz";

export interface QuizStatusCheckerType {
quiz: string;
successMessage: { message: string }[];
successMessage?: { message: string }[];
successTitle?: string;
actionButton: any;
actionButton?: { href: string; text: string } | null;
partnerTwitterHandle?: string | undefined;
}

const QuizStatusChecker = ({
quiz,
successMessage,
successTitle,
actionButton,
partnerTwitterHandle,
}: QuizStatusCheckerType) => {
const [quizCompleted, setQuizCompleted] = useState<boolean>(false);
const { address, isDisconnected } = useAccount();
Expand Down Expand Up @@ -86,6 +88,7 @@ const QuizStatusChecker = ({
nextLessonTitle={nextLessonTitle}
actualLessonTitle={actualLessonTitle}
currentLessonPath={currentLessonPath}
partnerTwitterHandle={partnerTwitterHandle}
/>
{/* <Badge className="m-auto flex w-fit justify-center bg-green-600">
<span className="text-2xl">Quiz Completed</span>
Expand Down
12 changes: 12 additions & 0 deletions apps/academy/src/data/questions/rootstock-101/1/quiz-1/Q1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"question": "What is the main purpose of a Bitcoin sidechain like Rootstock?",
"options": [
{ "answer": "To replace the Bitcoin network entirely" },
{ "answer": "To increase Bitcoin’s Proof of Work capabilities" },
{
"answer": "To extend Bitcoin’s functionality, such as adding smart contract execution",
"correct": true
},
{ "answer": "To reduce transaction fees on Bitcoin" }
]
}
12 changes: 12 additions & 0 deletions apps/academy/src/data/questions/rootstock-101/1/quiz-1/Q2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"question": "Which of the following conditions must a Bitcoin sidechain meet?",
"options": [
{ "answer": "The native token should be completely independent from Bitcoin" },
{
"answer": "The native token of the sidechain should be transferable between the parent and sidechain",
"correct": true
},
{ "answer": "The sidechain should have its own independent consensus mechanism" },
{ "answer": "The sidechain should always use a different gas token" }
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"question": "What is the primary purpose of The Graph?",
"options": [
{ "ansswer": "To mine cryptocurrencies" },
{ "ansswer": "To secure transactions" },
{ "ansswer": "To organize blockchain data", "correct": true },
{ "ansswer": "To replace the blockchain" }
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"question": "What must be staked by indexers in The Graph network?",
"options": [
{ "answer": "ETH" },
{ "answer": "BTC" },
{ "answer": "RIF" },
{ "answer": "GRT", "correct": true }
]
}
41 changes: 41 additions & 0 deletions apps/academy/src/data/quizzes/rootstock-101/1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"title": "Final Quiz",
"questions": [
{
"question": "How does the 2-Way Peg between Bitcoin and Rootstock work?",
"options": [
{ "answer": "BTC is destroyed to mint new RBTC" },
{
"answer": "BTC is locked on the Bitcoin network and an equivalent amount of RBTC is released on Rootstock",
"correct": true
},
{ "answer": "RBTC and BTC are merged into a single token" },
{ "answer": "BTC can only be transferred one way to Rootstock" }
]
},
{
"question": "What is the function of the PowHSM devices in Rootstock's 2-Way Peg system?",
"options": [
{ "answer": "They provide additional hashing power for Bitcoin mining" },
{
"answer": "They automatically sign transactions to ensure security during Bitcoin and RBTC transfers",
"correct": true
},
{ "answer": "They manually validate every transaction on the network" },
{ "answer": "They allow individual users to approve transactions using private keys" }
]
},
{
"question": "What makes Rootstock compatible with Ethereum smart contracts?",
"options": [
{ "answer": "It uses a new version of Bitcoin scripting language" },
{ "answer": "It is based on a Proof of Stake consensus algorithm" },
{
"answer": "It is EVM-compatible, allowing Solidity-based contracts to run on Rootstock",
"correct": true
},
{ "answer": "It has no compatibility with Ethereum at all" }
]
}
]
}
32 changes: 32 additions & 0 deletions apps/academy/src/data/quizzes/rootstock-101/2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"title": "Final Quiz",
"questions": [
{
"question": "What language is used to query the subgraph?",
"options": [
{ "answer": "SQL" },
{ "answer": "REST" },
{ "answer": "JSON" },
{ "answer": "GraphQL", "correct": true }
]
},
{
"question": "What is the command to build the subgraph?",
"options": [
{ "answer": "graph init" },
{ "answer": "graph codegen && graph build", "correct": true },
{ "answer": "graph auth" },
{ "answer": "graph deploy" }
]
},
{
"question": "What is the purpose of the `graph codegen` command?",
"options": [
{ "answer": "To initialize the subgraph" },
{ "answer": "To build the subgraph" },
{ "answer": "To load the contract's ABI and create types", "correct": true },
{ "answer": "To deploy the subgraph" }
]
}
]
}
32 changes: 32 additions & 0 deletions apps/academy/src/data/quizzes/rootstock-101/3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"title": "Final Quiz",
"questions": [
{
"question": "What is the purpose of the `voters` mapping in the contract?",
"options": [
{ "answer": "To track the number of votes" },
{ "answer": "To prevent double voting", "correct": true },
{ "answer": "To store the addresses of voters" },
{ "answer": "To count the total options" }
]
},
{
"question": "What type of tokens are needed to deploy the contract on the Rootstock testnet?",
"options": [
{ "answer": "BTC" },
{ "answer": "tRBTC", "correct": true },
{ "answer": "ETH" },
{ "answer": "RBTC" }
]
},
{
"question": "What is the purpose of the 'getOptionsCount' function in the smart contract?",
"options": [
{ "answer": "To add a new option to the poll" },
{ "answer": "To vote for an option" },
{ "answer": "To get the count of options", "correct": true },
{ "answer": "To get a specific option by index" }
]
}
]
}
35 changes: 35 additions & 0 deletions apps/academy/src/data/quizzes/rootstock-101/4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"title": "Final Quiz",
"questions": [
{
"question": "Where can you find the ABI of your deployed smart contract?",
"options": [
{ "answer": "In the MetaMask wallet" },
{ "answer": "In the `artifacts/contracts/Poll.json` file", "correct": true },
{ "answer": "On the Rootstock documentation website" },
{ "answer": "In the RainbowKit configuration" }
]
},
{
"question": "Which library is NOT mentioned as a part of the starter kit for building the frontend?",
"options": [
{ "answer": "NextJS" },
{ "answer": "EtherJS" },
{ "answer": "Wagmi" },
{ "answer": "React Router", "correct": true }
]
},
{
"question": "What condition is used in the UI to check if the options are still being loaded?",
"options": [
{ "answer": "isLoadingOptionsCount", "correct": true },
{ "answer": "isVoting" },
{ "answer": "isLoadingPoll" },
{ "answer": "isLoadingTransaction" }
]
}
]
}



1 change: 1 addition & 0 deletions apps/academy/src/pages/tracks/arweave-101/1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ Arweave’s bundled transactions allow you to move actions to L2 if you need mor
message: "Secret code: HOLZBV",
},
]}
partnerTwitterHandle="@ar_io_network"
/>

## Conclusion
Expand Down
1 change: 1 addition & 0 deletions apps/academy/src/pages/tracks/arweave-101/2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ Gateway nodes' indexing and caching features make accessing data on Arweave stra
message: "Secret code: CSSYVH",
},
]}
partnerTwitterHandle="@ar_io_network"
/>

## Conclusion
Expand Down
1 change: 1 addition & 0 deletions apps/academy/src/pages/tracks/arweave-101/3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ You also created your first wallet address and learned about the available Arwea
message: "Secret code: DZBGSD",
},
]}
partnerTwitterHandle="@ar_io_network"
/>

## Conclusion
Expand Down
1 change: 1 addition & 0 deletions apps/academy/src/pages/tracks/arweave-101/4.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ as long as Arweave is online.
message: "Secret code: 6QAIZ6",
},
]}
partnerTwitterHandle="@ar_io_network"
/>

## Conclusion
Expand Down
1 change: 1 addition & 0 deletions apps/academy/src/pages/tracks/arweave-101/5.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,7 @@ gateways and how to structure your code and split your bundle chunks to save mon
message: "Secret code: HlUJAJ",
},
]}
partnerTwitterHandle="@ar_io_network"
/>

## Conclusion
Expand Down
1 change: 1 addition & 0 deletions apps/academy/src/pages/tracks/arweave-201/1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ In this lesson you learned what an Arweave gateway is and how to run one on your
message: "Secret code: BR9LX5",
},
]}
partnerTwitterHandle="@ar_io_network"
/>

## Conclusion
Expand Down
9 changes: 5 additions & 4 deletions apps/academy/src/pages/tracks/arweave-201/2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -408,16 +408,17 @@ In this lesson, you learned how to deploy an Arweave gateway to AWS and everythi
message: "Secret code: PO3ZEO",
},
]}
partnerTwitterHandle="@ar_io_network"
/>

## Conclusion

Hosting an Arweave gateway in the cloud is much more involved than doing so on your machine.
You need to think about reliability, content caching, and security.
Running a gateway improves all users' access to data on Arweave.
Hosting an Arweave gateway in the cloud is much more involved than doing so on your machine.
You need to think about reliability, content caching, and security.
Running a gateway improves all users' access to data on Arweave.
When the AR.IO network goes mainnet, you can join it and earn IO tokens for hosting a gateway.

You might already think it's not enough to just offer access to the data on Arweave. That's why
You might already think it's not enough to just offer access to the data on Arweave. That's why
you'll learn how to add a bundler to your gateway that let's you handle your own uploads.

</LessonLayout>
1 change: 1 addition & 0 deletions apps/academy/src/pages/tracks/arweave-201/3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ upload Arweave transactions on your own.
message: "Secret code: BZB48B",
},
]}
partnerTwitterHandle="@ar_io_network"
/>

## Conclusion
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import LessonLayout from "../../../components/LessonLayout";
import QuizStatusChecker from "../../../components/mdx/QuizStatusChecker";
// import Question from "../../../components/mdx/Question";
import Question from "../../../components/mdx/Question";
// import Callout from "../../../components/mdx/Callout";
// import LessonQuestionsModal from "../../../components/mdx/LessonQuestionsModal";
// import LessonInformationalModal from "../../../components/mdx/LessonInformationalModal";
Expand All @@ -11,6 +11,7 @@ import QuizStatusChecker from "../../../components/mdx/QuizStatusChecker";
authorPosition="Developer_DAO"
authorTwitter="wc49358"
createdDate=""
authorImage="/authors/default.png"
>

## Oracles and API3 (Price Feeds)
Expand Down
Loading