1
1
use fil_actor_miner:: { Actor , GetOwnerReturn , Method } ;
2
2
use fil_actors_runtime:: test_utils:: {
3
- expect_abort, expect_abort_contains_message, make_identity_cid , new_bls_addr, MockRuntime ,
4
- ACCOUNT_ACTOR_CODE_ID , MULTISIG_ACTOR_CODE_ID ,
3
+ expect_abort, expect_abort_contains_message, new_bls_addr, MockRuntime , ACCOUNT_ACTOR_CODE_ID ,
4
+ EVM_ACTOR_CODE_ID , MULTISIG_ACTOR_CODE_ID ,
5
5
} ;
6
6
use fvm_ipld_encoding:: ipld_block:: IpldBlock ;
7
7
use fvm_shared:: econ:: TokenAmount ;
@@ -42,7 +42,7 @@ fn successful_change() {
42
42
h. change_owner_address ( & mut rt, NEW_ADDRESS ) . unwrap ( ) ;
43
43
44
44
// Set to non-builtin caller to confirm exported correctly
45
- rt. set_caller ( make_identity_cid ( b"1234" ) , OTHER_ADDRESS ) ;
45
+ rt. set_caller ( * EVM_ACTOR_CODE_ID , OTHER_ADDRESS ) ;
46
46
rt. expect_validate_caller_any ( ) ;
47
47
let ret: GetOwnerReturn = rt
48
48
. call :: < Actor > ( Method :: GetOwnerExported as u64 , None )
@@ -70,7 +70,7 @@ fn change_owner_address_restricted_correctly() {
70
70
let ( h, mut rt) = setup ( ) ;
71
71
72
72
let params = IpldBlock :: serialize_cbor ( & NEW_ADDRESS ) . unwrap ( ) ;
73
- rt. set_caller ( make_identity_cid ( b"1234" ) , h. owner ) ;
73
+ rt. set_caller ( * EVM_ACTOR_CODE_ID , h. owner ) ;
74
74
75
75
// fail to call the unexported method
76
76
@@ -94,7 +94,7 @@ fn change_owner_address_restricted_correctly() {
94
94
// new owner can also call the exported method
95
95
96
96
rt. expect_validate_caller_addr ( vec ! [ NEW_ADDRESS ] ) ;
97
- rt. set_caller ( make_identity_cid ( b"1234" ) , NEW_ADDRESS ) ;
97
+ rt. set_caller ( * EVM_ACTOR_CODE_ID , NEW_ADDRESS ) ;
98
98
rt. call :: < Actor > ( Method :: ChangeOwnerAddressExported as u64 , params) . unwrap ( ) ;
99
99
100
100
rt. verify ( ) ;
0 commit comments