Imagine two contracts, A and B

contract A{

contract B{
  A a;
  function B(address aAddr){
     a = A(aAddr);

What exactly is B storing about contract A? Does it store function hashes? Does it store A's bytecode?

1 Answer 1


it creates an instance of A so it is using only a reference in other words B is storing the A's Address, no bytecode no hash.

try to debug the code and watch storage and memory changement. in this exemple the A address is : 0x692a70d2e424a56d2c6c27 aa97d1a86395877b3a

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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