tx · 8bP92YyAG111dLAhgnToJPZjydh7iYjARKyp4D5U7JsK 3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1: -0.01000000 Waves 2024.01.09 12:06 [2923745] smart account 3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1 > SELF 0.00000000 Waves
{ "type": 13, "id": "8bP92YyAG111dLAhgnToJPZjydh7iYjARKyp4D5U7JsK", "fee": 1000000, "feeAssetId": null, "timestamp": 1704791184205, "version": 2, "chainId": 84, "sender": "3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1", "senderPublicKey": "7c3qLtcJ7EaPS2JDjXv8MBbd4kpyc6R27wcn5GgvZhur", "proofs": [ "yiFktKnahbL13SHdwUdAQ16VvFQLoURU3DyCMTvc7oNciswyysRSth7jcQBKFJ5pHmfKm7MDMs6UJZEHnRgFGxP" ], "script": "base64:BgIKCAISBgoECAEBARAADGNvbnRyYWN0RmlsZQIQdmVzdGluZ19uZW8ucmlkZQADU0VQAgJfXwARTUFYX1ZFU1RJTkdfQ09VTlQACgEIdGhyb3dFcnIBA21zZwkAAgEJAKwCAgkArAICBQxjb250cmFjdEZpbGUCAjogBQNtc2cACmtleUFzc2V0SWQJALkJAgkAzAgCAgIlcwkAzAgCAgdhc3NldElkBQNuaWwFA1NFUAANYXNzZXRJZFN0cmluZwkBC3ZhbHVlT3JFbHNlAgkAnQgCBQR0aGlzBQprZXlBc3NldElkAgVXQVZFUwAMYXNzZXRJZEJ5dGVzAwkAAAIFDWFzc2V0SWRTdHJpbmcCBVdBVkVTBQR1bml0CQDZBAEFDWFzc2V0SWRTdHJpbmcBFGlzVmFsaWRBZGRyZXNzU3RyaW5nAQ1hZGRyZXNzU3RyaW5nBAckbWF0Y2gwCQCmCAEFDWFkZHJlc3NTdHJpbmcDCQABAgUHJG1hdGNoMAIHQWRkcmVzcwQBYQUHJG1hdGNoMAYHAQ5rZXlVc2VyVmVzdGluZwILdXNlckFkZHJlc3MCaWQEBmNoZWNrcwkA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ucwEBaQEDZm9vBAt1c2VyQWRkcmVzcw12ZXN0aW5nQW1vdW50CnN0YXJ0QmxvY2sKbG9ja0xlbmd0aAkBFGdldE5ld1Zlc3RpbmdBY3Rpb25zBQULdXNlckFkZHJlc3MAAAUNdmVzdGluZ0Ftb3VudAUKc3RhcnRCbG9jawUKbG9ja0xlbmd0aAAeA+ni", "height": 2923745, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AkJqAGEiwucVRK15PBpN6JH2StKnrt4teCcLNTt6qVNF Next: 4K6cyaXp2pbGoWJ1rWXvfN1ipf3eoyL7zEkRGnBRrQoh Diff:
Old | New | Differences | |
---|---|---|---|
5 | 5 | ||
6 | 6 | let SEP = "__" | |
7 | 7 | ||
8 | - | let MAX_VESTING_COUNT = | |
8 | + | let MAX_VESTING_COUNT = 10 | |
9 | 9 | ||
10 | 10 | func throwErr (msg) = throw(((contractFile + ": ") + msg)) | |
11 | 11 | ||
78 | 78 | ||
79 | 79 | ||
80 | 80 | func getUserUnlockedAmount (userAddress,id) = { | |
81 | - | let $ | |
82 | - | let vestingAmount = $ | |
83 | - | let startBlock = $ | |
84 | - | let lockLength = $ | |
85 | - | let $ | |
86 | - | let unlockedAmount = $ | |
87 | - | let remainingAmount = $ | |
81 | + | let $t022312310 = parseUserVesting(userAddress, id) | |
82 | + | let vestingAmount = $t022312310._1 | |
83 | + | let startBlock = $t022312310._2 | |
84 | + | let lockLength = $t022312310._3 | |
85 | + | let $t023132410 = calcUnlockedAmount(vestingAmount, startBlock, lockLength) | |
86 | + | let unlockedAmount = $t023132410._1 | |
87 | + | let remainingAmount = $t023132410._2 | |
88 | 88 | $Tuple2(unlockedAmount, remainingAmount) | |
89 | 89 | } | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func getUserClaimActions (userAddress,id) = { | |
93 | - | let $ | |
94 | - | let vestingAmount = $ | |
95 | - | let startBlock = $ | |
96 | - | let lockLength = $ | |
97 | - | let $ | |
98 | - | let unlockedAmount = $ | |
99 | - | let remainingAmount = $ | |
93 | + | let $t025132592 = parseUserVesting(userAddress, id) | |
94 | + | let vestingAmount = $t025132592._1 | |
95 | + | let startBlock = $t025132592._2 | |
96 | + | let lockLength = $t025132592._3 | |
97 | + | let $t025952673 = getUserUnlockedAmount(userAddress, id) | |
98 | + | let unlockedAmount = $t025952673._1 | |
99 | + | let remainingAmount = $t025952673._2 | |
100 | 100 | let remainingBlocks = max([((startBlock + lockLength) - height), 0]) | |
101 | 101 | if ((unlockedAmount != 0)) | |
102 | 102 | then [ScriptTransfer(addressFromStringValue(userAddress), unlockedAmount, assetIdBytes), StringEntry(keyUserVesting(userAddress, id), formatUserVesting(remainingAmount, height, remainingBlocks))] | |
107 | 107 | func getNewVestingActions (userAddress,id,vestingAmount,startBlock,lockLength) = [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(vestingAmount, startBlock, lockLength))] | |
108 | 108 | ||
109 | 109 | ||
110 | + | func getAllUserClaimActions (userAddress) = { | |
111 | + | func actionsHelper (accum,a) = { | |
112 | + | let $t033783409 = accum | |
113 | + | let allActions = $t033783409._1 | |
114 | + | let index = $t033783409._2 | |
115 | + | $Tuple2((allActions ++ getUserClaimActions(userAddress, index)), (index + 1)) | |
116 | + | } | |
117 | + | ||
118 | + | let $t035073566 = { | |
119 | + | let $l = nil | |
120 | + | let $s = size($l) | |
121 | + | let $acc0 = $Tuple2(nil, 0) | |
122 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
123 | + | then $a | |
124 | + | else actionsHelper($a, $l[$i]) | |
125 | + | ||
126 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
127 | + | then $a | |
128 | + | else throw("List size exceeds 10") | |
129 | + | ||
130 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
131 | + | } | |
132 | + | let allActions = $t035073566._1 | |
133 | + | let _a = $t035073566._2 | |
134 | + | allActions | |
135 | + | } | |
136 | + | ||
137 | + | ||
110 | 138 | @Callable(i) | |
111 | 139 | func foo (userAddress,vestingAmount,startBlock,lockLength) = getNewVestingActions(userAddress, 0, vestingAmount, startBlock, lockLength) | |
112 | 140 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let contractFile = "vesting_neo.ride" | |
5 | 5 | ||
6 | 6 | let SEP = "__" | |
7 | 7 | ||
8 | - | let MAX_VESTING_COUNT = | |
8 | + | let MAX_VESTING_COUNT = 10 | |
9 | 9 | ||
10 | 10 | func throwErr (msg) = throw(((contractFile + ": ") + msg)) | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | let keyAssetId = makeString(["%s", "assetId"], SEP) | |
14 | 14 | ||
15 | 15 | let assetIdString = valueOrElse(getString(this, keyAssetId), "WAVES") | |
16 | 16 | ||
17 | 17 | let assetIdBytes = if ((assetIdString == "WAVES")) | |
18 | 18 | then unit | |
19 | 19 | else fromBase58String(assetIdString) | |
20 | 20 | ||
21 | 21 | func isValidAddressString (addressString) = match addressFromString(addressString) { | |
22 | 22 | case a: Address => | |
23 | 23 | true | |
24 | 24 | case _ => | |
25 | 25 | false | |
26 | 26 | } | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | func keyUserVesting (userAddress,id) = { | |
30 | 30 | let checks = [if (isValidAddressString(userAddress)) | |
31 | 31 | then true | |
32 | 32 | else throwErr(makeString(["address is not valid:", userAddress], " ")), if (if ((id >= 0)) | |
33 | 33 | then (MAX_VESTING_COUNT > id) | |
34 | 34 | else false) | |
35 | 35 | then true | |
36 | 36 | else throwErr(makeString(["id is invalid:", toString(id)], " "))] | |
37 | 37 | if ((checks == checks)) | |
38 | 38 | then makeString(["%s%d", userAddress, toString(id)], SEP) | |
39 | 39 | else throw("Strict value is not equal to itself.") | |
40 | 40 | } | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func formatUserVesting (vestingAmount,startBlock,lockLength) = { | |
44 | 44 | let checks = [if ((vestingAmount >= 0)) | |
45 | 45 | then true | |
46 | 46 | else throwErr("vesting amount cannot be negative"), if ((startBlock >= 0)) | |
47 | 47 | then true | |
48 | 48 | else throwErr("start block cannot be negative"), if ((lockLength >= 0)) | |
49 | 49 | then true | |
50 | 50 | else throwErr("lock length cannot be negative")] | |
51 | 51 | if ((checks == checks)) | |
52 | 52 | then makeString(["%d%d%d", toString(vestingAmount), toString(startBlock), toString(lockLength)], SEP) | |
53 | 53 | else throw("Strict value is not equal to itself.") | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func parseUserVesting (userAddress,id) = match getString(this, keyUserVesting(userAddress, id)) { | |
58 | 58 | case rawString: String => | |
59 | 59 | let splitString = split(rawString, SEP) | |
60 | 60 | let vestingAmount = parseIntValue(splitString[1]) | |
61 | 61 | let startBlock = parseIntValue(splitString[2]) | |
62 | 62 | let lockLength = parseIntValue(splitString[3]) | |
63 | 63 | $Tuple3(vestingAmount, startBlock, lockLength) | |
64 | 64 | case _ => | |
65 | 65 | $Tuple3(0, 0, 0) | |
66 | 66 | } | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func calcUnlockedAmount (amount,startBlock,lockLength) = { | |
70 | 70 | let elapsedBlocks = (height - startBlock) | |
71 | 71 | let unlockedAmount = if (if ((lockLength != 0)) | |
72 | 72 | then (elapsedBlocks > 0) | |
73 | 73 | else false) | |
74 | 74 | then min([fraction(amount, elapsedBlocks, lockLength), amount]) | |
75 | 75 | else 0 | |
76 | 76 | $Tuple2(unlockedAmount, (amount - unlockedAmount)) | |
77 | 77 | } | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func getUserUnlockedAmount (userAddress,id) = { | |
81 | - | let $ | |
82 | - | let vestingAmount = $ | |
83 | - | let startBlock = $ | |
84 | - | let lockLength = $ | |
85 | - | let $ | |
86 | - | let unlockedAmount = $ | |
87 | - | let remainingAmount = $ | |
81 | + | let $t022312310 = parseUserVesting(userAddress, id) | |
82 | + | let vestingAmount = $t022312310._1 | |
83 | + | let startBlock = $t022312310._2 | |
84 | + | let lockLength = $t022312310._3 | |
85 | + | let $t023132410 = calcUnlockedAmount(vestingAmount, startBlock, lockLength) | |
86 | + | let unlockedAmount = $t023132410._1 | |
87 | + | let remainingAmount = $t023132410._2 | |
88 | 88 | $Tuple2(unlockedAmount, remainingAmount) | |
89 | 89 | } | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func getUserClaimActions (userAddress,id) = { | |
93 | - | let $ | |
94 | - | let vestingAmount = $ | |
95 | - | let startBlock = $ | |
96 | - | let lockLength = $ | |
97 | - | let $ | |
98 | - | let unlockedAmount = $ | |
99 | - | let remainingAmount = $ | |
93 | + | let $t025132592 = parseUserVesting(userAddress, id) | |
94 | + | let vestingAmount = $t025132592._1 | |
95 | + | let startBlock = $t025132592._2 | |
96 | + | let lockLength = $t025132592._3 | |
97 | + | let $t025952673 = getUserUnlockedAmount(userAddress, id) | |
98 | + | let unlockedAmount = $t025952673._1 | |
99 | + | let remainingAmount = $t025952673._2 | |
100 | 100 | let remainingBlocks = max([((startBlock + lockLength) - height), 0]) | |
101 | 101 | if ((unlockedAmount != 0)) | |
102 | 102 | then [ScriptTransfer(addressFromStringValue(userAddress), unlockedAmount, assetIdBytes), StringEntry(keyUserVesting(userAddress, id), formatUserVesting(remainingAmount, height, remainingBlocks))] | |
103 | 103 | else nil | |
104 | 104 | } | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func getNewVestingActions (userAddress,id,vestingAmount,startBlock,lockLength) = [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(vestingAmount, startBlock, lockLength))] | |
108 | 108 | ||
109 | 109 | ||
110 | + | func getAllUserClaimActions (userAddress) = { | |
111 | + | func actionsHelper (accum,a) = { | |
112 | + | let $t033783409 = accum | |
113 | + | let allActions = $t033783409._1 | |
114 | + | let index = $t033783409._2 | |
115 | + | $Tuple2((allActions ++ getUserClaimActions(userAddress, index)), (index + 1)) | |
116 | + | } | |
117 | + | ||
118 | + | let $t035073566 = { | |
119 | + | let $l = nil | |
120 | + | let $s = size($l) | |
121 | + | let $acc0 = $Tuple2(nil, 0) | |
122 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
123 | + | then $a | |
124 | + | else actionsHelper($a, $l[$i]) | |
125 | + | ||
126 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
127 | + | then $a | |
128 | + | else throw("List size exceeds 10") | |
129 | + | ||
130 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
131 | + | } | |
132 | + | let allActions = $t035073566._1 | |
133 | + | let _a = $t035073566._2 | |
134 | + | allActions | |
135 | + | } | |
136 | + | ||
137 | + | ||
110 | 138 | @Callable(i) | |
111 | 139 | func foo (userAddress,vestingAmount,startBlock,lockLength) = getNewVestingActions(userAddress, 0, vestingAmount, startBlock, lockLength) | |
112 | 140 | ||
113 | 141 |
github/deemru/w8io/169f3d6 31.88 ms ◑