web3.js icon indicating copy to clipboard operation
web3.js copied to clipboard

Default account is not implemented in .call method

Open avkos opened this issue 3 years ago • 2 comments

Methods to fix: eth.call() contract.methods?.someMethod().call();

after fixing uncomment tests here packages/web3-eth/test/integration/defaults.test.ts

Expected behavior

eth.call() should send request with from = defaultAccount contract.methods?.someMethod().call(); should send request with from = defaultAccount

Actual behavior

eth.call() should send request with from = undefined contract.methods?.someMethod().call(); should send request with from = undefined

Steps to reproduce the behavior

  1. For the test you can use MsgSender.sol
  2. set default account to contract
    contract.setConfig({
                defaultAccount: accounts[0],
     });
  1. send a request for a contract
 const res = await contractMsgFrom.methods?.from().call();
  1. res should be defaultAccount

avkos avatar Jun 09 '22 04:06 avkos

Check this with 1.x, if its adding default account for eth_call

jdevcs avatar Jun 16 '22 18:06 jdevcs

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.

github-actions[bot] avatar Aug 16 '22 00:08 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.

github-actions[bot] avatar Oct 30 '22 00:10 github-actions[bot]