Open KaiserKarel opened 1 year ago
isn't having the contracts under specific platforms is cleaner? I mean solidity contracts under contracts/ethereum
and cosmwasm contracts under contracts/union
. Because contracts/src
will get more mixed when we introduce other platforms as well.
I personally dislike organizing code by what language it's written in, and prefer doing it by what domain (same as when writing a webserver, instead of a models and controllers directory, organize code by domain). I also don't mind having directories with the target deployment, and a src directory for when we share stuff.
Regarding adding more platforms, there really is only the EVM, cosmwasm and perhaps solana for this year.
I think it'd be good to structure our smartcontracts like so:
The contracts/src directory contains directories with actual contracts The contracts/{chain} directories contain nix files for uploading all contracts to a chain/upgrading etc. So to perform a full deploy on Union, run union.nix with some args, which will build a variety of contracts from src and deploy them.