Skip to content

Commit

Permalink
fix: deployment plan and sample contract
Browse files Browse the repository at this point in the history
  • Loading branch information
scolear committed Oct 27, 2023
1 parent a2822d3 commit d4cb884
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion contracts/dlc-stablecoin.clar
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@

;; Initialize the contract
(begin
(try! (ft-mint? dlc-stablecoin u1000000000000 'STNHKEPYEPJ8ET55ZZ0M5A34J0R3N5FM2CMMMAZ6.sample-contract-loan-v1)) ;; 1 million DLC USDC
(try! (ft-mint? dlc-stablecoin u1000000000000 'STNHKEPYEPJ8ET55ZZ0M5A34J0R3N5FM2CMMMAZ6.sample-contract-loan-v1-3)) ;; 1 million DLC USDC
)
14 changes: 10 additions & 4 deletions deployments/custom.devnet-plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
id: 0
name: Devnet deployment
network: devnet
# stacks-node: 'http://stx-btc1.dlc.link:3999'
# bitcoin-node: 'http://devnet:[email protected]:18443'
stacks-node: 'http://localhost:20443'
bitcoin-node: 'http://devnet:devnet@localhost:18443'
plan:
Expand Down Expand Up @@ -64,7 +62,7 @@ plan:
- id: 3
transactions:
- contract-publish:
contract-name: sample-contract-loan-v1
contract-name: sample-contract-loan-v1-3
expected-sender: STNHKEPYEPJ8ET55ZZ0M5A34J0R3N5FM2CMMMAZ6
cost: 133530
path: examples/sample-contract-loan-v1.clar
Expand All @@ -78,7 +76,15 @@ plan:
expected-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM
method: register-contract
parameters:
- "'STNHKEPYEPJ8ET55ZZ0M5A34J0R3N5FM2CMMMAZ6.sample-contract-loan-v1"
- "'STNHKEPYEPJ8ET55ZZ0M5A34J0R3N5FM2CMMMAZ6.sample-contract-loan-v1-3"
cost: 6000
- contract-call:
contract-id: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.dlc-stablecoin
expected-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM
method: mint
parameters:
- 'u1000000000000'
- "'STNHKEPYEPJ8ET55ZZ0M5A34J0R3N5FM2CMMMAZ6.sample-contract-loan-v1-3"
cost: 6000
epoch: '2.3'
- id: 5
Expand Down
4 changes: 4 additions & 0 deletions examples/sample-contract-loan-v1.clar
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@
)
)

(define-read-only (get-protocol-wallet-address)
(ok (var-get protocol-wallet-address))
)

(define-data-var liquidation_ratio uint u14000)

(define-public (set-liquidation-ratio (ratio uint))
Expand Down

0 comments on commit d4cb884

Please sign in to comment.