tx · 2VpcP9ovu63xsx6aXAjPm9uQBf4tXLXSyRsazPkmofuS
3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo: -0.01400000 Waves
2021.10.09 16:45 [1738794] smart account 3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo > SELF 0.00000000 Waves
{
"type": 13,
"id": "2VpcP9ovu63xsx6aXAjPm9uQBf4tXLXSyRsazPkmofuS",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1633787145401,
"version": 2,
"chainId": 84,
"sender": "3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo",
"senderPublicKey": "AmXrJ1inc5jpKhf6D9aDcRU8QWHZXBJdBBvz9VsKDe9x",
"proofs": [
"4HZbBLEEkC5dMjgbjveMeet1tmWaiWj49CPtkFrKAsYh3MY5QvPDZaR6JqMbrbRo8kJ8s5mLhiTshEAP9xBBQ9Ym"
],
"script": "base64:AAIEAAAAAAAAAAQIAhIAAAAACgAAAAALQ09ERUFzc2V0SUQBAAAAINAEYRpFnLQZXHk7APbo5tWij1YQ2cG3R/UN12TTTH73AAAAAAtTdGFydEhlaWdodAAAAAAAABwPmAAAAAAJYmxvY2tkaWZmCQAAZQAAAAIFAAAABmhlaWdodAUAAAALU3RhcnRIZWlnaHQAAAAAB29uZWhvdXIAAAAAAAA27oAAAAAABm9uZWRheQAAAAAABSZcAAAAAAAHb25ld2VlawAAAAAAJAyEAAAAAAAIb25lbW9udGgAAAAAAJy/kEAAAAAADlN0YXJ0SW5mbGF0aW9uCQAAZAAAAAIJAABpAAAAAgAAAAAAABX5AAkAAGgAAAACCQAAaAAAAAIJAABpAAAAAgAAAAAAAAAAAQAAAAAAAAAFoAUAAAAJYmxvY2tkaWZmAAAAAAAAAAWgAAAAAAAAAAAGAAAAAApGZWVBZGRyZXNzAQAAACBSg9mgi9eQkjsz5eBARHIbc7Hg/F4fmB0sxZ6ySMfiIAAAAAAKZGV2QWRkcmVzcwEAAAAgcT857UGuwl6lKR6zURKH3pDKr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gUAAAAOU3RhcnRJbmZsYXRpb24JAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAAHbWVzc2FnZQIAAAAmPGgxPkNPREUgSXNzdWVkIFN1Y2Nlc3NmdWxseSE8L2gxPjxicj4FAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5NCzOQw==",
"height": 1738794,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: HjLZDDLyYqxWA8WU53Yp8Hi68dzfUD3aLi2DFPRwX6he
Next: AtTAPrb1nheMJ3j2RZEYz2ZaNX41RNt27zGtQRyUmCWR
Diff:
Old | New | | Differences |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let CODEAssetID = base58'F11g74azdw3SZN83raygbu9useimfTwSQ7HmTLggAq26' |
---|
5 | 5 | | |
---|
6 | | - | let Week0TS = 1633824000000 |
---|
| 6 | + | let StartHeight = 1839000 |
---|
| 7 | + | |
---|
| 8 | + | let blockdiff = (height - StartHeight) |
---|
7 | 9 | | |
---|
8 | 10 | | let onehour = 3600000 |
---|
9 | 11 | | |
---|
|
13 | 15 | | |
---|
14 | 16 | | let onemonth = 2629800000 |
---|
15 | 17 | | |
---|
16 | | - | let StartInflation = pow(10, 0, 3, 0, 2, UP) |
---|
| 18 | + | let StartInflation = ((1440000 / (((1 / 1440) * blockdiff) * 1440)) + 6) |
---|
17 | 19 | | |
---|
18 | 20 | | let FeeAddress = base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR' |
---|
19 | 21 | | |
---|
|
23 | 25 | | func Claim () = { |
---|
24 | 26 | | let pmt = value(i.payments[0]) |
---|
25 | 27 | | let currentKey = toBase58String(i.caller.bytes) |
---|
| 28 | + | let NewCODEToUser = (StartInflation * pmt.amount) |
---|
| 29 | + | let PreviousIssuedCODE = getIntegerValue(this, "Total_Issued_CODE:") |
---|
| 30 | + | let TotalIssuedCODE = (PreviousIssuedCODE + NewCODEToUser) |
---|
26 | 31 | | if ((pmt.assetId != CODEAssetID)) |
---|
27 | 32 | | then throw(("Incorrect asset attached, please attach " + toBase58String(CODEAssetID))) |
---|
28 | 33 | | else if ((5000000 > pmt.amount)) |
---|
29 | | - | then throw("Please Attach minimum 0.05 TN To Issue CODE Asset.") |
---|
30 | | - | else if ((Week0TS > lastBlock.timestamp)) |
---|
31 | | - | then throw((("DApp is Not Started Yet please Wait until " + toString(((Week0TS - lastBlock.timestamp) / 60000))) + " Minutes")) |
---|
32 | | - | else [IntegerEntry("Inflation", StartInflation)] |
---|
| 34 | + | then throw("Please Attach minimum 0.05 CODE To Issue CODE Asset.") |
---|
| 35 | + | else if ((StartHeight > height)) |
---|
| 36 | + | then throw((("DApp is Not Started Yet please Wait until " + toString(((StartHeight - height) / 60000))) + " blocks")) |
---|
| 37 | + | else [IntegerEntry("Inflation", StartInflation), StringEntry("message", "<h1>CODE Issued Successfully!</h1><br>")] |
---|
33 | 38 | | } |
---|
34 | 39 | | |
---|
35 | 40 | | |
---|
Full:
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 | | - | let Week0TS = 1633824000000 |
---|
| 6 | + | let StartHeight = 1839000 |
---|
| 7 | + | |
---|
| 8 | + | let blockdiff = (height - StartHeight) |
---|
7 | 9 | | |
---|
8 | 10 | | let onehour = 3600000 |
---|
9 | 11 | | |
---|
10 | 12 | | let oneday = 86400000 |
---|
11 | 13 | | |
---|
12 | 14 | | let oneweek = 604800000 |
---|
13 | 15 | | |
---|
14 | 16 | | let onemonth = 2629800000 |
---|
15 | 17 | | |
---|
16 | | - | let StartInflation = pow(10, 0, 3, 0, 2, UP) |
---|
| 18 | + | let StartInflation = ((1440000 / (((1 / 1440) * blockdiff) * 1440)) + 6) |
---|
17 | 19 | | |
---|
18 | 20 | | let FeeAddress = base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR' |
---|
19 | 21 | | |
---|
20 | 22 | | let devAddress = base58'8d4zGuTjT3h67Z4DatzMXdXXW1GvoQhMTjwCGFxJuene' |
---|
21 | 23 | | |
---|
22 | 24 | | @Callable(i) |
---|
23 | 25 | | func Claim () = { |
---|
24 | 26 | | let pmt = value(i.payments[0]) |
---|
25 | 27 | | let currentKey = toBase58String(i.caller.bytes) |
---|
| 28 | + | let NewCODEToUser = (StartInflation * pmt.amount) |
---|
| 29 | + | let PreviousIssuedCODE = getIntegerValue(this, "Total_Issued_CODE:") |
---|
| 30 | + | let TotalIssuedCODE = (PreviousIssuedCODE + NewCODEToUser) |
---|
26 | 31 | | if ((pmt.assetId != CODEAssetID)) |
---|
27 | 32 | | then throw(("Incorrect asset attached, please attach " + toBase58String(CODEAssetID))) |
---|
28 | 33 | | else if ((5000000 > pmt.amount)) |
---|
29 | | - | then throw("Please Attach minimum 0.05 TN To Issue CODE Asset.") |
---|
30 | | - | else if ((Week0TS > lastBlock.timestamp)) |
---|
31 | | - | then throw((("DApp is Not Started Yet please Wait until " + toString(((Week0TS - lastBlock.timestamp) / 60000))) + " Minutes")) |
---|
32 | | - | else [IntegerEntry("Inflation", StartInflation)] |
---|
| 34 | + | then throw("Please Attach minimum 0.05 CODE To Issue CODE Asset.") |
---|
| 35 | + | else if ((StartHeight > height)) |
---|
| 36 | + | then throw((("DApp is Not Started Yet please Wait until " + toString(((StartHeight - height) / 60000))) + " blocks")) |
---|
| 37 | + | else [IntegerEntry("Inflation", StartInflation), StringEntry("message", "<h1>CODE Issued Successfully!</h1><br>")] |
---|
33 | 38 | | } |
---|
34 | 39 | | |
---|
35 | 40 | | |
---|
36 | 41 | | @Verifier(tx) |
---|
37 | 42 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
38 | 43 | | |
---|