Concordium / concordium-rust-smart-contracts

Libraries and tools for writing and testing smart contracts on Concordium
https://docs.rs/concordium-std/latest/concordium_std/
Mozilla Public License 2.0
57 stars 36 forks source link

Delete testing infrastructure, supporting traits and types, and simplify names of types #341

Open Bargsteen opened 10 months ago

Bargsteen commented 10 months ago

Task description

We are in the process of deprecating the old testing infrastructure, as described in https://github.com/Concordium/concordium-rust-smart-contracts/issues/335, and related issues.

The testing infrastructure will remain in place for now, but it will eventually be removed. There is no current timeline for this.

This issue describes the preliminary ideas about what will happen at that point.

Bargsteen commented 3 months ago

We still have two example contracts that use the old testing library because they use quickcheck (as described in https://github.com/Concordium/concordium-rust-smart-contracts/pull/347). Ideally, we should integrate quickcheck in the integration testing library, rewrite the tests for those two contracts, and then completely remove the old testing infrastructure. Alternatively, we can also drop the support for quickcheck for now and remove the tests that use it. Which allows us to remove the old testing infrastructure now.

From my point of view, the primary pain points with current types is the added complexity once you dive into the types because we have the abstraction from traits, and because the abstraction shines through when using state* types in your state, e.g.:

#[derive(Serial, DeserialWithState)]
#[concordium(state_parameter = "S")]
struct State<S = StateApi> {
    addresses: StateSet<AccountAddress, S>,
}