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
3
votes
2 answers

Is there a way to read token address from the command line Hardhat script RSK

I have a Hardhat script that queries the RIF token balance on Rootstock. However the RIF address is hardcoded in my script: ​ const rifTokenAddress = '0x2aCc95758f8b5F583470bA265Eb685a8f45fC9D5'; ​ async function main() { const erc20 = await…
Adil6
  • 31
  • 3
3
votes
1 answer

Why do I get Sender's Account Does Not Exist when I send ERC20 Token from a new account with tokens?

I create my wallet like this const wallet = ethers.Wallet.createRandom() I use metamask to send RIF tokens to the public address. I confirm the new balance of the account and it is accurate, the ERC20 transaction worked. When I try to send some of…
Hamady C.
  • 1,205
  • 11
  • 13
3
votes
1 answer

How to get a specific number of signers while testing smart contracts in Hardhat?

I am developing my smart contracts in Hardhat and testing on RSK Testnet. To create signer accounts, I am using a mnemonic seed phrase and the following Hardhat configuration: ​ require('@nomicfoundation/hardhat-toolbox'); const { mnemonic } =…
3
votes
0 answers

BTC - RBTC conversion programatically using RSK

I want to ask if there is some documentation in order to make BTC to RBTC convertion through backend. I know there are some options in order to achieve this thing, like exchanges and some apps, but I want to learn how to do this process from…
maoooricio
  • 2,249
  • 3
  • 15
  • 19
3
votes
1 answer

Possible to create deployment transaction with empty 'tx.data' on RSK?

There is a transaction on RSK Testnet, 0xf3b1d43850523d45b4c84c5098ff0cf6bb74d1eb350b9574315433544f990390, where tx.to is the zero address, and tx.data is also zero. However, it shows that this was a deployment transaction, and that a contract was…
bguiz
  • 27,371
  • 47
  • 154
  • 243
3
votes
1 answer

How to convert bytes3 to HEX string in Solidity

I previously asked about converting uint to hex string. Now I want to store a HEX value 0x00ff08 in a bytes3 variable and to be able to convert it to a string in Solidity smart contract. Subsequently I intend to deploy it on RSK with Solidity…
Aleks Shenshin
  • 2,117
  • 5
  • 18
3
votes
1 answer

Why does local RSK node show "invalid address" for my smart contract, even though I can see it in the block explorer?

I'm running RSKj with the following command, to connect to RSK Testnet: java -cp rskj-core-2.2.0-PAPYRUS-all.jar -Drpc.providers.web.cors=* co.rsk.Start --testnet However, when I query an address, I get the following error: Invalid address The…
Owans
  • 1,037
  • 5
  • 14
3
votes
1 answer

How to calculate what gas price to use for transactions on RSK?

I need to know how to set a proper gas price for my transactions on RSK network. I am familiar with the eth_gasPrice approach from Ethereum: $ curl https://public-node.testnet.rsk.co -X POST -H "Content-Type: application/json" --data…
Owans
  • 1,037
  • 5
  • 14
3
votes
1 answer

How to use RNS domains with non-fungible token standards? (such as ERC721)

I have registered a .rsk domain using RNS, and am wondering if I can transfer ownership of it to other accounts, like an NFT. Is this possible with domains and subdomains? If so how?
bguiz
  • 27,371
  • 47
  • 154
  • 243
2
votes
1 answer

Can I make Ethers Wallet Addresses pass RSK Testnet case checksum test?

On RSK public testnet, I create my RSK wallet with ethers like this: const wallet = await ethers.Wallet.createRandom() Then the address is: 0x68C06960f0Cd2bB0318673F157243Ad545AbbE2A When I send an amount to it, and explore the transaction on RSK…
Hamady C.
  • 1,205
  • 11
  • 13
2
votes
1 answer

rsk private key encrypt - Error value parameter should be a number of string

I m trying to save my private key in a keystore v3 json format but when I try to encrypt it using the following methods: myNewAccount.encrypt('########') rsk.accounts.encrypt('the-private-key', '########') They both give the following…
Hamady C.
  • 1,205
  • 11
  • 13
2
votes
0 answers

Why the bytecodes for the same smart contract in testnet explorer and Remix/solcjs are different?

I am using Remix to compile and deploy my smart contract to Rinkeby and RSK test networks. I don't understand why the bytecode of my contract on Rinkeby explorer is different from the metadata.data.deployedBytecode.object in Remix artifacts and also…
Aleks Shenshin
  • 2,117
  • 5
  • 18
2
votes
0 answers

How to do "mainnet forking" of the RSK network in hardhat?

Here's the hardhat.config.js, as per the reference: hardhat mainnet forking module.exports = { solidity: '0.8.9', networks: { hardhat: { // Ref: https://hardhat.org/hardhat-network/guides/mainnet-forking.html forking: { …
bguiz
  • 27,371
  • 47
  • 154
  • 243
2
votes
3 answers

Convert uint24 to HEX string in Solidity

I am trying to convert uint24 value of a kind 0x00ff08 to a human readable string with the same characters in Solidity smart contract which I am going to deploy on RSK. In my question about bytes3 to hex string casting I was advised for these…
Aleks Shenshin
  • 2,117
  • 5
  • 18
2
votes
1 answer

How to advance block number when developing on RSK Regtest?

I have a smart contract that uses block number, and I need to increment the block number without actually waiting for time to pass. Is this possible when running an RSK node in Regtest? How can I do this with Javascript?
Owans
  • 1,037
  • 5
  • 14