Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/add-ibc-hooks' into nullpointer0…
Browse files Browse the repository at this point in the history
…x00/1127-marker-ibs20-hooks
  • Loading branch information
nullpointer0x00 committed Sep 11, 2023
2 parents c44f3f3 + bbdc065 commit 7f9ce7d
Show file tree
Hide file tree
Showing 29 changed files with 2,671 additions and 178 deletions.
838 changes: 838 additions & 0 deletions testutil/contracts/counter/Cargo.lock

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions testutil/contracts/counter/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[package]
name = "counter"
description = "Cosmwasm counter dapp, with permissions for testing Osmosis wasmhooks"
version = "0.1.0"
authors = ["osmosis contributors"]
edition = "2021"

exclude = [
# Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication.
"contract.wasm",
"hash.txt",
]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
crate-type = ["cdylib", "rlib"]

[features]
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
# use library feature to disable all instantiate/execute/query exports
library = []

[package.metadata.scripts]
optimize = """docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
cosmwasm/rust-optimizer:0.12.6
"""

[dependencies]
cosmwasm-schema = "1.1.3"
cosmwasm-std = "1.1.3"
cosmwasm-storage = "1.1.3"
cw-storage-plus = "0.16.0"
cw2 = "0.16.0"
schemars = "0.8.10"
serde = { version = "1.0.145", default-features = false, features = ["derive"] }
thiserror = { version = "1.0.31" }

[dev-dependencies]
cw-multi-test = "0.16.0"
11 changes: 11 additions & 0 deletions testutil/contracts/counter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Counter contract from [Osmosis Labs](https://github.com/osmosis-labs/osmosis/commit/64393a14e18b2562d72a3892eec716197a3716c7)

This contract is a modification of the standard cosmwasm `counter` contract.
Namely, it tracks a counter, _by sender_.
This is a better way to test wasmhooks.

This contract tracks any funds sent to it by adding it to the state under the `sender` key.

This way we can verify that, independently of the sender, the funds will end up under the
`WasmHooksModuleAccount` address when the contract is executed via an IBC send that goes
through the wasmhooks module.
1 change: 1 addition & 0 deletions testutil/contracts/counter/artifacts/checksums.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4dc0c4ce263c019e3ec53efbcbd594cc1931abbdb705f07c0ded9b3d8e685a27 counter.wasm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a8861569ce49bcfa476ebc15f0b85d4f9b1b1734aef63026f489403832eba8a7 ./target/wasm32-unknown-unknown/release/counter.wasm
Binary file not shown.
Loading

0 comments on commit 7f9ce7d

Please sign in to comment.