Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rsksmart/devportal
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9f2fea605ccdf3f556118d2ceaa01926c3e67542
Choose a base ref
..
head repository: rsksmart/devportal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b853fa11f1e40299ad4651c0c792b4fd8c51fbca
Choose a head ref
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -28,18 +28,18 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Initialize CodeQL
uses: github/codeql-action/init@f779452ac5af1c261dce0346a8f964149f49322b #v3.26.13
uses: github/codeql-action/init@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 #v3.28.0
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@f779452ac5af1c261dce0346a8f964149f49322b #v3.26.13
uses: github/codeql-action/autobuild@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 #v3.28.0

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@f779452ac5af1c261dce0346a8f964149f49322b #v3.26.13
uses: github/codeql-action/analyze@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 #v3.28.0
with:
category: "/language:${{ matrix.language }}"
4 changes: 2 additions & 2 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -12,10 +12,10 @@ jobs:
pull-requests: write
steps:
- name: 'Checkout Repository'
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: 'Dependency Review'
uses: actions/dependency-review-action@4081bf99e2866ebe428fc0477b69eb4fcda7220a # v4.4.0
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0
with:
fail-on-severity: high
comment-summary-in-pr: true
6 changes: 3 additions & 3 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 #v4.2.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
with:
persist-credentials: false

@@ -33,7 +33,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 #v4.4.3
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 #v4.6.0
with:
name: SARIF file
path: results.sarif
@@ -42,6 +42,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
uses: github/codeql-action/upload-sarif@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
with:
sarif_file: results.sarif
14 changes: 13 additions & 1 deletion docs/02-developers/03-blockchain-essentials/02-overview/index.md
Original file line number Diff line number Diff line change
@@ -89,7 +89,19 @@ Note that when `eth_estimateGas` is called, the node simulates the transaction e
The simulation runs through the entire transaction process as if it were being executed, including checking for sufficient balance, contract code execution, etc.
During the simulation, the method calculates the exact amount of gas that would be consumed by the transaction if it were to be executed on the blockchain. The estimated gas amount is returned, helping users set an appropriate gas limit for the actual transaction.

There is a difference in Rootstock compared to Ethereum, and it is that if one of the steps of the simulated transaction fails, the node will return the gas estimation needed for the transaction, while on Ethereum, the node will return an error instead of the gas estimation.
:::info[Info]

**Prior to Arrowhead 6.5.0**, there was a difference in Rootstock compared to Ethereum:

- If one of the steps of the simulated transaction fails, the node would return the gas estimation needed for the transaction
- On Ethereum, the node would return an error instead of the gas estimation.

**Starting with Arrowhead 6.5.0:**

- Rootstock will behave same way as Ethereum's behavior for simulated transaction failures.
- If a simulated transaction step fails, the node will now return an error, mirroring Ethereum's response.

:::

You can see this behavior in the following example, where a call for `eth_estimateGas` on a transaction that would be executed from an address without enough balance.

3 changes: 2 additions & 1 deletion docs/02-developers/04-quickstart/foundry.md
Original file line number Diff line number Diff line change
@@ -2,14 +2,15 @@
sidebar_label: Foundry
sidebar_position: 500
title: Rootstock Foundry Starter kit
description: 'Whether you are a seasoned developer or just starting your journey into smart contract development, the foundry starter kit provides a solid foundation for building decentralized applications (dApps) on the Rootstock network.'
description: Whether you are a seasoned developer or just starting your journey into smart contract development, the foundry starter kit provides a solid foundation for building decentralized applications (dApps) on the Rootstock network.
tags: [rsk, rootstock, tutorials, developers, foundry, quick starts, dApps, smart contracts]
---

