I have a question about using creating transactions using transaction builder.
this is my process:
builder = TransactionBuilder(context)
builder.add_input_address(address)
utxos = context.utxos(str(address))
builder.add_input(utxos[0])
builder.add_output(
TransactionOutput(
Address.from_primitive(
"addr_test1vrm9x2zsux7va6w892g38tvchnzahvcd9tykqf3ygnmwtaqyfg52x"
),
Value.from_primitive(
[
1500000,
{
bytes.fromhex(
"57fca08abbaddee36da742a839f7d83a7e1d2419f1507fcbf3916522" # Policy ID
): {
b"CHOC": 2000 # Asset name and amount
}
},
]
),
)
)
but there is a problem here.
I’ve got 10 ADA faucet tokens but when i want to create and submit transaction i’m getting this error:
line 214, in _get_single_asset_val
return list(list(value.multi_asset.values())[0].values())[0]
and i think that it refers to “CHOC”.
how can i solve this problem?