-
Notifications
You must be signed in to change notification settings - Fork 35
Description
First of all: Is this still maintained and worked on? Otherwise please just mark it as deprecated, so people know.
The config files for testnet have to be updated to the current preview and preprod testnet configuration, or there should be an example on how to include them. I couldn't get this to work at all, because the new testnets do not have the same params anymore.
Anyways, I am trying to get the native token example to work, which has TypeScript in it. This should be the right way to write the coinSelection outputs:
coinSelection.outputs = coinSelection.outputs.map((output) => {
if (output.address === addresses[0].address) {
output.assets = tokens.map((t) => {
var asset = {
policy_id: t.asset.policy_id,
asset_name: Buffer.from(t.asset.asset_name).toString("hex"),
quantity: t.asset.quantity,
};
return asset;
});
}
return output;
});
Getting the following error though, which seems to be unrelated to the testnet config:
code: 'created_invalid_transaction',
message: The submitted transaction was rejected by the local node. Here's an error message that may help with debugging: HardForkApplyTxErrFromEra S (S (S (S (S (Z (WrapApplyTxErr {unwrapApplyTxErr = ApplyTxError [UtxowFailure (UtxoFailure (FromAlonzoUtxoFail (ValueNotConservedUTxO (Value 9934143499 (fromList [(PolicyID {policyID = ScriptHash "f1523c7c2e6e4e6b8a4757f951fc34acbd726826f5c64cc7235206ee"},fromList [(,1000000)])])) (Value 9934143499 (fromList [(PolicyID {policyID = ScriptHash "f1523c7c2e6e4e6b8a4757f951fc34acbd726826f5c64cc7235206ee"},fromList [(54616e676f,1000000)])])))))]}))))))