Skip to content

Commit

Permalink
add cp v3 test
Browse files Browse the repository at this point in the history
  • Loading branch information
ValeryAntopol committed Feb 21, 2024
1 parent 619a487 commit 8cea24f
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
14 changes: 14 additions & 0 deletions marine/tests/wasm_tests/call_parameters_v3/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[package]
name = "call-parameters-v3-test"
version = "0.1.0"
authors = ["Fluence Labs"]
edition = "2021"
publish = false

[[bin]]
name = "call_parameters_v3"
path = "src/main.rs"

[dependencies]
marine-rs-sdk = "=0.14.0" # do not update, host API v3 test
serde_json = "1.0.111"
6 changes: 6 additions & 0 deletions marine/tests/wasm_tests/call_parameters_v3/Config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
modules_dir = "./artifacts/"
total_memory_limit = "10 MiB"

[[module]]
name = "call_parameters_v3"

25 changes: 25 additions & 0 deletions marine/tests/wasm_tests/call_parameters_v3/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright 2024 Fluence Labs Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

use marine_rs_sdk::marine;

pub fn main() {}

#[marine]
pub fn call_parameters() -> String {
let cp = marine_rs_sdk::get_call_parameters();
serde_json::to_string(&cp).unwrap()
}

0 comments on commit 8cea24f

Please sign in to comment.