-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
541 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
sidebar_position: 3 | ||
sidebar_label: Account Abstraction | ||
title: Account Abstraction | ||
description: "How to get started with writing, deploying and testing smart contracts on Rootstock using Hardhat." | ||
tags: [hardhat, quick start, developer tools, rsk, rootstock, ethereum, dApps, smart contracts] | ||
--- | ||
|
||
|
||
Account abstraction enables the creation of new types of accounts called “contract-type accounts” or simply “accounts”. These accounts can hold both code and ether, and they can execute transactions and smart contract functions. This means that contracts can directly control and manipulate funds, eliminating the need for a separate EOA to initiate transactions. | ||
|
||
Simply put; | ||
Regular accounts hold your crypto and need your private key for transactions. Account abstraction lets you create smarter accounts like mini-apps that hold your crypto and can send transactions without needing your key every time. | ||
|
||
## Benefits | ||
|
||
Account abstraction brings several benefits to the Rootstock ecosystem: | ||
|
||
- Enhanced efficiency: By allowing contracts to directly control funds, account abstraction reduces the number of transactions and storage operations required. This leads to improved efficiency and reduces gas costs. | ||
- Improved privacy: Account abstraction enables the creation of more sophisticated smart contracts that can handle transactions privately within the contract itself. It eliminates the need for external transactions, enhancing privacy for users. | ||
- Flexible fee payment models: With account abstraction, contracts can pay transaction fees on behalf of users. This allows for more flexible fee payment models, such as subscriptions or microtransactions, where users don’t need to have ether to execute transactions. | ||
- Customized transaction semantics: Account abstraction opens up possibilities for customizing transaction semantics. Contracts can define their own rules and conditions for executing transactions, enabling more complex and dynamic interactions. | ||
|
||
## Account Abstraction Solutions on Rootstock | ||
|
||
## Etherspot | ||
|
||
Etherspot is a top-notch Account Abstraction infrastructure designed to help developers create an unparalleled user experience for their blockchain protocols on Ethereum and EVM-compatible chains. Get started with [Account Abstraction on Rootstock using Etherspot Prime SDK](https://etherspot.fyi/prime-sdk/intro). | ||
|
||
Currently available on: | ||
|
||
<Tabs> | ||
<TabItem value="mainnet" label="Mainnet" default> | ||
YES | ||
</TabItem> | ||
<TabItem value="testnet" label="Testnet"> | ||
NO | ||
</TabItem> | ||
</Tabs> | ||
|
||
## Gelato | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
sidebar_position: 12 | ||
sidebar_label: General Tools | ||
title: General Tools | ||
description: "How to get started with writing, deploying and testing smart contracts on Rootstock using Hardhat." | ||
tags: [hardhat, quick start, developer tools, rsk, rootstock, ethereum, dApps, smart contracts] | ||
--- | ||
|
||
## Faucets | ||
|
||
* [Rootstock Faucet](https://faucet.rootstock.io/) | ||
|
||
* [RIF Testnet Faucet](https://faucet.rifos.org/) | ||
|
||
## Gas | ||
|
||
* [Rootstock Gas Station](https://rskgasstation.info/?AspxAutoDetectCookieSupport=1) | ||
|
||
## Exchanges | ||
|
||
You can get RBTC via exchanges and bridges. See the [RBTC](https://rootstock.io/rbtc/) section to get started. To get RIF, see the [RIF Token](https://rif.technology/rif-token/) section. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
sidebar_position: 9 | ||
sidebar_label: Code Quality | ||
title: Code Quality | ||
description: "How to get started with writing, deploying and testing smart contracts on Rootstock using Hardhat." | ||
tags: [hardhat, quick start, developer tools, rsk, rootstock, ethereum, dApps, smart contracts] | ||
--- | ||
|
||
Here you can find tools to test and verify your smart contracts. | ||
|
||
## Sourcify | ||
|
||
Sourcify enables transparent and human-readable smart contract interactions through automated Solidity contract verification, contract metadata, and NatSpec comments. | ||
|
||
## Slither | ||
|
||
The Slither framework provides automated vulnerability and optimization detection, as well as assistive codebase summaries to further developer comprehension. | ||
|
||
## Cucumber | ||
|
||
Cucumber's user-friendly behavior-driven development, Playwright's precise browser automation, and the tailored dApp testing capabilities of Synpress. With Cucumber's Gherkin syntax, teams collaboratively define DApp behaviors. Playwright, customized for Chrome, adds finesse to browser automation. Synpress, in its Playwright version, effortlessly integrates with MetaMask (more software wallets to come) for thorough dApp testing. Get started using the [dApp automation with Cucumber and Playwright](/resources/tutorials/dapp-automation-cucumber) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
sidebar_position: 5 | ||
sidebar_label: Cross Chain Bridges | ||
title: Cross Chain Bridges | ||
description: "How to get started with writing, deploying and testing smart contracts on Rootstock using Hardhat." | ||
tags: [hardhat, quick start, developer tools, rsk, rootstock, ethereum, dApps, smart contracts] | ||
--- | ||
|
||
## Router Protocol | ||
|
||
Router Protocol is a layer-1 blockchain enabling chain abstraction. | ||
|
||
## Chainport | ||
|
||
Chainport is a cross-chain bridge integrated with Rootstock. | ||
|
||
## Wormhole | ||
|
||
Wormhole provides access to all the information you need to develop secure multichain applications powered by Wormhole on Rootstock. | ||
|
||
## Tokenbridge | ||
|
||
Safely move your ERC20 tokens between Rootstock and Ethereum with the Tokenbridge dApp. This user-friendly interface lets you interact with the Token Bridge contracts directly. It is available on [Mainnet](https://dapp.tokenbridge.rootstock.io/) or [Testnet](https://dapp.testnet.bridges.rootstock.io/). | ||
|
||
## PowPeg App | ||
|
||
The [PowPeg App](https://powpeg.rootstock.io/) converts BTC to RBTC and vice versa. It is secured by the [PowPeg protocol](/concepts/powpeg/), which is a unique protocol that secures the locked bitcoins with the same Bitcoin hashrate that establishes consensus. | ||
|
||
It is a web application that fosters the interaction between the bitcoin blockchain and the Rootstock network for easier exchange of BTC and RBTC. It also provides a way to visualize the status of transactions, communicate with a user wallet (both hardware wallets and software wallets), while also providing the highest possible level of security for transactions. | ||
|
||
Get started with the [PowPeg App](/resources/guides/powpeg-app/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,194 @@ | ||
--- | ||
sidebar_label: Envio | ||
sidebar_position: 2 | ||
title: Get Started with Envio | ||
description: "Easily query on-chain data through a decentralized network of indexers" | ||
tags: [Envio, indexers, data, subgraphs, dApps, smart contracts, developers, developer tools, get-started, how-to] | ||
--- | ||
|
||
[Envio](https://envio.dev/) is a feature-rich indexing solution that provides developers with a seamless and efficient way to index and aggregate real-time or historical blockchain data for Rootstock, and **other EVM chains**. The indexed data is easily accessible through custom [GraphQL](https://graphql.org/) queries, giving developers the flexibility and power to retrieve specific information. See [Getting started with Envio](/dev-tools/data/envio/) | ||
|
||
Developers can choose whether they want to start from a template (e.g. Blank, ERC-20, etc.), or use the Contract Import feature: | ||
|
||
## Prerequisites | ||
|
||
The following are the prerequisite packages required for Envio: | ||
|
||
* [Node.js](http://node.js) (use[ v18](https://nodejs.org/download/release/v18.18.0/) or newer) | ||
* [pnpm](https://pnpm.io/installation) (use v8 or newer) | ||
* [Docker Desktop](https://www.docker.com/products/docker-desktop/) | ||
|
||
Docker is required specifically for running the Envio indexer locally. | ||
|
||
|
||
## Installation | ||
|
||
You can install Envio by running the command below: | ||
|
||
|
||
```bash | ||
npm i -g envio | ||
``` | ||
|
||
Command to see available CLI commands for Envio. | ||
|
||
```bash | ||
envio --help | ||
``` | ||
|
||
The following files are required from the user to run the Envio indexer: | ||
|
||
* Configuration (defaults to config.yaml) | ||
* GraphQL Schema (defaults to schema.graphql) | ||
* Event Handlers (defaults to src/EventHandlers.* depending on the language chosen) | ||
|
||
These files are auto-generated according to the template and language chosen by running the envio init command. | ||
|
||
|
||
## Contract Import Tutorial | ||
|
||
This walkthrough explains how to initialise an indexer using single or multiple contracts that are already deployed on a blockchain. This process allows a user to quickly and easily start up a basic indexer and a queryable GraphQL API for their blockchain application within a few minutes. | ||
|
||
|
||
### Initialize your indexer | ||
|
||
cd into the folder of your choice and run | ||
|
||
|
||
```bash | ||
envio init | ||
``` | ||
|
||
|
||
Name your indexer: | ||
|
||
```bash | ||
? Name your indexer: | ||
``` | ||
|
||
Choose the directory where you would like to set up your project (default is the current directory) | ||
|
||
```text | ||
? Set the directory: (.) . | ||
``` | ||
|
||
|
||
Select Contract Import as the initialization option. | ||
|
||
|
||
```text | ||
? Choose an initialization option | ||
Template | ||
> ContractImport | ||
[↑↓ to move, enter to select, type to filter] | ||
``` | ||
|
||
|
||
|
||
```text | ||
? Would you like to import from a block explorer or a local abi? | ||
Block Explorer | ||
> Local ABI | ||
[↑↓ to move, enter to select, type to filter] | ||
``` | ||
|
||
|
||
The Block Explorer option only requires users to input the contract address and chain. This is the quickest setup if the contract is verified and deployed on one of the supported chains, as it will retrieve all needed contract information from a block explorer. | ||
|
||
> _**📣Please note**: The Block Explorer option currently only supports networks with Etherscan. You can use the Local ABI option if the network doesn't have Etherscan._ | ||
Choosing Local ABI option will allow you to point to a JSON file containing the smart contract ABI. The Contract Import process will then populate the required files from the ABI. | ||
|
||
**Specify the directory of the JSON file containing ABI** | ||
|
||
|
||
```text | ||
? What is the path to your json abi file? | ||
``` | ||
|
||
|
||
**Choose which events to include in the config.yaml file** | ||
|
||
|
||
```text | ||
? Which events would you like to index? | ||
> [x] ClaimRewards(address indexed from, address indexed reward, uint256 amount) | ||
[x] Deposit(address indexed from, uint256 indexed tokenId, uint256 amount) | ||
[x] NotifyReward(address indexed from, address indexed reward, uint256 indexed epoch, uint256 amount) | ||
[x] Withdraw(address indexed from, uint256 indexed tokenId, uint256 amount) | ||
[↑↓ to move, space to select one, → to all, ← to none, type to filter] | ||
``` | ||
|
||
|
||
**Specify which chain the contract is deployed on** | ||
|
||
|
||
```text | ||
? Choose network: | ||
<Enter Network Id> | ||
ethereum-mainnet | ||
goerli | ||
optimism | ||
base | ||
bsc | ||
> rootstock | ||
v polygon | ||
[↑↓ to move, enter to select, type to filter] | ||
``` | ||
|
||
|
||
**Enter the name of the contract** | ||
|
||
|
||
```text | ||
? What is the name of this contract? | ||
``` | ||
|
||
|
||
**Enter the address of the contract** | ||
|
||
|
||
```text | ||
? What is the address of the contract? | ||
[Use the proxy address if your abi is a proxy implementation] | ||
``` | ||
|
||
|
||
> _**📣Note**: if you use a proxy contract with an implementation, the address should be for the proxy._ | ||
**Select the continuation option** | ||
|
||
|
||
```text | ||
? Would you like to add another contract? | ||
> I'm finished | ||
Add a new address for same contract on same network | ||
Add a new network for same contract | ||
Add a new contract (with a different ABI) | ||
[Current contract: BribeVotingReward, on network: rootstock] | ||
``` | ||
|
||
|
||
The Contract Import process will prompt the user whether they would like to finish the import process or continue adding more addresses for the same contract on the same network, addresses for the same contract on a different network, or a different contract. | ||
|
||
For more information on the contract import feature, visit the documentation[ here](https://docs.envio.dev/docs/contract-import). | ||
|
||
|
||
## Envio Indexer Examples | ||
|
||
Click [here](https://docs.envio.dev/docs/example-uniswap-v3) for more examples. | ||
|
||
|
||
## Get in touch | ||
|
||
Indexing can be a rollercoaster, especially for more complex use cases. Our engineers are available to help you with your data availability needs. | ||
|
||
For any technical queries or issues feel free to reach us at [[email protected]](mailto:[email protected]). | ||
|
||
|
||
## Resources | ||
|
||
* [Landing page](https://envio.dev/) | ||
* [Documentation](https://docs.envio.dev/docs/overview) | ||
* [Blog](https://docs.envio.dev/blog) | ||
* [GitHub](https://github.com/enviodev) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
sidebar_position: 5 | ||
sidebar_label: On chain data & Indexing | ||
title: Data Indexing | ||
description: "How to get started with writing, deploying and testing smart contracts on Rootstock using Hardhat." | ||
tags: [hardhat, quick start, developer tools, rsk, rootstock, ethereum, dApps, smart contracts] | ||
--- | ||
|
||
## TheGraph | ||
|
||
Getting historical data on smart contracts can be challenging when building dApps. [The Graph](https://thegraph.com/) provides an easy way to query smart contracts data through APIs known as [subgraphs](https://thegraph.com/docs/en/developing/developer-faqs/#1-what-is-a-subgraph). Its infrastructure relies on a decentralized network of indexers, enabling dApps to achieve true decentralization. See [Getting started with TheGraph](./thegraph.md). | ||
|
||
## Envio | ||
|
||
[Envio](https://envio.dev/) is a feature-rich indexing solution that provides developers with a seamless and efficient way to index and aggregate real-time or historical blockchain data for Rootstock, and **other EVM chains**. The indexed data is easily accessible through custom [GraphQL](https://graphql.org/) queries, giving developers the flexibility and power to retrieve specific information. | ||
|
||
Envio offers native support for Rootstock and has been designed to support high-throughput blockchain applications that rely on real-time data for their business requirements. | ||
|
||
Designed to optimize the developer experience, Envio offers automatic code generation, flexible language support, quickstart templates, and a reliable, cost-effective hosted service. | ||
|
||
Indexers on Envio can be written in [JavaScript](https://www.javascript.com/), [TypeScript](https://www.typescriptlang.org/), or [ReScript](https://rescript-lang.org/). | ||
|
||
## Covalent | ||
|
||
Covalent provides the industry-leading Unified API bringing visibility to billions of Web3 data points. Developers use Covalent to build exciting multi-chain applications like crypto wallets, NFT galleries, and investor dashboard tools utilizing data from 100+ blockchains including Rootstock. | ||
|
||
The Covalent API maintains a full archival copy of every supported blockchain, meaning every balance, transaction, log event, and NFT asset data is available from the genesis block. This data is available via: | ||
|
||
1. [Unified API](#unified-api) - Incorporate blockchain data into your app with a familiar REST API | ||
2. [Increment](#increment) - Create and embed custom charts with no-code analytics | ||
|
||
### Why use Covalent? | ||
|
||
Use Covalent if you need: | ||
* Structured and enhanced on-chain data well beyond what you get from RPC providers | ||
* Broad and deep multi-chain data at scale | ||
* Enterprise-grade performance | ||
|
||
> **[Sign up to start building on Rootstock](https://www.covalenthq.com/platform/?utm_source=rootstock&utm_medium=partner-docs)** |
2 changes: 1 addition & 1 deletion
2
docs/05-dev-tools/thegraph.md → docs/05-dev-tools/data/thegraph.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.