Deployment Arguments via dfx.json

It would be wonderful is we we could pass arguments via dfx.json.

Take for instance the following example:

{
  "canisters": {
    "foo_bar_baz": {
      "main": ".....",
      "type": "motoko"
      "args" : {
        "ic" : "(record { prod = true; foo = "bar real" }, 123)",
        "staging" : "(record { prod = false; foo = "bar fake" }, 452)",
        "local" : "(record { prod = true; foo = "bar fake" }, 222)",
      },
    },
  "networks": {
    "staging": {
      "providers": [
        "https://ic0.app"
      ],
      "type": "persistent"
    },
    "local": {
      "bind": "127.0.0.1:8000",
      "type": "ephemeral"
    }
  },
  "version": 1
}
1 Like

It would be wonderful if we could pass arguments via dfx.json**

Getting errors editing the post…

2 Likes