Skip to content

View modifier semantics #3

@bitbart

Description

@bitbart

Revise the semantics of TinySol so that functions declared as view cannot modify the state variables of the contract:

https://docs.soliditylang.org/en/latest/contracts.html#state-mutability

For example, in the contract:

contract C {
      uint x;
      function f() public view { x = 1; }
}

any call to f must revert, since it modifies the state variable x.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions