Open chadoh opened 2 months ago
So just to clarify, we will never run deploy
in production and staging? Because currently we just identify the contracts by name which should match the wasm file name and then get the contract id from deploying that wasm or using the alias if it already exists. So all of that should be skipped in production and staging environments, and we should throw an error if its not an already deployed ID?
Correct, we will never run deploy
in production and staging. It only makes sense to willy-nilly deploy in a development environment. By the time you get to production, you will want to deploy your contracts before you build your frontend for it. And since staging is practice for production, same thing.
In our example
environments.toml
file, we imply thatstaging
andproduction
environments will only allow contracts to be IDs.However, right now in our tests, we only check the
production
environment, because that's the default forloam build
, and we are usingworkspace = true
for all the contracts.We need to update our
environments.toml
parsing to only allow contracts to be strings, in staging and production. And we need to update our tests to check for this, and to make the current tests setdevelopment.contracts
instead, and also setLOAM_ENV
with them (and/or add the--env
flag tocargo build
—it's currently supported bybuild_clients.rs
, but not added tobuild.rs
, which is the actually-callable command).