From a31536ea0438ddb73c780e0987352ae9b8871c26 Mon Sep 17 00:00:00 2001 From: Calum Sieppert Date: Thu, 18 Aug 2022 09:35:19 -0600 Subject: [PATCH 1/4] Add seabug-onchain submodule --- .gitmodules | 3 +++ seabug-onchain | 1 + 2 files changed, 4 insertions(+) create mode 160000 seabug-onchain diff --git a/.gitmodules b/.gitmodules index b4644b6..e8c5dea 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,6 @@ [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/seabug-onchain b/seabug-onchain new file mode 160000 index 0000000..55e9b8a --- /dev/null +++ b/seabug-onchain @@ -0,0 +1 @@ +Subproject commit 55e9b8ad4093dd7acece998daf0e23253ec8e852 From ead5c44b2c99dac7f2725b4f28f7890de55df862 Mon Sep 17 00:00:00 2001 From: Calum Sieppert Date: Thu, 18 Aug 2022 10:05:51 -0600 Subject: [PATCH 2/4] Update references to `plutus-use-cases` --- README.md | 10 ++++++---- doc/protocol-notes.md | 2 +- scripts/prepare-wallet.sh | 29 ++++++++++++++++++++--------- 3 files changed, 27 insertions(+), 14 deletions(-) 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/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) From 94b30851eb515dcb5e22c3a6dd541551db4e9220 Mon Sep 17 00:00:00 2001 From: Calum Sieppert Date: Thu, 18 Aug 2022 10:09:29 -0600 Subject: [PATCH 3/4] Remove `plutus-use-cases` submodule --- .gitmodules | 3 --- plutus-use-cases | 1 - 2 files changed, 4 deletions(-) delete mode 160000 plutus-use-cases diff --git a/.gitmodules b/.gitmodules index e8c5dea..5249aae 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,9 +10,6 @@ [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 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 From 3c697d53904b4e1651ab9549fba4d42546a7954b Mon Sep 17 00:00:00 2001 From: Calum Sieppert Date: Thu, 1 Sep 2022 12:45:47 -0600 Subject: [PATCH 4/4] Update seabug-onchain to master --- seabug-onchain | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seabug-onchain b/seabug-onchain index 55e9b8a..77f9cb4 160000 --- a/seabug-onchain +++ b/seabug-onchain @@ -1 +1 @@ -Subproject commit 55e9b8ad4093dd7acece998daf0e23253ec8e852 +Subproject commit 77f9cb44adf9b39c6d6e76f3ca038abc2208d541