Created
January 14, 2022 07:53
-
-
Save mailtodanish/9098f962a2ee3efa04766eae8551d65a to your computer and use it in GitHub Desktop.
create datum.json using Plutus
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//using cardano-serialization-lib | |
const plutusList = CSL.PlutusList.new(); | |
plutusList.add(CSL.PlutusData.new_bytes(Buffer.from('3f7826896a48c593598465a096d63606ceb8206', 'hex'))); | |
plutusList.add(CSL.PlutusData.new_integer(CSL.BigInt.from_str('1888'))); | |
plutusList.add(CSL.PlutusData.new_integer(CSL.BigInt.from_str('1'))); | |
CSL.PlutusData.new_constr_plutus_data(CSL.ConstrPlutusData.new(CSL.Int.new_i32(0), plutusList)); | |
''' | |
{ | |
"constructor":0, | |
"fields": | |
[ | |
{ | |
"bytes":"3f7826896a48c593598465a096d63606ceb8206" | |
}, | |
{ | |
"int":1888 | |
}, | |
{ | |
"int":1 | |
} | |
] | |
} | |
''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment