Where communities thrive


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

So Now function myContract () {
}

willl b something like constructor myContract () {

}

???

Will it be used this way
anuragLHT
@anuragLHT
@mayank-sahai
@sahni619 no just write constructor (arguments) , nothing else
sahni619
@sahni619
ok. thanks @anuragLHT
Akshay Dev H
@akshaydevh
@MPA-MRK just use constructor(....) instead of function MyToken(...)
Akshay Dev H
@akshaydevh
@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 ..
Satyajit
@satyajit007
@satyajit007
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

@satyajit007
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 {
bloodBankName=_organizationName;
bloodBankAddress=_organizationAddress;
bloodBankemail=_email;
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
@virus5251
provide the some documentation based on Decentralise smart contract using ethereum
Itamar Levy-Or
@ItamarLevyOr

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
@akshaydevh
@ItamarLevyOr try using constructor () public {
candidate = "Candidate 1" instead of function Election () public {
candidate = "Candidate 1"
Epintoken
@Epintoken
hello admin
AmritpalSingh5
@AmritpalSingh5
hi i just want code for erc721
Mayank Sahai
@mayank-sahai
@anuragLHT yes?
Germán Lugo
@Chococoin
Hi every body!! I'm looking for a good tutorial of drizzle. The documentation is still to hard for me.
BigBearB
@BigBearB
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 ?
liujingjun
@selfimpliu
Does any dpos consensus engine in go-ethereum ?
nambo
@AlexanderWelling
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
@Chococoin
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
@Paulnguyenun
Thanks for connecting me and care.I don’t know know so much about ethereum.org/token.
nambo
@AlexanderWelling
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
@vineelyalamarthy
Folks , what type of apps can we make with this platform
Venkata Vineel
@vineelyalamarthy
Does Blockchain have any relevance to small businesses
ThisIsCodeXpert
@ThisIsCodeXpert
sahni619
@sahni619
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 ?
sahni619
@sahni619
I think no one helps the newbies here :(
ThisIsCodeXpert
@ThisIsCodeXpert
@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
blocknodes
@blocknodes
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; }
Is this interface another contract?
Folks
sahni619
@sahni619
Thanks for info @ThisIsCodeXpert
ThisIsCodeXpert
@ThisIsCodeXpert
@sahni619 You are welcome !
sahni619
@sahni619
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
Geoffrey
@britisharmy
hello,where is the data concerninga token stored
left
@leftsky
hello every,i'm chinese and need help
who can tell me who to deplop a depp, free way
ThisIsCodeXpert
@ThisIsCodeXpert
MAGICMILLION777
@MAGICMILLION777
question, why need to download the entire ethereum blockchain & sync, in order to be able to deploy a "smart contract"
Gregory Snelgar
@arium-gregory
You don't need to download the blockchain to deploy a smart contract. You can do it at www.myetherwallet.com without downloading anything.
rosmawatiabraub
@rosmawatiabraub
I am new in learning Solidity.
ThisIsCodeXpert
@ThisIsCodeXpert
blocknodes
@blocknodes
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 ?
360Disrupt
@360disrupt
Hi, I'm working through the examples on the ethereum homepage but I have some questions regarding the crowd sale:
https://ethereum.stackexchange.com/questions/57669/ethereum-token-creation-crowdsale-example
I hope somebody has used the examples and can help, thx.