These are chat archives for ethereum/tutorials

Aug 2018
Aug 20 2018 03:21
ok. thanks @anuragLHT
Akshay Dev H
Aug 20 2018 04:08
@MPA-MRK just use constructor(....) instead of function MyToken(...)
Akshay Dev H
Aug 20 2018 04:17
@AboShanab click on the verify and publish link ...then copy paste your entire smart contract code,,,, Ensure that the compiler version must be same as that used for deploying the contract. also you should check the optimization option ..
Aug 20 2018 06:19
hello guyz
i am building one website for blood bank. i want to build it on blockchain using ethereum.
i am building 2 contracts where one i used to store blood bank information and blood quota
and 2nd contract is for calculating storing total blood bank quota
can any one suggest contract structure for this
i just upload the code which i did

pragma solidity ^0.4.19;

import "./BloodQuota.sol";

contract BloodBank is BloodQuota {

string bloodBankName;
string bloodBankAddress;
string bloodBankemail;
address centralBankAddress;

function setCentralBankAddress(address _address) public {
centralBankAddress = _address;

modifier onlyOwner(string _bloodBankName) {
require(keccak256(bloodBankName) == keccak256(bloodBankName)); ;

function addOrganization( string _organizationName, string _organizationAddress,
string _email,
uint128[8] _bloodQuota
) public {
updateBloodBankQuota(centralBankAddress, _bloodQuota);

function organizationDetails() public view returns (string, string, string) {
return (bloodBankName, bloodBankAddress, bloodBankemail);

function updateBloodQuota (string _bloodBankName , uint128[8] _bloodQuota )
public onlyOwner(_bloodBankName){
updateBloodBankQuota(centralBankAddress, _bloodQuota);

pragma solidity ^0.4.19;
import "./TotalBloodQuotaAvailable.sol";

contract BloodQuota {
uint128 aPos=0;
uint128 aNeg=0;
uint128 bPos=0;
uint128 bNeg=0;
uint128 oPos=0;
uint128 oNeg=0;
uint128 abPos=0;
uint128 abNeg=0;

function updateBloodBankQuota(address _centralBankAddress, uint128[8]  _bloodQuota) public   {
  TotalBloodQuotaAvailable CB = TotalBloodQuotaAvailable(_centralBankAddress);
  CB.updateQuota(_bloodQuota , [aPos, aNeg, bPos, bNeg, oPos, oNeg, abPos, abNeg]);
  aPos = _bloodQuota[0];
  aNeg = _bloodQuota[1];
  bPos = _bloodQuota[2];
  bNeg = _bloodQuota[3];
  oPos = _bloodQuota[4];
  oNeg = _bloodQuota[5];
  abPos = _bloodQuota[6];
  abNeg = _bloodQuota[7];

 function getBloodBankQuota() public view returns (uint128 aPositive,
 uint128 aNegative, uint128 bPositive, uint128 bNegative, uint128 oPositive,
 uint128 oNegative, uint128 abPositive, uint128 abNegative) {
     // return quota from blood bank
     return(aPos, aNeg, bPos, bNeg, oPos, oNeg, abPos, abNeg);


Biky Chowhan
Aug 20 2018 16:40
provide the some documentation based on Decentralise smart contract using ethereum
Itamar Levy-Or
Aug 20 2018 22:40

Hi I am new to ethereum, and solidity. I am starting by following this tutorial: it seems to be a little out of date. Does anybody have a suggestion as to an alternative? Additionally when trying to use the commend: truffle migrate. I get the following error:

2_deploy_contracts.js invalid or does not take any parameters

Thanks for the help.