From 3ecca9b5bc9d0d0fb931b2b51845b24b31d885df Mon Sep 17 00:00:00 2001 From: Tschakki Date: Fri, 10 Jan 2025 18:09:42 +0100 Subject: [PATCH 1/7] Fix broken anchor --- .../building-on-lisk/web3-app-development.mdx | 2 +- .../building-on-lisk/web3-app-development.mdx | 184 ++++++++++++++++++ 2 files changed, 185 insertions(+), 1 deletion(-) create mode 100644 i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/web3-app-development.mdx diff --git a/docs/building-on-lisk/web3-app-development.mdx b/docs/building-on-lisk/web3-app-development.mdx index c83ecdc4b..c1109ee0f 100644 --- a/docs/building-on-lisk/web3-app-development.mdx +++ b/docs/building-on-lisk/web3-app-development.mdx @@ -55,7 +55,7 @@ To describe important steps in this innovation, websites, and apps are generally 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
+ ##### 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: 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..594e231d7 --- /dev/null +++ b/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/web3-app-development.mdx @@ -0,0 +1,184 @@ +--- +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', + ] +--- +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. + + + +### 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). + +### Further regarding +- [Introduction to Web3](https://ethereum.org/en/web3/) *by Ethereum* + +## Getting started with Web3 app development + +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. + +### Web3 Mobile Apps +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. + +#### Development resources +- [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) +- [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* + +### Web3 Web Apps +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. + +#### Development resources +- [How to Build an NFT Minting dApp](https://blog.thirdweb.com/guides/build-nft-minting-dapp-with-thirdweb-guide/) *by thirdweb* + +### Web3 PWAs +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). + +#### Development resources +- [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. + */} \ No newline at end of file From be5b16b9fcb2df90d6d45cbbe636d862fb2aa6f0 Mon Sep 17 00:00:00 2001 From: Tschakki Date: Tue, 14 Jan 2025 14:56:42 +0100 Subject: [PATCH 2/7] Add new sections --- .../building-on-lisk/web3-app-development.mdx | 48 ++++++++++++++++++- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/docs/building-on-lisk/web3-app-development.mdx b/docs/building-on-lisk/web3-app-development.mdx index c1109ee0f..46adf6411 100644 --- a/docs/building-on-lisk/web3-app-development.mdx +++ b/docs/building-on-lisk/web3-app-development.mdx @@ -132,11 +132,20 @@ 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). +### Testing and Deployment + +- local development env +- testnets +- continuous integration +- monitoring + ### 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. @@ -150,7 +159,6 @@ Last but not least, mobile apps allow users to access your app on the go, which - [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) -- [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* ### Web3 Web Apps The main advantage of web applications is that they are platform-independent and can be accessed from any device with a web browser. @@ -181,4 +189,40 @@ 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. - */} \ No newline at end of file + */} + +### Security considerations + +- smart contract audits +- secure key management +- handling user data +- bug bounties + +### 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, there are several strategies and design patterns that can be utilized: + +#### Account abstraction and smart accounts +Account abstraction introduces an additional layer over the blockchain, which delegates most of the complexity of interacting with the blockchain to 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. +- **Fee Abstraction**: Transaction fees can be dynamically managed through smart contracts, enabling features like fee delegation and gasless transactions for specific use cases. +- **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, tailoring the user experience to specific needs. + +##### 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* + +#### Gasless transactions and fee management + +##### Further reading +- [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* + +#### Support and community + From 58b0cc01c8d87743a34c6e2261c34030306d1b85 Mon Sep 17 00:00:00 2001 From: Tschakki Date: Wed, 15 Jan 2025 12:30:04 +0100 Subject: [PATCH 3/7] Summarize account abstraction --- .../building-on-lisk/web3-app-development.mdx | 36 ++++++++++++++----- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/docs/building-on-lisk/web3-app-development.mdx b/docs/building-on-lisk/web3-app-development.mdx index 46adf6411..d90468f8f 100644 --- a/docs/building-on-lisk/web3-app-development.mdx +++ b/docs/building-on-lisk/web3-app-development.mdx @@ -206,23 +206,43 @@ To onboard Web2 users to Web3, apps need to simplify the way how users interact To aim for a smooth user experience, there are several strategies and design patterns that can be utilized: #### Account abstraction and smart accounts -Account abstraction introduces an additional layer over the blockchain, which delegates most of the complexity of interacting with the blockchain to smart contracts. + +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. -- **Fee Abstraction**: Transaction fees can be dynamically managed through smart contracts, enabling features like fee delegation and gasless transactions for specific use cases. +- **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, tailoring the user experience to specific needs. +- **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, see [Gasless transactions and fee management](#gasless-transactions-and-fee-management). + +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* - -#### Gasless transactions and fee management - -##### Further reading - [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* #### Support and community From c36c5f20203418008650db49163ef64e5980bc2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mona=20B=C3=A4renf=C3=A4nger?= Date: Thu, 16 Jan 2025 16:29:13 +0100 Subject: [PATCH 4/7] [LISKDOCS-44] Update fee params (#273) * Update fee params * Update translations * Fix image paths * Update links --- docs/about-lisk/fees.md | 4 +-- .../add-token-to-lisk/index.md | 2 +- .../deploying-smart-contract/with-Hardhat.md | 2 +- .../current/about-lisk/fees.md | 10 +++--- .../add-token-to-lisk/index.md | 9 +++++ .../interacting-with-the-blockchain/viem.mdx | 2 +- .../using-oracle-data/redstone-push.md | 30 ++++++++--------- .../current/docs-user/exchanges.md | 33 ++++++++----------- .../current/intro.mdx | 14 ++++---- .../current/lisk-tools/api-providers.md | 26 ++++++++++++++- .../current/lisk-tools/faucets.md | 11 ++++++- .../current/lisk-tools/oracles.md | 26 ++++++++++++++- 12 files changed, 114 insertions(+), 55 deletions(-) diff --git a/docs/about-lisk/fees.md b/docs/about-lisk/fees.md index 42ba7823c..13ab87195 100644 --- a/docs/about-lisk/fees.md +++ b/docs/about-lisk/fees.md @@ -127,8 +127,8 @@ The [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559) parameters used by the L | Parameter | Lisk Mainnet value | Ethereum value (for reference) | | ------------------------------------- | ---------------: | -----------------------------: | -| Block gas limit | 30,000,000 gas | 30,000,000 gas | -| Block gas target | 1,500,000 gas | 15,000,000 gas | +| Block gas limit | 60,000,000 gas | 30,000,000 gas | +| Block gas target | 3,000,000 gas | 15,000,000 gas | | EIP-1559 elasticity multiplier | 20 | 2 | | EIP-1559 denominator | 1,000 | 8 | | Maximum base fee increase (per block) | 1.9% | 12.5% | 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 7216a502b..8757561d6 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](https://docs.lisk.com/contracts#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](../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/deploying-smart-contract/with-Hardhat.md b/docs/building-on-lisk/deploying-smart-contract/with-Hardhat.md index 45f556283..4d37c0149 100644 --- a/docs/building-on-lisk/deploying-smart-contract/with-Hardhat.md +++ b/docs/building-on-lisk/deploying-smart-contract/with-Hardhat.md @@ -116,7 +116,7 @@ Substitute `` with the private key for your wallet. `WALLET_KEY` is the private key of the wallet to use when deploying a contract. Follow the instructions of your wallet on how to get your private key. -E.g. for **MetaMask**, please follow [these instructions](https://support.metamask.io/hc/en-us/articles/360015289632-How-to-export-an-account-s-private-key). +E.g. for **MetaMask**, please follow [these instructions](https://support.metamask.io/configure/accounts/how-to-export-an-accounts-private-key/). **It is critical that you do NOT commit this to a public repo** ::: diff --git a/i18n/ind/docusaurus-plugin-content-docs/current/about-lisk/fees.md b/i18n/ind/docusaurus-plugin-content-docs/current/about-lisk/fees.md index eacd04cfe..13ab87195 100644 --- a/i18n/ind/docusaurus-plugin-content-docs/current/about-lisk/fees.md +++ b/i18n/ind/docusaurus-plugin-content-docs/current/about-lisk/fees.md @@ -46,7 +46,7 @@ transaction_fee = l2_execution_fee + l1_data_fee :::note Lisk's fee calculation is based on the fee system of OP Mainnet, using the latest **Fjord** upgrade. -Check the [Fees page](https://docs.optimism.io/stack/transactions/fees#fjord) in the Optmism documentation, to learn more about how the fee system works in detail. +Check the [Fees page](https://docs.optimism.io/stack/transactions/fees#fjord) in the Optimism documentation, to learn more about how the fee system works in detail. ::: ### L2 Execution Fee @@ -108,8 +108,8 @@ weighted_gas_price = 16*base_fee_scalar*base_fee + blob_base_fee_scalar*blob_bas The current values for the scalars are: - - `base_fee_scalar` = 0.020698 - - `blob_base_fee_scalar` = 1.364961 + - `base_fee_scalar` = 0.024740 + - `blob_base_fee_scalar` = 0.801328 They can be adjusted depending on network conditions, to mitigate spikes in the transaction fees. @@ -127,8 +127,8 @@ The [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559) parameters used by the L | Parameter | Lisk Mainnet value | Ethereum value (for reference) | | ------------------------------------- | ---------------: | -----------------------------: | -| Block gas limit | 30,000,000 gas | 30,000,000 gas | -| Block gas target | 1,500,000 gas | 15,000,000 gas | +| Block gas limit | 60,000,000 gas | 30,000,000 gas | +| Block gas target | 3,000,000 gas | 15,000,000 gas | | EIP-1559 elasticity multiplier | 20 | 2 | | EIP-1559 denominator | 1,000 | 8 | | Maximum base fee increase (per block) | 1.9% | 12.5% | 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 2b0a9a0fb..7216a502b 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 @@ -18,6 +18,7 @@ keywords: # Bridging an L1 token to Lisk This page is intended for token issuers who already have an ERC-20 contract deployed on Ethereum and would like to submit their token for bridging between Ethereum and Lisk. Lisk uses the Superchain Token List as a reference for tokens that have been deployed on Lisk. +In case you want to create a new token on Lisk, please refer to the page [Token development](../token-development/overview.md). ## Superchain Token List The [Superchain Token List](https://github.com/ethereum-optimism/ethereum-optimism.github.io) exists to help users discover the correct bridged token addresses for any given native token. @@ -83,6 +84,7 @@ For step-by-step instructions on how to deploy ERC-20 tokens on Lisk, check the ### Step 2: Submit details of your token Follow the instructions in the [GitHub repository](https://github.com/ethereum-optimism/ethereum-optimism.github.io) and submit a PR containing the required details for your token. +Especially, follow the Lisk-specific instructions detailed in the section [Specifying chains](https://github.com/ethereum-optimism/ethereum-optimism.github.io?tab=readme-ov-file#specifying-chains). **Important:** You must specify in your token's `data.json` file a section for `lisk-sepolia` and/or `lisk`. @@ -92,3 +94,10 @@ For example, [this PR](https://github.com/ethereum-optimism/ethereum-optimism.gi ### Step 3: Await final approval Reviews are regularly conducted by the Lisk team and you should receive a reply within 24-72 hours (depending on if the PR is opened on a weekday, weekend or holiday). + +## Step 4 : Add token to Gelato Bridge +To add your token to the [Gelato Bridge](https://bridge.lisk.com/), reach out to the Lisk team on [Lisk Discord](https://lisk.chat) with the details of the token: + +- Go to the `#lisk-dev` channel. +- Tag a moderator, ask them to add your token to the Gelato Bridge, and share the link to your PR from [step 2: token details](#step-2-submit-details-of-your-token). +- The Lisk team will then coordinate with Gelato to get the token added to the Gelato Bridge. \ No newline at end of file diff --git a/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/interacting-with-the-blockchain/viem.mdx b/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/interacting-with-the-blockchain/viem.mdx index 145b7ce6c..6a4268460 100644 --- a/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/interacting-with-the-blockchain/viem.mdx +++ b/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/interacting-with-the-blockchain/viem.mdx @@ -1,6 +1,6 @@ --- title: ...with viem -slug: /building-on-lisk/interacting-with-blockchain/viem +slug: /building-on-lisk/interacting-with-the-blockchain/viem description: Documentation for using Viem, a TypeScript interface for EVM-compatible blockchains. This page covers installation, setup, and various functionalities such as reading and writing blockchain data and interacting with smart contracts on Lisk. keywords: [ diff --git a/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/using-oracle-data/redstone-push.md b/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/using-oracle-data/redstone-push.md index e269c8c54..c81374335 100644 --- a/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/using-oracle-data/redstone-push.md +++ b/i18n/ind/docusaurus-plugin-content-docs/current/building-on-lisk/using-oracle-data/redstone-push.md @@ -31,7 +31,7 @@ RedStone data feeds are compatible with Chainlink's [AggregatorV3Interface](http - **Aggregator contract**: An aggregator is a contract that receives periodic data updates from the oracle network. Aggregators store aggregated data onchain so that consumers can retrieve it and act upon it within the same transaction. -These contracts are already deployed on the Lisk network and can be directly used by Consumers. +These contracts have already been deployed on the Lisk network and can be directly used by consumers. - **Consumer**: A consumer is an onchain or offchain application that uses Data Feeds. Consumer contracts use the `AggregatorV3Interface` to call functions on the proxy contract[^1] of the Aggregator to retrieve oracle data. @@ -52,7 +52,7 @@ The following Aggregators are available on Lisk Mainnet for RedStone Push: - [WBTC/USD L2PriceFeedWithoutRounds](https://blockscout.lisk.com/address/0x13da43eA89fB692bdB6666F053FeE70aC61A53cd) - address: `0x13da43eA89fB692bdB6666F053FeE70aC61A53cd` -In this guide, we will develop a Consumer contract that will request the latest spot prices from the ETH, LSK and USDT data feeds. +In this guide, we will develop a Consumer contract that requests the latest spot prices from the ETH, LSK, and USDT data feeds. :::note RedStone Push is only fully available on Lisk Mainnet, so please make sure to deploy your Consumer contract on Lisk Mainnet as well. @@ -62,14 +62,14 @@ In case you wish to deploy on Lisk Sepolia Testnet, check the [Tellor](./tellor. ## Import -To use the RedStone data inside your contract, import the [AggregatorV3Interface](https://docs.chain.link/data-feeds/using-data-feeds#solidity) from Chainlink like shown in the example contract below. +To use the RedStone data inside your contract, import the [AggregatorV3Interface](https://docs.chain.link/data-feeds/using-data-feeds#solidity) from Chainlink, as shown in the example contract below. -For every data feed you like to store, create a new constant with type `AggregatorV3Interface`. +Create a new constant with the type `AggregatorV3Interface` for every data feed you want to store. -In the constructor, set the above defined constants to point to the respective data feeds: -Use the `AggregatorV3Interface()` function and pass the address of the respective data feed contract as parameter. +In the constructor, set the above-defined constants to point to the respective data feeds. +Use the `AggregatorV3Interface()` function and pass the address of the respective data feed contract as a parameter. -```solidity +```solidity title="Importing the AggregatorV3Interface" // SPDX-License-Identifier: MIT pragma solidity ^0.8.28; @@ -116,7 +116,7 @@ To read the data of the price feeds, we define the following functions in the co - `getRedStoneLSKDataFeedLatestAnswer()` - `getRedStoneUSDTDataFeedLatestAnswer()` -Inside of the functions, call the [latestRoundData](https://docs.chain.link/data-feeds/api-reference#latestrounddata) on the respective data feeds to receive the latest spot prices for the respective token. +Inside the functions, call the [latestRoundData](https://docs.chain.link/data-feeds/api-reference#latestrounddata) on the respective data feeds to receive the latest spot prices for the respective token. The `latestRoundData()` function returns the following values: @@ -132,17 +132,15 @@ In this example, we will only use `answer` and `updatedAt`. The `updatedAt` value should be used to make sure that the `answer` is recent enough for your application to use it. You can compare `updatedAt` to the latest block time (`uint256 currentTime = block.timestamp;`) to ensure you are only using the latest oracle data in your application. -```solidity +:::caution +This is an example contract that uses un-audited code. +Do not use this code in production. +::: + +```solidity title="Reading data feeds" // SPDX-License-Identifier: MIT pragma solidity ^0.8.28; -/** - * THIS IS AN EXAMPLE CONTRACT THAT USES HARDCODED - * VALUES FOR CLARITY. - * THIS IS AN EXAMPLE CONTRACT THAT USES UN-AUDITED CODE. - * DO NOT USE THIS CODE IN PRODUCTION. - */ - import {AggregatorV3Interface} from "@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol"; contract RedStoneDataConsumer { diff --git a/i18n/ind/docusaurus-plugin-content-docs/current/docs-user/exchanges.md b/i18n/ind/docusaurus-plugin-content-docs/current/docs-user/exchanges.md index b35a514db..f2c3ee58b 100644 --- a/i18n/ind/docusaurus-plugin-content-docs/current/docs-user/exchanges.md +++ b/i18n/ind/docusaurus-plugin-content-docs/current/docs-user/exchanges.md @@ -33,9 +33,10 @@ Lisk (LSK) is available for trading on various