Hot answers tagged

3 votes
Accepted

How To Get Transaction Royalityies on Fungable Tokens

This is not possible. Native Tokens are first class citizens on Cardano. They are not part of a smart contract that could enforce behavior like this but are assets in your wallet like ADA. It's the ...
  • 3,500
3 votes
Accepted

How would you implement Soulbound Tokens in Cardano?

Any native asset on cardano can be transferred according to the ledger rules. To make something non-transferrable you would need to make it unspendable. For "pay to pubkey" outputs, this ...
2 votes

Get list of holders of a token using Cardano-cli or Cardano-DB-Sync or Ogmios

"List of holders" is rather unclear. If you want names, addresses and other KYC/AML stuff you won't be able to get it. Tokens are held in Cardano addresses, and any person could have more ...
2 votes
Accepted

Token price API

There is this from minswap: https://api-mainnet-prod.minswap.org/coinmarketcap/v2/pairs or this minswap blockfrost adapter: https://github.com/minswap/blockfrost-adapter
  • 46
2 votes

Can there be duplicate Policy IDs?

One part of the policy is usually about signatures associated with it. If you want to use the same script again, you will need the corresponding private keys. If you have them and policy permits it, ...
2 votes

How to get all assets of a certain addresss using SQL on Cexplorer

For ADA balance, you can use the utxo_view table like this: select * from utxo_view where address = 'addr1w9742z4fewans7ry6cjp95pc4ecv7y54cx298lp5qfw7s9gv8ukrj' ; If you look at how utxo_view is ...
1 vote
Accepted

Possible to get the total supply of a native token in a smart contract?

A stated in the other question on this topic, in general, no you can not get the total supply of any native asset available in a plutus script. The Cardano blockchain is inherently local and ...
  • 1,772
1 vote

Get list of holders of a token using Cardano-cli or Cardano-DB-Sync or Ogmios

You can use Koios endpoint documented here, and if you run a dbsync instance, you can find the dbsync query used here
  • 1,527
1 vote

What's the difference between sidechains and hardforks?

A sidechain is simply an alternate/secondary chain that shares a two-way link/peg with another chain that is the primary chain (frankly primary/secondary are philosophical roles that are ...
1 vote

What's the difference between sidechains and hardforks?

Sidechains and hardforks are definitely not the same thing. As outlined in the original Why Cardano essay, the whole point of Layer 1 Cardano is to serve as a settlement layer for domain-specific ...
  • 3,489
1 vote

CIP25 Metadata standard version 2 token name

On the blockchain, the token name was never actually a string and was always bytes. Usually they are ASCII encoded, but they may also be UTF8, UTF-16 or even some other encoding.
1 vote
Accepted

How can I find the logo of a token in the Cardano Token Registry?

You use https://tokens.cardano.org/metadata/{subject}/properties/logo. See the API doc.
  • 1,250
1 vote
Accepted

Use a parameterized currencySymbol within a Plutus Validator. Unsupported feature: Type constructor: GHC.Prim.ByteArray#

The short answer is, you can't call curSymbol in mkValidator because that would involve compiling the policy and various template haskell stuff in your validator script, this cannot be done in PLC. ...
  • 1,250
1 vote
Accepted

How can I create a token that shows 6 decimals places in Eternl?

Not sure if Eternl has this implemented, but there is a proposal that adds this token information to the metadata of the minting transaction: https://github.com/cardano-foundation/CIPs/blob/...
  • 1,443
1 vote

How can I create a token that shows 6 decimals places in Eternl?

Did you register your token at CFtoken registry ? You can specify decimals as part of JSON you register on that repo.
  • 1,527
1 vote

How to query the address that sent a token from cardano-db-sync?

For example, how can I know that (addr1q8h ... 8k5s6cnspc) sent the token and not the other input address in this transaction? Is it actually possible to do that by only joining the tables? The ...
  • 1,527
1 vote

How can I check the origin of a Token?

the token is present in your wallet as "<policy-id>.<token-name-hex-ascii>" if you want to check only for a specific smart contract (minting policy) to be the one which minted ...
  • 666
1 vote
Accepted

How to Look Up a Token Policy ID from The Smart Contract Validator

You can use the following info :: TxInfo info = scriptContextTxInfo ctx inputValue :: [Value] inputValue = map (txOutValue . txInInfoResolved) (txInfoInputs info) checkValueHasToken :: Value -> ...
  • 1,772
1 vote
Accepted

How to create a Cardano private network

Alternatively/additionally, check out the Making a Shelley Blockchain from Scratch repo.
  • 3,489
1 vote

How to create a Cardano private network

The easiest way to create a cardano private network (IMHO) is to clone the cardano-node git hub, start up nix shell, and from there you can start a local cluster. Works well for me I have a used it ...
  • 293
1 vote

Is there a way to validate a policy Id,and to check if a string is an actual policy id?

Beyond the length of the hash digest (28 bytes in this case), no. Unless you have the pre-image (that is, the raw policy script) in which case you can rehash it and compare.
  • 485
1 vote
Accepted

Is the Cardano Token Registry on Github abandoned/problematic?

The repository is not abandoned, it is maintained by the Cardano Foundation right now.

Only top scored, non community-wiki answers of a minimum length are eligible