tx · DPvgSzfCShv6xop9XBz7Jqxk5QXBvskfdGEWnFWtAgTZ

3Mq6mSfCYaGQkEHMAhobtjJGvb7xj1aiSBp:  -0.01000000 Waves

2024.02.22 16:08 [2987486] smart account 3Mq6mSfCYaGQkEHMAhobtjJGvb7xj1aiSBp > SELF 0.00000000 Waves

{ "type": 13, "id": "DPvgSzfCShv6xop9XBz7Jqxk5QXBvskfdGEWnFWtAgTZ", "fee": 1000000, "feeAssetId": null, "timestamp": 1708607402860, "version": 2, "chainId": 84, "sender": "3Mq6mSfCYaGQkEHMAhobtjJGvb7xj1aiSBp", "senderPublicKey": "C5DMu2JvfbtJnPu4pyFYhyyeaYRS1RsnRnsgNFnkL55E", "proofs": [ "2xzS5sXcRFiFYjkEpqVatpDcuqTGN8RVFQaev9JFJ4dyu27hibGostfQCRVJQkSws49TULTuNe9U3NMgz6DLg3fb" ], "script": "base64:BgIGCAISABIAAwAHRUFUSF9JRAkA2QQBCQERQGV4dHJOYXRpdmUoMTA1MykCBQR0aGlzAgdFQVRIX0lEAApGZWVBZGRyZXNzAQAACmRldkFkZHJlc3MBAAIBaQEOSXNzdWVFQVRIVG9rZW4ABAVhc3NldAkAwwgHAgRFQVRIAvMBRUFUSCBpcyBhIGRpZ2l0YWwgdG9rZW4gYmFja2VkIGJ5IGEgMToxIHJlc2VydmUgb2YgV2F2ZXMgdG9rZW5zLCBtZWFuaW5nIGZvciBldmVyeSBFQVRIIHRva2VuIGluIGNpcmN1bGF0aW9uLCB0aGVyZSBpcyBvbmUgV2F2ZXMgdG9rZW4gaGVsZCBpbiBzZWN1cmUgcmVzZXJ2ZS4gVGhpcyByZXNlcnZlIG1vZGVsIGFpbXMgdG8gZ3VhcmFudGVlIHRoZSBzdGFiaWxpdHkgYW5kIHRyYW5zcGFyZW5jeSBvZiBFQVRIJ3MgdmFsdWUuAAEACAYFBHVuaXQAAAQHYXNzZXRJZAkAuAgBBQVhc3NldAQMY2hlY2tIYXJkQ2FwCQELdmFsdWVPckVs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0VBVEhfQmFja3VwX1ZhbHVlX0luX1dBVkVTOgUPRUFUSEJhY2t1cFByaWNlCQDMCAIJAQtTdHJpbmdFbnRyeQICB21lc3NhZ2UCJjxoMT5FQVRIIElzc3VlZCBTdWNjZXNzZnVsbHkhPC9oMT48YnI+CQDMCAIJAQdSZWlzc3VlAwUHRUFUSF9JRAUNTmV3RUFUSFRvVXNlcgYJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwgFAWkGY2FsbGVyCQBpAgkAaAIFDU5ld0VBVEhUb1VzZXIA3gcA6AcFB0VBVEhfSUQJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwkApwgBBQpGZWVBZGRyZXNzCQBpAgkAaAIFDU5ld0VBVEhUb1VzZXIACQDoBwUHRUFUSF9JRAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCQCnCAEFCmRldkFkZHJlc3MJAGkCCQBoAgUNTmV3RUFUSFRvVXNlcgABAOgHBQdFQVRIX0lEBQNuaWwBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V59ja4PA==", "height": 2987486, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 45GC5VWTCDFpw1wLXy3ucN4JUae7kYqoZyPXVaoVDMmo Next: bB5ChiEUfmPxumG5H1dnuQBt4cYnPSd4mVJtELzxZ6n Diff:
OldNewDifferences
1-{-# STDLIB_VERSION 5 #-}
1+{-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let EATH_ID = fromBase58String(getStringValue(this, "EATH_ID"))
5+
6+let FeeAddress = base58''
7+
8+let devAddress = base58''
9+
10+@Callable(i)
11+func IssueEATHToken () = {
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+ let assetId = calculateAssetId(asset)
14+ let checkHardCap = valueOrElse(getIntegerValue(this, "EATHHardCap"), 0)
15+ if ((checkHardCap == 0))
16+ then [asset, Burn(assetId, 1), StringEntry("EATH_ID", toBase58String(assetId)), IntegerEntry("EATH/WAVES", 100000), IntegerEntry("EATHHardCap", 100000000000000)]
17+ else throw("Token is Already Issued.")
18+ }
19+
420
521
622 @Callable(i)
723 func IssueEATH () = {
8- 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)
9- let assetId = calculateAssetId(asset)
10-[asset, Burn(assetId, 1), StringEntry("EATH_ID", toBase58String(assetId)), IntegerEntry("EATH/WAVES", 100000), IntegerEntry("EATHHardCap", 100000000000000)]
24+ let pmt = value(i.payments[0])
25+ let currentKey = toBase58String(i.caller.bytes)
26+ let PricePerEATH = getIntegerValue(this, "EATH/WAVES")
27+ let EATHHardCap = getIntegerValue(this, "EATHHardCap")
28+ let NewEATHToUser = fraction(100000, pmt.amount, PricePerEATH)
29+ let PreviousIssuedEATH = getIntegerValue(this, "Total_Issued_EATH:")
30+ let TotalIssuedEATH = (PreviousIssuedEATH + NewEATHToUser)
31+ let PendingMinting = (EATHHardCap - TotalIssuedEATH)
32+ let PreviousEATHReserveValue = getIntegerValue(this, "Total_EATH_Reserve_In_WAVES:")
33+ let EATHReserveValue = (PreviousEATHReserveValue + pmt.amount)
34+ let PreviousEATHBackupPrice = getIntegerValue(this, "EATH_Backup_Value_In_WAVES:")
35+ let EATHBackupPrice = fraction(100000, EATHReserveValue, TotalIssuedEATH)
36+ if (isDefined(pmt.assetId))
37+ then throw("Incorrect asset attached, please attach WAVES.")
38+ else if ((5000000 > pmt.amount))
39+ then throw("Please Attach minimum 0.05 WAVES To Issue EATH Asset.")
40+ else if ((TotalIssuedEATH > EATHHardCap))
41+ 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"))
42+ 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)]
1143 }
1244
1345
Full:
OldNewDifferences
1-{-# STDLIB_VERSION 5 #-}
1+{-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let EATH_ID = fromBase58String(getStringValue(this, "EATH_ID"))
5+
6+let FeeAddress = base58''
7+
8+let devAddress = base58''
9+
10+@Callable(i)
11+func IssueEATHToken () = {
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+ let assetId = calculateAssetId(asset)
14+ let checkHardCap = valueOrElse(getIntegerValue(this, "EATHHardCap"), 0)
15+ if ((checkHardCap == 0))
16+ then [asset, Burn(assetId, 1), StringEntry("EATH_ID", toBase58String(assetId)), IntegerEntry("EATH/WAVES", 100000), IntegerEntry("EATHHardCap", 100000000000000)]
17+ else throw("Token is Already Issued.")
18+ }
19+
420
521
622 @Callable(i)
723 func IssueEATH () = {
8- 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)
9- let assetId = calculateAssetId(asset)
10-[asset, Burn(assetId, 1), StringEntry("EATH_ID", toBase58String(assetId)), IntegerEntry("EATH/WAVES", 100000), IntegerEntry("EATHHardCap", 100000000000000)]
24+ let pmt = value(i.payments[0])
25+ let currentKey = toBase58String(i.caller.bytes)
26+ let PricePerEATH = getIntegerValue(this, "EATH/WAVES")
27+ let EATHHardCap = getIntegerValue(this, "EATHHardCap")
28+ let NewEATHToUser = fraction(100000, pmt.amount, PricePerEATH)
29+ let PreviousIssuedEATH = getIntegerValue(this, "Total_Issued_EATH:")
30+ let TotalIssuedEATH = (PreviousIssuedEATH + NewEATHToUser)
31+ let PendingMinting = (EATHHardCap - TotalIssuedEATH)
32+ let PreviousEATHReserveValue = getIntegerValue(this, "Total_EATH_Reserve_In_WAVES:")
33+ let EATHReserveValue = (PreviousEATHReserveValue + pmt.amount)
34+ let PreviousEATHBackupPrice = getIntegerValue(this, "EATH_Backup_Value_In_WAVES:")
35+ let EATHBackupPrice = fraction(100000, EATHReserveValue, TotalIssuedEATH)
36+ if (isDefined(pmt.assetId))
37+ then throw("Incorrect asset attached, please attach WAVES.")
38+ else if ((5000000 > pmt.amount))
39+ then throw("Please Attach minimum 0.05 WAVES To Issue EATH Asset.")
40+ else if ((TotalIssuedEATH > EATHHardCap))
41+ 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"))
42+ 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)]
1143 }
1244
1345
1446 @Verifier(tx)
1547 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
1648

github/deemru/w8io/026f985 
20.46 ms