diff --git a/docs/02-developers/04-quickstart/dynamic.md b/docs/02-developers/04-quickstart/dynamic.md index 1a520073..42fc2b46 100644 --- a/docs/02-developers/04-quickstart/dynamic.md +++ b/docs/02-developers/04-quickstart/dynamic.md @@ -126,47 +126,36 @@ Build a Next.js dApp on Rootstock with **Dynamic** embedded wallets and **Wagmi* - Next.js, Wagmi, and Viem (included in starter kit) - Rootstock Testnet configured (chain ID 31) -## **Getting Started** +## Getting Started -````mdx-code-block - - - Clone the repository to use the starter kit locally. +Clone the starter kit, install dependencies, add your Dynamic Environment ID, then run the Next.js app. + +### Clone the repository + +Clone the repository to use the starter kit locally. ```bash git clone https://github.com/rsksmart/rootstock-dynamic cd rootstock-dynamic ``` - - - Install the necessary dependencies with either Bun or Yarn. - - - ``` - bun install - ``` - - - ``` - yarn install - ``` - - +### Install dependencies + +Install the necessary dependencies with either Bun or Yarn (choose one). - - + bun install + # or + yarn install - :::note -Create a FREE account on Dynamic and login to your Dashboard. Then obtain your `ENVIRONMENT_ID` from the [Dynamic dashboard](https://app.dynamic.xyz/dashboard/overview). +### Get environment variables from Dynamic -::: +Create a free account on Dynamic and log in to your dashboard. Then obtain your `ENVIRONMENT_ID` from the [Dynamic dashboard](https://app.dynamic.xyz/dashboard/overview). Follow these steps to locate and copy your Environment ID: -Dynamic.xyz dashobard +Dynamic.xyz dashboard -An Environment ID is needed to configure and secure your application. Here’s how to get it: +An Environment ID is needed to configure and secure your application. * **Open the Developer Section**: * Look at the menu on the left side of the screen. Find and click **Developers** to expand the options. @@ -175,83 +164,67 @@ An Environment ID is needed to configure and secure your application. Here’s h * **Copy the Environment ID**: * Find the box labeled **Environment ID**. Click the copy icon next to the ID to copy it to your clipboard. - +### Set up environment variables - - Create a `.env.local` file in the project’s root directory to store environment variables. +Create a `.env.local` file in the project’s root directory to store environment variables. ```bash mv .env.local.example .env.local ``` -Setting up the `.env.local` file is critical for securely storing your environment ID. This ID is necessary for accessing Dynamic’s features and connecting to the Web3 backend. +Setting up the `.env.local` file stores your environment ID so the app can access Dynamic’s features and connect to the Web3 backend. Open the `.env.local` file and add your environment ID for Dynamic. ```bash NEXT_PUBLIC_DYNAMIC_ENVIRONMENT_ID=YOUR_ENVIRONMENT_ID ``` - - - Start the development server using Bun or Yarn. - - - ``` - bun dev - ``` - - - ``` - yarn dev - ``` - - - +### Run the development server + +Start the development server using Bun or Yarn. + +```bash +bun dev +``` + +```bash +yarn dev +``` Visit [http://localhost:3000](http://localhost:3000) in your browser to view your project. The homepage of the Rootstock Dynamic Starterkit - - -```` +## Interacting with the Frontend + +The starter kit includes React components for connecting a wallet, reading balances, sending tokens, and signing messages. + +### Connect wallet -## **Interacting with the Frontend** +Use the `DynamicWidget` component to connect a wallet through MetaMask or WalletConnect. You can also offer social login. -````mdx-code-block - - - * Use the `DynamicWidget` component for connecting to a wallet through options like MetaMask or WalletConnect. You can also offer social login options for enhanced accessibility. - * Once logged in, you will see a similar image like this +Once logged in, you will see a similar image like this: Connect wallet using DynamicWidget component - - +### Check token balances - The [`Balances`](https://github.com/rsksmart/rootstock-dynamic/blob/main/components/Balances.tsx) component fetches and displays the wallet's token balances, supporting multiple tokens like rBTC, tRIF, and DOC. - - - Through the [`Transfer`](https://github.com/rsksmart/rootstock-dynamic/blob/main/components/Transfer.tsx) component, users can transfer tokens directly within the dApp. It includes fields to specify the recipient address and token amount, along with secure hooks to initiate the transfer. +The [`Balances`](https://github.com/rsksmart/rootstock-dynamic/blob/main/components/Balances.tsx) component fetches and displays the wallet's token balances. It supports rBTC, tRIF, and DOC. - **Features:** +### Send tokens - * **Dropdown**: Select a token from available options (**rBTC, tRIF, and DOC**) - * **Input Fields**: +The [`Transfer`](https://github.com/rsksmart/rootstock-dynamic/blob/main/components/Transfer.tsx) component lets users transfer tokens in the dApp. It includes fields for the recipient address and token amount, plus hooks to initiate the transfer. - - **Amount:** Enter the amount to send. +Features: - - **Recipient Address:** Enter the address to send tokens to. - +* **Dropdown**: Select a token from available options (**rBTC, tRIF, and DOC**) +* **Amount**: Enter the amount to send. +* **Recipient Address**: Enter the address to send tokens to. - - The [`SignMessage`](https://github.com/rsksmart/rootstock-dynamic/blob/main/components/SignMessage.tsx) component enables the user to sign arbitrary messages using the connected wallet. This feature is useful for activities like authentication or data validation. +### Sign messages - - -
-```` +The [`SignMessage`](https://github.com/rsksmart/rootstock-dynamic/blob/main/components/SignMessage.tsx) component lets the user sign arbitrary messages with the connected wallet. Use this for authentication or data validation. By the end of this guide, we learned how to integrate Web3 features into a **Next.js** app using the **Dynamic Starter Kit for Rootstock**. With **wagmi hooks**, we can easily connect wallets, manage token balances, send tokens, and sign messages directly within your application. diff --git a/docs/02-developers/05-smart-contracts/06-rsk-cli/introduction.md b/docs/02-developers/05-smart-contracts/06-rsk-cli/introduction.md index 5828df86..a699cf87 100644 --- a/docs/02-developers/05-smart-contracts/06-rsk-cli/introduction.md +++ b/docs/02-developers/05-smart-contracts/06-rsk-cli/introduction.md @@ -6,71 +6,49 @@ description: "The Rootstock CLI tool enables users to manage wallets, check bala tags: [Rootstock CLI, developer tools, guides, rsk, rootstock, dApps, smart contracts, solidity, dev-environments] --- -The Rootstock CLI (rsk-cli) tool enables users to manage wallets, check balances, send transactions, verify smart contracts, and interact with smart contracts on the Rootstock blockchain—a Bitcoin sidechain designed for smart contracts. +The Rootstock CLI (rsk-cli) tool enables users to manage wallets, check balances, send transactions, verify smart contracts, and interact with smart contracts on Rootstock. Rootstock is a Bitcoin sidechain designed for smart contracts. -It supports both mainnet and testnet environments. Additionally, the tool provides bridge interaction features, allowing users to seamlessly transfer assets between Rootstock and Bitcoin (or other supported blockchains) via integrated bridge protocols. +It supports both mainnet and testnet environments. The tool also provides bridge interaction features so you can transfer assets between Rootstock and Bitcoin through integrated bridge protocols. -The CLI allows you to interact with your Rootstock wallet directly from the terminal, giving you control over creating, managing, and funding your wallet with rBTC (Smart Bitcoin). +The CLI lets you interact with your Rootstock wallet from the terminal. You can create, manage, and fund your wallet with rBTC. In this guide, we will explore how to use the Rootstock CLI to create a wallet, manage it securely, and add funds to it. ## Key Features -````mdx-code-block - - - 1. Wallet Management - - The wallet command lets you manage Ethereum-compatible wallets on Rootstock. You can: -
    -
  • Create, import, or use an existing wallet.
  • -
  • List saved wallets, switch wallets, update wallet names, and delete wallets.
  • -
  • Wallets are securely encrypted with AES-256-CBC, and private keys are stored in a JSON file.
  • -
-
-
- - 2. Checking Balance - - Use the balance command to view your wallet's current balance on the Rootstock blockchain. - This is supported on both mainnet and testnet. - - - - 3. Sending rBTC - - The transfer command enables sending rBTC to another address. - Transactions can be initiated on both mainnet and testnet. - - - - 4. View Transaction Status - - View the status of a transaction using the tx command by providing the transaction ID. - - - - 5. Deploying Smart Contracts - - The deploy command allows users to deploy smart contracts on the blockchain by providing the ABI [Application Binary Interface](/concepts/glossary/) and bytecode files. - This is supported on both mainnet and testnet. - - - - 6. Verifying Smart Contracts - - With the verify command, users can verify deployed smart contracts using Rootstock’s explorer API. - It supports both mainnet and testnet. - - - - 7. Interacting with Verified Contracts - - The contract command lets users interact with read-only functions of a verified smart contract, listing the available methods for interaction. - - -
-```` +rsk-cli groups wallet, transfer, and contract commands behind a single CLI. + +### Wallet Management + +The `wallet` command lets you manage Ethereum-compatible wallets on Rootstock. You can: + +- Create, import, or use an existing wallet. +- List saved wallets, switch wallets, update wallet names, and delete wallets. +- Wallets are encrypted with AES-256-CBC. Private keys are stored in a JSON file. + +### Checking Balance + +Use the `balance` command to view your wallet's current balance on the Rootstock blockchain. This is supported on both mainnet and testnet. + +### Sending rBTC + +The `transfer` command enables sending rBTC to another address. Transactions can be initiated on both mainnet and testnet. + +### View Transaction Status + +View the status of a transaction using the `tx` command by providing the transaction ID. + +### Deploying Smart Contracts + +The `deploy` command allows users to deploy smart contracts on the blockchain by providing the ABI ([Application Binary Interface](/concepts/glossary/)) and bytecode files. This is supported on both mainnet and testnet. + +### Verifying Smart Contracts + +With the `verify` command, users can verify deployed smart contracts using Rootstock’s explorer API. It supports both mainnet and testnet. + +### Interacting with Verified Contracts + +The `contract` command lets users interact with read-only functions of a verified smart contract, listing the available methods for interaction. ## Prerequisites diff --git a/docs/04-resources/06-guides/atlas/getting-started-atlas.md b/docs/04-resources/06-guides/atlas/getting-started-atlas.md index af988ae3..1a06d62b 100644 --- a/docs/04-resources/06-guides/atlas/getting-started-atlas.md +++ b/docs/04-resources/06-guides/atlas/getting-started-atlas.md @@ -76,52 +76,3 @@ First wait for the estimated confirmation window. Then: * 🟡 **Processing bridge transaction** * 🟢 **Completed successfully** * 🔴 **Action required / error** - - - - diff --git a/docs/04-resources/06-guides/powpeg-app/advanced-operations/supported-wallets.md b/docs/04-resources/06-guides/powpeg-app/advanced-operations/supported-wallets.md index 3b2383f5..b01117b4 100644 --- a/docs/04-resources/06-guides/powpeg-app/advanced-operations/supported-wallets.md +++ b/docs/04-resources/06-guides/powpeg-app/advanced-operations/supported-wallets.md @@ -6,13 +6,54 @@ description: "See wallets which supports the PowPeg App" tags: [powpeg app, peg-in, peg-out, bridge, rsk, rootstock] --- -Here is a list of supported wallets for the PowPeg App. -- Hardware wallets - - [Ledger](/resources/guides/powpeg-app/pegin/ledger/) - - [Trezor](/resources/guides/powpeg-app/pegin/trezor/) -- Software wallets - - [Leather](/resources/guides/powpeg-app/pegin/leather/) +The PowPeg App works with a small set of wallets that can sign Bitcoin peg-in and peg-out flows. Use a listed hardware or software wallet, then confirm it appears in the PowPeg UI before you send funds. + +Peg-in moves BTC on Bitcoin into rBTC on Rootstock. Peg-out moves rBTC back to BTC. The wallet you connect must be able to create a [supported Bitcoin address](/resources/guides/powpeg-app/advanced-operations/supported-addresses/) on the network you selected (mainnet or testnet). + +Complete [PowPeg prerequisites](/resources/guides/powpeg-app/prerequisites/) before you start. Use [PowPeg Testnet](https://powpeg.testnet.rootstock.io/) to practice. Use [PowPeg Mainnet](https://powpeg.rootstock.io/) only for real BTC. + +## Hardware wallets + +Hardware wallets keep keys on the device. You confirm each PowPeg transaction on the device screen. + +### Ledger + +Ledger is supported for peg-in. Set a PIN, install the Bitcoin app, and follow [Performing a peg-in using Ledger](/resources/guides/powpeg-app/pegin/ledger/). + +The minimum peg-in amount in that guide is **0.005 BTC**. Confirm the amount shown in the PowPeg App for your session. Match the Bitcoin address type to [Supported Addresses](/resources/guides/powpeg-app/advanced-operations/supported-addresses/). + +### Trezor + +Trezor is supported for peg-in. Unlock the device, open the Bitcoin account you will use, and follow [Performing a peg-in using Trezor](/resources/guides/powpeg-app/pegin/trezor/). + +Export an address the PowPeg App accepts. If the app rejects the address, check the network (mainnet vs testnet) and the address prefix. + +## Software wallets + +Software wallets run in the browser or as a desktop/mobile app. They do not replace a hardware device for high-value peg-outs, but they are the documented path for Leather. + +### Leather + +Leather is the documented software wallet for PowPeg peg-in. Follow [Performing a peg-in using Leather](/resources/guides/powpeg-app/pegin/leather/). + +Connect Leather, select the Bitcoin account, and confirm the destination Rootstock address in the PowPeg App before you broadcast. + +## Confirm a wallet in the PowPeg UI + +1. Open the PowPeg App for the network you intend to use. +2. Choose peg-in or peg-out. +3. Connect the wallet from the list the app shows. +4. Check that the Bitcoin address prefix matches [Supported Addresses](/resources/guides/powpeg-app/advanced-operations/supported-addresses/). +5. Check the destination Rootstock address for peg-in, or the Bitcoin destination for peg-out. + +If the wallet does not appear, try a [supported browser](/resources/guides/powpeg-app/advanced-operations/supported-browsers/). For other software wallets, see [Wallets](/dev-tools/wallets/). :::tip[Tip] See [alternative software wallets](/dev-tools/wallets/) supported by the PowPeg App. -::: \ No newline at end of file +::: + +## Related pages + +- [Supported addresses](/resources/guides/powpeg-app/advanced-operations/supported-addresses/) +- [Supported browsers](/resources/guides/powpeg-app/advanced-operations/supported-browsers/) +- [PowPeg App overview](/resources/guides/powpeg-app/overview/) diff --git a/docs/04-resources/07-hackathon/index.md b/docs/04-resources/07-hackathon/index.md index d95742f3..1212cc96 100644 --- a/docs/04-resources/07-hackathon/index.md +++ b/docs/04-resources/07-hackathon/index.md @@ -14,64 +14,39 @@ For IRL hackathons and events, use the [Developer Cheatsheet](/cheatsheet/) (net ## Prerequisites -This guide is designed to help both beginners and experienced developers get started with building on Rootstock. The content is organized to help you find what you need based on your skill level. - - - - -

If you're new to blockchain development, start here! We've outlined the essential skills and tools you'll need to begin your journey.

- -
    -
  1. - Basic Programming Knowledge
    - Familiarity with programming languages like JavaScript or Python will be helpful, even if you're new to blockchain development. -
  2. -
  3. - Understanding Blockchain Basics
    - Learn about blockchain technology, smart contracts, and dApps before diving in. We recommend starting with introductory resources on blockchain concepts. -
  4. -
  5. - Intro to Web3 Development Tools
    - While not strictly necessary to start, getting a basic understanding of tools like Remix IDE for smart contract development will make your journey smoother. We have beginner-friendly tutorials available here. -
  6. -
  7. - Version Control with Git (Optional)
    - Learning basic Git and GitHub skills can help you manage projects and collaborate with others. -
  8. -
-

Start building your first dApp using hardhat Quickstart Guide for Beginners.

-
- - - -

If you already have a background in blockchain or Web3 development, you can dive straight into more advanced topics and leverage the tools available on Rootstock.

- -
    -
  1. - Knowledge of Blockchain and Smart Contracts
    - You should be comfortable with [blockchain principles](https://rootstock.thinkific.com/courses/blockchain-dev-course/) and decentralized networks. -
  2. -
  3. - Experience with Web3 Development Tools
    - Tools like Hardhat, Web3.js, and Remix IDE should be part of your existing toolkit. -
  4. -
  5. - Basic Programming Skills
    - Proficiency in Solidity and other Web3-related programming languages (like JavaScript/React or Python/Web3.py) will be beneficial. -
  6. -
  7. - Familiarity with ERC Standards
    - Understanding ERC20, ERC721, and ERC1155 standards for token contracts will be valuable. -
  8. -
  9. - Advanced Topics (Optional)
    - Knowledge of account abstraction, automation frameworks like Cucumber, and other advanced Web3 concepts can help you explore more sophisticated solutions. -
  10. -
- -

Access our [Guide for Experienced Developers](/developers/quickstart/) to get started.

-
-
+This guide is designed to help both beginners and experienced developers get started with building on Rootstock. Pick the section that matches your skill level. + +### Beginners + +If you are new to blockchain development, start here. These are the skills and tools you need to begin. + +1. **Basic Programming Knowledge** + Familiarity with programming languages like **JavaScript** or **Python** will be helpful, even if you are new to blockchain development. +2. **Understanding Blockchain Basics** + Learn about **blockchain technology**, **smart contracts**, and **dApps** before diving in. Start with [blockchain essentials](/developers/blockchain-essentials/overview/). +3. **Intro to Web3 Development Tools** + A basic understanding of tools like **Remix IDE** for smart contract development will make the rest of this path easier. See the [Remix quickstart](/developers/quickstart/remix/). +4. **Version Control with Git** *(Optional)* + Basic **Git** and **GitHub** skills help you manage projects and collaborate. + +Start building your first dApp with the [Hardhat Quickstart](/developers/quickstart/hardhat/). + +### Experienced Developers + +If you already have a background in blockchain or Web3 development, skip ahead to advanced topics and the tools available on Rootstock. + +1. **Knowledge of Blockchain and Smart Contracts** + You should be comfortable with [blockchain principles](https://rootstock.thinkific.com/courses/blockchain-dev-course/) and **decentralized networks**. +2. **Experience with Web3 Development Tools** + Tools like **Hardhat**, **Web3.js**, and **Remix IDE** should be part of your existing toolkit. +3. **Basic Programming Skills** + Proficiency in **Solidity** and other Web3-related languages (like **JavaScript/React** or **Python/Web3.py**) will be beneficial. +4. **Familiarity with ERC Standards** + Understanding **ERC20**, **ERC721**, and **ERC1155** standards for token contracts will be valuable. +5. **Advanced Topics** *(Optional)* + Knowledge of **account abstraction**, automation frameworks like **Cucumber**, and other advanced Web3 concepts can help you explore more sophisticated solutions. + +Access the [Guide for Experienced Developers](/developers/quickstart/) to get started. ## Tools to Speed Up Your Development diff --git a/docs/05-dev-tools/dev-environments/index.md b/docs/05-dev-tools/dev-environments/index.md index 37af4687..8c618606 100644 --- a/docs/05-dev-tools/dev-environments/index.md +++ b/docs/05-dev-tools/dev-environments/index.md @@ -18,6 +18,10 @@ Some benefits of using a dev environment: Here are supported dev environments for building and deploying smart contracts on Rootstock. +- **[Hardhat](/dev-tools/dev-environments/hardhat/)**: Hardhat is an Ethereum development environment. Use it to write, test, and deploy smart contracts on Rootstock and other EVM-compatible chains. +- **[Foundry](/dev-tools/dev-environments/foundry/)**: Foundry is a smart contract toolchain for Solidity. It manages dependencies, compiles, runs tests, deploys contracts, and talks to EVM-compatible chains through Forge. +- **[Remix](/dev-tools/dev-environments/remix/)**: Remix is a browser IDE used to write, compile, deploy, and debug Solidity. Connect it to MetaMask to deploy to Rootstock Testnet and Mainnet. + \ No newline at end of file +- **[Build Omnichain Fungible Token (OFTs) on Rootstock with LayerZero](/use-cases/interoperability/rootstock-layerzero/)**: Cross-chain token transfers using OFT between Rootstock and other supported chains. +- **[Omnichain Liquidity Routing on Rootstock with LI.FI](/use-cases/interoperability/integrate-lifi/)**: Route swaps and bridges from Ethereum, Arbitrum, Base, and more into Rootstock. +- **[Cross-Chain Messaging with Wormhole](/use-cases/interoperability/rootstock-wormhole-messaging/)**: Send arbitrary cross-chain messages to Rootstock using Verified Action Approvals (VAAs). +- **[Build a Constant-Product AMM on Rootstock (Testnet)](/use-cases/interoperability/amm-constant-product/)**: Build, test, and deploy a minimal constant-product AMM on Rootstock testnet. +- **[Integrate a Chainlink-Style Price Feed (Mock) on Rootstock (Testnet)](/use-cases/interoperability/oracle-chainlink-mock/)**: Build and test a mock Chainlink-style price feed consumer on Rootstock testnet.