Benign crates 3,438,020 installs Download

cw-utils 2.0.0-beta.0

“Common helpers for other cw specs”

At least four Markdown section headingsRust test marker or harness
SHA-2565c41e47f5e786edbd80119a4132d6ecfe9f666c48541c74fd743ca29407fa41d

Evidence

At least four Markdown section headings CHANGELOG.md · lines 1–26
1# Changelog
2
3## [v1.0.3](https://github.com/CosmWasm/cw-utils/tree/v1.0.3) (2023-11-23)
4
5[Full Changelog](https://github.com/CosmWasm/cw-utils/compare/v1.0.2...v1.0.3)
6
7**Closed issues:**
8
9- cw-utils depends on cw2 and cw20 on cw-utils leads to recursive repo dependency [\#12](https://github.com/CosmWasm/cw-utils/issues/12)
10
11**Merged pull requests:**
12
13- Deprecate `ensure_from_older_version` [\#19](https://github.com/CosmWasm/cw-utils/pull/19) ([webmaster128](https://github.com/webmaster128))
14- Deprecate cw\_utils::Event [\#18](https://github.com/CosmWasm/cw-utils/pull/18) ([webmaster128](https://github.com/webmaster128))
15
16## [v1.0.2](https://github.com/CosmWasm/cw-utils/tree/v1.0.2) (2023-10-02)
17
18[Full Changelog](https://github.com/CosmWasm/cw-utils/compare/v1.0.1...v1.0.2)
19
20**Closed issues:**
21
22- Disable default features of the cosmwasm-std dependency [\#8](https://github.com/CosmWasm/cw-utils/issues/8)
23
24**Merged pull requests:**
25
26- Update deps and version [\#14](https://github.com/CosmWasm/cw-utils/pu …
DEX protocol name reference CHANGELOG.md · lines 775–780
775:36… [\#259](https://github.com/CosmWasm/cw-plus/issues/259)
776- Build uniswap contract [\#7](https://github.com/CosmWasm/cw-plus/issues/7)
777
778**Merged pull requests:**
779
780- Use prost to create and parse proper …
imports cosmwasm_schema::cw_serde scheduled.rs · lines 1–14
1use crate::Duration;
2use cosmwasm_schema::cw_serde;
3use cosmwasm_std::{BlockInfo, StdError, StdResult, Timestamp};
4use std::cmp::Ordering;
5use std::fmt;
6use std::ops::Add;
7
8/// Scheduled represents a point in time when an event happens.
9/// It can compare with a BlockInfo and will return is_triggered() == true
10/// once the condition is hit (and for every block in the future)
11#[cw_serde]
12#[derive(Copy)]
13pub enum Scheduled {
14 /// AtHeight will schedule when `env …
imports super::* scheduled.rs · lines 58–72
⋯4 lines
62}
63
64#[cfg(test)]
65mod test {
66 use super::*;
67
68 #[test]
69 fn compare_schedules() {
70 // matching pairs
71 assert!(Scheduled::AtHeight(5) < Scheduled::AtHeight(10));
72 assert!(Scheduled::AtHeight(8) > Sch …
imports cosmwasm_std::coins payment.rs · lines 66–86
66:13… "No funds sent")]
67 NoFunds {},
68
69 #[error("This message does no accept funds")]
70 NonPayable {},
71}
72
73#[cfg(test)]
74mod test {
75 use super::*;
76 use cosmwasm_std::testing::mock_info;
77 use cosmwasm_std::{coin, coins};
78
79 const SENDER: &str = "sender";
80
81 #[test]
82 fn nonpayable_works() {
83 let no_payment = mock_info(SENDER, &[]);
84 nonpayable(&no_payment).unwrap();
85
86 …

Showing the top 5 files — 4 more files (38 regions) not shown.

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.