Skip to content

Commit

Permalink
prettier add and run
Browse files Browse the repository at this point in the history
  • Loading branch information
CrackTheCode016 committed Aug 28, 2023
1 parent d14b8a0 commit 0f0994f
Show file tree
Hide file tree
Showing 173 changed files with 4,266 additions and 2,327 deletions.
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/content-addition.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: Content Addition
about: For adding new educational content.
title: "[Content Addition]"
labels: Content Addition
assignees: ''

assignees: ""
---

## Does this address existing content?
Expand Down
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/content-refactor.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Content Refactor
about: 'For refactoring existing content and addressing inaccuracies. '
about: "For refactoring existing content and addressing inaccuracies. "
title: "[Content Refactor] TITLE-HERE"
labels: Content Refactor
assignees: ''

assignees: ""
---

## Which page(s)? Please link them below.
Expand Down
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/infra-major.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
---
name: Major Infra Refactor
about: 'For major changes regarding sitewide infrastructure changes.'
about: "For major changes regarding sitewide infrastructure changes."
title: "[Infra Refactor] TITLE-HERE"
labels: Major Infra Refactor
assignees: ''

assignees: ""
---

## Highlight the main issue(s) below:

## What is the proposed solution?
## What is the proposed solution?
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/infra-minor.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
---
name: Minor Infra Refactor
about: 'For minor changes regarding configuration of Docusaurus and its deployment.'
about: "For minor changes regarding configuration of Docusaurus and its deployment."
title: "[Infra Refactor] TITLE-HERE"
labels: Minor Infra Refactor
assignees: ''

assignees: ""
---

## Highlight the main issue(s) below:

