This repository is built upon the EnglishAuction example from the plutus-pioneer-program.
Set up the plutus platform.
- run
cabal build
- run
cabal repl
- run
import Auction.Trace
- now you can run a trace for every endpoint (startTest, bidTest, closeTest) and test to show a full example.
- Install and run a
cardano-node
on the testnet, you'll now have a node.socket file. Put the path to this file in the env variableCARDANO_NODE_SOCKET_PATH
- run
TESTNET=--testnet testnet-magic 1097911063
- save your vkey, skey, addr files in testnet/wallets/
- run
cardano-cli address key-hash --payment-verification-key-file /pathToYour/vkey/file
to get your PubKeyHash - build the project with
cabal build
(/auction) - run
cabal run auction-plutus
- copy the resulting
auction.plutus
file in the testnet folder - run
cardano-cli address build --payment-script-file auction-testnet.plutus $TESTNET > auction-testnet.addr
- run
./offerToken.sh tokenName your_wallet_name CurrencySymbol deadline(in minutes) minBid(in Lovelace)
- run
./mkBid.sh tokenName your_wallet_name price bidAmount wallet_to_refund
- run
./closeSale.sh tokenName your_wallet_name