Skip to content

Commit

Permalink
feat(objectarium): implement compression of objects
Browse files Browse the repository at this point in the history
  • Loading branch information
ccamel committed May 2, 2023
1 parent 5ace7a3 commit 36c5068
Show file tree
Hide file tree
Showing 5 changed files with 204 additions and 66 deletions.
8 changes: 7 additions & 1 deletion contracts/okp4-law-stone/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ pub fn instantiate(
let store_msg = StorageMsg::StoreObject {
data: msg.program.clone(),
pin: true,
compression_algorithm: None,
};

let store_program_msg = WasmMsg::Execute {
Expand Down Expand Up @@ -333,9 +334,14 @@ mod tests {
WasmMsg::Execute { msg, .. } => {
let result: StorageMsg = from_binary(msg).unwrap();
match result {
StorageMsg::StoreObject { data, pin } => {
StorageMsg::StoreObject {
data,
pin,
compression_algorithm,
} => {
assert_eq!(data, program);
assert!(pin, "the main program should be pinned");
assert_eq!(compression_algorithm, None);
}
_ => panic!("storage message should be a StoreObject message"),
}
Expand Down
Loading

0 comments on commit 36c5068

Please sign in to comment.