tx · FVpz14Ng6RHz1uoaoe8xomDYGgCPUSANaoWrnijKiv7L 3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo: -0.01400000 Waves 2021.10.14 08:40 [1745531] smart account 3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo > SELF 0.00000000 Waves
{ "type": 13, "id": "FVpz14Ng6RHz1uoaoe8xomDYGgCPUSANaoWrnijKiv7L", "fee": 1400000, "feeAssetId": null, "timestamp": 1634190147996, "version": 2, "chainId": 84, "sender": "3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo", "senderPublicKey": "AmXrJ1inc5jpKhf6D9aDcRU8QWHZXBJdBBvz9VsKDe9x", "proofs": [ "2A5iu3xFHJAciazAZQjTLuXnQASnaYno2k7MbR471LzPU1sqPA5jFq3i94aynDw2uxZoAAqC7XdpzvoXTbr9AyjU" ], "script": "base64:AAIEAAAAAAAAAAcIAhIDCgEBAAAACgAAAAALQ09ERUFzc2V0SUQBAAAAINAEYRpFnLQZXHk7APbo5tWij1YQ2cG3R/UN12TTTH73AAAAAAtTdGFydEhlaWdodAAAAAAAABqh+AAAAAAGb25lZGF5AAAAAAAAAAWgAAAAAA9taW5pbXVtbG9ja2RheXMAAAAAAAAAAAYAAAAAD21heGltdW1sb2NrZGF5cwAAAAAAAAAABwAAAAAJYmxvY2tkaWZmCQAAZQAAAAIFAAAABmhlaWdodAUAAAALU3RhcnRIZWlnaHQAAAAAC0luZmxhdGlvbk5vCQAAZAAAAAIJAABrAAAAAwAAAAACVAvkAAAAAAAAAAAAAQUAAAAJYmxvY2tkaWZmAAAAAAAAABdwAAAAAAtTdGFraW5nRGFwcAEAAAAgo7WknlFYQG5NE/mpBZyxqA4fl+GkedKP+NopRLlOBBYAAAAACkZlZUFkZHJlc3MBAAAAIFKD2aCL15CSOzPl4EBEchtzseD8Xh+YHSzFnrJIx+IgAAAAAApkZXZBZGRyZXNzAQAAACBxPzntQa7CXqUpHrNREofekMqtlOVQyxdZBdjFyNZ4G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1BbW91bnQFAAAAC0NPREVBc3NldElEBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tledB1lys=", "height": 1745531, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Gw99fbTjAWAi6XRChedWTpgfC1epdEuwSHc1MDjgxn7k Next: D4z7dwdLVriabLQwytQUEGdzXRvjQNGdoPSA5Feb4ka Diff:
Old | New | Differences | |
---|---|---|---|
47 | 47 | else if ((minimumlockdays >= days)) | |
48 | 48 | then throw(((("Choose Locking days in between " + toString((minimumlockdays + 1))) + " to ") + toString(maximumlockdays))) | |
49 | 49 | else if ((days > maximumlockdays)) | |
50 | - | then throw(((("You Entered days | |
50 | + | then throw(((((("You Entered days to " + toString(days)) + ", Please Enter no. of days in between ") + toString((minimumlockdays + 1))) + " to ") + toString(maximumlockdays))) | |
51 | 51 | else if ((100000 > pmt.amount)) | |
52 | 52 | then throw("Please Attach minimum 0.001 CODE To Issue CODE Asset.") | |
53 | 53 | else if ((pmt.amount > allowdedpymt)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let CODEAssetID = base58'F11g74azdw3SZN83raygbu9useimfTwSQ7HmTLggAq26' | |
5 | 5 | ||
6 | 6 | let StartHeight = 1745400 | |
7 | 7 | ||
8 | 8 | let oneday = 1440 | |
9 | 9 | ||
10 | 10 | let minimumlockdays = 6 | |
11 | 11 | ||
12 | 12 | let maximumlockdays = 7 | |
13 | 13 | ||
14 | 14 | let blockdiff = (height - StartHeight) | |
15 | 15 | ||
16 | 16 | let InflationNo = (fraction(10000000000, 1, blockdiff) + 6000) | |
17 | 17 | ||
18 | 18 | let StakingDapp = base58'C246qxhuyo9DBk1pjMzEQSVAWmiqYupG2swGkxTeAvLV' | |
19 | 19 | ||
20 | 20 | let FeeAddress = base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR' | |
21 | 21 | ||
22 | 22 | let devAddress = base58'8d4zGuTjT3h67Z4DatzMXdXXW1GvoQhMTjwCGFxJuene' | |
23 | 23 | ||
24 | 24 | @Callable(i) | |
25 | 25 | func Deposit (days) = { | |
26 | 26 | let pmt = if ((size(i.payments) == 1)) | |
27 | 27 | then i.payments[0] | |
28 | 28 | else throw("No Payments Attached Please Attach CODE Asset Only.") | |
29 | 29 | let currentKey = toBase58String(i.caller.bytes) | |
30 | 30 | let UserClaimAmount = ((((InflationNo * pmt.amount) * days) / 365) / 1000) | |
31 | 31 | let allowdedpymt = (blockdiff * 100000) | |
32 | 32 | let actualblocks = (oneday * days) | |
33 | 33 | let totallockblocks = (height + actualblocks) | |
34 | 34 | let PreviousIssuedCODE = getIntegerValue(this, "Total_Issued_CODE:") | |
35 | 35 | let TotalIssuedCODE = (PreviousIssuedCODE + UserClaimAmount) | |
36 | 36 | let PreviousBurnedCODE = getIntegerValue(this, "Total_Burned_CODE:") | |
37 | 37 | let TotalBurnedCODE = (PreviousBurnedCODE + pmt.amount) | |
38 | 38 | let PreviousTxnsCODE = getIntegerValue(this, "Total_Txns:") | |
39 | 39 | let TotalTxnsCODE = (PreviousTxnsCODE + 1) | |
40 | 40 | let fetchuserstakeheight = valueOrErrorMessage(getInteger(addressFromPublicKey(StakingDapp), ("Deposit_height_Of_" + currentKey)), "Your Address not Found on Staking DApp") | |
41 | 41 | let fetchusermatureheight = valueOrErrorMessage(getInteger(addressFromPublicKey(StakingDapp), ("Total_Lock_Blocks_Of_" + currentKey)), "Your Address not Found on Staking DApp") | |
42 | 42 | let gapofheight = (fetchusermatureheight - fetchuserstakeheight) | |
43 | 43 | if ((StartHeight > height)) | |
44 | 44 | then throw((("DApp is Not Started Yet please Wait until " + toString((StartHeight - height))) + " blocks")) | |
45 | 45 | else if ((pmt.assetId != CODEAssetID)) | |
46 | 46 | then throw(("Incorrect asset attached, please attach " + toBase58String(CODEAssetID))) | |
47 | 47 | else if ((minimumlockdays >= days)) | |
48 | 48 | then throw(((("Choose Locking days in between " + toString((minimumlockdays + 1))) + " to ") + toString(maximumlockdays))) | |
49 | 49 | else if ((days > maximumlockdays)) | |
50 | - | then throw(((("You Entered days | |
50 | + | then throw(((((("You Entered days to " + toString(days)) + ", Please Enter no. of days in between ") + toString((minimumlockdays + 1))) + " to ") + toString(maximumlockdays))) | |
51 | 51 | else if ((100000 > pmt.amount)) | |
52 | 52 | then throw("Please Attach minimum 0.001 CODE To Issue CODE Asset.") | |
53 | 53 | else if ((pmt.amount > allowdedpymt)) | |
54 | 54 | then throw((("You can attach maximum " + toString(allowdedpymt)) + "/10^8 CODE.")) | |
55 | 55 | else if ((gapofheight != 129600)) | |
56 | 56 | then throw("You are Not Eligible to Mint CODE. It need minimum 90 Days Staking.") | |
57 | 57 | else [Burn(CODEAssetID, pmt.amount), IntegerEntry("Total_Issued_CODE:", TotalIssuedCODE), IntegerEntry("Total_Burned_CODE:", TotalBurnedCODE), IntegerEntry("Total_Txns:", TotalTxnsCODE), IntegerEntry("Inflation", InflationNo), IntegerEntry(("Deposit_height_Of_" + currentKey), height), IntegerEntry(("Total_Lock_Blocks_Of_" + currentKey), totallockblocks), IntegerEntry(("Claim_Amount_" + currentKey), UserClaimAmount), StringEntry("message", "<h1>CODE Issued Successfully!</h1><br>"), ScriptTransfer(i.caller, UserClaimAmount, CODEAssetID)] | |
58 | 58 | } | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | @Verifier(tx) | |
62 | 62 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
63 | 63 |
github/deemru/w8io/169f3d6 49.81 ms ◑