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
4
votes
2answers
73 views

plutus pioneer week01 src code explain

I'm a little confused about the following code(from EnglishAuction.hs): auctionInstance :: Scripts.ScriptInstance Auctioning auctionInstance = Scripts.validator @Auctioning $$(PlutusTx.compile [|| ...
5
votes
1answer
79 views

Writing basic validator scripts

I need someone to explain to me line by line. The code is from plutu tutorials. https://docs.cardano.org/projects/plutus/en/latest/plutus/tutorials/basic-validators.html All the code in that page I ...
5
votes
1answer
118 views

What does two consecutive apostrophes mean in Haskell and Plutus?

I have noticed the frequent appearance of two consecutive apostrophes in Haskell code. Like this: newtype Date = Date Integer data EndDate = Fixed Integer | Never unstableMakeIsData ''Date ...
1
vote
0answers
14 views

Mallet IELE Compiler crashes without Uncaught Error

I was able to get mallet running with the command ./mallet iele -d . I created a simple contract that works in Remix but when I try to compile the contract using iele I get a Uncaught 'Compiler error: ...
5
votes
1answer
151 views

When actually a validator is deployed to the blockchain?

I'm re-watching the Plutus Pioneer Program and in the video #2 I don't exactly get it here: https://youtu.be/E5KRk5y9KjQ?t=1782 There's the same contract code used by Wallet1 and Wallet2. Each of them ...
6
votes
1answer
71 views

How to know if a transaction (tx) succeed or failed after awaitTxConfirmed?

How to know if a transaction (tx) succeed or fail after awaitTxConfirmed? Is there any function to get a tx on-chain by TxId?
4
votes
1answer
86 views

Is it possible to make multiple transactions atomic?

A concrete example would be flash loans, where you could borrow some value from a lending script, do something interesting with it, and return the borrowed amount to the script with a fee, all in one ...
3
votes
2answers
66 views

Will the Cardano Rust project eventually allow you to write Smart Contracts?

Discovered this: https://cardanorust.iohk.io/ Looks great. Any rough sense on when Cardano Rust will support smart contracts? Is it being worked on now? Would be amazing.
7
votes
1answer
122 views

How to stake a smart contract's money?

Is it possible to delegate the money locked in a smart contract? And how? Using what haskell instructions?
12
votes
1answer
139 views

Transaction fees and smart contract complexity

I've read here and there, perhaps incorrectly, that the transaction fees depend on the size of the transaction (in bytes). However, with smart contracts, the difficulty to process a transaction is not ...
7
votes
1answer
85 views

Can Marlowe contracts involve native assets?

Can Marlowe contracts involve native assets? For example if I want to issue a bond denominated in USDC
5
votes
2answers
127 views

How can an oracle guarantee certain update rates respectively uptime?

After reading the question General approach for allowing multiple smart contract transactions per block I'm wondering how an oracle can guarantee update rates respectively uptime. If too many ...
5
votes
2answers
199 views

What are technical differences in smart contract execution on Cardano in comparison to Ethereum?

In my understanding, smart contracts on Cardano are always provided to the blockchain via a transaction and there is no code that is stored at the blockchain, but just a hash (the public key address). ...
19
votes
5answers
721 views

General approach for allowing multiple smart contract transactions per block

In some applications, multiple users interact with the same smart contract and may want to do it at about the same time. Such interaction involves updating the state of the smart contract as embodied ...
7
votes
2answers
99 views

Referencing onchain contract as 3rd party

In solidity and EVM, it is possible to reference external contracts by providing the address and interface to the contract: address ckAddress = 0x06012c8cf97BEaD5deAe237070F9587f8E7A266d; ...
5
votes
4answers
234 views

Node.js - Plutus/Haskell Wrapper

Do you think a Node.js/JavaScript Wrapper for the Plutus programming language (I think it was Haskell?) is possible? This would bring millions of developers onto the Cardano ecosystem and their smart ...
8
votes
3answers
369 views

NFT Royalties before smart contracts

I want to receive royalties every time my NFT is sold. Since there is still no smart contract yet, is it pointless to mint my NFT right now? Is it possible to add the royalty functionality after ...
0
votes
3answers
171 views

Smart Contract Idea [closed]

I wanted to know how one can submit ideas but not in a public domain but the idea is already in the question so it doesn't matter. So the question is: If I wanted to submit ideas how would I go about ...
5
votes
2answers
288 views

How can smart-contract disputes be addressed?

