Questions tagged [offchain]

Code that is used in addition to the on-chain code (smart contracts). Most often this code builds and submits the transactions that are then validated on-chain.

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

How to Pull Transaction Information Using lucid-cardano Library in TypeScript?

I'm working on a Cardano project using TypeScript, and I'm trying to fetch transaction details using the lucid-cardano library. Specifically, I have a transaction hash and I'm interested in retrieving ...
Markos Girgis's user avatar
0 votes
2 answers
104 views

Lucid Error "End of input in bytes"

I am running the simple vesting script from PPP for the first time with Lucid and I continuosly get an error which doesn't give me much to understand what could realistically be the source of. the ...
user3755529's user avatar
3 votes
2 answers
56 views

Rust off-chain solutions

I am interested in learning Rust and I thought a good idea of doing so would be to build something on Cardano. What libraries and resources would you recommend for someone like me? I am specially ...
Mateus's user avatar
  • 978
0 votes
1 answer
155 views

How to resolve this "(FromAlonzoUtxoFail (UtxosFailure (ValidationTagMismatch (IsValid True)" transaction submission error on mesh library

I am getting this error on transaction submission. ""transaction submit error ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (UtxoFailure (FromAlonzoUtxoFail (...
duaa azhar's user avatar
0 votes
1 answer
48 views

Unable to attach two reference inputs to a transaction with Plutus Emulator

I have written a script that will fail unless it receives both oref1 and oref2 as reference inputs. I have the following emulator code: let rule = mempty <> C....
Eric's user avatar
  • 3
0 votes
1 answer
44 views

Plutus Emulator trace halting with MintingPolicyNotFoundError

I have the following simple minting script: {-# INLINABLE unrestricted #-} unrestricted :: () -> ScriptContext -> Bool unrestricted () _ = True unrestricted_policy :: MintingPolicy ...
Eric's user avatar
  • 3
0 votes
1 answer
75 views

OffChain code for inline datum

I am trying to create a OffChain code for submitting inline datums. gTest :: forall w s. GrabParams -> PlutusContract.Contract w s DataText.Text () gTest GrabParams{..} = do PlutusContract....
munx's user avatar
  • 13
2 votes
1 answer
143 views

InlineDatum on ReferenceOutput in OffChain code

I tried to use the inline datum of a reference input in the minting policy below: {-# INLINABLE validateMinting2 #-} validateMinting2 :: TxOutRef -> BuiltinData -> BuiltinData -> () ...
CantTouchDis's user avatar
0 votes
1 answer
65 views

Whether validation checks are necessary

In Plutonomicon github repo it says by the end of the page: For example, you don't need to prevent an unexpected transaction from locking value away - that's the submitter's own problem - but you do ...
Anastasia Martyniuk'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
0 votes
1 answer
47 views

Native token fee

I want to implement native token in a digital wallet. But I don't want users to have to pay a fee every time they transact with my token. On the other hand, I want the transactions to be recorded at ...
Pablo Chaco's user avatar
0 votes
2 answers
38 views

Is there a way using the cardano emulator trace to stop loging all the Contract logs?

Im using the trace emulator, but the debug info that I print in the terminal using logInfo is completly lost in middle of hundreds of lines of contract logs made automaticaly by the emulator. There is ...
Manu Padilla's user avatar
0 votes
1 answer
114 views

How do I add the staking part of an address in OffChain code

I am currently on tag: v2022-04-06 of plutus-apps and was wondering how to create Lookup and Constraints for a typedValidator that checks whether the input was returned to the script with the correct ...
CantTouchDis's user avatar
1 vote
0 answers
23 views

When is Contract instance actually finished running?

I'm trying to write tests for my smart contracts. I want to test if my contract has finished running by using this predicate: -- | A 'TracePredicate' checking that the wallet's contract instance ...
KugisMugis's user avatar
0 votes
1 answer
44 views

Emulator trace throws `BuiltinEvaluationFailure of UnIData` error with simple minting policy

Source https://github.com/tomazvila/plutus_minting_test Problem Running smart contract with simple minting use case fails to mint. Error Slot 00001: *** CONTRACT STOPPED WITH ERROR: "\"...
KugisMugis's user avatar
0 votes
2 answers
86 views

Using custom datum for `mustPayToOtherScript` in off-chain code

Lets say I on-chain i have a Datum like so: data RandomDatum = RandomDatum { { tn :: !TokenName , cs :: !CurrencySymbol , nn :: !Integer } deriving (Show) Off chain I'm trying to form and ...
KugisMugis's user avatar
1 vote
1 answer
82 views

How do Endpoints work?

and cant figure out what Endpoint do (why are they in the code) and most important of all how should I code them. What are the best practices?
KryptoKing's user avatar
1 vote
1 answer
96 views

Documentation for filtering through the inputs of a Plutus Script

I Have 1000 utxo's sitting at a script address with unique datums is there documentation for a validator so that when collectFromScript is called it only pulls 1 utxo based on the user input matching ...
Floof99's user avatar
  • 472