Skip to content

Commit

Permalink
fix: sui-rlp upgrade compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
gcranju committed Nov 29, 2024
1 parent 0387e90 commit fbf67a6
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions contracts/sui/libs/sui_rlp/sources/utils.move
Original file line number Diff line number Diff line change
Expand Up @@ -41,30 +41,32 @@ module sui_rlp::utils {

}

public fun to_bytes_u128(number:u128,signed:bool):vector<u8>{
//Deprecated
public fun to_bytes_u128(number:u128):vector<u8>{
let bytes=bcs::to_bytes(&number);
to_signed_bytes(bytes,signed)
to_signed_bytes(bytes,true)
}

public fun to_bytes_u128_sign(number:u128,signed:bool):vector<u8>{
let bytes=bcs::to_bytes(&number);
to_signed_bytes(bytes,signed)
}


public fun to_bytes_u64(number:u64,signed:bool):vector<u8>{
//Deprecated
public fun to_bytes_u64(number:u64):vector<u8>{
let bytes=bcs::to_bytes(&number);
to_signed_bytes(bytes,signed)
to_signed_bytes(bytes,true)
}

public fun to_bytes_u64_sign(number:u64,signed:bool):vector<u8>{
let bytes=bcs::to_bytes(&number);
to_signed_bytes(bytes,signed)
}

public fun to_bytes_u32(number: u32,signed:bool): vector<u8> {

//Deprecated
public fun to_bytes_u32(number: u32): vector<u8> {
let bytes=bcs::to_bytes(&number);
to_signed_bytes(bytes,signed)
to_signed_bytes(bytes,true)
}

public fun to_bytes_u32_sign(number: u32,signed:bool): vector<u8> {
Expand Down

0 comments on commit fbf67a6

Please sign in to comment.