Abstraction of Multi-Script Smart Contracts #17
MitchTurner
announced in
Archive
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
A problem I've had with PlutusTx is that most useful contracts require multiple scripts. Often, it has to do with having Minting Policies that work in conjunction with validators. For example:
Minting policies don't have internal state, since they can't hold Datums. Instead, you write validators that work in conjunction with the policy. You'll have the validator do most of the checks, including state checks on the datum or minted amount from the policy, and then the Minting Policy checks that a specific NFT (access token) is spent by the validator. If there is only one allowed NFT in the world, and it's owned by the Validator, then you know that the requirements for minting are met.
This example has 3 scripts:
But it's a common pattern. And there are many such patterns that are useful.
There is a lot of boiler plate here though. And it's annoying to write something like this in PlutusTx.
I think Aiken can make developer's jobs much easier by providing common libraries for patterns like this, not to mention make it easy for people to introduce their own libraries.
Some ideas for common patterns:
Beta Was this translation helpful? Give feedback.
All reactions