From the example code below
const foo = async () => {
const contract = new ethers.Contract('0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb', abi, provider);
const name = await contract.name()
const balance = await contract.balanceOf('0x5Af489c8786A018EC4814194dC8048be1007e390')
return { name, balance }
}
I also mock like this, but it only work at first call
mock({
blockchain: 'ethereum',
request: {
to: '0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb',
api,
method: 'name',
return: 'DePay',
},
})
mock({
blockchain: 'ethereum',
request: {
to: '0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb',
api,
method: 'balanceOf',
params: '0x5Af489c8786A018EC4814194dC8048be1007e390',
return: '1000',
},
})
Is it possible to mock request for two method call with same smart contract address at the same time?
From the example code below
I also mock like this, but it only work at first call
Is it possible to mock request for two method call with same smart contract address at the same time?