Skip to content

Commit 205064b

Browse files
committed
last readme testification
1 parent 52c917e commit 205064b

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

packages/snip20/Readme.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ Example:
1515
```rust
1616
# use cosmwasm_std::{Uint128, StdError, StdResult, CosmosMsg, Response};
1717
# use secret_toolkit_snip20::{transfer_msg};
18+
#
1819
# fn main() -> StdResult<()> {
1920
let recipient = "ADDRESS_TO_TRANSFER_TO".to_string();
2021
let amount = Uint128::from(10000u128);
22+
let memo = Some("memo".to_string());
2123
let padding = None;
2224
let block_size = 256;
2325
let callback_code_hash = "TOKEN_CONTRACT_CODE_HASH".to_string();
@@ -26,7 +28,7 @@ Example:
2628
let cosmos_msg = transfer_msg(
2729
recipient,
2830
amount,
29-
Some("memo".to_string()),
31+
memo,
3032
padding,
3133
block_size,
3234
callback_code_hash,

packages/utils/Readme.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ elsewhere. There isn't an overarching theme for the items in this package.
1616
This module contains traits used to call another contract. Do not forget to add the `use` statement for the traits you want.
1717

1818
```ignore
19-
use secret_toolkit::utils::{InitCallback, HandleCallback, Query};
19+
use secret_toolkit::utils::{InitCallback, HandleCallback};
2020
```
2121

2222
Also, don't forget to add the toolkit dependency to your Cargo.toml
@@ -494,7 +494,11 @@ Note: `set_pauser` and `remove_pauser` are permissionless by default.
494494

495495
If you don't like the default implementation or want to override it for any other reason (for example, using a different storage namespace), you can do that by defining your own struct and implement `FeatureToggleTrait` for it:
496496

497-
```ignore
497+
```rust
498+
# use cosmwasm_std::{Storage, StdResult};
499+
# use secret_toolkit_utils::feature_toggle::{FeatureToggleTrait, Status};
500+
# use serde::Serialize;
501+
#
498502
struct TrollFeatureToggle {}
499503

500504
impl FeatureToggleTrait for TrollFeatureToggle {
@@ -525,11 +529,14 @@ impl FeatureToggleTrait for TrollFeatureToggle {
525529

526530
Similarly to `FeatureToggleHandleMsg`, query messages (and default implementations) are also provided:
527531

528-
```ignore
532+
```rust
533+
# use serde::{Serialize, Deserialize, de::DeserializeOwned};
534+
# use schemars::JsonSchema;
535+
#
529536
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
530537
#[serde(rename_all = "snake_case")]
531538
pub enum FeatureToggleQueryMsg<T: Serialize + DeserializeOwned> {
532-
#[serde(bound = "")] // don't ask
539+
# #[serde(bound = "")]
533540
Status {
534541
features: Vec<T>,
535542
},

0 commit comments

Comments
 (0)