decentdao / decent-contracts

Your Safe, Superpowered
https://app.fractalframework.xyz
MIT License
3 stars 3 forks source link

Add `minified` deployment json #25

Closed Da-Colon closed 1 year ago

Da-Colon commented 1 year ago

Right now we are having to import the each contract individually by digging into the deployments folder.

--export ./minified/deployments.json flag on hardhat deploy creates a single json file with deployment addresses. So instead of

import FractalModule from '@fractal-framework/fractal-contracts/deployments/goerli/FractalModule.json';
import FractalRegistry from '@fractal-framework/fractal-contracts/deployments/goerli/FractalRegistry.json';
import FractalUsul from '@fractal-framework/fractal-contracts/deployments/goerli/FractalUsul.json';
import TokenClaim from '@fractal-framework/fractal-contracts/deployments/goerli/TokenClaim.json';
import UsulVetoGuard from '@fractal-framework/fractal-contracts/deployments/goerli/UsulVetoGuard.json';
import VetoERC20Voting from '@fractal-framework/fractal-contracts/deployments/goerli/VetoERC20Voting.json';
import VetoGuard from '@fractal-framework/fractal-contracts/deployments/goerli/VetoGuard.json';
import VetoMultisigVoting from '@fractal-framework/fractal-contracts/deployments/goerli/VetoMultisigVoting.json';
import VotesToken from '@fractal-framework/fractal-contracts/deployments/goerli/VotesToken.json';

We would just need to

import fractalContracts from '@fractal-framework/fractal-contracts/minified/deployments.json'
const { FractalModule, FractalRegistry, ...rest } = fractalContracts.contracts
herbig commented 1 year ago

@Da-Colon @tbwebb22 is this something easy to do?

It seems useful for the refactor work David is going to get started on

tbwebb22 commented 1 year ago

Yep, sounds like this is pretty easy to do, and something we can include in the PRs when we deploy these new contracts