From 381be55e56fb8a74f0e1135d5acaf641f5011091 Mon Sep 17 00:00:00 2001 From: Christoph Otter Date: Mon, 29 Apr 2024 13:53:16 +0200 Subject: [PATCH] Fix doc links --- contracts/ibc-callbacks/schema/ibc-callbacks.json | 2 +- .../schema/raw/response_to_callback_stats.json | 2 +- packages/std/src/ibc/callbacks.rs | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/contracts/ibc-callbacks/schema/ibc-callbacks.json b/contracts/ibc-callbacks/schema/ibc-callbacks.json index 346aa4e9d9..80a3d7ae83 100644 --- a/contracts/ibc-callbacks/schema/ibc-callbacks.json +++ b/contracts/ibc-callbacks/schema/ibc-callbacks.json @@ -168,7 +168,7 @@ "additionalProperties": false }, "IbcDestinationChainCallbackMsg": { - "description": "The message type of the IBC destination chain callback.\n\nThe IBC destination chain callback is needed for cases where someone triggers the sending of an IBC packet through some other message (i.e. not through [`IbcMsg::SendPacket`]) and your contract needs to know that it received this. A prominent example is the [`IbcMsg::Transfer`] message. Without callbacks, you cannot know that someone sent you IBC coins.\n\nThe callback is called after the packet was acknowledged on the destination chain, as follows: - If the acknowledgement is synchronous (i.e. returned immediately when the packet is received), the callback is called only if the acknowledgement was successful. - If the acknowledgement is asynchronous (i.e. written later using `WriteAcknowledgement`), the callback is called regardless of the success of the acknowledgement.\n\nNote that there are some prerequisites that need to be fulfilled to receive source chain callbacks: - The contract must implement the `ibc_destination_chain_callback` entrypoint. - The IBC application in the destination chain must have support for the callbacks middleware. - You have to add serialized [`IbcCallbackRequest`] to a specific field of the message. For `IbcMsg::Transfer`, this is the `memo` field and it needs to be json-encoded.", + "description": "The message type of the IBC destination chain callback.\n\nThe IBC destination chain callback is needed for cases where someone triggers the sending of an IBC packet through some other message (i.e. not through [`crate::IbcMsg::SendPacket`]) and your contract needs to know that it received this. A prominent example is the [`crate::IbcMsg::Transfer`] message. Without callbacks, you cannot know that someone sent you IBC coins.\n\nThe callback is called after the packet was acknowledged on the destination chain, as follows: - If the acknowledgement is synchronous (i.e. returned immediately when the packet is received), the callback is called only if the acknowledgement was successful. - If the acknowledgement is asynchronous (i.e. written later using `WriteAcknowledgement`), the callback is called regardless of the success of the acknowledgement.\n\nNote that there are some prerequisites that need to be fulfilled to receive source chain callbacks: - The contract must implement the `ibc_destination_chain_callback` entrypoint. - The IBC application in the destination chain must have support for the callbacks middleware. - You have to add serialized [`IbcCallbackRequest`] to a specific field of the message. For `IbcMsg::Transfer`, this is the `memo` field and it needs to be json-encoded.", "type": "object", "required": [ "ack", diff --git a/contracts/ibc-callbacks/schema/raw/response_to_callback_stats.json b/contracts/ibc-callbacks/schema/raw/response_to_callback_stats.json index ec5ab4a057..20b5c0b728 100644 --- a/contracts/ibc-callbacks/schema/raw/response_to_callback_stats.json +++ b/contracts/ibc-callbacks/schema/raw/response_to_callback_stats.json @@ -71,7 +71,7 @@ "additionalProperties": false }, "IbcDestinationChainCallbackMsg": { - "description": "The message type of the IBC destination chain callback.\n\nThe IBC destination chain callback is needed for cases where someone triggers the sending of an IBC packet through some other message (i.e. not through [`IbcMsg::SendPacket`]) and your contract needs to know that it received this. A prominent example is the [`IbcMsg::Transfer`] message. Without callbacks, you cannot know that someone sent you IBC coins.\n\nThe callback is called after the packet was acknowledged on the destination chain, as follows: - If the acknowledgement is synchronous (i.e. returned immediately when the packet is received), the callback is called only if the acknowledgement was successful. - If the acknowledgement is asynchronous (i.e. written later using `WriteAcknowledgement`), the callback is called regardless of the success of the acknowledgement.\n\nNote that there are some prerequisites that need to be fulfilled to receive source chain callbacks: - The contract must implement the `ibc_destination_chain_callback` entrypoint. - The IBC application in the destination chain must have support for the callbacks middleware. - You have to add serialized [`IbcCallbackRequest`] to a specific field of the message. For `IbcMsg::Transfer`, this is the `memo` field and it needs to be json-encoded.", + "description": "The message type of the IBC destination chain callback.\n\nThe IBC destination chain callback is needed for cases where someone triggers the sending of an IBC packet through some other message (i.e. not through [`crate::IbcMsg::SendPacket`]) and your contract needs to know that it received this. A prominent example is the [`crate::IbcMsg::Transfer`] message. Without callbacks, you cannot know that someone sent you IBC coins.\n\nThe callback is called after the packet was acknowledged on the destination chain, as follows: - If the acknowledgement is synchronous (i.e. returned immediately when the packet is received), the callback is called only if the acknowledgement was successful. - If the acknowledgement is asynchronous (i.e. written later using `WriteAcknowledgement`), the callback is called regardless of the success of the acknowledgement.\n\nNote that there are some prerequisites that need to be fulfilled to receive source chain callbacks: - The contract must implement the `ibc_destination_chain_callback` entrypoint. - The IBC application in the destination chain must have support for the callbacks middleware. - You have to add serialized [`IbcCallbackRequest`] to a specific field of the message. For `IbcMsg::Transfer`, this is the `memo` field and it needs to be json-encoded.", "type": "object", "required": [ "ack", diff --git a/packages/std/src/ibc/callbacks.rs b/packages/std/src/ibc/callbacks.rs index 9506578572..c8ab73f565 100644 --- a/packages/std/src/ibc/callbacks.rs +++ b/packages/std/src/ibc/callbacks.rs @@ -12,7 +12,7 @@ use crate::{Addr, IbcAcknowledgement, IbcPacket, Uint64}; /// The specific field and format to send it in can vary depending on the IBC message, /// but is usually the `memo` field by convention. /// -/// See [`IbcSourceChainCallback`] for more details. +/// See [`IbcSourceChainCallbackMsg`] and [`IbcDestinationChainCallbackMsg`] for more details. /// /// # Example /// @@ -94,9 +94,9 @@ pub struct IbcDstCallback { /// The type of IBC source chain callback that is being called. /// /// IBC source chain callbacks are needed for cases where your contract triggers the sending of an -/// IBC packet through some other message (i.e. not through [`IbcMsg::SendPacket`]) and needs to +/// IBC packet through some other message (i.e. not through [`crate::IbcMsg::SendPacket`]) and needs to /// know whether or not the packet was successfully received on the other chain. -/// A prominent example is the [`IbcMsg::Transfer`] message. Without callbacks, you cannot know +/// A prominent example is the [`crate::IbcMsg::Transfer`] message. Without callbacks, you cannot know /// whether the transfer was successful or not. /// /// Note that there are some prerequisites that need to be fulfilled to receive source chain callbacks: @@ -150,9 +150,9 @@ impl IbcTimeoutCallbackMsg { /// The message type of the IBC destination chain callback. /// /// The IBC destination chain callback is needed for cases where someone triggers the sending of an -/// IBC packet through some other message (i.e. not through [`IbcMsg::SendPacket`]) and +/// IBC packet through some other message (i.e. not through [`crate::IbcMsg::SendPacket`]) and /// your contract needs to know that it received this. -/// A prominent example is the [`IbcMsg::Transfer`] message. Without callbacks, you cannot know +/// A prominent example is the [`crate::IbcMsg::Transfer`] message. Without callbacks, you cannot know /// that someone sent you IBC coins. /// /// The callback is called after the packet was acknowledged on the destination chain, as follows: