I am using extend
on web3 to use the evm_unlockUnknownAccount
on ganache whit this snippet
const localWeb3 = new Web3(ganache.provider( {fork : web3ws.currentProvider} ));
localWeb3.extend({
methods: [{
name: 'unlockUnknownAccount',
call: 'evm_unlockUnknownAccount',
params: 1
}]
});
then I console log the localWeb3
and see the new method. When I tried to use the new method it returns a pending promise, so i added await
the issue is the evm_unlockUnknownAccount
doesn't return a value bool
.
const result = await localWeb3.unlockUnknownAccount(address)
console.log('unlock?', result) // stuck waiting long time
How do I do rpc call correctly with web3? or is there other easier way?