| 85 | // Two deployments that share an admin key but differ in their chain |
| 86 | // identity (genesis hash and/or namespace). |
| 87 | fn scope_a() -> String { |
| 88 | alloy_primitives::hex::encode(pause_signature_domain([0x11; 32], b"net-a")) |
| 89 | } |
| 90 | fn scope_b() -> String { |
| 91 | alloy_primitives::hex::encode(pause_signature_domain([0x22; 32], b"net-b")) |
| 92 | } |
| 93 | |
| 94 | fn sign(scope: &str, action: &str, timestamp_secs: u64, signer: &PrivateKeySigner) -> String { |
| 95 | let message = format!("{DOMAIN}:{scope}:{action}:{timestamp_secs}"); |
| 96 | let sig = signer.sign_message_sync(message.as_bytes()).unwrap(); |
| 97 | format!("0x{}", hex::encode(sig.as_bytes())) |