tx · Gw99fbTjAWAi6XRChedWTpgfC1epdEuwSHc1MDjgxn7k 3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo: -0.01400000 Waves 2021.10.14 08:40 [1745531] smart account 3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo > SELF 0.00000000 Waves
{ "type": 13, "id": "Gw99fbTjAWAi6XRChedWTpgfC1epdEuwSHc1MDjgxn7k", "fee": 1400000, "feeAssetId": null, "timestamp": 1634190063995, "version": 2, "chainId": 84, "sender": "3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo", "senderPublicKey": "AmXrJ1inc5jpKhf6D9aDcRU8QWHZXBJdBBvz9VsKDe9x", "proofs": [ "5XG2myG9MbFMSictWjQXZmszQ39vmDeP2KaoeQhMwxXJmA9mdTAsXXtYZ89WWQCygN8E2xGa8T9VBFz3N9Q3fhgV" ], "script": "base64:AAIEAAAAAAAAAAcIAhIDCgEBAAAACgAAAAALQ09ERUFzc2V0SUQBAAAAINAEYRpFnLQZXHk7APbo5tWij1YQ2cG3R/UN12TTTH73AAAAAAtTdGFydEhlaWdodAAAAAAAABqh+AAAAAAGb25lZGF5AAAAAAAAAAWgAAAAAA9taW5pbXVtbG9ja2RheXMAAAAAAAAAAAYAAAAAD21heGltdW1sb2NrZGF5cwAAAAAAAAAABwAAAAAJYmxvY2tkaWZmCQAAZQAAAAIFAAAABmhlaWdodAUAAAALU3RhcnRIZWlnaHQAAAAAC0luZmxhdGlvbk5vCQAAZAAAAAIJAABrAAAAAwAAAAACVAvkAAAAAAAAAAAAAQUAAAAJYmxvY2tkaWZmAAAAAAAAABdwAAAAAAtTdGFraW5nRGFwcAEAAAAgo7WknlFYQG5NE/mpBZyxqA4fl+GkedKP+NopRLlOBBYAAAAACkZlZUFkZHJlc3MBAAAAIFKD2aCL15CSOzPl4EBEchtzseD8Xh+YHSzFnrJIx+IgAAAAAApkZXZBZGRyZXNzAQAAACBxPzntQa7CXqUpHrNREofekMqtlOVQyxdZBdjFyN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UAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXmmJT6L", "height": 1745531, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BJj5YwqYrsZrqn4NrDBgH6tiGngKnU6RHrcwEafuPKUQ Next: FVpz14Ng6RHz1uoaoe8xomDYGgCPUSANaoWrnijKiv7L Diff:
Old | New | Differences | |
---|---|---|---|
7 | 7 | ||
8 | 8 | let oneday = 1440 | |
9 | 9 | ||
10 | - | let minimumlockdays = | |
10 | + | let minimumlockdays = 6 | |
11 | 11 | ||
12 | - | let maximumlockdays = | |
12 | + | let maximumlockdays = 7 | |
13 | 13 | ||
14 | 14 | let blockdiff = (height - StartHeight) | |
15 | 15 |
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 | - | let minimumlockdays = | |
10 | + | let minimumlockdays = 6 | |
11 | 11 | ||
12 | - | let maximumlockdays = | |
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 | 50 | then throw(((("You Entered days greater than 200 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 34.58 ms ◑