@@ -62,6 +62,7 @@ fn is_in_memory_node(chain: ChainId) -> bool {
6262#[ cfg( test) ]
6363mod tests {
6464 use super :: * ;
65+ use crate :: utils:: test_utils:: spawn_node_and_deploy_contracts;
6566 use crate :: {
6667 config:: contracts:: SSOContracts ,
6768 utils:: session:: session_lib:: session_spec:: {
@@ -76,26 +77,17 @@ mod tests {
7677
7778 #[ tokio:: test]
7879 async fn test_create_custom_session_signature ( ) -> eyre:: Result < ( ) > {
80+ // Add delay to avoid test run timing out
81+ tokio:: time:: sleep ( tokio:: time:: Duration :: from_secs ( 15 ) ) . await ;
82+
83+ // Arrange
84+ let ( anvil_zksync, config, _) =
85+ spawn_node_and_deploy_contracts ( ) . await ?;
86+
7987 let chain = 260 ;
8088 let session_key = fixed_bytes ! (
8189 "0x6954ddb21936036ccad688e2770846f15380a721bfab26c6e531e25b35cb5971"
8290 ) ;
83- let contracts = SSOContracts {
84- account_factory : address ! (
85- "0x0000000000000000000000000000000000000000"
86- ) ,
87- passkey : address ! ( "0x0000000000000000000000000000000000000000" ) ,
88- session : address ! ( "0x027ba0517cfa4471457c6e74f201753d98e7431d" ) ,
89- account_paymaster : address ! (
90- "0x0000000000000000000000000000000000000000"
91- ) ,
92- recovery : address ! ( "0x0000000000000000000000000000000000000000" ) ,
93- } ;
94- let config = Config {
95- contracts,
96- node_url : "http://0.0.0.0:8011" . parse ( ) . unwrap ( ) ,
97- deploy_wallet : None ,
98- } ;
9991 let hash = fixed_bytes ! (
10092 "0x438331d7eba6601df86b9ddc6b0ca3f5ec7ac0b395a3d7e2795fa2a855b4daad"
10193 ) ;
@@ -145,7 +137,7 @@ mod tests {
145137 println ! ( "custom_signature: {custom_signature:?}" ) ;
146138
147139 let expected_custom_signature = bytes ! (
148- "0x0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000027ba0517cfa4471457c6e74f201753d98e7431d00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000419bdec54176e0c91080f44c066837875a3c9afda7095568f64951b8ed9b6f420d7f9e89aa5d0be73a8625c41267bc4a7d62ac3fde218b5392b56cee2c23237e271b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000002000000000000000000000000009bbc92a33f193174bf6cc09c4b4055500d972479000000000000000000000000000000000000000000000000000000006955b9000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000016345785d8a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000debbd4ce2bd6bd869d3ac93666a0d5f4fc06fc72000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
140+ "000000000000000000000000000000000000000000000000000000000000006000000000000000000000000011f853c85e282a542d8ee8f9cdd8fe6ce61badf100000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000419bdec54176e0c91080f44c066837875a3c9afda7095568f64951b8ed9b6f420d7f9e89aa5d0be73a8625c41267bc4a7d62ac3fde218b5392b56cee2c23237e271b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000002000000000000000000000000009bbc92a33f193174bf6cc09c4b4055500d972479000000000000000000000000000000000000000000000000000000006955b9000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000016345785d8a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000debbd4ce2bd6bd869d3ac93666a0d5f4fc06fc72000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
149141 ) ;
150142
151143 // Compare signatures byte by byte to find differences
@@ -187,6 +179,8 @@ mod tests {
187179 expected_custom_signature,
188180 ) ;
189181
182+ drop ( anvil_zksync) ;
183+
190184 Ok ( ( ) )
191185 }
192186}
0 commit comments