Skip to content

Commit

Permalink
fix: adjust time to account for tenderly lag (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
sakulstra authored Jan 12, 2024
1 parent 67bcb01 commit 9f748f8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/govv3/generateProposalReport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ export async function generateProposalReport({
report += '\n';

const ipfsMeta = await getCachedIpfs(proposal.ipfsHash);
console.log(ipfsMeta);
report += `### Ipfs
<details>
Expand Down
4 changes: 3 additions & 1 deletion src/govv3/payloadsController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ export const getPayloadsController = (address: Hex, publicClient: PublicClient):
[getSolidityStorageSlotUint(SLOTS.PAYLOADS_MAPPING, BigInt(id))]: encodePacked(
['uint40', 'uint40', 'uint8', 'uint8', 'address'],
[
Number(currentBlock.timestamp - BigInt(payload.delay) - 1n), // altering queued time so can be executed in current block
// we substract 240n(4min), as tenderly might have been fallen behind
// therefore using block_number -1 (latest on tenderly) and a 4min margin should give a save margin
Number(currentBlock.timestamp - BigInt(payload.delay) - 1n - 240n), // altering queued time so can be executed in current block
payload.createdAt,
PayloadState.Queued,
payload.maximumAccessLevelRequired,
Expand Down
1 change: 0 additions & 1 deletion src/govv3/simulate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export async function simulateProposal(governanceAddress: Hex, publicClient: Pub
publicClient: publicClient,
})
);
return;
const payloads: {
payload: Awaited<ReturnType<PayloadsController['getPayload']>>;
simulation: TenderlySimulationResponse;
Expand Down

0 comments on commit 9f748f8

Please sign in to comment.