d19fc98091
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. |
||
---|---|---|
.. | ||
artifacts | ||
contracts | ||
deployment | ||
devnet/config | ||
packages | ||
.dockerignore | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
Dockerfile | ||
Dockerfile.deploy | ||
Makefile | ||
README.md | ||
rustfmt.toml | ||
verify |
README.md
Cosmwasm Wormhole Contracts
NOTE: This process is only Linux host compatible at this time.
Build Contracts
The following command can be used to build optimized cosmwasm contracts via Docker.
wormhole/cosmwasm $ make artifacts
Upon completion, the compiled bytecode for cosmwasm contracts will be placed
into the artifacts
directory.
Run tests
You can run the cargo unit tests.
wormhole/cosmwasm $ cargo test --workspace --locked