tx · C8pTU5ToujsuEratAAbT5NQc6qFiHByYGyWg7nc42KUk

3NAxi4ijrbVmR2AVeKTeJ1L3P4ebbXk7YDY:  -0.01400000 Waves

2021.12.16 13:46 [1836710] smart account 3NAxi4ijrbVmR2AVeKTeJ1L3P4ebbXk7YDY > SELF 0.00000000 Waves

{ "type": 13, "id": "C8pTU5ToujsuEratAAbT5NQc6qFiHByYGyWg7nc42KUk", "fee": 1400000, "feeAssetId": null, "timestamp": 1639651641536, "version": 2, "chainId": 84, "sender": "3NAxi4ijrbVmR2AVeKTeJ1L3P4ebbXk7YDY", "senderPublicKey": "6w6geQvkvMqffnrYsamvmS9TjKjjePjFPWLY9qDbNddX", "proofs": [ "Xc1ApLoCz8sEX7iavEKnatsGaeRm7iKVWb9NJwTtAsGKgCp8nRuECXzPKBTAt43VxuGkrKa9SUeh1ADoA1LZinT" ], "script": "base64:AAIEAAAAAAAAAAYIAhIAEgAAAAACAAAAAAtmc1ROQXNzZXRJRAEAAAAgnvVzUNkaAZFSSO4nPxeRoS4zrUxu6jad0qWebNIZFHoAAAAAE0lzc3VlZnNUTkZlZUFkZHJlc3MJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEBAAAAIOOt17LUijbWojwDE5tgFkw1Y8cwIr3jselcewpp7rwjAAAAAgAAAAFpAQAAAAlJc3N1ZWZzVE4AAAAABAAAAANwbXQJAQAAAAV2YWx1ZQAAAAEJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAMUHJpY2VQZXJmc1ROCQEAAAARQGV4dHJOYXRpdmUoMTA1MCkAAAACBQAAAAR0aGlzAgAAAAdmc1ROL1ROBAAAAA1OZXdmc1ROVG9Vc2VyCQAAawAAAAMAAAAAAAABhqAIBQAAAANwbXQAAAAGYW1vdW50BQAAAAxQcmljZVBlcmZzVE4EAAAAElByZ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AAAAGVRvdGFsX2ZzVE5fUmVzZXJ2ZV9Jbl9UTjoFAAAAEGZzVE5SZXNlcnZlVmFsdWUJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAGGZzVE5fQmFja3VwX1ZhbHVlX0luX1ROOgUAAAAPZnNUTkJhY2t1cFByaWNlCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAICAAAAB21lc3NhZ2UCAAAAKjxoMT5mc1ROIExpcXVpZGF0ZWQgU3VjY2Vzc2Z1bGx5ITwvaDE+PGJyPgkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAAEmNhbGN1bGF0ZWJ1cm52YWx1ZQUAAAAEdW5pdAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5io0Mpg==", "height": 1836710, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: B1J7Dk6mbWUc9xCs7L8MKbojn9ENSuUtiwMffBmiocpU Next: ER9trjjaDpwAgmmEcsKbxF8f5d9twbVGVrdzETZ2HCS9 Diff:
OldNewDifferences
1717 let fsTNReserveValue = (PreviousfsTNReserveValue + pmt.amount)
1818 let PreviousfsTNBackupPrice = getIntegerValue(this, "fsTN_Backup_Value_In_TN:")
1919 let fsTNBackupPrice = fraction(100000, fsTNReserveValue, TotalIssuedfsTN)
20- let FeePercentage = 1
21- let BalanceTokensReturnedToUser = (100 - FeePercentage)
20+ let FeesCharged = 100000000
2221 if (isDefined(pmt.assetId))
2322 then throw("Incorrect asset attached, please attach TN.")
24- else if ((5000000 > pmt.amount))
25- then throw("Please Attach minimum 0.05 TN To Issue fsTN Asset.")
26- else [IntegerEntry("Total_Issued_fsTN:", TotalIssuedfsTN), IntegerEntry("Total_fsTN_Reserve_In_TN:", fsTNReserveValue), IntegerEntry("fsTN_Backup_Value_In_TN:", fsTNBackupPrice), StringEntry("message", "<h1>fsTN Issued Successfully!</h1><br>"), Reissue(fsTNAssetID, NewfsTNToUser, true), ScriptTransfer(i.caller, ((NewfsTNToUser * BalanceTokensReturnedToUser) / 100), fsTNAssetID), ScriptTransfer(IssuefsTNFeeAddress, ((NewfsTNToUser * FeePercentage) / 100), fsTNAssetID)]
23+ else if ((200000000 > pmt.amount))
24+ then throw("Please Attach minimum 2 TN To Issue fsTN Asset.")
25+ else [IntegerEntry("Total_Issued_fsTN:", TotalIssuedfsTN), IntegerEntry("Total_fsTN_Reserve_In_TN:", fsTNReserveValue), IntegerEntry("fsTN_Backup_Value_In_TN:", fsTNBackupPrice), StringEntry("message", "<h1>fsTN Issued Successfully!</h1><br>"), Reissue(fsTNAssetID, NewfsTNToUser, true), ScriptTransfer(i.caller, (NewfsTNToUser - FeesCharged), fsTNAssetID), ScriptTransfer(IssuefsTNFeeAddress, FeesCharged, fsTNAssetID)]
2726 }
2827
2928
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let fsTNAssetID = base58'BhWVeP6JGPGvzHtLa4r6Hypuyx4kKyPXC6sFnW3gzNhX'
55
66 let IssuefsTNFeeAddress = addressFromPublicKey(base58'GKmJ6BchUgQfwKp4mp5eX8Y9xLioYRm6e1gDfFgdAcCr')
77
88 @Callable(i)
99 func IssuefsTN () = {
1010 let pmt = value(i.payments[0])
1111 let currentKey = toBase58String(i.caller.bytes)
1212 let PricePerfsTN = getIntegerValue(this, "fsTN/TN")
1313 let NewfsTNToUser = fraction(100000, pmt.amount, PricePerfsTN)
1414 let PreviousIssuedfsTN = getIntegerValue(this, "Total_Issued_fsTN:")
1515 let TotalIssuedfsTN = (PreviousIssuedfsTN + NewfsTNToUser)
1616 let PreviousfsTNReserveValue = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:")
1717 let fsTNReserveValue = (PreviousfsTNReserveValue + pmt.amount)
1818 let PreviousfsTNBackupPrice = getIntegerValue(this, "fsTN_Backup_Value_In_TN:")
1919 let fsTNBackupPrice = fraction(100000, fsTNReserveValue, TotalIssuedfsTN)
20- let FeePercentage = 1
21- let BalanceTokensReturnedToUser = (100 - FeePercentage)
20+ let FeesCharged = 100000000
2221 if (isDefined(pmt.assetId))
2322 then throw("Incorrect asset attached, please attach TN.")
24- else if ((5000000 > pmt.amount))
25- then throw("Please Attach minimum 0.05 TN To Issue fsTN Asset.")
26- else [IntegerEntry("Total_Issued_fsTN:", TotalIssuedfsTN), IntegerEntry("Total_fsTN_Reserve_In_TN:", fsTNReserveValue), IntegerEntry("fsTN_Backup_Value_In_TN:", fsTNBackupPrice), StringEntry("message", "<h1>fsTN Issued Successfully!</h1><br>"), Reissue(fsTNAssetID, NewfsTNToUser, true), ScriptTransfer(i.caller, ((NewfsTNToUser * BalanceTokensReturnedToUser) / 100), fsTNAssetID), ScriptTransfer(IssuefsTNFeeAddress, ((NewfsTNToUser * FeePercentage) / 100), fsTNAssetID)]
23+ else if ((200000000 > pmt.amount))
24+ then throw("Please Attach minimum 2 TN To Issue fsTN Asset.")
25+ else [IntegerEntry("Total_Issued_fsTN:", TotalIssuedfsTN), IntegerEntry("Total_fsTN_Reserve_In_TN:", fsTNReserveValue), IntegerEntry("fsTN_Backup_Value_In_TN:", fsTNBackupPrice), StringEntry("message", "<h1>fsTN Issued Successfully!</h1><br>"), Reissue(fsTNAssetID, NewfsTNToUser, true), ScriptTransfer(i.caller, (NewfsTNToUser - FeesCharged), fsTNAssetID), ScriptTransfer(IssuefsTNFeeAddress, FeesCharged, fsTNAssetID)]
2726 }
2827
2928
3029
3130 @Callable(i)
3231 func Liquidate () = {
3332 let currentKey = toBase58String(i.callerPublicKey)
3433 let pmt = value(i.payments[0])
3534 let PreviousIssuedfsTN = getIntegerValue(this, "Total_Issued_fsTN:")
3635 let TotalIssuedfsTN = (PreviousIssuedfsTN - pmt.amount)
3736 let PreviousfsTNReserveValue = getIntegerValue(this, "Total_fsTN_Reserve_In_TN:")
3837 let PreviousfsTNBackupPrice = getIntegerValue(this, "fsTN_Backup_Value_In_TN:")
3938 let calculateburnvalue = fraction(PreviousfsTNBackupPrice, pmt.amount, 100000)
4039 let fsTNReserveValue = (PreviousfsTNReserveValue - calculateburnvalue)
4140 let fsTNBackupPrice = fraction(100000, fsTNReserveValue, TotalIssuedfsTN)
4241 if ((pmt.assetId != fsTNAssetID))
4342 then throw((("Kindly Deposit Only " + toBase58String(fsTNAssetID)) + " (fsTN)."))
4443 else if ((100000 > pmt.amount))
4544 then throw("Attach Amount must be greater than 0.001 fsTN.")
4645 else [Burn(fsTNAssetID, pmt.amount), IntegerEntry("Total_Issued_fsTN:", TotalIssuedfsTN), IntegerEntry("Total_fsTN_Reserve_In_TN:", fsTNReserveValue), IntegerEntry("fsTN_Backup_Value_In_TN:", fsTNBackupPrice), StringEntry("message", "<h1>fsTN Liquidated Successfully!</h1><br>"), ScriptTransfer(i.caller, calculateburnvalue, unit)]
4746 }
4847
4948
5049 @Verifier(tx)
5150 func verify () = match tx {
5251 case _ =>
5352 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
5453 }
5554

github/deemru/w8io/026f985 
24.55 ms