Skip to content

Commit

Permalink
fix: update packages (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
Argeare5 authored Mar 12, 2024
1 parent 5aa46f2 commit 4149057
Show file tree
Hide file tree
Showing 16 changed files with 381 additions and 155 deletions.
69 changes: 69 additions & 0 deletions cache/137/events/0xc8a2ADC4261c6b669CdFf69E717E77C9cFeB420d.json
Original file line number Diff line number Diff line change
Expand Up @@ -48630,5 +48630,74 @@
"blockHash": "0xe0ca43fdd12ed1aa43e387b5c41f9a080b765930d887e6a074429fd421bdbaaa",
"logIndex": 155,
"removed": false
},
{
"eventName": "VoteEmitted",
"args": {
"proposalId": "45",
"voter": "0x2bA0fCC894522DF700060a6015f7e96537B18412",
"support": true,
"votingPower": "1081294541310279037"
},
"address": "0xc8a2adc4261c6b669cdff69e717e77c9cfeb420d",
"topics": [
"0x0c611e7b6ae0de26f4772260e1bbdb5f58cbb7c275fe2de14671968d29add8d6",
"0x000000000000000000000000000000000000000000000000000000000000002d",
"0x0000000000000000000000002ba0fcc894522df700060a6015f7e96537b18412",
"0x0000000000000000000000000000000000000000000000000000000000000001"
],
"data": "0x0000000000000000000000000000000000000000000000000f0187a8085e3d7d",
"blockNumber": "54554804",
"transactionHash": "0x36be608032e720be9ef15ffe3159349f4dec59cdaa0d824935e5f7ebc2ccf675",
"transactionIndex": 33,
"blockHash": "0x3f46e6bc14ac01476ef1ad9bc56757840dc320f81acbdb6f5bf1e1fce15361dd",
"logIndex": 122,
"removed": false
},
{
"eventName": "VoteEmitted",
"args": {
"proposalId": "45",
"voter": "0x8bC8b4E4921101BcC56ec084b906069b73de7276",
"support": true,
"votingPower": "1156895816423751351"
},
"address": "0xc8a2adc4261c6b669cdff69e717e77c9cfeb420d",
"topics": [
"0x0c611e7b6ae0de26f4772260e1bbdb5f58cbb7c275fe2de14671968d29add8d6",
"0x000000000000000000000000000000000000000000000000000000000000002d",
"0x0000000000000000000000008bc8b4e4921101bcc56ec084b906069b73de7276",
"0x0000000000000000000000000000000000000000000000000000000000000001"
],
"data": "0x000000000000000000000000000000000000000000000000100e1e9d9412beb7",
"blockNumber": "54556108",
"transactionHash": "0x87ed3af4ccb2d5afc022970c2bf64661f2fc499c5c216f31551c4633d3139dbd",
"transactionIndex": 8,
"blockHash": "0xdf139ca0ae4c15f24131115516ae98312f376247dae858c0aa2a43368003e8a8",
"logIndex": 16,
"removed": false
},
{
"eventName": "VoteEmitted",
"args": {
"proposalId": "45",
"voter": "0x74a2E6A985B33454D39A0b333F51c3315CafC125",
"support": true,
"votingPower": "1025256899410228017"
},
"address": "0xc8a2adc4261c6b669cdff69e717e77c9cfeb420d",
"topics": [
"0x0c611e7b6ae0de26f4772260e1bbdb5f58cbb7c275fe2de14671968d29add8d6",
"0x000000000000000000000000000000000000000000000000000000000000002d",
"0x00000000000000000000000074a2e6a985b33454d39a0b333f51c3315cafc125",
"0x0000000000000000000000000000000000000000000000000000000000000001"
],
"data": "0x0000000000000000000000000000000000000000000000000e3a71b7ccdd7331",
"blockNumber": "54557809",
"transactionHash": "0xe6088683ae93a5a27b8f426c63b33d9131aa064cf8e799c60cb61ab57706403c",
"transactionIndex": 75,
"blockHash": "0x3f1d9ef21dfacbf6dc5aa4dfcfa70936d1127111f924f72f24d2192c7e9117c6",
"logIndex": 222,
"removed": false
}
]
24 changes: 12 additions & 12 deletions cache/bookKeeping/lastFetchedBlocks.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"1/governance": "19416278",
"1088/payloads": "15107842",
"56/payloads": "36893406",
"100/payloads": "32886688",
"8453/payloads": "11712158",
"10/payloads": "117307443",
"43114/payloads": "42788316",
"137/payloads": "54554637",
"1/payloads": "19416280",
"42161/payloads": "189491886",
"137/events": "54554616",
"1/governance": "19416892",
"1088/payloads": "15111844",
"56/payloads": "36895859",
"100/payloads": "32888080",
"8453/payloads": "11715855",
"10/payloads": "117311140",
"43114/payloads": "42791951",
"137/payloads": "54557970",
"1/payloads": "19416892",
"42161/payloads": "189520018",
"137/events": "54557970",
"5/governance": "10429988",
"5/payloads": "10429988",
"5/events": "10429988",
Expand All @@ -18,5 +18,5 @@
"11155111/events": "5149509",
"43113/payloads": "29512089",
"43113/events": "29512090",
"534352/payloads": "4054529"
"534352/payloads": "4056990"
}
2 changes: 1 addition & 1 deletion cache/ui/mainnet/proposals/proposal_43.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@
"hasRequiredRoots": true
},
"isFinished": false,
"lastUpdatedTimestamp": 1710213670
"lastUpdatedTimestamp": 1710221066
}
}
2 changes: 1 addition & 1 deletion cache/ui/mainnet/proposals/proposal_44.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,6 @@
"hasRequiredRoots": true
},
"isFinished": false,
"lastUpdatedTimestamp": 1710213670
"lastUpdatedTimestamp": 1710221066
}
}
4 changes: 2 additions & 2 deletions cache/ui/mainnet/proposals/proposal_45.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"votingChainId": 137,
"votingMachineData": {
"id": 45,
"forVotes": "494044469209385345559847",
"forVotes": "494047732656642489818252",
"againstVotes": "0",
"startTime": 1710063003,
"endTime": 1710322203,
Expand All @@ -79,6 +79,6 @@
"hasRequiredRoots": true
},
"isFinished": false,
"lastUpdatedTimestamp": 1710213670
"lastUpdatedTimestamp": 1710221066
}
}
2 changes: 1 addition & 1 deletion cache/ui/mainnet/proposals/proposal_46.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@
"hasRequiredRoots": false
},
"isFinished": false,
"lastUpdatedTimestamp": 1710213670
"lastUpdatedTimestamp": 1710221066
}
}
2 changes: 1 addition & 1 deletion cache/ui/mainnet/proposals/proposal_47.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@
"hasRequiredRoots": false
},
"isFinished": false,
"lastUpdatedTimestamp": 1710213670
"lastUpdatedTimestamp": 1710221066
}
}
2 changes: 1 addition & 1 deletion cache/ui/mainnet/proposals/proposal_48.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,6 @@
"hasRequiredRoots": false
},
"isFinished": false,
"lastUpdatedTimestamp": 1710213670
"lastUpdatedTimestamp": 1710221066
}
}
2 changes: 1 addition & 1 deletion cache/ui/mainnet/proposals/proposal_49.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@
"hasRequiredRoots": false
},
"isFinished": false,
"lastUpdatedTimestamp": 1710213670
"lastUpdatedTimestamp": 1710221066
}
}
30 changes: 30 additions & 0 deletions cache/ui/mainnet/votes/vote_for_proposal_45.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
{
"votes": [
{
"proposalId": 45,
"address": "0x74a2E6A985B33454D39A0b333F51c3315CafC125",
"support": true,
"votingPower": 1.025256899410228,
"transactionHash": "0xe6088683ae93a5a27b8f426c63b33d9131aa064cf8e799c60cb61ab57706403c",
"blockNumber": 54557809,
"chainId": 137,
"ensName": "azami.eth"
},
{
"proposalId": 45,
"address": "0x8bC8b4E4921101BcC56ec084b906069b73de7276",
"support": true,
"votingPower": 1.1568958164237513,
"transactionHash": "0x87ed3af4ccb2d5afc022970c2bf64661f2fc499c5c216f31551c4633d3139dbd",
"blockNumber": 54556108,
"chainId": 137,
"ensName": "yuiyui.eth"
},
{
"proposalId": 45,
"address": "0x2bA0fCC894522DF700060a6015f7e96537B18412",
"support": true,
"votingPower": 1.081294541310279,
"transactionHash": "0x36be608032e720be9ef15ffe3159349f4dec59cdaa0d824935e5f7ebc2ccf675",
"blockNumber": 54554804,
"chainId": 137,
"ensName": "tsuinosora.eth"
},
{
"proposalId": 45,
"address": "0x8b37a5Af68D315cf5A64097D96621F64b5502a22",
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@
"node": ">=18"
},
"peerDependencies": {
"@bgd-labs/aave-address-book": "^2.19.0",
"@bgd-labs/aave-address-book": "^2.24.0",
"ethers": "^5",
"viem": "^2.7.3"
"viem": "^2.8.4"
},
"devDependencies": {
"@bgd-labs/aave-address-book": "^2.22.1",
"@bgd-labs/aave-address-book": "^2.24.0",
"@bgd-labs/js-utils": "1.3.0",
"@size-limit/preset-small-lib": "^11.0.2",
"@size-limit/preset-small-lib": "^11.0.3",
"@types/lodash": "^4.14.202",
"@types/node": "^20.11.24",
"@types/node": "^20.11.26",
"bignumber.js": "^9.1.2",
"dotenv": "^16.4.5",
"esbuild-plugin-file-path-extensions": "^2.0.0",
Expand All @@ -65,8 +65,8 @@
"prettier": "^3.2.5",
"tsup": "^8.0.2",
"tsx": "^4.7.1",
"typescript": "^5.3.3",
"viem": "^2.7.19"
"typescript": "^5.4.2",
"viem": "^2.8.4"
},
"dependencies": {
"bs58": "^5.0.0",
Expand Down
10 changes: 5 additions & 5 deletions src/scripts/parse-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ import {
import {
getGovernanceEvents,
isProposalFinal,
} from '../utils/viem/events/governance.ts';
import { getPayloadsControllerEvents } from '../utils/viem/events/payloadsController.ts';
import { getVotingMachineEvents } from '../utils/viem/events/votingMachine.ts';
import { appConfig, coreName } from './config.ts';
} from '../utils/viem/events/governance';
import { getPayloadsControllerEvents } from '../utils/viem/events/payloadsController';
import { getVotingMachineEvents } from '../utils/viem/events/votingMachine';
import { appConfig, coreName } from './config';

const initDirName = `ui/${coreName}`;

Expand Down Expand Up @@ -390,7 +390,7 @@ async function parseProposalEvents(
type: HistoryItemType.PROPOSAL_EXECUTED,
id: formattedProposalData.id,
chainId: appConfig.govCoreChainId,
timestamp: executedTimestamp,
timestamp: Number(executedTimestamp),
hash: governanceEvents.find(
(event) =>
event.eventName === 'ProposalExecuted' &&
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/update-cache-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
writeJSONCache,
} from '@bgd-labs/js-utils';
import { Address, getContract, Hex } from 'viem';
import { getBlock, getBlockNumber } from 'viem/actions';

import {
BookKeepingCache,
Expand All @@ -27,7 +28,6 @@ import {
isPayloadFinal,
} from '../utils/viem/events/payloadsController';
import { getVotingMachineEvents } from '../utils/viem/events/votingMachine';
import { getBlock, getBlockNumber } from 'viem/actions';

async function updateIpfsCache(proposalsCache: ProposalsCache) {
const ipfsCache: Record<string, ProposalMetadata> =
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/update-cache.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { appConfig } from './config.ts';
import { updateCache } from './update-cache-package.ts';
import { appConfig } from './config';
import { updateCache } from './update-cache-package';

updateCache({
govCoreChainId: appConfig.govCoreChainId,
Expand Down
Loading

0 comments on commit 4149057

Please sign in to comment.