Skip to content

Commit

Permalink
Merge pull request #13 from CosmWasm/entrypoints
Browse files Browse the repository at this point in the history
Add documentation for entrypoints
  • Loading branch information
aumetra authored May 23, 2024
2 parents a60be34 + 5049f83 commit fe018e2
Show file tree
Hide file tree
Showing 11 changed files with 349 additions and 51 deletions.
1 change: 1 addition & 0 deletions .github/workflows/doc-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
cargo update -p cosmwasm-schema-derive
cargo update -p cosmwasm-schema
cargo update -p cosmwasm-std
cargo update -p cw2
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
Expand Down
129 changes: 81 additions & 48 deletions docs-test-gen/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion docs-test-gen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ edition = "2021"
anyhow = "1.0.82"
glob = "0.3.1"
phf = { version = "0.11.2", features = ["macros"] }
pulldown-cmark = { version = "0.10.3", default-features = false }
pulldown-cmark = { version = "0.11.0", default-features = false }
strum = { version = "0.26.2", features = ["derive"] }

[dev-dependencies]
cw2 = "*"
cosmwasm-schema = "*"
cosmwasm-std = { version = "*", features = ["stargate", "staking", "cosmwasm_2_0"] }
19 changes: 19 additions & 0 deletions docs-test-gen/templates/core.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
use cosmwasm_std::*;
use cosmwasm_schema::cw_serde;

#[cw_serde]
enum OtherContractMsg {
DoSomething {}
}

#[cw_serde]
struct InstantiateMsg {}

Expand All @@ -10,6 +15,20 @@ struct QueryMsg {}
#[cw_serde]
struct ExecuteMsg {}

#[cw_serde]
struct MigrateMsg {}

#[cw_serde]
struct SudoMsg {}

fn transform(_old_data: OldData) -> () {
()
}

#[cw_serde]
#[derive(Default)]
struct OldData {}

#[test]
fn doctest() {
{{code}}
Expand Down
Loading

0 comments on commit fe018e2

Please sign in to comment.