Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Jean Cvllr
    @CJ42
    Hello is there any way or workaround to resize memory arrays inside a function in Solidity?
    git-bia19
    @git-bia19
    hii
    Oort Cloud
    @firevenus
    hi
    Edson Tégila
    @tegila
    hi
    Felix H. C. Maduakor
    @fmaduakor
    Which compiler version are working with ethdiddle?
    0.7.1 is loading without any result
    Technologist
    @B_Blockchain_twitter
    Can you do things like check code instead of compile? More like make it a simulator?
    Blake Watkins
    @blkwtkns
    hi there, I just copied/pasted a contract into the fiddle, and I'm getting errors where emit is being used, anyone happen to know why this might be?
    shoot nvm this chat is dead
    blockchain developer
    @superronaldo
    Hi
    when I verify the contract on ethereum, how can I replace openzepplin...?
    OG NA$A
    @og_nasa_twitter
    ayo
    sup nerds
    is this supposed to be better than other ethereum uis
    compared to remix and others i mean like
    Anthony Huang
    @anthonyhuanggr_twitter
    how can i get the return value but not depoly ?
    CosmosLera
    @CosmosLera
    ufogreys
    @ufogreys
    hello
    i need help to create smartcotnract on tro
    tron blockchain
    Nam Trần Thanh
    @nam05062000_gitlab
    I need help:
    Give me a valid 1 about the constructor of the Voting post with
    Plssssss

    pragma solidity >=0.4.22 <0.7.0;
    contract voting {
    struct Voter {
    uint weight;
    bool if_voted;
    address delegated_to;
    uint vote;
    }
    struct Proposal {
    bytes32 name;
    uint voteCount;
    }

    address public chairperson;
      mapping(address => Voter) public voters;
      Proposal[] public proposals;
      constructor(bytes32[] memory proposalNames) public {
        chairperson = msg.sender;
        voters[chairperson].weight = 1;
    
        for (uint i = 0; i < proposalNames.length; i++) {
            proposals.push(Proposal({
                name: proposalNames[i],
                voteCount: 0
            }));
        }
    }
    function giveRightToVote(address voter) public {
        require(
            msg.sender == chairperson,
            "Only the chairperson can assign voting rights."
        );
        require(
            !voters[voter].voted,
            "The voter has used their ballot."
        );
        require(voters[voter].weight == 0);
        voters[voter].weight = 1;
    }
    function delegate(address to) public {
        Voter storage sender = voters[msg.sender];
        require(!sender.voted, "You have already voted.");
    
        require(to != msg.sender, "You can’t delegate to yourself.");
    
        while (voters[to].delegate != address(0)) {
            to = voters[to].delegate;
            require(to != msg.sender, "Found loop in delegation!");
        }
       sender.voted = true;
        sender.delegate = to;
        Voter storage delegate_ = voters[to];
        if (delegate_.voted) {
            proposals[delegate_.vote].voteCount += sender.weight;
        } else {
            delegate_.weight += sender.weight;
        }
    }
    function vote(uint proposal) public {
        Voter storage sender = voters[msg.sender];
        require(sender.weight != 0, "Cannot vote");
        require(!sender.voted, "Has voted.");
        sender.voted = true;
        sender.vote = proposal;
        proposals[proposal].voteCount += sender.weight;
    }

    function winningProposal() public view
    returns (uint winningProposal)
    {
    uint winningVoteCount = 0;
    for (uint p = 0; p < proposals.length; p++) {
    if (proposals[p].voteCount > winningVoteCount) {
    winningVoteCount = proposals[p].voteCount;
    winningProposal
    = p;
    }
    }
    }

    function winnerName() public view
            returns (bytes32 winnerName_)
    {
        winnerName_ = proposals[winningProposal()].name;
    }

    }

    creation of Voting errored: Error encoding arguments: Error: types/values length mismatch (count={"types":1,"values":3}, value={"types":["bytes32[]"],"values":["",",",""]}, code=INVALID_ARGUMENT, version=abi/5.0.7)
    Aman Arora
    @blockchainDon_twitter
    Hi everyone, I need a support for writing the base contract( abstract) having crud operations, my other contracts will inherit from them to do those operations. My other contracts have various attributes in struct, I am not finding the way to come up with this abstract contract like how it will handle those attributes of struct, can you suggest some sources or sample codes which can be similar to what i am trying to solve? Thanks
    Digital World Travel Chain
    @DigitalWorldTr4_twitter
    hi
    is anyone there
    @blockchainDon_twitter hi
    Nasir Malik
    @realNasirMalik
    Hello, World!
    umeshd108
    @umeshd108
    Hi All
    MillonetisBTC
    @MillonetisBTC
    hi someone help me out with a bzX flashloan?
    i'm having some issues compiling the code
    MillonetisBTC
    @MillonetisBTC
    someone could help me out?
    JimmyCasini
    @JimmyCasini
    hola muy buenas noches, alguien me puede ayudar hacer un airdrop autoclaim para mi token erc20
    hello very good evening, can someone help me make an autoclaim airdrop for my erc20 token
    Binh Nguyen
    @gkmbinh_gitlab
    hi,
    Tomi Toivio
    @TomiToivio
    Hello!
    Hiển Lê
    @hienlh
    When this tool support for Sol ^0.8
    yamnaiftikhar
    @yamnaiftikhar
    i have a file in IPFS that store my data now i want to use that data in solidity (data may be integer numbers) to calculate average. Can anyone tell me how to do this??
    hogeman-hoges
    @hogeman-hoges
    Is it just me or do literally no compilers work except 4.1.18?
    musta7188
    @musta7188
    How I can get the bytecode>?
    DrFreeman86
    @DrFreeman86
    @yamnaiftikhar. Yes u can if its an ipfs, get ur complete domain address like hhpt://ipsf.json etc copy it and above the contract u want to start it in start a new line // import ./you domain address
    Add msg.sender==code manager as well to asure controllers
    Senior Web Developer
    @KangDo96
    Hi all
    I am a beginner in Blockchain technical.
    who can guide me to became me as a Blockchain developer?
    Harry Moreno
    @morenoh149
    Looks like this project has been abandoned. remix ide is still good.
    mhmdProgrammer
    @mhmdProgrammer
    hi who can help me at tellgram
    which ide are a good for solidity
    say