How will disputes in a smart-contract obligation be managed? How is fraud prevented if a party does not fulfil an obligation? When there are various jurisdictions, there may be different governing ...
7
votes
1answer
218 views

How are unused/outdated smart contracts handled on Cardano?

How will unused, outdated smart contracts be handled? Or say a developer makes a mistake in the contract and needs to redeploy it, what happens to that old contract? Would a lot of Unused contracts ...
4
votes
4answers
436 views

Where can I find design and documentation resources for Cardano Smart Contracts?

I’d like to better understand the design and features of the upcoming Cardano smart contracts. Where is the design guidance & documentation posted for them, including their planned functionality, ...
3
votes
1answer
77 views

Is Cardano working on any solutions to work out disputes between parties? [closed]

I know dispute resolution within smart contracts (when used as a method of transaction) is not a simple issue. Is Cardano working through any innovative solutions to work out disputes between two ...
6
votes
3answers
218 views

Are there any plans to have a bridge between the Cardano and Cosmos blockchains?

Are there any plans to have a bridge between the Cardano and Cosmos blockchains? Cosmos is working on the gravity-bridge which is a bridge between Ethereum and Cosmos so I assume there must be some ...
7
votes
1answer
130 views

Is there an equivalent to the Wallet Connect protocol in the Cardano ecosystem?

With the Alonzo update approaching, many teams seem to be working on DeFi projects that will go out along the Smart Contracts feature. On Ethereum, most DeFi projects use the Wallet Connect open ...
8
votes
1answer
84 views

Cardano-Ethereum Bridge

What is the best way to write a smart contract that will work across both Cardano and Ethereum? It doesn't have to be released yet but preferably something that will be usable by the end of the year. ...
13
votes
4answers
511 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 ...
17
votes
1answer
109 views

Randomness in a smart contract

Is it possible to get randomness in a smart contract? E.g. I would like the validator to randomly choose between two conditions to use to validate a transaction. Such a capability could be used for ...
-3
votes
1answer
47 views

Price regulation of the ADA token [closed]

What is the economics behind the value of ADA in fiat currency? Assuming that bitcoin will dominate 100% of the "store-of-value" market, and taking speculation out of the equation, I don't ...
10
votes
1answer
98 views

How can I write unit tests for Plutus contracts?

I'm a member of Plutus Pioneer Program. I already know about the Plutus Playground and like it very much. However, clicking all the blockchain action scenarios each time is very time-consuming, ...
5
votes
1answer
54 views

Logistics of Developing Contracts

We've done a lot of development on the Plutus Playground; in what ways will the logistics of developing and deploying contracts differ in Gougen?
8
votes
1answer
97 views

When smart contracts launch, will every node on the network have to run every contract transaction?

When smart contracts launch, will every node (relay and producer) have to execute all contracts executions, and therefore all see the same increase in resource usage? My inkling is that they have to (...
17
votes
2answers
160 views

How can smart contracts interact each other?

If the "context" of a smart contract can see only the transaction where it sits and its inputs-outputs, how can a smart contract interact with other smart contracts living in different ...
13
votes
3answers
190 views

What's the difference between "on-chain" and "off-chain" in plutus smart contracts?

Smart contracts written in Plutus can be divided in two: an on-chain part and an off-chain part. What's the main difference between these two?
8
votes
2answers
94 views

Why Strict Evaluation Operator "!" used in record definition implemented in Plutus Core?

While declaring records for use in Plutus strict operator is used like this: data Auction = Auction { aSeller :: !PubKeyHash , aDeadline :: !Slot , aMinBid :: !Integer , aCurrency :: !...
11
votes
1answer
58 views

Are the locked funds in a contract still considered as delegated to a wallet and can get staking rewards?

The question here is if script-locked outputs can still have a staking key associated with them (decided by the person creating the output) and whether this enables the funds to be delegated in a ...
6
votes
1answer
50 views

What is the maximum timeout for a contract that you can define in Marlowe?

We know that Marlowe contracts always end mandatorily because a maximum timeout is defined. I wonder what the maximum timeout is, it seems like you can put a huge epoch/slot in which would be ...
8
votes
2answers
183 views

What is the maximum number of contracts Cardano can store?

I see Ethereum (ETH) can store 2256 smart contracts, so is there any description about this for Cardano, i.e. how many contracts can Cardano store?
9
votes
3answers
259 views

How will DApps work on Cardano?

This may been too broad of a question but I was hoping to ask a few specific questions here rather than over multiple questions. I don't think DApps are available yet but I'm sure people have started ...

1
2