Build CryptoStar Dapp on Ethereum — FAQ — Udacity Blockchain

Alvaro Andres Pinzon Cortes
1 min readApr 7, 2019

--

Hi Team, I’m a bit confused as to when we need to .call() specific functions?

  • In truffle Calls are used for GETTER functions, which just return values but DON’T modify any information (create, delete, change values). Calls can be used to execute code on the network, though no data will be permanently changed. Calls are free to run, and their defining characteristic is that they read data. Example:
contract.getStarName()
  • If you need to execute a function that modifies information (create, delete, change values) you just use the the name of the function, but NEVER call(). Example:
contract.createNewStar()

--

--

No responses yet