0

I am building my first complex project involving a wide variety of applications. This ecosystem involves multiple contracts, from minting various NFT collections, to a fungible token, community treasury, etc.

From an architecture perspective, I am taking my time to decide which would be the best solution to connect all these contracts. As each of them must be deployed with its own address and they must be able to read and modify the most updated state of the other contracts, I believe that the best solution would be to create a couple of interfaces.

These interfaces would be used to perform transactions with other contracts and a constant including the deployed address of the target contract would be passed to the interface in order to allow the communication.

Do you think this is a good manner to deal with this design problem? Is there any advice or alternative you would propose?

Thank you very much in advance.

1 Answer 1

0

Definitely the right way to go! Just be sure at least look at some of the EIPs already out there and see if anyone's made interfaces or is trying to standardize any pieces of it already. Usually the biggest design challenge for this stuff is just coordinating what should/shouldn't be onchain and how fast the interactions between various contracts can be.

Also note that in any system where you have multiple addresses, it's an easy way to have upgradeability by just being able to change what addresses are interacting with each other. How you handle this upgradeability/address changing though (be it an admin key, voting, or no changes allowed) can determine both the flexibility and level of decentralization of your protocol.

1
  • Thank you very much for your advice, I will take it into account for my project.
    – RodrigoR
    Apr 20, 2022 at 16:48

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.