Skip to content

Commit a152e09

Browse files
authored
Create BurnOnePercentOrMore.ride
1 parent fab5008 commit a152e09

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{-# STDLIB_VERSION 3 #-}
2+
{-# CONTENT_TYPE EXPRESSION #-}
3+
{-# SCRIPT_TYPE ASSET #-}
4+
let minimalAmountToBurn = this.quantity / 100
5+
match (tx) {
6+
# we allow to burn only 1 percent or more
7+
case burn: BurnTransaction => {
8+
if (burn.quantity < minimalAmountToBurn) then {
9+
throw("You can burn only 1 percent (or more) of current total supply")
10+
}else{
11+
true
12+
}
13+
}
14+
15+
case _ => true
16+
}

0 commit comments

Comments
 (0)