-
Notifications
You must be signed in to change notification settings - Fork 15
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
More integration tests #103
Merged
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
aa4eaf5
Add configurable test actor
abright 23293ac
WIP configurable actor tests
abright 0424763
Add operator_data to MintParams in the basic token actor
abright 4c550fb
Don't blindly flush state after minting
abright 13bd598
test: receiver hook burns incoming tokens after mint
abright e3f5639
MintParams formatting
abright a5a4988
wip make minting aware of changed state after receiver hook returns
abright 3071ff1
wip better state reloading mechanism
abright e2557f6
more common stuff
abright 0813771
single-actor tests
abright a8cec0b
keep TestAction and ActionParams as part of test_actor
abright fc5a45a
duplicate MintParams in common to avoid linking in the token actor ev…
abright 9f530df
wip multi-actor tests
abright 21cacac
don't explode the test actor if transfer within receiver hook fails
abright 7c48437
add test to mint tokens and then transfer inside the receiver hook
abright 30c0dfb
update Transfer and TransferFrom to have the same post-hook state han…
abright e81c3ad
return Transfer call result in test actor
abright c494ff9
add transfer->hook transfer->accept/burn tests
abright ea6793c
update transfer_tokens test to use the common helpers
abright 3fbc19b
improve Token::replace and make public
abright cc49735
abort with an error instead of ignoring calls to Accept or Reject in …
abright 37df1eb
rename get_balance to token_balance to avoid confusion with native to…
abright 2acef81
separate individual frc46 tests into blocks
abright 517abcf
add call_method_ok and mint_tokens_ok helpers to assert success and r…
abright d503d76
add token balance assertion helpers to further compress test case code
abright f9286e5
add more balance asserts and check the more complex transfer results
abright 00e6c98
remove unnecessary comment
abright ad9ac07
return intermediate data through hook call and construct MintReturn a…
abright 1755a96
return intermediate data through hook call and construct TransferFrom…
abright 15afad7
return intermediate data through hook call and construct TransferRetu…
abright 6d6fdb9
move transfer and burn actions in the test actor into separate functions
abright 61355fd
bump frc46_token version to 0.2.0
abright File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
testing/fil_token_integration/actors/test_actor/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[package] | ||
name = "test_actor" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
cid = { version = "0.8.5", default-features = false } | ||
frc46_token = { version = "0.2.0", path = "../../../../frc46_token" } | ||
frc42_dispatch = { path = "../../../../frc42_dispatch" } | ||
fvm_ipld_blockstore = { version = "0.1.1" } | ||
fvm_ipld_encoding = { version = "0.2.2" } | ||
fvm_sdk = { version = "2.0.0-alpha.2" } | ||
fvm_shared = { version = "2.0.0-alpha.2" } | ||
serde = { version = "1.0", features = ["derive"] } | ||
serde_tuple = { version = "0.5.0" } | ||
|
||
[build-dependencies] | ||
wasm-builder = "3.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
fn main() { | ||
use wasm_builder::WasmBuilder; | ||
WasmBuilder::new() | ||
.with_current_project() | ||
.import_memory() | ||
.append_to_rust_flags("-Ctarget-feature=+crt-static") | ||
.append_to_rust_flags("-Cpanic=abort") | ||
.append_to_rust_flags("-Coverflow-checks=true") | ||
.append_to_rust_flags("-Clto=true") | ||
.append_to_rust_flags("-Copt-level=z") | ||
.build() | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we restrict visibility of these to the crate? I'm undecided, so ok to leave public for now.