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
5
votes
1 answer

How to get value of the data at a particular location of a smart contract deployed on RSK?

I would like to obtain info particular smart contract - that is deployed on the RSK Testnet - to get the data values from its storage. How can I do this? I'm using eth_getStorageAt JSON-RPC, but i'm getting unexpected results.
Owans
  • 1,037
  • 5
  • 14
5
votes
1 answer

How to subscribe to `newBlockHeaders` on local RSK node over websockets?

I'm connecting to RSKj using the following endpoint: ws://localhost:4444/ ... However, I am unable to connect. Note that the equivalent HTTP endpoint http://localhost:4444/ work for me, so I know that my RSKj node is running properly. I need to…
Jesse Clark
  • 584
  • 2
  • 9
5
votes
2 answers

How to connect to RSK node over websockets?

I'm trying to connect to my RSK node via a websocket: wscat -c ws://localhost:4445/websocket However, I get this result: Error: connect ECONNREFUSED 127.0.0.1:4445. The docs say that websocket listens to port 4445 by default. How do I connect…
Jesse Clark
  • 584
  • 2
  • 9
4
votes
1 answer

How to join a query result with a value, received from another query?

I want to calculate transaction costs in USD for a number of most recent transactions on the Rootstock blockchain. I have a PostgreSQL database table with token prices reports.token_prices from which I select the value of the latest available RBTC…
Aleks Shenshin
  • 2,117
  • 5
  • 18
4
votes
1 answer

How to establish a web3 provider connection from a Vue.js DApp?

I am intended to interact with Rootstock blockchain from a vue.js DApp to track wallet balance and send RBTC. ​ I want to establish a Metamask connection and use ethers.js web3 provider to interact with the Rootstock network. ​ I created a Pinia…
Irene Patrikios
  • 249
  • 1
  • 5
4
votes
1 answer

How to calculate a gas fee paid for a single stable coin transfer on RSK?

I am trying to calculate how much gas is spent for rUSDT token transfer transaction on RSK. If I go to RSK explorer rUSDT events page and pick up the first available transaction with a transfer event, I see that besides the transfer event I am…
Aleks Shenshin
  • 2,117
  • 5
  • 18
4
votes
1 answer

How to send a web3 transaction from a test account of RSKj regtest blockchain node

I am creating a DApp that connects to a smart contract deployed on a local test RSK blockchain (regtest) run by RSKj Java app. I intend to send transactions via Web3 connected to Metamask. In DApp I am getting the accounts list by sending a Web3…
Aleks Shenshin
  • 2,117
  • 5
  • 18
4
votes
1 answer

How to query internal transactions for an RSK transaction?

If I have the transaction hash of an RSK transaction, how can I get its internal transactions - i.e. when the smart contracts invoke functions on other contracts or do RBTC transfers? I'm able to get the main transaction using web3.js, however once…
Owans
  • 1,037
  • 5
  • 14
4
votes
1 answer

How can I tell if a smart contract on RSK is an NFT?

Given an address of a smart contract deployed to RSK, how can I tell if it is an NFT or not? Is there a "standard" way to do this?
Owans
  • 1,037
  • 5
  • 14
4
votes
2 answers

How to convert RSK token balance to a Javascript number?

I want to get the balance (number of tokens) from the token smart contract. I'm using web3.js to interact with the contract, and am able to get a return value. However, with this value, if I do .toString(), I see that it has the correct…
Milton
  • 161
  • 1
  • 4
4
votes
2 answers

How can I deploy a smart contract to RSK without using Truffle?

After compiling a Solidity file using solc, how can I deploy the output bytecode as a smart contract to RSK? I know how to do this using Truffle already, but what alternatives are there available for this task?
serlokiyo
  • 353
  • 1
  • 9
4
votes
1 answer

How to get the minimum gas price on RSK with web3.js?

I'm using web3.js to get the minimum gas price, but the following is not working: web3.eth.getBlock('latest').minimumGasPrice How can I do this?
Owans
  • 1,037
  • 5
  • 14
4
votes
1 answer

How to configure truffle to connect to RSK Testnet public node?

I'm using the following configuration in truffle module.exports = { networks: { development: { host: "localhost", port: 8545, network_id: "*" // Match any network id }, rsk_testnet: { host:…
serlokiyo
  • 353
  • 1
  • 9
4
votes
1 answer

Why does web3.js reject a valid RSK smart contract address?

I'm trying to interact with smart contracts on the RSK Mainnet, and I'm getting this error... Provided address "0xAb2d290b7a600f5eA8d5B933f6F15c867Fd7e60e" is invalid, the capitalization checksum test failed, or its an indirect IBAN address which…
Solange Gueiros
  • 313
  • 1
  • 10
4
votes
3 answers

When I use the same seed phrase for both Ethereum and RSK, why is my address capitalised differently?

If I import the same private key in ETH and RSK networks, the account is the same but the capitalization is different. Why is this? Is this OK?