spencer
December 2, 2021, 3:04am
#1
Is it possible to pass a default constructor argument for my canister into dfx.json, so that when I simply call dfx deploy, that argument is passed in without specifying it?
Example:
“mycanister”:{
“main”:“src/mycanister.mo”,
“type”:“motoko”,
“argument”:"(12345)"
}
Is this something that could be added in the future?
2 Likes
Do we have a documentation on all the possible entries of dfx.json and what we can achieve with different entries in dfx.json.
Please can someone point us to the documentation/resource if any?
@chiedo was also looking and found this.
For anyone else who reads this, this seems to mostly explain the dfx.json config.
1 Like
I agree that document(Customize the front-end :: Internet Computer ) helps.
But it describes less number of options out of all the options that can be passed to dfx.json
I need info about the all the options.
Thanks
I don’t think it’s documented but you should be able to figure it out from here:
pub struct ConfigInterface {
pub profile: Option<Profile>,
pub version: Option<u32>,
pub dfx: Option<String>,
pub canisters: Option<BTreeMap<String, ConfigCanistersCanister>>,
pub defaults: Option<ConfigDefaults>,
pub networks: Option<BTreeMap<String, ConfigNetwork>>,
}
This helps, thank you.
But please someone document as it helps many.