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

STRATEGY_FREEZE use invalid_argument #29

Merged
merged 3 commits into from
Jun 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion build/StarcoinFramework/BuildInfo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ compiled_package_info:
? address: "0x00000000000000000000000000000001"
name: YieldFarmingV2
: StarcoinFramework
source_digest: BC0B86D823E4E24673E4F21BDAA7F7A974D00890881DEB43A67C5F3773263496
source_digest: 393B652869BD1D391A88E8A7874298F9AEEF181C4955513FE7D69C00899AD3A2
build_flags:
dev_mode: false
test_mode: false
Expand Down
Binary file modified build/StarcoinFramework/bytecode_modules/PackageTxnManager.mv
Binary file not shown.
4 changes: 2 additions & 2 deletions build/StarcoinFramework/docs/PackageTxnManager.md
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ Check againest on the given package data.
}<b>else</b> <b>if</b>(strategy == <a href="PackageTxnManager.md#0x1_PackageTxnManager_STRATEGY_NEW_MODULE">STRATEGY_NEW_MODULE</a>){
//do check at VM runtime.
}<b>else</b> <b>if</b>(strategy == <a href="PackageTxnManager.md#0x1_PackageTxnManager_STRATEGY_FREEZE">STRATEGY_FREEZE</a>){
<b>abort</b>(<a href="PackageTxnManager.md#0x1_PackageTxnManager_ESTRATEGY_FREEZED">ESTRATEGY_FREEZED</a>)
<a href="Errors.md#0x1_Errors_invalid_argument">Errors::invalid_argument</a>(<a href="PackageTxnManager.md#0x1_PackageTxnManager_ESTRATEGY_FREEZED">ESTRATEGY_FREEZED</a>);
};
}
</code></pre>
Expand Down Expand Up @@ -1271,7 +1271,7 @@ Check againest on the given package data.
//do check at VM runtime.
<b>assert</b>!(txn_sender == package_address, <a href="Errors.md#0x1_Errors_requires_address">Errors::requires_address</a>(<a href="PackageTxnManager.md#0x1_PackageTxnManager_ESENDER_AND_PACKAGE_ADDRESS_MISMATCH">ESENDER_AND_PACKAGE_ADDRESS_MISMATCH</a>));
}<b>else</b> <b>if</b>(strategy == <a href="PackageTxnManager.md#0x1_PackageTxnManager_STRATEGY_FREEZE">STRATEGY_FREEZE</a>){
<b>abort</b>(<a href="PackageTxnManager.md#0x1_PackageTxnManager_ESTRATEGY_FREEZED">ESTRATEGY_FREEZED</a>)
<a href="Errors.md#0x1_Errors_invalid_argument">Errors::invalid_argument</a>(<a href="PackageTxnManager.md#0x1_PackageTxnManager_ESTRATEGY_FREEZED">ESTRATEGY_FREEZED</a>);
};
}
</code></pre>
Expand Down
Binary file modified build/StarcoinFramework/source_maps/PackageTxnManager.mvsm
Binary file not shown.
4 changes: 2 additions & 2 deletions sources/PackageTxnManager.move
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ address StarcoinFramework {
}else if(strategy == STRATEGY_NEW_MODULE){
//do check at VM runtime.
}else if(strategy == STRATEGY_FREEZE){
abort(ESTRATEGY_FREEZED)
Errors::invalid_argument(ESTRATEGY_FREEZED);
};
}

Expand All @@ -373,7 +373,7 @@ address StarcoinFramework {
//do check at VM runtime.
assert!(txn_sender == package_address, Errors::requires_address(ESENDER_AND_PACKAGE_ADDRESS_MISMATCH));
}else if(strategy == STRATEGY_FREEZE){
abort(ESTRATEGY_FREEZED)
Errors::invalid_argument(ESTRATEGY_FREEZED);
};
}

Expand Down