Skip to content

Commit

Permalink
Add version and ordering to Channel
Browse files Browse the repository at this point in the history
  • Loading branch information
Inkvi committed Apr 19, 2024
1 parent 9aececa commit 61493e6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ponder.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ export default createSchema((p) => ({
portId: p.string(),
counterpartyPortId: p.string(),
counterpartyChannelId: p.string(),
version: p.string(),
ordering: p.int(),
connectionHops: p.string().list(),
blockNumber: p.bigint(),
blockTimestamp: p.bigint(),
Expand Down
6 changes: 5 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ async function channelOpenInit<name extends Virtual.EventNames<config>>(event: V
channelId: '',
portId: portId,
connectionHops: [...connectionHops],
version: version,
ordering: event.args.ordering,
counterpartyPortId: counterpartyPortId,
counterpartyChannelId: "",
blockNumber: event.block.number,
Expand Down Expand Up @@ -141,9 +143,11 @@ async function channelOpenTry<name extends Virtual.EventNames<config>>(event: Vi
data: {
channelId: channelId,
portId: portId,
connectionHops: [...connectionHops],
counterpartyPortId: counterpartyPortId,
counterpartyChannelId: counterpartyChannelId,
connectionHops: [...connectionHops],
version: version,
ordering: event.args.ordering,
blockNumber: event.block.number,
blockTimestamp: event.block.timestamp,
transactionHash: event.transaction.hash,
Expand Down

0 comments on commit 61493e6

Please sign in to comment.