:::info[Note]
If you wish to suggest changes on this document, please open a PR on the [Foundry Starter Kit Repository](https://github.com/rsksmart/rootstock-foundry-starterkit.git)
:::


# Rootstock Foundry Starter Kit

Whether you’re a seasoned developer or just starting your journey into smart contract development, the foundry starter kit provides a solid foundation for building decentralized applications (dApps) on the Rootstock network.
3 changes: 2 additions & 1 deletion docs/02-developers/06-integrate/01-rif-relay/architecture.md
Original file line number Diff line number Diff line change
@@ -2,10 +2,11 @@
sidebar_label: Architecture
sidebar_position: 980
title: RIF Relay - Architecture
description: RIF Relay Architeture.
tags: [rif, envelope, relay, integrate]
description: RIF Relay Architeture
---


The RIF Relay system is designed to achieve transaction sponsorship at a low cost. The cost of the relay service provided by the “sponsors” is agreed upon among the parties off-chain. The low cost of transactions on Rootstock (RSK) contributes to keeping overall service costs low as well.

The RIF Relay system is made up of various components, some of which are essential and others which are auxiliary.
3 changes: 2 additions & 1 deletion docs/02-developers/06-integrate/01-rif-relay/contracts.md
Original file line number Diff line number Diff line change
@@ -2,10 +2,11 @@
sidebar_label: Contracts
sidebar_position: 700
title: RIF Relay - Contracts
description: RIF Relay Contracts.
tags: [rif, envelope, relay, integrate]
description: RIF Relay Contracts
---


## Mainnet

### Version 1
3 changes: 2 additions & 1 deletion docs/02-developers/06-integrate/01-rif-relay/deployment.md
Original file line number Diff line number Diff line change
@@ -2,10 +2,11 @@
sidebar_label: RIF Relay Deployment
sidebar_position: 500
title: RIF Relay Deployment
description: RIF Relay deployment process.
tags: [rif, envelope, relay, integration guide]
description: RIF Relay deployment process
---


## Set Up RIF Relay Contracts and Server

### Deploy Contracts
3 changes: 2 additions & 1 deletion docs/02-developers/06-integrate/01-rif-relay/develop.md
Original file line number Diff line number Diff line change
@@ -2,10 +2,11 @@
sidebar_label: Develop
sidebar_position: 600
title: RIF Relay Develop
description: RIF Relay deployment process.
tags: [rif, envelope, relay, user, guide]
description: RIF Relay deployment process
---


## Initializing the project

To use RIF Relay, follow these steps to build the project.
3 changes: 2 additions & 1 deletion docs/02-developers/06-integrate/01-rif-relay/gas-costs.md
Original file line number Diff line number Diff line change
@@ -2,10 +2,11 @@
sidebar_label: Gas Costs
sidebar_position: 950
title: RIF Relay - Gas Costs
description: RIF Relay Gas Costs.
tags: [rif, envelope, relay, integrate]
description: RIF Relay Gas Costs
---


The overhead gas cost is the extra amount of gas required to process the relay call requested by the user. Let's call **X** the gas consumed by the destination contract method call, and **Y** the total gas consumed by the relay call, then the relay call cost (i.e. overhead gas cost) is: **Z = Y - X**.

## SmartWallet templates
Original file line number Diff line number Diff line change
@@ -2,10 +2,11 @@
sidebar_label: Setup
sidebar_position: 300
title: RIF Relay Installation Requirements
description: Requirements for installing RIF Relay.
tags: [rif, envelope, relay, user, guide]
description: Requirements for installing RIF Relay
---


To set up the RIF Relay system running locally there are some tools that are required. All of these tools are open source and have their own support page. The functionality of RIF Relay does not depend on these technologies and could be updated or replaced, if necessary.

## Hardware Requirements
3 changes: 2 additions & 1 deletion docs/02-developers/06-integrate/01-rif-relay/integrate.md
Original file line number Diff line number Diff line change
@@ -2,10 +2,11 @@
sidebar_label: Integrations
sidebar_position: 200
title: RIF Relay Integration
description: Integrating RIF Relay in a dApp.
tags: [rif, envelope, relay, integration guide]
description: Integrating RIF Relay in a dApp
---


This guide goes over the exposed RIF Relay methods that dApps and wallets can consume to provide relaying as a service, with the purpose of allowing users to pay transaction fees with tokens in a particular system.

## Introduction
27 changes: 26 additions & 1 deletion docs/02-developers/06-integrate/01-rif-relay/overview.md
Original file line number Diff line number Diff line change
@@ -2,10 +2,15 @@
sidebar_label: Overview
sidebar_position: 100
title: RIF Relay - Overview
description: RIF Relay Overview.
tags: [rif, envelope, relay, integrate, integration guide]
description: RIF Relay Overview
---

:::info[Note]
If you wish to suggest changes on this document, please open a PR on the [Rif Relay Repository](https://github.com/rsksmart/rif-relay.git)
:::

# RIF Relay
Most blockchains have native cryptocurrency to pay for transaction fees and gas consumption; this simple design has many benefits. First, to bootstrap an economy, the native cryptocurrency model creates an initial demand for it. Second, it simplifies the interaction between users and miners because it forces them to use the same means of payment. Third, it reduces the complexity of the consensus rules. Finally, it provides Denial of Service (DoS) protection to the network as full nodes can pay what the miners expect to include a received transaction. This way nodes can decide to propagate a transaction or not, preventing the free consumption of network bandwidth, and stop spam transactions.

Cryptocurrencies tend to be associated with volatility and to counter measure this fact, Stablecoins were introduced. Stablecoins bridge the worlds of cryptocurrency and everyday fiat currency because their prices are pegged to a reserve asset like the U.S. dollar or gold.
@@ -15,3 +20,23 @@ But with the advent of Decentralized Finance (DeFi), several stable coins have b
With this in mind, the main goal of the RIF Relay Project is to **provide the Rootstock (RSK) ecosystem with the means to allow blockchain applications and end-users (wallet-apps) to transact without needing RBTC**. The system should allow Rootstock (RSK) users to pay transaction fees with methods of payment (i.e., tokens) other than RBTC while maintaining their accounts as transaction senders.

RIF Relay takes its inspiration from the [Gas Station Network (GSN) project](https://github.com/opengsn/gsn). GSN is a decentralized system that improves dApp usability without sacrificing security. In a nutshell, GSN abstracts away gas (used to pay transaction fees) to minimize onboarding and UX friction for dApps. With GSN, "gasless clients" can interact with smart contracts paying for gas with tokens instead of native-currency.


## Modules

RIF Relay is built in modules, the entire system is made up by 3 modules.

1. [RIF Relay Contracts](https://github.com/rsksmart/rif-relay-contracts) contains all the contracts used by the RIF Relay System.
2. [RIF Relay Client](https://github.com/rsksmart/rif-relay-client) contains a library to interact with the relay server.
3. [RIF Relay Server](https://github.com/rsksmart/rif-relay-server) has all the relay server code. You can run the server directly from there.

Each module has instructions for development and usage.

[Deprecated Docs](docs/README.md)


## Contribution Guidelines
* Please refer to the Rootstock Contribution Guidelines for more information on how to contribute to this project.

## License:
MIT License - Copyright (c) 2023 Rootstock
3 changes: 2 additions & 1 deletion docs/02-developers/06-integrate/01-rif-relay/sample-dapp.md
Original file line number Diff line number Diff line change
@@ -2,10 +2,11 @@
sidebar_label: RIF Relay Sample dApp
sidebar_position: 400
title: How to use the RIF Relay Sample dApp SDK
description: RIF Relay Sample dApp SDK Starter kit.
tags: [rif, envelope, relay, integration guide]
description: RIF Relay Sample dApp SDK Starter kit
---


## Getting Started

This guide helps to quickly get started with setting up your environment to use RIF Relay and also use the sample dApp to test relay services.
5 changes: 3 additions & 2 deletions docs/02-developers/06-integrate/01-rif-relay/smart-wallets.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
sidebar_label: Smart Wallets
sidebar_position: 700
sidebar_position: 800
title: RIF Relay Smart Wallets
description: RIF Relay Smart Wallets.
tags: [rif, envelope, relay, user, guide]
description: RIF Relay Smart Wallet
---


This guide is intended to explain more about the interaction and deployment of the Smart Wallets. We will be using additional testing contracts that were included in the project, like the `UtilToken(ERC20)`. All the utils scripts are executed from the account[0] from the regtest network.

## Prerequisites
2 changes: 1 addition & 1 deletion docs/02-developers/06-integrate/01-rif-relay/versions.md
Original file line number Diff line number Diff line change
@@ -2,8 +2,8 @@
sidebar_label: Versions
sidebar_position: 900
title: RIF Relay Versions
description: RIF Relay Versions.
tags: [rif, envelope, rif relay, integration guide]
description: "RIF Relay Versions"
---


14 changes: 13 additions & 1 deletion docs/02-developers/07-rpc-api/02-rootstock/02-methods.md
Original file line number Diff line number Diff line change
@@ -199,7 +199,19 @@ Note that when `eth_estimateGas` is called, the node simulates the transaction e
The simulation runs through the entire transaction process as if it were being executed, including checking for sufficient balance, contract code execution, etc.
During the simulation, the method calculates the exact amount of gas that would be consumed by the transaction if it were to be executed on the blockchain. The estimated gas amount is returned, helping users set an appropriate gas limit for the actual transaction.

There is a difference in Rootstock compared to Ethereum, and it is that if one of the steps of the simulated transaction fails, the node will return the gas estimation needed for the transaction, while on Ethereum, the node will return an error instead of the gas estimation.
:::info[Info]

**Prior to Arrowhead 6.5.0**, there was a difference in Rootstock compared to Ethereum:

- If one of the steps of the simulated transaction fails, the node would return the gas estimation needed for the transaction
- On Ethereum, the node would return an error instead of the gas estimation.

**Starting with Arrowhead 6.5.0:**

- Rootstock will behave same way as Ethereum's behavior for simulated transaction failures.
- If a simulated transaction step fails, the node will now return an error, mirroring Ethereum's response.

:::

You can see this behavior on the following example, where we call `eth_estimateGas` for a transaction that would be executed from an address without enough balance.

14 changes: 13 additions & 1 deletion docs/03-node-operators/03-json-rpc/01-methods.md
Original file line number Diff line number Diff line change
@@ -1089,7 +1089,19 @@ Note that when `eth_estimateGas` is called, the node simulates the transaction e
The simulation runs through the entire transaction process as if it were being executed, including checking for sufficient balance, contract code execution, etc.
During the simulation, the method calculates the exact amount of gas that would be consumed by the transaction if it were to be executed on the blockchain. The estimated gas amount is returned, helping users set an appropriate gas limit for the actual transaction.

There is a difference in Rootstock compared to Ethereum, and it is that if one of the steps of the simulated transaction fails, the node will return the gas estimation needed for the transaction, while on Ethereum, the node will return an error instead of the gas estimation.
:::info[Info]

**Prior to Arrowhead 6.5.0**, there was a difference in Rootstock compared to Ethereum:

- If one of the steps of the simulated transaction fails, the node would return the gas estimation needed for the transaction
- On Ethereum, the node would return an error instead of the gas estimation.

**Starting with Arrowhead 6.5.0:**

- Rootstock will behave same way as Ethereum's behavior for simulated transaction failures.
- If a simulated transaction step fails, the node will now return an error, mirroring Ethereum's response.

:::

You can see this behavior on the following example, where we call `eth_estimateGas` for a transaction that would be executed from an address without enough balance.

Original file line number Diff line number Diff line change
@@ -32,8 +32,8 @@ description: "The JSON-RPC methods supported by Rootstock nodes."
| `debug_startGoTrace` | NO | |
| `debug_stopGoTrace` | NO | |
| `debug_traceBlock` | NO | |
| `debug_traceBlockByNumber` | NO | |
| `debug_traceBlockByHash` | NO | |
| `debug_traceBlockByNumber` | YES | |
| `debug_traceBlockByHash` | YES | |
| `debug_traceBlockFromFile` | NO | |
| `debug_traceTransaction` | YES | |
| `debug_vmodule` | NO | |
Loading