Skip to content

Commit

Permalink
Merge pull request #3537 from dfinity/update-canisterurl
Browse files Browse the repository at this point in the history
Update ic0.app -> icp0.io
  • Loading branch information
jessiemongeon1 authored Sep 27, 2024
2 parents fbe0d29 + efa27b6 commit e2b7b52
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 27 deletions.
2 changes: 1 addition & 1 deletion docs/developer-docs/defi/dex/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Some examples of DEXs running on ICP include:

- [ICPSwap](https://icpswap.com/)

- [ICDex](https://avjzx-pyaaa-aaaaj-aadmq-cai.raw.ic0.app/ICDex)
- [ICDex](https://iclight.io/ICDex/DKP/ICP)

- [Sonic](https://sonic.ooo/)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Learn more in the [Bitcoin integration technical overview](/docs/current/referen

## ckBTC production application examples

- [ICDex](https://avjzx-pyaaa-aaaaj-aadmq-cai.raw.ic0.app/ICDex).
- [ICDex](https://iclight.io/ICDex/DKP/ICP).

- [ICPSwap](https://icpswap.com/).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ ckETH has many of the same use cases as ckBTC, such as:

## ckETH production application examples

- [ICDex](https://avjzx-pyaaa-aaaaj-aadmq-cai.raw.ic0.app/ICDex).
- [ICDex](https://iclight.io/ICDex/DKP/ICP).

- [ICPSwap](https://icpswap.com/).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -719,9 +719,9 @@ Committing batch.
Deployed canisters.
URLs:
Frontend canister via browser
send_http_get_motoko_frontend: https://ff5va-7qaaa-aaaap-qbona-cai.ic0.app/
send_http_get_motoko_frontend: https://ff5va-7qaaa-aaaap-qbona-cai.icp0.io/
Backend canister via Candid interface:
send_http_get_motoko_backend: https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.ic0.app/?id=fm664-jyaaa-aaaap-qbomq-cai
send_http_get_motoko_backend: https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.icp0.io/?id=fm664-jyaaa-aaaap-qbomq-cai
```

</TabItem>
Expand All @@ -740,12 +740,12 @@ Committing batch.
Deployed canisters.
URLs:
Frontend canister via browser
send_http_get_rust_frontend: https://ff5va-7qaaa-aaaap-qbona-cai.ic0.app/
send_http_get_rust_frontend: https://ff5va-7qaaa-aaaap-qbona-cai.icp0.io/
Backend canister via Candid interface:
send_http_get_rust_backend: https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.ic0.app/?id=fm664-jyaaa-aaaap-qbomq-cai
send_http_get_rust_backend: https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.icp0.io/?id=fm664-jyaaa-aaaap-qbomq-cai
```

You can see play with the dapp's `get_icp_usd_exchange` method onchain here: [https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.ic0.app/?id=fm664-jyaaa-aaaap-qbomq-cai](https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.ic0.app/?id=fm664-jyaaa-aaaap-qbomq-cai).
You can see play with the dapp's `get_icp_usd_exchange` method onchain here: [https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.icp0.io/?id=fm664-jyaaa-aaaap-qbomq-cai](https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.icp0.io/?id=fm664-jyaaa-aaaap-qbomq-cai).

</TabItem>
</AdornedTabs>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -712,12 +712,12 @@ Committing batch.
Deployed canisters.
URLs:
Frontend canister via browser
send_http_post_motoko_frontend: https://fx3cz-taaaa-aaaap-qbooa-cai.ic0.app/
send_http_post_motoko_frontend: https://fx3cz-taaaa-aaaap-qbooa-cai.icp0.io/
Backend canister via Candid interface:
send_http_post_motoko_backend: https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.ic0.app/?id=fc4tu-siaaa-aaaap-qbonq-cai
send_http_post_motoko_backend: https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.icp0.io/?id=fc4tu-siaaa-aaaap-qbonq-cai
```

You can see play with the dapp's `send_http_post_request` method onchain here: [https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.ic0.app/?id=fc4tu-siaaa-aaaap-qbonq-cai](https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.ic0.app/?id=fc4tu-siaaa-aaaap-qbonq-cai).
You can see play with the dapp's `send_http_post_request` method onchain here: [https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.icp0.io/?id=fc4tu-siaaa-aaaap-qbonq-cai](https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.icp0.io/?id=fc4tu-siaaa-aaaap-qbonq-cai).

</TabItem>
<TabItem value="rust" label="Rust">
Expand All @@ -735,12 +735,13 @@ Committing batch.
Deployed canisters.
URLs:
Frontend canister via browser
send_http_post_rust_frontend: https://f6yjf-fiaaa-aaaap-qbopq-cai.ic0.app/
send_http_post_rust_frontend: https://f6yjf-fiaaa-aaaap-qbopq-cai.icp0.io/
Backend canister via Candid interface:
send_http_post_rust_backend: https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.ic0.app/?id=fzzpr-iqaaa-aaaap-qbopa-cai
send_http_post_rust_backend: https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.icp0.io/?id=fzzpr-iqaaa-aaaap-qbopa-cai
```

You can see play with the dapp's `send_http_post_request` method onchain here: [https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.ic0.app/?id=fm664-jyaaa-aaaap-qbomq-cai](https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.ic0.app/?id=fm664-jyaaa-aaaap-qbomq-cai).
You can see play with the dapp's `send_http_post_request` method onchain here: [https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.icp0.io/?id=fm664-jyaaa-aaaap-qbomq-cai](https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.icp0.io/?id=fm664-jyaaa-aaaap-qbomq-cai).


</TabItem>
</AdornedTabs>
Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/smart-contracts/write/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ The typical development workflow of the frontend is:

1. The developer writes HTML, JS, CSS code.
1. The developer uses the default asset <GlossaryTooltip>canister</GlossaryTooltip> created by `dfx` or writes their own custom canister to store the web assets onchain.
1. Users open the application in the browser by navigating to the URL `https://<canister-id>.ic0.app` or a custom domain that the developer has registered for the canister.
1. Users open the application in the browser by navigating to the URL `https://<canister-id>.icp0.io` or a custom domain that the developer has registered for the canister.
1. The canister serves the web assets to the browser via its `http_request` endpoint that gets invoked for each HTTP request.
1. When the JS code runs in the browser, it can call the backend canister endpoints using the [agent-js](/docs/current/developer-docs/web-apps/browser-js/js-request-api) library, which is analogous to `web3.js` and `ethers.js` of Ethereum.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ Assets can come in many forms, such as:

When a dapp is deployed to ICP and has a frontend configured, the frontend assets will be displayed via a URL that contains the <GlossaryTooltip>canister</GlossaryTooltip>'s ID. For local deployments, canisters are accessible through local URLs such as `http://127.0.0.1:4943/?canisterId=<canister-id>`. The port `4943` is the default local deployment port, though this can be changed via the `dfx` configuration or using a `dfx` flag. [Learn more about custom local networks](/docs/current/developer-docs/developer-tools/cli-tools/advanced-dfx/networks-json).

For canisters deployed to the mainnet, the canister can be accessed in a web browser using the canister's ID followed by `.ic0.app` or `raw.ic0.app`. For example, the [playground](https://m7sm4-2iaaa-aaaab-qabra-cai.ic0.app/) is an application with a frontend user interface that can be used to deploy canisters in a temporary, sandbox environment. This dapp can be accessed via the URL `https://m7sm4-2iaaa-aaaab-qabra-cai.ic0.app/`.
For canisters deployed to the mainnet, the canister can be accessed in a web browser using the canister's ID followed by `.ic0.app`, `.icp0.io` or `raw.icp0.io`. For example, the [playground](https://m7sm4-2iaaa-aaaab-qabra-cai.ic0.app/) is an application with a frontend user interface that can be used to deploy canisters in a temporary, sandbox environment. This dapp can be accessed via the URL `https://m7sm4-2iaaa-aaaab-qabra-cai.ic0.app/`.

The `raw.ic0.app` domain is used for canisters deployed to the mainnet, and provides a way to access the raw HTTP interface of that canister. For local deployments that want to simulate the behavior of the `raw.ic0.app` domain, you must implement a method in your canister that consumes an HTTP request and outputs an HTTP response.
The `raw.icp0.io` domain is used for canisters deployed to the mainnet, and provides a way to access the raw HTTP interface of that canister. For local deployments that want to simulate the behavior of the `raw.icp0.io` domain, you must implement a method in your canister that consumes an HTTP request and outputs an HTTP response.

By default, projects created with `dfx new` have the option to include a frontend canister that uses a template for one of several frontend frameworks. This guide illustrates using the default React template generated by `dfx new` and guides you through some basic modifications to customize the interface displayed.

Expand Down Expand Up @@ -300,7 +300,7 @@ Then, open a browser and navigate to `http://localhost:4943`.
To view the frontend on the mainnet, navigate to the frontend canister URL returned when you ran `dfx deploy`, such as:

```
https://<canister-id>.ic0.app/
https://<canister-id>.icp0.io/
```

- #### Step 2: Verify that you are prompted to type a name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ While numerous starter projects and examples exist for those who prefer to start
This guide provides an overview of how to deploy an existing Next.js application as a frontend canister.

:::caution
Server methods such as `getServerSideProps` are not supported, since it will be deployed as a client-only application.
Server methods such as `getServerSideProps` are not supported, since it will be deployed as a client-only application.
:::

## Next.js
Expand Down Expand Up @@ -117,7 +117,7 @@ dfx deploy --network ic
Deploying to the mainnet will cost [cycles](/docs/current/developer-docs/getting-started/cycles/overview).
:::

After running either command, you will see a generated link that is now hosting your Next.js application. The local url will be in the format `http://127.0.0.1:4943/?canisterId=<canister-id>`, while the mainnet URL will be in the format `https://<canister-id>.ic0.app/`.
After running either command, you will see a generated link that is now hosting your Next.js application. The local url will be in the format `http://127.0.0.1:4943/?canisterId=<canister-id>`, while the mainnet URL will be in the format `https://<canister-id>.icp0.io/`.

### Step 5: Navigate to the frontend canister to view the application

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ following troubleshooting steps:
You may need to specify a `host` in your frontend code when you are using a
custom domain, as the `HttpAgent` may not be able to automatically infer the
host like it can on `icp0.io` and `ic0.app`. To configure your agent, it will
host like it can on `icp0.io` and `icp0.io`. To configure your agent, it will
look something like this:
```ts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ You can learn more about agents in the documentation [here](/docs/current/develo

### Serving HTTP content

Canister smart contract are able to serve HTTP content natively, allowing for dapp frontends to be served directly in a web browser using the canister's URL at `http://<canister id>.ic0.app` and `http://<canister id>.raw.ic0.app`. Frontend canisters can be used to deliver HTML, CSS and JavaScript pages, and answer API requests.
Canister smart contract are able to serve HTTP content natively, allowing for dapp frontends to be served directly in a web browser using the canister's URL at `http://<canister id>.icp0.io` and `http://<canister id>.raw.icp0.io`. Frontend canisters can be used to deliver HTML, CSS and JavaScript pages, and answer API requests.

If a canister wants to serve HTTP content, it should implement a method that consumes a HTTP request, which contains a URL, HTTP method and headers, then outputs a HTTP response that contains a status, headers and the response body. The canister method can return HTML, CSS and JavaScript content as part of the HTTP response.

Expand Down
2 changes: 1 addition & 1 deletion submodules/motoko
Submodule motoko updated 48 files
+2 −2 .github/workflows/release.yml
+3 −3 .github/workflows/test.yml
+1 −1 .github/workflows/update-hash.yml
+12 −12 Building.md
+2 −8 Changelog.md
+6 −12 default.nix
+86 −105 doc/docusaurus/package-lock.json
+1 −20 doc/md/base/Iter.md
+3 −3 doc/md/canister-maintenance/upgrades.md
+1 −1 doc/md/getting-started/basic-concepts.md
+2 −1 doc/md/getting-started/quickstart.md
+3 −3 doc/md/migration-guides/0.11.0-migration-guide.md
+1 −1 doc/md/motoko-tools/mo-dev.md
+1 −1 doc/md/motoko-tools/motoko-formatter.md
+1 −1 doc/md/reference/generating-docs.md
+2 −2 doc/md/writing-motoko/actor-classes.md
+1 −1 doc/md/writing-motoko/actors-async.md
+2 −2 doc/md/writing-motoko/async-data.md
+5 −5 doc/md/writing-motoko/async-star.md
+4 −4 doc/md/writing-motoko/incomplete-code.md
+1 −1 doc/md/writing-motoko/intercanister-calls.md
+3 −3 doc/md/writing-motoko/local-objects-classes.md
+2 −2 doc/md/writing-motoko/modules-and-imports.md
+7 −7 doc/md/writing-motoko/mutable-state.md
+2 −2 doc/md/writing-motoko/pattern-matching.md
+1 −1 doc/md/writing-motoko/pipes.md
+1 −0 doc/md/writing-motoko/randomness.md
+6 −6 doc/md/writing-motoko/sharing.md
+1 −1 doc/md/writing-motoko/writing-intro.md
+0 −22 nix/emscripten-fix.patch
+25 −13 nix/sources.json
+16 −30 src/codegen/compile_classical.ml
+20 −34 src/codegen/compile_enhanced.ml
+1 −1 src/docs/.ocamlformat
+0 −1 src/ir_def/arrange_ir.ml
+1 −1 src/ir_def/check_ir.ml
+1 −2 src/ir_def/construct.ml
+0 −2 src/ir_def/ir.ml
+1 −1 src/languageServer/.ocamlformat
+0 −2 src/lowering/desugar.ml
+0 −4 src/prelude/prim.mo
+0 −1 test/fail/ok/no-timer-canc.tc.ok
+0 −1 test/fail/ok/no-timer-set.tc.ok
+1 −1 test/lsp-int/lsp-int.cabal
+1 −1 test/random/qc-motoko.cabal
+0 −2 test/run-drun/basic-cycles.mo
+2 −2 test/run-drun/empty-actor-classical.mo
+1 −1 test/run-drun/ok/basic-cycles.tc.ok
2 changes: 1 addition & 1 deletion submodules/response-verfication
Submodule response-verfication updated 35 files
+0 −6 CHANGELOG.md
+67 −37 Cargo.lock
+36 −5 examples/http-certification/assets/README.md
+2 −2 examples/http-certification/assets/dfx.json
+10 −2 examples/http-certification/assets/src/backend/Cargo.toml
+36 −4 examples/http-certification/assets/src/backend/src/lib.rs
+9 −15 examples/http-certification/custom-assets/README.md
+2 −2 examples/http-certification/custom-assets/dfx.json
+8 −2 examples/http-certification/custom-assets/src/backend/Cargo.toml
+52 −18 examples/http-certification/custom-assets/src/backend/src/lib.rs
+43 −15 examples/http-certification/json-api/README.md
+6 −1 examples/http-certification/json-api/src/backend/Cargo.toml
+57 −20 examples/http-certification/json-api/src/backend/src/lib.rs
+0 −2 packages/ic-asset-certification/Cargo.toml
+41 −13 packages/ic-asset-certification/README.md
+170 −424 packages/ic-asset-certification/src/asset_router.rs
+44 −7 packages/ic-asset-certification/src/lib.rs
+1 −2 packages/ic-certification/Cargo.toml
+12 −12 packages/ic-http-certification-tests/tests/v1_response_verification.rs
+19 −26 packages/ic-http-certification-tests/tests/v2_response_verification_certification_scenarios.rs
+15 −46 packages/ic-http-certification-tests/tests/v2_response_verification_happy_path.rs
+11 −27 packages/ic-http-certification-tests/tests/v2_response_verification_sad_path.rs
+4 −3 packages/ic-http-certification/Cargo.toml
+10 −10 packages/ic-http-certification/src/hash/response_hash.rs
+6 −6 packages/ic-http-certification/src/lib.rs
+10 −22 packages/ic-http-certification/src/tree/certification.rs
+7 −7 packages/ic-http-certification/src/tree/certification_tree.rs
+3 −3 packages/ic-http-certification/src/tree/certification_tree_entry.rs
+0 −3 packages/ic-http-certification/src/utils/mod.rs
+0 −101 packages/ic-http-certification/src/utils/response_header.rs
+0 −4 packages/ic-response-verification-test-utils/src/encoding.rs
+0 −1 packages/ic-response-verification/src/lib.rs
+105 −206 packages/ic-response-verification/src/verification/certificate_header.rs
+1 −3 packages/ic-response-verification/src/verification/mod.rs
+45 −22 packages/ic-response-verification/src/verification/verify_request_response_pair.rs
2 changes: 1 addition & 1 deletion submodules/samples
Submodule samples updated 258 files

0 comments on commit e2b7b52

Please sign in to comment.