Skip to content

Commit 5762524

Browse files
authored
remove generic parameter for ActiveVestingContractAbortsIf as it overrides the VestingContract type (aptos-labs#16054)
1 parent 7a54a24 commit 5762524

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

aptos-move/framework/aptos-framework/doc/vesting.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3807,7 +3807,7 @@ This address should be deterministic for the same admin and vesting contract cre
38073807

38083808
<pre><code><b>schema</b> <a href="vesting.md#0x1_vesting_TotalAccumulatedRewardsAbortsIf">TotalAccumulatedRewardsAbortsIf</a> {
38093809
vesting_contract_address: <b>address</b>;
3810-
<b>include</b> <a href="vesting.md#0x1_vesting_ActiveVestingContractAbortsIf">ActiveVestingContractAbortsIf</a>&lt;<a href="vesting.md#0x1_vesting_VestingContract">VestingContract</a>&gt;{contract_address: vesting_contract_address};
3810+
<b>include</b> <a href="vesting.md#0x1_vesting_ActiveVestingContractAbortsIf">ActiveVestingContractAbortsIf</a>{contract_address: vesting_contract_address};
38113811
<b>let</b> vesting_contract = <b>global</b>&lt;<a href="vesting.md#0x1_vesting_VestingContract">VestingContract</a>&gt;(vesting_contract_address);
38123812
<b>let</b> staker = vesting_contract_address;
38133813
<b>let</b> operator = vesting_contract.staking.operator;
@@ -3881,7 +3881,7 @@ This address should be deterministic for the same admin and vesting contract cre
38813881

38823882

38833883

3884-
<pre><code><b>include</b> <a href="vesting.md#0x1_vesting_ActiveVestingContractAbortsIf">ActiveVestingContractAbortsIf</a>&lt;<a href="vesting.md#0x1_vesting_VestingContract">VestingContract</a>&gt;{contract_address: vesting_contract_address};
3884+
<pre><code><b>include</b> <a href="vesting.md#0x1_vesting_ActiveVestingContractAbortsIf">ActiveVestingContractAbortsIf</a>{contract_address: vesting_contract_address};
38853885
</code></pre>
38863886

38873887

@@ -3908,7 +3908,7 @@ This address should be deterministic for the same admin and vesting contract cre
39083908

39093909

39103910
<pre><code><b>pragma</b> opaque;
3911-
<b>include</b> <a href="vesting.md#0x1_vesting_ActiveVestingContractAbortsIf">ActiveVestingContractAbortsIf</a>&lt;<a href="vesting.md#0x1_vesting_VestingContract">VestingContract</a>&gt;{contract_address: vesting_contract_address};
3911+
<b>include</b> <a href="vesting.md#0x1_vesting_ActiveVestingContractAbortsIf">ActiveVestingContractAbortsIf</a>{contract_address: vesting_contract_address};
39123912
<b>ensures</b> [abstract] result == <a href="vesting.md#0x1_vesting_spec_shareholder">spec_shareholder</a>(vesting_contract_address, shareholder_or_beneficiary);
39133913
</code></pre>
39143914

@@ -4062,7 +4062,7 @@ This address should be deterministic for the same admin and vesting contract cre
40624062

40634063

40644064
<pre><code><b>pragma</b> verify = <b>false</b>;
4065-
<b>include</b> <a href="vesting.md#0x1_vesting_ActiveVestingContractAbortsIf">ActiveVestingContractAbortsIf</a>&lt;<a href="vesting.md#0x1_vesting_VestingContract">VestingContract</a>&gt;;
4065+
<b>include</b> <a href="vesting.md#0x1_vesting_ActiveVestingContractAbortsIf">ActiveVestingContractAbortsIf</a>;
40664066
<b>let</b> vesting_contract = <b>global</b>&lt;<a href="vesting.md#0x1_vesting_VestingContract">VestingContract</a>&gt;(contract_address);
40674067
<b>include</b> <a href="vesting.md#0x1_vesting_WithdrawStakeAbortsIf">WithdrawStakeAbortsIf</a> { vesting_contract };
40684068
</code></pre>
@@ -4098,7 +4098,7 @@ This address should be deterministic for the same admin and vesting contract cre
40984098

40994099

41004100
<pre><code><b>pragma</b> verify = <b>false</b>;
4101-
<b>include</b> <a href="vesting.md#0x1_vesting_ActiveVestingContractAbortsIf">ActiveVestingContractAbortsIf</a>&lt;<a href="vesting.md#0x1_vesting_VestingContract">VestingContract</a>&gt;;
4101+
<b>include</b> <a href="vesting.md#0x1_vesting_ActiveVestingContractAbortsIf">ActiveVestingContractAbortsIf</a>;
41024102
<b>let</b> vesting_contract = <b>global</b>&lt;<a href="vesting.md#0x1_vesting_VestingContract">VestingContract</a>&gt;(contract_address);
41034103
<b>include</b> <a href="vesting.md#0x1_vesting_WithdrawStakeAbortsIf">WithdrawStakeAbortsIf</a> { vesting_contract };
41044104
</code></pre>
@@ -4475,7 +4475,7 @@ This address should be deterministic for the same admin and vesting contract cre
44754475

44764476

44774477

4478-
<pre><code><b>include</b> <a href="vesting.md#0x1_vesting_ActiveVestingContractAbortsIf">ActiveVestingContractAbortsIf</a>&lt;<a href="vesting.md#0x1_vesting_VestingContract">VestingContract</a>&gt;;
4478+
<pre><code><b>include</b> <a href="vesting.md#0x1_vesting_ActiveVestingContractAbortsIf">ActiveVestingContractAbortsIf</a>;
44794479
</code></pre>
44804480

44814481

@@ -4635,7 +4635,7 @@ This address should be deterministic for the same admin and vesting contract cre
46354635
<a id="0x1_vesting_ActiveVestingContractAbortsIf"></a>
46364636

46374637

4638-
<pre><code><b>schema</b> <a href="vesting.md#0x1_vesting_ActiveVestingContractAbortsIf">ActiveVestingContractAbortsIf</a>&lt;<a href="vesting.md#0x1_vesting_VestingContract">VestingContract</a>&gt; {
4638+
<pre><code><b>schema</b> <a href="vesting.md#0x1_vesting_ActiveVestingContractAbortsIf">ActiveVestingContractAbortsIf</a> {
46394639
contract_address: <b>address</b>;
46404640
// This enforces <a id="high-level-spec-5" href="#high-level-req">high-level requirement 5</a>:
46414641
<b>aborts_if</b> !<b>exists</b>&lt;<a href="vesting.md#0x1_vesting_VestingContract">VestingContract</a>&gt;(contract_address);

aptos-move/framework/aptos-framework/sources/vesting.spec.move

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ spec aptos_framework::vesting {
171171
vesting_contract_address: address;
172172

173173

174-
include ActiveVestingContractAbortsIf<VestingContract>{contract_address: vesting_contract_address};
174+
include ActiveVestingContractAbortsIf{contract_address: vesting_contract_address};
175175
let vesting_contract = global<VestingContract>(vesting_contract_address);
176176

177177
let staker = vesting_contract_address;
@@ -228,14 +228,14 @@ spec aptos_framework::vesting {
228228
}
229229

230230
spec shareholders(vesting_contract_address: address): vector<address> {
231-
include ActiveVestingContractAbortsIf<VestingContract>{contract_address: vesting_contract_address};
231+
include ActiveVestingContractAbortsIf{contract_address: vesting_contract_address};
232232
}
233233

234234
spec fun spec_shareholder(vesting_contract_address: address, shareholder_or_beneficiary: address): address;
235235

236236
spec shareholder(vesting_contract_address: address, shareholder_or_beneficiary: address): address {
237237
pragma opaque;
238-
include ActiveVestingContractAbortsIf<VestingContract>{contract_address: vesting_contract_address};
238+
include ActiveVestingContractAbortsIf{contract_address: vesting_contract_address};
239239
ensures [abstract] result == spec_shareholder(vesting_contract_address, shareholder_or_beneficiary);
240240
}
241241

@@ -314,7 +314,7 @@ spec aptos_framework::vesting {
314314
spec distribute(contract_address: address) {
315315
// TODO: Can't handle abort in loop.
316316
pragma verify = false;
317-
include ActiveVestingContractAbortsIf<VestingContract>;
317+
include ActiveVestingContractAbortsIf;
318318

319319
let vesting_contract = global<VestingContract>(contract_address);
320320
include WithdrawStakeAbortsIf { vesting_contract };
@@ -329,7 +329,7 @@ spec aptos_framework::vesting {
329329
spec terminate_vesting_contract(admin: &signer, contract_address: address) {
330330
// TODO: Calls `staking_contract::distribute` which is not verified.
331331
pragma verify = false;
332-
include ActiveVestingContractAbortsIf<VestingContract>;
332+
include ActiveVestingContractAbortsIf;
333333

334334
let vesting_contract = global<VestingContract>(contract_address);
335335
include WithdrawStakeAbortsIf { vesting_contract };
@@ -552,7 +552,7 @@ spec aptos_framework::vesting {
552552
}
553553

554554
spec assert_active_vesting_contract(contract_address: address) {
555-
include ActiveVestingContractAbortsIf<VestingContract>;
555+
include ActiveVestingContractAbortsIf;
556556
}
557557

558558
spec unlock_stake(vesting_contract: &VestingContract, amount: u64) {
@@ -649,7 +649,7 @@ spec aptos_framework::vesting {
649649
aborts_if signer::address_of(admin) != vesting_contract.admin;
650650
}
651651

652-
spec schema ActiveVestingContractAbortsIf<VestingContract> {
652+
spec schema ActiveVestingContractAbortsIf {
653653
contract_address: address;
654654
/// [high-level-spec-5]
655655
aborts_if !exists<VestingContract>(contract_address);

0 commit comments

Comments
 (0)