In my truffle project I have two smart contracts A and B. I need to call a public function in smart contract A from smart contract B. Therefore at deployment of smart contract B, I will have to provide the address of smart contract A in the constructor of smart contract B.
But with truffle when I enter truffle migrate --reset
all the two smart contracts get migrated one after the other. In the migration file of B how can I get the address of smart contract A that was deployed seconds ago and provide it to B?