0

I'm a newbie in solidity coding, so please forgive me for my ignorance.

I'm trying to create a token based on openzeppline and while using the HasNoTokens.sol contract, I'm receiving the following warning in remix:

browser/mytoken.sol:446:3: Warning: Function state mutability can be restricted to pure. function tokenFallback(address from_, uint256 value_, bytes data_) external {^Spanning multiple lines.

I reckon I've to change the way tokenFallback() function behaves. I'd greatful if someone could explain what is wrong here and how to fix this.

1

It is just telling you that you can use the modifier pure which basically means it is a function that only uses and modifies its arguments, and not any other value from the state of the contract.

See this link

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.