Questions tagged [policy]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
29 views

Verifying policy id from pub key

Is there any way to verify a policy against a policy.vkey (or even policy.skey in my case). Thing is we would prefer to not store on external backend all of our NFT policies. Use case to fill would be:...
user avatar
0 votes
0 answers
13 views

Clarification on policy script serialization in offchain-metadata-tools and policyid computation

I am reimplementing parts of the token-metadata-creator CLI tools in Java and got a question or need for confirmation of my assumption regarding the serialization of policy scripts and computation of ...
user avatar
1 vote
1 answer
46 views

How to PlutusTx.compile work with multiple arguments to mkPolicy

I'm on homework 5 of the pioneer program. If I check Signed.hs: {-# INLINABLE mkPolicy #-} mkPolicy :: PaymentPubKeyHash -> () -> ScriptContext -> Bool mkPolicy pkh () ctx = txSignedBy (...
user avatar
  • 172
2 votes
1 answer
87 views

Write a policy script with a custom redeemer type, but do NOT use `Plutus.liftCode`

I'd like to write a policy script that receives a custom data type for the Redeemer argument, but does not use Plutus.liftCode to "bake the argument value" into the compiled Plutus script. ...
user avatar
2 votes
1 answer
99 views

Updating NFT metadata when policy unlocked

We're wondering whether there is a convention for updating the metadata related to an nft in the case where a policy has not yet expired. For example, an nft is originally created with 721 metadata ...
user avatar
0 votes
1 answer
25 views

How do validators know a policy script is expired based only on slot number?

A policy script can be set to expire. For example: { "before": 51000000 } The number corresponds to a slot number within the epoch the script is being created. However, the current slot ...
user avatar
1 vote
1 answer
48 views

How to create the policy.vkey and policy.skey with Cardanocli-js?

I am looking for a method to create the policy.vkey and policy.skey. unfortunately my search has been unsuccessful so far. I have searched the library https://github.com/Berry-Pool/cardanocli-js/blob/...
user avatar
0 votes
1 answer
21 views

ad-hoc policy lock

It's possible to create a policy which can no longer be used to mint/burn after a given slot. The following object in a policy.script handles that: { "type": "before", &...
user avatar
1 vote
1 answer
187 views

How does one-time minting policy actually work?

In week 5 of plutus-pioneer-program with NFT example this plutus minting policy code is provided: {-# INLINABLE mkPolicy #-} mkPolicy :: TxOutRef -> TokenName -> () -> ScriptContext -> ...
user avatar
3 votes
1 answer
48 views

Registering policy ID programatically (pool.pm)

I'm seeing many NFT minting policies registered on pool.pm, and I noticed they can be registered manually there as well. Is there a way to do this programmatically? And is this a pool.pm-specific ...
user avatar
  • 145
3 votes
2 answers
181 views

Programmatically creating the policyid / scripthash in Javascript (Browser)

I'm looking for a Javascript implementation of the CLI's cardano-cli transaction policyid function, can anyone point me in the right direction here? Trying to replicate it with blakejs (https://github....
user avatar
  • 939
0 votes
0 answers
35 views

How to check the minting policy script for an asset [duplicate]

Given the policy ID of an asset, how can one find out its' minting policy script (validation rules)? I've used CardanoScan so far. It is able to show the current token supply, holders and transactions ...
user avatar
2 votes
1 answer
112 views

Calculate a policy locking

How can I calculate when the policy is going to be locked? I have the policy script file and I need to specify the before slot but I don't know how to calculate it. For example, I want the policy to ...
user avatar
0 votes
1 answer
54 views

Syntax error in script when generating policyid

On Windows I'm trying to mint some NFTs on Cardano testnet using this guide. The problem is that when I'm trying to generate policyID I'm getting this error even though the JSON is valid: cardano-cli ...
user avatar
  • 141
0 votes
0 answers
36 views

Cardano marketplace that allows selling a batch of NFTs

anyone aware of a cardano marketplace that allows us to mint NFTs in batches that will launch with smart contracts launch or at least close to the launch? So e.g. 1 policy ID, 10000 asset names that ...
user avatar
  • 423
7 votes
1 answer
400 views

Detailed Minting policy documentation?

I found several Articles which deal with Minting Policy's for native tokens as: https://cardano-ledger.readthedocs.io/en/latest/explanations/policies.html#minting-policy https://github.com/input-...
user avatar
  • 165
7 votes
1 answer
1k views

Verify that Token is NFT

I was wondering how it is possible to actually validate if a certain Token is an NFT without having to inspect the code of the script which mints that Token? Only by checking if the current quantity ...
user avatar
  • 313
9 votes
2 answers
331 views

Is the length (in characters) of a token policy id always the same?

Let's say I have the following native token unit d5e6bf0500378d4f0da4e8dde6becec7621cd8cbf5cbb9b87013d4cc537061636542756433323639 that consists of the policy id ...
user avatar
  • 3,026
6 votes
1 answer
115 views

Re-Implementing Policy Hashing in Python

As the title says, I want to to reimplement the hashing part of a policy script in Python 3. I have already made a post over at forums.cardano.org, and someone has pointed me to the right direction of ...
user avatar
  • 80