Questions tagged [script]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
14 views

How to get pointer to an actual cardano address by pool script hash in format "script...."?

The address format is script15ew2tzjwn364l2pszu7j5h9w63v2crrnl97m074w9elrkxhah0e. In this example from https://github.com/DefiLlama/DefiLlama-Adapters/blob/main/projects/minswap/index.js, you can ...
ErikM's user avatar
  • 41
1 vote
1 answer
58 views

Creating a malicious validator script whose hash equals that of an existing validator script

what is preventing an adversary to find (in many hours) a nonce that would make a malicious validator script to have the same hash and address of my validator script, and then submit it with cardano-...
Quantinity's user avatar
1 vote
4 answers
106 views

Is it possible to obtain the cbor hex/script bytes from a bech32 script address?

I would like to get the script bytes from the bech32 address of a script. Is this possible?
zaherr's user avatar
  • 21
0 votes
1 answer
29 views

Unable to convert BuiltinString to JSON

I would like to include a BuiltinString in a datum but am unable to do so as BuiltinString has neither a FromJSON nor a ToJSON instance. Is there an alternative to implementing these instances by hand?...
Eric's user avatar
  • 85
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 ...
Max's user avatar
  • 11
0 votes
1 answer
47 views

Whats the python script to check if an cardano address has a script flag?

I have a script to fetch asset name, address from a policy id with blockfrost API, now I need to see if the asset is in a smart contract script. I have no coding skills but followed a tutorial to get ...
dpd's user avatar
  • 3
0 votes
3 answers
109 views

"The second data argument, does not decode to a context" when minting NFT with Mesh

