diff --git a/config.ts b/config.ts index 74ae4ae..4a3f16a 100644 --- a/config.ts +++ b/config.ts @@ -88,7 +88,7 @@ const config: Config = { label: 'Next steps', content: [ { - label: 'Chapter overview: Next steps', + label: 'Chapter Overview: Next steps', path: '/content/module-3', }, { @@ -97,6 +97,36 @@ const config: Config = { }, ], }, + { + label: 'Guides and How Tos', + content: [ + { + label: 'Add Topos and Incal to Metamask', + path: '/content/how-to/add-topos-and-incal-to-metamask.html' + }, + { + label: 'Use the Faucet to Get Testnet Tokens', + path: '/content/how-to/use-the-faucet.html' + }, + ] + }, + { + label: 'Topos Reference', + content: [ + { + label: 'FAQ', + path: '/content/topos-reference/faq.html', + }, + { + label: 'Weak Causal Probabilistic Reliable Broadcast', + path: '/content/topos-reference/wcprb.html', + }, + { + label: 'Glossary', + path: '/content/glossary.html', + }, + ], + }, { label: 'Network', content: [ @@ -122,23 +152,6 @@ const config: Config = { }, ], }, - { - label: 'Topos Reference', - content: [ - { - label: 'FAQ', - path: '/content/topos-reference/faq.html', - }, - { - label: 'Weak Causal Probabilistic Reliable Broadcast', - path: '/content/topos-reference/wcprb.html', - }, - { - label: 'Glossary', - path: '/content/glossary.html', - }, - ], - }, { label: 'Legal', content: [ diff --git a/content/how-to/add-topos-and-incal-to-metamask.md b/content/how-to/add-topos-and-incal-to-metamask.md new file mode 100644 index 0000000..7b8d892 --- /dev/null +++ b/content/how-to/add-topos-and-incal-to-metamask.md @@ -0,0 +1,129 @@ +--- +title: Add Topos and Incal to Metamask +description: Before working with the Topos Testnet, you need to tell your Metamask Wallet about the subnets +--- + +# Add Topos and Incal to Metamask + +In order to work with the Topos Testnet, you need to tell your wallet about the subnets. We currently recommend [MetaMask](https://metamask.io/download/) as the wallet of choice for the Topos Testnet. If you do not already have it installed, please [download](https://metamask.io/download/) and install it. + +This document will walk you through two different approaches for completing this. The most educational approach is to manually add the subnets to your MetaMask wallet. However, if you prefer, you can follow the procedure to [automatically add the subnets to your wallet](#alternative-method-leverage-the-erc20-messaging-app) using the ERC20 Messaging App. + +## Add Topos and Incal to MetaMask Manually + +Adding the networks to your MetaMask wallet manually is a useful exercise if you are new to MetaMask and web3 development, as it allows you to better understand the data that underlies the process. + +### Add Topos to Metamask + + + +Once you have installed MetaMask, you will need to add the Topos subnet to it. To do this, open the MetaMask extension and click on the Networks dropdown. + + +![MetaMask Networks Dropdown](/images/metamask-networks-dropdown.png) + + +Then click on the "Add Network" button. + + + + +![MetaMask Add Network](/images/metamask-add-network.png) + + +Your browser will open an a MetaMask interface to add a new network. From that page, select the "Add a network manually" button. + + + + +![MetaMask Add Topos](/images/metamask-add-topos.png) + + +Then enter the following information and press the "Save" button: + +- *Network Name*: **Topos** +- *New RPC URL*: **https://rpc.topos-subnet.testnet-1.topos.technology** +- *Chain ID*: **2359** +- *Currency Symbol*: **TOPOS** +- *Block Explorer URL*: **https://explorer.testnet-1.topos.technology** + + +![Topos Added Successfully](/images/metamask-topos-added.png) + + + + + +### Add Incal to Metamask + +To add Incal to Metamask, you will need to repeat the process above, but with the following information: + + +![MetaMask Add Incal](/images/metamask-add-incal.png) + + +- *Network Name*: **Incal** +- *New RPC URL*: **https://rpc.incal.testnet-1.topos.technology** +- *Chain ID*: **2360** +- *Currency Symbol*: **INCA** +- *Block Explorer URL*: **https://explorer.testnet-1.topos.technology** + +## Alternative Method -- Leverage the ERC20 Messaging App + +As an alternative approach, you can use the [ERC20 Messaging App](https://dapp-frontend-erc20.testnet-1.topos.technology/) to add the Topos and Incal subnets to your MetaMask wallet. + + + + +To do this, first [navigate to the application](https://dapp-frontend-erc20.testnet-1.topos.technology/). You should see a screen like this: + + +![ERC20 Messaging App](/images/erc20-messaging-connect-wallet.png) + + + + +Press the `Connect to MetaMask` button. You should see a MetaMask popup like this: + + +![MetaMask Connect](/images/metamask-connect.png) + + + + +Click `Next` and then `Connect` to the confirmation popup. + + +![MetaMask Connect Confirm](/images/metamask-connect-confirm.png) + + + + +You should see the ERC20 Messaging app page change to reflect your wallet address in the upper right of the page: + + +![ERC20 Messaging App Connected](/images/erc20-messaging-connected.png) + + + + +At this point, selecting a subnet from the `Sending subnet` dropdown will automatically trigger adding that subnet to your MetaMask wallet: + + +![ERC20 Messaging App Connected](/images/erc20-metamask-add-topos.png) + + + + +Scroll down in the popup and click 'Approve'. The network will now be added to your MetaMask wallet. You should do this for both Topos and Incal. Once you have done this for both, opening the MetaMask extension, and clicking on the Networks dropdown should show both subnets: + + +![MetaMask Networks Dropdown](/images/erc20-metamask-networks-populated.png) + + + + + +# Wrapping Up + +At this point, you should have both the Topos and the Incal subnets added to your MetaMask wallet. You will probably need to request tokens from the [Topos Faucet](https://faucet.testnet-1.topos.technology) in order to continue learning and experimenting. You can follow the instructions in our [How to use the Faucet to get Testnet Tokens](/content/how-to/use-the-faucet.html) guide to do this. \ No newline at end of file diff --git a/content/how-to/images/erc20-messaging-connect-wallet.png b/content/how-to/images/erc20-messaging-connect-wallet.png new file mode 100644 index 0000000..b9db9d2 Binary files /dev/null and b/content/how-to/images/erc20-messaging-connect-wallet.png differ diff --git a/content/how-to/images/erc20-messaging-connected.png b/content/how-to/images/erc20-messaging-connected.png new file mode 100644 index 0000000..4bf2bae Binary files /dev/null and b/content/how-to/images/erc20-messaging-connected.png differ diff --git a/content/how-to/images/erc20-metamask-add-topos.png b/content/how-to/images/erc20-metamask-add-topos.png new file mode 100644 index 0000000..bf560dc Binary files /dev/null and b/content/how-to/images/erc20-metamask-add-topos.png differ diff --git a/content/how-to/images/erc20-metamask-networks-populated.png b/content/how-to/images/erc20-metamask-networks-populated.png new file mode 100644 index 0000000..f26832d Binary files /dev/null and b/content/how-to/images/erc20-metamask-networks-populated.png differ diff --git a/content/how-to/images/faucet-success.png b/content/how-to/images/faucet-success.png new file mode 100644 index 0000000..23ac2f9 Binary files /dev/null and b/content/how-to/images/faucet-success.png differ diff --git a/content/how-to/images/faucet-too-soon-error.png b/content/how-to/images/faucet-too-soon-error.png new file mode 100644 index 0000000..7164225 Binary files /dev/null and b/content/how-to/images/faucet-too-soon-error.png differ diff --git a/content/how-to/images/faucet.png b/content/how-to/images/faucet.png new file mode 100644 index 0000000..fd900b9 Binary files /dev/null and b/content/how-to/images/faucet.png differ diff --git a/content/how-to/images/metamask-add-incal.png b/content/how-to/images/metamask-add-incal.png new file mode 100644 index 0000000..6ad9e4b Binary files /dev/null and b/content/how-to/images/metamask-add-incal.png differ diff --git a/content/how-to/images/metamask-add-network.png b/content/how-to/images/metamask-add-network.png new file mode 100644 index 0000000..5714763 Binary files /dev/null and b/content/how-to/images/metamask-add-network.png differ diff --git a/content/how-to/images/metamask-add-topos.png b/content/how-to/images/metamask-add-topos.png new file mode 100644 index 0000000..815bcb6 Binary files /dev/null and b/content/how-to/images/metamask-add-topos.png differ diff --git a/content/how-to/images/metamask-connect-confirm.png b/content/how-to/images/metamask-connect-confirm.png new file mode 100644 index 0000000..cd29c30 Binary files /dev/null and b/content/how-to/images/metamask-connect-confirm.png differ diff --git a/content/how-to/images/metamask-connect.png b/content/how-to/images/metamask-connect.png new file mode 100644 index 0000000..9705f0a Binary files /dev/null and b/content/how-to/images/metamask-connect.png differ diff --git a/content/how-to/images/metamask-networks-dropdown.png b/content/how-to/images/metamask-networks-dropdown.png new file mode 100644 index 0000000..566203d Binary files /dev/null and b/content/how-to/images/metamask-networks-dropdown.png differ diff --git a/content/how-to/images/metamask-topos-added.png b/content/how-to/images/metamask-topos-added.png new file mode 100644 index 0000000..c805f82 Binary files /dev/null and b/content/how-to/images/metamask-topos-added.png differ diff --git a/content/how-to/images/topos-faucet.png b/content/how-to/images/topos-faucet.png new file mode 100644 index 0000000..9a20d80 Binary files /dev/null and b/content/how-to/images/topos-faucet.png differ diff --git a/content/how-to/use-the-faucet.md b/content/how-to/use-the-faucet.md new file mode 100644 index 0000000..353897b --- /dev/null +++ b/content/how-to/use-the-faucet.md @@ -0,0 +1,40 @@ +--- +title: Use the Faucet to Get Testnet Tokens +description: In order to interact with the Topos and Incal subnets, tokens are requires in order to pay the minimal gas fees on these testnets. This guide will illustrate how to use the Faucet to get these tokens. +--- + +# Use the Faucet to Get Testnet Tokens + +In order to interact with the Topos and Incal subnets, tokens are required to pay the minimal gas fees on these testnets. A [faucet](https://faucet.testnet-1.topos.technology/) exists to allow developers to access tokens for development purposes. + +## Prerequisites + +To use the Faucet, you must have an address to send the tokens to. We recommend using MetaMask as your wallet, and suggest that you first follow the guide on how to [add the Topos and Incal subnets to MetaMask](/how-to/add-topos-and-incal-to-metamask.html). + +## Use the Faucet + +The faucet is a simple web application that allows you to request tokens for a given address. It is located at [https://faucet.testnet-1.topos.technology/](https://faucet.testnet-1.topos.technology/). + + +![Topos Faucet](/images/topos-faucet.png) + + +Enter the address to receive the funds in the `Address` field, and select the subnets to receive funds on. + +The faucet limits funding to once per 24 hours, based on the IP address of the requester, so we recommend ensuring that both **Topos** and **Incal** are selected before clicking the `Submit` button. This is less limiting than it may seem, however, as the fees on the testnet are so low that you should have plenty of funds to experiment with from just one request. + +If it has been less than 24 hours since the address has requested funds, you will see an error message: + + +![Faucet Error](/images/faucet-too-soon-error.png) + + +If the token allocation is successful, the application will report that: + + +![Faucet Success](/images/faucet-success.png) + + +# Wrapping Up + +With tokens for Topos and Incal in your wallet, you are ready to start interacting with the Topos testnet and learning more about the Topos platform. Remember that if you do need more tokens, you can request additional tokens once every 24 hours. \ No newline at end of file diff --git a/content/module-2/1-ERC20-Messaging.md b/content/module-2/1-ERC20-Messaging.md index ef2b509..2d44985 100644 --- a/content/module-2/1-ERC20-Messaging.md +++ b/content/module-2/1-ERC20-Messaging.md @@ -17,8 +17,6 @@ Please make sure you have installed [MetaMask](https://metamask.io/download/) be With MetaMask installed, you can navigate to [ERC20 Messaging](https://dapp-frontend-erc20.testnet-1.topos.technology/): -![dApp first page](./images/erc20index.png) - You are now going to complete a cross-subnet, fungible token transfer from the Topos Subnet to the Incal subnet. @@ -26,50 +24,33 @@ You are now going to complete a cross-subnet, fungible token transfer from the T First, you must connect MetaMask with the **[Topos ERC20 Messaging dApp](https://dapp-frontend-erc20.testnet-1.topos.technology/)**: - -![dApp connect with MetaMask 1](./images/erc20connect.png) - - - -![dApp connect with MetaMask 2](./images/erc20connect2.png) - - -The ERC20 Messaging dApp will display your address in the right top corner after the ERC20 dApp is connected to your wallet: - - -![dApp connect with MetaMask 2](./images/erc20indexconnected.png) - - -Each time you pick up a sending subnet it will be automatically added to MetaMask, if it is the first time you attempt to do so. - -Add Topos to your networks: - - -![dApp adds network Topos](./images/erc20toposnetwork.png) - +If you have not already done so, you will have to connect the ERC20 Messaging dApp to MetaMask and add the Topos and Incal subnets to your MetaMask wallet. To do this, follow the steps in our [How to add Topos and Incal to MetaMask](/content/how-to/add-topos-and-incal-to-metamask.html#alternative-method-leverage-the-erc20-messaging-app) guide. -Add Incal too: +If you had previously following that guide, but you had performed the manual procedure, then you will still need to connect the dApp to MetaMask. If the upper right corner of the ERC20 Messaging dApp page looks like this, with a 'Connect to MetaMask' button: -![dApp adds network Incal](./images/erc20incalnetwork.png) +![dApp first page](./images/erc20index.png) -If the network is already added to MetaMask, it will just ask for permission to switch the network. For example, for Topos: +Then click the 'Connect to MetaMask' button and follow the instructions to connect the dApp to MetaMask. -![Switch network to Topos](./images/erc20switchnetworktopos.png) +![dApp connect with MetaMask 1](./images/erc20connect.png) -Or for Incal: - -![Switch network to Incal](./images/erc20switchnetworktoposincal.png) +![dApp connect with MetaMask 2](./images/erc20connect2.png) +Once the ERC20 Messaging dApp is displaying your address in the right top corner, the ERC20 dApp is connected to your wallet. + +Additionally, you will want to have requested tokens from the [Topos Faucet](https://faucet.testnet-1.topos.technology). If you have not done this yet, please follow the instructions in our [How to use the Faucet to get Testnet Tokens](/content/how-to/use-the-faucet.html) guide to do this. + -In either case, select the **Incal subnet** in the dApp: + +Your wallet is connected to the app, and you have some tokens to play with, so now you are ready to transfer some assets from one subnet to the other. To do this, first select the **Incal Subnet** in the dApp: ![Incal page](./images/sendingincal.png) @@ -84,26 +65,12 @@ Register a token, here named `testToken`: ![Register token](./images/testtokenreg.png) - - -In order to register tokens on the subnets, you will need to pay fees on both subnets. Use the [Topos Faucet](https://faucet.testnet-1.topos.technology) to get some: - - -![Get some TOPOS and INCAL](./images/faucetindex.png) - - -Make sure that the tokens are sent: - -![Tokens sent](./images/faucetsuc.png) - -Now you can pay the necessary fee for a token registration (e.g. for the Incal subnet): +In order to register tokens on the subnets, you will need to pay fees on both subnets for the token registration (e.g. for the Incal subnet): ![Pay INCA fee](./images/incafee.png) - - @@ -115,7 +82,9 @@ Repeat these steps for the **Topos Subnet**. With both token setups done, you can try your first cross-subnet token transfer: + ![Incal page](./images/incaltopos.png) + diff --git a/src/components/mdx/MdLink.tsx b/src/components/mdx/MdLink.tsx index e5c45b2..8f1edd2 100644 --- a/src/components/mdx/MdLink.tsx +++ b/src/components/mdx/MdLink.tsx @@ -8,7 +8,8 @@ interface LinkProps extends React.HTMLAttributes { export const MdLink: React.FC = ({ href, children }) => { if (!href) return null; const isExternal = - (!href.startsWith('/') && + (!href.startsWith('#') && + !href.startsWith('/') && !href.startsWith('./') && !href.startsWith('../') && !new URL(href).origin.startsWith(config.rootUrl)) ||