Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calls to Cevmos contract don't update state #22

Closed
jbowen93 opened this issue Mar 1, 2022 · 1 comment
Closed

Calls to Cevmos contract don't update state #22

jbowen93 opened this issue Mar 1, 2022 · 1 comment
Assignees

Comments

@jbowen93
Copy link

jbowen93 commented Mar 1, 2022

contract Storage {

   uint256 number;

   /**
    * @dev Store value in variable
    * @param num value to store
    */
   function store(uint256 num) public {
       number = num;
   }

   /**
    * @dev Return value 
    * @return value of 'number'
    */
   function retrieve() public view returns (uint256){
       return number;
   }
}

When calling the above contract's store(uint256) method with cast call $ADDR "store(uint256)" "100" the calls returns 0x and doesn`t appear to update the underlying state.

Calls to retrieve with cast call $ADDR "retrieve()" always returns: 0x0000000000000000000000000000000000000000000000000000000000000000

@jbowen93 jbowen93 self-assigned this Mar 1, 2022
@jbowen93
Copy link
Author

jbowen93 commented Mar 4, 2022

I am an idiot and didn't understand the difference between cast call which doesn't publish a transaction and cast send which does.

cast send $CON_ADDR "store(uint256" 2 works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant