tx · 4K6cyaXp2pbGoWJ1rWXvfN1ipf3eoyL7zEkRGnBRrQoh

3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1:  -0.01000000 Waves

2024.01.09 12:09 [2923748] smart account 3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1 > SELF 0.00000000 Waves

{ "type": 13, "id": "4K6cyaXp2pbGoWJ1rWXvfN1ipf3eoyL7zEkRGnBRrQoh", "fee": 1000000, "feeAssetId": null, "timestamp": 1704791359673, "version": 2, "chainId": 84, "sender": "3MwyBKGZcdChEK9Z55HwLn3A2EgwEJJpqC1", "senderPublicKey": "7c3qLtcJ7EaPS2JDjXv8MBbd4kpyc6R27wcn5GgvZhur", "proofs": [ "3sYMUUeXDu2mU3ANWSVaQ68GEUjcMCmT1VdmFnNDaQezDQvWAWA99WoRyZyt8kNfYkPiF23iLjtaTuJPvdTNp8Yd" ], "script": "base64:BgIKCAISBgoECAEBAREADGNvbnRyYWN0RmlsZQIQdmVzdGluZ19uZW8ucmlkZQADU0VQAgJfXwARTUFYX1ZFU1RJTkdfQ09VTlQACgAITElTVF8xMDAJAMwIAgAACQDMCAIAAQkAzAgCAAIJAMwIAgADCQDMCAIABAkAzAgCAAUJAMwIAgAGCQDMCAIABwkAzAgCAAgJAMwIAgAJCQDMCAIACgkAzAgCAAsJAMwIAgAMCQDMCAIADQkAzAgCAA4JAMwIAgAPCQDMCAIAEAkAzAgCABEJAMwIAgASCQDMCAIAEwkAzAgCABQJAMwIAgAVCQDMCAIAFgkAzAgCABcJAMwIAgAYCQDMCAIAGQkAzAgCABoJAMwIAgAbCQDMCAIAHAkAzAgCAB0JAMwIAgAeCQDMCAIAHwkAzAgCACAJAMwIAgAhCQDMCAIAIgkAzAgCACMJAMwIAgAkCQDMCAIAJQkAzAgCACYJAMwIAgAnCQDMCAIAKAkAzAgCACkJAMwIAgAqCQDMCAIAKwkAzAgCACwJAMwIAgAtCQDMCAIALgkAzAgCAC8JAMwIAgAwCQDMCAIAM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AkBFGdldE5ld1Zlc3RpbmdBY3Rpb25zBQULdXNlckFkZHJlc3MAAAUNdmVzdGluZ0Ftb3VudAUKc3RhcnRCbG9jawUKbG9ja0xlbmd0aAAQs08P", "height": 2923748, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8bP92YyAG111dLAhgnToJPZjydh7iYjARKyp4D5U7JsK Next: H1S91i6DrSTg1opnxKJT3tBpJC2EpvkpbSYsXKWjcV3j Diff:
OldNewDifferences
66 let SEP = "__"
77
88 let MAX_VESTING_COUNT = 10
9+
10+let LIST_100 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]
911
1012 func throwErr (msg) = throw(((contractFile + ": ") + msg))
1113
7880
7981
8082 func getUserUnlockedAmount (userAddress,id) = {
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
83+ let $t026782757 = parseUserVesting(userAddress, id)
84+ let vestingAmount = $t026782757._1
85+ let startBlock = $t026782757._2
86+ let lockLength = $t026782757._3
87+ let $t027602857 = calcUnlockedAmount(vestingAmount, startBlock, lockLength)
88+ let unlockedAmount = $t027602857._1
89+ let remainingAmount = $t027602857._2
8890 $Tuple2(unlockedAmount, remainingAmount)
8991 }
9092
9193
9294 func getUserClaimActions (userAddress,id) = {
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
95+ let $t029603039 = parseUserVesting(userAddress, id)
96+ let vestingAmount = $t029603039._1
97+ let startBlock = $t029603039._2
98+ let lockLength = $t029603039._3
99+ let $t030423120 = getUserUnlockedAmount(userAddress, id)
100+ let unlockedAmount = $t030423120._1
101+ let remainingAmount = $t030423120._2
100102 let remainingBlocks = max([((startBlock + lockLength) - height), 0])
101103 if ((unlockedAmount != 0))
102104 then [ScriptTransfer(addressFromStringValue(userAddress), unlockedAmount, assetIdBytes), StringEntry(keyUserVesting(userAddress, id), formatUserVesting(remainingAmount, height, remainingBlocks))]
109111
110112 func getAllUserClaimActions (userAddress) = {
111113 func actionsHelper (accum,a) = {
112- let $t033783409 = accum
113- let allActions = $t033783409._1
114- let index = $t033783409._2
114+ let $t038253856 = accum
115+ let allActions = $t038253856._1
116+ let index = $t038253856._2
115117 $Tuple2((allActions ++ getUserClaimActions(userAddress, index)), (index + 1))
116118 }
117119
118- let $t035073566 = {
119- let $l = nil
120+ let $t039544019 = {
121+ let $l = LIST_100
120122 let $s = size($l)
121123 let $acc0 = $Tuple2(nil, 0)
122124 func $f0_1 ($a,$i) = if (($i >= $s))
129131
130132 $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)
131133 }
132- let allActions = $t035073566._1
133- let _a = $t035073566._2
134+ let allActions = $t039544019._1
135+ let _a = $t039544019._2
134136 allActions
135137 }
136138
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let contractFile = "vesting_neo.ride"
55
66 let SEP = "__"
77
88 let MAX_VESTING_COUNT = 10
9+
10+let LIST_100 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]
911
1012 func throwErr (msg) = throw(((contractFile + ": ") + msg))
1113
1214
1315 let keyAssetId = makeString(["%s", "assetId"], SEP)
1416
1517 let assetIdString = valueOrElse(getString(this, keyAssetId), "WAVES")
1618
1719 let assetIdBytes = if ((assetIdString == "WAVES"))
1820 then unit
1921 else fromBase58String(assetIdString)
2022
2123 func isValidAddressString (addressString) = match addressFromString(addressString) {
2224 case a: Address =>
2325 true
2426 case _ =>
2527 false
2628 }
2729
2830
2931 func keyUserVesting (userAddress,id) = {
3032 let checks = [if (isValidAddressString(userAddress))
3133 then true
3234 else throwErr(makeString(["address is not valid:", userAddress], " ")), if (if ((id >= 0))
3335 then (MAX_VESTING_COUNT > id)
3436 else false)
3537 then true
3638 else throwErr(makeString(["id is invalid:", toString(id)], " "))]
3739 if ((checks == checks))
3840 then makeString(["%s%d", userAddress, toString(id)], SEP)
3941 else throw("Strict value is not equal to itself.")
4042 }
4143
4244
4345 func formatUserVesting (vestingAmount,startBlock,lockLength) = {
4446 let checks = [if ((vestingAmount >= 0))
4547 then true
4648 else throwErr("vesting amount cannot be negative"), if ((startBlock >= 0))
4749 then true
4850 else throwErr("start block cannot be negative"), if ((lockLength >= 0))
4951 then true
5052 else throwErr("lock length cannot be negative")]
5153 if ((checks == checks))
5254 then makeString(["%d%d%d", toString(vestingAmount), toString(startBlock), toString(lockLength)], SEP)
5355 else throw("Strict value is not equal to itself.")
5456 }
5557
5658
5759 func parseUserVesting (userAddress,id) = match getString(this, keyUserVesting(userAddress, id)) {
5860 case rawString: String =>
5961 let splitString = split(rawString, SEP)
6062 let vestingAmount = parseIntValue(splitString[1])
6163 let startBlock = parseIntValue(splitString[2])
6264 let lockLength = parseIntValue(splitString[3])
6365 $Tuple3(vestingAmount, startBlock, lockLength)
6466 case _ =>
6567 $Tuple3(0, 0, 0)
6668 }
6769
6870
6971 func calcUnlockedAmount (amount,startBlock,lockLength) = {
7072 let elapsedBlocks = (height - startBlock)
7173 let unlockedAmount = if (if ((lockLength != 0))
7274 then (elapsedBlocks > 0)
7375 else false)
7476 then min([fraction(amount, elapsedBlocks, lockLength), amount])
7577 else 0
7678 $Tuple2(unlockedAmount, (amount - unlockedAmount))
7779 }
7880
7981
8082 func getUserUnlockedAmount (userAddress,id) = {
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
83+ let $t026782757 = parseUserVesting(userAddress, id)
84+ let vestingAmount = $t026782757._1
85+ let startBlock = $t026782757._2
86+ let lockLength = $t026782757._3
87+ let $t027602857 = calcUnlockedAmount(vestingAmount, startBlock, lockLength)
88+ let unlockedAmount = $t027602857._1
89+ let remainingAmount = $t027602857._2
8890 $Tuple2(unlockedAmount, remainingAmount)
8991 }
9092
9193
9294 func getUserClaimActions (userAddress,id) = {
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
95+ let $t029603039 = parseUserVesting(userAddress, id)
96+ let vestingAmount = $t029603039._1
97+ let startBlock = $t029603039._2
98+ let lockLength = $t029603039._3
99+ let $t030423120 = getUserUnlockedAmount(userAddress, id)
100+ let unlockedAmount = $t030423120._1
101+ let remainingAmount = $t030423120._2
100102 let remainingBlocks = max([((startBlock + lockLength) - height), 0])
101103 if ((unlockedAmount != 0))
102104 then [ScriptTransfer(addressFromStringValue(userAddress), unlockedAmount, assetIdBytes), StringEntry(keyUserVesting(userAddress, id), formatUserVesting(remainingAmount, height, remainingBlocks))]
103105 else nil
104106 }
105107
106108
107109 func getNewVestingActions (userAddress,id,vestingAmount,startBlock,lockLength) = [StringEntry(keyUserVesting(userAddress, id), formatUserVesting(vestingAmount, startBlock, lockLength))]
108110
109111
110112 func getAllUserClaimActions (userAddress) = {
111113 func actionsHelper (accum,a) = {
112- let $t033783409 = accum
113- let allActions = $t033783409._1
114- let index = $t033783409._2
114+ let $t038253856 = accum
115+ let allActions = $t038253856._1
116+ let index = $t038253856._2
115117 $Tuple2((allActions ++ getUserClaimActions(userAddress, index)), (index + 1))
116118 }
117119
118- let $t035073566 = {
119- let $l = nil
120+ let $t039544019 = {
121+ let $l = LIST_100
120122 let $s = size($l)
121123 let $acc0 = $Tuple2(nil, 0)
122124 func $f0_1 ($a,$i) = if (($i >= $s))
123125 then $a
124126 else actionsHelper($a, $l[$i])
125127
126128 func $f0_2 ($a,$i) = if (($i >= $s))
127129 then $a
128130 else throw("List size exceeds 10")
129131
130132 $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)
131133 }
132- let allActions = $t035073566._1
133- let _a = $t035073566._2
134+ let allActions = $t039544019._1
135+ let _a = $t039544019._2
134136 allActions
135137 }
136138
137139
138140 @Callable(i)
139141 func foo (userAddress,vestingAmount,startBlock,lockLength) = getNewVestingActions(userAddress, 0, vestingAmount, startBlock, lockLength)
140142
141143

github/deemru/w8io/169f3d6 
42.02 ms