@@ -657,6 +657,7 @@ impl TestSetup {
657
657
async fn test_eip7702_integration ( ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
658
658
// Set up test environment
659
659
let mut setup = TestSetup :: new ( ) . await ?;
660
+ let delegation_contract = setup. delegation_contract . expect ( "Delegation contract should be set" ) ;
660
661
661
662
// Step 1: Fetch and set bytecode from Base Sepolia
662
663
setup. fetch_and_set_bytecode ( ) . await ?;
@@ -666,11 +667,11 @@ async fn test_eip7702_integration() -> Result<(), Box<dyn std::error::Error>> {
666
667
667
668
// Step 3: Test is_minimal_account - all should be false initially
668
669
assert ! (
669
- !developer_account. is_minimal_account( ) . await ?,
670
+ !developer_account. is_minimal_account( Some ( delegation_contract ) ) . await ?,
670
671
"Developer should not be minimal account initially"
671
672
) ;
672
673
assert ! (
673
- !user_account. is_minimal_account( ) . await ?,
674
+ !user_account. is_minimal_account( Some ( delegation_contract ) ) . await ?,
674
675
"User should not be minimal account initially"
675
676
) ;
676
677
println ! ( "✓ All accounts are not minimal accounts initially" ) ;
@@ -731,7 +732,7 @@ async fn test_eip7702_integration() -> Result<(), Box<dyn std::error::Error>> {
731
732
) ;
732
733
733
734
assert ! (
734
- developer_account. is_minimal_account( ) . await ?,
735
+ developer_account. is_minimal_account( Some ( delegation_contract ) ) . await ?,
735
736
"Developer should be minimal account after minting"
736
737
) ;
737
738
@@ -751,14 +752,14 @@ async fn test_eip7702_integration() -> Result<(), Box<dyn std::error::Error>> {
751
752
. await ?;
752
753
753
754
assert ! (
754
- user_account. is_minimal_account( ) . await ?,
755
+ user_account. is_minimal_account( Some ( delegation_contract ) ) . await ?,
755
756
"User (session key granter) should be minimal account after delegation"
756
757
) ;
757
758
println ! ( "✓ User (session key granter) is now a minimal account (delegated by executor)" ) ;
758
759
759
760
// Step 9: Developer is already delegated via add_authorization_if_needed in owner_transaction
760
761
assert ! (
761
- developer_account. is_minimal_account( ) . await ?,
762
+ developer_account. is_minimal_account( Some ( delegation_contract ) ) . await ?,
762
763
"Developer (session key grantee) should already be minimal account from earlier delegation"
763
764
) ;
764
765
println ! ( "✓ Developer (session key grantee) was already delegated in previous step" ) ;
0 commit comments