Questions tagged [smart-contract]

A digital agreement that specifies where funds/tokens/assets should go, and under what conditions they will be sent, executing a deal only when all the conditions are met.

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

Why canot deploy smart contracts to the KEVM testnet using mellat?

Recently I want to deploy a smart contract to the KEVM and EVM testnet using mellat, but after a few minutes of the deployment, I cannot find the transaction in the KEVM or EVM explorer using that ...
2
votes
1answer
62 views

How to create a programmable NFT?

Is it possible to create a gif or video NFT? For example, every time the user clicks on the image, an animation plays once or on repeat over the image. I do not see any guides on this and would ...
0
votes
0answers
21 views

Calculating Coverage for unit tests

Has anyone tried to calculate the coverage (either as functions or lines of the plutus smart contract) tested with the unit tests with tools such as HPC? any suggested tools to check the coverage of ...
3
votes
1answer
31 views

What does it mean for a contract to "stop"?

I'm working through the week 4 homework for the Plutus Pioneer program. I've found an answer to the homework problem and now I'm trying to get a deeper understanding of the code. I've noticed that the ...
5
votes
1answer
106 views

How to run smart contracts in the Cardano Blockchain?

I know that since Alonzo was launched smart contracts can be published in the blockchain now, but I have no idea how to do it. I have read some articles about the Plutus Application Backend though, it'...
3
votes
0answers
71 views

What are the best solutions for randomness in Cardano?

I would like to create a gambling Dapp and for this I need a provably fair RNG. What are the best solutions for provably fair randomness in Cardano Will Cardano add Chainlink VRF in the future?
0
votes
1answer
38 views

Pool Rewards distribution via SmartContract

For the Pool I run I would like to setup a SmartContract which automatically claims the rewards and sends a certain percentage to each of three organisation I support. Is such a thing possible with ...
2
votes
1answer
57 views

What's the difference between programmable validators and smart contracts?

Charles Hoskinson indicated in this tweet that he favors the term "programmable validator" to the term "smart contract" with regard to Cardano. Quoting the tweet Charles Hoskinson ...
2
votes
1answer
43 views

How to return funds from a smart contract

If I have assets (can be just ADA for simplicity) locked in a contract, how can I release the funds to the previous owners most efficiently? Some more context regarding the question. I created a pay ...
0
votes
1answer
55 views

Question about Datum and DatumHash

I have a question about findDatum which is used in some of example contracts in Plutus Pioneer Program. According to those lectures, this method is used to get Datum from its DatumHash. I wonder if it ...
1
vote
1answer
78 views

Should I use Marlowe or Plutus to create my native token?

Should I use Marlowe or Plutus to create my token? I also want to create a TCG in which my token will have an utility. Where should i start? (tutorial, how-to, examples ...).
2
votes
2answers
113 views

How to deploy plutus/marlowe contract on Cardano blockchain

i am developing smart contract in plutus/marlowe playground which i compiled and simulate contracts successfully but now i want to deploy a contract on Cardano blockchain
3
votes
0answers
36 views

PAB recovering from Errors

In the current version of the Plutus starter repo (commit a85818 which uses plutus-1.0.9), it seems difficult to know where to handle errors. For example, using the Game contract after initialization ...
4
votes
1answer
90 views

Can a smart contract read the presence of an NFT in the redeemers wallet?

I want to use an NFT as a form of authentication for a Plutus contract. I know I can attach the NFT in the Datum when constructing the transaction and return the NFT in the output however I am worried ...
0
votes
0answers
16 views

Financial Contracts With Marlowe Pub KeyHash Question

Background: I've been looking to integrate smart contracts into my app and I came across this passage on the Marlowe site: A Party is represented as either a public key hash or a role name. data ...
5
votes
1answer
90 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 ...
1
vote
1answer
32 views

Getting the address of a parameterized contract from within the validator of another script

