|
476 | 476 | }
|
477 | 477 | ]
|
478 | 478 | },
|
| 479 | + "IbcAcknowledgement": { |
| 480 | + "type": "object", |
| 481 | + "required": [ |
| 482 | + "data" |
| 483 | + ], |
| 484 | + "properties": { |
| 485 | + "data": { |
| 486 | + "$ref": "#/definitions/Binary" |
| 487 | + } |
| 488 | + }, |
| 489 | + "additionalProperties": false |
| 490 | + }, |
| 491 | + "IbcFee": { |
| 492 | + "type": "object", |
| 493 | + "required": [ |
| 494 | + "ack_fee", |
| 495 | + "receive_fee", |
| 496 | + "timeout_fee" |
| 497 | + ], |
| 498 | + "properties": { |
| 499 | + "ack_fee": { |
| 500 | + "type": "array", |
| 501 | + "items": { |
| 502 | + "$ref": "#/definitions/Coin" |
| 503 | + } |
| 504 | + }, |
| 505 | + "receive_fee": { |
| 506 | + "type": "array", |
| 507 | + "items": { |
| 508 | + "$ref": "#/definitions/Coin" |
| 509 | + } |
| 510 | + }, |
| 511 | + "timeout_fee": { |
| 512 | + "type": "array", |
| 513 | + "items": { |
| 514 | + "$ref": "#/definitions/Coin" |
| 515 | + } |
| 516 | + } |
| 517 | + }, |
| 518 | + "additionalProperties": false |
| 519 | + }, |
479 | 520 | "IbcMsg": {
|
480 | 521 | "description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)",
|
481 | 522 | "oneOf": [
|
|
567 | 608 | },
|
568 | 609 | "additionalProperties": false
|
569 | 610 | },
|
| 611 | + { |
| 612 | + "description": "Acknowledges a packet that this contract received over IBC. This allows acknowledging a packet that was not acknowledged yet in the `ibc_packet_receive` call.", |
| 613 | + "type": "object", |
| 614 | + "required": [ |
| 615 | + "write_acknowledgement" |
| 616 | + ], |
| 617 | + "properties": { |
| 618 | + "write_acknowledgement": { |
| 619 | + "type": "object", |
| 620 | + "required": [ |
| 621 | + "ack", |
| 622 | + "channel_id", |
| 623 | + "packet_sequence" |
| 624 | + ], |
| 625 | + "properties": { |
| 626 | + "ack": { |
| 627 | + "description": "The acknowledgement to send back", |
| 628 | + "allOf": [ |
| 629 | + { |
| 630 | + "$ref": "#/definitions/IbcAcknowledgement" |
| 631 | + } |
| 632 | + ] |
| 633 | + }, |
| 634 | + "channel_id": { |
| 635 | + "description": "Existing channel where the packet was received", |
| 636 | + "type": "string" |
| 637 | + }, |
| 638 | + "packet_sequence": { |
| 639 | + "description": "Sequence number of the packet that was received", |
| 640 | + "type": "integer", |
| 641 | + "format": "uint64", |
| 642 | + "minimum": 0.0 |
| 643 | + } |
| 644 | + }, |
| 645 | + "additionalProperties": false |
| 646 | + } |
| 647 | + }, |
| 648 | + "additionalProperties": false |
| 649 | + }, |
570 | 650 | {
|
571 | 651 | "description": "This will close an existing channel that is owned by this contract. Port is auto-assigned to the contract's IBC port",
|
572 | 652 | "type": "object",
|
|
588 | 668 | }
|
589 | 669 | },
|
590 | 670 | "additionalProperties": false
|
| 671 | + }, |
| 672 | + { |
| 673 | + "description": "Incentivizes the next IBC packet sent after this message with a fee. Note that this does not necessarily have to be a packet sent by this contract. The fees are taken from the contract's balance immediately and locked until the packet is handled.\n\n# Example\n\nMost commonly, you will attach this message to a response right before sending a packet using [`IbcMsg::SendPacket`] or [`IbcMsg::Transfer`].\n\n```rust # use cosmwasm_std::{IbcMsg, IbcEndpoint, IbcFee, IbcTimeout, Coin, coins, CosmosMsg, Response, Timestamp};\n\nlet incentivize = IbcMsg::PayPacketFee { port_id: \"transfer\".to_string(), channel_id: \"source-channel\".to_string(), fee: IbcFee { receive_fee: coins(100, \"token\"), ack_fee: coins(201, \"token\"), timeout_fee: coins(200, \"token\"), }, relayers: vec![], }; let transfer = IbcMsg::Transfer { channel_id: \"source-channel\".to_string(), to_address: \"receiver\".to_string(), amount: Coin::new(100u32, \"token\"), timeout: IbcTimeout::with_timestamp(Timestamp::from_nanos(0)), memo: None, };\n\n# #[cfg(feature = \"stargate\")] let _: Response = Response::new() .add_message(CosmosMsg::Ibc(incentivize)) .add_message(CosmosMsg::Ibc(transfer)); ```", |
| 674 | + "type": "object", |
| 675 | + "required": [ |
| 676 | + "pay_packet_fee" |
| 677 | + ], |
| 678 | + "properties": { |
| 679 | + "pay_packet_fee": { |
| 680 | + "type": "object", |
| 681 | + "required": [ |
| 682 | + "channel_id", |
| 683 | + "fee", |
| 684 | + "port_id", |
| 685 | + "relayers" |
| 686 | + ], |
| 687 | + "properties": { |
| 688 | + "channel_id": { |
| 689 | + "description": "The channel id on the chain where the packet is sent from (this chain).", |
| 690 | + "type": "string" |
| 691 | + }, |
| 692 | + "fee": { |
| 693 | + "$ref": "#/definitions/IbcFee" |
| 694 | + }, |
| 695 | + "port_id": { |
| 696 | + "description": "The port id on the chain where the packet is sent from (this chain).", |
| 697 | + "type": "string" |
| 698 | + }, |
| 699 | + "relayers": { |
| 700 | + "description": "Allowlist of relayer addresses that can receive the fee. An empty list means that any relayer can receive the fee.\n\nThis is currently not implemented and *must* be empty.", |
| 701 | + "type": "array", |
| 702 | + "items": { |
| 703 | + "type": "string" |
| 704 | + } |
| 705 | + } |
| 706 | + }, |
| 707 | + "additionalProperties": false |
| 708 | + } |
| 709 | + }, |
| 710 | + "additionalProperties": false |
| 711 | + }, |
| 712 | + { |
| 713 | + "description": "Incentivizes the existing IBC packet with the given port, channel and sequence with a fee. Note that this does not necessarily have to be a packet sent by this contract. The fees are taken from the contract's balance immediately and locked until the packet is handled. They are added to the existing fees on the packet.", |
| 714 | + "type": "object", |
| 715 | + "required": [ |
| 716 | + "pay_packet_fee_async" |
| 717 | + ], |
| 718 | + "properties": { |
| 719 | + "pay_packet_fee_async": { |
| 720 | + "type": "object", |
| 721 | + "required": [ |
| 722 | + "channel_id", |
| 723 | + "fee", |
| 724 | + "port_id", |
| 725 | + "relayers", |
| 726 | + "sequence" |
| 727 | + ], |
| 728 | + "properties": { |
| 729 | + "channel_id": { |
| 730 | + "description": "The channel id on the chain where the packet is sent from (this chain).", |
| 731 | + "type": "string" |
| 732 | + }, |
| 733 | + "fee": { |
| 734 | + "$ref": "#/definitions/IbcFee" |
| 735 | + }, |
| 736 | + "port_id": { |
| 737 | + "description": "The port id on the chain where the packet is sent from (this chain).", |
| 738 | + "type": "string" |
| 739 | + }, |
| 740 | + "relayers": { |
| 741 | + "description": "Allowlist of relayer addresses that can receive the fee. An empty list means that any relayer can receive the fee.\n\nThis is currently not implemented and *must* be empty.", |
| 742 | + "type": "array", |
| 743 | + "items": { |
| 744 | + "type": "string" |
| 745 | + } |
| 746 | + }, |
| 747 | + "sequence": { |
| 748 | + "description": "The sequence number of the packet that should be incentivized.", |
| 749 | + "type": "integer", |
| 750 | + "format": "uint64", |
| 751 | + "minimum": 0.0 |
| 752 | + } |
| 753 | + }, |
| 754 | + "additionalProperties": false |
| 755 | + } |
| 756 | + }, |
| 757 | + "additionalProperties": false |
591 | 758 | }
|
592 | 759 | ]
|
593 | 760 | },
|
|
0 commit comments