Created
January 14, 2022 06:50
-
-
Save mailtodanish/ccf611b8c2282930545271f77b258815 to your computer and use it in GitHub Desktop.
add datum in output transaction
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
const datums = this.S.PlutusList.new(); | |
const datum = this.S.PlutusData.new_constr_plutus_data( | |
this.S.ConstrPlutusData.new( | |
this.S.Int.new_i32(1), | |
this.S.PlutusList.new() | |
) | |
); | |
datums.add(datum); | |
console.log("datums", datums); | |
let t = this.S.TransactionOutput.new( | |
this.S.Address.from_bech32(ReceiveAddress), | |
outputValue | |
); | |
t.set_data_hash(this.S.hash_plutus_data(datum)); | |
outputs.add(t); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this.S is "Loader.Cardano." of "@emurgo/cardano-serialization-lib-browser/"