-
Relevant discussion: ENV variables for motoko builds
TLDR; you can use actor classes if your canister doesn’t have init parameters, otherwise a bash script or using MOPS are the only way for now. -
No you can’t call mainnet from local environment, I remember it was discussed in the past but there were security concerns and Dfinity preferred to go with
dfx pull
as an alternative.