Questions tagged [rsk]

Rootstock is the first general purpose smart contract platform secured by the Bitcoin Network. The Rootstock network is highly compatible with the Ethereum network at various layers. Rootstock is the Smart Contract platform of Bitcoin. Its engine is a forked version of the EVM (Ethereum Virtual Machine), and the RVM (Rootstock Virtual Machine) is compatible with Ethereum Smart Contracts and the tools used to deploy and interact with them.

Rootstock () is an Ethereum-compatible smart contract platform, secured by the Bitcoin network.

Developers can rely on their existing skills and familiar tools, working with Ethereum, when developing on RSK because:

  • The virtual machine is EVM compatible;
  • Interprocess connectivity is JSON-RPC compatible;
  • Smart contract programming language - Solidity is supported; and
  • Javascript programming interface - web3.js is supported.

See Rootstock Dev Portal for developer documentation.

The Rootstock blockchain is secured by merge-mining, with some additional security measures. The Rootstock blockchain is mined by the Bitcoin miners. It also features a 2-way peg, which has methods to transfer BTC into RBTC and vice-versa. See Rootstock FAQs.

78 questions
7
votes
1 answer

How do I send transactions to RSK deployed smart contract functions via Ethers.js and Hardhat

I have followed this Hardhat tutorial and trying to test a demo smart contract on RSK regtest blockchain. Here is the hardhat.config.js setup I am using: require('@nomiclabs/hardhat-waffle'); module.exports = { solidity: '0.7.3', …
7alip
  • 895
  • 6
  • 11
7
votes
2 answers

RSK node on an Apple M1 chip architecture?

Following these instructions to install the RSK node on an 2021 MBP with Apple M1 Pro chip. I would like to run an RSK node locally in regtest mode. After installation, running the command to start RSKj: java \ -classpath…
bguiz
  • 27,371
  • 47
  • 154
  • 243
7
votes
1 answer

Solidity convert HEX number to HEX string

I need to store a value of this kind 0xff0000 or 0x00ff08 (hex colour representation) in solidity smart contract and be able to convert it inside a contract to a string with the same text characters "ff0000". I intend to deploy this smart contract…
Aleks Shenshin
  • 2,117
  • 5
  • 18
7
votes
1 answer

Is there a docker-compose for dockerized RSK node?

I need a docker-compose YAML file for the dockerized version of RSK node (see here). It needs to have a volume for the config file and another for the DB.
7
votes
2 answers

How to connect to RSK public nodes over websockets?

I am trying to connect to RSK Mainnet or RSK Testnet over websockets. Here's what I tried for Mainnet: const wsProvider = new Web3.providers.WebsocketProvider('ws://public-node.rsk.co'); const web3 = new…
Milton
  • 161
  • 1
  • 4
7
votes
1 answer

How to avoid "PeerDiscoveryException" when running RSK node on Windows?

I started running RSK node on Windows and when I tried: curl -X POST -H "Content-Type:application/json" --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' http://localhost:4444 I always…
serlokiyo
  • 353
  • 1
  • 9
7
votes
1 answer

Is there a way to debug transactions in RSK network, which could be the best way?

We are running an RSK node, some smart contract transactions show internal errors, but the message related to the failed require condition doesn't appear in those error messages... We only see "internal error" and are unable to see which specific…
7
votes
1 answer

How do you estimate the amount of gas required for a smart contract invocation?

I want to send a transaction in RSK network and I get this message in logs: Not enough gas for transaction execution. I got the gas limit parameter from my testing environment, using web3.eth.estimateGas.
7alip
  • 895
  • 6
  • 11
6
votes
1 answer

How to calculate a smart contract deployment price on RSK?

Say I have an ERC20 smart contract which I'm developing and testing in Hardhat: //SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import…
Aleks Shenshin
  • 2,117
  • 5
  • 18
6
votes
1 answer

How to get the latest Transfer event transactions of a token on RSK from Covalent DB?

I am querying the Covalent database in order to get information about rUSDT token Transfer transactions on RSK. The token address on the RSK blockchain is as below: 0xEf213441a85DF4d7acBdAe0Cf78004E1e486BB96 The transfer event log's hash is as…
Gino Osahon
  • 399
  • 1
  • 6
6
votes
1 answer

How to query the expiry date for an RNS domain?

In addition to direct queries, I'd also like to subscribe to events to listen for whenever the expiry date changes (e.g. when it is renewed) I've found that NodeOwner.sol has an available function whose implementation looks promising: function…
bguiz
  • 27,371
  • 47
  • 154
  • 243
6
votes
1 answer

How do I verify the version of RSK running on a node?

I have RPC access to a private deployment of an RSK node, but no direct access to the file system. How can I check what version of the RSK node is running on that system?
serlokiyo
  • 353
  • 1
  • 9
6
votes
2 answers

Is it possible to make smart contract trustlessly know addresses of RSK pegnatories in real-time?

Is there any way to use a smart contract on RSK to query the addresses of all current pegnatories? And to do so without relying on 3rd party oracles on RSK? For context: The intention here is to make smart contract allocate a part of incomes…
Jack
  • 121
  • 4
6
votes
1 answer

What is the max size of a smart contract on the RSK network?

Does RSK have a maximum size of a compiled smart contract? If so, what is the max size of the byte code that can be deployed?
7alip
  • 895
  • 6
  • 11
6
votes
2 answers

How to calculate the total volume transacted for a token on RSK?

I would like to be able to find out the total volume transacted for RDOC, from deployment until now. Unable to get this information from the block explorer: 0x2d919f19d4892381d58edebeca66d5642cef1a1f What's the best way to get this using RPC or…
7alip
  • 895
  • 6
  • 11