This is a simple Google Cloud Function that watches for events in the olympus-governor subgraph and sends alerts to a Discord channel.
It performs the following steps:
- Fetch the latest block from the subgraph.
- Fetch the proposal events from the subgraph that occurred after the latest block.
- For each proposal event, send a Discord alert.
- Update the latest block number to the current block number.
-
Install dependencies:
pnpm install
-
Copy
.env.example
to.env
and set the variables.
-
Build the function:
yarn run build
-
Deploy the function:
pulumi up --stack <dev|prod>