tx · CTMNAAjhqwv4DB3BgGCDcxqSFPxWHAQKSbHbxeJquJou
3MovRKHzcaxx3B5Tcb5KiLNiZ5gabqh13ZT: -0.00200000 Waves
2022.09.12 23:57 [2226405] smart account 3MovRKHzcaxx3B5Tcb5KiLNiZ5gabqh13ZT > SELF 0.00000000 Waves
{
"type": 13,
"id": "CTMNAAjhqwv4DB3BgGCDcxqSFPxWHAQKSbHbxeJquJou",
"fee": 200000,
"feeAssetId": null,
"timestamp": 1663016268554,
"version": 2,
"chainId": 84,
"sender": "3MovRKHzcaxx3B5Tcb5KiLNiZ5gabqh13ZT",
"senderPublicKey": "BuMZnGzFnTR4casvcVSFibwoXdtFMySvF3Y4RhtTh3gq",
"proofs": [
"23mFsdispY9WkMXUGftM2VaEApRfJiycT32gY167ArMWrfLZTz126CMgg1ZFTZvsuiPoU5tM7vvocqg4dpyJ1bBo"
],
"script": "base64:BgIRCAISABIDCgEBEgYKBAQCAQgGABhnbG9iYWxPbmJvYXJpbmdBbW91bnRLZXkCF2dsb2JhbF9vbmJvYXJkaW5nQW1vdW50ARNvbmJvYXJkaW5nU3RhdHVzS2V5AQZudW1iZXIJAKwCAgkArAICAgtvbmJvYXJkaW5nXwkApAMBBQZudW1iZXICB19zdGF0dXMBF3VzZXJPbmJvYXJkaW5nQW1vdW50S2V5AQR1c2VyCQCsAgIFBHVzZXICEV9vbmJvYXJkaW5nQW1vdW50ARF1c2VyT25ib2FyZGluZ0tleQIEdXNlcgZudW1iZXIJAKwCAgkArAICCQCsAgIJAKwCAgILb25ib2FyZGluZ18FBHVzZXICAV8JAKQDAQUGbnVtYmVyAgVfZGF0YQENdHJ5R2V0SW50ZWdlcgEDa2V5BAckbWF0Y2gwCQCaCAIFBHRoaXMFA2tleQMJAAECBQckbWF0Y2gwAgNJbnQEAXgFByRtYXRjaDAFAXgAAAEVY2FsY3VsYXRlU3Rha2VkQW1vdW50AQR1c2VyAJWa7zoDAWkBDWFkZE9uYm9hcmRpbmcABAR1c2VyCQCl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gIFaGVsbG8CBXdvcmxkBQNuaWwAkDW4QA==",
"height": 2226405,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: GPhLQbfcy2motf11BbC2Z2eHwbRvD23Bu7HoNefLKbLQ
Next: pytV4bVnNbkQec51rSUc4HXdLWR36G1rcZaqCBm7Q1G
Diff:
Old | New | | Differences |
---|
24 | 24 | | |
---|
25 | 25 | | |
---|
26 | 26 | | @Callable(i) |
---|
27 | | - | func addOnboarding (user) = { |
---|
| 27 | + | func addOnboarding () = { |
---|
| 28 | + | let user = toString(i.caller) |
---|
28 | 29 | | let totalOnboardings = (tryGetInteger(globalOnboaringAmountKey) + 1) |
---|
29 | 30 | | let userOnboarings = (tryGetInteger(userOnboardingAmountKey(user)) + 1) |
---|
30 | 31 | | let userOnboarding = (("{\"startHeight\": 3291790, \"finishHeight\": 3307630, \"startAmount\": 25568667009, \"finishAmount\": 27199947964, \"premium\": 638, \"assetId\": \"WAVES\", \"globalNum\": " + toString(totalOnboardings)) + "}") |
---|
|
34 | 35 | | |
---|
35 | 36 | | |
---|
36 | 37 | | @Callable(i) |
---|
37 | | - | func finishOnboarding () = { |
---|
38 | | - | let totalOnboardings = tryGetInteger(globalOnboaringAmountKey) |
---|
39 | | - | [StringEntry(onboardingStatusKey(totalOnboardings), "finished")] |
---|
40 | | - | } |
---|
| 38 | + | func finishOnboarding (number) = [StringEntry(onboardingStatusKey(number), "finished")] |
---|
41 | 39 | | |
---|
42 | 40 | | |
---|
43 | 41 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 6 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let globalOnboaringAmountKey = "global_onboardingAmount" |
---|
5 | 5 | | |
---|
6 | 6 | | func onboardingStatusKey (number) = (("onboarding_" + toString(number)) + "_status") |
---|
7 | 7 | | |
---|
8 | 8 | | |
---|
9 | 9 | | func userOnboardingAmountKey (user) = (user + "_onboardingAmount") |
---|
10 | 10 | | |
---|
11 | 11 | | |
---|
12 | 12 | | func userOnboardingKey (user,number) = (((("onboarding_" + user) + "_") + toString(number)) + "_data") |
---|
13 | 13 | | |
---|
14 | 14 | | |
---|
15 | 15 | | func tryGetInteger (key) = match getInteger(this, key) { |
---|
16 | 16 | | case x: Int => |
---|
17 | 17 | | x |
---|
18 | 18 | | case _ => |
---|
19 | 19 | | 0 |
---|
20 | 20 | | } |
---|
21 | 21 | | |
---|
22 | 22 | | |
---|
23 | 23 | | func calculateStakedAmount (user) = 123456789 |
---|
24 | 24 | | |
---|
25 | 25 | | |
---|
26 | 26 | | @Callable(i) |
---|
27 | | - | func addOnboarding (user) = { |
---|
| 27 | + | func addOnboarding () = { |
---|
| 28 | + | let user = toString(i.caller) |
---|
28 | 29 | | let totalOnboardings = (tryGetInteger(globalOnboaringAmountKey) + 1) |
---|
29 | 30 | | let userOnboarings = (tryGetInteger(userOnboardingAmountKey(user)) + 1) |
---|
30 | 31 | | let userOnboarding = (("{\"startHeight\": 3291790, \"finishHeight\": 3307630, \"startAmount\": 25568667009, \"finishAmount\": 27199947964, \"premium\": 638, \"assetId\": \"WAVES\", \"globalNum\": " + toString(totalOnboardings)) + "}") |
---|
31 | 32 | | [IntegerEntry(globalOnboaringAmountKey, totalOnboardings), StringEntry(onboardingStatusKey(totalOnboardings), "started"), IntegerEntry(userOnboardingAmountKey(user), userOnboarings), StringEntry(userOnboardingKey(user, userOnboarings), userOnboarding)] |
---|
32 | 33 | | } |
---|
33 | 34 | | |
---|
34 | 35 | | |
---|
35 | 36 | | |
---|
36 | 37 | | @Callable(i) |
---|
37 | | - | func finishOnboarding () = { |
---|
38 | | - | let totalOnboardings = tryGetInteger(globalOnboaringAmountKey) |
---|
39 | | - | [StringEntry(onboardingStatusKey(totalOnboardings), "finished")] |
---|
40 | | - | } |
---|
| 38 | + | func finishOnboarding (number) = [StringEntry(onboardingStatusKey(number), "finished")] |
---|
41 | 39 | | |
---|
42 | 40 | | |
---|
43 | 41 | | |
---|
44 | 42 | | @Callable(i) |
---|
45 | 43 | | func args (bool,byteVector,int,string) = [StringEntry("hello", "world")] |
---|
46 | 44 | | |
---|
47 | 45 | | |
---|