Suppose I have one contract, Contract 1, that is parameterized by type Contract1Params{ tokenName :: BuiltinByteString } and I have a minting policy that will only mint a token with tokenName tn ...
0
votes
2answers
29 views

Advanced Payment Integration

I understand this is all new and still very early but I'm wondering if more advanced payment integration is possible. I went through the example of accepting payments, but I have an app releasing soon ...
0
votes
1answer
37 views

Are Smart Contracts bytecode encrypted?

As the title states, is a smart contract's live machine code encrypted, ciphered, or otherwise shielded? Say a user wants to create a SC to send whatever Ada it receives, at a specified interval, to ...
0
votes
3answers
65 views

Can a smartcontract access the state of its own address?

As the title says, is there a way for the smart contract to read all UTxOs on its own address and also verify that all UTxOs were used to determine token count on the address. For example users send ...
0
votes
1answer
50 views

How do I set up a smart contract?

I want to request a payment from a business via a smart contract, do I need to know how to code the contract myself? I’d also appreciate some guidance on the following; What do both parties need to ...
2
votes
1answer
102 views

How to start coding Cardano Smart Contracts?

I have some ideas which including the use of smart contracts. The thing is that i don't know anything coding them. So my question is, where should i start to learn doing it. I mean every programmer ...
5
votes
1answer
83 views

Documentation for smart contract deployment on testnet & mainnet

Can somebody point out where I can get the doc for smart contract deployment on testnet & mainnet? I am testing on plutus playground now and would deploy on testnet to try. Thanks in advance.
4
votes
0answers
115 views

Is there a good tutorial to mint Cardano NFT using plutus script?

I used to mint Cardano NFT using "Time locking" following this guide https://developers.cardano.org/docs/native-tokens/minting-nfts/. But I know the more formal way is to use plutus script ...
0
votes
0answers
27 views

Cardano marketplace that allows selling a batch of NFTs

anyone aware of a cardano marketplace that allows us to mint NFTs in batches that will launch with smart contracts launch or at least close to the launch? So e.g. 1 policy ID, 10000 asset names that ...
7
votes
2answers
554 views

Creating Cardano Non-Fungible Tokens with royalties for newbies

I've been looking around since last week and I need directions to create my own non-fungible tokens with royalties. Do I need to learn how to create a smart contract for this myself? or are there ...
3
votes
1answer
58 views

Issues with oracle concurrency

I'm sort of running into an issue with the oracle described in the PPP. It looks like there is race between the oracle to update the exchange rate and the users to use the exchange rate in a swap. We ...
2
votes
1answer
62 views

Plutus pioneer program - Lecture #1 - Can't understand behaviour of transactions

Why is the second bid of wallet 2 getting ignored when I test it like this? If the first transaction of wallet 2 was also valid, then the second suceeds. I'm just curious if this is somehow expected ...
4
votes
1answer
179 views

How do I deploy a smart contract from another smart contract?

If I want to create one top level contract for creating a bunch of other, similar contracts, lets say a top level Uniswap contract that creates liquidity pool contracts and keeps track of the total ...
12
votes
6answers
1k views

The Concurrency Issue

Are there any solutions to the concurrency issue so far without sacrificing decentralization? MinSwap testnet was experiencing this last night and just looking for some clarification, haven't seen ...
4
votes
0answers
39 views

Canonical example of Smart Contract Verification?

Given that the chief benefit of Cardano Smart Contracts over Ethereum Smart Contracts is formal verification (and thus its implied validity, security, and robustness), is there a non-trivial example ...
2
votes
1answer
48 views

Is it possible to withdraw rewards with smart-contracts?

I would like to automatically withdraw my rewards and send it in different wallets. Is it already technically possible? Thanks, Regards, Anthony
3
votes
1answer
44 views

Access Control for my company's vehicle

I wish to delegate access control with a Phone-As-A-Key DApp for vehicles (for sharing the vehicle, P2P rentals and more). When delegating access control, the DApp will update a smart contract which ...
2
votes
1answer
25 views

