Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 1.96 KB

other_learnings.md

File metadata and controls

27 lines (22 loc) · 1.96 KB

Other Learnings

Personal learnings while creating this project.

Smart contract related

  • Make sure you reset MetaMask after restarting your locally running private blockchain, because the nonce will be different.
  • If sometimes your functions crap out for whatever reason after restarting your locally running private blockchain, try resetting the migration with migrate --reset
  • How to find out the contract address from Truffle: Marketh.address()
  • To initiate your migrated contracts on Truffle: Marketh.deployed().then(function(instance){ app = instance })
  • Accessing a variable example: app.admin() or app.storeOwnersCount()
  • Accessing an array example: app.stores.call(0)
  • Useful reference of Solidity gotchas: http://balticdatascience.com/2017/11/27/solidity-gotchas/
  • Transaction gas cost in Truffle test case
  • Testing contract withdrawal pattern with Truffle

General front-end stuff

ENS and Rinkeby