@@ -657,6 +657,7 @@ 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" ) ;
660661
661662 // Step 1: Fetch and set bytecode from Base Sepolia
662663 setup. fetch_and_set_bytecode ( ) . await ?;
@@ -666,11 +667,11 @@ async fn test_eip7702_integration() -> Result<(), Box<dyn std::error::Error>> {
666667
667668 // Step 3: Test is_minimal_account - all should be false initially
668669 assert ! (
669- !developer_account. is_minimal_account( ) . await ?,
670+ !developer_account. is_minimal_account( Some ( delegation_contract ) ) . await ?,
670671 "Developer should not be minimal account initially"
671672 ) ;
672673 assert ! (
673- !user_account. is_minimal_account( ) . await ?,
674+ !user_account. is_minimal_account( Some ( delegation_contract ) ) . await ?,
674675 "User should not be minimal account initially"
675676 ) ;
676677 println ! ( "✓ All accounts are not minimal accounts initially" ) ;
@@ -731,7 +732,7 @@ async fn test_eip7702_integration() -> Result<(), Box<dyn std::error::Error>> {
731732 ) ;
732733
733734 assert ! (
734- developer_account. is_minimal_account( ) . await ?,
735+ developer_account. is_minimal_account( Some ( delegation_contract ) ) . await ?,
735736 "Developer should be minimal account after minting"
736737 ) ;
737738
@@ -751,14 +752,14 @@ async fn test_eip7702_integration() -> Result<(), Box<dyn std::error::Error>> {
751752 . await ?;
752753
753754 assert ! (
754- user_account. is_minimal_account( ) . await ?,
755+ user_account. is_minimal_account( Some ( delegation_contract ) ) . await ?,
755756 "User (session key granter) should be minimal account after delegation"
756757 ) ;
757758 println ! ( "✓ User (session key granter) is now a minimal account (delegated by executor)" ) ;
758759
759760 // Step 9: Developer is already delegated via add_authorization_if_needed in owner_transaction
760761 assert ! (
761- developer_account. is_minimal_account( ) . await ?,
762+ developer_account. is_minimal_account( Some ( delegation_contract ) ) . await ?,
762763 "Developer (session key grantee) should already be minimal account from earlier delegation"
763764 ) ;
764765 println ! ( "✓ Developer (session key grantee) was already delegated in previous step" ) ;
0 commit comments