diff --git a/.gitmodules b/.gitmodules index b4644b6..5249aae 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,9 +10,9 @@ [submodule "nft-marketplace"] path = nft-marketplace url = https://github.com/mlabs-haskell/nft-marketplace -[submodule "plutus-use-cases"] - path = plutus-use-cases - url = https://github.com/mlabs-haskell/plutus-use-cases [submodule "seabug-contracts"] path = seabug-contracts url = git@github.com:mlabs-haskell/seabug-contracts.git +[submodule "seabug-onchain"] + path = seabug-onchain + url = https://github.com/mlabs-haskell/seabug-onchain diff --git a/README.md b/README.md index 5a7b89b..f1a509d 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,9 @@ Relay node of Cardano blockchain. ### Onchain SmartContracts -- [Minting policy](https://github.com/mlabs-haskell/plutus-use-cases/blob/927eade6aa9ad37bf2e9acaf8a14ae2fc304b5ba/mlabs/src/Mlabs/EfficientNFT/Token.hs) -- [Locking script](https://github.com/mlabs-haskell/plutus-use-cases/blob/927eade6aa9ad37bf2e9acaf8a14ae2fc304b5ba/mlabs/src/Mlabs/EfficientNFT/Lock.hs) -- [Marketplace script](https://github.com/mlabs-haskell/plutus-use-cases/blob/927eade6aa9ad37bf2e9acaf8a14ae2fc304b5ba/mlabs/src/Mlabs/EfficientNFT/Marketplace.hs) -- [Fee collecting script](https://github.com/mlabs-haskell/plutus-use-cases/blob/927eade6aa9ad37bf2e9acaf8a14ae2fc304b5ba/mlabs/src/Mlabs/EfficientNFT/Dao.hs) +The onchain contracts are in the following files at the relevant commit of [seabug-onchain](https://github.com/mlabs-haskell/seabug-onchain/): + +- [Minting policy](https://github.com/mlabs-haskell/seabug-onchain/blob/master/src/SeabugOnchain/Token.hs) +- [Locking script](https://github.com/mlabs-haskell/seabug-onchain/blob/master/src/SeabugOnchain/Lock.hs) +- [Marketplace script](https://github.com/mlabs-haskell/seabug-onchain/blob/master/src/SeabugOnchain/Marketplace.hs) +- [Fee collecting script](https://github.com/mlabs-haskell/seabug-onchain/blob/master/src/SeabugOnchain/Dao.hs) diff --git a/doc/protocol-notes.md b/doc/protocol-notes.md index 811ee2c..dac9aba 100644 --- a/doc/protocol-notes.md +++ b/doc/protocol-notes.md @@ -1,6 +1,6 @@ # Self-Governed NFTs Protocol Notes -This document is my notes on the paper "Self-Governed NFTs on Cardano: Meta-Standard for Standards with Vertical and Horizontal Version Travel for a Decentralized Future" by Maksymilian Brodowicz, which describes the protocol used by the Seabug NFT marketplace. I wrote this because I found the paper hard to understand; this document is meant to be referenced alongside the paper to aid understanding. Also see the code [here](https://github.com/mlabs-haskell/plutus-use-cases/tree/main/mlabs/src/Mlabs/EfficientNFT) for a reference implementation of the protocol. +This document is my notes on the paper "Self-Governed NFTs on Cardano: Meta-Standard for Standards with Vertical and Horizontal Version Travel for a Decentralized Future" by Maksymilian Brodowicz, which describes the protocol used by the Seabug NFT marketplace. I wrote this because I found the paper hard to understand; this document is meant to be referenced alongside the paper to aid understanding. Also see the code [here](https://github.com/mlabs-haskell/seabug-onchain) for Seabug's implementation of the protocol. - Protocol involves two separate NFTs: - "Collection NFT" aka "underlying NFT": a traditional Cardano NFT to be imported to seabug diff --git a/plutus-use-cases b/plutus-use-cases deleted file mode 160000 index a825127..0000000 --- a/plutus-use-cases +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a8251270d17f67c6d2bfa9f55c15668b85567e05 diff --git a/scripts/prepare-wallet.sh b/scripts/prepare-wallet.sh index 6692ca7..26d6539 100755 --- a/scripts/prepare-wallet.sh +++ b/scripts/prepare-wallet.sh @@ -2,20 +2,31 @@ set -e TESTNET_MAGIC=1097911063 +WALLETS_DIR=data/wallets -cd plutus-use-cases/mlabs +mkdir -p $WALLETS_DIR + +pushd $WALLETS_DIR cardano-cli address key-gen --verification-key-file payment.vkey --signing-key-file payment.skey cardano-cli address build --payment-verification-key-file payment.vkey --out-file payment.addr --testnet-magic $TESTNET_MAGIC -PHK=$(cardano-cli address key-hash --payment-verification-key-file payment.vkey) +PKH=$(cardano-cli address key-hash --payment-verification-key-file payment.vkey) + +mv payment.skey signing-key-$PKH.skey + +ADDR=$(cat payment.addr) -mkdir -p pab/signing-keys -mv payment.skey pab/signing-keys/signing-key-$PHK.skey +mkdir $ADDR + +mv payment.addr $ADDR/payment.addr +mv payment.vkey $ADDR/payment.vkey +mv signing-key-$PKH.skey $ADDR/signing-key-$PKH.skey echo new wallet generated: -echo address: $(cat payment.addr) -echo PHK: $PHK +echo address: $ADDR +echo PKH: $PKH + +popd -echo file: $(ls payment.addr) -echo file: $(ls payment.vkey) -echo file: $(ls pab/signing-keys/signing-key-$PHK.skey) +echo $WALLETS_DIR/$ADDR: +echo $(ls $WALLETS_DIR/$ADDR) diff --git a/seabug-onchain b/seabug-onchain new file mode 160000 index 0000000..77f9cb4 --- /dev/null +++ b/seabug-onchain @@ -0,0 +1 @@ +Subproject commit 77f9cb44adf9b39c6d6e76f3ca038abc2208d541