Questions tagged [policy]
The policy tag has no usage guidance.
29
questions
2
votes
1
answer
36
views
Why does an cardano token have multiple policys
I stumbled upon Society token, in multi_assets table via cardano-db-sync it has 2 entries with same name but the meta data difference is minimal, as well they're fingerprints are different
policy = ...
1
vote
2
answers
37
views
How to differentiate NFTs of the same policy id?
For Example:
You have an NFT collection that has 5 different tiers all under the same policy ID (cip-25 metadata standard). You want to be able to provide on-chain benefits to holders of the NFT ...
1
vote
1
answer
78
views
Mint the royalty token with pycardano
Good morning everyone,
I have a question regarding the royalty token. I've already read about this subject, and I understand that I need to mint a token with metadata like this:
{
"777": ...
0
votes
1
answer
31
views
How to create Policy Id using cardano serlization lib?
I was wondering how to create the policy Id/script for the cardano assets.
I am new to cardano blockchain but I have worked on Ethereum. I read the docs provided by the cardano officials but couldn't ...
0
votes
1
answer
20
views
Are NFT policies interchangeable between networks?
Generating a policy doesn't require a running node; the cardano-cli alone is sufficient. Since no connection is made to the network, can I assume there's no difference between a policy on preprod and ...
0
votes
1
answer
38
views
How to construct `TxOutRef`?
I am building an NFT minting policy which takes an argument of type TxOutRef as parameter. To this when I pass my parameter, it doesn't match with what is actually given in the transaction. Here is my ...
1
vote
3
answers
92
views
Is it possible to call the `mkValidator` inside the same / another `mkValidator` function for script composibility?
Supposed I have a validator below, checking only if the output value is locked by the same script.
{-# INLINEABLE mkValidator #-}
mkValidator :: TestingParam -> TestingDatum -> TestingRedeemer -&...
1
vote
1
answer
67
views
'No Corresponding Policy Script' Error when Script Was Provided
Following the Mintin NFTs IOHK tutorial I end up with the following error when crafting the transaction.
Command failed: transaction build Error: The "--mint" flag specifies an asset with a ...
0
votes
2
answers
39
views
How to view binarydata in cexplorer?
When running sql script to view data on Cexplorer database, many times,I see binary data.
for example, multi_asset.name, multi_asset.policy in the following query.
Is there any way to view these data ...
0
votes
1
answer
90
views
Unlocked NFT minting policy
I want to create a collection of NFTs with unlimited supply. This way one NFT gets minted every time someone buys one. I don't need a limited supply because I want these NFTs to work as a "member ...
1
vote
2
answers
52
views
Multiple policies associated with the same token/nft
We want to associate multiple policy ids with the same token/nft. Is this possible?
0
votes
1
answer
54
views
How to Look Up a Token Policy ID from The Smart Contract Validator
I have attached a token to the datum and sent it to the smart contract, now I need the validator to check that the token has a certain policy ID before it allows the contract to proceed.
How do I do ...
0
votes
1
answer
102
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:...
1
vote
1
answer
74
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 (...
2
votes
1
answer
152
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. ...
4
votes
1
answer
262
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 ...
0
votes
1
answer
33
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 ...
1
vote
1
answer
117
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/...
0
votes
1
answer
25
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",
&...
1
vote
1
answer
354
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 -> ...
3
votes
1
answer
75
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 ...
3
votes
2
answers
299
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....
2
votes
1
answer
187
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 ...
0
votes
0
answers
89
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 ...
1
vote
1
answer
79
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 ...
7
votes
1
answer
465
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-...
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 ...
10
votes
2
answers
698
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 ...
6
votes
1
answer
138
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 ...