diff --git a/README.md b/README.md index 681eb8a50b..220bf01d62 100644 --- a/README.md +++ b/README.md @@ -588,11 +588,11 @@ The [Ecosystem Helper](https://mvw4g-yiaaa-aaaam-abnva-cai.icp0.io/) is an oncha ### Asset guidelines -| Asset | | Requirements | Format | Notes | -|-------------|----------|--------------|--------------|-----------------------------------------------------------------------------------| -| logo | required | 112x112px | webp/svg/png | Currently displayed 56x56px | -| screenshots | optional | 1024x576px | webp/jpg | The schema supports multiple files, but only the first one will be displayed | -| video | optional | max 10MB | webm/mp4 | If there is a video file specified, it will be displayed instead of a screenshot. | +| Asset | | Requirements | Format | Notes | +|-------------|----------|---------------------------------|---------------------------|----------------------------------------------------------------------------------------| +| logo | required | 112x112px (1:1 aspect ratio) | svg(recommended)/png/webp | Optimize file size with [SVGOMG](https://svgomg.net) or [TinyPNG](https://tinypng.com) | +| screenshots | optional | 1024x576px | webp/jpg | The schema supports multiple files, but only the first one will be displayed | +| video | optional | max 10MB | webm/mp4 | If there is a video file specified, it will be displayed instead of a screenshot. | ### Tags diff --git a/docs/developer-docs/defi/dex/overview.mdx b/docs/developer-docs/defi/dex/overview.mdx index 3ac89097e9..1e63f6763d 100644 --- a/docs/developer-docs/defi/dex/overview.mdx +++ b/docs/developer-docs/defi/dex/overview.mdx @@ -32,7 +32,7 @@ Some examples of DEXs running on ICP include: ## Interacting with a DEX -To use a decentralized exchange (DEX) on ICP, you can interact with the web application for the exchange, use [tooling such as an SDK or API](#tooling) for more technical interactions, or create your own decentralized exchange application. DEXs are used to interact with the token mechanics of [ICP](docs/current/developer-docs/defi/tokens/token-standards#icp-tokens), the native token of the Internet Computer, and [ICRC-1](/docs/current/developer-docs/defi/tokens/token-standards#icrc-1) compliant tokens. +To use a decentralized exchange (DEX) on ICP, you can interact with the web application for the exchange, use [tooling such as an SDK or API](#tooling) for more technical interactions, or create your own decentralized exchange application. DEXs are used to interact with the token mechanics of [ICP](/docs/current/developer-docs/defi/tokens/token-standards#icp-tokens), the native token of the Internet Computer, and [ICRC-1](/docs/current/developer-docs/defi/tokens/token-standards#icrc-1) compliant tokens. ### Tooling diff --git a/docs/developer-docs/defi/tokens/ledger/setup/icp_ledger_setup.mdx b/docs/developer-docs/defi/tokens/ledger/setup/icp_ledger_setup.mdx index 0a370a10bd..21cca18718 100644 --- a/docs/developer-docs/defi/tokens/ledger/setup/icp_ledger_setup.mdx +++ b/docs/developer-docs/defi/tokens/ledger/setup/icp_ledger_setup.mdx @@ -135,7 +135,7 @@ Open the `dfx.json` file in your project's directory. Replace the existing conte "ic": "ryjl3-tyaaa-aaaaa-aaaba-cai" } }, - "init_arg" : "(variant { Init = record { minting_account = "MINTER_ACCOUNT_ID"; initial_values = vec { record { "DEFAULT_ACCOUNT_ID"; record { e8s = 10_000_000_000 : nat64; }; }; }; send_whitelist = vec {}; transfer_fee = opt record { e8s = 10_000 : nat64; }; token_symbol = opt \"LICP\"; token_name = opt \"Local ICP\"; } })" + "init_arg" : "(variant { Init = record { minting_account = \"MINTER_ACCOUNT_ID\"; initial_values = vec { record { \"DEFAULT_ACCOUNT_ID\"; record { e8s = 10_000_000_000 : nat64; }; }; }; send_whitelist = vec {}; transfer_fee = opt record { e8s = 10_000 : nat64; }; token_symbol = opt \"LICP\"; token_name = opt \"Local ICP\"; } })" } }, "defaults": { diff --git a/docs/developer-docs/defi/wallets/overview.mdx b/docs/developer-docs/defi/wallets/overview.mdx index 0a9f3ac970..d8a8733fa8 100644 --- a/docs/developer-docs/defi/wallets/overview.mdx +++ b/docs/developer-docs/defi/wallets/overview.mdx @@ -27,7 +27,7 @@ On ICP, both developers and end users will use different types of wallets for di | Type of wallet | Activities | Examples | |----------------|------------|----------| |[Asset wallet](overview.mdx) | Hold, transfer, and receive assets such as fungible tokens including ICP and other ICRC1/ICRC2 tokens (ex. ckBTC, ckETH) and non-fungible tokens. View token holdings. Stake ICP and create a neuron to participate in the NNS. User based authentication. | Plug, Stoic, Oisy. [View the full list](#third-party-custody). | -| [Canister-controlled wallet](/docs/current/developer-docs/smart-contracts/overview/introduction) | Using [Chain Fusion](/docs/current/developer-docs/multi-chain/overview), canisters on ICP can hold, sign, and transact with assets on various chains including ICP, Bitcoin, Ethereum, EVMs, and more. | [Cycles wallet](/docs/current/developer-docs/defi/cycles/cycles-wallet) (will be depreciated from dfx). Holds cycles needed to deploy, upgrade, and perform other operations on canisters. The cycles wallet is still supported, but has been replaced by the [cycles ledger](docs/current/developer-docs/defi/cycles/cycles-ledger). It is recommended to use the cycles ledger instead. | +| [Canister-controlled wallet](/docs/current/developer-docs/smart-contracts/overview/introduction) | Using [Chain Fusion](/docs/current/developer-docs/multi-chain/overview), canisters on ICP can hold, sign, and transact with assets on various chains including ICP, Bitcoin, Ethereum, EVMs, and more. | [Cycles wallet](/docs/current/developer-docs/defi/cycles/cycles-wallet) (will be depreciated from dfx). Holds cycles needed to deploy, upgrade, and perform other operations on canisters. The cycles wallet is still supported, but has been replaced by the [cycles ledger](/docs/current/developer-docs/defi/cycles/cycles-ledger). It is recommended to use the cycles ledger instead. | ### Other authentication methods diff --git a/docs/developer-docs/gas-cost.mdx b/docs/developer-docs/gas-cost.mdx index abfef6f732..8a35ed2ae8 100644 --- a/docs/developer-docs/gas-cost.mdx +++ b/docs/developer-docs/gas-cost.mdx @@ -236,7 +236,7 @@ Getting cycles back from a canister - To withdraw cycles from a canister, the [canister must be deleted](/docs/current/tutorials/developer-journey/level-1/1.6-managing-canisters#getting-cycles-back-from-a-canister). Topping up canisters - - [Top up your canisters](docs/current/developer-docs/smart-contracts/topping-up/topping-up-canister). + - [Top up your canisters](/docs/current/developer-docs/smart-contracts/topping-up/topping-up-canister). - [Cycles management services](/docs/current/developer-docs/smart-contracts/topping-up/cycles_management_services). - [Cycle.express](https://cycle.express/). diff --git a/docs/developer-docs/multi-chain/bitcoin/using-btc/btc-comparison.mdx b/docs/developer-docs/multi-chain/bitcoin/using-btc/btc-comparison.mdx index a01e76a9a8..b2df1912b3 100644 --- a/docs/developer-docs/multi-chain/bitcoin/using-btc/btc-comparison.mdx +++ b/docs/developer-docs/multi-chain/bitcoin/using-btc/btc-comparison.mdx @@ -37,7 +37,7 @@ Canister smart contracts on ICP have special properties that allow developers to To learn more about full canister smart contract functionality, refer to the [smart contracts documentation](/docs/current/developer-docs/smart-contracts/overview/introduction). -Specifically, through protocol-level integration of ICP with the [Bitcoin network](docs/current/developer-docs/multi-chain/bitcoin/overview), ICP smart contracts can interact with the Bitcoin network directly. Canister smart contracts can run [queries against the full Bitcoin UTXO](/docs/current/developer-docs/multi-chain/bitcoin/using-btc/read-state) set, including finding the balance of any Bitcoin address. They can [hold](/docs/current/developer-docs/multi-chain/bitcoin/using-btc/generate-addresses), [sign](/docs/current/developer-docs/multi-chain/bitcoin/using-btc/sign-transactions), and [submit transactions](/docs/current/developer-docs/multi-chain/bitcoin/using-btc/submit-transactions) to the Bitcoin network. +Specifically, through protocol-level integration of ICP with the [Bitcoin network](/docs/current/developer-docs/multi-chain/bitcoin/overview), ICP smart contracts can interact with the Bitcoin network directly. Canister smart contracts can run [queries against the full Bitcoin UTXO](/docs/current/developer-docs/multi-chain/bitcoin/using-btc/read-state) set, including finding the balance of any Bitcoin address. They can [hold](/docs/current/developer-docs/multi-chain/bitcoin/using-btc/generate-addresses), [sign](/docs/current/developer-docs/multi-chain/bitcoin/using-btc/sign-transactions), and [submit transactions](/docs/current/developer-docs/multi-chain/bitcoin/using-btc/submit-transactions) to the Bitcoin network. The [Threshold Schnorr integration](/docs/current/developer-docs/smart-contracts/signatures/t-schnorr) allows developers to interact with Runes and Ordinals directly in canisters. A [Schnorr canister example](https://github.com/dfinity/examples/tree/master/motoko/t-schnorr) is available in Motoko and Rust. diff --git a/docs/developer-docs/smart-contracts/advanced-features/async-code.mdx b/docs/developer-docs/smart-contracts/advanced-features/async-code.mdx index ae18e42072..4ab1db4151 100644 --- a/docs/developer-docs/smart-contracts/advanced-features/async-code.mdx +++ b/docs/developer-docs/smart-contracts/advanced-features/async-code.mdx @@ -4,12 +4,10 @@ keywords: [advanced, concept, async code, inter-canister calls, async inter-cani import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow"; -# Composite queries +# Async code and inter-canister calls -# Async code and inter-canister calls - ## Overview In programming, the [async/await pattern](https://en.wikipedia.org/wiki/Async/await) is a syntactic feature of many programming languages that allows an asynchronous, non-blocking function to be structured in a similar way to an ordinary synchronous function. diff --git a/docs/developer-docs/smart-contracts/best-practices/general.mdx b/docs/developer-docs/smart-contracts/best-practices/general.mdx index 0ccb29ce34..0ad4374f35 100644 --- a/docs/developer-docs/smart-contracts/best-practices/general.mdx +++ b/docs/developer-docs/smart-contracts/best-practices/general.mdx @@ -18,7 +18,7 @@ This guide outlines essential development best practices for building on the Int Ensure all canisters have sufficient cycles to sustain operations for several years initially. Given the cost-effectiveness of storage and computation on ICP compared to other platforms, this upfront investment is usually modest. -Refer to [topping up cycles page](docs/current/developer-docs/smart-contracts/topping-up/topping-up-canister) to learn how to top-up cycles effectively. +Refer to [topping up cycles page](/docs/current/developer-docs/smart-contracts/topping-up/topping-up-canister) to learn how to top-up cycles effectively. Refer to the [cycles estimate](/docs/current/developer-docs/gas-cost) page to estimate cycle usage. @@ -26,7 +26,7 @@ Refer to the [cycles estimate](/docs/current/developer-docs/gas-cost) page to es ICP features a mechanism to prevent canisters from running out of cycles. Canisters have a configurable `freezing_threshold`, dynamically evaluated in cycles. Set `freezing_threshold` conservatively, ensuring at least 90 to 180 days' worth of cycles for proactive management. -Refer to [this resource](docs/current/developer-docs/smart-contracts/topping-up/topping-up-canister#managing-cycle-depletion-with-freezing-threshold) to learn how to configure the `freezing_threshold` of a canister. +Refer to [this resource](/docs/current/developer-docs/smart-contracts/topping-up/topping-up-canister#managing-cycle-depletion-with-freezing-threshold) to learn how to configure the `freezing_threshold` of a canister. To make sure you won’t get surprised by a high cycle burn rate or hitting an instruction limit, you can use the recently added [performance counter API](https://internetcomputer.org/blog/features/async-performance-counter) to profile your canisters even before going live. diff --git a/docs/developer-docs/smart-contracts/best-practices/reproducible-builds.mdx b/docs/developer-docs/smart-contracts/best-practices/reproducible-builds.mdx index 30f6fe250d..bce4af1759 100644 --- a/docs/developer-docs/smart-contracts/best-practices/reproducible-builds.mdx +++ b/docs/developer-docs/smart-contracts/best-practices/reproducible-builds.mdx @@ -26,7 +26,7 @@ However, build tools aren’t perfect, and may fail to ensure reproducible build ICP does not allow you to access the Wasm module of an arbitrary canister. This is a design decision, as developers might want to keep some code private. However, ICP does allow anyone to access the SHA-256 of the Wasm module. -To obtain this hash, you must first note the principal of the canister whose code you want to check. For example, to check the code of the Internet Identity canister, the principal is `rdmx6-jaaaa-aaaaa-aaadq-cai`. Then, the easiest way to access this data is using [`dfx`](docs/current/developer-docs/getting-started/install) from a command line using the following command: +To obtain this hash, you must first note the principal of the canister whose code you want to check. For example, to check the code of the Internet Identity canister, the principal is `rdmx6-jaaaa-aaaaa-aaadq-cai`. Then, the easiest way to access this data is using [`dfx`](/docs/current/developer-docs/getting-started/install) from a command line using the following command: ```bash dfx canister --network ic info rdmx6-jaaaa-aaaaa-aaadq-cai diff --git a/docs/developer-docs/smart-contracts/best-practices/troubleshooting.mdx b/docs/developer-docs/smart-contracts/best-practices/troubleshooting.mdx index f49b2967bc..1fd17a237b 100644 --- a/docs/developer-docs/smart-contracts/best-practices/troubleshooting.mdx +++ b/docs/developer-docs/smart-contracts/best-practices/troubleshooting.mdx @@ -22,7 +22,7 @@ On subnets with higher loads, your application may experience elevated latencies ### Recommendation: Consider moving the canister to another subnet. -If your canister is running on a subnet that has a consistently high load and thus elevated latency, consider adding a [compute allocation](docs/current/developer-docs/gas-cost#execution-and-compute-allocation) setting. A compute allocation of 1% will guarantee your canister is scheduled for execution once every 100 rounds. +If your canister is running on a subnet that has a consistently high load and thus elevated latency, consider adding a [compute allocation](/docs/current/developer-docs/gas-cost#execution-and-compute-allocation) setting. A compute allocation of 1% will guarantee your canister is scheduled for execution once every 100 rounds. ## Troubleshooting best practices diff --git a/plugins/airtable.js b/plugins/airtable.js index ac40986094..822eb98ff9 100644 --- a/plugins/airtable.js +++ b/plugins/airtable.js @@ -156,11 +156,21 @@ async function fetchAirtableRecords({ apiKey, baseId, tableName, viewId }) { } async function processEventsData(records) { + const endDateCutoff = new Date(Date.now() - 6 * 30 * 24 * 60 * 60 * 1000) + .toISOString() + .split("T")[0]; + + const today = new Date().toISOString().split("T")[0]; + records = await Promise.all( records.map(async (record) => { const parsedRecord = parseAirtableData(record); - let imageUrl = await fetchShareImage(parsedRecord.eventLink); + // Only fetch share image for current/future events + let imageUrl = null; + if (parsedRecord.endDate >= today) { + imageUrl = await fetchShareImage(parsedRecord.eventLink); + } // If no share image is found, use a default image if (!imageUrl) { @@ -171,10 +181,6 @@ async function processEventsData(records) { }) ); - const endDatecutoff = new Date(Date.now() - 6 * 30 * 24 * 60 * 60 * 1000) - .toISOString() - .split("T")[0]; - records = records.filter((rec) => { if (!rec.startDate || new Date(rec.startDate) == "Invalid Date") { logger.warn("Invalid event, no start date: " + rec.eventName); @@ -186,7 +192,7 @@ async function processEventsData(records) { return false; } - if (rec.endDate < endDatecutoff) { + if (rec.endDate < endDateCutoff) { // old event return false; } diff --git a/search/rust-toolchain.toml b/search/rust-toolchain.toml new file mode 100644 index 0000000000..624eb0ea63 --- /dev/null +++ b/search/rust-toolchain.toml @@ -0,0 +1,2 @@ +[toolchain] +channel = "1.76.0" diff --git a/src/components/Common/sampleItems.ts b/src/components/Common/sampleItems.ts index c54901efea..1bd4d013f7 100644 --- a/src/components/Common/sampleItems.ts +++ b/src/components/Common/sampleItems.ts @@ -265,7 +265,7 @@ export const sampleItems: SampleItem[] = [ }, motoko: "https://github.com/dfinity/examples/tree/master/motoko/send_http_get", - docs: "docs/current/developer-docs/smart-contracts/advanced-features/https-outcalls/https-outcalls-how-to-use", + docs: "/docs/current/developer-docs/smart-contracts/advanced-features/https-outcalls/https-outcalls-how-to-use", rust: "https://github.com/dfinity/examples/tree/master/rust/send_http_get", }, },