// Error code defined but not used
const E_WRONG_PUBKEY_SIZE: u64 = 1;

// Size constant incorrectly used as error code
const PUBLIC_KEY_SIZE: u64 = 32;

public fun public_key_from_bytes(bytes: vector<u8>): PublicKey {
    assert!(
        std::vector::length(&bytes) == PUBLIC_KEY_SIZE,
        std::error::invalid_argument(PUBLIC_KEY_SIZE) // Incorrectly uses 32 as error code
    );
    PublicKey { bytes }
}
public fun public_key_from_bytes(bytes: vector<u8>): PublicKey {
    assert!(
        std::vector::length(&bytes) == PUBLIC_KEY_SIZE,
+        std::error::invalid_argument(E_WRONG_PUBKEY_SIZE)
-        std::error::invalid_argument(PUBLIC_KEY_SIZE) 
    );
    PublicKey { bytes }
}
