Skip to content

Commit

Permalink
add seperate fn to decode event datum
Browse files Browse the repository at this point in the history
  • Loading branch information
mgpai22 committed May 6, 2024
1 parent c722403 commit 18e1344
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/read.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Data } from './data';
import { ObjectDatum } from './models';

export function getEventDatum(plutusData: string): ObjectDatum {
return Data.from<ObjectDatum>(
plutusData,
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
ObjectDatum
);
}

0 comments on commit 18e1344

Please sign in to comment.