Skip to content

deploy.ts instead of deploy.json #362

Description

@dk1a

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions