diff --git a/README.md b/README.md index 879d857..6e5d66f 100644 --- a/README.md +++ b/README.md @@ -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-) @@ -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. @@ -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 diff --git a/arion-compose.nix b/arion-compose.nix index 09530b2..cd734ef 100644 --- a/arion-compose.nix +++ b/arion-compose.nix @@ -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 { diff --git a/config/datum-cache-config.toml b/config/datum-cache-config.toml index 77aa3df..de90c5e 100644 --- a/config/datum-cache-config.toml +++ b/config/datum-cache-config.toml @@ -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" \ No newline at end of file +blockFetcher.autoStart = true +blockFetcher.startFromLast = true +blockFetcher.firstBlock.slot = 44366242 +blockFetcher.firstBlock.id = "d2a4249fe3d0607535daa26caf12a38da2233586bc51e79ed0b3a36170471bf5" +blockFetcher.filter = ''' +{ + "address": "addr_test1wr05mmuhd3nvyjan9u4a7c76gj756am40qg7vuz90vnkjzczfulda" +} +''' \ No newline at end of file diff --git a/ogmios-datum-cache b/ogmios-datum-cache index 9e8bcbe..78cf9db 160000 --- a/ogmios-datum-cache +++ b/ogmios-datum-cache @@ -1 +1 @@ -Subproject commit 9e8bcbe00f88715afdb202cd9654ec2adc72c09e +Subproject commit 78cf9dbe18da0801a348d3cb3ca9cae3adbbe0d5