Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
  • Jun 05 2016 10:31
    @alexvandesande banned @adamskee
  • Mar 16 2016 01:12
    @alexvandesande banned @scbosse

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
provide the some documentation based on Decentralise smart contract using ethereum
Itamar Levy-Or

Hi I am new to ethereum, and solidity. I am starting by following this tutorial: http://www.dappuniversity.com/articles/the-ultimate-ethereum-dapp-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.

Akshay Dev H
@ItamarLevyOr try using constructor () public {
candidate = "Candidate 1" instead of function Election () public {
candidate = "Candidate 1"
hello admin
hi i just want code for erc721
Mayank Sahai
@anuragLHT yes?
Germán Lugo
Hi every body!! I'm looking for a good tutorial of drizzle. The documentation is still to hard for me.
Hi, when I åaste the ERC20 token pragma solidity 4.16 complete script from ethereum.org/token in Ethereum wallet deploy contract, it says there are errors in script. Do you know standard ERC20 token script that compiles in wallet 0.11.1 ?
Hi, when I paste the ERC20 token pragma solidity 4.16 complete script from ethereum.org/token in Ethereum wallet deploy contract, it says there are errors in script. Do you know standard ERC20 token script that compiles in wallet 0.11.1 ?
Does any dpos consensus engine in go-ethereum ?
Hey there. I am bloody new to Ethereum and struggling with the Constructor/function thing when creating a Contract. I just read only to use the Constructor. But as i'm using the variable 'initialSupply' as in the tutorial recommended, initialSupply is unknown. So how do i declare the variable without the function? And where is the benefit for not hardcoding it?
Germán Lugo
Hi @AlexanderWelling what are you using to deploy your contract? Truffle o Remix?
You could hardcode without any problem or any consequence of any kind. Even, when you are doing test is maybe the most practical thing if you are in Remix. You don't have to pass argument for each deployment.
Then for elegance maybe people or when people share a contract as template, they create a contract with a constructor that take parameters.
Paul Nguyen
Thanks for connecting me and care.I don’t know know so much about ethereum.org/token.
Thank you @Chococoin for responding, I'm using none of them. I just wrote it in the Ethereum Wallet Software for learning purposes. But i suppose i will switch on Truffle when things become more serious.
Venkata Vineel
Folks , what type of apps can we make with this platform
Venkata Vineel
Does Blockchain have any relevance to small businesses
function send(address receiver, uint amount) public {
if (balances[msg.sender] < amount) return;
hi if balances of sender is less than amount then it says to return.. Can any one explain this ?
I think no one helps the newbies here :(
@sahni619 This means if you try to send amount more than balance, then it will terminate without any exchange. For newbies tutorials, please take a look here : https://www.youtube.com/playlist?list=PLL5pYVd8AWtT6vcvLo6vHv3EmtsqiQBxy
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; }
Is this interface another contract?
Thanks for info @ThisIsCodeXpert
@sahni619 You are welcome !
Screen Shot 2018-08-27 at 3.34.23 PM.png
does anyone know about this error.. It comes when I want to fetch balance from my test accounts from truffle console
hello,where is the data concerninga token stored
hello every,i'm chinese and need help
who can tell me who to deplop a depp, free way
question, why need to download the entire ethereum blockchain & sync, in order to be able to deploy a "smart contract"
Gregory Snelgar
You don't need to download the blockchain to deploy a smart contract. You can do it at www.myetherwallet.com without downloading anything.
I am new in learning Solidity.
function newProposal(
address beneficiary,
uint weiAmount,
string jobDescription,
bytes transactionBytecode
Hi, folks. What does the transactionBytecode mean?
I am new to ethereum smart contract, could anyone help me ?
Hi, I'm working through the examples on the ethereum homepage but I have some questions regarding the crowd sale:
I hope somebody has used the examples and can help, thx.
How can I get the private key from a UTC file by a program?
Zeeshan Hanif
Hello everyone,
I'm trying to create token on etherum, wanted to know if is it possible to create separate token for external purpose and internal system usage purpose.
Just like steemit do it, STEEM is what people buy, but within the system they use SteemDollar and SteemPower
Friends, who has the code to create their own encrypted currency?
I am setting up a new Crypto. It need to be issued at a value and will not be made available for few years.
Sierra Bravo
Hi, Thanks for the examples!I'm testing out the minimum viable token example at https://www.ethereum.org/token
The contract gets mined, but I'm not sure how to call the functions.
I'm trying to transfer some coins to be second account thus:
mytoken.transfer(0xa49b9486b4b06321e6c9f774125a15afab21487f, 10)