0

Caller Contract

Called.call(abi.encodeWithSignature("test(address, address)"),empAddress, empContAddress)

Called Contract

event ad(address);

 function test(address e, address f)public{
     emit ad(e);
 }
2

Abdul!

There is a typo in your call function arguments. You should remove a space from test function signature, i.e.

abi.encodeWithSignature("test(address,address)")

Every symbol in the string is important since the whole string is hashed in encodeWithSignature function.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.