tx · EAgsR9QpzCRDQCbu2PgkdCZ8P1d6zfqnQdMfTkr2xH6G 3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo: -0.01400000 Waves 2021.10.09 20:47 [1739040] smart account 3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo > SELF 0.00000000 Waves
{ "type": 13, "id": "EAgsR9QpzCRDQCbu2PgkdCZ8P1d6zfqnQdMfTkr2xH6G", "fee": 1400000, "feeAssetId": null, "timestamp": 1633801680390, "version": 2, "chainId": 84, "sender": "3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo", "senderPublicKey": "AmXrJ1inc5jpKhf6D9aDcRU8QWHZXBJdBBvz9VsKDe9x", "proofs": [ "4piymbYdmN1ahpGfVB9QEA1LJjwi4GwWaGhhSGJE9Qr3SemcTjKg9G5wBHGMJLQxbhn6i3YFQ3sBn6yG98ZcL1aX" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAACgAAAAALQ09ERUFzc2V0SUQBAAAAINAEYRpFnLQZXHk7APbo5tWij1YQ2cG3R/UN12TTTH73AAAAAAtTdGFydEhlaWdodAAAAAAAABqFEAAAAAAJYmxvY2tkaWZmCQAAZQAAAAIFAAAABmhlaWdodAUAAAALU3RhcnRIZWlnaHQAAAAAB29uZWhvdXIAAAAAAAA27oAAAAAABm9uZWRheQAAAAAABSZcAAAAAAAHb25ld2VlawAAAAAAJAyEAAAAAAAIb25lbW9udGgAAAAAAJy/kEAAAAAADlN0YXJ0SW5mbGF0aW9uCQAAZAAAAAIJAABrAAAAAwAAAAAAAJiWgAAAAAAAAAAAAQUAAAAJYmxvY2tkaWZmAAAAAAAAAAAGAAAAAApGZWVBZGRyZXNzAQAAACBSg9mgi9eQkjsz5eBARHIbc7Hg/F4fmB0sxZ6ySMfiIAAAAAAKZGV2QWRkcmVzcwEAAAAgcT857UGuwl6lKR6zURKH3pDKrZTlUMsXWQXYxcjWeBsAAAABAAAAAWkBAAAABUNsYWltAAAAAAQAAAADcG10CQ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AAAABCQAAZQAAAAIFAAAAC1N0YXJ0SGVpZ2h0BQAAAAZoZWlnaHQCAAAAByBibG9ja3MJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAACUluZmxhdGlvbgUAAAAOU3RhcnRJbmZsYXRpb24JAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAElRvdGFsX0lzc3VlZF9DT0RFOgUAAAAPVG90YWxJc3N1ZWRDT0RFCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAABJUb3RhbF9CdXJuZWRfQ09ERToFAAAAD1RvdGFsQnVybmVkQ09ERQkABEwAAAACCQEAAAAEQnVybgAAAAIFAAAAC0NPREVBc3NldElECAUAAAADcG10AAAABmFtb3VudAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAADU5ld0NPREVUb1VzZXIFAAAAC0NPREVBc3NldElECQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAICAAAAB21lc3NhZ2UCAAAAJjxoMT5DT0RFIElzc3VlZCBTdWNjZXNzZnVsbHkhPC9oMT48YnI+BQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleT4zV+A=", "height": 1739040, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: G7zu2W7hTAZoY7sVnozgcCc7BJmxbMDsPSj2ModjRhmU Next: 5BjC9d6ArZzLKPCntwge3V2ycqryBREeXkqGUbWuznrJ Diff:
Old | New | Differences | |
---|---|---|---|
28 | 28 | let NewCODEToUser = (StartInflation * pmt.amount) | |
29 | 29 | let PreviousIssuedCODE = getIntegerValue(this, "Total_Issued_CODE:") | |
30 | 30 | let TotalIssuedCODE = (PreviousIssuedCODE + NewCODEToUser) | |
31 | + | let PreviousBurnedCODE = getIntegerValue(this, "Total_Burned_CODE:") | |
32 | + | let TotalBurnedCODE = (PreviousBurnedCODE + pmt.amount) | |
31 | 33 | if ((pmt.assetId != CODEAssetID)) | |
32 | 34 | then throw(("Incorrect asset attached, please attach " + toBase58String(CODEAssetID))) | |
33 | 35 | else if ((5000000 > pmt.amount)) | |
34 | 36 | then throw("Please Attach minimum 0.05 CODE To Issue CODE Asset.") | |
35 | 37 | else if ((StartHeight > height)) | |
36 | 38 | then throw((("DApp is Not Started Yet please Wait until " + toString((StartHeight - height))) + " blocks")) | |
37 | - | else [IntegerEntry("Inflation", StartInflation), Burn(CODEAssetID, pmt.amount), ScriptTransfer(i.caller, NewCODEToUser, CODEAssetID), StringEntry("message", "<h1>CODE Issued Successfully!</h1><br>")] | |
39 | + | else [IntegerEntry("Inflation", StartInflation), IntegerEntry("Total_Issued_CODE:", TotalIssuedCODE), IntegerEntry("Total_Burned_CODE:", TotalBurnedCODE), Burn(CODEAssetID, pmt.amount), ScriptTransfer(i.caller, NewCODEToUser, CODEAssetID), StringEntry("message", "<h1>CODE Issued Successfully!</h1><br>")] | |
38 | 40 | } | |
39 | 41 | ||
40 | 42 |
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 = 1738000 | |
7 | 7 | ||
8 | 8 | let blockdiff = (height - StartHeight) | |
9 | 9 | ||
10 | 10 | let onehour = 3600000 | |
11 | 11 | ||
12 | 12 | let oneday = 86400000 | |
13 | 13 | ||
14 | 14 | let oneweek = 604800000 | |
15 | 15 | ||
16 | 16 | let onemonth = 2629800000 | |
17 | 17 | ||
18 | 18 | let StartInflation = (fraction(10000000, 1, blockdiff) + 6) | |
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 Claim () = { | |
26 | 26 | let pmt = value(i.payments[0]) | |
27 | 27 | let currentKey = toBase58String(i.caller.bytes) | |
28 | 28 | let NewCODEToUser = (StartInflation * pmt.amount) | |
29 | 29 | let PreviousIssuedCODE = getIntegerValue(this, "Total_Issued_CODE:") | |
30 | 30 | let TotalIssuedCODE = (PreviousIssuedCODE + NewCODEToUser) | |
31 | + | let PreviousBurnedCODE = getIntegerValue(this, "Total_Burned_CODE:") | |
32 | + | let TotalBurnedCODE = (PreviousBurnedCODE + pmt.amount) | |
31 | 33 | if ((pmt.assetId != CODEAssetID)) | |
32 | 34 | then throw(("Incorrect asset attached, please attach " + toBase58String(CODEAssetID))) | |
33 | 35 | else if ((5000000 > pmt.amount)) | |
34 | 36 | then throw("Please Attach minimum 0.05 CODE To Issue CODE Asset.") | |
35 | 37 | else if ((StartHeight > height)) | |
36 | 38 | then throw((("DApp is Not Started Yet please Wait until " + toString((StartHeight - height))) + " blocks")) | |
37 | - | else [IntegerEntry("Inflation", StartInflation), Burn(CODEAssetID, pmt.amount), ScriptTransfer(i.caller, NewCODEToUser, CODEAssetID), StringEntry("message", "<h1>CODE Issued Successfully!</h1><br>")] | |
39 | + | else [IntegerEntry("Inflation", StartInflation), IntegerEntry("Total_Issued_CODE:", TotalIssuedCODE), IntegerEntry("Total_Burned_CODE:", TotalBurnedCODE), Burn(CODEAssetID, pmt.amount), ScriptTransfer(i.caller, NewCODEToUser, CODEAssetID), StringEntry("message", "<h1>CODE Issued Successfully!</h1><br>")] | |
38 | 40 | } | |
39 | 41 | ||
40 | 42 | ||
41 | 43 | @Verifier(tx) | |
42 | 44 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
43 | 45 |
github/deemru/w8io/169f3d6 29.63 ms ◑