Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Xiao Liang
    @yxliang01
    What kind of template are you looking for?
    scarlettouyang
    @scarlettouyang
    @yxliang01 No limits! I just want to learn until now, how many well VERIFIED open-source contracts/DAPP/DAO templates that fresh can straightly imitates are developed and released? just like ERC20?
    Oluwafemi E. Akinde
    @SirPhemmiey
    Hello guys. I need some help please
    contract Test {
    function getKeccak256(string memory email) public pure returns (uint256) {
    return uint256(keccak256(email));
    }
    function mint(string memory email) public view returns (uint256) {
    uint256 v = getKeccak256(email);
    return v;
    }
    }
    This is what i want to achieve: I want to mint a uint of the email in the mint().
    So i thought of using the keccak256 function to get the equivalent in the uint by using type casting (because keccak256 returns bytes)
    Oluwafemi E. Akinde
    @SirPhemmiey
    So the challenge here is that the line return uint256(keccak256(email)); is giving a conversion error
    I basically want to mint an integer based on the email of the user
    Oluwafemi E. Akinde
    @SirPhemmiey
    Hi guys!
    Oluwafemi E. Akinde
    @SirPhemmiey
    I got it working already, no worries. Thanks
    AbdulWahab
    @AbdulWahab222
    @wahab86
    hello brothers i need your help...
    i tried my best to learn the concept of mapping in solidity but i did not understand..... kindly explain it to me
    Gaurav Nayyar
    @Nayyar525

    Hi Guys,

    can any one let me know how to call constructor from the test SC while unit testing.

    my smart contract is this ......

    pragma solidity >=0.4.25 <0.6.0;

    contract Lottery
    {
    address public manager;

    address payable[] public player;
    
     constructor (address manager1) public{
        manager = manager1;
    }
    function addPlayer() public payable
    {
        require(manager!= msg.sender, "player and manager can't be same");
    
        player.push(msg.sender);
    }
    
    function getAllPlayer() public view returns ( address payable[] memory) {
        return player;
    }
    
    function random() private view returns(uint256)
     {
    return  uint256( keccak256(abi.encodePacked(block.difficulty, block.timestamp, player)));
    }
    
    
    function pickWinner() public restrited ()
    {
    uint256 index=  random() % player.length;

    player[index].transfer(address(this).balance);

    player= new address payable;

    }
    
    modifier restrited()
    {
        require(msg.sender==manager, "winner only be picked by manager");
        _;
    }

    }

    Devon Wesley
    @devonwesley
    Well you could just check if the manager var on the contract instance is what you expect. @Nayyar525
    Devon Wesley
    @devonwesley
    Any good meetups around Solidity happening in the bay area(San Fransisco, CA) these days?
    Tamaghna Chowdhury
    @iamtamaghna

    ETHcode - Smart contract development plugin for VScode

    Compile Solidity and Vyper smart contracts and 1 click Deploy.

    “Ethcode v0.0.9 — Beginning the `20s” https://medium.com/quanta-network/ethcode-v0-0-9-beginning-the-20s-7be98a0b2a01

    Bancambios.com
    @bancambios_twitter
    oh no activity in this room
    Tamaghna Chowdhury
    @iamtamaghna

    Ethcode latest update

    Now you can debug any transaction of Ethereum network (including main and test networks)

    https://link.medium.com/aoNJledtr4

    abuaesh
    @abuaesh

    Hi everyone, I also had the same exact error. I was able to solve it by changing the mnemonic in my truffle-config.js to match the mnemonic given by Ganache CLI.

    This is what I used to get when I run npm test

    ` > blockchain-day1@1.0.0 test C:\Users\Noha Abuaesh\Desktop\BCND-C6-Exercises

    truffle test test/ExerciseC6A.js

    Compiling .\contracts\ExerciseC6A.sol...
    Compiling .\contracts\Migrations.sol...
    sender doesn't have enough funds to send tx. The upfront cost is: 672197500000000000 and the sender's account only has: 0
    npm ERR! Test failed. See above for more details. `

    Because each time I run Ganache, the mnemonic changes. but I always forget to change it in the config file to access the funds in the correct account

    Rahul Singh
    @26rahulsingh
    Hello guys, I'm working in a use case where a have to send some encrypted transaction from user A to user B. so that only user B can see decrypting data by using his private key, but the thing is I don't want to save users private key on sever.
    could anyone can help me with this.
    thanks
    Abhishek Kumar
    @kuabhish

    Hello everyone,
    I have a contract which create erc20 token(contract A), and it is deployed.
    Can I deploy another contract (contract B) which can use that custom token for transaction?

    Or deploying both contract together is the only solution?
    Like inherting contract..

    But if I deploy both contract together,
    then let's say if I want to change (contract B) I will have to deploy the contract A again. I don't think I should mint tokens again and again. Right?

    Emanuel Castillo
    @emacaz
    Hey guys
    I got another doubt. Is there already some smartcontract which I can know the ethereum price in dollar? I mean, I want to pay a specific amount of dollars (i.e. US 500) in MEW, but I want that when I to go to pay it, The smartcontract says to the environment how many ethers should send that referee those US500.
    1 reply
    Bancambios.com
    @bancambios_twitter
    can someone help us to audit a SC?
    1 reply
    Billy
    @orbro
    Hey all! Please join the new ConsenSys Discord server if you want to chat smart contract best practices with the ConsenSys team & community! https://discord.gg/Ve9sQAX
    Rattle
    @Rattle99__twitter
    anyone know how to get truffle to work with compiler 0.6.0 and above?
    can't seem to use the receive() method as of now
    smail.Gueddou
    @Gueddou
    Hey all
    When I attempt to run tests on my machine via truffle test, the console hangs, then the terminal prompt reappears:
    I do not receive any output or errors. This also occurs with truffle deploy and truffle compile.
    Does anyone know what the issue is?
    Jay
    @jayrajput02
    hi anyone wanna help me on my project?
    Tamaghna Chowdhury
    @iamtamaghna
    Build your Ethereum dApp using Golang and React
    https://link.medium.com/qkNw1v1fb9
    Howard Peng
    @howardpen9
    image.png
    Hello, what is here's mean "rate limiting" in practice?
    Stefan Duprey
    @stefanduprey_twitter
    dear all, i have an old smart contract which i compiled and deployed using Truffle in 2018 using open-zeppelin. i want to verify and publish the code now. i have all the truffle generated artefacts. but i can't seem to manage to recompile the same byte code. i have used truffle flattener, remix and so on with the same compiler. but the bytecode is always different
    Stefan Duprey
    @stefanduprey_twitter
    any help very much appreciated, i can share the reop
    Stefan Duprey
    @stefanduprey_twitter
    @stefanduprey_twitter
    dear all, i have an old smart contract which i compiled and deployed using Truffle in 2018 using open-zeppelin. i want to verify and publish the code now. i have all the truffle generated artefacts. but i can't seem to manage to recompile the same byte code.
    i managed to get the byte code almost identical up to the last few bytes
    but those differ
    is it possible that i won't manage to reproduce the exact same byte code ?
    Charles Marino
    @charlesmarino
    Probably a different compiler
    Damian Lluch
    @damianlluch

    Hi, I have a question about which contract to inherit with regard to roles.
    My contract is an ERC721, (buy-sell). There is the token owner, the bidder and the contract administrator.
    Having this scenario, should I inherit from AccessControlUpgradeable or can I just use OwnableUpgradeable?

    Thank you very much

    Ânderson Q.
    @42piratas
    Hey, there! 👋🏽 I work at the AKASHA Foundation, and I'd like to invite you to participate in a quick survey. We need feedback from developers to fine-tune our framework and the end-to-end development experience. We will use Zoom for chatting with you, and it wouldn't take more than 45 minutes. So, if you're a developer working on Ethereum-related projects and you're willing to help, please sign up using the following link: https://calendly.com/akasha-eth/dev-user-research We appreciate the help! 🙏🏽🤗
    KhimairaCrypto
    @KhimairaCrypto
    Hi, I would like to deploy an NFT contract on Ganache, but I am not sure if there are some tools that allow me to visualise my minted NFT. I usually deploy them on ropsten and use opensea the visualise them.
    Tooms
    @ScuzzyHoulihan
    Anyone have documentation on smart contract syntax?
    Ecchirin
    @Ecchirin
    Currently contracts are accepting ETH as the native payment for contracts.
    Is there a way / example to force payments in USDT or any other ERC20 tokens instead?