@@ -657,7 +657,9 @@ impl TestSetup {
657657async fn test_eip7702_integration ( ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
658658 // Set up test environment
659659 let mut setup = TestSetup :: new ( ) . await ?;
660- let delegation_contract = setup. delegation_contract . expect ( "Delegation contract should be set" ) ;
660+ let delegation_contract = setup
661+ . delegation_contract
662+ . expect ( "Delegation contract should be set" ) ;
661663
662664 // Step 1: Fetch and set bytecode from Base Sepolia
663665 setup. fetch_and_set_bytecode ( ) . await ?;
@@ -667,11 +669,15 @@ async fn test_eip7702_integration() -> Result<(), Box<dyn std::error::Error>> {
667669
668670 // Step 3: Test is_minimal_account - all should be false initially
669671 assert ! (
670- !developer_account. is_minimal_account( Some ( delegation_contract) ) . await ?,
672+ !developer_account
673+ . is_minimal_account( Some ( delegation_contract) )
674+ . await ?,
671675 "Developer should not be minimal account initially"
672676 ) ;
673677 assert ! (
674- !user_account. is_minimal_account( Some ( delegation_contract) ) . await ?,
678+ !user_account
679+ . is_minimal_account( Some ( delegation_contract) )
680+ . await ?,
675681 "User should not be minimal account initially"
676682 ) ;
677683 println ! ( "✓ All accounts are not minimal accounts initially" ) ;
@@ -696,9 +702,11 @@ async fn test_eip7702_integration() -> Result<(), Box<dyn std::error::Error>> {
696702 . clone ( )
697703 . owner_transaction ( & [ mint_transaction] )
698704 . add_authorization_if_needed (
699- & setup. signer ,
705+ & setup. signer ,
700706 & setup. developer_credentials ,
701- setup. delegation_contract . expect ( "Delegation contract should be set" )
707+ setup
708+ . delegation_contract
709+ . expect ( "Delegation contract should be set" ) ,
702710 )
703711 . await ?;
704712
@@ -732,17 +740,21 @@ async fn test_eip7702_integration() -> Result<(), Box<dyn std::error::Error>> {
732740 ) ;
733741
734742 assert ! (
735- developer_account. is_minimal_account( Some ( delegation_contract) ) . await ?,
743+ developer_account
744+ . is_minimal_account( Some ( delegation_contract) )
745+ . await ?,
736746 "Developer should be minimal account after minting"
737747 ) ;
738748
739749 // Step 8: Delegate user account (session key granter)
740750 // User signs authorization but executor broadcasts it (user has no funds)
741751 let user_authorization = user_account
742752 . sign_authorization (
743- & setup. signer ,
753+ & setup. signer ,
744754 & setup. user_credentials ,
745- setup. delegation_contract . expect ( "Delegation contract should be set" )
755+ setup
756+ . delegation_contract
757+ . expect ( "Delegation contract should be set" ) ,
746758 )
747759 . await ?;
748760
@@ -752,14 +764,18 @@ async fn test_eip7702_integration() -> Result<(), Box<dyn std::error::Error>> {
752764 . await ?;
753765
754766 assert ! (
755- user_account. is_minimal_account( Some ( delegation_contract) ) . await ?,
767+ user_account
768+ . is_minimal_account( Some ( delegation_contract) )
769+ . await ?,
756770 "User (session key granter) should be minimal account after delegation"
757771 ) ;
758772 println ! ( "✓ User (session key granter) is now a minimal account (delegated by executor)" ) ;
759773
760774 // Step 9: Developer is already delegated via add_authorization_if_needed in owner_transaction
761775 assert ! (
762- developer_account. is_minimal_account( Some ( delegation_contract) ) . await ?,
776+ developer_account
777+ . is_minimal_account( Some ( delegation_contract) )
778+ . await ?,
763779 "Developer (session key grantee) should already be minimal account from earlier delegation"
764780 ) ;
765781 println ! ( "✓ Developer (session key grantee) was already delegated in previous step" ) ;
0 commit comments