Open nmaddp1995 opened 2 years ago
Hi,
You can try something like this, which is what I have to get the Datum in the right format to conform to the temple:
{"fields":[{"bytes":"....."},{"bytes":"...."}],"constructor":0}
The index from your question would be const constr = BigNum.from_str("0");
in the example below
const pdDtm = PlutusData.new_bytes(Buffer.from(this.state.datumStr, 'utf8'))
const pdPkh = PlutusData.new_bytes(pkhBytes)
const plutusList = PlutusList.new()
plutusList.add(pdDtm)
plutusList.add(pdPkh)
const constr = BigNum.from_str("0");
const constrPlutusData = ConstrPlutusData.new(constr, plutusList)
const pdAgg = PlutusData.new_constr_plutus_data(constrPlutusData)
const dataHash = hash_plutus_data(pdAgg)
Hi. in case I pass many input (utxo of buyer, utxo put onsale) How can I get redeemer index to pass in