## What is the proposed solution?
## What is the proposed solution?
8 changes: 4 additions & 4 deletions .github/workflows/links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v3
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
folder-path: './docs/*/**.md'
- uses: actions/checkout@v3
use-quiet-mode: "yes"
use-verbose-mode: "yes"
folder-path: "./docs/*/**.md"
- uses: actions/checkout@v3
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
"singleQuote": false,
"printWidth": 100,
"proseWrap": "always"
}
}
7 changes: 4 additions & 3 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[![CC BY 4.0][cc-by-shield]][cc-by][![License: MIT](https://img.shields.io/badge/License-MIT-black.svg)](https://opensource.org/licenses/MIT)

Unless explicitly specified, the educational content in this repo including files, text, images and videos, but excluding code is licensed under
[Creative Commons Attribution 4.0 International License][cc-by]. All software or computer code is licensed under the [MIT License](https://opensource.org/licenses/MIT).

Unless explicitly specified, the educational content in this repo including files, text, images and
videos, but excluding code is licensed under [Creative Commons Attribution 4.0 International
License][cc-by]. All software or computer code is licensed under the
[MIT License](https://opensource.org/licenses/MIT).

[cc-by]: http://creativecommons.org/licenses/by/4.0/
[cc-by-image]: https://i.creativecommons.org/l/by/4.0/88x31.png
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[![CC BY 4.0][cc-by-shield]][cc-by][![License: MIT](https://img.shields.io/badge/License-MIT-black.svg)](https://opensource.org/licenses/MIT)


[cc-by]: http://creativecommons.org/licenses/by/4.0/
[cc-by-image]: https://i.creativecommons.org/l/by/4.0/88x31.png
[cc-by-shield]: https://img.shields.io/badge/License-CC%20BY%204.0-black.svg
Expand All @@ -9,15 +8,15 @@

## Contribution Guidelines

The Technical Education team at Web3 Foundation are the primary maintainers of this repository and will review
all issues and pull requests created here. If you notice typos or grammatical errors, please feel free
to create pull requests with these corrections directly. It is generally preferable to create a pull request
over an issue to propose a change to the content.
The Technical Education team at Web3 Foundation are the primary maintainers of this repository and
will review all issues and pull requests created here. If you notice typos or grammatical errors,
please feel free to create pull requests with these corrections directly. It is generally preferable
to create a pull request over an issue to propose a change to the content.

# Website

Hosted on GitHub pages - https://w3f.github.io/w3f-education/.
This website is built using [Docusaurus](https://docusaurus.io/).
Hosted on GitHub pages - https://w3f.github.io/w3f-education/. This website is built using
[Docusaurus](https://docusaurus.io/).

## Installation and Local Development$

Expand All @@ -31,4 +30,5 @@ yarn install
yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
This command starts a local development server and opens up a browser window. Most changes are
reflected live without having to restart the server.
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
};
7 changes: 5 additions & 2 deletions blog/2021-08-12-MOOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@ author_url: https://github.com/DrW3RK
author_image_url: https://avatars.githubusercontent.com/u/86818441?v=4
tags: [Polkadot, MOOC]
---
The technical education team at the Web3 Foundation is pioneering the initiative of creating an introductory course
on Polkadot. This will be a Massively Online Open Course (MOOC) hosted on a platform that can issue credentials for course completion. The MOOC development will be in the open and will be driven by the contributions from the community which will be curated by Web3 Foundation.

The technical education team at the Web3 Foundation is pioneering the initiative of creating an
introductory course on Polkadot. This will be a Massively Online Open Course (MOOC) hosted on a
platform that can issue credentials for course completion. The MOOC development will be in the open
and will be driven by the contributions from the community which will be curated by Web3 Foundation.
28 changes: 24 additions & 4 deletions docs/AtoZ/account.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,41 @@ sidebar_position: 1

## What is an account?

Accounts are also sometimes referred to as wallets or addresses. On blockchains, we need a place to hold our assets, and this is what accounts are used for. A user can have many accounts. On Polkadot and Kusama, unlike most other public blockchains, we can even give accounts on-chain, authenticated, and human-readable identities if we would like to.
Accounts are also sometimes referred to as wallets or addresses. On blockchains, we need a place to
hold our assets, and this is what accounts are used for. A user can have many accounts. On Polkadot
and Kusama, unlike most other public blockchains, we can even give accounts on-chain, authenticated,
and human-readable identities if we would like to.

## What a Polkadot account public key looks like

14dQ7nC8YabzseZ5iqvG4EQnrkTCsUCwMbCP6nQWeKgjF6Ye

Accounts on Polkadot and Kusama are SS58-encoded key-network pairs. By representing an address as a combination of keys and network IDs, it makes sending assets to an address that is unusable much less likely (Ethereum only uses keys; imagine sending ETH from Ethereum mainnet to an account that only exists on Binance Smart Chain, which is another EVM-based chain and being confused as to why you can’t see the ETH on Binance Smart Chain). SS58 is a slight modification of the Bitcoin Base-58-Check encoding. By using different address prefixes, we can easily tell if an account is on the same chain as another. For example, Polkadot addresses start with a 1, Kusama is always with a capital letter, generic substrate addresses will start with a 5.
Accounts on Polkadot and Kusama are SS58-encoded key-network pairs. By representing an address as a
combination of keys and network IDs, it makes sending assets to an address that is unusable much
less likely (Ethereum only uses keys; imagine sending ETH from Ethereum mainnet to an account that
only exists on Binance Smart Chain, which is another EVM-based chain and being confused as to why
you can’t see the ETH on Binance Smart Chain). SS58 is a slight modification of the Bitcoin
Base-58-Check encoding. By using different address prefixes, we can easily tell if an account is on
the same chain as another. For example, Polkadot addresses start with a 1, Kusama is always with a
capital letter, generic substrate addresses will start with a 5.

## Creating an account

Like any blockchain address, Polkadot and Kusama accounts are controlled with public-private key pairs. This is a cryptographic way of creating a public-facing id that is intrinsically linked to a private id, which should be kept secret. The address generation starts with a mnemonic phrase which is then converted into a public-private key pair. Because different wallets use different ways to derive the public and private keys from the mnemonic phrase, there can be issues with deriving the same public and private key pairs from the same mnemonic on different wallets.
Like any blockchain address, Polkadot and Kusama accounts are controlled with public-private key
pairs. This is a cryptographic way of creating a public-facing id that is intrinsically linked to a
private id, which should be kept secret. The address generation starts with a mnemonic phrase which
is then converted into a public-private key pair. Because different wallets use different ways to
derive the public and private keys from the mnemonic phrase, there can be issues with deriving the
same public and private key pairs from the same mnemonic on different wallets.

## What a mnemonic phrase looks like

way pumpkin card castle crystal domain mystery chalk dog twin chronic image

## Portability

Accounts can also be utilized across Substrate chains. Since addresses are the result of encoding a public key and a network ID, we can create an address for another chain by decoding the address, changing the network ID, and encoding the key with the new network ID, resulting in a new address that is controlled by the same underlying key. This allows you to use one mnemonic phrase across multiple Substrate chains.
Accounts can also be utilized across Substrate chains. Since addresses are the result of encoding a
public key and a network ID, we can create an address for another chain by decoding the address,
changing the network ID, and encoding the key with the new network ID, resulting in a new address
that is controlled by the same underlying key. This allows you to use one mnemonic phrase across
multiple Substrate chains.
51 changes: 41 additions & 10 deletions docs/AtoZ/bridge.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,59 @@ sidebar_position: 2

## What are Bridges?

Bridges are connections to the Polkadot relay chain that have special properties which allow them to communicate with other blockchains. They’re secured via the Polkadot consensus and are maintained by a group of participants called Collators which we will cover in next week's post for letter C. Bridges are the cornerstone of interoperability that Polkadot is looking to deliver in the blockchain ecosystem. We can think of them as communication channels for isolated blockchains, such as Bitcoin or Ethereum, that can send messages, mint new coins, securely lock funds, and burn tokens, among other functionality. With a bridge, we enable more complex applications to be developed that can use multiple blockchains for functionality, hence combating the issue of chain maximalism.
Bridges are connections to the Polkadot relay chain that have special properties which allow them to
communicate with other blockchains. They’re secured via the Polkadot consensus and are maintained by
a group of participants called Collators which we will cover in next week's post for letter C.
Bridges are the cornerstone of interoperability that Polkadot is looking to deliver in the
blockchain ecosystem. We can think of them as communication channels for isolated blockchains, such
as Bitcoin or Ethereum, that can send messages, mint new coins, securely lock funds, and burn
tokens, among other functionality. With a bridge, we enable more complex applications to be
developed that can use multiple blockchains for functionality, hence combating the issue of chain
maximalism.

## How do Bridges work?

Let's consider an example; we have two bridges, one for BTC and another for ETH, and Bob wants to transfer BTC to ETH. Polkadot can facilitate this transaction via the use of it’s messaging protocol that allows bridges to communicate with each other, this is called XCMP. The BTC bridge will send a message to the ETH bridge with the amount of BTC and Bobs ETH account into which the bridge will deposit the newly minted ETH token, let's call this PBTC. The token minting logic is executed by an Ethereum smart contract, which the bridge can trigger. Once the transaction happens on both bridges and the PBTC is minted at a 1:1 ratio as the sent BTC amount, the PBTC is deposited to Bob's ETH account.
Meanwhile, the original BTC is locked up in the BTC bridge, which will be accessible only by the original sender of the transaction. So if Bob ever wants to transfer the PBTC back into his BTC account, the same smart contract can burn the PBTC on the Ethereum blockchain, take the locked up 1:1 and send it back to Bob’s BTC account. This is all secured by the bridge's Collators, synchronized with the consensus of the bridged blockchain and the Polkadot blockchain.
Let's consider an example; we have two bridges, one for BTC and another for ETH, and Bob wants to
transfer BTC to ETH. Polkadot can facilitate this transaction via the use of it’s messaging protocol
that allows bridges to communicate with each other, this is called XCMP. The BTC bridge will send a
message to the ETH bridge with the amount of BTC and Bobs ETH account into which the bridge will
deposit the newly minted ETH token, let's call this PBTC. The token minting logic is executed by an
Ethereum smart contract, which the bridge can trigger. Once the transaction happens on both bridges
and the PBTC is minted at a 1:1 ratio as the sent BTC amount, the PBTC is deposited to Bob's ETH
account. Meanwhile, the original BTC is locked up in the BTC bridge, which will be accessible only
by the original sender of the transaction. So if Bob ever wants to transfer the PBTC back into his
BTC account, the same smart contract can burn the PBTC on the Ethereum blockchain, take the locked
up 1:1 and send it back to Bob’s BTC account. This is all secured by the bridge's Collators,
synchronized with the consensus of the bridged blockchain and the Polkadot blockchain.

See this video for a visual explanation of this process:
How Bitcoin and Ethereum can Cooperate and Collaborate Through Polkadot with Bruno Skvorc
See this video for a visual explanation of this process: How Bitcoin and Ethereum can Cooperate and
Collaborate Through Polkadot with Bruno Skvorc

:::info

Learn more about how Bitcoin and Ethereum can cooperate and collaborate through Polkadot in [this video](https://www.youtube.com/watch?v=rvoFUiOR3cM) by Bruno Skvorc.
Learn more about how Bitcoin and Ethereum can cooperate and collaborate through Polkadot in
[this video](https://www.youtube.com/watch?v=rvoFUiOR3cM) by Bruno Skvorc.

:::


## How can we achieve Bridges?

There are a couple ways to develop a Bridge on Polkadot. Primary way is to use the Bridge pallet through the Substrate framework, which the Polkadot and Kusama blockchains are also built with. Another way is to use smart contracts, especially if the blockchain being bridged is not a Substrate chain. For example, bridging Ethereum will require this approach where a smart contract living on Ethereum can execute the logic that the bridge requires. And lastly we can use Higher-order protocols like XClaim, a base protocol on which we can build bridges on top of. This is only recommended if the asset being bridged does not have a smart contract platform on-chain, such as BTC.
There are a couple ways to develop a Bridge on Polkadot. Primary way is to use the Bridge pallet
through the Substrate framework, which the Polkadot and Kusama blockchains are also built with.
Another way is to use smart contracts, especially if the blockchain being bridged is not a Substrate
chain. For example, bridging Ethereum will require this approach where a smart contract living on
Ethereum can execute the logic that the bridge requires. And lastly we can use Higher-order
protocols like XClaim, a base protocol on which we can build bridges on top of. This is only
recommended if the asset being bridged does not have a smart contract platform on-chain, such as
BTC.

## What are some projects that’re building Bridges, and how can you build a Bridge?

Bridges are software that needs to be written and maintained, so what’re some examples of this in the real world? Interoperability in a decentralized, trustless way is a difficult endeavor. At Web3 Foundation, we fund different applications looking to build bridges, such as ChainSafe and Centrifuge, through our grants program. Another Web3 funded project called PolkaBTC has developed a Substrate bridge to BTC. And ChainX, as mentioned earlier, is a protocol that can be utilized to develop bridges, and a BTC bridge has been built using that.
If you’re interested in building your bridge, start by looking into the Parity Bridges Common repository, where the team at Parity have put together a collection of valuable components when building bridges.
Bridges are software that needs to be written and maintained, so what’re some examples of this in
the real world? Interoperability in a decentralized, trustless way is a difficult endeavor. At Web3
Foundation, we fund different applications looking to build bridges, such as ChainSafe and
Centrifuge, through our grants program. Another Web3 funded project called PolkaBTC has developed a
Substrate bridge to BTC. And ChainX, as mentioned earlier, is a protocol that can be utilized to
develop bridges, and a BTC bridge has been built using that. If you’re interested in building your
bridge, start by looking into the Parity Bridges Common repository, where the team at Parity have
put together a collection of valuable components when building bridges.
Loading

0 comments on commit 0f0994f

Please sign in to comment.