小编Alo*_*159的帖子

Warning: Function state mutability can be restricted to pure function

I am new to solidity and I have been trying to print out simple messages using functions in solidity, but I have failed to deploy successfully, and there is an error that I can not figure out what's wrong.

This is what I have tried so far:

 pragma solidity ^0.6.0;
    
    contract test {
        
        string public _feedback;
        
        function reply(string memory feedback) public
        {
           feedback = "Well done!";
        }
    }
Run Code Online (Sandbox Code Playgroud)

The error I am receiving is "Warning: Function state mutability can be …

ethereum solidity

19
推荐指数
1
解决办法
2万
查看次数

标签 统计

ethereum ×1

solidity ×1