Skip to content

Commit

Permalink
STRATEGY_FREEZE use invalid_argument (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
nkysg committed Jun 2, 2022
1 parent 0303214 commit 51828cd
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
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

0 comments on commit 51828cd

Please sign in to comment.