wormhole/cosmwasm/contracts
Chirantan Ekbote 25abafc753
cosmwasm: Add wormchain-accounting contract (#1920)
* sdk/rust: Move profile settings to workspace

* sdk/rust: Add serde_wormhole crate

The serde_wormhole crate implements the wormhole wire format as a serde
data format.  This will let us replace all the hand-rolled
serialization with auto-generated code, which is less error-prone and
easier to review.

* sdk/rust: Add serde-based struct defintions

Refactor the core crate to add serde-based struct definitions for the
various messages used by the different wormhole smart contracts.  This
will also make it easier to use alternate data formats (like json) for
client-side tooling.

Co-authored-by: Reisen <reisen@morphism.org>

* sdk/rust: Drop references to `de::Unexpected`

The `de::Unexpected` enum from serde has a `Float(f64)` variant.
Referencing this enum anywhere in the code will cause the compiler to
emit its `fmt::Display` impl, which includes an `f64.load` instruction
on wasm targets.  Even if this instruction is never executed, its mere
existence will cause cosmos chains to reject any cosmwasm contract that
has it.

Fix this by removing all references to `de::Unexpected`.

* cosmwasm: Use cargo resolver version "2"

Enable the new feature resolver for the entire workspace.  This
prevents features that are enabled only for dev builds from also being
enabled in normal builds.

* Move cosmwasm Dockerfile to root directory

The cosmwasm contracts now also depend on the rust sdk so the docker
build context needs to be set to the root directory rather than the
cosmwasm/ directory.

* cosmwasm: Add wormchain-accounting contract

This contract implements tokenbridge accounting specifically for the
wormchain environment.

Fixes #1880.

* cosmwasm/accounting: Drop references to `de::Unexpected`

The `de::Unexpected` enum from serde has a `Float(f64)` variant.
Referencing this enum anywhere in the code will cause the compiler to
emit its `fmt::Display` impl, which includes an `f64.load` instruction
on wasm targets.  Even if this instruction is never executed, its mere
existence will cause cosmos chains to reject any cosmwasm contracts that
contain it.

Fix this by removing references to `de::Unexpected`.

Co-authored-by: Reisen <reisen@morphism.org>
2022-12-14 12:06:45 -05: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 cosmwasm: Add wormchain-accounting contract (#1920) 2022-12-14 12:06:45 -05:00
wormhole cosmwasm: Override local deps at the workspace level 2022-11-11 09:46:33 -05:00
README.md

README.md

Terra Wormhole Contracts

The Wormhole Terra integration is developed and maintained by Everstake / @ysavchenko.