1

How does the truffle migration of this contract know what the address is of the registry contract, in the constructor:

https://github.com/marbleprotocol/humanity/blob/master/contracts/Humanity.sol

If the registry was deployed to Ethereum after the Token?

Registry creation: https://etherscan.io/tx/0xe8193e2f72d00d086c3876e8ae84f529848e1c730501158f1ff837426d99f4f1

Token creation: https://etherscan.io/tx/0x0d5d5506aed5a615986dc92f9d982c7e0f19c96e31e8488ea15d4f8046252983

Sorry if I am being silly.

2

Managed to get an answer from the developer of the project.

In case anyone else finds themselves here:

Contract addresses are deterministic (a combination of deployment account/address and the nonce). They have a utility function here called getAddress which is able to determine what the contract address will be:

https://github.com/marbleprotocol/humanity/blob/master/test/utils/utils.ts

| improve this answer | |
  • Address of the deploying account would be more accurate. – goodvibration May 23 '19 at 6:31
  • Thanks @goodvibration, made an edit. :) – Jay May 23 '19 at 9:02

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.