Money Streaming Events

Query CFA Data

CFA Events (For Money Streaming)

flowUpdated: emits any time there is a creation, update, or deletion event of a stream. Note that “type” will represent the type of update:

0 = creation event

1 = update event

2 = deletion event

Solidity Event:

Sample Subgraph Query:

#returns the new netFlowRate along with all flowUpdated events for a user
query MyQuery {
  flowUpdatedEvents(where: {sender: "0xdcb45e4f6762c3d7c61a00e96fb94adb7cf27721"}) {
    timestamp
    token
		type
    totalSenderFlowRate
		totalAmountStreamedUntilTimestamp
		stream {
	      streamedUntilUpdatedAt
	    }
  }
}

Note that totalAmountStreamedUntil timestamp is useful because it will return the total amount streamed until the state change, and streamedUntilUpdatedAt will return the total amount stream since the previous state change. Learn more about this here.

Last updated