-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
65 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
processed 11 tasks | ||
|
||
task 3 'run'. lines 7-18: | ||
{ | ||
"gas_used": 97932, | ||
"status": "Executed" | ||
} | ||
|
||
task 6 'run'. lines 26-34: | ||
{ | ||
"gas_used": 11344, | ||
"status": "Executed" | ||
} | ||
|
||
task 8 'deploy'. lines 42-42: | ||
Publish failure: Discard { status_code: StrView(21), status_code_name: "INVALID_MODULE_PUBLISHER" } |
49 changes: 49 additions & 0 deletions
49
integration-tests/package_txn_manager/only_new_module.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,49 @@ | ||
//# init -n dev | ||
|
||
//# faucet --addr alice --amount 100000000000000000 | ||
|
||
//# faucet --addr bob | ||
|
||
//# run --signers alice | ||
script { | ||
use StarcoinFramework::Config; | ||
use StarcoinFramework::Version; | ||
use StarcoinFramework::PackageTxnManager; | ||
use StarcoinFramework::Option; | ||
fun main(account: signer) { | ||
Config::publish_new_config<Version::Version>(&account, Version::new_version(1)); | ||
PackageTxnManager::update_module_upgrade_strategy(&account, PackageTxnManager::get_strategy_new_module(), Option::some<u64>(2)); | ||
} | ||
} | ||
// check: EXECUTED | ||
|
||
//# package | ||
module alice::hello { | ||
public fun hello() {} | ||
} | ||
//# deploy {{$.package[0].file}} --signers alice | ||
|
||
//# run --signers alice | ||
script { | ||
use alice::hello; | ||
|
||
fun main(_account: signer) { | ||
hello::hello(); | ||
} | ||
} | ||
// check: EXECUTED | ||
|
||
//# package | ||
module alice::hello { | ||
public fun hello() {} | ||
public fun hello_bob() {} | ||
} | ||
|
||
//# deploy {{$.package[1].file}} --signers alice | ||
|
||
//# package | ||
module alice::say { | ||
public fun hello() {} | ||
} | ||
|
||
//# deploy {{$.package[2].file}} --signers alice |