Skip to content

Commit

Permalink
update annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
duanyytop committed Feb 26, 2024
1 parent 03f2363 commit 55ea095
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/dex-lock/src/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const MIN_ARGS_SIZE: usize = 66;
pub struct DexArgs {
// the minimum length of serialized lock script is 49bytes
pub owner_lock: Script,
// 0b_xxxx_x0xx is for UDT asset and 0b_xxxx_x1xx is for NFT
// 0b_xxxx_x0xx is for FT asset and 0b_xxxx_x1xx is for NFT asset
pub setup: u8,
pub total_value: u128,
}
Expand All @@ -35,7 +35,7 @@ impl DexArgs {
let owner_lock = Script::from_slice(&data[..owner_size]).map_err(|_e| Error::Encoding)?;
let setup = data[owner_size];
// If the third bit of setup is 0, it means FT(0b_xxxx_x0xx), otherwise it means
// NFT(0b_xxxx_x1xx)
// NFT(0b_xxxx_x1xx). The remaining bits are temporarily reserved or not implemented
if setup != 0 && setup != 4 {
return Err(Error::DexSetupInvalid);
}
Expand Down

0 comments on commit 55ea095

Please sign in to comment.