tx · 76P5D61KJgJ9LSWZqdFg8x4UbhFXURC8JnnaN8SeGzQa 3Mq6mSfCYaGQkEHMAhobtjJGvb7xj1aiSBp: -0.01000000 Waves 2024.02.22 16:45 [2987522] smart account 3Mq6mSfCYaGQkEHMAhobtjJGvb7xj1aiSBp > SELF 0.00000000 Waves
{ "type": 13, "id": "76P5D61KJgJ9LSWZqdFg8x4UbhFXURC8JnnaN8SeGzQa", "fee": 1000000, "feeAssetId": null, "timestamp": 1708609554305, "version": 2, "chainId": 84, "sender": "3Mq6mSfCYaGQkEHMAhobtjJGvb7xj1aiSBp", "senderPublicKey": "C5DMu2JvfbtJnPu4pyFYhyyeaYRS1RsnRnsgNFnkL55E", "proofs": [ "4TxFWHCfJs2HPCyTqhZtak4kAWHPZVUy4KBqA9chQY2ad3aAgcWCd7eAmqMhefkMZtoYg5xBC5VK2WHyfTU28nMk" ], "script": "base64:BgIGCAISABIAAwAHRUFUSF9JRAkA2QQBCQERQGV4dHJOYXRpdmUoMTA1MykCBQR0aGlzAgdFQVRIX0lEAApGZWVBZGRyZXNzAQAACmRldkFkZHJlc3MBAAIBaQEOSXNzdWVFQVRIVG9rZW4ABAVhc3NldAkAwwgHAgRFQVRIAvMBRUFUSCBpcyBhIGRpZ2l0YWwgdG9rZW4gYmFja2VkIGJ5IGEgMToxIHJlc2VydmUgb2YgV2F2ZXMgdG9rZW5zLCBtZWFuaW5nIGZvciBldmVyeSBFQVRIIHRva2VuIGluIGNpcmN1bGF0aW9uLCB0aGVyZSBpcyBvbmUgV2F2ZXMgdG9rZW4gaGVsZCBpbiBzZWN1cmUgcmVzZXJ2ZS4gVGhpcyByZXNlcnZlIG1vZGVsIGFpbXMgdG8gZ3VhcmFudGVlIHRoZSBzdGFiaWxpdHkgYW5kIHRyYW5zcGFyZW5jeSBvZiBFQVRIJ3MgdmFsdWUuAAEACAYFBHVuaXQAAAQHYXNzZXRJZAkAuAgBBQVhc3NldAQMY2hlY2tIYXJkQ2FwCQELdmFsdWVPck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pbmcJAMwIAgkBDEludGVnZXJFbnRyeQICHFRvdGFsX0VBVEhfUmVzZXJ2ZV9Jbl9XQVZFUzoFEEVBVEhSZXNlcnZlVmFsdWUJAMwIAgkBDEludGVnZXJFbnRyeQICG0VBVEhfQmFja3VwX1ZhbHVlX0luX1dBVkVTOgUPRUFUSEJhY2t1cFByaWNlCQDMCAIJAQtTdHJpbmdFbnRyeQICB21lc3NhZ2UCJjxoMT5FQVRIIElzc3VlZCBTdWNjZXNzZnVsbHkhPC9oMT48YnI+CQDMCAIJAQdSZWlzc3VlAwUHRUFUSF9JRAUNTmV3RUFUSFRvVXNlcgYJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwgFAWkGY2FsbGVyCQBpAgkAaAIFDU5ld0VBVEhUb1VzZXIA3gcA6AcFB0VBVEhfSUQJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwkApwgBBQpGZWVBZGRyZXNzCQBpAgkAaAIFDU5ld0VBVEhUb1VzZXIACQDoBwUHRUFUSF9JRAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCQCnCAEFCmRldkFkZHJlc3MJAGkCCQBoAgUNTmV3RUFUSFRvVXNlcgABAOgHBQdFQVRIX0lEBQNuaWwBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5EfZk/w==", "height": 2987522, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: bB5ChiEUfmPxumG5H1dnuQBt4cYnPSd4mVJtELzxZ6n Next: dkHa9RiEXN9eCWT57HHP6VD6HQkkQWCMSyyCx3n3jdz Diff:
Old | New | Differences | |
---|---|---|---|
36 | 36 | else 0 | |
37 | 37 | } | |
38 | 38 | let p = (m + l) | |
39 | - | let q = (k - p) | |
40 | - | let r = getIntegerValue(this, "Total_EATH_Reserve_In_WAVES:") | |
41 | - | let s = (r + h.amount) | |
39 | + | let q = { | |
40 | + | let n = getIntegerValue(this, "Total_EATH_Reserve_In_WAVES:") | |
41 | + | if ($isInstanceOf(n, "Int")) | |
42 | + | then { | |
43 | + | let o = n | |
44 | + | o | |
45 | + | } | |
46 | + | else 0 | |
47 | + | } | |
48 | + | let r = (q + h.amount) | |
49 | + | let s = (k - p) | |
42 | 50 | let t = getIntegerValue(this, "EATH_Backup_Value_In_WAVES:") | |
43 | - | let u = fraction(100000, | |
51 | + | let u = fraction(100000, r, p) | |
44 | 52 | if (isDefined(h.assetId)) | |
45 | 53 | then throw("Incorrect asset attached, please attach WAVES.") | |
46 | 54 | else if ((5000000 > h.amount)) | |
47 | 55 | then throw("Please Attach minimum 0.05 WAVES To Issue EATH Asset.") | |
48 | 56 | else if ((p > k)) | |
49 | - | then throw((((((("EATH Minting is about to reach the Hard Cap of " + toString(k)) + "/10^8 EATH. Please Reduce your Minting Order by ") + toString( | |
50 | - | else [IntegerEntry("Total_Issued_EATH:", p), IntegerEntry("Balance_Minting_EATH:", | |
57 | + | then throw((((((("EATH Minting is about to reach the Hard Cap of " + toString(k)) + "/10^8 EATH. Please Reduce your Minting Order by ") + toString(s)) + " or put ") + toString((k - m))) + "/10^8")) | |
58 | + | else [IntegerEntry("Total_Issued_EATH:", p), IntegerEntry("Balance_Minting_EATH:", s), IntegerEntry("Total_EATH_Reserve_In_WAVES:", r), IntegerEntry("EATH_Backup_Value_In_WAVES:", u), StringEntry("message", "<h1>EATH Issued Successfully!</h1><br>"), Reissue(a, l, true), ScriptTransfer(d.caller, ((l * 990) / 1000), a), ScriptTransfer(addressFromPublicKey(b), ((l * 9) / 1000), a), ScriptTransfer(addressFromPublicKey(c), ((l * 1) / 1000), a)] | |
51 | 59 | } | |
52 | 60 | ||
53 | 61 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = fromBase58String(getStringValue(this, "EATH_ID")) | |
5 | 5 | ||
6 | 6 | let b = base58'' | |
7 | 7 | ||
8 | 8 | let c = base58'' | |
9 | 9 | ||
10 | 10 | @Callable(d) | |
11 | 11 | func IssueEATHToken () = { | |
12 | 12 | let e = Issue("EATH", "EATH is a digital token backed by a 1:1 reserve of Waves tokens, meaning for every EATH token in circulation, there is one Waves token held in secure reserve. This reserve model aims to guarantee the stability and transparency of EATH's value.", 1, 8, true, unit, 0) | |
13 | 13 | let f = calculateAssetId(e) | |
14 | 14 | let g = valueOrElse(getIntegerValue(this, "EATHHardCap"), 0) | |
15 | 15 | if ((g == 0)) | |
16 | 16 | then [e, Burn(f, 1), StringEntry("EATH_ID", toBase58String(f)), IntegerEntry("EATH/WAVES", 100000), IntegerEntry("EATHHardCap", 100000000000000)] | |
17 | 17 | else throw("Token is Already Issued.") | |
18 | 18 | } | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | ||
22 | 22 | @Callable(d) | |
23 | 23 | func IssueEATH () = { | |
24 | 24 | let h = value(d.payments[0]) | |
25 | 25 | let i = toBase58String(d.caller.bytes) | |
26 | 26 | let j = getIntegerValue(this, "EATH/WAVES") | |
27 | 27 | let k = getIntegerValue(this, "EATHHardCap") | |
28 | 28 | let l = fraction(100000, h.amount, j) | |
29 | 29 | let m = { | |
30 | 30 | let n = getIntegerValue(this, "Total_Issued_EATH:") | |
31 | 31 | if ($isInstanceOf(n, "Int")) | |
32 | 32 | then { | |
33 | 33 | let o = n | |
34 | 34 | o | |
35 | 35 | } | |
36 | 36 | else 0 | |
37 | 37 | } | |
38 | 38 | let p = (m + l) | |
39 | - | let q = (k - p) | |
40 | - | let r = getIntegerValue(this, "Total_EATH_Reserve_In_WAVES:") | |
41 | - | let s = (r + h.amount) | |
39 | + | let q = { | |
40 | + | let n = getIntegerValue(this, "Total_EATH_Reserve_In_WAVES:") | |
41 | + | if ($isInstanceOf(n, "Int")) | |
42 | + | then { | |
43 | + | let o = n | |
44 | + | o | |
45 | + | } | |
46 | + | else 0 | |
47 | + | } | |
48 | + | let r = (q + h.amount) | |
49 | + | let s = (k - p) | |
42 | 50 | let t = getIntegerValue(this, "EATH_Backup_Value_In_WAVES:") | |
43 | - | let u = fraction(100000, | |
51 | + | let u = fraction(100000, r, p) | |
44 | 52 | if (isDefined(h.assetId)) | |
45 | 53 | then throw("Incorrect asset attached, please attach WAVES.") | |
46 | 54 | else if ((5000000 > h.amount)) | |
47 | 55 | then throw("Please Attach minimum 0.05 WAVES To Issue EATH Asset.") | |
48 | 56 | else if ((p > k)) | |
49 | - | then throw((((((("EATH Minting is about to reach the Hard Cap of " + toString(k)) + "/10^8 EATH. Please Reduce your Minting Order by ") + toString( | |
50 | - | else [IntegerEntry("Total_Issued_EATH:", p), IntegerEntry("Balance_Minting_EATH:", | |
57 | + | then throw((((((("EATH Minting is about to reach the Hard Cap of " + toString(k)) + "/10^8 EATH. Please Reduce your Minting Order by ") + toString(s)) + " or put ") + toString((k - m))) + "/10^8")) | |
58 | + | else [IntegerEntry("Total_Issued_EATH:", p), IntegerEntry("Balance_Minting_EATH:", s), IntegerEntry("Total_EATH_Reserve_In_WAVES:", r), IntegerEntry("EATH_Backup_Value_In_WAVES:", u), StringEntry("message", "<h1>EATH Issued Successfully!</h1><br>"), Reissue(a, l, true), ScriptTransfer(d.caller, ((l * 990) / 1000), a), ScriptTransfer(addressFromPublicKey(b), ((l * 9) / 1000), a), ScriptTransfer(addressFromPublicKey(c), ((l * 1) / 1000), a)] | |
51 | 59 | } | |
52 | 60 | ||
53 | 61 | ||
54 | 62 | @Verifier(v) | |
55 | 63 | func w () = sigVerify(v.bodyBytes, v.proofs[0], v.senderPublicKey) | |
56 | 64 |
github/deemru/w8io/026f985 27.44 ms ◑