Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structure smartcontract directory #195

Open
KaiserKarel opened this issue Jun 8, 2023 · 2 comments
Open

Structure smartcontract directory #195

KaiserKarel opened this issue Jun 8, 2023 · 2 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@KaiserKarel
Copy link
Contributor

I think it'd be good to structure our smartcontracts like so:

...
contracts
    - src
        ibc-sol
           ibc.sol
           ibc-sol.nix
           ...
        ethereum-wasm
           src
           Cargo.lock
           ...
    - ethereum
           ethereum.nix
    - union
           union.nix
...
flake.nix

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.

@KaiserKarel KaiserKarel added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Jun 8, 2023
@aeryz
Copy link
Contributor

aeryz commented Jun 10, 2023

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.

@KaiserKarel
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

2 participants