Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandrokonrad committed Jan 24, 2025
1 parent 05dffbb commit 1a79c23
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,18 @@ validator validate(my_data: MyData) {
```ts
import { ValidateMint } from "./plutus.ts";

const validator = new ValidateMint({a: 123n, b: "0000"});
const redeemer = ValidateMint.redeemer;
const validator = new ValidateMint({ a: 123n, b: "0000" });

const policyId = lucid.newScript(validator).toHash();

const tx = await lucid
.newTx()
.mint(
{ [policyId]: 1n },
Data.to({ a: 123n, b: "0000" }, ValidateMint.redeemer),
)
.attachScript(validator)
.commit();
```

See [more examples](./tests/data.test.ts)
Expand Down

0 comments on commit 1a79c23

Please sign in to comment.