tx · 5bhwxXKG1sgNRVT5UTh1NV8fWmWcbdSj1EzXG5qoXVT2 3Mq6mSfCYaGQkEHMAhobtjJGvb7xj1aiSBp: -0.01000000 Waves 2024.02.22 17:20 [2987559] smart account 3Mq6mSfCYaGQkEHMAhobtjJGvb7xj1aiSBp > SELF 0.00000000 Waves
{ "type": 13, "id": "5bhwxXKG1sgNRVT5UTh1NV8fWmWcbdSj1EzXG5qoXVT2", "fee": 1000000, "feeAssetId": null, "timestamp": 1708611648106, "version": 2, "chainId": 84, "sender": "3Mq6mSfCYaGQkEHMAhobtjJGvb7xj1aiSBp", "senderPublicKey": "C5DMu2JvfbtJnPu4pyFYhyyeaYRS1RsnRnsgNFnkL55E", "proofs": [ "5MqCNzUpHqdved3QmqBNSYJZ19uTnExQ7LxEvcV5S6RfsCZahvLz9kKi7ZtvKr7kB3nD96QuCs9LqWUDJoBpYgEB" ], "script": "base64:BgIGCAISABIABAAETk9ERQkBBUFsaWFzAQIJYmVhcndhdmVzAAdFQVRIX0lECQDZBAEJARFAZXh0ck5hdGl2ZSgxMDUzKQIFBHRoaXMCB0VBVEhfSUQACkZlZUFkZHJlc3MBIOOt17LUijbWojwDE5tgFkw1Y8cwIr3jselcewpp7rwjAApkZXZBZGRyZXNzASDjrdey1Io21qI8AxObYBZMNWPHMCK947HpXHsKae68IwIBaQEOSXNzdWVFQVRIVG9rZW4ABAVhc3NldAkAwwgHAgRFQVRIAvMBRUFUSCBpcyBhIGRpZ2l0YWwgdG9rZW4gYmFja2VkIGJ5IGEgMToxIHJlc2VydmUgb2YgV2F2ZXMgdG9rZW5zLCBtZWFuaW5nIGZvciBldmVyeSBFQVRIIHRva2VuIGluIGNpcmN1bGF0aW9uLCB0aGVyZSBpcyBvbmUgV2F2ZXMgdG9rZW4gaGVsZCBpbiBzZWN1cmUgcmVzZXJ2ZS4gVGhpcyByZXNlcnZlIG1vZGVsIGFpbXMgdG8gZ3VhcmFudGVlIHRoZSBzdGFiaWxpdHkgYW5kIHRyY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dSZWlzc3VlAwUHRUFUSF9JRAUNTmV3RUFUSFRvVXNlcgYJAMwIAgUHdW5sZWFzZQkAzAgCBQ11cGRhdGVkX2xlYXNlCQDMCAIJAQtTdHJpbmdFbnRyeQICCGxlYXNlX2lkBRB1cGRhdGVkX2xlYXNlX2lkCQDMCAIJAQxJbnRlZ2VyRW50cnkCAgxsZWFzZV9hbW91bnQFFHVwZGF0ZWRfbGVhc2VfYW1vdW50CQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMIBQFpBmNhbGxlcgUJUGF5VG9Vc2VyBQdFQVRIX0lECQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMJAKcIAQUKRmVlQWRkcmVzcwUNUGF5VG9UcmVhc3VyeQUHRUFUSF9JRAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCQCnCAEFCmRldkFkZHJlc3MFCFBheVRvRGV2BQdFQVRIX0lEBQNuaWwBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5nBdC0Q==", "height": 2987559, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: dkHa9RiEXN9eCWT57HHP6VD6HQkkQWCMSyyCx3n3jdz Next: 5w5qFFFfoJFqSdygkDXopoCQ4wHQEf9kDjvvt99mTBPn Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let NODE = Alias("bearwaves") | |
5 | + | ||
4 | 6 | let EATH_ID = fromBase58String(getStringValue(this, "EATH_ID")) | |
5 | 7 | ||
6 | 8 | let FeeAddress = base58'GKmJ6BchUgQfwKp4mp5eX8Y9xLioYRm6e1gDfFgdAcCr' | |
25 | 27 | let currentKey = toBase58String(i.caller.bytes) | |
26 | 28 | let PricePerEATH = getIntegerValue(this, "EATH/WAVES") | |
27 | 29 | let EATHHardCap = getIntegerValue(this, "EATHHardCap") | |
30 | + | let CheckPreviousLeasing = valueOrElse(getInteger(this, "lease_amount"), 0) | |
28 | 31 | let NewEATHToUser = fraction(100000, pmt.amount, PricePerEATH) | |
29 | 32 | let PreviousIssuedEATH = match getIntegerValue(this, "Total_Issued_EATH:") { | |
30 | 33 | case a: Int => | |
43 | 46 | let PendingMinting = (EATHHardCap - TotalIssuedEATH) | |
44 | 47 | let PreviousEATHBackupPrice = getIntegerValue(this, "EATH_Backup_Value_In_WAVES:") | |
45 | 48 | let EATHBackupPrice = fraction(100000, EATHReserveValue, TotalIssuedEATH) | |
49 | + | let PayToUser = ((NewEATHToUser * 990) / 1000) | |
50 | + | let PayToTreasury = ((NewEATHToUser * 9) / 1000) | |
51 | + | let PayToDev = ((NewEATHToUser * 1) / 1000) | |
52 | + | let Lease_Amount = PayToUser | |
53 | + | let lease = Lease(NODE, Lease_Amount) | |
54 | + | let lease_id = toBase58String(calculateLeaseId(lease)) | |
55 | + | let unlease = LeaseCancel(fromBase58String(getStringValue(this, "lease_id"))) | |
56 | + | let updated_lease_amount = (CheckPreviousLeasing + Lease_Amount) | |
57 | + | let updated_lease = Lease(NODE, updated_lease_amount) | |
58 | + | let updated_lease_id = toBase58String(calculateLeaseId(updated_lease)) | |
46 | 59 | if (isDefined(pmt.assetId)) | |
47 | 60 | then throw("Incorrect asset attached, please attach WAVES.") | |
48 | 61 | else if ((5000000 > pmt.amount)) | |
49 | 62 | then throw("Please Attach minimum 0.05 WAVES To Issue EATH Asset.") | |
50 | 63 | else if ((TotalIssuedEATH > EATHHardCap)) | |
51 | 64 | 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 | - | 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)] | |
65 | + | else if ((CheckPreviousLeasing == 0)) | |
66 | + | then [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), lease, StringEntry("lease_id", lease_id), IntegerEntry("lease_amount", Lease_Amount), ScriptTransfer(i.caller, PayToUser, EATH_ID), ScriptTransfer(addressFromPublicKey(FeeAddress), PayToTreasury, EATH_ID), ScriptTransfer(addressFromPublicKey(devAddress), PayToDev, EATH_ID)] | |
67 | + | 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), unlease, updated_lease, StringEntry("lease_id", updated_lease_id), IntegerEntry("lease_amount", updated_lease_amount), ScriptTransfer(i.caller, PayToUser, EATH_ID), ScriptTransfer(addressFromPublicKey(FeeAddress), PayToTreasury, EATH_ID), ScriptTransfer(addressFromPublicKey(devAddress), PayToDev, EATH_ID)] | |
53 | 68 | } | |
54 | 69 | ||
55 | 70 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let NODE = Alias("bearwaves") | |
5 | + | ||
4 | 6 | let EATH_ID = fromBase58String(getStringValue(this, "EATH_ID")) | |
5 | 7 | ||
6 | 8 | let FeeAddress = base58'GKmJ6BchUgQfwKp4mp5eX8Y9xLioYRm6e1gDfFgdAcCr' | |
7 | 9 | ||
8 | 10 | let devAddress = base58'GKmJ6BchUgQfwKp4mp5eX8Y9xLioYRm6e1gDfFgdAcCr' | |
9 | 11 | ||
10 | 12 | @Callable(i) | |
11 | 13 | func IssueEATHToken () = { | |
12 | 14 | 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 | 15 | let assetId = calculateAssetId(asset) | |
14 | 16 | let checkHardCap = valueOrElse(getIntegerValue(this, "EATHHardCap"), 0) | |
15 | 17 | if ((checkHardCap == 0)) | |
16 | 18 | 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 | 19 | else throw("Token is Already Issued.") | |
18 | 20 | } | |
19 | 21 | ||
20 | 22 | ||
21 | 23 | ||
22 | 24 | @Callable(i) | |
23 | 25 | func IssueEATH () = { | |
24 | 26 | let pmt = value(i.payments[0]) | |
25 | 27 | let currentKey = toBase58String(i.caller.bytes) | |
26 | 28 | let PricePerEATH = getIntegerValue(this, "EATH/WAVES") | |
27 | 29 | let EATHHardCap = getIntegerValue(this, "EATHHardCap") | |
30 | + | let CheckPreviousLeasing = valueOrElse(getInteger(this, "lease_amount"), 0) | |
28 | 31 | let NewEATHToUser = fraction(100000, pmt.amount, PricePerEATH) | |
29 | 32 | let PreviousIssuedEATH = match getIntegerValue(this, "Total_Issued_EATH:") { | |
30 | 33 | case a: Int => | |
31 | 34 | a | |
32 | 35 | case _ => | |
33 | 36 | 0 | |
34 | 37 | } | |
35 | 38 | let TotalIssuedEATH = (PreviousIssuedEATH + NewEATHToUser) | |
36 | 39 | let PreviousEATHReserveValue = match getIntegerValue(this, "Total_EATH_Reserve_In_WAVES:") { | |
37 | 40 | case a: Int => | |
38 | 41 | a | |
39 | 42 | case _ => | |
40 | 43 | 0 | |
41 | 44 | } | |
42 | 45 | let EATHReserveValue = (PreviousEATHReserveValue + pmt.amount) | |
43 | 46 | let PendingMinting = (EATHHardCap - TotalIssuedEATH) | |
44 | 47 | let PreviousEATHBackupPrice = getIntegerValue(this, "EATH_Backup_Value_In_WAVES:") | |
45 | 48 | let EATHBackupPrice = fraction(100000, EATHReserveValue, TotalIssuedEATH) | |
49 | + | let PayToUser = ((NewEATHToUser * 990) / 1000) | |
50 | + | let PayToTreasury = ((NewEATHToUser * 9) / 1000) | |
51 | + | let PayToDev = ((NewEATHToUser * 1) / 1000) | |
52 | + | let Lease_Amount = PayToUser | |
53 | + | let lease = Lease(NODE, Lease_Amount) | |
54 | + | let lease_id = toBase58String(calculateLeaseId(lease)) | |
55 | + | let unlease = LeaseCancel(fromBase58String(getStringValue(this, "lease_id"))) | |
56 | + | let updated_lease_amount = (CheckPreviousLeasing + Lease_Amount) | |
57 | + | let updated_lease = Lease(NODE, updated_lease_amount) | |
58 | + | let updated_lease_id = toBase58String(calculateLeaseId(updated_lease)) | |
46 | 59 | if (isDefined(pmt.assetId)) | |
47 | 60 | then throw("Incorrect asset attached, please attach WAVES.") | |
48 | 61 | else if ((5000000 > pmt.amount)) | |
49 | 62 | then throw("Please Attach minimum 0.05 WAVES To Issue EATH Asset.") | |
50 | 63 | else if ((TotalIssuedEATH > EATHHardCap)) | |
51 | 64 | 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 | - | 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)] | |
65 | + | else if ((CheckPreviousLeasing == 0)) | |
66 | + | then [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), lease, StringEntry("lease_id", lease_id), IntegerEntry("lease_amount", Lease_Amount), ScriptTransfer(i.caller, PayToUser, EATH_ID), ScriptTransfer(addressFromPublicKey(FeeAddress), PayToTreasury, EATH_ID), ScriptTransfer(addressFromPublicKey(devAddress), PayToDev, EATH_ID)] | |
67 | + | 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), unlease, updated_lease, StringEntry("lease_id", updated_lease_id), IntegerEntry("lease_amount", updated_lease_amount), ScriptTransfer(i.caller, PayToUser, EATH_ID), ScriptTransfer(addressFromPublicKey(FeeAddress), PayToTreasury, EATH_ID), ScriptTransfer(addressFromPublicKey(devAddress), PayToDev, EATH_ID)] | |
53 | 68 | } | |
54 | 69 | ||
55 | 70 | ||
56 | 71 | @Verifier(tx) | |
57 | 72 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
58 | 73 |
github/deemru/w8io/026f985 37.68 ms ◑