-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Datum #83
Comments
// This represents the Datum struct from the Helios on-chain code
73 // loan:
74 struct Datum {
75 ?lender: PubKeyHash
76 ?borrower: PubKeyHash
77 collateral: policy id
78 deadline:
79 }
80
81 // vesting:
82 struct Datum {
83 creator: PubKeyHash
84 beneficiary: PubKeyHash
85 deadline: Time
86 }
87
88 // my datum now is for matching_keyhash!!!
89 struct Datum {
90 owner: PubKeyHash
91 } |
struct Datum {
83 creator: PubKeyHash
84 beneficiary: PubKeyHash
85 deadline: Time
86 } const datum = new ListData([new ByteArrayData(ownerPkh.bytes),
new ByteArrayData(benPkh.bytes),
new IntData(BigInt(deadline.getTime()))]);
const inlineDatum = Datum.inline(datum); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Each UTxO locked at a script address will also have an associated datum. The script can choose to use the datum as part of the spending validation, or it can choose to ignore the datum if it is irrelevant.
The text was updated successfully, but these errors were encountered: