tx · GYxprQkCtnt6HXvrVJ62Fq8u6YasB3zZ7zeyzrEWhMbC

3N5K25SCwgJw2hE5LGqAZALL8W6eJxu1MG4:  -0.01000000 Waves

2024.08.06 13:51 [3226837] smart account 3N5K25SCwgJw2hE5LGqAZALL8W6eJxu1MG4 > SELF 0.00000000 Waves

{ "type": 13, "id": "GYxprQkCtnt6HXvrVJ62Fq8u6YasB3zZ7zeyzrEWhMbC", "fee": 1000000, "feeAssetId": null, "timestamp": 1722941465195, "version": 2, "chainId": 84, "sender": "3N5K25SCwgJw2hE5LGqAZALL8W6eJxu1MG4", "senderPublicKey": "9Qh79U2rQpgqYmAMC6n9qq852WD1SgccXuMoUG33MMt6", "proofs": [ "4gnrjW6MVbKkLuTmDzT4DUNuzMQd9ok1UqE2PPyi4P6PA1dk5WyPmBEadjhssKQHVnFriqeGoDPbhvJmy1EwE6QJ" ], "script": "base64:BgIECAISAAEACFRyZWFzdXJ5CQCnCAEBIC/MI9BPmHcpgjiz5B78lMslen9dOa5R2YaEtWjFpqZ7AQFpAQpJc3N1ZV9TV1JNAAQFYXNzZXQJAMIIBQIEU1dSTQKHA1NXUk0gaXMgYSBkZWNlbnRyYWxpemVkIGFwcHJvYWNoIHRvIGJ1aWxkaW5nIGFuZCB1dGlsaXppbmcgdGhlIFJlZGRjb2luIEJsb2NrY2hhaW4gVGVjaG5vbG9neSB3aGVyZSBTV1JNIHdvcmtzIG9uIGEgcmVzZXJ2ZSBzeXN0ZW0gb2YgUkREIGFzIGxheWVyIHNvbHV0aW9uIG9uIFJERCBOZXR3b3JrIHRvIG1pbnQgYW5kIEJ1cm4gU1dSTSBvbiBib3RoIHNpZGUgYXMgYSBwcm9vZi4gQW4gaW5kZXBlbmRlbnQgcHJvamVjdCBvciBUb2tlbiBoYXZpbmcgbm8gZGlyZWN0IHBhcnRuZXJzaGlwIHJlbGF0aW9uIG9yIGRldmVsb3BtZW50IGNvbm5lY3Rpb24gd2l0aCBSZWRkY29pbiBDb3JlIFRlYW0gb3V0c2lkZSB0aGUgdXNlIG9mIHRoZSBSREQgY3VycmVuY3kgZm9yIHRyYW5zYWN0aW9ucy4AAQAGBgQHYXNzZXRJZAkAuAgBBQVhc3NldAMJAQIhPQIIBQFpBmNhbGxlcgUIVHJlYXN1cnkJAAIBCQCsAgIJAKwCAgIlVGhpcyBBZGRyZXNzIGlzIG5vdCBBdXRob3JpemVkLiBPbmx5IAkApQgBBQhUcmVhc3VyeQIiIGlzIEF1dGhvcml6ZWQgQWRkcmVzcyB0byBTaWduIGl0LgkAzAgCBQVhc3NldAkAzAgCCQEEQnVybgIFB2Fzc2V0SWQAAQkAzAgCCQELU3RyaW5nRW50cnkCAg1TV1JNX0Fzc2V0X0lECQDYBAEFB2Fzc2V0SWQFA25pbAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXmB+ryX", "height": 3226837, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9oWXv9LjudhcL6KVSNsU2oxBoHviFz4bhLRGjKB4dunZ Next: 8CZn8e4r8gqwR1V1CxDX6to8rHHpZ1PiowXLubjbuzbu Full:
OldNewDifferences
1-{-# STDLIB_VERSION 5 #-}
1+{-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let A4AAssetID = base58'8hdsVCxPBVEmVUZyyX8Sd98Z9hU7Fny26W96sjKiTw8g'
5-
6-let USDCAssetID = base58'5bXgvADuVoFdhtF5uKZAEiVdAo7ZCWw151L4yyf1PiES'
7-
8-let WAVESAssetID = base58'EzwaF58ssALcUCZ9FbyeD1GTSteoZAQZEDTqBAXHfq8y'
9-
10-let CODEAssetID = base58'EB4CUQH4fHzzQt9YjcHtA6T7uosHNH9RnQKHgBdZHPCB'
11-
12-let FeeAddress = base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR'
13-
14-let devAddress = base58'8d4zGuTjT3h67Z4DatzMXdXXW1GvoQhMTjwCGFxJuene'
15-
16-let adminPubKey1 = base58'J3cAptAPQxVqpEz6Rch57JeKpbns48s1a6HoeQG9aX4J'
17-
18-let adminPubKey2 = base58'8d4zGuTjT3h67Z4DatzMXdXXW1GvoQhMTjwCGFxJuene'
19-
20-let adminPubKey3 = base58'3EeUjFz9BEjsqDnCjw5UeuZsjBTuKBQmbCiAw53phxrR'
4+let Treasury = addressFromPublicKey(base58'4Dahqn4MYNrieo9AX8qLWNCseBQNc9skQY81h4DFoote')
215
226 @Callable(i)
23-func Liquidate () = {
24- let currentKey = toBase58String(i.callerPublicKey)
25- let pmt = value(i.payments[0])
26- let PreviousIssuedA4A = getIntegerValue(this, "Total_Issued_A4A:")
27- let PreviousBurnedA4A = getIntegerValue(this, "Total_Burned_A4A:")
28- let TotalIssuedA4A = (PreviousIssuedA4A - pmt.amount)
29- let TotalBurnedA4A = (PreviousBurnedA4A + pmt.amount)
30- let PreviousA4AReserveValue = getIntegerValue(this, "Total_A4A_Reserve_In_TN:")
31- let PreviousA4ABackupPrice = getIntegerValue(this, "A4A_Backup_Value_In_TN:")
32- let calculateburnvalue = fraction(PreviousA4ABackupPrice, pmt.amount, 100000)
33- let A4AReserveValue = (PreviousA4AReserveValue - calculateburnvalue)
34- let A4ABackupPrice = fraction(100000, A4AReserveValue, TotalIssuedA4A)
35- if ((pmt.assetId != A4AAssetID))
36- then throw("Kindly Deposit Only 8hdsVCxPBVEmVUZyyX8Sd98Z9hU7Fny26W96sjKiTw8g (A4A).")
37- else if ((100000 > pmt.amount))
38- then throw("Attach Amount must be greater than 0.001 A4A.")
39- else [Burn(A4AAssetID, pmt.amount), IntegerEntry("Total_Issued_A4A:", TotalIssuedA4A), IntegerEntry("Total_Burned_A4A:", TotalBurnedA4A), IntegerEntry("Total_A4A_Reserve_In_TN:", A4AReserveValue), IntegerEntry("A4A_Backup_Value_In_TN:", A4ABackupPrice), StringEntry("message", "<h1>A4A Liquidated Successfully!</h1><br>"), ScriptTransfer(i.caller, ((calculateburnvalue * 990) / 1000), unit), ScriptTransfer(addressFromPublicKey(FeeAddress), ((calculateburnvalue * 9) / 1000), unit), ScriptTransfer(addressFromPublicKey(devAddress), ((calculateburnvalue * 1) / 1000), unit)]
7+func Issue_SWRM () = {
8+ let asset = Issue("SWRM", "SWRM is a decentralized approach to building and utilizing the Reddcoin Blockchain Technology where SWRM works on a reserve system of RDD as layer solution on RDD Network to mint and Burn SWRM on both side as a proof. An independent project or Token having no direct partnership relation or development connection with Reddcoin Core Team outside the use of the RDD currency for transactions.", 1, 6, true)
9+ let assetId = calculateAssetId(asset)
10+ if ((i.caller != Treasury))
11+ then throw((("This Address is not Authorized. Only " + toString(Treasury)) + " is Authorized Address to Sign it."))
12+ else [asset, Burn(assetId, 1), StringEntry("SWRM_Asset_ID", toBase58String(assetId))]
4013 }
4114
4215
43-
44-@Callable(i)
45-func Withdraw () = {
46- let currentKey = toBase58String(i.caller.bytes)
47- let checkdepositvalue = getIntegerValue(this, ("Deposit_Amount_Of_" + currentKey))
48- let checkstakedvalue = getIntegerValue(this, "Staked_Amount")
49- let d6 = 1000000
50- let user_share = fraction(checkdepositvalue, d6, checkstakedvalue)
51- let newstakedvalue = (checkstakedvalue - checkdepositvalue)
52- let check90Dgap = (getIntegerValue(this, ("Total_Lock_Blocks_Of_" + currentKey)) - getIntegerValue(this, ("Deposit_height_Of_" + currentKey)))
53- let Previous_USDC_Claimed = match getInteger(this, "Total_USDC_Claimed:") {
54- case a: Int =>
55- a
56- case _ =>
57- 0
58- }
59- let totalrewardclaimed = (Previous_USDC_Claimed + getIntegerValue(this, ("Rewards_Of_" + currentKey)))
60- if ((getIntegerValue(this, ("Total_Lock_Blocks_Of_" + currentKey)) > height))
61- then throw((((("Your " + toString(getIntegerValue(this, ("Deposit_Amount_Of_" + currentKey)))) + " A4A are Under Lock. Consider last 8 digits as value after Decimals. Token will be Unlocked after ") + toString((getIntegerValue(this, ("Total_Lock_Blocks_Of_" + currentKey)) - height))) + " blocks."))
62- else if ((checkdepositvalue == 0))
63- then throw("You Have Already Withdraw your Amount.")
64- else if (if ((1200000000000 > checkdepositvalue))
65- then (check90Dgap == 129600)
66- else false)
67- then [ScriptTransfer(i.caller, getIntegerValue(this, ("Deposit_Amount_Of_" + currentKey)), A4AAssetID), ScriptTransfer(i.caller, fraction(assetBalance(this, USDCAssetID), user_share, d6), USDCAssetID), ScriptTransfer(i.caller, fraction(assetBalance(this, WAVESAssetID), user_share, d6), WAVESAssetID), ScriptTransfer(i.caller, ((checkdepositvalue * 3) / 1000), CODEAssetID), StringEntry(("Tier_Of_" + currentKey), "NONE"), IntegerEntry(("Deposit_height_Of_" + currentKey), 0), IntegerEntry("Staked_Amount", newstakedvalue), IntegerEntry(("Deposit_Amount_Of_" + currentKey), 0), IntegerEntry(("Total_Lock_Blocks_Of_" + currentKey), 0), StringEntry(("Lock_Status_Of_" + currentKey), "UNLOCK"), IntegerEntry(("Rewards_Of_" + currentKey), 0), IntegerEntry("Total_USDC_Claimed:", totalrewardclaimed)]
68- else if (if ((checkdepositvalue >= 1200000000000))
69- then (check90Dgap == 129600)
70- else false)
71- then [ScriptTransfer(i.caller, getIntegerValue(this, ("Deposit_Amount_Of_" + currentKey)), A4AAssetID), ScriptTransfer(i.caller, fraction(assetBalance(this, USDCAssetID), user_share, d6), USDCAssetID), ScriptTransfer(i.caller, fraction(assetBalance(this, WAVESAssetID), user_share, d6), WAVESAssetID), ScriptTransfer(i.caller, ((1200000000000 * 3) / 1000), CODEAssetID), StringEntry(("Tier_Of_" + currentKey), "NONE"), IntegerEntry(("Deposit_height_Of_" + currentKey), 0), IntegerEntry("Staked_Amount", newstakedvalue), IntegerEntry(("Deposit_Amount_Of_" + currentKey), 0), IntegerEntry(("Total_Lock_Blocks_Of_" + currentKey), 0), StringEntry(("Lock_Status_Of_" + currentKey), "UNLOCK"), IntegerEntry(("Rewards_Of_" + currentKey), 0), IntegerEntry("Total_USDC_Claimed:", totalrewardclaimed)]
72- else [ScriptTransfer(i.caller, getIntegerValue(this, ("Deposit_Amount_Of_" + currentKey)), A4AAssetID), ScriptTransfer(i.caller, fraction(assetBalance(this, USDCAssetID), user_share, d6), USDCAssetID), ScriptTransfer(i.caller, fraction(assetBalance(this, WAVESAssetID), user_share, d6), WAVESAssetID), StringEntry(("Tier_Of_" + currentKey), "NONE"), IntegerEntry(("Deposit_height_Of_" + currentKey), 0), IntegerEntry("Staked_Amount", newstakedvalue), IntegerEntry(("Deposit_Amount_Of_" + currentKey), 0), IntegerEntry(("Total_Lock_Blocks_Of_" + currentKey), 0), StringEntry(("Lock_Status_Of_" + currentKey), "UNLOCK"), IntegerEntry(("Rewards_Of_" + currentKey), 0), IntegerEntry("Total_USDC_Claimed:", totalrewardclaimed)]
73- }
74-
16+@Verifier(tx)
17+func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
7518

github/deemru/w8io/026f985 
23.68 ms