tx · dkHa9RiEXN9eCWT57HHP6VD6HQkkQWCMSyyCx3n3jdz 3Mq6mSfCYaGQkEHMAhobtjJGvb7xj1aiSBp: -0.01000000 Waves 2024.02.22 16:55 [2987529] smart account 3Mq6mSfCYaGQkEHMAhobtjJGvb7xj1aiSBp > SELF 0.00000000 Waves
{ "type": 13, "id": "dkHa9RiEXN9eCWT57HHP6VD6HQkkQWCMSyyCx3n3jdz", "fee": 1000000, "feeAssetId": null, "timestamp": 1708610160303, "version": 2, "chainId": 84, "sender": "3Mq6mSfCYaGQkEHMAhobtjJGvb7xj1aiSBp", "senderPublicKey": "C5DMu2JvfbtJnPu4pyFYhyyeaYRS1RsnRnsgNFnkL55E", "proofs": [ "2wPagpCdJHjy7ALfeEhFLY82JUrpyjhee7e86fsNjTrHukFBGxNjx8e3nAxvowhEGLkBZ572ZJGXwS9JX1kG5GqS" ], "script": "base64:BgIGCAISABIAAwAHRUFUSF9JRAkA2QQBCQERQGV4dHJOYXRpdmUoMTA1MykCBQR0aGlzAgdFQVRIX0lEAApGZWVBZGRyZXNzASDjrdey1Io21qI8AxObYBZMNWPHMCK947HpXHsKae68IwAKZGV2QWRkcmVzcwEg463XstSKNtaiPAMTm2AWTDVjxzAiveOx6Vx7CmnuvCMCAWkBDklzc3VlRUFUSFRva2VuAAQFYXNzZXQJAMMIBwIERUFUSALzAUVBVEggaXMgYSBkaWdpdGFsIHRva2VuIGJhY2tlZCBieSBhIDE6MSByZXNlcnZlIG9mIFdhdmVzIHRva2VucywgbWVhbmluZyBmb3IgZXZlcnkgRUFUSCB0b2tlbiBpbiBjaXJjdWxhdGlvbiwgdGhlcmUgaXMgb25lIFdhdmVzIHRva2VuIGhlbGQgaW4gc2VjdXJlIHJlc2VydmUuIFRoaXMgcmVzZXJ2ZSBtb2RlbCBhaW1zIHRvIGd1YXJhbnRlZSB0aGUgc3RhYmlsaXR5IGFuZCB0cmFuc3BhcmVuY3kgb2YgRUFUSCdzIHZhbHVlLgABAAgGBQR1bml0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eGzQa Next: 5bhwxXKG1sgNRVT5UTh1NV8fWmWcbdSj1EzXG5qoXVT2 Diff:
Old | New | Differences | |
---|---|---|---|
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let EATH_ID = fromBase58String(getStringValue(this, "EATH_ID")) | |
5 | 5 | ||
6 | - | let FeeAddress = base58'' | |
6 | + | let FeeAddress = base58'GKmJ6BchUgQfwKp4mp5eX8Y9xLioYRm6e1gDfFgdAcCr' | |
7 | 7 | ||
8 | - | let devAddress = base58'' | |
8 | + | let devAddress = base58'GKmJ6BchUgQfwKp4mp5eX8Y9xLioYRm6e1gDfFgdAcCr' | |
9 | 9 | ||
10 | 10 | @Callable(i) | |
11 | 11 | func IssueEATHToken () = { | |
13 | 13 | let assetId = calculateAssetId(asset) | |
14 | 14 | let checkHardCap = valueOrElse(getIntegerValue(this, "EATHHardCap"), 0) | |
15 | 15 | if ((checkHardCap == 0)) | |
16 | - | then [asset, Burn(assetId, 1), StringEntry("EATH_ID", toBase58String(assetId)), IntegerEntry("EATH/WAVES", 100000), IntegerEntry("EATHHardCap", 100000000000000)] | |
16 | + | then [asset, Burn(assetId, 1), StringEntry("EATH_ID", toBase58String(assetId)), IntegerEntry("EATH/WAVES", 100000), IntegerEntry("EATHHardCap", 100000000000000), IntegerEntry("Total_Issued_EATH:", 0), IntegerEntry("Total_EATH_Reserve_In_WAVES:", 0)] | |
17 | 17 | else throw("Token is Already Issued.") | |
18 | 18 | } | |
19 | 19 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let EATH_ID = fromBase58String(getStringValue(this, "EATH_ID")) | |
5 | 5 | ||
6 | - | let FeeAddress = base58'' | |
6 | + | let FeeAddress = base58'GKmJ6BchUgQfwKp4mp5eX8Y9xLioYRm6e1gDfFgdAcCr' | |
7 | 7 | ||
8 | - | let devAddress = base58'' | |
8 | + | let devAddress = base58'GKmJ6BchUgQfwKp4mp5eX8Y9xLioYRm6e1gDfFgdAcCr' | |
9 | 9 | ||
10 | 10 | @Callable(i) | |
11 | 11 | func IssueEATHToken () = { | |
12 | 12 | let asset = 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 assetId = calculateAssetId(asset) | |
14 | 14 | let checkHardCap = valueOrElse(getIntegerValue(this, "EATHHardCap"), 0) | |
15 | 15 | if ((checkHardCap == 0)) | |
16 | - | then [asset, Burn(assetId, 1), StringEntry("EATH_ID", toBase58String(assetId)), IntegerEntry("EATH/WAVES", 100000), IntegerEntry("EATHHardCap", 100000000000000)] | |
16 | + | then [asset, Burn(assetId, 1), StringEntry("EATH_ID", toBase58String(assetId)), IntegerEntry("EATH/WAVES", 100000), IntegerEntry("EATHHardCap", 100000000000000), IntegerEntry("Total_Issued_EATH:", 0), IntegerEntry("Total_EATH_Reserve_In_WAVES:", 0)] | |
17 | 17 | else throw("Token is Already Issued.") | |
18 | 18 | } | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | ||
22 | 22 | @Callable(i) | |
23 | 23 | func IssueEATH () = { | |
24 | 24 | let pmt = value(i.payments[0]) | |
25 | 25 | let currentKey = toBase58String(i.caller.bytes) | |
26 | 26 | let PricePerEATH = getIntegerValue(this, "EATH/WAVES") | |
27 | 27 | let EATHHardCap = getIntegerValue(this, "EATHHardCap") | |
28 | 28 | let NewEATHToUser = fraction(100000, pmt.amount, PricePerEATH) | |
29 | 29 | let PreviousIssuedEATH = match getIntegerValue(this, "Total_Issued_EATH:") { | |
30 | 30 | case a: Int => | |
31 | 31 | a | |
32 | 32 | case _ => | |
33 | 33 | 0 | |
34 | 34 | } | |
35 | 35 | let TotalIssuedEATH = (PreviousIssuedEATH + NewEATHToUser) | |
36 | 36 | let PreviousEATHReserveValue = match getIntegerValue(this, "Total_EATH_Reserve_In_WAVES:") { | |
37 | 37 | case a: Int => | |
38 | 38 | a | |
39 | 39 | case _ => | |
40 | 40 | 0 | |
41 | 41 | } | |
42 | 42 | let EATHReserveValue = (PreviousEATHReserveValue + pmt.amount) | |
43 | 43 | let PendingMinting = (EATHHardCap - TotalIssuedEATH) | |
44 | 44 | let PreviousEATHBackupPrice = getIntegerValue(this, "EATH_Backup_Value_In_WAVES:") | |
45 | 45 | let EATHBackupPrice = fraction(100000, EATHReserveValue, TotalIssuedEATH) | |
46 | 46 | if (isDefined(pmt.assetId)) | |
47 | 47 | then throw("Incorrect asset attached, please attach WAVES.") | |
48 | 48 | else if ((5000000 > pmt.amount)) | |
49 | 49 | then throw("Please Attach minimum 0.05 WAVES To Issue EATH Asset.") | |
50 | 50 | else if ((TotalIssuedEATH > EATHHardCap)) | |
51 | 51 | then throw((((((("EATH Minting is about to reach the Hard Cap of " + toString(EATHHardCap)) + "/10^8 EATH. Please Reduce your Minting Order by ") + toString(PendingMinting)) + " or put ") + toString((EATHHardCap - PreviousIssuedEATH))) + "/10^8")) | |
52 | 52 | else [IntegerEntry("Total_Issued_EATH:", TotalIssuedEATH), IntegerEntry("Balance_Minting_EATH:", PendingMinting), IntegerEntry("Total_EATH_Reserve_In_WAVES:", EATHReserveValue), IntegerEntry("EATH_Backup_Value_In_WAVES:", EATHBackupPrice), StringEntry("message", "<h1>EATH Issued Successfully!</h1><br>"), Reissue(EATH_ID, NewEATHToUser, true), ScriptTransfer(i.caller, ((NewEATHToUser * 990) / 1000), EATH_ID), ScriptTransfer(addressFromPublicKey(FeeAddress), ((NewEATHToUser * 9) / 1000), EATH_ID), ScriptTransfer(addressFromPublicKey(devAddress), ((NewEATHToUser * 1) / 1000), EATH_ID)] | |
53 | 53 | } | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | @Verifier(tx) | |
57 | 57 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
58 | 58 |
github/deemru/w8io/026f985 19.59 ms ◑