Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Framework cleanup #109

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions aptos-move/e2e-move-tests/src/tests/bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,31 +228,6 @@ struct NativeBridgeTransferCompletedEvent {
nonce: u64,
}

fn hex_to_bytes(input: Vec<u8>) -> Vec<u8> {
let mut result = Vec::new();
assert!(input.len() % 2 == 0, "Input length must be even for valid hex");

let mut i = 0;
while i < input.len() {
let high_nibble = ascii_hex_to_u8(input[i]);
let low_nibble = ascii_hex_to_u8(input[i + 1]);
let byte = (high_nibble << 4) | low_nibble;
result.push(byte);
i += 2;
}

result
}

fn ascii_hex_to_u8(ch: u8) -> u8 {
match ch {
b'0'..=b'9' => ch - b'0',
b'A'..=b'F' => ch - b'A' + 10,
b'a'..=b'f' => ch - b'a' + 10,
_ => panic!("Invalid hex character: {}", ch),
}
}

fn normalize_to_32_bytes(value: Vec<u8>) -> Vec<u8> {
let mut meaningful = Vec::new();
let mut i = 0;
Expand Down
Loading