See: https://www.trufflesuite.com/tutorial
- Install truffle
npm install -g truffle
- Run truffle version
truffle version
- Download ganache https://www.trufflesuite.com/docs/ganache/quickstart
Development command
truffle migrate --reset --network rinkeby
let instance = await DefiMarket.deployed()
let accounts = await web3.eth.getAccounts()
instance.addTradeOffer(accounts[1], 123, {from: accounts[0], value: 1})
instance.listingIdToBuyersAddress.call(123, 0)
instance.getNumberOfBuyingOfferForListingId.call(123)