would anyone reply/share who is working on inventory and shipping solutions with Cardano?

would anyone reply/share who is working on inventory and shipping solutions with Cardano? storage shipping automation price quotes samples contracts distribution
2
votes
1answer
77 views

How is access control managed with smart contracts in (e)UTXO?

I've seen Charles mention this a little bit in some of his videos. He sort of laughs it off like the answer is obvious, but I'm not deep into the technicals. I also had an Ethereum developer bring it ...
5
votes
1answer
87 views

Change minted tokens recepient

I am trying to create a dApp in which "accounts" are authenticated using a minting policy script. It should work by only allowing the minting of tokens if they are sent to an arbitrary ...
4
votes
2answers
114 views

Can smart contracts be used to mint native assets?

Cardano doesn't need to use smart contracts to mint native assets. But is it possible to mint native assets using smart contracts? And if so, is there an example how this can be done?
1
vote
0answers
86 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 ...
5
votes
2answers
128 views

Can you write dapps in C based languages?

Are there any good YouTube videos that are walk-through style for using a C-based language to write smart contracts, issue tokens and create NFTs?
9
votes
2answers
573 views

Where does a smart contract exist, in EUTxO?

In particular, I want to know whether the smart contract is somehow its own entity in the blockchain, or if a smart contract is just a property that EUTxOs may pick up. EUTxOs are bound by smart ...
5
votes
1answer
88 views

Cardano Smart Contract Architecture Diagrams?

I am a "big picture" kind of person (yes, INTJ) and I am looking for a high-level overview of the Cardano Smart Contract Architecture. Did a preliminary google search and read a few articles ...
2
votes
1answer
32 views

Researching potential smart contract use in streamlining spare parts supply chain

I'm researching the potential for blockchain smart contracts to be utilized for streamlining order fulfillment against requirements contracts; and possibly other contracting/acquisition uses. By way ...
4
votes
4answers
125 views

Are fees collected for invalid transactions?

Let's say I construct an invalid transaction, that wants to spend UTXOs sitting at a script address and send it to the network for validation. The script then validates the transaction and fails so ...
5
votes
2answers
137 views

Pioneer Lecture 4 recursion - how is it not infinite?

In the solution for the Lecture #4 (cohort 1 I guess, I'm following on Youtube) payContract :: Contract () PaySchema Text () payContract = do pp <- endpoint @"pay" let tx = ...
9
votes
1answer
289 views

Where is stored off-chain code?

As I understand, a smart contract in Cardano contains on-chain code and off-chain code. On-chain code is executed by cardano nodes in order to validate transaction. Off-chain code builds a ...
5
votes
1answer
64 views

Should I hold ADA as company to pay fees and issue Native Tokens for my game?

As far I know Carano will allow to pay fees in Native Tokens, so fees will be on ADA + a reward. But I have questions about it after reading this blog post from IOHK. If I'm running the economy of my ...
3
votes
2answers
55 views

Staking functionality for Native Tokens?

Is it possible to have staking or reward functionalities, maybe minting, with your Native Tokens in Cardano?
1
vote
1answer
41 views

illegal symbol `forall` in type, RankNTypes

I am trying to build Future.hs from plutus-use-case from scratch. I take two files from plutus-starter: cabal.project as is, and plutus-starter.cabal that I have to edit according to the imports in ...
4
votes
0answers
54 views

Invoking lock endpoint on the plutus-starter guessing game is giving me "endpoint not available" error

Using the nix-shell approach, I'm able to build and execute the plutus starter PAB project, which includes the guessing game contract. GIT repo link In a separate terminal window, I can run the GET ...
4
votes
1answer
100 views

Smart contract datum encryption

Is there any way to make datum data only visible to a smart contract that owns the UTXO? For example, lets say I wanted to make a guessing game. In this game, person A selects a number and creates an ...