-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix compatibility * introduce stargate optionsg * formatting * fix lint * update comments
- Loading branch information
Showing
13 changed files
with
421 additions
and
16 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
crates/e2e-move-tests/src/tests/cosmos.data/stargate/Move.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,11 @@ | ||
[package] | ||
name = "test" | ||
version = "0.0.0" | ||
|
||
[dependencies] | ||
MoveNursery = { local = "../../../../../../precompile/modules/move_nursery" } | ||
InitiaStdlib = { local = "../../../../../../precompile/modules/initia_stdlib" } | ||
|
||
[addresses] | ||
initia_std = "0x1" | ||
std = "0x1" |
14 changes: 14 additions & 0 deletions
14
crates/e2e-move-tests/src/tests/cosmos.data/stargate/sources/test.move
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,14 @@ | ||
module 0xCAFE::test { | ||
use initia_std::string::String; | ||
use initia_std::cosmos; | ||
|
||
public entry fun stargate(sender: &signer, data: vector<u8>, allow_failure: bool, id: u64, fid: String) { | ||
let options = if (allow_failure) { | ||
cosmos::allow_failure_with_callback(id, fid) | ||
} else { | ||
cosmos::disallow_failure_with_callback(id, fid) | ||
}; | ||
|
||
cosmos::stargate_with_options(sender, data, options); | ||
} | ||
} |
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
Binary file not shown.
Binary file not shown.
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
Oops, something went wrong.