From 11c72d8e6b0b87b7b32b6ae6173e2964630c53e4 Mon Sep 17 00:00:00 2001 From: boneyard93501 <4523011+boneyard93501@users.noreply.github.com> Date: Mon, 11 Jul 2022 19:25:34 -0500 Subject: [PATCH] add ipfs adapter --- .../configs/Config.toml | 20 ++++++++++++++ .../configs/deployment_cfg.json | 27 +++++++++++++++++++ .../scripts/build.sh | 15 +++++++++++ 3 files changed, 62 insertions(+) diff --git a/aqua-examples/decentralized-blockchain-gateway/configs/Config.toml b/aqua-examples/decentralized-blockchain-gateway/configs/Config.toml index 5970459..29cd801 100644 --- a/aqua-examples/decentralized-blockchain-gateway/configs/Config.toml +++ b/aqua-examples/decentralized-blockchain-gateway/configs/Config.toml @@ -8,12 +8,32 @@ logger_enabled = true [module.mounted_binaries] curl = "/usr/bin/curl" +[[module]] +name = "ipfs_adapter" +max_heap_size = "2 MiB" +logger_enabled = true + +[module.mounted_binaries] +ipfs = "/usr/local/bin/ipfs" + [[module]] name = "multi_provider_query" max_heap_size = "2 MiB" logger_enabled = true + [[module]] name = "simple_quorum" max_heap_size = "2 MiB" logger_enabled = true + + +[[module]] +name = "ipfs_cli" +max_heap_size = "2 MiB" +logger_enabled = true + +[[module]] +name = "utilities" +max_heap_size = "2 MiB" +logger_enabled = true diff --git a/aqua-examples/decentralized-blockchain-gateway/configs/deployment_cfg.json b/aqua-examples/decentralized-blockchain-gateway/configs/deployment_cfg.json index 3eb706e..082937e 100644 --- a/aqua-examples/decentralized-blockchain-gateway/configs/deployment_cfg.json +++ b/aqua-examples/decentralized-blockchain-gateway/configs/deployment_cfg.json @@ -25,5 +25,32 @@ "logger_enabled": true } ] + }, + "ipfs-package": { + "modules": [ + { + "name": "ipfs_adapter", + "path": "./artifacts/ipfs_adapter.wasm", + "max_heap_size": "2 MiB", + "mounted_binaries": [["ipfs", "/usr/bin/ipfs"]], + "logger_enabled": true + }, + { + "name": "ipfs_cli", + "path": "./artifacts/ipfs_cli.wasm", + "max_heap_size": "2 MiB", + "logger_enabled": true + } + ] + }, + "utilities": { + "modules": [ + { + "name": "utilities", + "path": "./artifacts/utilities.wasm", + "max_heap_size": "2 MiB", + "logger_enabled": true + } + ] } } diff --git a/aqua-examples/decentralized-blockchain-gateway/scripts/build.sh b/aqua-examples/decentralized-blockchain-gateway/scripts/build.sh index 8673efc..5302b0d 100755 --- a/aqua-examples/decentralized-blockchain-gateway/scripts/build.sh +++ b/aqua-examples/decentralized-blockchain-gateway/scripts/build.sh @@ -10,6 +10,11 @@ cargo update --aggressive marine build --release cp target/wasm32-wasi/release/curl_adapter.wasm ../../artifacts/ +cd ../ipfs-adapter +cargo update --aggressive +marine build --release +cp target/wasm32-wasi/release/ipfs_adapter.wasm ../../artifacts/ + cd ../multi-provider-query cargo update --aggressive marine build --release @@ -20,4 +25,14 @@ cargo update --aggressive marine build --release cp target/wasm32-wasi/release/simple_quorum.wasm ../../artifacts/ +cd ../ipfs-cli +cargo update --aggressive +marine build --release +cp target/wasm32-wasi/release/ipfs_cli.wasm ../../artifacts/ + +cd ../utilities +cargo update --aggressive +marine build --release +cp target/wasm32-wasi/release/utilities.wasm ../../artifacts/ + cd .. \ No newline at end of file