tx · HcBgLmuhW5MKyRAcTnjCZ35oNMcnjPpVLDzHuPMzqG5M 3Mqzhyb3ayfeb2bnZzAthD1W8oKsNaw7on1: -0.01400000 Waves 2022.03.18 15:39 [1969411] smart account 3Mqzhyb3ayfeb2bnZzAthD1W8oKsNaw7on1 > SELF 0.00000000 Waves
{ "type": 13, "id": "HcBgLmuhW5MKyRAcTnjCZ35oNMcnjPpVLDzHuPMzqG5M", "fee": 1400000, "feeAssetId": null, "timestamp": 1647607276819, "version": 2, "chainId": 84, "sender": "3Mqzhyb3ayfeb2bnZzAthD1W8oKsNaw7on1", "senderPublicKey": "Ehngpik6DXwbcV8tpLbd3qBFjChSdW49YqyxinREgabT", "proofs": [ "2x5QsRBHCpWCdZ6akMd5cvTe9ASjTm9EaoibauqMButsQdhbVpGV7vTyRekwe8rk2HnmsvfwKpTniVRFMWFyJwp" ], "script": "base64:AAIEAAAAAAAAAAYIAhIAEgAAAAAHAAAAAAdEYXBwRmVlAAAAAAABfXhAAAAAAA9nZXRjdXJyZW50cm91bmQJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMCAAAADWN1cnJlbnRfcm91bmQAAAAAC3hVU0RBc3NldElEAQAAACAUvqy5I7Pn2Q+5aTq4aUxjl04TnuAMD5q9EZXpvqd6qwAAAAAMRkFJVEhBc3NldElEAQAAACAtb1sBuZ3lSm8ahGink+4TF5YYAu/xRHYwe1h195OooAAAAAARQ29sbGVjdEZlZUFkZHJlc3MJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEBAAAAIFKD2aCL15CSOzPl4EBEchtzseD8Xh+YHSzFnrJIx+IgAAAAAA5mZXRjaHRvdGFsdHhucwQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzAgAAAApUb3RhbF9UeG5zAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAAAAAACXRvdGFsd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AAMSW50ZWdlckVudHJ5AAAAAgIAAAAKVG90YWxfVHhucwUAAAAJdG90YWx0eG5zCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAICAAAAD1RvdGFsX1VzZXJUeG5zXwUAAAAKY3VycmVudEtleQUAAAANdXNlcnRvdGFsdHhucwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQABLAAAAAICAAAAEkRlcG9zaXRfQW1vdW50X09mXwUAAAAKY3VycmVudEtleQkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQABLAAAAAICAAAAEUN1cnJlbnRfUm91bmRfT2ZfBQAAAApjdXJyZW50S2V5CQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAEsAAAAAgIAAAAQQ2xhaW1fU3RhdHVzX09mXwUAAAAKY3VycmVudEtleQIAAAAEUEFJRAkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQABLAAAAAICAAAAD05vX09mX0RlcG9zaXRzXwUAAAAKY3VycmVudEtleQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAAD2ZldGNodXNlcmFtb3VudAUAAAALeFVTREFzc2V0SUQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleWvYiLU=", "height": 1969411, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8gCwpCQBqmg61LdrUka1yQKPtDXjkDvp5w1BmA9hnmre Next: AEFZGTuGGoJq4YEk4Yug5AMtvgz3TjFfM5cDUMyAWLJc Diff:
Old | New | Differences | |
---|---|---|---|
60 | 60 | func Claim () = { | |
61 | 61 | let currentKey = toBase58String(i.caller.bytes) | |
62 | 62 | let UserNoOfDeposits = getIntegerValue(this, ("No_Of_Deposits_" + currentKey)) | |
63 | - | let fetchuserround = valueOrErrorMessage(getInteger(this, ("Current_Round_Of_" + currentKey)), "Your Address not | |
63 | + | let fetchuserround = valueOrErrorMessage(getInteger(this, ("Current_Round_Of_" + currentKey)), "Your Address did not participated in any latest round Yet.") | |
64 | 64 | let fetchuseramount = getIntegerValue(this, ("Deposit_Amount_Of_" + currentKey)) | |
65 | 65 | let getstartcapital = getIntegerValue(this, (toString(fetchuserround) + "_Start_Capital")) | |
66 | 66 | let getendcapital = getIntegerValue(this, (toString(fetchuserround) + "_End_Capital")) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let DappFee = 25000000 | |
5 | 5 | ||
6 | 6 | let getcurrentround = getIntegerValue(this, "current_round") | |
7 | 7 | ||
8 | 8 | let xUSDAssetID = base58'2PyngaPGAFjV9AVFXSQANwumY6FSY1cqZDBK8NsEGCup' | |
9 | 9 | ||
10 | 10 | let FAITHAssetID = base58'44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y' | |
11 | 11 | ||
12 | 12 | let CollectFeeAddress = addressFromPublicKey(base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR') | |
13 | 13 | ||
14 | 14 | let fetchtotaltxns = match getInteger(this, "Total_Txns") { | |
15 | 15 | case a: Int => | |
16 | 16 | a | |
17 | 17 | case _ => | |
18 | 18 | 0 | |
19 | 19 | } | |
20 | 20 | ||
21 | 21 | let totaltxns = (fetchtotaltxns + 1) | |
22 | 22 | ||
23 | 23 | @Callable(i) | |
24 | 24 | func Deposit () = { | |
25 | 25 | let pmt1 = if ((size(i.payments) == 1)) | |
26 | 26 | then i.payments[0] | |
27 | 27 | else throw((("No Payments Attached Please Attach " + toBase58String(xUSDAssetID)) + " Asset Only.")) | |
28 | 28 | let maxdepositamt = 1000000000000 | |
29 | 29 | let currentKey = toBase58String(i.caller.bytes) | |
30 | 30 | let fetchtotalusertxns = match getInteger(this, ("Total_UserTxns_" + currentKey)) { | |
31 | 31 | case a: Int => | |
32 | 32 | a | |
33 | 33 | case _ => | |
34 | 34 | 0 | |
35 | 35 | } | |
36 | 36 | let usertotaltxns = (fetchtotalusertxns + 1) | |
37 | 37 | let UserNoOfDeposits = match getInteger(this, ("No_Of_Deposits_" + currentKey)) { | |
38 | 38 | case a: Int => | |
39 | 39 | a | |
40 | 40 | case _ => | |
41 | 41 | 0 | |
42 | 42 | } | |
43 | 43 | let SumpupofUserNoOfDeposits = (UserNoOfDeposits + 1) | |
44 | 44 | if ((pmt1.assetId != xUSDAssetID)) | |
45 | 45 | then throw("Incorrect asset attached, please attach only xUSD AssetID.") | |
46 | 46 | else if ((499999999 >= pmt1.amount)) | |
47 | 47 | then throw("Please attach minimum 5 xUSD to deposit to enter round.") | |
48 | 48 | else if ((pmt1.amount > maxdepositamt)) | |
49 | 49 | then throw("Please attach correct amount in between [5-10000] xUSD.") | |
50 | 50 | else if ((size(i.payments) > 1)) | |
51 | 51 | then throw("Two assets attached, Kindly Attach only payment1 = xUSD with in [5-10000] xUSD Range.") | |
52 | 52 | else if ((UserNoOfDeposits == 1)) | |
53 | 53 | then throw("You Already participated for an Round, Which has not been settled Yet. Wait until round end and re-enter again.") | |
54 | 54 | else [IntegerEntry("Total_Txns", totaltxns), IntegerEntry(("Total_UserTxns_" + currentKey), usertotaltxns), IntegerEntry(("Deposit_Amount_Of_" + currentKey), (pmt1.amount - DappFee)), IntegerEntry(("Current_Round_Of_" + currentKey), getcurrentround), StringEntry(("Claim_Status_Of_" + currentKey), "PENDING"), IntegerEntry(("No_Of_Deposits_" + currentKey), SumpupofUserNoOfDeposits), ScriptTransfer(CollectFeeAddress, DappFee, xUSDAssetID)] | |
55 | 55 | } | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | ||
59 | 59 | @Callable(i) | |
60 | 60 | func Claim () = { | |
61 | 61 | let currentKey = toBase58String(i.caller.bytes) | |
62 | 62 | let UserNoOfDeposits = getIntegerValue(this, ("No_Of_Deposits_" + currentKey)) | |
63 | - | let fetchuserround = valueOrErrorMessage(getInteger(this, ("Current_Round_Of_" + currentKey)), "Your Address not | |
63 | + | let fetchuserround = valueOrErrorMessage(getInteger(this, ("Current_Round_Of_" + currentKey)), "Your Address did not participated in any latest round Yet.") | |
64 | 64 | let fetchuseramount = getIntegerValue(this, ("Deposit_Amount_Of_" + currentKey)) | |
65 | 65 | let getstartcapital = getIntegerValue(this, (toString(fetchuserround) + "_Start_Capital")) | |
66 | 66 | let getendcapital = getIntegerValue(this, (toString(fetchuserround) + "_End_Capital")) | |
67 | 67 | let getstatus = getStringValue(this, (toString(fetchuserround) + "_status")) | |
68 | 68 | let getresults = getStringValue(this, (toString(fetchuserround) + "_mktresults")) | |
69 | 69 | let fetchtotalusertxns = match getInteger(this, ("Total_UserTxns_" + currentKey)) { | |
70 | 70 | case a: Int => | |
71 | 71 | a | |
72 | 72 | case _ => | |
73 | 73 | 0 | |
74 | 74 | } | |
75 | 75 | let usertotaltxns = (fetchtotalusertxns + 1) | |
76 | 76 | if ((0 >= fetchuserround)) | |
77 | 77 | then throw("You don't have any dues of Round to Claim.") | |
78 | 78 | else [IntegerEntry("Total_Txns", totaltxns), IntegerEntry(("Total_UserTxns_" + currentKey), usertotaltxns), DeleteEntry(("Deposit_Amount_Of_" + currentKey)), DeleteEntry(("Current_Round_Of_" + currentKey)), StringEntry(("Claim_Status_Of_" + currentKey), "PAID"), DeleteEntry(("No_Of_Deposits_" + currentKey)), ScriptTransfer(i.caller, fetchuseramount, xUSDAssetID)] | |
79 | 79 | } | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | @Verifier(tx) | |
83 | 83 | func verify () = match tx { | |
84 | 84 | case _ => | |
85 | 85 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
86 | 86 | } | |
87 | 87 |
github/deemru/w8io/026f985 24.41 ms ◑