Crate fadroma

source ·
Expand description

Note on network support

Fadroma currently only supports Secret Network flavoured CosmWasm. As such, you MUST enable the scrt feature flag. Otherwise, you will get compilation errors - this is by design.

Re-exports

Modules

  • Transaction authentication by pre-configured admin address. See the examples on how to implement it.
  • Time and space efficient binary serialization for types that are stored in a contract’s storage. Supports both structs and enums, with or without generics. This is Fadroma’s default mode for serializing data for storage.
  • SHA256 hashing and pseudo rng. Feature flag: crypto
  • Test multiple contract interactions using unit tests. Feature flag: ensemble
  • Emergency pause and termination of contracts. You MUST implement admin in your contract if you want to use this module. This is enforced when using Fadroma DSL. See the examples on how to implement it.
  • Start here. use fadroma::prelude::* to get the essentials for writing smart contracts with Fadroma.
  • Secret Network specific utilities and contracts that are commonly used when developing smart contracts for it. Feature flag: scrt
  • Utilities for interacting with the native key-value storage.

Macros

  • Generate a struct and implement ContractHarness for the given struct identifier, using the provided entry point functions.
  • Define the mod wasm entrypoint for production builds, using the provided entry point functions.
  • Use on any type that does not contain a cosmwasm_std::Addr. The implementation simply returns Ok(self) without doing any transformation.
  • Construct a storage namespace. It creates a zero-sized struct with the given type name and implements Namespace on it with the provied byte slice literal.