This my script for minting NFT: {-# INLINABLE mkPolicy #-} mkPolicy :: BuiltinData -> PlutusV2.ScriptContext -> Bool mkPolicy _ ctx = traceIfFalse "wrong amount minted" checkNFTAmount ...
Daniel Ng's user avatar
2 votes
1 answer
52 views

Which address types are allowed for collateral inputs

Collateral inputs are required to be added to a transaction when any Plutus script is executed within that tx (i.e. spending a Plutus address utxo or minting a Plutus policy asset). Obvious that a ...
Vantuz Subhuman's user avatar
0 votes
1 answer
59 views

Workaround for Plutus Scripts that excesses the max Tx Size. Framework or examples for splitted or modular validators?

Im very interested in how you can split the validation in several validator. There is any model or framework to follow? Any example around? Could somebody at least share some words of insights about ...
Manu Padilla's user avatar
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 -&...
SIDAN Whatever's user avatar
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 ...
user3755529's user avatar
0 votes
1 answer
154 views

What happens if I omit a datum hash in a transaction to a script address?

When using a Trezor to sign a transaction with a script address as the receiver, I get the message "The following transaction output contains a script address, but does not contain a datum. ...
AstralChain's user avatar
0 votes
1 answer
65 views

How to store scripts using blockfrost?

Greeting! I got that Blockfrost has API to get plutus script hash but how to store those scripts hashes? P.S. if I got script hash, can I build and send transaction using script's hash and Blockfrost?
Nazar Mineev's user avatar
0 votes
1 answer
59 views

Is there a way to see which Plutus code is deployed on a specific script address?

On Ethereum, for example, there is a way to see the Solidity code that is deployed in a specific address (as long as the code gets verified). Is there a way to achieve this same behaviour in Cardano?
Falcon Stakepool's user avatar
2 votes
2 answers
56 views

Whats Your Mental Model For Monads?

I was asked by a friend trying to learn plutus what a monad was, so I began talking about category theory. It seems that this confused him further how would you explain monads to a noob? Whats your ...
KryptoKing's user avatar
1 vote
1 answer
79 views

"'Inputs do not conform to this spec or are otherwise invalid.'" - extract balance from smart contract

I'm implementing a smart-contract in Plutus and I'm with a doubt. For example, Ethereum has some function only to owners, that enables to implement a withdraw of balance for only owner addresses. I ...
pprs's user avatar
  • 101
2 votes
1 answer
113 views

Plutus Script Validation Metadata

I have a question but I cannot find a concrete answer for that. I have a smart contract developed in Plutus for managing locking and withdraw of Tokens/NFTs. I'm wondering if I can validate some ...
pprs's user avatar
  • 101
2 votes
1 answer
125 views

How to determine the order of transaction input (in the order of the TxIds)?

If I have the following transaction: cardano-cli transaction build \ --tx-in dd3dbc1cbd4627da3b74fae8c7bcc3f05f3b41ec36feb33f81cf885390b634d6#0 \ --tx-in ...
zarej's user avatar
  • 449
1 vote
1 answer
751 views

How to Get Started with Cardano Native Script

What resources should you use to learn native script and in what order should you use them in?
KryptoKing's user avatar
0 votes
1 answer
53 views

How to achieve a minting policy script that locks after certain number of images (assets) have been minted on the fly

Let's say I want to run an NFT campaign, where the minting policy only allows minting of 100 NFTs (each one is different), and then the policy should lock. If this minting policy were a Plutus script, ...
Kurt Hartmann's user avatar
1 vote
0 answers
97 views

Whats the Diffrance between Plutus scripts and Cardano Native Scripts?

What are the key differences between Cardano native scripts and Plutus scripts, from a developer's perspective?
KryptoKing's user avatar
1 vote
1 answer
34 views

Script to only accept payments in 100 Ada

How do i create a simple script that users can deposit ada into but only 100 ada per transactions , nothing less than that and nothing more. The transaction will not go through if it is not 100 Ada.
szhang9921's user avatar
1 vote
2 answers
43 views

checkDeadline function always returning False

I am trying to make a minting policy that fails after a certain deadline. I have tried something like this {-# INLINABLE mkTokenPolicy #-} mkTokenPolicy :: TxOutRef -> TokenName -> Integer -> ...
brightman11's user avatar
1 vote
0 answers
33 views

How to get the address which locked the fund on a smart contract?

I have two users. The first user locks 1 ADA with a Datum at a script address. The second one unlocks the 1 ADA with the same Datum and should now send 5 ADA to user one. Can I now implement a logic ...
John_Bones's user avatar
1 vote
1 answer
157 views

Script Witness Not Validating for Multisig

I'm getting the following error when trying to consume a UTxO sitting in a multisig script address: [ { "scriptWitnessNotValidating": [ "...
Falcon Stakepool's user avatar
0 votes
2 answers
525 views

How to generate script address from plutus script cborhex

I want to generate the address from the plutus script's cborhex value, but so far without much luck. I am using the alwayssucceeds.plutus contract as an example for which the cborhex value is ...
D S's user avatar
  • 312
1 vote
2 answers
74 views

Plutus script execution at every end of epoch

I would like to develop a Plutus script that executes each time an epoch ends. What's the best way to achieve this behaviour?
Falcon Stakepool's user avatar
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 (...
Kurt Sys's user avatar
  • 172
4 votes
3 answers
142 views

Discovering the script source based on address

How to find out what scripts / smart contracts are holding my assets and how could I recover these assets if the script allows? I have in my transactions log a transfer of 500 ADA to this script ...
Daniel Cukier's user avatar
1 vote
2 answers
70 views

Contract deployment in week03 is failing with "beneficiary signature missing"

When running the grab.sh script the following error occurs: ./grab.sh Command failed: transaction build Error: The following scripts have execution failures: the script for transaction input 0 (in ...
specpro's user avatar
  • 31
6 votes
3 answers
748 views

Can ADA locked on a script be staked?

I am curious to know what happens to ADA when it gets locked to a script as far as staking goes. In other words, can ADA locked at a script address by staked?
FTM's user avatar
  • 294
1 vote
0 answers
77 views

script for automation sending tokens [closed]

i just finished my first script and would love to share some ideas and also to listen your opinion for additional development. how the script works and what it does create Log file :) while (looping) ...
TTS17's user avatar
  • 346
0 votes
1 answer
133 views

How to build a script transaction if the validator expects it to be signed

Given the following smart contract: {-# INLINEABLE mkValidator #-} mkValidator :: PubKeyHash -> BuiltinData -> ScriptContext -> Bool mkValidator beneficiary _ ctx = traceIfFalse "tx ...
Jaanus Varus's user avatar
3 votes
5 answers
500 views

How to obtain wallet addresses of stake pool delegators?

I am trying to figure out how to write some scripts that will dish out rewards to delegators on my staking pool - I want to get the wallet addresses of delegators, and determine rewards based on the ...
Jay Imerman's user avatar
3 votes
1 answer
92 views

Verifiying a digital signature in a Plutus script

Is there a function like signedBy that I can call in a Plutus script to verify a digital signature?
Eric's user avatar
  • 85
0 votes
1 answer
363 views

How to split transaction into many different UTXOs?

Let's image I want to create a Plutus script, which takes Value as a parameter (ADA or any other coin with specific amount), and locks this value at script's output. How can I split this value into ...
serx's user avatar
  • 178
0 votes
1 answer
331 views

Hash script data

I want to understand a bit better the hash-script-data functionality from cardano-cli. I checked the source code but had no luck in understanding how this hash is made. From the examples, if we run: ...
glneto's user avatar
  • 206
2 votes
3 answers
798 views

How to get Policy Script for a specific policy-ID

how can i get the script information for a given policyID. I am mostly interested in the "invalidAfter" Slot number. So far i could not find any option for example by using Blockfrost API. ...
Andro's user avatar
  • 23
4 votes
1 answer
174 views

Script unlock cannot submit, budget overspent

I'm trying to unlock some token at a script address, so I create a tx with cardano-cli transaction build ... this passes successfully, then I sign the tx. It is now ready for submit but when I submit ...
Alain Magazin's user avatar
3 votes
1 answer
44 views

nix-build alonzo mainnet

I've installed cardano-node via nix-build: git clone https://github.com/input-output-hk/cardano-node cd cardano-node git checkout tags/1.29.0 -b 1_29_0 nix-build -A scripts.mainnet.node -o mainnet-...
Hud's user avatar
  • 433
4 votes
2 answers
130 views

Transaction Notification

is there any tool that sends a notification when a incoming transaction happening on your wallet? Or what is the best way to check it with a script
markus fischnaller's user avatar
7 votes
1 answer
233 views

Convert Plutus Address Credential to real-net address

So in Plutus we have the Address type which has two constructors ScriptCredential which is a ValidatorHash or PubKeyCredential which is a PubKeyHash but all these are not encoded in the same way as ...
Alain Magazin's user avatar
2 votes
0 answers
116 views

Weird behavior on validation of outputs

So I have a validator that, in particular, checks how many outputs are produced. os = txInfoOutputs info mkValidator :: ... mkValidator = traceIfFalse "Wrong outputs" checkOutput where ...
Alain Magazin's user avatar
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 ...
tycl's user avatar
  • 190
17 votes
5 answers
2k views

What is a Redeemer?

So I am currently on lecture 1 on the Plutus Pioneer Program. In the lecture they said the redeemer is the input information that the script uses to decide if a specific UTxO can be spent. I watched a ...
szhang9921's user avatar