Questions tagged [script]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
22 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 ...
user avatar
  • 37
2 votes
1 answer
36 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 ...
user avatar
  • 369
0 votes
1 answer
96 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?
user avatar
0 votes
1 answer
28 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, ...
user avatar
1 vote
0 answers
21 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?
user avatar
1 vote
1 answer
21 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.
user avatar
1 vote
2 answers
30 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 -> ...
user avatar
0 votes
0 answers
19 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 ...
user avatar
1 vote
1 answer
49 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": [ "...
user avatar
0 votes
0 answers
90 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 ...
user avatar
  • 76
1 vote
2 answers
43 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?
user avatar
1 vote
1 answer
46 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 (...
user avatar
  • 172
3 votes
3 answers
50 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 ...
user avatar
1 vote
2 answers
56 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 ...
user avatar
  • 31
4 votes
3 answers
622 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?
user avatar
  • 264
1 vote
0 answers
39 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) ...
user avatar
  • 193
0 votes
1 answer
65 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 ...
user avatar
2 votes
5 answers
136 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 ...
user avatar
3 votes
1 answer
63 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?
user avatar
  • 41
0 votes
1 answer
184 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 ...
user avatar
  • 131
0 votes
1 answer
142 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: ...
user avatar
  • 166
2 votes
3 answers
536 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. ...
user avatar
  • 23
4 votes
0 answers
121 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 ...
user avatar
3 votes
1 answer
35 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-...
user avatar
  • 423
4 votes
2 answers
75 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
user avatar
5 votes
0 answers
139 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 ...
user avatar
2 votes
0 answers
108 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 ...
user avatar
6 votes
1 answer
115 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 ...
user avatar
  • 80
16 votes
5 answers
1k views

What exactly 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 ...
user avatar