Questions tagged [on-chain]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
2answers
35 views

How does custom Plutus data type map to cardano-cli --tx-in-datum-file content?

Let's say I have validator, which checks datum against two numbers, hash, time and a string and there are some funds locked at this script address and I would like to unlock these funds using cardano-...
2
votes
1answer
26 views

Retrieve only digit from TokenName and use onchain

How can I make the following function to retrieve only digit portion from the TokenName and use it on chain? For example I want to retrieve the number 123 from "AAA123" (TokenName) {-# ...
2
votes
1answer
53 views

Is really any token metadata stored on chain? Or is it the mint TX metadata?

I am aware that offchain metadata is stored using the registration as Cardano Developers portal dictates, my concern is about on-chain metadata. Is really any NFT-metadata stored on-chain? Like ...
0
votes
1answer
26 views

Does Plutus support floating-point arithmetic for on-chain code?

Plutus provides arithmetic functions for Integers through the modules PlutusTx.Prelude and PlutusTx.Builtins. Are there floating-point arithmetic functions which can be used on chain? If not, why is ...
0
votes
1answer
53 views

How to validate the correctness of another parameterized script address on-chain

I would like to write a factory script that can initialize another parameterized script address by sending it an NFT. The factory validator gets the parameters of the target script as redeemer and has ...
1
vote
2answers
44 views

Is there a way for a validator to get the current time?

Is it possible for a validator to get the current time without it being passed in via the redeemer? My validator is heavily dependent on the time being correct so it would probably be a bad design ...
2
votes
2answers
81 views

How to parse TokenName to Integer

I have information encoded in the TokenName of an asset. These token names represent integers. According to the Plutus source code, the TokenName is of type BuiltinByteString. How can I parse it to ...
7
votes
2answers
158 views

Where is the on-chain code actually stored?

I've just read something that suggests Validators aren't actually kept on the blockchain. To save the space, only the hash of the Validator is kept at the UTxO and users willing to spend it must ...