makerdao / spells-mainnet

Staging repo for MakerDAO weekly executive spells
GNU Affero General Public License v3.0
123 stars 51 forks source link

Add cast on tenderly script #366

Closed SidestreamSweatyPumpkin closed 1 year ago

SidestreamSweatyPumpkin commented 1 year ago

Description

Transfer of code from https://github.com/makerdao/spells-goerli/pull/225 improvement

https://dashboard.tenderly.co/shared/fork/simulation/5d4f655a-2fb3-4780-9015-f3e6f7e32a7f

tested for spell 0xD97B4e0b43708c836935c9b2320f57074DC1D146 with the following diff on commit 548ad26c2bc47fba893e39cbe27153a9bce4c9ea:

git diff
diff --git a/scripts/cast-on-tenderly/index.js b/scripts/cast-on-tenderly/index.js
index 3152253..991acf8 100644
--- a/scripts/cast-on-tenderly/index.js
+++ b/scripts/cast-on-tenderly/index.js
@@ -23,7 +23,7 @@ const makeTenderlyApiRequest = async function (path) {
     const API_BASE = `https://api.tenderly.co/api/v1/account/${process.env.TENDERLY_USER}/project/${process.env.TENDERLY_PROJECT}`;
     return await axios.post(
         `${API_BASE}${path}`,
-        { network_id: NETWORK_ID },
+        { network_id: NETWORK_ID, block_number: 18142151 },
         { headers: { 'X-Access-Key': process.env.TENDERLY_ACCESS_KEY } }
     );
 };