input-output-hk / lobster-challenge Goto Github PK
View Code? Open in Web Editor NEWSimple Plutus contract to help give Charles' stuffed lobster a name
License: Apache License 2.0
Simple Plutus contract to help give Charles' stuffed lobster a name
License: Apache License 2.0
This is not an issue actually, I just wanna ask to understand more.
Why do we need to specify exactly 2034438 lovelace
in this line https://github.com/input-output-hk/lobster-challenge/blob/main/scripts/lobster-contribute.sh#L65 . Can we use different amount of lovelace?
...
--tx-out "$scriptAddr + 2034438 lovelace + $nftValue + $counterValue + $votesValue" \
...
Hi. I was trying to get this to work but I am getting the following error:
./lobster-contribute.sh 9c6b35e796e6a1e88e5836087bad37096a60e46cf993e1ace522845d1e382e98#0 cf944108d7130a8d53925ff9903a254d5133d5978b7e69e04c67d5b8776a6fb2#1 addr.wallet sign.key 522 550 501
wallet utxo: 9c6b35e796e6a1e88e5836087bad37096a60e46cf993e1ace522845d1e382e98#0
script utxo: cf944108d7130a8d53925ff9903a254d5133d5978b7e69e04c67d5b8776a6fb2#1
bodyfile: lobster-tx-body.03
outfile: ./lobster-tx.03
nftPolicyfile: nft-mint-policy.plutus
nftPolicyid: cc7888851f0f5aa64c136e0c8fb251e9702f3f6c9efcf3a60a54f419
otherPolicyfile: other-mint-policy.plutus
otherPolicyid: fda1b6b487bee2e7f64ecf24d24b1224342484c0195ee1b7b943db50
nftValue: 1 cc7888851f0f5aa64c136e0c8fb251e9702f3f6c9efcf3a60a54f419.LobsterNFT
counterValue: 550 fda1b6b487bee2e7f64ecf24d24b1224342484c0195ee1b7b943db50.LobsterCounter
votesValue: 502 fda1b6b487bee2e7f64ecf24d24b1224342484c0195ee1b7b943db50.LobsterVotes
walletAddress: addr1qxkyymdeg9fyf57ac7sxcde7dez2f03eu8njzs3jqnv873m248usrxhjl4eksql9t69d8gg04jkraqsvszuq2sd4flfqneqgxy
scriptFile: lobster.plutus
scriptAddress: addr1w8433zk2shufk42hn4x7zznjjuqwwyfmxffcjszw5l2ulesdt3jff
signing key file: sign.key
old counter: 522
new counter: 550
increaseValue: 28 fda1b6b487bee2e7f64ecf24d24b1224342484c0195ee1b7b943db50.LobsterCounter + 1 fda1b6b487bee2e7f64ecf24d24b1224342484c0195ee1b7b943db50.LobsterVotes
old votes: 501
new votes: 502
querying protocol parameters
Command failed: transaction build Error: The following scripts have execution failures:
the script for transaction input 1 (in the order of the TxIds) failed with The Plutus script evaluation failed: An error has occurred: User error:
The provided Plutus code called 'error'.
any ideas why?
I'm having trouble building the transaction to communicate with the smart contract. When attempting to run the lobster-contribute script, cardano-cli is giving me an error because it thinks the tx-out is not formatted correctly. I haven't changed the code for this script so I'm a little confused as to why this is.
This is the line that's causing the problem: https://github.com/input-output-hk/lobster-challenge/blob/main/scripts/lobster-contribute.sh#L65
...
--tx-out "$scriptAddr + 2034438 lovelace + $nftValue + $counterValue + $votesValue" \
...
The following is the error message that I'm getting
option --tx-out:
unexpected end of input
invalid address
The pertinent values here are:
scriptAddress: addr1w8433zk2shufk42hn4x7zznjjuqwwyfmxffcjszw5l2ulesdt3jff
nftValue: 1 cc7888851f0f5aa64c136e0c8fb251e9702f3f6c9efcf3a60a54f419.LobsterNFT
counterValue: 6677 fda1b6b487bee2e7f64ecf24d24b1224342484c0195ee1b7b943db50.LobsterCounter
votesValue: 160 fda1b6b487bee2e7f64ecf24d24b1224342484c0195ee1b7b943db50.LobsterVotes
Does anyone know why cardano-cli is throwing this error?
Hi, I'm documenting two local changes I made in order to run the lobster-contribute.sh
script. Hopefully this helps others! I'm using a Mac, so I'm not sure if other environments would have had similar issues.
Full script signature (run from scripts
folder):
./lobster-contribute.sh <my_utxo> <lobster_script_utxo> <my_payment_address_path> <my_payment_signing_key_path> <old_counter> <new_counter> <old_votes>
Changes needed:
CARDANO_NODE_SOCKET_PATH
is correct in the script files. Two options:export CARDANO_NODE_SOCKET_PATH
line in shell scripts, since it's likely already set in .bashrc or .zshrc.CARDANO_NODE_SOCKET_PATH
to the correct location for your node.socket
file.lobster-contribute.sh
, lobster-deploy.sh
, lobster-mint-nft.sh
, mainnet-query-protocol-parameters.sh
, and mainnet-utxo-at.sh
cardano-cli
.cardano-cli
is available in the scripts. I just removed ./
in front on cardano-cli
in the following scripts (assuming cardano-cli
is already available in your $PATH
):
lobster-contribute.sh
, lobster-deploy.sh
, lobster-mint-nft.sh
, mainnet-query-protocol-parameters.sh
, mainnet-script-address.sh
, mainnet-utxo-at.sh
, and policyId.sh
./mainnet-utxo-at.sh addr.lobster
TxHash TxIx Amount
--------------------------------------------------------------------------------------
0d515edcbe9aeb93b212f3953d3bba502f46a311eb39ffbd367f2f8277b8ccc4 1 2034438 lovelace + 1 cc7888851f0f5aa64c136e0c8fb251e9702f3f6c9efcf3a60a54f419.LobsterNFT + 3870 fda1b6b487bee2e7f64ecf24d24b1224342484c0195ee1b7b943db50.LobsterCounter + 97 fda1b6b487bee2e7f64ecf24d24b1224342484c0195ee1b7b943db50.LobsterVotes + TxOutDatumHash ScriptDataInAlonzoEra "45b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0"
319752b414804415988fb1165358e69f46095a9e9b1c01ef0830c182dc57f78b 0 1000000 lovelace + TxOutDatumHashNone
4c34feb07e32aa4855a494306aefcf16743356811914d680e112a6ec12214455 0 1000000 lovelace + TxOutDatumHashNone
63091c70aa6f8b402faffd24909d93c7721cbdced7094b62e52d157da8fb44e4 0 5000000 lovelace + TxOutDatumHashNone
67d318fabdd9905033bfe6156c6595716c952d496cabb9d98773c948974780ec 0 1000000 lovelace + TxOutDatumHashNone
cb7b44500fc9145cf5b13a533bc7616eb219b7a080bc49d7ce6204c06b351733 0 1000000 lovelace + TxOutDatumHashNone
db250ed5eb4454843af19dea7ca84a8adda170fc88284e7e5e2381b41dab5f9b 1 30768137 lovelace + TxOutDatumHashNone
./mainnet-utxo-at.sh addr.wallet
TxHash TxIx Amount
--------------------------------------------------------------------------------------
9e3411c4de5a0cb5a7fd731d73a8233fd55b2cc3fc840854592bd2fb0b200200 0 10000000 lovelace + TxOutDatumHashNone
payment.skey (redacted cborHex content) :
{
"type": "PaymentExtendedSigningKeyShelley_ed25519_bip32",
"description": "Payment Signing Key",
"cborHex": ""
}
./lobster-contribute.sh 9e3411c4de5a0cb5a7fd731d73a8233fd55b2cc3fc840854592bd2fb0b200200#0 0d515edcbe9aeb93b212f3953d3bba502f46a311eb39ffbd367f2f8277b8ccc4#1 addr.wallet payment.skey 3870 4137 97
wallet utxo: 9e3411c4de5a0cb5a7fd731d73a8233fd55b2cc3fc840854592bd2fb0b200200#0
script utxo: 0d515edcbe9aeb93b212f3953d3bba502f46a311eb39ffbd367f2f8277b8ccc4#1
bodyfile: lobster-tx-body.03
outfile: lobster-tx.03
nftPolicyfile: nft-mint-policy.plutus
nftPolicyid: cc7888851f0f5aa64c136e0c8fb251e9702f3f6c9efcf3a60a54f419
otherPolicyfile: other-mint-policy.plutus
otherPolicyid: fda1b6b487bee2e7f64ecf24d24b1224342484c0195ee1b7b943db50
nftValue: 1 cc7888851f0f5aa64c136e0c8fb251e9702f3f6c9efcf3a60a54f419.LobsterNFT
counterValue: 4137 fda1b6b487bee2e7f64ecf24d24b1224342484c0195ee1b7b943db50.LobsterCounter
votesValue: 98 fda1b6b487bee2e7f64ecf24d24b1224342484c0195ee1b7b943db50.LobsterVotes
walletAddress: addr1qxuv7vx66gaa9ymv7uqmwx54lqhflmjf26welcfc0a7d600f2nvzry2vgzxmp92e2vvymklv64frmk3rfdduh3crdcls3jaak0
scriptFile: lobster.plutus
scriptAddress: addr1w8433zk2shufk42hn4x7zznjjuqwwyfmxffcjszw5l2ulesdt3jff
signing key file: payment.skey
old counter: 3870
new counter: 4137
increaseValue: 267 fda1b6b487bee2e7f64ecf24d24b1224342484c0195ee1b7b943db50.LobsterCounter + 1 fda1b6b487bee2e7f64ecf24d24b1224342484c0195ee1b7b943db50.LobsterVotes
old votes: 97
new votes: 98
querying protocol parameters
Command failed: transaction build Error: The following scripts have execution failures:
the script for transaction input 0 (in the order of the TxIds) failed with The Plutus script evaluation failed: An error has occurred: User error:
The provided Plutus code called 'error'.
saved transaction to lobster-tx-body.03
Command failed: transaction sign Error: lobster-tx-body.03: lobster-tx-body.03: openBinaryFile: does not exist (No such file or directory)
signed transaction and saved as lobster-tx.03
Command failed: transaction submit Error: lobster-tx.03: lobster-tx.03: openBinaryFile: does not exist (No such file or directory)
submitted transaction
Running Cardano-cli 1.29.0 (running it from a pool relay node). I can't see anything obviously wrong here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.