tx · Hy92krVqo17CPw3obdmfUYhCVMKgtCSQRefpwfhHDJxE 3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo: -0.01400000 Waves 2021.10.09 10:47 [1738454] smart account 3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo > SELF 0.00000000 Waves
{ "type": 13, "id": "Hy92krVqo17CPw3obdmfUYhCVMKgtCSQRefpwfhHDJxE", "fee": 1400000, "feeAssetId": null, "timestamp": 1633765662912, "version": 2, "chainId": 84, "sender": "3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo", "senderPublicKey": "AmXrJ1inc5jpKhf6D9aDcRU8QWHZXBJdBBvz9VsKDe9x", "proofs": [ "5ypSBsPz6zwcMGK4bSU7kUuyueGdo9XmgKpENoYLgkwDiR9thrPrpUYfngN1CjSG8ykAgZkJwkFuDDCiRG59K5LU" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAACAAAAAALQ09ERUFzc2V0SUQBAAAAINAEYRpFnLQZXHk7APbo5tWij1YQ2cG3R/UN12TTTH73AAAAAAdvbmVob3VyAAAAAAAANu6AAAAAAAZvbmVkYXkAAAAAAAUmXAAAAAAAB29uZXdlZWsAAAAAACQMhAAAAAAACG9uZW1vbnRoAAAAAACcv5BAAAAAAA5TdGFydEluZmxhdGlvbgkAAGwAAAAGAAAAAAAAAAAKAAAAAAAAAAACAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAACBQAAAAJVUAAAAAAKRmVlQWRkcmVzcwEAAAAgUoPZoIvXkJI7M+XgQERyG3Ox4PxeH5gdLMWeskjH4iAAAAAACmRldkFkZHJlc3MBAAAAIHE/Oe1BrsJepSkes1ESh96Qyq2U5VDLF1kF2MXI1ngbAAAAAQAAAAFpAQAAAAVDbGFpbQAAAAAEAAAAA3BtdAkBAAAABXZhbHVlAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAQAAAAKY3VycmVudEtleQkAAlgAAAABCAgFAAAAAWk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AAAAQkBAAAAAiE9AAAAAggFAAAAA3BtdAAAAAdhc3NldElkBQAAAAtDT0RFQXNzZXRJRAkAAAIAAAABAgAAACtJbmNvcnJlY3QgYXNzZXQgYXR0YWNoZWQsIHBsZWFzZSBhdHRhY2ggVE4uAwkAAGYAAAACAAAAAAAATEtACAUAAAADcG10AAAABmFtb3VudAkAAAIAAAABAgAAADJQbGVhc2UgQXR0YWNoIG1pbmltdW0gMC4wNSBUTiBUbyBJc3N1ZSBDT0RFIEFzc2V0LgMJAABmAAAAAgUAAAAPVG90YWxJc3N1ZWRDT0RFBQAAAAtDT0RFSGFyZENhcAkAAAIAAAABCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAC9DT0RFIE1pbnRpbmcgaXMgYWJvdXQgdG8gcmVhY2ggdGhlIEhhcmQgQ2FwIG9mIAkAAaQAAAABBQAAAAtDT0RFSGFyZENhcAIAAAAwLzEwXjggQ09ERS4gUGxlYXNlIFJlZHVjZSB5b3VyIE1pbnRpbmcgT3JkZXIgYnkgCQABpAAAAAEFAAAADlBlbmRpbmdNaW50aW5nAgAAAAggb3IgcHV0IAkAAaQAAAABCQAAZQAAAAIFAAAAC0NPREVIYXJkQ2FwBQAAABJQcmV2aW91c0lzc3VlZENPREUCAAAABS8xMF44CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAAAlJbmZsYXRpb24FAAAADlN0YXJ0SW5mbGF0aW9uBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleWh5Z+E=", "height": 1738454, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 93YN5qqnhQ5drsB97QLn8ZrdQKHjAVcBSWn6MSbruPj3 Next: 9iHEkCYJHxrdVFEQBqx3n1icPx5Akgxp3fMK1EXF1qfS Diff:
Old | New | Differences | |
---|---|---|---|
31 | 31 | let CODEReserveValue = (PreviousCODEReserveValue + pmt.amount) | |
32 | 32 | let PreviousCODEBackupPrice = getIntegerValue(this, "CODE_Backup_Value_In_TN:") | |
33 | 33 | let CODEBackupPrice = fraction(100000, CODEReserveValue, TotalIssuedCODE) | |
34 | - | if (isDefined(pmt.assetId)) | |
34 | + | if (isDefined((pmt.assetId != CODEAssetID))) | |
35 | 35 | then throw("Incorrect asset attached, please attach TN.") | |
36 | 36 | else if ((5000000 > pmt.amount)) | |
37 | 37 | then throw("Please Attach minimum 0.05 TN To Issue CODE Asset.") |
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 onehour = 3600000 | |
7 | 7 | ||
8 | 8 | let oneday = 86400000 | |
9 | 9 | ||
10 | 10 | let oneweek = 604800000 | |
11 | 11 | ||
12 | 12 | let onemonth = 2629800000 | |
13 | 13 | ||
14 | 14 | let StartInflation = pow(10, 2, 3, 0, 2, UP) | |
15 | 15 | ||
16 | 16 | let FeeAddress = base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR' | |
17 | 17 | ||
18 | 18 | let devAddress = base58'8d4zGuTjT3h67Z4DatzMXdXXW1GvoQhMTjwCGFxJuene' | |
19 | 19 | ||
20 | 20 | @Callable(i) | |
21 | 21 | func Claim () = { | |
22 | 22 | let pmt = value(i.payments[0]) | |
23 | 23 | let currentKey = toBase58String(i.caller.bytes) | |
24 | 24 | let PricePerCODE = getIntegerValue(this, "CODE/TN") | |
25 | 25 | let CODEHardCap = getIntegerValue(this, "CODEHardCap") | |
26 | 26 | let NewCODEToUser = fraction(100000, pmt.amount, PricePerCODE) | |
27 | 27 | let PreviousIssuedCODE = getIntegerValue(this, "Total_Issued_CODE:") | |
28 | 28 | let TotalIssuedCODE = (PreviousIssuedCODE + NewCODEToUser) | |
29 | 29 | let PendingMinting = (CODEHardCap - TotalIssuedCODE) | |
30 | 30 | let PreviousCODEReserveValue = getIntegerValue(this, "Total_CODE_Reserve_In_TN:") | |
31 | 31 | let CODEReserveValue = (PreviousCODEReserveValue + pmt.amount) | |
32 | 32 | let PreviousCODEBackupPrice = getIntegerValue(this, "CODE_Backup_Value_In_TN:") | |
33 | 33 | let CODEBackupPrice = fraction(100000, CODEReserveValue, TotalIssuedCODE) | |
34 | - | if (isDefined(pmt.assetId)) | |
34 | + | if (isDefined((pmt.assetId != CODEAssetID))) | |
35 | 35 | then throw("Incorrect asset attached, please attach TN.") | |
36 | 36 | else if ((5000000 > pmt.amount)) | |
37 | 37 | then throw("Please Attach minimum 0.05 TN To Issue CODE Asset.") | |
38 | 38 | else if ((TotalIssuedCODE > CODEHardCap)) | |
39 | 39 | then throw((((((("CODE Minting is about to reach the Hard Cap of " + toString(CODEHardCap)) + "/10^8 CODE. Please Reduce your Minting Order by ") + toString(PendingMinting)) + " or put ") + toString((CODEHardCap - PreviousIssuedCODE))) + "/10^8")) | |
40 | 40 | else [IntegerEntry("Inflation", StartInflation)] | |
41 | 41 | } | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | @Verifier(tx) | |
45 | 45 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
46 | 46 |
github/deemru/w8io/169f3d6 31.71 ms ◑