Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: unit test external call + msg::sender mocks #14

Merged
merged 44 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
d6c909b
add motsu multiple contract deployment
qalisander Dec 19, 2024
feb635a
bump stylus sdk to 0.7.0-rc.1
qalisander Dec 23, 2024
270e2be
add docs
qalisander Dec 24, 2024
09e7a1a
++
qalisander Dec 24, 2024
f29671f
++
qalisander Dec 24, 2024
4f06a58
++
qalisander Dec 24, 2024
1799ae3
use thread id
qalisander Dec 24, 2024
32d59b5
++
qalisander Dec 24, 2024
6947aa6
test three_proxies works
qalisander Dec 24, 2024
7d6ddd2
++
qalisander Dec 24, 2024
08c6530
++
qalisander Dec 24, 2024
233e970
++
qalisander Dec 24, 2024
fbaeafe
++
qalisander Dec 25, 2024
fa44a57
++
qalisander Dec 25, 2024
cb5d91d
++
qalisander Dec 25, 2024
dedb194
++
qalisander Dec 25, 2024
1888d3c
use context as a key for storage
qalisander Dec 31, 2024
a4ea0ea
impl Drop for Contract
qalisander Dec 31, 2024
7bf0dd3
sender accept generic account
qalisander Dec 31, 2024
366a6f5
init accept generic account
qalisander Dec 31, 2024
7be9b86
++
qalisander Dec 31, 2024
1ffba32
update stylus sdk
qalisander Jan 7, 2025
e6b5196
fmt
qalisander Jan 15, 2025
2fe7239
Merge remote-tracking branch 'origin/main' into unit-tests/multiple-c…
qalisander Jan 15, 2025
f1cd300
++
qalisander Jan 15, 2025
8ae0ebd
make storage_flush_cache available for linking
qalisander Jan 15, 2025
50c3971
init function is capable of returning value
qalisander Jan 16, 2025
41e9882
call random function for test arguments
qalisander Jan 16, 2025
a9c402f
update example with account injection
qalisander Jan 16, 2025
01985a0
rename new(address) -> new_at(address) and add new() method
qalisander Jan 21, 2025
efa1be4
Merge branch 'main' into unit-tests/multiple-contract-deployment
bidzyyys Jan 21, 2025
6c52351
update three_proxies test
qalisander Jan 22, 2025
8ec42e6
inject contracts through arguments
qalisander Jan 22, 2025
66c962e
remove get prefix
qalisander Jan 23, 2025
bc9cf09
update docs
qalisander Jan 23, 2025
28f1d22
++
qalisander Jan 23, 2025
2766a43
++
qalisander Jan 23, 2025
8f662c8
rename `contract` field to `storage`
qalisander Jan 31, 2025
ada172f
update changelog
qalisander Feb 1, 2025
d3e60a5
prevent Contract<..> drop restricting ContractCall<..> with reference
qalisander Feb 1, 2025
74e16fa
add static call + test
qalisander Feb 1, 2025
f1a5e78
add error call test
qalisander Feb 1, 2025
efc7e73
elide lifetimes
qalisander Feb 1, 2025
7b330c3
fix fmt
qalisander Feb 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- Mocks for the `msg::sender()` #14
- Mocks for the external contract calls.
Two and more contracts can be injected into test #14
- Option to inject `Account` or `Address` in the test #14

### Changed (Breaking)

- `Contract<..>` wrapper is mandatory for the contract's argument #14
- To call contract's function it is mandatory to explicitly indicate the sender,
through `Contract::<..>::sender(..)` function #14
- `Contract<T>`'s `T` type should implement `TopLevelStorage` #14

## [0.3.0] - 2025-01-07

### Changed (Breaking)
Expand Down
Loading