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

Add LoomProvider test for static calls #252

Open
enlight opened this issue Mar 25, 2019 · 1 comment
Open

Add LoomProvider test for static calls #252

enlight opened this issue Mar 25, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@enlight
Copy link
Contributor

enlight commented Mar 25, 2019

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.

@eduardonunesp eduardonunesp added the enhancement New feature or request label Mar 25, 2019
@eduardonunesp
Copy link
Contributor

#311

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

No branches or pull requests

2 participants