tx · 2a35VEKunj7U2A4mwtamTx2tADiWzxf3WxarpgNHbs9q 3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo: -0.01400000 Waves 2021.10.11 07:32 [1741135] smart account 3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo > SELF 0.00000000 Waves
{ "type": 13, "id": "2a35VEKunj7U2A4mwtamTx2tADiWzxf3WxarpgNHbs9q", "fee": 1400000, "feeAssetId": null, "timestamp": 1633926799365, "version": 2, "chainId": 84, "sender": "3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo", "senderPublicKey": "AmXrJ1inc5jpKhf6D9aDcRU8QWHZXBJdBBvz9VsKDe9x", "proofs": [ "nuRMBkybBm1XVkq6i1VeVQidBuLVTSGi181Nbnfzm2KZ37a2ZbJfPfcahAzAxY5osS7pyDRzi1HFLhzXGtyD2Ft" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAABgAAAAALQ09ERUFzc2V0SUQBAAAAINAEYRpFnLQZXHk7APbo5tWij1YQ2cG3R/UN12TTTH73AAAAAAtTdGFydEhlaWdodAAAAAAAAAAAAAAAAAAJYmxvY2tkaWZmCQAAZQAAAAIFAAAABmhlaWdodAUAAAALU3RhcnRIZWlnaHQAAAAADlN0YXJ0SW5mbGF0aW9uCQAAZAAAAAIJAABrAAAAAwAAAAAAAJiWgAAAAAAAAAAAAQUAAAAJYmxvY2tkaWZmAAAAAAAAAAAGAAAAAApGZWVBZGRyZXNzAQAAACBSg9mgi9eQkjsz5eBARHIbc7Hg/F4fmB0sxZ6ySMfiIAAAAAAKZGV2QWRkcmVzcwEAAAAgcT857UGuwl6lKR6zURKH3pDKrZTlUMsXWQXYxcjWeBsAAAABAAAAAWkBAAAABUNsYWltAAAAAAQAAAADcG10AwkAAAAAAAACCQABkAAAAAEIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAACQAAAgAAAAECAAAAM05vI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AAALVG90YWxfVHhuczoFAAAADVRvdGFsVHhuc0NPREUJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgIAAAANQ2xhaW1fQW1vdW50XwUAAAAKY3VycmVudEtleQUAAAANTmV3Q09ERVRvVXNlcgkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAATVXNlcl9TdGFrZWRfQW1vdW50OgUAAAAWZmV0Y2h1c2Vyc3Rha2VkYmxhbmFjZQkABEwAAAACCQEAAAAEQnVybgAAAAIFAAAAC0NPREVBc3NldElECAUAAAADcG10AAAABmFtb3VudAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAADU5ld0NPREVUb1VzZXIFAAAAC0NPREVBc3NldElECQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAICAAAAB21lc3NhZ2UCAAAAJjxoMT5DT0RFIElzc3VlZCBTdWNjZXNzZnVsbHkhPC9oMT48YnI+BQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleY9j0xk=", "height": 1741135, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FKHj8gVigZoQmr7sRitvVQJLG6fssT62j5rKHRysE52y Next: 39ZxqcjyfSRnG9xczvFrNYcKAGFzHRovFj2WRQjmMk5K Diff:
Old | New | Differences | |
---|---|---|---|
27 | 27 | let TotalBurnedCODE = (PreviousBurnedCODE + pmt.amount) | |
28 | 28 | let PreviousTxnsCODE = getIntegerValue(this, "Total_Txns:") | |
29 | 29 | let TotalTxnsCODE = (PreviousTxnsCODE + 1) | |
30 | - | let fetchuserstakedblanace = valueOrErrorMessage( | |
30 | + | let fetchuserstakedblanace = valueOrErrorMessage(getInteger(addressFromPublicKey(base58'C246qxhuyo9DBk1pjMzEQSVAWmiqYupG2swGkxTeAvLV'), ("Deposit_Amount_Of_" + currentKey)), "Address not Found") | |
31 | 31 | if ((StartHeight > height)) | |
32 | 32 | then throw((("DApp is Not Started Yet please Wait until " + toString((StartHeight - height))) + " blocks")) | |
33 | 33 | else if ((pmt.assetId != CODEAssetID)) |
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 = 0 | |
7 | 7 | ||
8 | 8 | let blockdiff = (height - StartHeight) | |
9 | 9 | ||
10 | 10 | let StartInflation = (fraction(10000000, 1, blockdiff) + 6) | |
11 | 11 | ||
12 | 12 | let FeeAddress = base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR' | |
13 | 13 | ||
14 | 14 | let devAddress = base58'8d4zGuTjT3h67Z4DatzMXdXXW1GvoQhMTjwCGFxJuene' | |
15 | 15 | ||
16 | 16 | @Callable(i) | |
17 | 17 | func Claim () = { | |
18 | 18 | let pmt = if ((size(i.payments) == 1)) | |
19 | 19 | then i.payments[0] | |
20 | 20 | else throw("No Payments Attached Please Attach CODE Asset Only.") | |
21 | 21 | let currentKey = toBase58String(i.caller.bytes) | |
22 | 22 | let allowdedpymt = (blockdiff * 100000) | |
23 | 23 | let NewCODEToUser = (StartInflation * pmt.amount) | |
24 | 24 | let PreviousIssuedCODE = getIntegerValue(this, "Total_Issued_CODE:") | |
25 | 25 | let TotalIssuedCODE = (PreviousIssuedCODE + NewCODEToUser) | |
26 | 26 | let PreviousBurnedCODE = getIntegerValue(this, "Total_Burned_CODE:") | |
27 | 27 | let TotalBurnedCODE = (PreviousBurnedCODE + pmt.amount) | |
28 | 28 | let PreviousTxnsCODE = getIntegerValue(this, "Total_Txns:") | |
29 | 29 | let TotalTxnsCODE = (PreviousTxnsCODE + 1) | |
30 | - | let fetchuserstakedblanace = valueOrErrorMessage( | |
30 | + | let fetchuserstakedblanace = valueOrErrorMessage(getInteger(addressFromPublicKey(base58'C246qxhuyo9DBk1pjMzEQSVAWmiqYupG2swGkxTeAvLV'), ("Deposit_Amount_Of_" + currentKey)), "Address not Found") | |
31 | 31 | if ((StartHeight > height)) | |
32 | 32 | then throw((("DApp is Not Started Yet please Wait until " + toString((StartHeight - height))) + " blocks")) | |
33 | 33 | else if ((pmt.assetId != CODEAssetID)) | |
34 | 34 | then throw(("Incorrect asset attached, please attach " + toBase58String(CODEAssetID))) | |
35 | 35 | else if ((100000 > pmt.amount)) | |
36 | 36 | then throw("Please Attach minimum 0.001 CODE To Issue CODE Asset.") | |
37 | 37 | else if ((pmt.amount > allowdedpymt)) | |
38 | 38 | then throw((("You can attach maximum " + toString(allowdedpymt)) + "/10^8 CODE.")) | |
39 | 39 | else [IntegerEntry("Inflation", StartInflation), IntegerEntry("Total_Issued_CODE:", TotalIssuedCODE), IntegerEntry("Total_Burned_CODE:", TotalBurnedCODE), IntegerEntry("Total_Txns:", TotalTxnsCODE), IntegerEntry(("Claim_Amount_" + currentKey), NewCODEToUser), IntegerEntry("User_Staked_Amount:", fetchuserstakedblanace), Burn(CODEAssetID, pmt.amount), ScriptTransfer(i.caller, NewCODEToUser, CODEAssetID), StringEntry("message", "<h1>CODE Issued Successfully!</h1><br>")] | |
40 | 40 | } | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | @Verifier(tx) | |
44 | 44 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
45 | 45 |
github/deemru/w8io/169f3d6 30.44 ms ◑