croncat-integration-testing

Crates.iocroncat-integration-testing
lib.rscroncat-integration-testing
version1.1.1
sourcesrc
created_at2023-04-15 21:29:10.363755
updated_at2023-09-25 13:45:31.309721
descriptionTest helpers for dApps integrating CosmWasm contracts with CronCat automation.
homepage
repositoryhttps://github.com/CronCats/cw-croncat
max_upload_size
id840198
size14,346
Mykhailo Donchenko (Buckram123)

documentation

README

CronCat Integration Utilities

This repo contains helper methods for projects adding automation to their smart contracts using CronCat tasks.

There are helper constants, functions, and cw-multi-test exports that'll aid dApps in testing their custom workflows that leverage CronCat automation.

  • set_up_croncat_contracts — you may provide an optional cw-multi-test App object, and it will set up the CronCat contracts and return this struct with helpful variables to be used in unit tests.
pub struct CronCatTestEnv {
    pub app: cw_multi_test::App,
    pub factory: cosmwasm_std::Addr,
    pub manager: cosmwasm_std::Addr,
    pub tasks: cosmwasm_std::Addr,
    pub agents: cosmwasm_std::Addr,
}
  • add_seconds_to_block — convenience method to move time forward in the cw-multi-test environment
  • increment_block_height — convenience method to increase block height in the cw-multi-test environment

There are additional exposed methods that will allow integrators to store and instantiate the various CronCat contracts.

Commit count: 1679

cargo fmt