mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-10 21:19:24 +00:00
Completes the `Executed` enum in the router. Adds an `Escape` struct. Both are needed for testing purposes. Documents the gas constants in intent and reasoning. Adds modernized tests around key rotation and the escape hatch. Also updates the rest of the codebase which had accumulated errors.
22 lines
666 B
Rust
22 lines
666 B
Rust
use alloy_sol_types::SolCall;
|
|
|
|
#[test]
|
|
fn selector_collisions() {
|
|
assert_eq!(
|
|
crate::_irouter_abi::IRouter::confirmNextSeraiKeyCall::SELECTOR,
|
|
crate::_router_abi::Router::confirmNextSeraiKey34AC53ACCall::SELECTOR
|
|
);
|
|
assert_eq!(
|
|
crate::_irouter_abi::IRouter::updateSeraiKeyCall::SELECTOR,
|
|
crate::_router_abi::Router::updateSeraiKey5A8542A2Call::SELECTOR
|
|
);
|
|
assert_eq!(
|
|
crate::_irouter_abi::IRouter::executeCall::SELECTOR,
|
|
crate::_router_abi::Router::execute4DE42904Call::SELECTOR
|
|
);
|
|
assert_eq!(
|
|
crate::_irouter_abi::IRouter::escapeHatchCall::SELECTOR,
|
|
crate::_router_abi::Router::escapeHatchDCDD91CCCall::SELECTOR
|
|
);
|
|
}
|