TimeLock policies

Yes, would need that. And as it only really makes sense, when there are several people involved, the Y and Z people should do their keygens on their machines, store the skeys safely and securely, and send the vkeys to X, who then derives the hashes and puts them in the policy.

Hi I am building some more tests to run tonight as my minting practise for the official mint later tonight or tomorrow morning.

I may go through a few more steps with you if thats ok, I am using Deadalus as the node btw

So Transaction building are you saying use this syntax or similer ?

cardano-cli transaction build \

–testnet-magic 1097911063 \

–alonzo-era \

–tx-in $txhash#$txix \

–tx-out $targetaddr+$output+$amount\ $policyid.$tokenbase16 \

–change-address

–mint $amount\ $policyid.$tokenbase16 \

–minting-script-file policy.script \

–witness-override 2 \

– invalid-hereafter 47981293

–out-file matx.raw

Also what about this string $tokenbase16 is that invalid on Deadalus too ? So replace with $tokenname ?

Yes!

Yes, replace with $tokenname.

1 Like

So –change-address which address does that relate to again please is it recipient ?

Talking of which I would like at least 8 wallets recipients each with different amounts of tokens I gather this will save just one transaction fee for the data. How is the syntax for multiple wallets each with a different amount of the same token is it + or something in the mint ?

Also is metadata for the token officially supported

“symbol”:

See like this token

Change address is the address, where the change goes to – everything that is not cosumed by other --tx-outs or the fee. I would take the minting payment address, so that you have funds for the next minting or sending in there.

8 --tx-outs, one for each address, will all need some minimal lovelace to go with them (after the first +, in the example the variable $output, as always the variables are a shell thing, you can also give the value directly in the command parameter). The number of tokens for each of the 8 outputs goes after the second +, the variable $amount in the example, just before the token designation $policyid.$tokenname. The numbers in sum should be the same amount you minted. No need to change anything in the --mint.

Ah ok so its in the transaction build command can I check ?

Then also I was looking up to make sure the token support decimal values where is that done ?

You can use the asset fingerprint to navigate to their minting transaction and its metadata on Cardanoscan:

Their you can see that they just put the logo in "image" and in "files".

Original

–tx-out $targetaddr+$output+$amount

Like this ?
–tx-out $targetaddr1+$output1+$amount1
+$targetaddr2+$output2+$amount2
+$targetaddr3+$output3+$amount3
+$targetaddr4+$output4+$amount4
+$targetaddr5+$output5+$amount5
+$targetaddr6+$output6+$amount6
+$targetaddr7+$output7+$amount7
+$targetaddr8+$output8+$amount8 \ $policyid.$tokenname\

1 Like

No, it’s multiple --tx-outs:

–tx-out $targetaddr1+$output1+$amount1\ $policyid.$tokenname \
–tx-out $targetaddr2+$output2+$amount2\ $policyid.$tokenname \
–tx-out $targetaddr3+$output3+$amount3\ $policyid.$tokenname \
–tx-out $targetaddr4+$output4+$amount4\ $policyid.$tokenname \
–tx-out $targetaddr5+$output5+$amount5\ $policyid.$tokenname \
–tx-out $targetaddr6+$output6+$amount6\ $policyid.$tokenname \
–tx-out $targetaddr7+$output7+$amount7\ $policyid.$tokenname \
–tx-out $targetaddr8+$output8+$amount8\ $policyid.$tokenname \

Also note that the backslash at the end of each line is just a shell thing. You could also put everything in one big line, but if and only if you want to input a command over several lines to not lose track each line but the final one has to end with a backslash. Has nothing to do with Cardano.

1 Like

Thanks I get that, I need a refresh on metadata.json and the steps to generate what is 721 ? This is how my test meta data starts

721": {

I dont remember how I that number is made from policy ?

“721” is just a constant telling software looking at it – pool.pm, wallet apps, … – that it’s metadata for a token and not something else – a Catalyst registration, a pool delegation, whatever.

Didn’t we have the metadata topic in another thread? There’s https://github.com/cardano-foundation/CIPs/tree/master/CIP-0025 that should basically tell you everything.

Hi yes we did have a thread I cannot find it only this topic and the node sync .

So I can essentially hand code it with the policy number inserted, or do you usually do that with an echo?

I think I’ll simplify the --tx-out to four wallets I need only to do the output amount once like you said ?

This will probably say that output is too low and give you the minimum output.

So reset this variable in between with minimal amount ?

output=

I would never do this echo, but always use an editor.

Don’t know if it’s a good choice for the tutorial. Makes getting the zillion variables into that file easier, but copying the values in place is what I would do.

1 Like

Ok thanks I am seeing the process better now

Do you make a dir called “tokens/testnet” or “yourtokensname/testnet” Wondering how to keep it tidy between test and mainnet or can i use the same folder ?

I have just realised my mistake with this and it opens up a whole new thread so I will create a new topic. So it appears decimals is not part of the minting its part of the registry and I am not sure these commands exist for token registry metadata creation within Deadalus ?

Hi refreshing my memory on metadata.json there is a value I previously used.

mintedBeforeSlotNumber

Does this mean if you put a current or previous slot number in it will mint immediately I am wondering what the use case is ?

It is metadata! It is just information for people. You can write “WaddeHaddeDuddeDa” in there and the technology will not complain.

It is not in the CIP standard for metadata right now. You’ve seen the standard. It is pretty minimal.

Some minters seem to use it in a block of metadata under the heading “minting”. Don’t know if there is a standard for that. pool.pm does not seem to treat such information in any special way.

If you want to set it, set it to the same value as the one in policy.script. The one in policy.script is the one that is enforced by the blockchain.

Also, you are minting tokens, not NFTs, right?

I had to learn a few days ago that we shouldn’t use the metadata.json functionality with the 721 key for those: Doubt about assets · Issue #319 · input-output-hk/nami · GitHub It will lead to, e.g., Nami to put the token under “Collectibles” instead of “Assets”, because it then thinks that it’s an NFT.

The metadata functionality for tokens seems to be the Cardano Token Registry: https://developers.cardano.org/docs/native-tokens/token-registry/cardano-token-registry

Yet another thing to learn and I don’t know it a bit. Maybe, open a new thread with just questions on that one if you want to use it.

Ok thanks much to learn there next stage after I have figured out the burning is registering the tokens