wormhole/cosmwasm/contracts
Chirantan Ekbote d19fc98091 sdk/rust: Properly support tokenbridge payload3 messages
Add the payload as an explicit field to the `TransferWithPayload` enum
variant.  This is a generic parameter that defaults to `Box<RawMessage>`
for maximum flexibility (and to avoid leaking lifetimes higher up the
stack) but users are encouraged to replace this default type parameter
with an explicit `&RawMessage` in places where the serde_wormhole data
format is used.

The main benefit of this change is that the payload is now included as
part of the actual message and no longer requires callers to awkwardly
append it after serialization.  This is especially useful in human-
readable formats like JSON (see the `transfer_with_payload` test in
token.rs for an example of this simplification).

The main downside is that this now requires explicit type annotations
when using the non-payload3 variants so that the compiler will pick up
the default generic parameter.  This is a relatively minor inconvenience
and the benefit appears to be worth the cost.

There should be no functional change.
2023-01-20 18:12:41 +09:00
..
cw20-wrapped cosmwasm: Fix clippy warnings 2022-10-28 14:35:44 -04:00
mock-bridge-integration cosmwasm: Override local deps at the workspace level 2022-11-11 09:46:33 -05:00
shutdown-token-bridge cosmwasm: Override local deps at the workspace level 2022-11-11 09:46:33 -05:00
shutdown-wormhole cosmwasm: Override local deps at the workspace level 2022-11-11 09:46:33 -05:00
token-bridge cosmwasm: Override local deps at the workspace level 2022-11-11 09:46:33 -05:00
wormchain-accounting sdk/rust: Properly support tokenbridge payload3 messages 2023-01-20 18:12:41 +09:00
wormhole cosmwasm: wormhole: remove unecessary cast to usize 2022-12-15 14:51:54 -05:00