Configure Truffle to connect with RSK

Meri Herrera edited this page Sep 5, 2018 · 3 revisions

For this module, it is supposed that you have an RSK node running. If not, you can read this section to install one.

Open the truffle.js file and change the default port to 4444 (this is the default port for RSK):

module.exports = {
  networks: {
    rsk: {
      host: "localhost",
      port: 4444,
      network_id: "*" // Match any network id
    }
  }
};

Note: replace 'localhost' with your IP if necessary.

Go to the command terminal and open Truffle console by typing:

truffle console --network rsk

Try to interact with the node:

truffle(RSK)> web3.eth.blockNumber

It should return a number (the last block in your node).

You are now connected to your RSK node.

  • For further information about DApps and deploying smart contracts in RSK go here.
  • Truffle documentation here.
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.