File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed
contrib/core-contract-tests/tests
stackslib/src/chainstate/stacks/boot Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -4610,6 +4610,11 @@ export const contracts = {
4610
4610
} ,
4611
4611
maps : { } ,
4612
4612
variables : {
4613
+ DEPLOY_BLOCK_HEIGHT : {
4614
+ name : "DEPLOY_BLOCK_HEIGHT" ,
4615
+ type : "uint128" ,
4616
+ access : "constant" ,
4617
+ } as TypedAbiVariable < bigint > ,
4613
4618
ERR_NOTHING_TO_CLAIM : {
4614
4619
name : "ERR_NOTHING_TO_CLAIM" ,
4615
4620
type : "uint128" ,
@@ -4650,18 +4655,14 @@ export const contracts = {
4650
4655
type : "uint128" ,
4651
4656
access : "constant" ,
4652
4657
} as TypedAbiVariable < bigint > ,
4653
- deployBlockHeight : {
4654
- name : "deploy-block-height" ,
4655
- type : "uint128" ,
4656
- access : "constant" ,
4657
- } as TypedAbiVariable < bigint > ,
4658
4658
recipient : {
4659
4659
name : "recipient" ,
4660
4660
type : "principal" ,
4661
4661
access : "variable" ,
4662
4662
} as TypedAbiVariable < string > ,
4663
4663
} ,
4664
4664
constants : {
4665
+ DEPLOY_BLOCK_HEIGHT : 3n ,
4665
4666
ERR_NOTHING_TO_CLAIM : 102n ,
4666
4667
ERR_NOT_ALLOWED : 101n ,
4667
4668
INITIAL_MINT_AMOUNT : 200_000_000_000_000n ,
@@ -4670,7 +4671,6 @@ export const contracts = {
4670
4671
INITIAL_MINT_VESTING_ITERATIONS : 24n ,
4671
4672
INITIAL_MINT_VESTING_ITERATION_BLOCKS : 4_383n ,
4672
4673
STX_PER_ITERATION : 4_166_666_666_666n ,
4673
- deployBlockHeight : 3n ,
4674
4674
recipient : "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM" ,
4675
4675
} ,
4676
4676
non_fungible_tokens : [ ] ,
Original file line number Diff line number Diff line change 19
19
;; The amount of STX that is vested per iteration
20
20
(define-constant STX_PER_ITERATION (/ INITIAL_MINT_VESTING_AMOUNT INITIAL_MINT_VESTING_ITERATIONS))
21
21
22
- (define-data-var recipient principal tx-sender )
23
-
24
22
;; The block height at which vesting starts. On Mainnet, this is
25
23
;; burn height 907740, which is what is specified in SIP-031.
26
- (define-constant deploy-block-height (if is-in-mainnet u907740 burn-block-height ))
24
+ (define-constant DEPLOY_BLOCK_HEIGHT (if is-in-mainnet u907740 burn-block-height ))
25
+
26
+ (define-data-var recipient principal tx-sender )
27
27
28
28
(define-read-only (get-recipient ) (var-get recipient ))
29
29
30
- (define-read-only (get-deploy-block-height ) deploy-block-height )
30
+ (define-read-only (get-deploy-block-height ) DEPLOY_BLOCK_HEIGHT )
31
31
32
32
;; Update the recipient of the funds.
33
33
;;
64
64
(define-private (calc-total-vested (burn-height uint ))
65
65
(let
66
66
(
67
- (diff (- burn-height deploy-block-height ))
67
+ (diff (- burn-height DEPLOY_BLOCK_HEIGHT ))
68
68
;; Note: this rounds down
69
69
(iterations (/ diff INITIAL_MINT_VESTING_ITERATION_BLOCKS))
70
70
(vested-multiple (* STX_PER_ITERATION iterations))
83
83
84
84
;; Returns the amount of STX that is claimable from the vested balance at `burn-height`
85
85
(define-read-only (calc-claimable-amount (burn-height uint ))
86
- (if (< burn-height deploy-block-height )
86
+ (if (< burn-height DEPLOY_BLOCK_HEIGHT )
87
87
u0
88
88
(let
89
89
(
You can’t perform that action at this time.
0 commit comments