Skip to content

Commit

Permalink
Merge pull request #195 from VenusProtocol/mark-trusted-remote-as-active
Browse files Browse the repository at this point in the history
fix: mark trusted remote as active when indexing event if it was crea…
  • Loading branch information
coreyar authored Nov 25, 2024
2 parents 30ef60f + e1c728c commit d66333e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion subgraphs/etherfi-promo/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "etherfi-promo-subgraph",
"name": "@venusprotocol/etherfi-promo-subgraph",
"version": "0.2.0",
"license": "MIT",
"repository": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@ import {
import { removeTrustedRemote } from '../operations/remove';

export function handleSetTrustedRemoteAddress(event: SetTrustedRemoteAddress): void {
getOrCreateTrustedRemote(
const result = getOrCreateTrustedRemote(
event.params.remoteChainId,
Address.fromString(event.params.newRemoteAddress.toHexString().slice(0, 42)),
);
// Ensure it is marked active, in case it was previously created in remote proposal creation
result.entity.active = true;
result.entity.save();
}

export function handleExecuteRemoteProposal(event: ExecuteRemoteProposal): void {
Expand Down
26 changes: 13 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5712,6 +5712,19 @@ __metadata:
languageName: unknown
linkType: soft

"@venusprotocol/etherfi-promo-subgraph@workspace:subgraphs/etherfi-promo":
version: 0.0.0-use.local
resolution: "@venusprotocol/etherfi-promo-subgraph@workspace:subgraphs/etherfi-promo"
dependencies:
"@graphprotocol/graph-cli": ^0.80.0
"@venusprotocol/isolated-pools": 3.7.0-dev.5
semantic-release: ^23.1.1
semantic-release-monorepo: ^8.0.2
ts-node: ^10.9.2
viem: ^2.9.26
languageName: unknown
linkType: soft

"@venusprotocol/governance-contracts@npm:2.5.0-dev.4":
version: 2.5.0-dev.4
resolution: "@venusprotocol/governance-contracts@npm:2.5.0-dev.4"
Expand Down Expand Up @@ -9445,19 +9458,6 @@ __metadata:
languageName: node
linkType: hard

"etherfi-promo-subgraph@workspace:subgraphs/etherfi-promo":
version: 0.0.0-use.local
resolution: "etherfi-promo-subgraph@workspace:subgraphs/etherfi-promo"
dependencies:
"@graphprotocol/graph-cli": ^0.80.0
"@venusprotocol/isolated-pools": 3.7.0-dev.5
semantic-release: ^23.1.1
semantic-release-monorepo: ^8.0.2
ts-node: ^10.9.2
viem: ^2.9.26
languageName: unknown
linkType: soft

"ethers@npm:^5.6.8, ethers@npm:^5.7.0, ethers@npm:^5.7.1, ethers@npm:^5.7.2, ethers@npm:~5.7.0":
version: 5.7.2
resolution: "ethers@npm:5.7.2"
Expand Down

0 comments on commit d66333e

Please sign in to comment.