MCPcopy Create free account
hub / github.com/DNAProject/DNA / testcase

Function testcase

wasmtest/contracts-rust/contractop/src/lib.rs:188–208  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

186}
187
188fn testcase() -> String {
189 r#"
190 [
191 [
192 {"method":"balanceOf", "expected":"int:0"},
193 {"method":"transferFromAdmin", "needcontext":true, "param":"int:100", "expected":"bool:true"},
194 {"method":"balanceOf", "expected":"int:100"},
195 {"method":"approveAndTransferFromAdmin", "needcontext":true, "param":"int:100", "expected":"bool:true"},
196 {"method":"balanceOf", "expected":"int:200"},
197 {"method":"transferToAdmin", "needcontext":true, "param":"int:200", "expected":"bool:true"},
198 {"method":"balanceOf", "expected":"int:0"},
199
200 {"method":"storage_write"},
201 {"method":"storage_write2"},
202 {"needcontext":true, "env":{"witness":[]}, "method":"test_callwasm", "param":"string:add, int:1, int:2", "expected":"int:3"},
203 {"method":"test_migrate"}
204 ]
205 ]
206 "#
207 .to_string()
208}

Callers 1

invokeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected