Questions tagged [on-chain]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
7
votes
2answers
233 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 ...
2
votes
1answer
132 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 ...
2
votes
1answer
24 views

On-chain and Off-chain code

I've seen the existing similar questions on this topic. I probably still don't get it. So a question: Is it a correct analogy to the JS-Solidity world that the On-chain code corresponds to the ...
2
votes
2answers
97 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 ...
2
votes
2answers
108 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
44 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) {-# ...
1
vote
2answers
55 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 ...
1
vote
2answers
55 views

How does one check a pool's delegation history?

How does one view addresses that were staking with a specific pool at a specific epoch boundary? If there is any way to view a list of addresses that received staking rewards for a particular block, ...
0
votes
1answer
36 views

How to get information about UTxOs which created locking transaction on the on-chain?

I would like to create a smartcontract which makes sure that only the same person who made specific locking transaction can unlock that same specific transaction or to put it into simpler terms if Bob ...
0
votes
1answer
56 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 ...
0
votes
1answer
36 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 ...