The below given code is from the a tutorial given here at one of the tutorials on Truffle

// Set the provider for our contract

I see we set up a Web3 provider for the contract.

What basically are providers? What do they do?


https://api.myetherapi.com/eth is a provider. Web3 provider is a website running geth or parity node which talks to Ethereum network.

  • Link is broken...
    – whamsicore
    May 19 at 22:37

A provider links to a running node. For instance parity or geth.

A node has the ability to view and interact with the blockchain.


Initial guess is that this is a web3.js Strategy Pattern to allow an underlying protocol e.g. https to provide access to a node. I will confirm later.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.