## Description
`sui move build` does not ordinarily require a network connection
because it doesn't need to know about a chain's ID. The exception is
when `--dump-bytecode-as-base64` is specified: In this case, we should
resolve the correct addresses for the respective chain (e.g., testnet,
mainnet) from the `Move.lock` under automated address management.
Two options to fix `sui move build --dump-bytecode-as-base64` to work
with automated addresses / by resolving from the `Move.lock`:
1. Require an extra `--chain-id` flag on `sui move build`, which a user
must specify along with `--dump-bytecode-as-base64`. E.g.,
```
sui move build --dump-bytecode-as-base64 --chain-id "$(sui client chain-identifier)"
```
OR
2. Require a network connection _only when_ `--dump-bytecode-as-base64`
is set and and resolve the chain-id without requiring a flag.
This PR opts for **(2)**, but it is trivial to change the implementation
and test to do **(1)** instead. **(1)** should come with an accompanying
doc change though.
Context: encountered when running, e.g.,
```
execSync(`${SUI} move build --dump-bytecode-as-base64 --path ${packagePath}`
```
## Test plan
Added test
---
## Release notes
Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.
For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.
- [ ] Protocol:
- [ ] Nodes (Validators and Full nodes):
- [ ] Indexer:
- [ ] JSON-RPC:
- [ ] GraphQL:
- [x] CLI: Fixed an issue where `--dump-bytecode-as-base64` did not work
as expected if [package addresses are automatically
managed](https://docs.sui.io/concepts/sui-move-concepts/packages/automated-address-management#adopting-automated-address-management-for-published-packages).
- [ ] Rust SDK:
- [ ] REST API: