Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 12 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
* [Setup `nft.storage` key](#setup--nftstorage--key)
* [Optional: Copy testnet node database](#optional--copy-testnet-node-database)
* [Start services](#start-services)
* [Start ogmios-datum-cache block fetcher](#start-ogmios-datum-cache-block-fetcher)
* [Optional: Mint your own NFTs](#optional--mint-your-own-nfts)
- [Components](#components)
* [`nft-marketplace`](#-nft-marketplace-)
Expand Down Expand Up @@ -65,24 +64,6 @@ Once the chain is synced, you should be able to view the dApp UI from `localhost

Ensure that Nami is set to Testnet, that you have some Test Ada, and that you've set collateral in Nami.


### Start ogmios-datum-cache block fetcher

Necessary untill [#20](https://github.com/mlabs-haskell/ogmios-datum-cache/issues/20) is implemented.

```shell
$ curl --location --request POST 'localhost:9999/control/fetch_blocks' -i\
--header 'Content-Type: application/json' \
--data-raw '
{
"slot": 44366242,
"id": "d2a4249fe3d0607535daa26caf12a38da2233586bc51e79ed0b3a36170471bf5"
}
'
```

Detaild block fetcher api is described [here](https://github.com/mlabs-haskell/ogmios-datum-cache/tree/9e8bcbe00f88715afdb202cd9654ec2adc72c09e#control-api).

### Optional: Mint your own NFTs

This process will be simplified in the future.
Expand Down Expand Up @@ -123,19 +104,21 @@ $ nix develop -L -c cabal run efficient-nft-pab

$ # In other console
$ # Mint underlying CNFTs, replace "CONVERTED_CID" with the result of `ipfs` command
$ curl --location --request POST 'localhost:3003/api/contract/activate'
$ curl --location --request POST 'localhost:3003/api/contract/activate' \
--header 'Content-Type: application/json' \
--data-raw '
{
"tag":"MintCnft",
"contents":[
{
"mc'"'"'name":"Cat number 123",
"mc'"'"'description":"Cat eating piece of cheese",
"mc'"'"'image":"ipfs://CONVERTED_CID",
"mc'"'"'tokenName":"cat-123"
}
]
"caID": {
"tag":"MintCnft",
"contents":[
{
"mc'"'"'name":"Cat number 123",
"mc'"'"'description":"Cat eating piece of cheese",
"mc'"'"'image":"ipfs://CONVERTED_CID",
"mc'"'"'tokenName":"cat-123" # This should be hex encoded (without 0x)
}
]
}
}'

$ # Go back to previous terminal and stop BPI
Expand Down
3 changes: 1 addition & 2 deletions arion-compose.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ let
nft-marketplace-server =
(pkgs.callPackage (import nft-marketplace-server/release.nix)
{ }).nft-marketplace-server;
ogmios-datum-cache = (pkgs.callPackage (import ogmios-datum-cache/release.nix)
{ }).ogmios-datum-cache;
ogmios-datum-cache = (import ogmios-datum-cache/default.nix).packages.x86_64-linux.ogmios-datum-cache;
cardano-transaction-lib-server = (import
cardano-transaction-lib/default.nix).packages.x86_64-linux."cardano-browser-tx-server:exe:cardano-browser-tx-server";
in {
Expand Down
13 changes: 9 additions & 4 deletions config/datum-cache-config.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
dbConnectionString = "host=postgresql-db port=5432 user=seabug dbname=seabug password=seabug"

saveAllDatums = true

server.port = 9999

ogmios.address = "ogmios"
ogmios.port = 1337

firstFetchBlock.slot = 44366242
firstFetchBlock.id = "d2a4249fe3d0607535daa26caf12a38da2233586bc51e79ed0b3a36170471bf5"
blockFetcher.autoStart = true
blockFetcher.startFromLast = true
blockFetcher.firstBlock.slot = 44366242
blockFetcher.firstBlock.id = "d2a4249fe3d0607535daa26caf12a38da2233586bc51e79ed0b3a36170471bf5"
blockFetcher.filter = '''
{
"address": "addr_test1wr05mmuhd3nvyjan9u4a7c76gj756am40qg7vuz90vnkjzczfulda"
}
'''