Skip to content

Add LoomProvider test for static calls #252

Description

@enlight

We've got tests for eth signed txs in https://github.com/loomnetwork/loom-js/blob/master/src/tests/e2e/client-test-tx-middleware.ts but we don't have any tests for static calls using foreign addresses.

Basically we need a version of the SimpleStore EVM contract that looks something like this:

contract SimpleStore {
  mapping(address => uint256) balances;

  function setBalance(uint256 _val) external {
    balances[msg.sender] = _val;
  }
  
  function getBalance() public view returns(uint256) {
    return balances[msg.sender];
  }
}

The test should then call setBalance followed by getBalance using the same caller (eth:0x...), and verify that the balance matches.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions