Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Commit f40f061

Browse files
committed
Add deactivate-allocation to coin.pact
1 parent 730ae03 commit f40f061

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

pact/coin-contract/coin.pact

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,22 @@
645645
, "redeemed" : false
646646
})))
647647

648+
(defun deactivate-allocation
649+
( account:string )
650+
651+
@doc "Deactivate allocation ACCOUNT."
652+
653+
@model [ (property (valid-account account)) ]
654+
655+
(require-capability (COINBASE))
656+
657+
(validate-account account)
658+
659+
(update allocation-table account
660+
{ "redeemed" : true
661+
})
662+
)
663+
648664
(defun release-allocation
649665
( account:string )
650666

pact/coin-contract/coin.repl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
(env-gaslog)
2828
(expect
2929
"Gas cost of loading coin contract"
30-
66828
30+
66930
3131
(env-gas))
3232

3333
(create-table coin.coin-table)

pact/pact5/coin-contract/coin.repl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
(env-gaslog)
2828
(expect
2929
"Gas cost of loading coin contract"
30-
21181
30+
21520
3131
(env-gas))
3232

3333
(create-table coin.coin-table)

0 commit comments

Comments
 (0)