Skip to content

Commit

Permalink
fix: update test
Browse files Browse the repository at this point in the history
  • Loading branch information
sakulstra committed Nov 19, 2024
1 parent 4acedff commit 89a3b97
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/govv3/__snapshots__/generatePayloadReport.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ unknown contract name at \`0x9d53CeFcd5fbeb850B053a23Ec6F59eb3Dc76E33\`
+ "0x5277a0a374a2530b7c07818355e3f7fb438196e1c8b1353925e712542064af9e"
\`\`\`
FiatTokenProxy (USDC) at \`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\`[:ghost:](https://github.com/bgd-labs/aave-address-book "AaveV2Ethereum.ASSETS.USDC.UNDERLYING, AaveV2EthereumAMM.ASSETS.USDC.UNDERLYING, AaveV2EthereumArc.ASSETS.USDC.UNDERLYING, AaveV3Ethereum.ASSETS.USDC.UNDERLYING, AaveV3Ethereum.E_MODES.2.borrowableAssets[0], AaveV3EthereumEtherFi.ASSETS.USDC.UNDERLYING, AaveV3EthereumLido.ASSETS.USDC.UNDERLYING, AaveV3EthereumLido.E_MODES.4.borrowableAssets[1]") with implementation FiatTokenV2_2 at \`0x43506849D7C04F9138D1A2050bbF3A0c054402dd\`
FiatTokenProxy (USDC) at \`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\`[:ghost:](https://github.com/bgd-labs/aave-address-book "AaveV2Ethereum.ASSETS.USDC.UNDERLYING, AaveV2EthereumAMM.ASSETS.USDC.UNDERLYING, AaveV2EthereumArc.ASSETS.USDC.UNDERLYING, AaveV3Ethereum.ASSETS.USDC.UNDERLYING, AaveV3EthereumEtherFi.ASSETS.USDC.UNDERLYING, AaveV3EthereumLido.ASSETS.USDC.UNDERLYING") with implementation FiatTokenV2_2 at \`0x43506849D7C04F9138D1A2050bbF3A0c054402dd\`
\`\`\`diff
@@ Slot \`0x368c3f5f03e5634b3e4381c9c3caac98f4d254c7027fd14b53436c90d060fef4\` @@
- "0x000000000000000000000000000000000000000000000000000038207ce5ee96"
Expand Down Expand Up @@ -599,7 +599,7 @@ TetherToken (Tether) at \`0xdAC17F958D2ee523a2206206994597C13D831ec7\`[:ghost:](
- \`Mint(from: 0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c, value: 1,649.8577 [1649857765, 6 decimals], index: 1.1259 [1125991030272021514250652312, 27 decimals])\`
- \`Transfer(from: 0x5300a1a15135ea4dc7ad5a167152c01efc9b192a, to: 0x0000000000000000000000000000000000000000, value: 1,786,110.7389 [1786110738937, 6 decimals])\`
- \`Burn(from: 0x5300a1a15135ea4dc7ad5a167152c01efc9b192a, target: 0x5300a1a15135ea4dc7ad5a167152c01efc9b192a, value: 1,786,110.7389 [1786110738937, 6 decimals], index: 1.1259 [1125991030272021514250652312, 27 decimals])\`
- FiatTokenProxy (USDC) at \`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\`[:ghost:](https://github.com/bgd-labs/aave-address-book "AaveV2Ethereum.ASSETS.USDC.UNDERLYING, AaveV2EthereumAMM.ASSETS.USDC.UNDERLYING, AaveV2EthereumArc.ASSETS.USDC.UNDERLYING, AaveV3Ethereum.ASSETS.USDC.UNDERLYING, AaveV3Ethereum.E_MODES.2.borrowableAssets[0], AaveV3EthereumEtherFi.ASSETS.USDC.UNDERLYING, AaveV3EthereumLido.ASSETS.USDC.UNDERLYING, AaveV3EthereumLido.E_MODES.4.borrowableAssets[1]") with implementation FiatTokenV2_2 at \`0x43506849D7C04F9138D1A2050bbF3A0c054402dd\`
- FiatTokenProxy (USDC) at \`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\`[:ghost:](https://github.com/bgd-labs/aave-address-book "AaveV2Ethereum.ASSETS.USDC.UNDERLYING, AaveV2EthereumAMM.ASSETS.USDC.UNDERLYING, AaveV2EthereumArc.ASSETS.USDC.UNDERLYING, AaveV3Ethereum.ASSETS.USDC.UNDERLYING, AaveV3EthereumEtherFi.ASSETS.USDC.UNDERLYING, AaveV3EthereumLido.ASSETS.USDC.UNDERLYING") with implementation FiatTokenV2_2 at \`0x43506849D7C04F9138D1A2050bbF3A0c054402dd\`
- \`Transfer(from: 0xbcca60bb61934080951369a648fb03df4f96263c, to: 0x5300a1a15135ea4dc7ad5a167152c01efc9b192a, value: 1,786,110.7389 [1786110738937, 6 decimals])\`
- \`Transfer(from: 0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c, to: 0x5300a1a15135ea4dc7ad5a167152c01efc9b192a, value: 1,700,000 [1700000000000, 6 decimals])\`
- \`Transfer(from: 0x5300a1a15135ea4dc7ad5a167152c01efc9b192a, to: 0x3ea64b1c0194524b48f9118462c8e9cd61a243c7, value: 1,000,000 [1000000000000, 6 decimals])\`
Expand Down Expand Up @@ -669,7 +669,7 @@ TetherToken (Tether) at \`0xdAC17F958D2ee523a2206206994597C13D831ec7\`[:ghost:](
- 0x1f57cc62113c3a6346882dcf3ed49120411ac2d2: Contract (verified) (VariableDebtToken)
- 0xe4922afab0bbadd8ab2a88e0c79d884ad337fca6: Contract (verified) (InitializableImmutableAdminUpgradeabilityProxy)
- 0x8dff7fda82976452b6fb957f549944e7af7a3e6f: Contract (not verified)
- 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48: Contract (verified) (FiatTokenProxy) [:ghost:](https://github.com/bgd-labs/aave-address-book "AaveV2Ethereum.ASSETS.USDC.UNDERLYING, AaveV2EthereumAMM.ASSETS.USDC.UNDERLYING, AaveV2EthereumArc.ASSETS.USDC.UNDERLYING, AaveV3Ethereum.ASSETS.USDC.UNDERLYING, AaveV3Ethereum.E_MODES.2.borrowableAssets[0], AaveV3EthereumEtherFi.ASSETS.USDC.UNDERLYING, AaveV3EthereumLido.ASSETS.USDC.UNDERLYING, AaveV3EthereumLido.E_MODES.4.borrowableAssets[1]")
- 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48: Contract (verified) (FiatTokenProxy) [:ghost:](https://github.com/bgd-labs/aave-address-book "AaveV2Ethereum.ASSETS.USDC.UNDERLYING, AaveV2EthereumAMM.ASSETS.USDC.UNDERLYING, AaveV2EthereumArc.ASSETS.USDC.UNDERLYING, AaveV3Ethereum.ASSETS.USDC.UNDERLYING, AaveV3EthereumEtherFi.ASSETS.USDC.UNDERLYING, AaveV3EthereumLido.ASSETS.USDC.UNDERLYING")
- 0x43506849d7c04f9138d1a2050bbf3a0c054402dd: Contract (verified) (FiatTokenV2_2)
- 0xb72f23ade9b9980c2e731ca504105fc860643619: Contract (not verified)
- 0x8a32f49ffba88aba6eff96f45d8bd1d4b3f35c7d: Contract (verified) (LendingRateOracle) [:ghost:](https://github.com/bgd-labs/aave-address-book "AaveV2Ethereum.LENDING_RATE_ORACLE, AaveV2EthereumAMM.LENDING_RATE_ORACLE")
Expand Down Expand Up @@ -722,7 +722,7 @@ TetherToken (Tether) at \`0xdAC17F958D2ee523a2206206994597C13D831ec7\`[:ghost:](
- [0xf5543cdd5f551635e13ebe07e47d01d0fc9cbbd5](https://etherscan.io/address/0xf5543cdd5f551635e13ebe07e47d01d0fc9cbbd5): Contract (with DELEGATECALL)
- [0x619beb58998ed2278e08620f97007e1116d5d25b](https://etherscan.io/address/0x619beb58998ed2278e08620f97007e1116d5d25b): Contract (with DELEGATECALL)[:ghost:](https://github.com/bgd-labs/aave-address-book "AaveV2Ethereum.ASSETS.USDC.V_TOKEN")
- [0xe4922afab0bbadd8ab2a88e0c79d884ad337fca6](https://etherscan.io/address/0xe4922afab0bbadd8ab2a88e0c79d884ad337fca6): Contract (with DELEGATECALL)
- [0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48](https://etherscan.io/address/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48): Contract (with DELEGATECALL)[:ghost:](https://github.com/bgd-labs/aave-address-book "AaveV2Ethereum.ASSETS.USDC.UNDERLYING, AaveV2EthereumAMM.ASSETS.USDC.UNDERLYING, AaveV2EthereumArc.ASSETS.USDC.UNDERLYING, AaveV3Ethereum.ASSETS.USDC.UNDERLYING, AaveV3Ethereum.E_MODES.2.borrowableAssets[0], AaveV3EthereumEtherFi.ASSETS.USDC.UNDERLYING, AaveV3EthereumLido.ASSETS.USDC.UNDERLYING, AaveV3EthereumLido.E_MODES.4.borrowableAssets[1]")
- [0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48](https://etherscan.io/address/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48): Contract (with DELEGATECALL)[:ghost:](https://github.com/bgd-labs/aave-address-book "AaveV2Ethereum.ASSETS.USDC.UNDERLYING, AaveV2EthereumAMM.ASSETS.USDC.UNDERLYING, AaveV2EthereumArc.ASSETS.USDC.UNDERLYING, AaveV3Ethereum.ASSETS.USDC.UNDERLYING, AaveV3EthereumEtherFi.ASSETS.USDC.UNDERLYING, AaveV3EthereumLido.ASSETS.USDC.UNDERLYING")
- [0x43506849d7c04f9138d1a2050bbf3a0c054402dd](https://etherscan.io/address/0x43506849d7c04f9138d1a2050bbf3a0c054402dd): Contract (with DELEGATECALL)
- [0x87870bca3f3fd6335c3f4ce8392d69350b4fa4e2](https://etherscan.io/address/0x87870bca3f3fd6335c3f4ce8392d69350b4fa4e2): Contract (with DELEGATECALL)[:ghost:](https://github.com/bgd-labs/aave-address-book "AaveV3Ethereum.POOL")
- [0x5faab9e1adbddad0a08734be8a52185fd6558e14](https://etherscan.io/address/0x5faab9e1adbddad0a08734be8a52185fd6558e14): Contract (with DELEGATECALL)
Expand Down
2 changes: 1 addition & 1 deletion src/govv3/checks/__snapshots__/state.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ unknown contract name at \`0x9d53CeFcd5fbeb850B053a23Ec6F59eb3Dc76E33\`
+ "0x5277a0a374a2530b7c07818355e3f7fb438196e1c8b1353925e712542064af9e"
\`\`\`
FiatTokenProxy (USDC) at \`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\`[:ghost:](https://github.com/bgd-labs/aave-address-book "AaveV2Ethereum.ASSETS.USDC.UNDERLYING, AaveV2EthereumAMM.ASSETS.USDC.UNDERLYING, AaveV2EthereumArc.ASSETS.USDC.UNDERLYING, AaveV3Ethereum.ASSETS.USDC.UNDERLYING, AaveV3Ethereum.E_MODES.2.borrowableAssets[0], AaveV3EthereumEtherFi.ASSETS.USDC.UNDERLYING, AaveV3EthereumLido.ASSETS.USDC.UNDERLYING, AaveV3EthereumLido.E_MODES.4.borrowableAssets[1]") with implementation FiatTokenV2_2 at \`0x43506849D7C04F9138D1A2050bbF3A0c054402dd\`
FiatTokenProxy (USDC) at \`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\`[:ghost:](https://github.com/bgd-labs/aave-address-book "AaveV2Ethereum.ASSETS.USDC.UNDERLYING, AaveV2EthereumAMM.ASSETS.USDC.UNDERLYING, AaveV2EthereumArc.ASSETS.USDC.UNDERLYING, AaveV3Ethereum.ASSETS.USDC.UNDERLYING, AaveV3EthereumEtherFi.ASSETS.USDC.UNDERLYING, AaveV3EthereumLido.ASSETS.USDC.UNDERLYING") with implementation FiatTokenV2_2 at \`0x43506849D7C04F9138D1A2050bbF3A0c054402dd\`
\`\`\`diff
@@ Slot \`0x368c3f5f03e5634b3e4381c9c3caac98f4d254c7027fd14b53436c90d060fef4\` @@
- "0x000000000000000000000000000000000000000000000000000038207ce5ee96"
Expand Down
2 changes: 1 addition & 1 deletion src/govv3/payloadsController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const getPayloadsController = (address: Hex, client: Client): PayloadsCon
[getSolidityStorageSlotUint(SLOTS.PAYLOADS_MAPPING, BigInt(id))]: encodePacked(
['uint40', 'uint40', 'uint8', 'uint8', 'address'],
[
// we substract 240n(4min), as tenderly might have been fallen behind
// we subtract 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,
Expand Down
6 changes: 5 additions & 1 deletion src/govv3/utils/checkAddress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ export function isKnownAddress(value: Address, chainId: number): string[] | void
// therefore we recreate the object via spread & remove addresses unrelated to the chain we are checking
const transformedAddresses = Object.keys(addresses).reduce(
(acc, key) => {
if ((addresses as any)[key].CHAIN_ID === chainId) acc[key] = {...(addresses as any)[key]};
if ((addresses as any)[key].CHAIN_ID === chainId) {
const chainAddresses = {...(addresses as any)[key]};
if (chainAddresses.E_MODES) delete chainAddresses.E_MODES;
acc[key] = chainAddresses;
}
return acc;
},
{} as {[key: string]: any},
Expand Down

0 comments on commit 89a3b97

Please sign in to comment.