Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Alejandro Rodriguez Zavala
    @Fedman78 i suppose that you could test it in remix and see in the stats when you interacting with this contract
    @alexHope26 Thanks
    cedric walter
    @Fedman78 i personnaly use the mocha test reporter.... quite accurate add https://www.npmjs.com/package/eth-gas-reporter you can see how it would cost in ETH or Fiat to run some scenarios
    @cedricwalter thanks!
    Sundeep Kumar
    where can i find articles on new security vulnerabilities
    Ayush Gupta
    How to achieve the action of approving by a user from a function in another contract (Let's say B) rather than calling the function from the token contract itself (Let's say A)?
    Isn't there any other approach other than inheriting the token contract (A) by the other contract (B), since that's extending the byte code more than the size limit allowed.
    WAnt to develop a BlockChain Based Payments App. ANy suggestions?
    Achille NDTAMA
    @Lordcero : ExploitDB
    Hi all
    Sathish Varman
    Anyone here:
    1. Has links to tutorials OR
    2. Knows third party tools OR
    3. Knows companies OR
    4. Knows a friend OR
    5. You yourself
      can teach how to develop a software that is blockchain agnostic( software is compatible with various blockchains instead of being compatible with only one)? I tried searching the Net, but I could not find a single tutorial on this topic. The closest that I came across was this: https://www.youtube.com/watch?v=g-QK9tSo9_s. Thanks in advance.
    Achille NDTAMA
    who had the same problem as me in compiling the smart contract ballot locally? please need help.
    Hello here..
    Xiao Liang
    @NNAF98 Maybe you want to paste the source code here?
    Xiao Liang
    Hi there, anyone aware of any tool that can show which statement was covered by a transaction?
    This will help you to check which statements were covered
    Xiao Liang
    @balajipachai Thanks for your reply. I am aware of solidity-coverage. However, it's meant to generate coverage report for Truffle test cases, not a generic transaction...
    Damian Lluch

    Hi guys. I developed a SC with Solidity and I have a script that loads the blockchain with test data and when execute first time, It's ok, but when execute other times I get this message:

    VM Exception while processing transaction: revert.

    how can capture this error in try - catch and return my custom message for frontend?.


    this is my code:

    try {
    await deed.create(_serialNumber1, _manufacturer1, _owner1);
    await deed.create(_serialNumber2, _manufacturer2, _owner2);
    await deed.create(_serialNumber3, _manufacturer3, _owner3);
    await deed.create(_serialNumber4, _manufacturer4, _owner4);
    await deed.create(_serialNumber5, _manufacturer5, _owner5);
    await deed.create(_serialNumber6, _manufacturer6, _owner6);
    await deed.create(_serialNumber7, _manufacturer7, _owner7);
    } catch (error) {

    Newer ganache versions return the revert message
    Hi guys, if anyone know where could I find all of the open-source contracts/DAPP/DAO templates?
    Xiao Liang
    What kind of template are you looking for?
    @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
    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
    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
    Hi guys!
    Oluwafemi E. Akinde
    I got it working already, no worries. Thanks
    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

    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");
    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= new address payable;

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


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

    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

    oh no activity in this room
    Tamaghna Chowdhury

    Ethcode latest update

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



    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
    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.
    Abhishek Kumar

    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
    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
    can someone help us to audit a SC?
    1 reply
    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
    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
    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?
    hi anyone wanna help me on my project?
    Tamaghna Chowdhury
    Build your Ethereum dApp using Golang and React
    Howard Peng