#cosmwasm #cosmwasm-contracts #dapp #helper #cron-cat #automation #testing

croncat-integration-testing

Test helpers for dApps integrating CosmWasm contracts with CronCat automation

8 releases (stable)

1.1.1 Sep 25, 2023
1.1.0 Jun 13, 2023
1.0.3 May 30, 2023
0.1.6-rc.1 Apr 21, 2023

#2493 in Magic Beans

Download history 110/week @ 2024-04-13 42/week @ 2024-04-20 294/week @ 2024-04-27 73/week @ 2024-05-04 27/week @ 2024-05-11 69/week @ 2024-05-18 30/week @ 2024-05-25 41/week @ 2024-06-01 294/week @ 2024-06-08 37/week @ 2024-06-15 62/week @ 2024-06-22 134/week @ 2024-06-29 119/week @ 2024-07-06 105/week @ 2024-07-13 109/week @ 2024-07-20 121/week @ 2024-07-27

465 downloads per month

MIT/Apache

1MB
21K SLoC

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.

Dependencies

~10–17MB
~254K SLoC