From 7bcb1e9ace43f56d4a0f700a59243821cd4a32bb Mon Sep 17 00:00:00 2001 From: Tschakki Date: Mon, 3 Feb 2025 15:03:12 +0100 Subject: [PATCH 1/7] Update ndoe guide --- docs/building-on-lisk/run-a-lisk-node.md | 49 ++++++++++++++++-------- 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/docs/building-on-lisk/run-a-lisk-node.md b/docs/building-on-lisk/run-a-lisk-node.md index 81e4448b9..46c6a36e3 100644 --- a/docs/building-on-lisk/run-a-lisk-node.md +++ b/docs/building-on-lisk/run-a-lisk-node.md @@ -48,24 +48,22 @@ If you're looking to harden your app and avoid rate-limiting for your users, ple ## System requirements -The following system requirements are recommended to run a Lisk L2 node. +We recommend you the following hardware configuration to run a Lisk L2 node: -### Memory +- a modern multi-core CPU with good single-core performance +- a minimum of 16 GB RAM (32 GB recommended) +- a locally attached NVMe SSD drive +- adequate storage capacity to accommodate both the snapshot restoration process (if restoring from snapshot) and chain data, ensuring a minimum of (2 * current_chain_size) + snapshot_size + 20%_buffer +- if running with Docker, please install Docker Engine version [27.0.1](https://docs.docker.com/engine/release-notes/27.0/) or higher -- Modern multi-core CPU with good single-core performance. -- Machines with a minimum of 16 GB RAM (32 GB recommended). - -### Storage - -- Machines with a high performance SSD drive with at least 750GB (full node) or 4.5TB (archive node) free. +*Note: If utilizing Amazon Elastic Block Store (EBS), ensure timing buffered disk reads are fast enough in order to avoid latency issues alongside the rate of new blocks added to Base during the initial synchronization process; io2 block express is recommended.* ## Usage :::note -It is currently not possible to run the nodes with the `--op-network` flag until the configs for Lisk have been merged into the [superchain-registry](https://github.com/ethereum-optimism/superchain-registry). +It is now possible to run the Lisk nodes with the `--op-network` flag on the `op-geth` execution client. -There is currently an [open PR](https://github.com/ethereum-optimism/superchain-registry/pull/234) to add the Lisk Mainnet config. -The Lisk Sepolia Testnet will be supported soon as well. +It is still not possible to run the Lisk nodes with the `--chain` flag on the `op-reth` execution client. ::: ### Clone the Repository @@ -84,17 +82,34 @@ cd lisk-node If running your own L1 node, it needs to be synced before the Lisk node will be able to fully sync. 2. Please ensure that the environment file relevant to your network (`.env.sepolia`, or `.env.mainnet`) is set for the `env_file` properties within `docker-compose.yml`. By default, it is set to `.env.mainnet`. - :::info - We currently support running either the `op-geth` or the `op-reth` nodes alongside the `op-node`. By default, we run the `op-geth` node. If you would like to run the `op-reth` node instead, please set the `CLIENT` environment variable to `reth` before starting the node. +3. We currently support running either the `op-geth` or the `op-reth` nodes alongside the `op-node`. By default, we run the `op-geth` node. If you would like to run the `op-reth` node instead, please set the `CLIENT` environment variable to `reth` before starting the node. + :::note + The `op-reth` client can be built in either the `maxperf` (default) or `release` profile. To learn more about them, please check reth's documentation on Optimizations. Please set the `RETH_BUILD_PROFILE` environment variable accordingly. +Unless you are building the `op-reth` client in `release` profile, please ensure that you have a machine with 32 GB RAM. +Additionally, if you have the Docker Desktop installed on your system, please make sure to set Memory limit to a minimum of 16 GB. +It can be set under `Settings -> Resources -> Resource Allocation -> Memory limit`. ::: -3. Run: +4. Run: +:::important +Important: To run the node on Lisk Sepolia, first patch the Dockerfile(s) with: +```sh +git apply dockerfile-lisk-sepolia.patch +``` +::: - ``` +with `op-geth` execution client: + + ```sh docker compose up --build --detach ``` -4. You should now be able to `curl` your Lisk node: - ``` +or, with op-reth execution client: + +```sh +CLIENT=reth RETH_BUILD_PROFILE=maxperf docker compose up --build --detach +``` +5. You should now be able to `curl` your Lisk node: + ```sh curl -s -d '{"id":0,"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest",false]}' \ -H "Content-Type: application/json" http://localhost:8545 ``` From 351b8ab6c56ce9a7cb2c54ddaba471a2ce768d34 Mon Sep 17 00:00:00 2001 From: Tschakki Date: Mon, 3 Feb 2025 15:11:16 +0100 Subject: [PATCH 2/7] Adjust indentation --- docs/building-on-lisk/run-a-lisk-node.md | 29 ++++++++++++------------ 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/docs/building-on-lisk/run-a-lisk-node.md b/docs/building-on-lisk/run-a-lisk-node.md index 46c6a36e3..02c29c05b 100644 --- a/docs/building-on-lisk/run-a-lisk-node.md +++ b/docs/building-on-lisk/run-a-lisk-node.md @@ -85,29 +85,30 @@ cd lisk-node 3. We currently support running either the `op-geth` or the `op-reth` nodes alongside the `op-node`. By default, we run the `op-geth` node. If you would like to run the `op-reth` node instead, please set the `CLIENT` environment variable to `reth` before starting the node. :::note The `op-reth` client can be built in either the `maxperf` (default) or `release` profile. To learn more about them, please check reth's documentation on Optimizations. Please set the `RETH_BUILD_PROFILE` environment variable accordingly. -Unless you are building the `op-reth` client in `release` profile, please ensure that you have a machine with 32 GB RAM. -Additionally, if you have the Docker Desktop installed on your system, please make sure to set Memory limit to a minimum of 16 GB. -It can be set under `Settings -> Resources -> Resource Allocation -> Memory limit`. + Unless you are building the `op-reth` client in `release` profile, please ensure that you have a machine with 32 GB RAM. + Additionally, if you have the Docker Desktop installed on your system, please make sure to set Memory limit to a minimum of 16 GB. + It can be set under `Settings -> Resources -> Resource Allocation -> Memory limit`. ::: + 4. Run: -:::important -Important: To run the node on Lisk Sepolia, first patch the Dockerfile(s) with: -```sh -git apply dockerfile-lisk-sepolia.patch -``` -::: + :::important + Important: To run the node on Lisk Sepolia, first patch the Dockerfile(s) with: + ```sh + git apply dockerfile-lisk-sepolia.patch + ``` + ::: -with `op-geth` execution client: + with `op-geth` execution client: ```sh docker compose up --build --detach ``` -or, with op-reth execution client: + or, with op-reth execution client: -```sh -CLIENT=reth RETH_BUILD_PROFILE=maxperf docker compose up --build --detach -``` + ```sh + CLIENT=reth RETH_BUILD_PROFILE=maxperf docker compose up --build --detach + ``` 5. You should now be able to `curl` your Lisk node: ```sh curl -s -d '{"id":0,"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest",false]}' \ From 9be11d02f77599ac859822e7821e9004ba48b9e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mona=20B=C3=A4renf=C3=A4nger?= Date: Tue, 4 Feb 2025 12:22:44 +0100 Subject: [PATCH 3/7] Update links (#276) * Update links * liskdocs-49 remove outdated link --- .../building-on-lisk/deploying-smart-contract/with-thirdweb.mdx | 1 - docs/building-on-lisk/interacting-with-the-blockchain/viem.mdx | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/building-on-lisk/deploying-smart-contract/with-thirdweb.mdx b/docs/building-on-lisk/deploying-smart-contract/with-thirdweb.mdx index 371c244ec..e2765ebde 100644 --- a/docs/building-on-lisk/deploying-smart-contract/with-thirdweb.mdx +++ b/docs/building-on-lisk/deploying-smart-contract/with-thirdweb.mdx @@ -41,7 +41,6 @@ However, for this guide, we will mainly talk about the [thirdweb Explore](https: - [Build (Solidity SDK)](https://portal.thirdweb.com/contracts/build/overview): Write custom smart contracts. - [Deploy](https://portal.thirdweb.com/contracts/deploy/overview): Support for contract deployment built for any use case. - [Publish](https://portal.thirdweb.com/contracts/publish/overview): Publish your contracts onchain. -- [Interact](https://portal.thirdweb.com/contracts/interact/overview): Interact with smart contracts and integrate smart contracts directly into your app. ## Deploying pre-built contracts via thirdweb Explore In case you want to deploy a pre-built contract without any customization, thirdweb offers a convenient way to do so with **Explore**. diff --git a/docs/building-on-lisk/interacting-with-the-blockchain/viem.mdx b/docs/building-on-lisk/interacting-with-the-blockchain/viem.mdx index 6a4268460..546015097 100644 --- a/docs/building-on-lisk/interacting-with-the-blockchain/viem.mdx +++ b/docs/building-on-lisk/interacting-with-the-blockchain/viem.mdx @@ -206,7 +206,7 @@ The `0x` prefix indicates that the following string is a hexadecimal number. :::info -In addition to making a JSON-RPC request (`eth_requestAccounts`) to get an Account, viem provides various helper methods for creating an `Account`, including: [`privateKeyToAccount`](https://viem.sh/docs/accounts/privateKey.html), [`mnemonicToAccount`](https://viem.sh/docs/accounts/mnemonic.html), and [`hdKeyToAccount`](https://viem.sh/docs/accounts/hd.html). +In addition to making a JSON-RPC request (`eth_requestAccounts`) to get an Account, viem provides various helper methods for creating an `Account`, including: [`privateKeyToAccount`](https://viem.sh/docs/accounts/local/privateKeyToAccount), [`mnemonicToAccount`](https://viem.sh/docs/accounts/local/mnemonicToAccount), and [`hdKeyToAccount`](https://viem.sh/docs/accounts/local/hdKeyToAccount). { /* To use Lisk Sepolia (testnet), replace `lisk` with `liskSepolia`. */} From 0bd7f4fd1c9b2cfa20e3699068890cbe027e7728 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mona=20B=C3=A4renf=C3=A4nger?= Date: Tue, 11 Feb 2025 13:24:27 +0100 Subject: [PATCH 4/7] [LISKDOCS-19] Introduction to Web3 app development (#260) * Add pages * Add PWA intro * Add web3 app dev steps * Describe web versions * Add Web 3 description * Amend Web 3 description * Add section about getting started with Web3 development * Compare Web2 and Web3 development * Fix table * Add descriptions * Update structure * Align headings * Amend description * Update examples * Add examples * Add examples * Update descriptions * Update resources * Apply suggestions from code review Co-authored-by: Muhammad Talha <13951043+TalhaMaliktz@users.noreply.github.com> * Fix broken anchor * Add new sections * Summarize account abstraction * Add test examples * Align headings * Add links * Add guides * Move section * Fix links * Move section * Fix link * Describe testnets * Describe e2e and monitoring * Clean up text * Update ToC levels * Fix liskdocs-43, update translations * liskdocs-45 * Update sidebars * Update sidebars * Mention that sensitive onchain data should be encrypted * Update docs/building-on-lisk/web3-app-development.mdx Co-authored-by: Matjaz Verbole * Apply suggestions from code review Co-authored-by: Muhammad Talha <13951043+TalhaMaliktz@users.noreply.github.com> * Add link * Use sentence case in all headings --------- Co-authored-by: Muhammad Talha <13951043+TalhaMaliktz@users.noreply.github.com> Co-authored-by: Matjaz Verbole --- .../bridged-tokens.md | 5 +- .../contracts.mdx | 1 - .../add-token-to-lisk/index.md | 2 +- .../building-on-lisk/web3-app-development.mdx | 337 +++++++++++ .../current/about-lisk/bridged-tokens.md | 31 + .../current/about-lisk/contracts.mdx | 560 ++++++++++++++++++ .../add-token-to-lisk/index.md | 2 +- .../deploying-smart-contract/with-Foundry.md | 2 +- .../deploying-smart-contract/with-Hardhat.md | 7 +- .../with-thirdweb.mdx | 5 +- .../building-on-lisk/web3-app-development.mdx | 336 +++++++++++ sidebars.js | 14 +- 12 files changed, 1285 insertions(+), 17 deletions(-) rename docs/{building-on-lisk => about-lisk}/bridged-tokens.md (88%) rename docs/{building-on-lisk => about-lisk}/contracts.mdx (99%) create mode 100644 docs/building-on-lisk/web3-app-development.mdx create mode 100644 i18n/ind/docusaurus-plugin-content-docs/current/about-lisk/bridged-tokens.md create mode 100644 i18n/ind/docusaurus-plugin-content-docs/current/about-lisk/contracts.mdx create mode 100644 i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/web3-app-development.mdx diff --git a/docs/building-on-lisk/bridged-tokens.md b/docs/about-lisk/bridged-tokens.md similarity index 88% rename from docs/building-on-lisk/bridged-tokens.md rename to docs/about-lisk/bridged-tokens.md index defafac86..533e115ff 100644 --- a/docs/building-on-lisk/bridged-tokens.md +++ b/docs/about-lisk/bridged-tokens.md @@ -2,7 +2,6 @@ id: bridged-tokens title: Bridged Token Addresses sidebar_position: 2 -slug: /bridged-tokens description: 'A reference page listing all tokens bridged to Lisk.' keywords: [ @@ -11,14 +10,14 @@ keywords: ] --- -# Bridged tokens +# Bridged Token Addresses This page summarizes officially reviewed tokens deployed on Lisk and their corresponding L1 addresses. The list is based on the [Superchain Token List](https://github.com/ethereum-optimism/ethereum-optimism.github.io). :::tip -If you want to add a token to the list, please check out the guide [Bridging an L1 token to Lisk](add-token-to-lisk/index.md). +If you want to add a token to the list, please check out the guide [Bridging an L1 token to Lisk](/building-on-lisk/add-token-to-lisk/index.md). ::: ## Lisk Mainnet diff --git a/docs/building-on-lisk/contracts.mdx b/docs/about-lisk/contracts.mdx similarity index 99% rename from docs/building-on-lisk/contracts.mdx rename to docs/about-lisk/contracts.mdx index 037d32b1d..1ea84e04f 100644 --- a/docs/building-on-lisk/contracts.mdx +++ b/docs/about-lisk/contracts.mdx @@ -2,7 +2,6 @@ id: contracts title: Contracts sidebar_position: 1 -slug: /contracts description: 'A reference page listing all the contracts deployed concerning Lisk.' keywords: [ diff --git a/docs/building-on-lisk/add-token-to-lisk/index.md b/docs/building-on-lisk/add-token-to-lisk/index.md index 8757561d6..974333fe2 100644 --- a/docs/building-on-lisk/add-token-to-lisk/index.md +++ b/docs/building-on-lisk/add-token-to-lisk/index.md @@ -72,7 +72,7 @@ To add your token to the list, perform the following steps. ### Step 1: Deploy your token on Lisk Select your preferred bridging framework and use it to deploy an ERC-20 for your token on Lisk. -We recommend you use the framework provided by Lisk's [standard bridge](#the-standard-bridge) contracts and, furthermore, deploy your token using the [OptimismMintableERC20Factory](../contracts.mdx#lisk-network-l2). +We recommend you use the framework provided by Lisk's [standard bridge](#the-standard-bridge) contracts and, furthermore, deploy your token using the [OptimismMintableERC20Factory](/about-lisk/contracts.mdx#lisk-network-l2). Deploying your token on Lisk in this manner provides us with guarantees that will smooth the approval process. If you choose a different bridging framework, its interface must be compatible with that of the standard bridge. Otherwise, it may be difficult for us to support them. diff --git a/docs/building-on-lisk/web3-app-development.mdx b/docs/building-on-lisk/web3-app-development.mdx new file mode 100644 index 000000000..74ee0f9e5 --- /dev/null +++ b/docs/building-on-lisk/web3-app-development.mdx @@ -0,0 +1,337 @@ +--- +title: Web3 app development +description: 'An introduction into Web3 application development on Lisk.' +keywords: + [ + 'Lisk', + 'Web3 apps', + 'Web3 app', + 'Web3 application', + 'Web3 app development', + 'Web3 mobile app', + 'Web3 PWA', + 'dApp development', + 'Mobile dApp development', + 'Mobile app development', + 'Lisk apps', + 'Lisk dApps', + ] +toc_max_heading_level: 4 +--- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +# Web3 app development + +On this page, you will learn what Web3 applications are, how they differ from Web 2.0 apps, and how to get started with Web3 app development on Lisk. + +## What are Web3 applications? + +### Evolution of the Web + +Since the internet was born, there has been constant innovation in how people use the internet to communicate and interact with each other. +To describe important steps in this innovation, websites, and apps are generally categorized into different Web "versions": + + + + Web 1.0 is the first "version" of the Web, i.e., the first generation of websites that occurred when the Internet became available to the broader public around 1990. + Web 1.0 is often referred to as the "static" or "read-only" web, consisting mainly of simple static HTML pages with limited interactivity. + + However, some Web 2.0 capabilities were present in the days of Web 1.0 but were implemented differently. + For example, a Web 1.0 site may have had a guestbook page for visitor comments, instead of a comment section at the end of each page (typical of Web 2.0). + + + + In the late 1990s the transition to [Web 2.0](https://en.wikipedia.org/wiki/Web_2.0) started, when some Web 1.0 sites introduced dynamic HTML with social features, allowing users to interact with web pages in a much more fluent way. + + :::info + The term "Web 2.0" was coined by Darcy DiNucci, an information architecture consultant, in her January 1999 article [Fragmented Future](http://darcyd.com/fragmented_future.pdf). + ::: + + Web 2.0 is the era where social media, [web applications](https://en.wikipedia.org/wiki/Web_application), and mobile apps came to the rise. + Because of the new social features and improved user experience that Web 2.0 apps offered, the number of users interacting with the web increased significantly, leading to the creation of many new web services and applications. + Some of the most popular examples of Web 2.0 applications are Facebook, X, Amazon, and YouTube. + + Many of these applications and services became important pillars of the internet and people's lives, and even society as a whole. + However, the more relevant these applications became, the more obvious and relevant their limitations became, as users had to trust the companies behind them with their data and privacy. + + ##### Web 2.0 limitations + + Though Web 2.0 revolutionized how people positively used the web, a few of its characteristics led to certain disadvantages for users interacting with Web2 applications. For example: + + - Censorship + - Lack of transparency + - Limited privacy + - Limited interoperability + + + Web3 (also known as Web 3.0) is the next step in the evolution of the Web, aiming to address the [limitations of Web 2.0](web3-app-development.mdx?web-version=web2#web2-limitations). + Web3 is based on the idea of a decentralized internet, where users are in control over their data. + + :::info + The term "Web3" was coined by Polkadot founder and Ethereum co-founder Gavin Wood in 2014, referring to a [decentralized online ecosystem based on the blockchain](https://www.wired.com/story/web3-gavin-wood-interview/). + ::: + + 2015 marked the beginning of the Web3 era when Ethereum launched as the world's first programmable blockchain. + Web3 applications are decentralized applications (also known as "dApps") that run on a blockchain, allowing users to interact with each other and the blockchain in a trustless way. + This puts users in control of their data and privacy, removing the need to trust a central authority. + + Web3 apps are built on top of blockchain technology, which allows users greater ownership and control over their data. + This provides new features and allows services that are not feasible in the Web2 world. + Often, Web3 apps combine other cutting-edge technologies like AI to provide unique and new user experiences. + + New types of Web3 apps include: + + - DeFi (Decentralized Finance), for example: + - DEXs (Decentralized Exchanges) + - GameFi (Gaming Finance) + - Staking and yield farming platforms + - Decentralized crowdfunding and investing platforms + - Decentralized lending and borrowing + - Prediction markets + - Asset / RWA tokenization platforms + - DAOs (Decentralized Autonomous Organizations) + - [DeSoc](https://onchain.org/magazine/decentralized-social-media-business-opportunities-are-they-real/) (Decentralized Social Media) + - [DeSci](https://onchain.org/magazine/not-only-the-best-desci-crypto-projects-an-overview/) (Decentralized Science) + - [DePIN](https://onchain.org/magazine/how-depin-web3-projects-are-connecting-the-world-to-crypto/) (Decentralized Physical Infrastructure Networks) + + Web3 is a promise to bring back the original vision of the internet, where users are in control of their data and privacy, and where the internet is a place for free speech and innovation. + However, how blockchain technology is implemented and used in apps can vary greatly, and not all Web3 apps are equally decentralized and trustless. + + + +### Further reading +- [Introduction to Web3](https://ethereum.org/en/web3/) *by Ethereum* + +## Getting started with Web3 app development + +### Platforms + +To get started with the actual development of a Web3 app, you need to be clear about the right **platform(s)** to build your Web3 app on. +The following sections will give you an overview of the different platforms you can choose from to build your Web3 app on, including further resources and guides to get you started with the app development. + + + +Mobile applications are generally a great way to reach a large audience, as most people have a smartphone and use it to access the internet. +Mobile apps can use the integrated features of handheld devices and are typically faster and more user-friendly than websites. +This can provide a more immersive experience for users. +Last but not least, mobile apps allow users to access your app on the go, which can be a big advantage for many use cases. + +##### Guides +- [Build Web3 Mobile Apps with React Native on Lisk with thirdweb](https://blog.thirdweb.com/web3-mobile-apps/build-web3-mobile-apps-with-reactive-native-on-lisk/) +- [Video tutorial: How to Build a Web3 Mobile App](https://www.youtube.com/watch?v=PRAsc_ocVtk) *by thirdweb* +- [Building a mobile dApp with Flutter](https://medium.com/dash-community/building-a-mobile-dapp-with-flutter-be945c80315a) + + +The main advantage of web applications is that they are platform-independent and can be accessed from any device with a web browser. +Additionally, they don't need to be installed by the user and can be used directly in the browser. + +##### Guides +- [How to Build an NFT Minting dApp](https://blog.thirdweb.com/guides/build-nft-minting-dapp-with-thirdweb-guide/) *by thirdweb* + + +A Progressive Web App (PWA) allows users to install a web app on their devices. +They appear as native apps on desktop or mobile devices and offer features like offline support and push notifications. +This way, PWAs allow the development of an application that can be used via a browser[^1], mobile, or desktop application alike. +Therefore, PWAs are a great choice for reaching users on different platforms simultaneously. + +Additionally, PWAs allow a user to directly install the app through your web app without the need to visit an app store. +This allows you to serve the app directly to the users, without bothering about restrictions of app stores on what is allowed for blockchain applications. +In-app purchase fees can also be avoided because users no longer need to go through the app store. + +[^1]: Only supported in PWA-compatible browsers (most Chromium-based browsers should work). + +##### Guides +- [How to Create a Web3 PWA](https://blog.thirdweb.com/guides/how-to-create-a-web3-pwa/) *by thirdweb* +- [Video tutorial: Build a Web3 PWA](https://www.youtube.com/watch?v=VU8i-dn2_GE) *by thirdweb* + +{/* ### Web3 Desktop apps +Desktop apps are native applications that are installed on a user's computer. +Similar to mobile apps, they are platform dependent. +Desktop apps make it difficult for users to access them on the go, as you need a computer to use them. +On the other side, desktop apps shine with their performance and the ability to use the full power of the computer they are running on, and they are typically build for larger screens allowing more complex user interfaces. +So if you application requires a lot of computing power, and/or a very complex UI that might not be fitting for a mobile screen, a desktop app can be the right choice. + */} + + +### Onboarding Web2 users to Web3 + +A significant challenge for Web3 applications is delivering a user experience that is as seamless as what users expect from Web2 applications. + +To onboard Web2 users to Web3, apps need to simplify user interaction so that it feels natural and intuitive to them while still providing the benefits of Web3 in a secure way. +To aim for a smooth user experience, and to abstract the complexity of blockchain technology away from the user, it is highly recommended to include "account abstraction" (sometimes also referred to as "smart accounts", "smart wallets" or "smart contract accounts") into your Web3 application. + +#### Account Abstraction and Smart Accounts + +Account abstraction is a concept that introduces an additional layer over the blockchain, which delegates most of the complexity of interacting with the blockchain away from the user to smart contracts. +It has the potential to significantly enhance the user experience of Web3 applications, as it allows users to interact with the app in a more user-friendly and secure way. +Account abstraction is also sometimes referred to as "smart accounts" or "smart wallets", because it puts most of the logic of handling transactions and user interactions into smart contracts. + +This unlocks a range of features that significantly enhance user experience: + +- **Signature Abstraction**: Users no longer need to manually sign transactions with private keys. +Instead, smart contracts handle the signing logic, eliminating the risk of user error and phishing attacks. +- **Enhanced Security**: Multi-signature wallets, social recovery mechanisms, and custom access controls can be implemented within the smart contract, mitigating single points of failure and theft risks. +- **Customizable Transactions**: Smart contracts can be programmed to include spending limits, time-locked transactions, and dApp-specific controls. +This allows to automate transactions and tailoring the user experience to specific needs. +- **Fee Abstraction**: Transaction fees can be dynamically managed through smart contracts, enabling features like custom gas tokens and gasless transactions for specific use cases. + +On the technical side, account abstraction is implemented by the [ERC-4337 standard](https://eips.ethereum.org/EIPS/eip-4337), which defines a set of interfaces and functions that smart contracts can use to interact with the blockchain on behalf of users. + +It comprises the following fundamental components: + +- **UserOperation**: A structure that describes a transaction to be sent on behalf of a user. +To avoid confusion, it is not named β€œtransaction”. +Like a transaction, it contains `sender`, `to`, `calldata`, `maxFeePerGas`, `maxPriorityFee`, `signature`, `nonce`. +Unlike a transaction, the use of the `signature` field is not defined by the protocol but by each account implementation. +Also, it contains several other fields, described in detail in ERC-4337. +- **Account Contract**: The user's smart account sending a user operation. +- **EntryPoint**: A singleton contract to validate and execute bundles of UserOperations. +It manages the verification and execution logic for UserOperations, ensuring they are processed correctly. +- **Bundler**: Bundlers are contracts that package UserOperations from a mempool and send them to the EntryPoint. +Bundling is the process where a node/bundler collects multiple UserOperations and creates a single transaction to submit onchain. +- **Account Factory**: When using a wallet for the first time, this contract specifies the creation of the smart contract wallet. +- **Paymaster**(optional): a helper contract that agrees to pay for the transaction, instead of the sender itself. +Paymasters can cover gas costs for users, sponsor specific transactions, or implement custom fee models, opening doors for novel use cases. + +##### Further reading +- [Account abstraction: A complete overview](https://blaize.tech/blog/account-abstraction-guide/) *by Blaize* +- [What is Account Abstraction (ERC-4337)?](https://www.alchemy.com/overviews/what-is-account-abstraction) *by Alchemy* +- [What is Account Abstraction? ERC-4337 Explained](https://blog.thirdweb.com/account-abstraction-erc4337/) *by thirdweb* +- [How to pay gas fees with LSK](https://blog.thirdweb.com/changelog/ts-tokenpaymasters-pay-for-gas-with-lisk-lsk-base-usdc-or-celo-cusd/) *by thirdweb* +- [How to create a Web3 mobile app with gasless transactions on Lisk](https://blog.thirdweb.com/web3-mobile-apps/build-web3-mobile-apps-with-reactive-native-on-lisk/) *by thirdweb* + +{/* TODO: Extend with additional topics relevant for web3 devs +### Best Practices & other Considerations + +- Proxy contracts: +Smart contracts are immutable, meaning that once they are deployed, they cannot be changed. +However, to fix bugs or add new features to an already deployed smart contract, proxy contracts can be used to upgrade smart contracts without changing the contract address. +- Gas Optimization: +- secure key management +- Bug bounty programs +- handling user data */} + +### Testing and deployment +When it comes to testing and deployment of Web3 apps, there are some additional aspects to consider compared to Web2 apps. +The intrinsic vulnerabilities of smart contracts, the immutability of blockchain data, and the interactions with a decentralized network, call for specific testing and security measures. +Gladly, many tools are already available to help developers ensure the security and reliability of their Web3 apps. +The list below provides a selection of popular tools and services used to test Web3 apps: + +#### Smart contract test suites +Often, smart contract development frameworks come with built-in testing tools that simplify to create comprehensive tests for smart contracts. +This includes utilities to simplify writing of the tests, or the ability to spin up a local node for deploying and testing smart contracts in a local development network, i.e. Devnet. + +A selection of popular testing environments for smart contracts can be found below: + +- [Foundry](https://book.getfoundry.sh/): Foundry is a smart contract development toolchain. +Foundry provides a robust [testing framework](https://book.getfoundry.sh/forge/tests) that allows developers to create comprehensive test suites for their projects using Solidity. +The [Forge Standard Library](https://book.getfoundry.sh/reference/forge-std/) provides a set of utilities to simplify testing smart contracts. +It also provides a local testnet node for deploying and testing smart contracts, see [Anvil](https://book.getfoundry.sh/anvil/). +- [Hardhat](https://hardhat.org): Hardhat is a development environment that facilitates smart contract development. +It comes built-in with [Hardhat Network](https://hardhat.org/hardhat-network/docs/overview), a local Ethereum network node designed for development. +Hardhat allows you to deploy your contracts, [run your tests](https://hardhat.org/tutorial/testing-contracts), and debug your code, all within the confines of your local machine. +Tests are written in JavaScript, using [ethers](https://ethers.org/). +- [Remix](https://remix.ethereum.org/): Remix is an IDE that helps you write Solidity contracts straight from the browser. +It provides powerful features for testing and debugging smart contracts, like the [Debugger](https://remix-ide.readthedocs.io/en/latest/debugger.html) or the [Unit Testing Plugin](https://remix-ide.readthedocs.io/en/latest/unittesting.html). +- [Waffle](https://getwaffle.io/): Waffle is another framework for developing and testing smart contracts. +Tests are written in JavaScript / Typescript. + +##### Guides +- [Deploying a smart contract with Foundry](/building-on-lisk/deploying-smart-contract/with-Foundry#testing-the-smart-contract) +- [Deploying a smart contract with Hardhat](/building-on-lisk/deploying-smart-contract/with-Hardhat.md) +- [Deploying a smart contract with Remix](/building-on-lisk/deploying-smart-contract/with-Remix.mdx) + +#### Smart contract code analysis +To ensure the security of smart contracts, it is essential to analyze the code for vulnerabilities. +There are several tools available that help developers to analyze their smart contracts for common security issues and vulnerabilities, for example: + +- [Slither](https://github.com/crytic/slither): Slither is a Solidity static analysis framework that detects common vulnerabilities in smart contracts. +- [Etheno](https://github.com/crytic/etheno): Etheno is a tool that helps developers write secure smart contracts by providing a set of rules that can be used to check the security of smart contracts. +- [Mythril](https://github.com/Consensys/mythril): Mythril is a security analysis tool for Ethereum smart contracts. + +#### Testnets +Testnets are public blockchains that are used for testing purposes. +They often have the same features as the mainnet, but the tokens on the testnet have no real value - this allows developers to test their smart contracts and Web3 apps in a real-world environment without risking real assets. +Before deploying a smart contract to the mainnet, it is highly recommended to test it on a testnet to ensure that it works as expected. +##### Public testnets +The following testnets are available for testing smart contracts and Web3 apps on Lisk: +- [Lisk Sepolia](/about-lisk/network-info.md#lisk-sepolia-testnet) + +:::tip +To get free testnet ETH and/or LSK, check out our [available faucets](/lisk-tools/faucets.md). +::: + +##### Virtual testnets +[Tenderly](https://tenderly.co/) recently introduced the possibility to spin up [Virtual Testnets](https://blog.tenderly.co/how-virtual-testnets-replace-public-testnets/). +Virtual Testnets are a new way to test your Web3 apps, bringing the onchain data of a mainnet and the flexibility of a local environment together. + +Some interesting features of Virtual Testnets are: + +- **Build your dapps with real, up-to-date mainnet data** and test its actual performance under realistic conditions. +- **Get an unlimited faucet** and stop begging for test ETH. +Mint both native and ERC-20 tokens in any amount you need, impersonate accounts, and test complex scenarios uninterruptedly. +- **Fully customize your development infrastructure** to fit your unique workflows. +Virtual Testnets are easy to set up and configure, giving you full control and flexibility over your environments. +You can even manipulate the state of your forked chains with custom values, custom chain IDs, and more, making sure they fit your unique requirements. + +#### E2E testing +End-to-end (E2E) testing is a type of software testing that tests the complete flow of an application from start to finish. +This specifically includes testing the frontend of your application, which ensures that the user interface works as expected. +To deal with stuff like wallets, and other Web3-specific things, you might want to use specialized Web3 E2E testing tools. + +[Synpress](https://synpress.io/) is an E2E testing library for Web3 dapps. +Synpress can be used with two leading E2E testing frameworks out there, i.e., [Playwright](https://playwright.dev/) and [Cypress](https://www.cypress.io/), with support for all of their features. + +#### Performance testing +Performance testing is essential to ensure that your Web3 app can handle the expected load of users and their interactions. +Measure and improve your app's performance, throughput, and resilience under different levels of traffic and transactions. + +Some examples of performance testing tools are: + +- [k6](https://k6.io/) +- [Artillery](https://www.artillery.io/) + +{/* #### Automated Testing and Continuous Integration (CI) */} + +#### Monitoring +Monitoring is important to ensure that your Web3 app is running smoothly and to detect and fix issues before they affect your users. + +Some popular monitoring tools are: + +- [Prometheus](https://prometheus.io/) combined with [Grafana](https://grafana.com/) +- [Elastic Stack (ELK)](https://www.elastic.co/elastic-stack) + +### Web2 vs Web3 app development +#### Languages +Concerning frontend app development, there aren't many differences between Web2 and Web3 apps when it comes to programming languages. +All languages that are typically used for Web2 app development can also be used for Web3 app development. +In the end, Web3 apps can even look and feel exactly like Web2 apps for users, because their frontend is built with the same technologies. + +However, the backend of Web3 apps is quite different, as it interacts with the blockchain through smart contracts. +Smart contracts are written in [Solidity](https://soliditylang.org/), therefore Web3 developers need to know Solidity to build the smart contracts they require for their app. +Luckily, for many use cases, there are already audited smart contracts available(see [OpenZeppelin](https://www.openzeppelin.com/solidity-contracts) or [thirdweb](https://thirdweb.com/explore)) that can be used, so developers don't need to write all of their smart contracts from scratch. + +#### Tech stack +As mentioned above, the Web2 and Web3 app frontend development is very similar. +Theoretically, you could build a Web3 app with nearly the same tech stack as a Web2 app, like Next.js, Vite, etc. +The only thing you need to add is a way for your application to interact with the blockchain, see [Data access](#data-access). + +To support developers, many blockchain platforms offer their own SDKs and tools to interact with their blockchain, which can make development easier and more efficient. +There are also SDKs for Web3 app development, like [thirdweb](https://thirdweb.com/) or [Alchemy](https://www.alchemy.com/), which take away most of the complexity of blockchain development and provide a smooth developer experience. +thirdweb supports [Lisk](https://thirdweb.com/lisk) and many other EVM-compatible blockchains. + +#### Data storage +In Web2 apps, data is typically stored in a centralized database. +In Web3 apps, some data is stored on the blockchain, i.e., a decentralized database. +How the data is stored is defined inside of smart contracts. +However, it should be noted that onchain data on a public blockchain is visible to everyone and, therefore, not suitable for all types of data. +Especially sensitive and private user data should not be stored on the blockchain, except if it is encrypted. +In addition, storing large amounts of data onchain is both expensive and slow. +Therefore, Web3 apps sometimes use a combination of onchain storage and offchain storage. + +#### Data access +In Web2 apps, data from the database is accessed through APIs. +In Web3 apps, blockchain data is accessed through smart contracts. +They usually expose public functions that can be called by the app frontend to read and/or write data from/to the blockchain, similar to a classical API. +To interact with the blockchain, there are various libraries and frameworks available, like [viem](https://viem.sh/), [web3.js](https://web3js.readthedocs.io), or [ethers.js](https://docs.ethers.io). diff --git a/i18n/ind/docusaurus-plugin-content-docs/current/about-lisk/bridged-tokens.md b/i18n/ind/docusaurus-plugin-content-docs/current/about-lisk/bridged-tokens.md new file mode 100644 index 000000000..533e115ff --- /dev/null +++ b/i18n/ind/docusaurus-plugin-content-docs/current/about-lisk/bridged-tokens.md @@ -0,0 +1,31 @@ +--- +id: bridged-tokens +title: Bridged Token Addresses +sidebar_position: 2 +description: 'A reference page listing all tokens bridged to Lisk.' +keywords: + [ + 'Lisk', + 'Bridged tokens' + ] +--- + +# Bridged Token Addresses + +This page summarizes officially reviewed tokens deployed on Lisk and their corresponding L1 addresses. + +The list is based on the [Superchain Token List](https://github.com/ethereum-optimism/ethereum-optimism.github.io). + +:::tip +If you want to add a token to the list, please check out the guide [Bridging an L1 token to Lisk](/building-on-lisk/add-token-to-lisk/index.md). +::: + +## Lisk Mainnet + +| Bridged Tokens Mainnet | Symbol | L1 Token | L2 Token | +| :----------------- | :----- |:----------------- | :----------------- | + +## Lisk Sepolia + +| Bridged Tokens Sepolia | Symbol | L1 Token | L2 Token | +| :----------------- | :----- |:----------------- | :----------------- | diff --git a/i18n/ind/docusaurus-plugin-content-docs/current/about-lisk/contracts.mdx b/i18n/ind/docusaurus-plugin-content-docs/current/about-lisk/contracts.mdx new file mode 100644 index 000000000..1ea84e04f --- /dev/null +++ b/i18n/ind/docusaurus-plugin-content-docs/current/about-lisk/contracts.mdx @@ -0,0 +1,560 @@ +--- +id: contracts +title: Contracts +sidebar_position: 1 +description: 'A reference page listing all the contracts deployed concerning Lisk.' +keywords: + [ + 'Lisk', + 'Ethereum Sepolia Testnet', + 'Contracts', + 'L1', + 'L2', + 'Lisk Sepolia Testnet', + 'Predeployed', + ] +--- + +# Contracts +A reference page that includes information about all contracts deployed on various networks. + +## Ethereum network (L1) + +Details of smart contracts deployed on 🟒 **Ethereum Mainnet** and 🟑 **Sepolia Testnet** are as follows. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Name of ContractDescriptionContract Address
ProxyAdminOwner of AddressManager, Admin of LiskPortal, SystemConfig, L2OutputOracle, L1StandardBridge.[0xeC432c4F1d0E12737f3a42a459B84848Af979b2d](https://etherscan.io/address/0xeC432c4F1d0E12737f3a42a459B84848Af979b2d)🟒
[0x5Db9F05921d8d5a6a157F6f49c411cc0e46c6330](https://sepolia.etherscan.io/address/0x5Db9F05921d8d5a6a157F6f49c411cc0e46c6330)🟑
SystemConfigIt contains configuration parameters such as the Sequencer address, the L2 gas limit, and the unsafe block signer address.[0x05f23282FFDCA8286E4738C1aF79079f3d843750](https://etherscan.io/address/0x05f23282ffdca8286e4738c1af79079f3d843750)🟒
[0xF54791059df4a12BA461b881B4080Ae81a1d0AC0](https://sepolia.etherscan.io/address/0xF54791059df4a12BA461b881B4080Ae81a1d0AC0)🟑
AddressManagerThe Address Manager is a built-in actor that manages Ethereum's address space.[0x2dF7057d3F25212E51aFEA8dA628668229Ea423f](https://etherscan.io/address/0x2dF7057d3F25212E51aFEA8dA628668229Ea423f)🟒
[0x27Bb4A7cd8FB20cb816BF4Aac668BF841bb3D5d3](https://sepolia.etherscan.io/address/0x27Bb4A7cd8FB20cb816BF4Aac668BF841bb3D5d3)🟑
L1ERC721BridgeHandles the sending and receiving of ERC 721 tokens between L1 and L2.[0x3A44A3b263FB631cdbf25f339e2D29497511A81f](https://etherscan.io/address/0x3A44A3b263FB631cdbf25f339e2D29497511A81f)🟒
[0xb4E988CF1aD8C361D56118437502A8f11C7FaA01](https://sepolia.etherscan.io/address/0xb4E988CF1aD8C361D56118437502A8f11C7FaA01)🟑
L2OutputOracleIt contains a list of proposed state roots that the Proposers assert to be a result of block execution. [0x113cB99283AF242Da0A0C54347667edF531Aa7d6](https://etherscan.io/address/0x113cB99283AF242Da0A0C54347667edF531Aa7d6)🟒
[0xA0E35F56C318DE1bD5D9ca6A94Fe7e37C5663348](https://sepolia.etherscan.io/address/0xA0E35F56C318DE1bD5D9ca6A94Fe7e37C5663348)🟑
OptimismPortalIt is the main entry point for depositing funds from L1 to L2. It also allows proving and finalizing withdrawals.[0x26dB93F8b8b4f7016240af62F7730979d353f9A7](https://etherscan.io/address/0x26dB93F8b8b4f7016240af62F7730979d353f9A7)🟒
[0xe3d90F21490686Ec7eF37BE788E02dfC12787264](https://sepolia.etherscan.io/address/0xe3d90F21490686Ec7eF37BE788E02dfC12787264)🟑
L1StandardBridgeIt is the main entry point for depositing ERC20 tokens from L1 to L2. This contract can store any token.[0x2658723Bf70c7667De6B25F99fcce13A16D25d08](https://etherscan.io/address/0x2658723Bf70c7667De6B25F99fcce13A16D25d08)🟒
[0x1Fb30e446eA791cd1f011675E5F3f5311b70faF5](https://sepolia.etherscan.io/address/0x1Fb30e446eA791cd1f011675E5F3f5311b70faF5)🟑
ProtocolVersionsIt is used to manage superchain protocol version information.[0xDd9C27910327d3f4A4007Ad8f7B53332DB6f1079](https://etherscan.io/address/0xDd9C27910327d3f4A4007Ad8f7B53332DB6f1079)🟒
[0x1Bb17EB31bDdFd30F63D4FAe6c8Eb85D9e9b1f48](https://sepolia.etherscan.io/address/0x1Bb17EB31bDdFd30F63D4FAe6c8Eb85D9e9b1f48)🟑
L1CrossDomainMessengerSends messages from L1 to L2 and relays messages from L2 onto L1.[0x31B72D76FB666844C41EdF08dF0254875Dbb7edB](https://etherscan.io/address/0x31B72D76FB666844C41EdF08dF0254875Dbb7edB)🟒
[0x857824E6234f7733ecA4e9A76804fd1afa1A3A2C](https://sepolia.etherscan.io/address/0x857824E6234f7733ecA4e9A76804fd1afa1A3A2C)🟑
OptimismMintableERC20FactoryIt is responsible for creating ERC20 contracts on L1 that can be used for depositing native L2 tokens into.[0xc1dA06CC5DD5cE23bABa924463de7F762039252d](https://etherscan.io/address/0xc1dA06CC5DD5cE23bABa924463de7F762039252d)🟒
[0x269d632C1E518a922C30C749cFD3f82Eb5C779B0](https://sepolia.etherscan.io/address/0x269d632C1E518a922C30C749cFD3f82Eb5C779B0)🟑
L1LiskTokenContains the implementation of LSK as an ERC20 token.[0x6033F7f88332B8db6ad452B7C6D5bB643990aE3f](https://etherscan.io/address/0x6033f7f88332b8db6ad452b7c6d5bb643990ae3f)🟒
[0x16B840bA01e2b05fc2268eAf6d18892a11EC29D6](https://sepolia.etherscan.io/address/0x16b840ba01e2b05fc2268eaf6d18892a11ec29d6)🟑
L1VestingWalletThis contract handles the Vesting functionality of the LSK token for the Ethereum network.[0xd590c2e71739c551eba7aebe00e7855df4cf5fb7](https://etherscan.io/address/0xd590c2e71739c551eba7aebe00e7855df4cf5fb7)🟒
[0x76f1cD8436373fa9f3c17Da1e39740fE9dB9a04B](https://sepolia.etherscan.io/address/0x76f1cd8436373fa9f3c17da1e39740fe9db9a04b)🟑
+ +## Lisk network (L2) + + +### Predeploys on Lisk + +A predeployed contract is included in the L2 genesis state, and it exists from the very beginning of the blockchain. +On Lisk Network, these contracts are located at specific addresses that are determined in advance and are part of the genesis state. +For more information on Predeploys, see [Predeploys' README](https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/predeploys.md). + +Details of **predeployed** contracts deployed on πŸ”΅ **Lisk Mainnet** and 🟣 **Lisk Sepolia Testnet** are as follows. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Name of ContractContract Address
[**GasPriceOracle**](https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/predeploys.md#gaspriceoracle)[0x420000000000000000000000000000000000000F](https://blockscout.lisk.com/address/0x420000000000000000000000000000000000000F)πŸ”΅
[0x420000000000000000000000000000000000000F](https://sepolia-blockscout.lisk.com/address/0x420000000000000000000000000000000000000F)🟣
[**WETH9**](https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/predeploys.md#weth9)[0x4200000000000000000000000000000000000006](https://blockscout.lisk.com/address/0x4200000000000000000000000000000000000006)πŸ”΅
[0x4200000000000000000000000000000000000006](https://sepolia-blockscout.lisk.com/address/0x4200000000000000000000000000000000000006)🟣
[**L2CrossDomainMessenger**](https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/predeploys.md#l2crossdomainmessenger)[0x4200000000000000000000000000000000000007](https://blockscout.lisk.com/address/0x4200000000000000000000000000000000000007)πŸ”΅
[0x4200000000000000000000000000000000000007](https://sepolia-blockscout.lisk.com/address/0x4200000000000000000000000000000000000007)🟣
[**L2StandardBridge**](https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/predeploys.md#l2standardbridge)[0x4200000000000000000000000000000000000010](https://blockscout.lisk.com/address/0x4200000000000000000000000000000000000010)πŸ”΅
[0x4200000000000000000000000000000000000010](https://sepolia-blockscout.lisk.com/address/0x4200000000000000000000000000000000000010)🟣
[**SequencerFeeVault**](https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/predeploys.md#sequencerfeevault)[0x4200000000000000000000000000000000000011](https://blockscout.lisk.com/address/0x4200000000000000000000000000000000000011)πŸ”΅
[0x4200000000000000000000000000000000000011](https://sepolia-blockscout.lisk.com/address/0x4200000000000000000000000000000000000011)🟣
[**OptimismMintableERC20Factory**](https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/predeploys.md#optimismmintableerc20factory)[0x4200000000000000000000000000000000000012](https://blockscout.lisk.com/address/0x4200000000000000000000000000000000000012)πŸ”΅
[0x4200000000000000000000000000000000000012](https://sepolia-blockscout.lisk.com/address/0x4200000000000000000000000000000000000012)🟣
[**L1Block**](https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/predeploys.md#l1block)[0x4200000000000000000000000000000000000015](https://blockscout.lisk.com/address/0x4200000000000000000000000000000000000015)πŸ”΅
[0x4200000000000000000000000000000000000015](https://sepolia-blockscout.lisk.com/address/0x4200000000000000000000000000000000000015)🟣
[**L2ToL1MessagePasser**](https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/predeploys.md#l2tol1messagepasser)[0x4200000000000000000000000000000000000016](https://blockscout.lisk.com/address/0x4200000000000000000000000000000000000016)πŸ”΅
[0x4200000000000000000000000000000000000016](https://sepolia-blockscout.lisk.com/address/0x4200000000000000000000000000000000000016)🟣
[**OptimismMintableERC721Factory**](https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/predeploys.md#optimismmintableerc721factory)[0x4200000000000000000000000000000000000017](https://blockscout.lisk.com/address/0x4200000000000000000000000000000000000017)πŸ”΅
[0x4200000000000000000000000000000000000017](https://sepolia-blockscout.lisk.com/address/0x4200000000000000000000000000000000000017)🟣
[**ProxyAdmin**](https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/predeploys.md#proxyadmin)[0x4200000000000000000000000000000000000018](https://blockscout.lisk.com/address/0x4200000000000000000000000000000000000018)πŸ”΅
[0x4200000000000000000000000000000000000018](https://sepolia-blockscout.lisk.com/address/0x4200000000000000000000000000000000000018)🟣
[**BaseFeeVault**](https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/predeploys.md#basefeevault)[0x4200000000000000000000000000000000000019](https://blockscout.lisk.com/address/0x4200000000000000000000000000000000000019)πŸ”΅
[0x4200000000000000000000000000000000000019](https://sepolia-blockscout.lisk.com/address/0x4200000000000000000000000000000000000019)🟣
[**L1FeeVault**](https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/predeploys.md#l1feevault)[0x420000000000000000000000000000000000001a](https://blockscout.lisk.com/address/0x420000000000000000000000000000000000001a)πŸ”΅
[0x420000000000000000000000000000000000001a](https://sepolia-blockscout.lisk.com/address/0x420000000000000000000000000000000000001a)🟣
[**SchemaRegistry**](https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/predeploys.md#schemaregistry)[0x4200000000000000000000000000000000000020](https://blockscout.lisk.com/address/0x4200000000000000000000000000000000000020)πŸ”΅
[0x4200000000000000000000000000000000000020](https://sepolia-blockscout.lisk.com/address/0x4200000000000000000000000000000000000020)🟣
[**EAS**](https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/predeploys.md#eas)[0x4200000000000000000000000000000000000021](https://blockscout.lisk.com/address/0x4200000000000000000000000000000000000021)πŸ”΅
[0x4200000000000000000000000000000000000021](https://sepolia-blockscout.lisk.com/address/0x4200000000000000000000000000000000000021)🟣
**create2Deployer**[0x13b0D85CcB8bf860b6b79AF3029fCA081AE9beF2](https://blockscout.lisk.com/address/0x13b0D85CcB8bf860b6b79AF3029fCA081AE9beF2)πŸ”΅
[0x13b0D85CcB8bf860b6b79AF3029fCA081AE9beF2](https://sepolia-blockscout.lisk.com/address/0x13b0D85CcB8bf860b6b79AF3029fCA081AE9beF2)🟣
**L2ERC721Bridge**[0x4200000000000000000000000000000000000014](https://blockscout.lisk.com/address/0x4200000000000000000000000000000000000014)πŸ”΅
[0x4200000000000000000000000000000000000014](https://sepolia-blockscout.lisk.com/address/0x4200000000000000000000000000000000000014)🟣
**GovernanceToken**[0x4200000000000000000000000000000000000042](https://blockscout.lisk.com/address/0x4200000000000000000000000000000000000042)πŸ”΅
[0x4200000000000000000000000000000000000042](https://sepolia-blockscout.lisk.com/address/0x4200000000000000000000000000000000000042)🟣
+ +### Lisk features-specific contracts + +Details of **Lisk features-specific** contracts deployed on πŸ”΅ **Lisk Mainnet** and 🟣 **Lisk Sepolia Testnet** are as follows. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Name of ContractDescriptionContract Address
L2AirdropL2Airdrop is an implementation of the Lisk v4 migration airdrop on L2. It is responsible for the airdrop computation and distribution of LSK tokens to the recipient's accounts that have migrated to L2.[0xC7315f4FaaB2F700fc6b4704BB801c46ff6327AC](https://blockscout.lisk.com/address/0xC7315f4FaaB2F700fc6b4704BB801c46ff6327AC)πŸ”΅
[0xDdE1998B8842b1C925Eef7eDFDAA2Df24A75048a](https://sepolia-blockscout.lisk.com/address/0xDdE1998B8842b1C925Eef7eDFDAA2Df24A75048a)🟣
L2Claim
(Proxy)
Proxy contract for claiming LSK tokens from the legacy Lisk chain and recieve the appropriate amount on Lisk L2.[0xC7315f4FaaB2F700fc6b4704BB801c46ff6327AC](https://blockscout.lisk.com/address/0xC7315f4FaaB2F700fc6b4704BB801c46ff6327AC)πŸ”΅
[0xDdE1998B8842b1C925Eef7eDFDAA2Df24A75048a](https://sepolia-blockscout.lisk.com/address/0xDdE1998B8842b1C925Eef7eDFDAA2Df24A75048a)🟣
L2Claim (Implementation)Enables users to claim their LSK tokens from the legacy Lisk chain and recieve the appropriate amount on Lisk L2 using Merkle proofs, with support for both regular and multisig accounts.[0x60790Dc2d45BaA8B36282889569BbB301F4D0c41](https://blockscout.lisk.com/address/0x60790Dc2d45BaA8B36282889569BbB301F4D0c41)πŸ”΅
[0xAE4A95E412d7d669AbE6bB23031Ae0250B832710](https://sepolia-blockscout.lisk.com/address/0xAE4A95E412d7d669AbE6bB23031Ae0250B832710)🟣
L2Governor
(Proxy)
Proxy contract for the governance-related operations of Lisk L2.[0x58a61b1807a7bDA541855DaAEAEe89b1DDA48568](https://blockscout.lisk.com/address/0x58a61b1807a7bDA541855DaAEAEe89b1DDA48568)πŸ”΅
[0xf9181aaD773d423A2cc0155Cb4263E563D51B467](https://sepolia-blockscout.lisk.com/address/0xf9181aaD773d423A2cc0155Cb4263E563D51B467)🟣
L2Governor (Implementation)Handles the governance-related operations of Lisk L2.[0x18a0b8c653c291D69F21A6Ef9a1000335F71618e](https://blockscout.lisk.com/address/0x18a0b8c653c291D69F21A6Ef9a1000335F71618e)πŸ”΅
[0xff5e32726fF30E9a15F6485C3Bd1e31e63B26625](https://sepolia-blockscout.lisk.com/address/0xff5e32726fF30E9a15F6485C3Bd1e31e63B26625)🟣
L2LiskTokenInterface for the `OptimismMintableERC20` contract. Includes functionalities for minting, burning, querying tokens, and bridging addresses.[0xac485391EB2d7D88253a7F1eF18C37f4242D1A24](https://blockscout.lisk.com/address/0xac485391EB2d7D88253a7F1eF18C37f4242D1A24)πŸ”΅
[0x8a21CF9Ba08Ae709D64Cb25AfAA951183EC9FF6D](https://sepolia-blockscout.lisk.com/address/0x8a21CF9Ba08Ae709D64Cb25AfAA951183EC9FF6D)🟣
L2LockingPosition (Proxy)Proxy contract for locking positions.[0xC39F0C944FB3eeF9cd2556488e37d7895DC77aB8](https://blockscout.lisk.com/address/0xC39F0C944FB3eeF9cd2556488e37d7895DC77aB8)πŸ”΅
[0x1220Cd967ED2EE4c593211EabCb2E3b1dC8E4930](https://sepolia-blockscout.lisk.com/address/0x1220Cd967ED2EE4c593211EabCb2E3b1dC8E4930)🟣
L2LockingPosition (Implementation)Contract for locking positions. It allows creating, modifying, and removing locking positions.[0x6Ad85C3309C976B394ddecCD202D659719403671](https://blockscout.lisk.com/address/0x6Ad85C3309C976B394ddecCD202D659719403671)πŸ”΅
[0xd5760D9d1a052FbCAad275637e8FC42B73063Fd4](https://sepolia-blockscout.lisk.com/address/0xd5760D9d1a052FbCAad275637e8FC42B73063Fd4)🟣
L2Staking (Proxy)Proxy contract for staking LSK.[0xe9FA20Ca1157Fa686e60F1Afc763104F2C794b83](https://blockscout.lisk.com/address/0xe9FA20Ca1157Fa686e60F1Afc763104F2C794b83)πŸ”΅
[0x77F4Ed75081c62aD9fA254b0E088A4660AacF68D](https://sepolia-blockscout.lisk.com/address/0x77F4Ed75081c62aD9fA254b0E088A4660AacF68D)🟣
L2Staking (Implementation)This contract handles the staking functionality for the L2 network.[0x0ff2D89d01Ce79a0e971E264EdBA1608a8654CEd](https://blockscout.lisk.com/address/0x0ff2D89d01Ce79a0e971E264EdBA1608a8654CEd)πŸ”΅
[0xD5D466b6FE4D00965991781845A1817975B40d91](https://sepolia-blockscout.lisk.com/address/0xD5D466b6FE4D00965991781845A1817975B40d91)🟣
L2Reward
(Proxy)
Proxy contract for managing and handling L2 Staking Rewards.[0xD35ca9577a9DADa7624a35EC10C2F55031f0Ab1f](https://blockscout.lisk.com/address/0xD35ca9577a9DADa7624a35EC10C2F55031f0Ab1f)πŸ”΅
[0xFd322B4724C497E59D48fff8f79c16b4D48837f5](https://sepolia-blockscout.lisk.com/address/0xFd322B4724C497E59D48fff8f79c16b4D48837f5)🟣
L2Reward (Implementation)This contract manages and handles L2 Staking Rewards.[0xA82138726caF68901933838135Fb103E08fb858e](https://blockscout.lisk.com/address/0xA82138726caF68901933838135Fb103E08fb858e)πŸ”΅
[0x973Bac46dd86A5cc5349E8d4A153AC5A20cdC296](https://sepolia-blockscout.lisk.com/address/0x973Bac46dd86A5cc5349E8d4A153AC5A20cdC296)🟣
L2TimelockControllerThis contract module acts as a time-locked controller.[0x2294A7f24187B84995A2A28112f82f07BE1BceAD](https://blockscout.lisk.com/address/0x2294A7f24187B84995A2A28112f82f07BE1BceAD)πŸ”΅
[0x76f1cD8436373fa9f3c17Da1e39740fE9dB9a04B](https://sepolia-blockscout.lisk.com/address/0x76f1cD8436373fa9f3c17Da1e39740fE9dB9a04B)🟣
L2VestingWalletThis contract handles the Vesting functionality of the LSK token for the L2 network.[0xdF2363BE4644f160EEbFe5AE6F8728e64D8Db211](https://blockscout.lisk.com/address/0xdF2363BE4644f160EEbFe5AE6F8728e64D8Db211)πŸ”΅
[0xc20e0E8590c32dbF11b38C8c0580395243Ebd533](https://sepolia-blockscout.lisk.com/address/0xc20e0E8590c32dbF11b38C8c0580395243Ebd533)🟣
L2VotingPower
(Proxy)
Proxy contract for handling voting powers of stakers on Lisk L2 network.[0x2eE6Eca46d2406454708a1C80356a6E63b57D404](https://blockscout.lisk.com/address/0x2eE6Eca46d2406454708a1C80356a6E63b57D404)πŸ”΅
[0xa52Ba291Ec45d8037510D5Da857f59abfA3DC0C5](https://sepolia-blockscout.lisk.com/address/0xa52Ba291Ec45d8037510D5Da857f59abfA3DC0C5)🟣
L2VotingPower (Implementation)Contract for handling voting powers, locking positions, etc. of stakers on the Lisk L2 network.[0x99137F8880fB38e770EB7eF3d68038bC673D58EF](https://blockscout.lisk.com/address/0x99137F8880fB38e770EB7eF3d68038bC673D58EF)πŸ”΅
[0x841e828A69B6efC1b02F7C317F59291A39583a64](https://sepolia-blockscout.lisk.com/address/0x841e828A69B6efC1b02F7C317F59291A39583a64)🟣
diff --git a/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/add-token-to-lisk/index.md b/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/add-token-to-lisk/index.md index 8757561d6..974333fe2 100644 --- a/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/add-token-to-lisk/index.md +++ b/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/add-token-to-lisk/index.md @@ -72,7 +72,7 @@ To add your token to the list, perform the following steps. ### Step 1: Deploy your token on Lisk Select your preferred bridging framework and use it to deploy an ERC-20 for your token on Lisk. -We recommend you use the framework provided by Lisk's [standard bridge](#the-standard-bridge) contracts and, furthermore, deploy your token using the [OptimismMintableERC20Factory](../contracts.mdx#lisk-network-l2). +We recommend you use the framework provided by Lisk's [standard bridge](#the-standard-bridge) contracts and, furthermore, deploy your token using the [OptimismMintableERC20Factory](/about-lisk/contracts.mdx#lisk-network-l2). Deploying your token on Lisk in this manner provides us with guarantees that will smooth the approval process. If you choose a different bridging framework, its interface must be compatible with that of the standard bridge. Otherwise, it may be difficult for us to support them. diff --git a/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/deploying-smart-contract/with-Foundry.md b/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/deploying-smart-contract/with-Foundry.md index 7e25e2d2a..1a8254064 100644 --- a/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/deploying-smart-contract/with-Foundry.md +++ b/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/deploying-smart-contract/with-Foundry.md @@ -1,7 +1,7 @@ --- title: ... with Foundry slug: /building-on-lisk/deploying-smart-contract/with-Foundry -description: "A guide on deploying a smart contract on the Lisk test network using Foundry. Includes instructions for setting up the environment, compiling, and deploying the smart contract." +description: "A guide on deploying a smart contract on the Lisk network using Foundry. Includes instructions for setting up the environment, compiling, and deploying the smart contract." keywords: [ "Foundry", "smart contract", diff --git a/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/deploying-smart-contract/with-Hardhat.md b/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/deploying-smart-contract/with-Hardhat.md index 4d37c0149..c154b1c40 100644 --- a/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/deploying-smart-contract/with-Hardhat.md +++ b/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/deploying-smart-contract/with-Hardhat.md @@ -1,7 +1,7 @@ --- title: ... with Hardhat slug: /building-on-lisk/deploying-smart-contract/with-Hardhat -description: "A guide on deploying a smart contract on the Lisk test network using Hardhat. Includes instructions for setting up the environment, compiling, and deploying the smart contract." +description: "A guide on deploying a smart contract on the Lisk network using Hardhat. Includes instructions for setting up the environment, compiling, and deploying the smart contract." keywords: [ "Hardhat", "smart contract", @@ -23,6 +23,9 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; # Deploying a smart contract with Hardhat + +On this page, you will learn how to create, deploy and verify a smart contract with HardHat to the **Lisk Sepolia** testnet. + ## Prerequisites ### Node v18+ @@ -47,7 +50,7 @@ Then, use the aforementioned Lisk Bridge to send tokens from the **Ethereum Sepo :::note You can deploy a contract on Lisk Mainnet by adopting the same process. -For deploying to mainnet, ensure that your wallet has enough ETH. +For deploying to Mainnet, ensure that your wallet has enough ETH. The subsequent text contains commands for both Lisk and Lisk Sepolia for your ease. For more information, see the [available Lisk networks](/network-info) and [how to connect a wallet with them](/user/connecting-to-a-wallet). diff --git a/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/deploying-smart-contract/with-thirdweb.mdx b/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/deploying-smart-contract/with-thirdweb.mdx index 845ba748b..371c244ec 100644 --- a/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/deploying-smart-contract/with-thirdweb.mdx +++ b/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/deploying-smart-contract/with-thirdweb.mdx @@ -1,7 +1,7 @@ --- title: ... with thirdweb slug: /building-on-lisk/deploying-smart-contract/with-thirdweb -description: "A guide on deploying a smart contract on the Lisk test network using thirdweb. Includes instructions for setting up the environment, compiling, and deploying the smart contract." +description: "A guide on deploying a smart contract on the Lisk network using thirdweb. Includes instructions for setting up the environment, compiling, and deploying the smart contract." keywords: [ "thirdweb", "smart contract", @@ -24,6 +24,9 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; # Deploying a smart contract with thirdweb + +On this page, you will learn how to create, deploy and verify a smart contract with thirdweb to the **Lisk Sepolia** testnet. + [thirdweb](https://thirdweb.com/) is an end-to-end framework for smart contract development and deployment. It enables developers to deploy, standard contracts such as ERC-20, ERC-721, or ERC-1155, etc. without writing a line of code. diff --git a/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/web3-app-development.mdx b/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/web3-app-development.mdx new file mode 100644 index 000000000..9fe1ff367 --- /dev/null +++ b/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/web3-app-development.mdx @@ -0,0 +1,336 @@ +--- +title: Web3 App Development +slug: /web3-app-development +description: 'An introduction into Web3 application development on Lisk.' +keywords: + [ + 'Lisk', + 'Web3 apps', + 'Web3 app', + 'Web3 application', + 'Web3 app development', + 'Web3 mobile app', + 'Web3 PWA', + 'dApp development', + 'Mobile dApp development', + 'Mobile app development', + 'Lisk apps', + 'Lisk dApps', + ] +toc_max_heading_level: 4 +--- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +# Web3 App Development + +On this page, you will learn what Web3 applications are, how they differ from Web 2.0 apps, and how to get started with Web3 app development on Lisk. + +## What are Web3 Applications? + +### Evolution of the Web + +Since the internet was born, there has been constant innovation in how people use the internet to communicate and interact with each other. +To describe important steps in this innovation, websites, and apps are generally categorized into different Web "versions": + + + + Web 1.0 is the first "version" of the Web, i.e., the first generation of websites that occurred when the Internet became available to the broader public around 1990. + Web 1.0 is often referred to as the "static" or "read-only" web, consisting mainly of simple static HTML pages with limited interactivity. + + However, some Web 2.0 capabilities were present in the days of Web 1.0 but were implemented differently. + For example, a Web 1.0 site may have had a guestbook page for visitor comments, instead of a comment section at the end of each page (typical of Web 2.0). + + + + In the late 1990s the transition to [Web 2.0](https://en.wikipedia.org/wiki/Web_2.0) started, when some Web 1.0 sites introduced dynamic HTML with social features, allowing users to interact with web pages in a much more fluent way. + + :::info + The term "Web 2.0" was coined by Darcy DiNucci, an information architecture consultant, in her January 1999 article [Fragmented Future](http://darcyd.com/fragmented_future.pdf). + ::: + + Web 2.0 is the era where social media, [web applications](https://en.wikipedia.org/wiki/Web_application), and mobile apps came to the rise. + Because of the new social features and improved user experience that Web 2.0 apps offered, the number of users interacting with the web increased significantly, leading to the creation of many new web services and applications. + Some of the most popular examples of Web 2.0 applications are Facebook, X, Amazon, and YouTube. + + Many of these applications and services became important pillars of the internet and people's lives, and even society as a whole. + However, the more relevant these applications became, the more obvious and relevant their limitations became, as users had to trust the companies behind them with their data and privacy. + + ##### Web2 Limitations + + Though Web 2.0 revolutionized how people positively used the web, a few of its characteristics led to certain disadvantages for users interacting with Web2 applications. For example: + + - Censorship + - Lack of transparency + - Limited privacy + - Limited interoperability + + + Web3 (also known as Web 3.0) is the next step in the evolution of the Web, aiming to address the [limitations of Web 2.0](web3-app-development.mdx?web-version=web2#web2-limitations). + Web3 is based on the idea of a decentralized internet, where users are in control over their data. + + :::info + The term "Web3" was coined by Polkadot founder and Ethereum co-founder Gavin Wood in 2014, referring to a [decentralized online ecosystem based on the blockchain](https://www.wired.com/story/web3-gavin-wood-interview/). + ::: + + 2015 marked the beginning of the Web3 era when Ethereum launched as the world's first programmable blockchain. + Web3 applications are decentralized applications (also known as "dApps") that run on a blockchain, allowing users to interact with each other and the blockchain in a trustless way. + This puts users in control of their data and privacy, removing the need to trust a central authority. + + Web3 apps are built on top of blockchain technology, which allows users greater ownership and control over their data. + This provides new features and allows services that are not feasible in the Web2 world. + Often, Web3 apps combine other cutting-edge technologies like AI to provide unique and new user experiences. + + New types of Web3 apps include: + + - DeFi (Decentralized Finance), for example: + - DEXs (Decentralized Exchanges) + - GameFi (Gaming Finance) + - Staking and yield farming platforms + - Decentralized crowdfunding and investing platforms + - Decentralized lending and borrowing + - Prediction markets + - Asset / RWA tokenization platforms + - DAOs (Decentralized Autonomous Organizations) + - [DeSoc](https://onchain.org/magazine/decentralized-social-media-business-opportunities-are-they-real/) (Decentralized Social Media) + - [DeSci](https://onchain.org/magazine/not-only-the-best-desci-crypto-projects-an-overview/) (Decentralized Science) + - [DePIN](https://onchain.org/magazine/how-depin-web3-projects-are-connecting-the-world-to-crypto/) (Decentralized Physical Infrastructure Networks) + + Web3 is a promise to bring back the original vision of the internet, where users are in control of their data and privacy, and where the internet is a place for free speech and innovation. + However, how blockchain technology is implemented and used in apps can vary greatly, and not all Web3 apps are equally decentralized and trustless. + + + +### Further Regarding +- [Introduction to Web3](https://ethereum.org/en/web3/) *by Ethereum* + +## Getting Started with Web3 App Development + +### Platforms + +To get started with the actual development of a Web3 app, you need to be clear about the right **platform(s)** to build your Web3 app on. +The following sections will give you an overview of the different platforms you can choose from to build your Web3 app on, including further resources and guides to get you started with the app development. + + + +Mobile applications are generally a great way to reach a large audience, as most people have a smartphone and use it to access the internet. +Mobile apps can use the integrated features of handheld devices and are typically faster and more user-friendly than websites. +This can provide a more immersive experience for users. +Last but not least, mobile apps allow users to access your app on the go, which can be a big advantage for many use cases. + +##### Guides +- [Build Web3 Mobile Apps with React Native on Lisk with thirdweb](https://blog.thirdweb.com/web3-mobile-apps/build-web3-mobile-apps-with-reactive-native-on-lisk/) +- [Video tutorial: How to Build a Web3 Mobile App](https://www.youtube.com/watch?v=PRAsc_ocVtk) *by thirdweb* +- [Building a mobile dApp with Flutter](https://medium.com/dash-community/building-a-mobile-dapp-with-flutter-be945c80315a) + + +The main advantage of web applications is that they are platform-independent and can be accessed from any device with a web browser. +Additionally, they don't need to be installed by the user and can be used directly in the browser. + +##### Guides +- [How to Build an NFT Minting dApp](https://blog.thirdweb.com/guides/build-nft-minting-dapp-with-thirdweb-guide/) *by thirdweb* + + +A Progressive Web App (PWA) allows users to install a web app on their devices. +They appear as native apps on desktop or mobile devices and offer features like offline support and push notifications. +This way, PWAs allow the development of an application that can be used via a browser[^1], mobile, or desktop application alike. +Therefore, PWAs are a great choice for reaching users on different platforms simultaneously. + +Additionally, PWAs allow a user to directly install the app through your web app without the need to visit an app store. +This allows you to serve the app directly to the users, without bothering about restrictions of app stores on what is allowed for blockchain applications. +In-app purchase fees can also be avoided because users no longer need to go through the app store. + +[^1]: Only supported in PWA-compatible browsers (most Chromium-based browsers should work). + +##### Guides +- [How to Create a Web3 PWA](https://blog.thirdweb.com/guides/how-to-create-a-web3-pwa/) *by thirdweb* +- [Video tutorial: Build a Web3 PWA](https://www.youtube.com/watch?v=VU8i-dn2_GE) *by thirdweb* + +{/* ### Web3 Desktop apps +Desktop apps are native applications that are installed on a user's computer. +Similar to mobile apps, they are platform dependent. +Desktop apps make it difficult for users to access them on the go, as you need a computer to use them. +On the other side, desktop apps shine with their performance and the ability to use the full power of the computer they are running on, and they are typically build for larger screens allowing more complex user interfaces. +So if you application requires a lot of computing power, and/or a very complex UI that might not be fitting for a mobile screen, a desktop app can be the right choice. + */} + + +### Onboarding Web2 Users to Web3 + +A major challenge of Web3 applications is to provide a seamless user experience for users, similar to what they are used to from Web2 applications. + +To onboard Web2 users to Web3, apps need to simplify the way how users interact with the app, in a way that feels natural and intuitive to them, while still providing the benefits of Web3 in a secure way. +To aim for a smooth user experience, and to abstract the complexity of blockchain technology away from the user, it is highly recommended to include "account abstraction" (sometimes also referred to as "smart accounts", "smart wallets" or "smart contract accounts") into your Web3 application. + +#### Account Abstraction and Smart Accounts + +Account abstraction is a concept that introduces an additional layer over the blockchain, which delegates most of the complexity of interacting with the blockchain away from the user to smart contracts. +It has the potential to significantly enhance the user experience of Web3 applications, as it allows users to interact with the app in a more user-friendly and secure way. +Account abstraction is also sometimes referred to as "smart accounts" or "smart wallets", because it puts most of the logic of handling transactions and user interactions into smart contracts. + +This unlocks a range of features that significantly enhance user experience: + +- **Signature Abstraction**: Users no longer need to manually sign transactions with private keys. +Instead, smart contracts handle the signing logic, eliminating the risk of user error and phishing attacks. +- **Enhanced Security**: Multi-signature wallets, social recovery mechanisms, and custom access controls can be implemented within the smart contract, mitigating single points of failure and theft risks. +- **Customizable Transactions**: Smart contracts can be programmed to include spending limits, time-locked transactions, and dApp-specific controls. +This allows to automate transactions and tailoring the user experience to specific needs. +- **Fee Abstraction**: Transaction fees can be dynamically managed through smart contracts, enabling features like custom gas tokens and gasless transactions for specific use cases. + +On the technical side, account abstraction is implemented by the [ERC-4337 standard](https://eips.ethereum.org/EIPS/eip-4337), which defines a set of interfaces and functions that smart contracts can use to interact with the blockchain on behalf of users. + +It comprises the following fundamental components: + +- **UserOperation**: a structure that describes a transaction to be sent on behalf of a user. +To avoid confusion, it is not named β€œtransaction”. +Like a transaction, it contains β€œsender”, β€œto”, β€œcalldata”, β€œmaxFeePerGas”, β€œmaxPriorityFee”, β€œsignature”, β€œnonce”. +Unlike a transaction the β€œsignature” field usage is not defined by the protocol, but by each account implementation. +Also, it contains several other fields, described in detail in ERC-4337. +- **Account Contract**: the user's smart account sending a user operation. +- **EntryPoint**: a singleton contract to execute bundles of UserOperations. +It manages the verification and execution logic for UserOperations, ensuring they are processed correctly. +- **Bundler**: Bundlers are contracts that package UserOperations from a mempool and send them to the EntryPoint. +Bundling is the process where a node/bundler collects multiple UserOperations and creates a single transaction to submit onchain. +- **Account Factory**: When using a wallet for the first time, this contract specifies the creation of the smart contract wallet. +- **Paymaster**(optional): a helper contract that agrees to pay for the transaction, instead of the sender itself. +Paymasters can cover gas costs for users, sponsor specific transactions, or implement custom fee models, opening doors for novel use cases. + +##### Further Reading +- [Account abstraction: A complete overview](https://blaize.tech/blog/account-abstraction-guide/) *by Blaize* +- [What is Account Abstraction? ERC-4337 Explained](https://blog.thirdweb.com/account-abstraction-erc4337/) *by thirdweb* +- [How to pay gas fees with LSK](https://blog.thirdweb.com/changelog/ts-tokenpaymasters-pay-for-gas-with-lisk-lsk-base-usdc-or-celo-cusd/) *by thirdweb* +- [How to create a Web3 mobile app with gasless transactions on Lisk](https://blog.thirdweb.com/web3-mobile-apps/build-web3-mobile-apps-with-reactive-native-on-lisk/) *by thirdweb* + +{/* TODO: Extend with additional topics relevant for web3 devs +### Best Practices & other Considerations + +- Proxy contracts: +Smart contracts are immutable, meaning that once they are deployed, they cannot be changed. +However, to fix bugs or add new features to an already deployed smart contract, proxy contracts can be used to upgrade smart contracts without changing the contract address. +- Gas Optimization: +- secure key management +- Bug bounty programs +- handling user data */} + +### Testing and Deployment +When it comes to testing and deployment of Web3 apps, there are some additional aspects to consider compared to Web2 apps. +The intrinsic vulnerabilities of smart contracts, the immutability of blockchain data and interacting with a decentralized network call for specific testing and security measures. +Gladly, there are already many tools available to help developers ensure the security and reliability of their Web3 apps. +The list below provides a selection of popular tools and services used to test Web3 apps: + +#### Smart Contract Test Suites +Often, smart contract development frameworks come with built-in testing tools that simplify to create comprehensive tests for smart contracts. +This includes utilities to simplify writing of the tests, or the ability to spin up a local node for deploying and testing smart contracts in a local development network, i.e. Devnet. + +A selection of popular testing environments for smart contracts can be found below: + +- [Foundry](https://book.getfoundry.sh/): Foundry is a smart contract development toolchain. +Foundry provides a robust [testing framework](https://book.getfoundry.sh/forge/tests) that allows developers to create comprehensive test suites for their projects using Solidity. +The [Forge Standard Library](https://book.getfoundry.sh/reference/forge-std/) provides a set of utilities to simplify testing smart contracts. +It also provides a local testnet node for deploying and testing smart contracts, see [Anvil](https://book.getfoundry.sh/anvil/). +- [Hardhat](https://hardhat.org): Hardhat is a development environment that facilitates smart contract development. +It comes built-in with [Hardhat Network](https://hardhat.org/hardhat-network/docs/overview), a local Ethereum network node designed for development. +Hardhat allows you to deploy your contracts, [run your tests](https://hardhat.org/tutorial/testing-contracts) and debug your code, all within the confines of your local machine. +Tests are written in JavaScript, using [ethers](https://ethers.org/). +- [Remix](https://remix.ethereum.org/): Remix is an IDE that helps you write Solidity contracts straight from the browser. +It provides powerful features for testing and debugging smart contracts, like the [Debugger](https://remix-ide.readthedocs.io/en/latest/debugger.html) or the [Unit Testing Plugin](https://remix-ide.readthedocs.io/en/latest/unittesting.html). +- [Waffle](https://getwaffle.io/): Waffle is another framework for developing and testing smart contracts. +Tests are written in JavaScript / Typescript. + +##### Guides +- [Deploying a smart contract with Foundry](/building-on-lisk/deploying-smart-contract/with-Foundry.md) +- [Deploying a smart contract with Hardhat](/building-on-lisk/deploying-smart-contract/with-Hardhat.md) +- [Deploying a smart contract with Remix](/building-on-lisk/deploying-smart-contract/with-Remix.mdx) + +#### Smart Contract Code Analysis +To ensure the security of smart contracts, it is essential to analyze the code for vulnerabilities. +There are several tools available that help developers to analyze their smart contracts for common security issues and vulnerabilities, for example: + +- [Slither](https://github.com/crytic/slither): Slither is a Solidity static analysis framework that detects common vulnerabilities in smart contracts. +- [Etheno](https://github.com/crytic/etheno): Etheno is a tool that helps developers write secure smart contracts by providing a set of rules that can be used to check the security of smart contracts. +- [Mythril](https://github.com/Consensys/mythril): Mythril is a security analysis tool for Ethereum smart contracts. +- **Smart contract audits**: + +#### Testnets +Testnets are public blockchains that are used for testing purposes. +They often have the same features as the mainnet, but the tokens on the testnet have no real value - this allows developers to test their smart contracts and Web3 apps in a real-world environment without risking real assets. +Before deploying a smart contract to the mainnet, it is highly recommended to test it on a testnet to ensure that it works as expected. +##### Public Testnets +The following testnets are available for testing smart contracts and Web3 apps on Lisk: +- [Lisk Sepolia](/about-lisk/network-info.md#lisk-sepolia-testnet) + +:::tip +To get free testnet ETH and/or LSK, check out our [available faucets](/lisk-tools/faucets.md). +::: + +##### Virtual Testnets +[Tenderly](https://tenderly.co/) recently introduced the possibility to spin up [Virtual Testnets](https://blog.tenderly.co/how-virtual-testnets-replace-public-testnets/). +Virtual Testnets are a new way to test your Web3 apps, bringing the onchain data of a mainnet and the flexibility of a local environment together. + +Some interesting features of Virtual Testnets are: + +- **Build your dapps with real, up-to-date mainnet data** and test its actual performance under realistic conditions. +- **Get an unlimited faucet** and stop begging for test ETH. +Mint both native and ERC-20 tokens in any amount you need, impersonate accounts, and test complex scenarios uninterruptedly. +- **Fully customize your development infrastructure** to fit your unique workflows. +Virtual TestNets are easy to set up and configure, giving you full control and flexibility over your environments. +You can even manipulate the state of your forked chains with custom values, custom chain IDs, and more, making sure they fit your unique requirements. + +#### E2E Testing +End-to-end (E2E) testing is a type of software testing that tests the complete flow of an application from start to finish. +This specifically includes testing the frontend of your application, ensuring that the user interface works as expected. +To deal with stuff like wallets, and other Web3-specific things, you might want to use specialized Web3 E2E testing tools: + +[Synpress](https://synpress.io/) is an E2E (End-to-End) testing library for Web3 dapps. +Synpress can be used with two leading E2E testing frameworks out there, i.e., both [Playwright](https://playwright.dev/) and [Cypress](https://www.cypress.io/), with support for all of their its features. + +#### Performance testing +Performance testing is essential to ensure that your Web3 app can handle the expected load of users and their interactions. +Measure and improve your apps performance, throughput, and resilience under different levels of traffic and transactions. + +Some examples of performance testing tools are: + +- [k6](https://k6.io/) +- [Artillery](https://www.artillery.io/) + +{/* #### Automated Testing and Continuous Integration (CI) */} + +#### Monitoring +Monitoring is important to ensure that your Web3 app is running smoothly and to detect and fix issues before they affect your users. + +Some popular monitoring tools are: + +- [Prometheus](https://prometheus.io/) combined with [Grafana](https://grafana.com/) +- [Elastic Stack (ELK)](https://www.elastic.co/elastic-stack) + +### Web2 vs Web3 App Development +#### Languages +Concerning frontend app development, there aren't many differences between Web2 and Web3 apps when it comes to programming languages. +All languages that are typically used for Web2 app development can also be used for Web3 app development. +In the end, Web3 apps can even look and feel exactly like Web2 apps for users, because their frontend is built with the same technologies. + +However, the backend of Web3 apps is quite different, as it interacts with the blockchain through smart contracts. +Smart contracts are written in [Solidity](https://soliditylang.org/), therefore Web3 developers need to know Solidity to build the smart contracts they require for their app. +Luckily, for many use cases, there are already audited smart contracts available(see [OpenZeppelin](https://www.openzeppelin.com/solidity-contracts) or [thirdweb](https://thirdweb.com/explore)) that can be used, so developers don't need to write all of their smart contracts from scratch. + +#### Tech Stack +As mentioned above, the Web2 and Web3 app frontend development is very similar. +Theoretically, you could build a Web3 app with nearly the same tech stack as a Web2 app, like Next.js, Vite, etc. +The only thing you need to add is a way for your application to interact with the blockchain, see [Data access](#data-access). + +To support developers, many blockchain platforms offer their own SDKs and tools to interact with their blockchain, which can make development easier and more efficient. +There are also SDKs for Web3 app development that provide a complete tech stack, like [thirdweb](https://thirdweb.com/) or [Alchemy](https://www.alchemy.com/), which take away most of the complexity of blockchain development and provide a smooth developer experience. +thirdweb supports [Lisk](https://thirdweb.com/lisk) and many other EVM-compatible blockchains. + +#### Data Storage +In Web2 apps, data is typically stored in a centralized database. +In Web3 apps, some data is stored on the blockchain, i.e., a decentralized database. +How the data is stored is defined inside of smart contracts. +However, not all data should always be stored on the blockchain, as it is quite expensive and slow to store large amounts of data onchain. +Therefore, Web3 apps sometimes use a combination of onchain storage and offchain storage. + +#### Data Access +In Web2 apps, data from the database is accessed through APIs. +In Web3 apps, blockchain data is accessed through smart contracts. +They usually expose public functions that can be called by the app frontend to read and/or write data from/to the blockchain, similar to a classical API. +To interact with the blockchain, there are various libraries and frameworks available, like [viem](https://viem.sh/), [web3.js](https://web3js.readthedocs.io), or [ethers.js](https://docs.ethers.io). diff --git a/sidebars.js b/sidebars.js index b4a7083ad..1fffc226b 100644 --- a/sidebars.js +++ b/sidebars.js @@ -26,21 +26,20 @@ const sidebars = { collapsed: false, items: [ 'intro', + { type: 'ref', id: 'docs-user/connecting-to-a-wallet' }, 'about-lisk/network-info', - 'about-lisk/fees' + 'about-lisk/fees', + 'about-lisk/contracts', + 'about-lisk/bridged-tokens' ], }, - { type: 'category', label: 'Building on Lisk', collapsible: true, collapsed: false, items: [ - { type: 'ref', id: 'docs-user/connecting-to-a-wallet' }, - 'building-on-lisk/contracts', - 'building-on-lisk/bridged-tokens', - 'building-on-lisk/run-a-lisk-node', + 'building-on-lisk/web3-app-development', { type: 'category', label: 'Deploying a Smart Contract', @@ -119,7 +118,8 @@ const sidebars = { 'building-on-lisk/using-oracle-data/redstone-pull', 'building-on-lisk/using-oracle-data/redstone-push', ], - } + }, + 'building-on-lisk/run-a-lisk-node' ], link: { type: 'generated-index', From d8c13fde92c1f9c14bb5d3c56a6bb2b9ee7868fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mona=20B=C3=A4renf=C3=A4nger?= Date: Tue, 11 Feb 2025 13:25:02 +0100 Subject: [PATCH 5/7] [LISKDOCS-37] Add Tenderly nodes (#271) * Add tenderly nodes * Move section down * Update translations * Apply suggestions from code review Co-authored-by: Muhammad Talha <13951043+TalhaMaliktz@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Muhammad Talha <13951043+TalhaMaliktz@users.noreply.github.com> * Remove page --------- Co-authored-by: Muhammad Talha <13951043+TalhaMaliktz@users.noreply.github.com> --- docs/building-on-lisk/run-a-lisk-node.md | 2 +- .../{api-providers.md => node-providers.md} | 27 +++--- .../building-on-lisk/run-a-lisk-node.md | 2 +- .../current/lisk-tools/node-providers.md | 95 +++++++++++++++++++ sidebars.js | 2 +- 5 files changed, 112 insertions(+), 16 deletions(-) rename docs/lisk-tools/{api-providers.md => node-providers.md} (84%) create mode 100644 i18n/ind/docusaurus-plugin-content-docs/current/lisk-tools/node-providers.md diff --git a/docs/building-on-lisk/run-a-lisk-node.md b/docs/building-on-lisk/run-a-lisk-node.md index 81e4448b9..8d059265b 100644 --- a/docs/building-on-lisk/run-a-lisk-node.md +++ b/docs/building-on-lisk/run-a-lisk-node.md @@ -114,5 +114,5 @@ $( curl -s -d '{"id":0,"jsonrpc":"2.0","method":"optimism_syncStatus"}' -H "Cont ``` -[partners]: /lisk-tools/api-providers +[partners]: /lisk-tools/node-providers [lisk node]: https://github.com/LiskHQ/lisk-node \ No newline at end of file diff --git a/docs/lisk-tools/api-providers.md b/docs/lisk-tools/node-providers.md similarity index 84% rename from docs/lisk-tools/api-providers.md rename to docs/lisk-tools/node-providers.md index 9ad455c2c..2a6ff0633 100644 --- a/docs/lisk-tools/api-providers.md +++ b/docs/lisk-tools/node-providers.md @@ -1,6 +1,6 @@ --- -title: API Providers -slug: /lisk-tools/api-providers +title: Node providers +slug: /lisk-tools/node-providers description: Documentation for Node Providers for the Lisk network. Including details on their services, supported networks, and pricing plans. keywords: [ @@ -24,28 +24,21 @@ keywords: ] --- -# API Providers +# Node providers Lisk nodes expose an RPC API that allows other parties to interact with the blockchain by invoking requests. If you're just getting started and need an RPC URL, you can use our [free endpoints](#lisk-rpc). If you're looking to strengthen your app and avoid rate-limiting for your users, please check out our available RPC node providers like [dRPC](#drpc). -## API reference - +:::tip[API reference] The available endpoints for Lisk nodes include all [Geth RPC endpoints](https://geth.ethereum.org/docs/interacting-with-geth/rpc), which also include all standard [JSON-RPC API endpoints](https://ethereum.github.io/execution-apis/api-documentation/) of Ethereum. - +::: ## Lisk RPC Free, rate limited RPC endpoints for the Lisk networks. - - - | | Lisk Sepolia Testnet | Lisk | | :------ | :------ | :----------------------- | |**HTTP RPC** | https://rpc.sepolia-api.lisk.com | https://rpc.api.lisk.com | @@ -65,7 +58,7 @@ They provide a free tier that allows for an unlimited amount of requests over pu You can also check the available endpoints for Lisk directly under [https://drpc.org/public-endpoints/lisk](https://drpc.org/public-endpoints/lisk). -dRPC also provides a [faucet for Lisk Sepolia](faucets.md#drpc-faucet). +dRPC also provides a [faucet for Lisk Sepolia](./faucets.md#drpc-faucet). :::note[How to create API keys for dRPC] In order to use the provided endpoints, you need to [get the corresponding API keys](https://docs.drpc.org/gettingstarted/createaccount). @@ -92,3 +85,11 @@ To use the Moralis RPC Nodes, follow these steps: 2. **Set up your node:** Visit the [Setting Up RPC Nodes](https://docs.moralis.com/get-your-node-api-key) guide to create and configure your RPC node. 3. **Make your first RPC call:** Once you have your node set up, follow the [tutorial](https://docs.moralis.com/make-your-first-rpc-call) to make your first JSON-RPC call using ethers.js. +## Tenderly + +[Tenderly](https://tenderly.co/) is a Web3 development platform that offers its tools and infrastructure across 79+ networks. Some networks, like Lisk, also have node RPC support. + +- [Lisk Mainnet nodes by Tenderly](https://docs.tenderly.co/node/rpc-reference/lisk) +- [Lisk Sepolia Testnet nodes by Tenderly](https://docs.tenderly.co/node/rpc-reference/lisk-sepolia) + +Tenderly provides a [free trier](https://tenderly.co/pricing) to user their RPC nodes. \ No newline at end of file diff --git a/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/run-a-lisk-node.md b/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/run-a-lisk-node.md index 81e4448b9..8d059265b 100644 --- a/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/run-a-lisk-node.md +++ b/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/run-a-lisk-node.md @@ -114,5 +114,5 @@ $( curl -s -d '{"id":0,"jsonrpc":"2.0","method":"optimism_syncStatus"}' -H "Cont ``` -[partners]: /lisk-tools/api-providers +[partners]: /lisk-tools/node-providers [lisk node]: https://github.com/LiskHQ/lisk-node \ No newline at end of file diff --git a/i18n/ind/docusaurus-plugin-content-docs/current/lisk-tools/node-providers.md b/i18n/ind/docusaurus-plugin-content-docs/current/lisk-tools/node-providers.md new file mode 100644 index 000000000..1e51e5dae --- /dev/null +++ b/i18n/ind/docusaurus-plugin-content-docs/current/lisk-tools/node-providers.md @@ -0,0 +1,95 @@ +--- +title: Node providers +slug: /lisk-tools/node-providers +description: Documentation for Node Providers for the Lisk network. Including details on their services, supported networks, and pricing plans. +keywords: + [ + Node Providers, + Lisk, + Lisk network, + Lisk node, + hosted nodes, + archival nodes, + RPC, + RPC node, + RPC URL, + RPC endpoints, + blockchain services, + blockchain infrastructure, + developer tools, + API, + Web3 infrastructure, + dRPC, + Sepolia, + ] +--- + +# Node providers + +Lisk nodes expose an RPC API that allows other parties to interact with the blockchain by invoking requests. + +If you're just getting started and need an RPC URL, you can use our [free endpoints](#lisk-rpc). +If you're looking to strengthen your app and avoid rate-limiting for your users, please check out our available RPC node providers like [dRPC](#drpc). + +:::tip[API reference] +The available endpoints for Lisk nodes include all [Geth RPC endpoints](https://geth.ethereum.org/docs/interacting-with-geth/rpc), which also include all standard [JSON-RPC API endpoints](https://ethereum.github.io/execution-apis/api-documentation/) of Ethereum. +::: + +## Lisk RPC + +Free, rate limited RPC endpoints for the Lisk networks. + +| | Lisk Sepolia Testnet | Lisk | +| :------ | :------ | :----------------------- | +|**HTTP RPC** | https://rpc.sepolia-api.lisk.com | https://rpc.api.lisk.com | +|**WS RPC** | `wss://ws.sepolia-api.lisk.com` | `wss://ws.api.lisk.com` | + + +## dRPC + +[dRPC](https://drpc.org/) is a decentralized Web3 infrastructure provider with a focus on resilience and latency. +dRPC offers access to a distributed network of public nodes for Lisk. +They provide a free tier that allows for an unlimited amount of requests over public nodes, or a paid tier that provides access to all providers, as well as other additional features. + +| | Lisk Sepolia Testnet | Lisk | +| :------ | :------ | :----------------------- | +|**HTTP RPC** | https://lisk-sepolia.drpc.org | https://lisk.drpc.org | +|**WS RPC** | `wss://lisk-sepolia.drpc.org` | `wss://lisk.drpc.org` | + +You can also check the available endpoints for Lisk directly under [https://drpc.org/public-endpoints/lisk](https://drpc.org/public-endpoints/lisk). + +dRPC also provides a [faucet for Lisk Sepolia](./faucets.md#drpc-faucet). + +:::note[How to create API keys for dRPC] +In order to use the provided endpoints, you need to [get the corresponding API keys](https://docs.drpc.org/gettingstarted/createaccount). +::: + +## Moralis + +[Moralis](https://developers.moralis.com/chains/lisk/) APIs elevate your dapps with unmatched speed, security, and scalability across EVM-compatible chains. + +Moralis enforces rate limits at the account level to ensure fair usage across all users. +Each account has a set number of allowed requests per minute, based on your plan. + +[Get Free Lisk RPC Nodes using Moralis](https://developers.moralis.com/chains/lisk/) + +The free plan for Moralis includes: + +- 40K Compute Units per day +- Access to RPC nodes +- Access to all Moralis APIs + +To use the Moralis RPC Nodes, follow these steps: + +1. **Create a Moralis account:** [Sign up](https://admin.moralis.com/) for free and access your RPC nodes. +2. **Set up your node:** Visit the [Setting Up RPC Nodes](https://docs.moralis.com/get-your-node-api-key) guide to create and configure your RPC node. +3. **Make your first RPC call:** Once you have your node set up, follow the [tutorial](https://docs.moralis.com/make-your-first-rpc-call) to make your first JSON-RPC call using ethers.js. + +## Tenderly + +[Tenderly](https://tenderly.co/) is a Web3 Development Platform which offers its tools and infrastructure across 79+ networks. Some networks, like Lisk, additionally have Node RPC support. + +- [Lisk Mainnet nodes by Tenderly](https://docs.tenderly.co/node/rpc-reference/lisk) +- [Lisk Sepolia Testnet nodes by Tenderly](https://docs.tenderly.co/node/rpc-reference/lisk-sepolia) + +Tenderly provides a [free trier](https://tenderly.co/pricing) to user their RPC nodes. \ No newline at end of file diff --git a/sidebars.js b/sidebars.js index 1fffc226b..51d89be05 100644 --- a/sidebars.js +++ b/sidebars.js @@ -135,7 +135,7 @@ const sidebars = { collapsible: true, collapsed: false, items: [ - 'lisk-tools/api-providers', + 'lisk-tools/node-providers', 'lisk-tools/faucets', { type: 'ref', id: 'docs-user/bridges' }, { type: 'ref', id: 'docs-user/wallets' }, From 8db9adb1c3218bade0633c31084d02b893be2676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mona=20B=C3=A4renf=C3=A4nger?= Date: Tue, 11 Feb 2025 14:12:41 +0100 Subject: [PATCH 6/7] Apply suggestions from code review Co-authored-by: Sameer --- docs/building-on-lisk/run-a-lisk-node.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/building-on-lisk/run-a-lisk-node.md b/docs/building-on-lisk/run-a-lisk-node.md index 02c29c05b..7d3b62234 100644 --- a/docs/building-on-lisk/run-a-lisk-node.md +++ b/docs/building-on-lisk/run-a-lisk-node.md @@ -56,7 +56,7 @@ We recommend you the following hardware configuration to run a Lisk L2 node: - adequate storage capacity to accommodate both the snapshot restoration process (if restoring from snapshot) and chain data, ensuring a minimum of (2 * current_chain_size) + snapshot_size + 20%_buffer - if running with Docker, please install Docker Engine version [27.0.1](https://docs.docker.com/engine/release-notes/27.0/) or higher -*Note: If utilizing Amazon Elastic Block Store (EBS), ensure timing buffered disk reads are fast enough in order to avoid latency issues alongside the rate of new blocks added to Base during the initial synchronization process; io2 block express is recommended.* +*Note: If utilizing Amazon Elastic Block Store (EBS), ensure timing buffered disk reads are fast enough in order to avoid latency issues alongside the rate of new blocks added to Base during the initial synchronization process; `io2 block express` is recommended.* ## Usage @@ -84,7 +84,7 @@ cd lisk-node By default, it is set to `.env.mainnet`. 3. We currently support running either the `op-geth` or the `op-reth` nodes alongside the `op-node`. By default, we run the `op-geth` node. If you would like to run the `op-reth` node instead, please set the `CLIENT` environment variable to `reth` before starting the node. :::note - The `op-reth` client can be built in either the `maxperf` (default) or `release` profile. To learn more about them, please check reth's documentation on Optimizations. Please set the `RETH_BUILD_PROFILE` environment variable accordingly. + The `op-reth` client can be built in either the `maxperf` (default) or `release` profile. To learn more about them, please check reth's documentation on [Optimizations](https://github.com/paradigmxyz/reth/blob/main/book/installation/source.md#optimizations). Please set the `RETH_BUILD_PROFILE` environment variable accordingly. Unless you are building the `op-reth` client in `release` profile, please ensure that you have a machine with 32 GB RAM. Additionally, if you have the Docker Desktop installed on your system, please make sure to set Memory limit to a minimum of 16 GB. It can be set under `Settings -> Resources -> Resource Allocation -> Memory limit`. @@ -104,7 +104,7 @@ cd lisk-node docker compose up --build --detach ``` - or, with op-reth execution client: + or, with `op-reth` execution client: ```sh CLIENT=reth RETH_BUILD_PROFILE=maxperf docker compose up --build --detach From ad8be866d0b72544651071bfd40b4eeeff41fea7 Mon Sep 17 00:00:00 2001 From: Tschakki Date: Tue, 11 Feb 2025 14:35:30 +0100 Subject: [PATCH 7/7] Add snapshot section --- docs/building-on-lisk/run-a-lisk-node.md | 39 +++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/docs/building-on-lisk/run-a-lisk-node.md b/docs/building-on-lisk/run-a-lisk-node.md index d5c1ac053..3c084237b 100644 --- a/docs/building-on-lisk/run-a-lisk-node.md +++ b/docs/building-on-lisk/run-a-lisk-node.md @@ -131,4 +131,41 @@ $( curl -s -d '{"id":0,"jsonrpc":"2.0","method":"optimism_syncStatus"}' -H "Cont [partners]: /lisk-tools/node-providers -[lisk node]: https://github.com/LiskHQ/lisk-node \ No newline at end of file +[lisk node]: https://github.com/LiskHQ/lisk-node + +### Snapshots + +:::note +- Snapshots are available for both `op-geth` and `op-reth` clients: + - `op-geth` supports both export and datadir snapshots + - `op-reth` only supports datadir snapshots +- All snapshots are from archival nodes +- Snapshot types: + - `export`: small download size, slow to restore from, data is verified during restore (`op-geth` only) + - `datadir`: large download size, fast to restore from, no data verification during restore +::: + +To enable auto-snapshot download and application, set the `APPLY_SNAPSHOT` environment variable to true when starting the node: + +```sh +APPLY_SNAPSHOT=true docker compose up --build --detach +``` +To specify the client and snapshot type, set both the `CLIENT` and `SNAPSHOT_TYPE` environment variables: + +```sh +# For op-geth with export snapshot (default) +APPLY_SNAPSHOT=true CLIENT=geth SNAPSHOT_TYPE=export docker compose up --build --detach + +# For op-geth with datadir snapshot +APPLY_SNAPSHOT=true CLIENT=geth SNAPSHOT_TYPE=datadir docker compose up --build --detach + +# For op-reth (only supports datadir) +APPLY_SNAPSHOT=true CLIENT=reth SNAPSHOT_TYPE=datadir docker compose up --build --detach +``` + +You can also download and apply a snapshot from a custom URL by setting the `SNAPSHOT_URL` environment variable. +Please make sure the snapshot file ends with `*.tar.gz`. + +```sh +APPLY_SNAPSHOT=true SNAPSHOT_URL= docker compose up --build --detach +```