mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Add the Tenderly provider at set-bre task
This commit is contained in:
parent
588a0c8da0
commit
d2739e3a9c
|
@ -6,9 +6,12 @@ import {setDRE} from '../../helpers/misc-utils';
|
|||
task(`set-DRE`, `Inits the DRE, to have access to all the plugins' objects`).setAction(
|
||||
async (_, _DRE) => {
|
||||
setDRE(_DRE);
|
||||
const provider = new _DRE.ethers.providers.Web3Provider(_DRE.tenderlyRPC as ExternalProvider);
|
||||
//Set the ethers provider to the one we initialized so it targets the correct backend
|
||||
_DRE.ethers.provider = provider;
|
||||
const network = _DRE.network.name;
|
||||
if (network.includes('tenderly')) {
|
||||
const provider = new _DRE.ethers.providers.Web3Provider(_DRE.tenderlyRPC as any);
|
||||
//Set the ethers provider to the one we initialized so it targets the correct backend
|
||||
_DRE.ethers.provider = provider;
|
||||
}
|
||||
return _DRE;
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue
Block a user