Skip to content

Commit

Permalink
Serialize function parameters
Browse files Browse the repository at this point in the history
Note: this is a naive implementation. Testing required to make sure deserialization works
  • Loading branch information
ksolana committed May 28, 2024
1 parent 415d193 commit 430a477
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions external-crates/move/solana/move-to-solana/src/entry_codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,12 @@ fn encode_instruction_data(
// serialize each move value.
// TODO: sui-graphql-rpc/src/types/move_value.rs has more
// advanced serialization methods to convert to json etc.
insn_data.extend(a.simple_serialize().ok_or(None));
let argstring = match a.simple_serialize() {
Some(bytes) => bytes,
None => panic!("Error"),
};
insn_data.extend(std::str::from_utf8(&argstring)?.as_bytes());
}

}
// todo

Expand Down

0 comments on commit 430a477

Please sign in to comment.