Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore: add ic env + build-image.sh to motoko/basic_bitcoin#1429

Open
marc0olo wants to merge 2 commits into
masterfrom
chore/update-motoko-basic-bitcoin-ic-env
Open

chore: add ic env + build-image.sh to motoko/basic_bitcoin#1429
marc0olo wants to merge 2 commits into
masterfrom
chore/update-motoko-basic-bitcoin-ic-env

Conversation

@marc0olo

@marc0olo marc0olo commented Jul 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Replaces staging/production environments with a single ic environment (Bitcoin testnet4, test_key_1) — the standard default for IC network deployments
  • Adds build-image.sh as a standalone alternative to make build-image
  • Updates README to reflect the new environment structure and documents how to switch to Bitcoin mainnet + key_1 for production deployments
  • Updates app.mo comments to reference ic env instead of staging/production

Why a single ic environment

icp.ninja (and other tools) expect an environment named ic when deploying to the IC network. Using test_key_1 + testnet4 as the default is the safe choice — developers can optionally switch to mainnet by changing the init_args in icp.yaml, at which point the canister automatically selects key_1.

Test plan

  • ./build-image.sh builds the Docker image successfully
  • icp network start -d && icp deploy --cycles 30t && make test passes locally
  • icp deploy -e ic --cycles 30t deploys to IC mainnet against Bitcoin testnet4

🤖 Generated with Claude Code

- Replace staging/production environments with a single `ic` environment
  (Bitcoin testnet4, test_key_1) — the default for IC network deployments
- Add build-image.sh as a standalone alternative to `make build-image`
- Update README to reflect new environment structure and document how to
  switch to Bitcoin mainnet + key_1 for production deployments
- Update app.mo comments to reference `ic` env instead of `staging`/`production`

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@marc0olo marc0olo requested a review from a team as a code owner July 8, 2026 10:01
build-image is now covered by build-image.sh; the topup command is
documented inline in the README. Makefile is kept only for make test.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

@mbjorkqvist mbjorkqvist left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @marc0olo! Just a couple of nits.

Comment on lines -7 to -10
build-image:
# Because we're building off of :latest, use --pull to fetch the latest image.
# Remove `--pull` if the Dockerfile is updated to pin the base image version.
docker build --pull -t $(IMAGE_NAME) .

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: The PR description calls build-image.sh an "alternative" to make build-image, but the target is actually removed here, so it's a replacement, not an alternative.

set -e
# Uses --pull to always fetch the latest base image.
# Remove --pull if the Dockerfile is updated to pin the base image version.
docker build --pull -t icp-cli-network-launcher-bitcoin .

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: The image name icp-cli-network-launcher-bitcoin is now hard-coded in two places (here, and as IMAGE_NAME in the Makefile), so there are two sources of truth to fix if the name ever changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants