Goal: I want to create a solidity programm that includes 3+ contracts. This means I have one contract (lets call it master for now) which aims at setting everything up. This means this contract has a function that ask for addresses of contracts that should interact with each other. The master stores this address information and can later pass it to other contracts. I will have 3+ other contracts that get this "contact information" from the Master contract and then those 3+ start interacting with each other(Changing other variables, calling functions of other contracts)
Example: Contract has a Setup-Function that asks for addresses of contracts A and B. He stores those addresses and calls Function 1 of contract A. Now Function 1 of contract A does some stuff, then looks up the address of Contract B (this is where I struggle) and calls Function 2 which belongs to Contract B.
Question: Can somebody help me with this question and give me some example code? I already tried passing a struct with the addresses from the Master to A and B, tried to store them in a mapping and tried to make my Master contracts data accessible to A and B via inheritance.
If you have any trouble understanding this question feel free to ask ;)