Inspired by #361 and the hardhat config
Currently deploy.json is a bit arcane in what it expects, and json is very strict with " everywhere.
Having a ts config with an attached type seems like it'd offer better devex and make deploy.ts easier to extend with more options without making those options super obscure.
Also a ts config partially solves the repeated writeAccess problem since you can use variables for similar arrays.
Naturally deploy.json and deploy.ts can coexist;
some other things to consider:
- mud uses ts anyways,
deploy.js is not needed
- deprecating
deploy.json might make sense, at least in the sense of not using it in tutorials, templates etc
https://hardhat.org/hardhat-runner/docs/guides/typescript
basic hardhat.config.ts:
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
const config: HardhatUserConfig = {
solidity: "0.8.17",
};
export default config;
Inspired by #361 and the hardhat config
Currently
deploy.jsonis a bit arcane in what it expects, and json is very strict with"everywhere.Having a ts config with an attached type seems like it'd offer better devex and make
deploy.tseasier to extend with more options without making those options super obscure.Also a ts config partially solves the repeated
writeAccessproblem since you can use variables for similar arrays.Naturally
deploy.jsonanddeploy.tscan coexist;some other things to consider:
deploy.jsis not neededdeploy.jsonmight make sense, at least in the sense of not using it in tutorials, templates etchttps://hardhat.org/hardhat-runner/docs/guides/typescript
basic
hardhat.config.ts: