Skip to content

Commit

Permalink
Merge pull request #173 from Kwenta/add-txhash-ordersettled
Browse files Browse the repository at this point in the history
Add txnHash to OrderSettled
  • Loading branch information
avclarke authored Jan 29, 2024
2 parents 008b158 + 7cee42a commit 02f2085
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/perps-v3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ export function handleOrderSettled(event: OrderSettledEvent): void {
order.newSize = event.params.newSize;
order.referralFees = event.params.referralFees;
order.settler = event.params.settler;
order.txHash = event.transaction.hash.toHex();
order.pnl = ZERO;

let positionId = event.params.marketId.toString() + '-' + event.params.accountId.toString();
Expand Down
1 change: 1 addition & 0 deletions subgraphs/perps-v3.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ type OrderSettled @entity {
trackingCode: Bytes!
settler: Bytes!
pnl: BigInt!
txHash: String!
}

type PerpsV3Position @entity {
Expand Down

0 comments on commit 02f2085

Please sign in to comment.