hardhat-deploy
Advanced tools
Comparing version
@@ -1005,10 +1005,15 @@ "use strict"; | ||
const latestBlock = await this.network.provider.send('eth_getBlockByNumber', ['latest', false]); | ||
const snapshot = await this.network.provider.send('evm_snapshot', []); | ||
this.db.pastFixtures[key] = { | ||
index: ++this.db.snapshotCounter, | ||
snapshot, | ||
data, | ||
blockHash: latestBlock.hash, | ||
deployments: Object.assign({}, this.db.deployments), | ||
}; | ||
try { | ||
const snapshot = await this.network.provider.send('evm_snapshot', []); | ||
this.db.pastFixtures[key] = { | ||
index: ++this.db.snapshotCounter, | ||
snapshot, | ||
data, | ||
blockHash: latestBlock.hash, | ||
deployments: Object.assign({}, this.db.deployments), | ||
}; | ||
} | ||
catch (err) { | ||
log(`failed to create snapshot`); | ||
} | ||
} | ||
@@ -1023,5 +1028,12 @@ async revertSnapshot(saved) { | ||
} | ||
const success = await this.network.provider.send('evm_revert', [ | ||
saved.snapshot, | ||
]); | ||
let success; | ||
try { | ||
success = await this.network.provider.send('evm_revert', [ | ||
saved.snapshot, | ||
]); | ||
} | ||
catch (_a) { | ||
log(`failed to revert to snapshot`); | ||
success = false; | ||
} | ||
if (success) { | ||
@@ -1028,0 +1040,0 @@ const blockRetrieved = await this.network.provider.send('eth_getBlockByHash', [saved.blockHash, false]); |
{ | ||
"name": "hardhat-deploy", | ||
"version": "0.11.13", | ||
"version": "0.11.14", | ||
"description": "Hardhat Plugin For Replicable Deployments And Tests", | ||
@@ -5,0 +5,0 @@ "repository": "github:wighawag/hardhat-deploy", |
@@ -1418,10 +1418,14 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
); | ||
const snapshot = await this.network.provider.send('evm_snapshot', []); | ||
this.db.pastFixtures[key] = { | ||
index: ++this.db.snapshotCounter, | ||
snapshot, | ||
data, | ||
blockHash: latestBlock.hash, | ||
deployments: {...this.db.deployments}, | ||
}; | ||
try { | ||
const snapshot = await this.network.provider.send('evm_snapshot', []); | ||
this.db.pastFixtures[key] = { | ||
index: ++this.db.snapshotCounter, | ||
snapshot, | ||
data, | ||
blockHash: latestBlock.hash, | ||
deployments: {...this.db.deployments}, | ||
}; | ||
} catch (err) { | ||
log(`failed to create snapshot`); | ||
} | ||
} | ||
@@ -1442,5 +1446,11 @@ | ||
} | ||
const success = await this.network.provider.send('evm_revert', [ | ||
saved.snapshot, | ||
]); | ||
let success; | ||
try { | ||
success = await this.network.provider.send('evm_revert', [ | ||
saved.snapshot, | ||
]); | ||
} catch { | ||
log(`failed to revert to snapshot`); | ||
success = false; | ||
} | ||
if (success) { | ||
@@ -1447,0 +1457,0 @@ const blockRetrieved = await this.network.provider.send( |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
12377806
0.01%168291
0.01%