We changed our privacy policy. Read more.

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
11 views

After installing Daelalus wallet cardano-node on Mac 11.6 then cardano-node cardano-cli - how should I best reduce the code to a single cardano-node?

Advice requested on how to finish setting up my node after first installing: DAEDALUS Mainnet macOS build 18992, Cardano Node 1.29.0, Cardano Wallet 2021.9.9 Then in order to get the command line ...
1
vote
2answers
52 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
0
votes
0answers
22 views

completed pioneer program cohort#2, How do I unlock my certification?(as per NFT details mentioned

Will I be certified? Yes, we will be awarding certificates to those pioneers who successfully complete the entire program. Certificates will be represented as non-fungible tokens (NFTs) (on the ...
2
votes
0answers
28 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 ...
3
votes
1answer
73 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 ...
3
votes
0answers
52 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
28 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
25 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
35 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
63 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
42 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 ...
1
vote
1answer
88 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 ...
2
votes
1answer
64 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.
2
votes
0answers
90 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
25 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 ...
4
votes
2answers
350 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 ...
2
votes
1answer
54 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
61 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 ...
3
votes
1answer
160 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 ...
3
votes
0answers
38 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
47 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
2
votes
1answer
38 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 ...
1
vote
1answer
23 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
76 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 ...
4
votes
1answer
74 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 ...
3
votes
2answers
110 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
84 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 ...
4
votes
2answers
125 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
541 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 ...
4
votes
1answer
87 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 ...
3
votes
4answers
118 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 ...
4
votes
2answers
132 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
278 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 ...
4
votes
1answer
63 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 ...
2
votes
2answers
52 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
37 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 ...
3
votes
0answers
49 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 ...
3
votes
1answer
89 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 ...
3
votes
2answers
70 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 [|| ...
4
votes
1answer
73 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 ...
4
votes
1answer
102 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: ...
4
votes
1answer
144 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 ...
5
votes
1answer
69 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?
3
votes
1answer
77 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 ...
2
votes
2answers
64 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.
6
votes
1answer
111 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?