Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Achille NDTAMA
    @NNAF98

    truffle(develop)> migrate
    Compiling .\contracts\HelloWorld.sol...
    Compiling .\contracts\Migrations.sol...

    /C/Users/NNAF98/repo/contracts/HelloWorld.sol:10:47: TypeError: Data location must be "memory" for return parameter in function, but none was given.
    function getGreeting() public view returns (string) {
    ^----^
    ,/C/Users/NNAF98/repo/contracts/HelloWorld.sol:13:24: TypeError: Data location must be "memory" for parameter in function, but none was given.
    function setGreeting(string _greeting) public {
    ^--------------^
    Compilation failed. See above. THOSE SOMEBODY CAN HELP ME TO SOLVE THIS ERROR??? THANK YOU...

    Alejandro Rodriguez Zavala
    @alexHope26
    Hi @NNAF98 you need chance in the methods
    string by string memory
    function getGreeting() public view returns (string memory) {
    return greeting;
    }
    function setGreeting(string memory _greeting) public {
    greeting = _greeting;
    }
    because you have storage var, and you need work with memory var
    Achille NDTAMA
    @NNAF98
    @alexHope26 thank you much
    Thank you very much, you really take me off a big thorn, I can now continue my training @alexHope26
    Alejandro Rodriguez Zavala
    @alexHope26
    Great !! Good luck!! @NNAF98
    Achille NDTAMA
    @NNAF98
    Thank you•√√
    Ayush Gupta
    @ayushgupta0610
    I'm facing a problem of deploying my smart contract on Remix. When I try to deploy the contract, for some reason the library that my main smart contract uses gets deployed instead of the smart contract. I make sure that the main contract is selected in the drop down as well. Has anyone faced a similar issue?
    Ayush Gupta
    @ayushgupta0610
    How can we check if the input address is a contract address or a user wallet address in the smart contract?
    Fed
    @Fedman78
    Hi guys, How can i calculate the cost of interacting with a smart contract? is theer any tool calculator online?
    Alejandro Rodriguez Zavala
    @alexHope26
    @Fedman78 i suppose that you could test it in remix and see in the stats when you interacting with this contract
    Fed
    @Fedman78
    @alexHope26 Thanks
    cedric walter
    @cedricwalter
    @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
    Fed
    @Fedman78
    @cedricwalter thanks!
    Sundeep Kumar
    @next2sundeep
    where can i find articles on new security vulnerabilities
    Ayush Gupta
    @ayushgupta0610
    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.
    k243
    @k243
    WAnt to develop a BlockChain Based Payments App. ANy suggestions?
    Achille NDTAMA
    @NNAF98
    @Lordcero : ExploitDB
    Srinivas
    @Sriniva63328880_twitter
    Hi all
    Sathish Varman
    @sathish060799
    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
    @NNAF98
    image.png
    who had the same problem as me in compiling the smart contract ballot locally? please need help.
    Hello here..
    Xiao Liang
    @yxliang01
    @NNAF98 Maybe you want to paste the source code here?
    Xiao Liang
    @yxliang01
    Hi there, anyone aware of any tool that can show which statement was covered by a transaction?
    Balaji Pachai
    @balajipachai
    @yxliang01
    This will help you to check which statements were covered
    https://www.npmjs.com/package/solidity-coverage
    Xiao Liang
    @yxliang01
    @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...
    damianlluch
    @damianlluch

    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?.

    thanks!

    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) {
    console.log("Error");
    console.log(error.message);
    }

    fredlacs
    @fredlacs
    Newer ganache versions return the revert message
    scarlettouyang
    @scarlettouyang
    Hi guys, if anyone know where could I find all of the open-source contracts/DAPP/DAO templates?
    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
    wahab86
    @wahab86
    @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