-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into main
- Loading branch information
Showing
11 changed files
with
111 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
-- import "@fluencelabs/aqua-lib/builtin.aqua" | ||
import "builtin.aqua" | ||
|
||
data Result: | ||
ticker: string | ||
open: f64 | ||
high: f64 | ||
low: f64 | ||
close: f64 | ||
last_updated: u64 | ||
period: u64 | ||
start_time: u64 | ||
error_msg: string | ||
success: bool | ||
|
||
service AggregatorService("AggregatorService"): | ||
read_last_price(streamId: string)-> Result | ||
ping()-> string | ||
process_data(streamId : string,ticker : string,newPrice:f64,timestamp: u64) -> Result | ||
|
||
func read_last_price(node: string,aggregator_service_id: string,streamId :string) -> Result: | ||
on node: | ||
AggregatorService aggregator_service_id | ||
last_price <- AggregatorService.read_last_price(streamId) | ||
<- last_price | ||
|
||
func ping(node: string,aggregator_service_id: string) -> string: | ||
on node: | ||
AggregatorService aggregator_service_id | ||
ping_result <- AggregatorService.ping() | ||
<- ping_result | ||
|
||
func process_data(node: string, aggregator_service_id : string ,streamId :string , ticker :string ,newPrice: f64 , now : u64) -> Result: | ||
on node: | ||
AggregatorService aggregator_service_id | ||
ping_result <- AggregatorService.process_data(streamId,ticker,newPrice,now) | ||
<- ping_result | ||
|
||
|
||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
rm -f air-scripts/*.* | ||
aqua-cli -i aqua-scripts -o air-scripts -a | ||
aqua-cli -i aqua-scripts -o air-scripts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
set -o errexit -o nounset -o pipefail | ||
|
||
cd ceramic_adapter | ||
cargo update --aggressive | ||
marine build --release | ||
|
||
cd ../aggregator_service | ||
cargo update --aggressive | ||
marine build --release | ||
|
||
cd .. | ||
|
||
mkdir -p artifacts | ||
rm -f artifacts/*.wasm | ||
|
||
cp ceramic_adapter/target/wasm32-wasi/release/ceramic_adapter.wasm artifacts/ | ||
cp aggregator_service/target/wasm32-wasi/release/aggregator_service.wasm artifacts/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env bash | ||
#!/usr/bin/env/ bash | ||
set -o errexit -o nounset -o pipefail | ||
|
||
cd ceramic_adapter | ||
|
Oops, something went wrong.