Building a Dapp Store
Revision as of 00:32, 16 March 2018 by Bacchas (talk | contribs) (→Setting up truffle with a boilerplate instead of init also called a box)
Setting up truffle with a boilerplate instead of init also called a box
truffle unbox chainskills/chainskills-box
This download the template from gethub Chainlist.sol
pragma solidity ^0.4.18; contract ChainList { address seller; string name; string description; uint256 price; function sellArticle(string _name, string _description, uint256 _price) public { seller = msg.sender; name = _name; description = _description; price = _price; } function getArticle() public view returns (address _seller, string _name, string _description, uint256 _price) { return(seller, name, description, price); } } </pre? A file must be created in the migrations folder to deploy the contrace 2_deploy_contracts.js <pre> var ChainList = artifacts.require("./ChainList.sol"); module.exports = function(deployer){ deployer.deploy(ChainList); }