Skip to content

Commit

Permalink
fix: address to hex prefix 0 (#350)
Browse files Browse the repository at this point in the history
* fix: adding store to cap for transferrable

* fix: address to hex prefix 0

* fix: versioning

---------

Co-authored-by: gcranju <[email protected]>
  • Loading branch information
gcranju and Itshyphen authored Aug 13, 2024
1 parent 335a346 commit 79e682c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contracts/sui/xcall/sources/main.move
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ module xcall::main {
const EInvalidConnectionId:u64 =15;

const MAX_DATA_SIZE: u64 = 2048;
const CURRENT_VERSION: u64 = 1;
const CURRENT_VERSION: u64 = 2;

/*************Events*****************/

Expand Down
4 changes: 3 additions & 1 deletion contracts/sui/xcall/sources/utils.move
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ module xcall::xcall_utils {
public fun address_to_hex_string(address:&address): String {
let bytes = bcs::to_bytes(address);
let hex_bytes = hex::encode(bytes);
string::utf8(hex_bytes)
let mut prefix = string::utf8(b"0x");
prefix.append(string::utf8(hex_bytes));
prefix
}

public fun address_from_hex_string(str: &String): address {
Expand Down

0 comments on commit 79e682c

Please sign in to comment.