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
piethein1628
@piethein1628
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?
eddie2024
@eddie2024
can someone send me some funds please on rinkeby: 0x6Ef4478444cEAd921fDCc409180f159b6FbfB98e
piethein1628
@piethein1628
@piethein1628 Fixed: relocated last two lines to end of contract
eddie2024
@eddie2024
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
@VERTlG0
@eddie2024 You're a coder?
I would think coders would know enough by now to use a paste bin service...
eddie2024
@eddie2024
I am many things. A solidity expert is not one of them. Duely noted on the pastebin though!
Pavel1991
@Pavel1991
Hello, tell me please at me at installation of a purse downloaded already 18 421 013 chain structure, it is normal?
sgalindop
@sgalindop
This message was deleted
wya93
@wya93
nimenhao
guys
angelsuarrez
@angelsuarrez
how i get my token in the list without entering my contract address in other all the time
REDEYEFILMS
@REDEYEFILMS
Hi there... Do u have staff that can help create our coin?
patch083
@patch083
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;
deepakdunitech
@deepakdunitech
hi
how to create token
robsuit
@robsuit
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
@alexvandesande
@robsuit are you using Mist or Remix? What compiler errors?
robsuit
@robsuit
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
@alexvandesande
Yes it has.
Do you see a URL bar in the top of your app?
robsuit
@robsuit
app or code?
Alex Van de Sande
@alexvandesande
Your app. Is it called Ethereum Wallet or Mist?
Also, what contract are you trying to deploy?
GK
@gktown
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?
robsuit
@robsuit
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
@alexvandesande
@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
robsuit
@robsuit
I got thanks so much!!!
GO ETH!!!
Alex Van de Sande
@alexvandesande
:D
jmelendez025
@jmelendez025
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];
        members.length--;
    }

    /**
     * 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
GK
@gktown
Is there a list of standard smart contracts?
I'm seeking one that continues until soldout
CodeJynx
@CodeJynx
Hello
GK
@gktown
Hey Code
CodeJynx
@CodeJynx
If i create a new token in Mist on the Test net, how can it be moved onto the main net?
Oh hi Garrett
GK
@gktown
You want to create a new token?
CodeJynx
@CodeJynx
yes