You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This discussion was converted from issue #2368 on December 04, 2021 20:20.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have this code in web3, i want to convert this to ethers.io
web3.extend({ methods: [{ name: 'callWithState', call: 'eth_call', params: 3, }] });
web3.callWithState({ to: '0x5bf62ec82af715ca7aa365634fab0e8fd7bf92c7', from: '0x8894e0a0c962cb723c1976a4421c95949be2d4e3', value: '0x'+val.toString(16), gas: '0x'+(45000000).toString(16), data: callData, }, 'latest', { '0x5bf62ec82af715ca7aa365634fab0e8fd7bf92c7': { 'code': bbCode, }, '0x8894e0a0c962cb723c1976a4421c95949be2d4e3': { 'balance': '0x'+(100000000000000000000).toString(16), } })
like this
let callPromise = provider.call({ to: '0x5bf62ec82af715ca7aa365634fab0e8fd7bf92c7', from: '0x8894e0a0c962cb723c1976a4421c95949be2d4e3', value: '0x' + val.toString(16), gas: '0x' + (45000000).toString(16), data: address, }, 'latest', { '0x5bf62ec82af715ca7aa365634fab0e8fd7bf92c7': { 'code': bbCode, }, '0x8894e0a0c962cb723c1976a4421c95949be2d4e3': { 'balance': '0x' + (100000000000000000000).toString(16), } });
But it seem provider.call only get 2 parameters only.
Please help me!
Beta Was this translation helpful? Give feedback.
All reactions