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
okay. any good repos to check out for inspiration?
its a truffle framework
Keno Leon
@CharmerHQ : Atom + parity/kovan is another route for testing.
When I add these two lines it cannot compile the source code // Notify anyone listening that this transfer took place
Transfer(msg.sender, _to, _value);
event Transfer does not give a problem, what should I correct here to make it work:

// This generates a public event on the blockchain that will notify clients
event Transfer(address indexed from, address indexed to, uint256 value);

// Notify anyone listening that this transfer took place

Transfer(msg.sender, _to, _value);

It seems the event transfer line already has all the information, is this correct? What issues will I run into if I leave out the 2 lines after event Transfer?
can someone send me some funds please on rinkeby: 0x6Ef4478444cEAd921fDCc409180f159b6FbfB98e
@piethein1628 Fixed: relocated last two lines to end of contract
I'm having some issues with this code, if anyone more knowledgeable could contribute thier 2 pence, it would be greatly appreciated:
  function validPurchase() internal constant returns (bool) {

    uint256 current = block.number;
    bool withinPeriod = current >= startBlock && current <= endBlock;
    bool nonZeroPurchase = msg.value != 0;
    bool withinCap = false;
    bool withinBonusThirtyCap = current <= thirtyPercentEnd && weiRaised.add(msg.value) <= bonusThirtyCap;
    bool withinBonusTwentyCap = current <= twentyPercentEnd && weiRaised.add(msg.value) <= bonusTwentyCap;
    bool withinBonusTenCap = current <= tenPercentEnd && weiRaised.add(msg.value) <= bonusTenCap;
    bool withinMaxCap = weiRaised.add(msg.value) <= cap;
    bool withinCap = (withinBonusThirtyCap || withinBonusTwentyCap||withinBonusTenCap|| withinMaxCap);
    if (current <= thirtyPercentEnd && weiRaised.add(msg.value) <= bonusThirtyCap){ 
      withinCap = true;
      } else if (current <= twentyPercentEnd && weiRaised.add(msg.value) <= sumTwenThirty){
      withinCap = true;
      } else if (current <= tenPercentEnd && weiRaised.add(msg.value) <= sumThiTwenTen){
      withinCap = true;
      } else if (current > tenPercentEnd && weiRaised.add(msg.value) <= cap){
      withinCap = true;
    }/* else { 
      withinCap = false;
      //return !withinCap;
//    bool withinCap = (withinBonusThirtyCap || withinBonusTwentyCap||withinBonusTenCap|| withinMaxCap);
    return withinPeriod && nonZeroPurchase && withinCap;  
other related code :
    blockShare = (endBlock - startBlock)/100;
    thirtyPercentEnd = (startBlock +(20 * blockShare));
    twentyPercentEnd = (thirtyPercentEnd +(20 * blockShare));
    tenPercentEnd = (twentyPercentEnd +(20 * blockShare));
    bonusThirtyCap = cap.div(5);
    bonusTwentyCap = cap.div(7);
    bonusTenCap = cap.div(10); 
    sumTwenThirty = (bonusTwentyCap + bonusThirtyCap);
    sumThiTwenTen = (bonusThirtyCap + bonusTwentyCap + bonusTenCap);
Vertigo Studios
@eddie2024 You're a coder?
I would think coders would know enough by now to use a paste bin service...
I am many things. A solidity expert is not one of them. Duely noted on the pastebin though!
Hello, tell me please at me at installation of a purse downloaded already 18 421 013 chain structure, it is normal?
This message was deleted
how i get my token in the list without entering my contract address in other all the time
Hi there... Do u have staff that can help create our coin?
Total noob question. Trying to run the MyToken tutorial code from website. Get an error Source file requires different compiler version (current compiler is 0.4.13+commit.0fb4cb1a.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0.4.16;
how to create token
Are Rinkeby Tesnets and regular ETH network running the same versions of ETH??
I copy and pasted a smart contract from regular eth to a testnet wallet and I am getting complier errors. Do I need to include compiler inside of smart contract code? It's a github gist .
shouldn't this smart contract already have a complier inside if it was already an active smart contract. I took the smartcontract code from Etherscan.io and pasted it into my testnet wallet running on metamask
and it won't work .
I can't deploy the contract
if anyoen could help that would be great. thanks
Alex Van de Sande
@robsuit are you using Mist or Remix? What compiler errors?
I'm a noob. Just cut and pasted right for etherscan into my wallet trying to deploy the contract. Did I need to use mist and Remix to compile first??
I thought the wallet had a complier
built in
Alex Van de Sande
Yes it has.
Do you see a URL bar in the top of your app?
app or code?
Alex Van de Sande
Your app. Is it called Ethereum Wallet or Mist?
Also, what contract are you trying to deploy?
Hey guys, I'm looking for a smart contract that can accept multiple erc20 tokens in crowdsale. Do you happen to know a resource I could use?
I'm using https://wallet.ethereum.org as UI for my metamask Rinkeby Testnet
This contract is for distributing funds to multiple wallets while also receiving funds from one wallet
meaning sending funds from 5 wallets and sending it to 1 - then that 1 wallet would distribute tokens back to those 5 wallets in a ratio that matches each wallets contributions
Alex Van de Sande
@robsuit if you are using Metamask then I recommend switching to remix.ethereum.org for contract deployment. The wallet fails in some more complex contracts
I got thanks so much!!!
Alex Van de Sande
Please Help. I am trying to implement the BlockChain Congress (https://www.ethereum.org/dao), but it seems that the contract has an error
pragma solidity ^0.4.16;

contract owned {
    address public owner;

    function owned() {
        owner = msg.sender;

    modifier onlyOwner {
        require(msg.sender == owner);

    function transferOwnership(address newOwner) onlyOwner {
        owner = newOwner;

contract tokenRecipient {
    event receivedEther(address sender, uint amount);
    event receivedTokens(address _from, uint256 _value, address _token, bytes _extraData);

    function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData){
        Token t = Token(_token);
        require(t.transferFrom(_from, this, _value));
        receivedTokens(_from, _value, _token, _extraData);

    function () payable {
        receivedEther(msg.sender, msg.value);

interface Token {
    function transferFrom(address _from, address _to, uint256 _value) returns (bool success);

    // Contract Variables and events
    uint public minimumQuorum;
    uint public debatingPeriodInMinutes;
    int public majorityMargin;
    Proposal[] public proposals;
    uint public numProposals;
    mapping (address => uint) public memberId;
    Member[] public members;

    event ProposalAdded(uint proposalID, address recipient, uint amount, string description);
    event Voted(uint proposalID, bool position, address voter, string justification);
    event ProposalTallied(uint proposalID, int result, uint quorum, bool active);
    event MembershipChanged(address member, bool isMember);
    event ChangeOfRules(uint newMinimumQuorum, uint newDebatingPeriodInMinutes, int newMajorityMargin);

    struct Proposal {
        address recipient;
        uint amount;
        string description;
        uint votingDeadline;
        bool executed;
        bool proposalPassed;
        uint numberOfVotes;
        int currentResult;
        bytes32 proposalHash;
        Vote[] votes;
        mapping (address => bool) voted;

    struct Member {
        address member;
        string name;
        uint memberSince;

    struct Vote {
        bool inSupport;
        address voter;
        string justification;

    // Modifier that allows only shareholders to vote and create new proposals
    modifier onlyMembers {
        require(memberId[msg.sender] != 0);

     * Constructor function
    function Congress (
        uint minimumQuorumForProposals,
        uint minutesForDebate,
        int marginOfVotesForMajority
    )  payable {
        changeVotingRules(minimumQuorumForProposals, minutesForDebate, marginOfVotesForMajority);
        // It’s necessary to add an empty first member
        addMember(0, "");
        // and let's add the founder, to save a step later
        addMember(owner, 'founder');

     * Add member
     * Make `targetMember` a member named `memberName`
     * @param targetMember ethereum address to be added
     * @param memberName public name for that member
    function addMember(address targetMember, string memberName) onlyOwner {
        uint id = memberId[targetMember];
        if (id == 0) {
            memberId[targetMember] = members.length;
            id = members.length++;

        members[id] = Member({member: targetMember, memberSince: now, name: memberName});
        MembershipChanged(targetMember, true);

     * Remove member
     * @notice Remove membership from `targetMember`
     * @param targetMember ethereum address to be removed
    function removeMember(address targetMember) onlyOwner {
        require(memberId[targetMember] != 0);

        for (uint i = memberId[targetMember]; i<members.length-1; i++){
            members[i] = members[i+1];
        delete members[members.length-1];

     * Change voting rules
     * Make so that proposals need tobe discussed for at least `minutesForDebate/60` hours,
     * have at least `minimumQuorumForProposals` votes, and have 50% + `marginOfVotes
Is there a list of standard smart contracts?