tx · 3kCgctn8UTQtPQPzqTq415tFqZjJFrHGjwRY4TcwnaDj

3N7KPSUwpMgvDEVGw1DYBnKDiixSQUXhn2P:  -0.01000000 Waves

2023.05.30 20:35 [2601018] smart account 3N7KPSUwpMgvDEVGw1DYBnKDiixSQUXhn2P > SELF 0.00000000 Waves

{ "type": 13, "id": "3kCgctn8UTQtPQPzqTq415tFqZjJFrHGjwRY4TcwnaDj", "fee": 1000000, "feeAssetId": null, "timestamp": 1685468192989, "version": 2, "chainId": 84, "sender": "3N7KPSUwpMgvDEVGw1DYBnKDiixSQUXhn2P", "senderPublicKey": "BTvXQMmkgSf57dbcqWxpEvbi3ZYcEeWFkkXDZC6FrneM", "proofs": [ "Mz9qLR4TGdXf2ts4YJyvUGUsCHB6x6HrruUyMLcAbaqpTXrhMcQS8UQ1NFDSMY84eTSUQaj9539pqi9DAqdKyuH" ], "script": "base64:AAIFAAAAAAAAAAsIAhIAEgASAwoBAQAAAAEAAAAADG93bmVyQWRkcmVzcwIAAAAjM012akFhRFlIcFM0QTVLNENWM2taTU1FSDltOUpkQlN2YnEAAAADAAAAAWkBAAAABGNhbGwAAAAABAAAAAVhc3NldAkABEMAAAAHAgAAAAVBc3NldAIAAAAAAAAAAAAAAAABAAAAAAAAAAAABgUAAAAEdW5pdAAAAAAAAAAAAAQAAAAHYXNzZXRJZAkABDgAAAABBQAAAAVhc3NldAkABEwAAAACCQEAAAALQmluYXJ5RW50cnkAAAACAgAAAANiaW4BAAAAAAkABEwAAAACCQEAAAAMQm9vbGVhbkVudHJ5AAAAAgIAAAAEYm9vbAYJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAA2ludAAAAAAAAAAAAQkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACAgAAAANzdHICAAAAAAkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABAgAAAANzdHIJAARMAAAAAgUAAAAFYXNzZXQJAARMAAAAAgkBAAAAB1JlaXNzdWUAAAADBQAAAAd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nQEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwkAASwAAAACAgAAAA1wbGF0Zm9ybV9iYWxfBQAAAAZDYWxsZXIDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAQAAAAJbmV3QW1vdW50CQAAZQAAAAIFAAAADWN1cnJlbnRBbW91bnQFAAAAEGFtb3VudFRvV2l0aERyYXcDCQEAAAACIT0AAAACBQAAAAZDYWxsZXIFAAAADG93bmVyQWRkcmVzcwkAAAIAAAABAgAAAA5Ob3QgQXV0aG9yaXplZAMJAAAAAAAAAgUAAAANY3VycmVudEFtb3VudAAAAAAAAAAAAAkAAAIAAAABAgAAAB1ObyBzdWZmaWNlbnQgYW1vdW50IGF2YWlsYWJsZQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACAgAAAAxwbGF0Zm9ybV9iYWwFAAAADG93bmVyQWRkcmVzcwUAAAAJbmV3QW1vdW50CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAQYW1vdW50VG9XaXRoRHJhdwUAAAAEdW5pdAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXm6CGPm", "height": 2601018, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: F1T9jL21SiYgoqz2yFnLacJhjVFZcvRxnoe9DC6D4ExS Next: 6iKwBM18VxhwvsPGHhtiahvXFSFeFqNmgfzvT75eTCyG Diff:
OldNewDifferences
1515 @Callable(i)
1616 func deposit () = {
1717 let currentKey = toBase58String(i.caller.bytes)
18- let amount = i.payments[0].amount
18+ let depositAmount = (i.payments[0].amount - 5000000)
19+ let platformfee = 5000000
1920 let totalPlatformFee = getIntegerValue(this, ("platform_bal" + ownerAddress))
20- let platformFeeInc = (totalPlatformFee + i.payments[1].amount)
21-[IntegerEntry(("balance_" + currentKey), amount), IntegerEntry(("platform_bal_" + ownerAddress), platformFeeInc)]
21+ let platformFeeInc = (totalPlatformFee + platformfee)
22+[IntegerEntry(("balance_" + currentKey), depositAmount), IntegerEntry(("platform_bal_" + ownerAddress), platformFeeInc)]
2223 }
2324
2425
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let ownerAddress = "3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq"
55
66 @Callable(i)
77 func call () = {
88 let asset = Issue("Asset", "", 1, 0, true, unit, 0)
99 let assetId = calculateAssetId(asset)
1010 [BinaryEntry("bin", base58''), BooleanEntry("bool", true), IntegerEntry("int", 1), StringEntry("str", ""), DeleteEntry("str"), asset, Reissue(assetId, 1, false), Burn(assetId, 1), ScriptTransfer(i.caller, 1, assetId)]
1111 }
1212
1313
1414
1515 @Callable(i)
1616 func deposit () = {
1717 let currentKey = toBase58String(i.caller.bytes)
18- let amount = i.payments[0].amount
18+ let depositAmount = (i.payments[0].amount - 5000000)
19+ let platformfee = 5000000
1920 let totalPlatformFee = getIntegerValue(this, ("platform_bal" + ownerAddress))
20- let platformFeeInc = (totalPlatformFee + i.payments[1].amount)
21-[IntegerEntry(("balance_" + currentKey), amount), IntegerEntry(("platform_bal_" + ownerAddress), platformFeeInc)]
21+ let platformFeeInc = (totalPlatformFee + platformfee)
22+[IntegerEntry(("balance_" + currentKey), depositAmount), IntegerEntry(("platform_bal_" + ownerAddress), platformFeeInc)]
2223 }
2324
2425
2526
2627 @Callable(i)
2728 func withDraw (amountToWithDraw) = {
2829 let Caller = toBase58String(i.caller.bytes)
2930 let currentKey = toBase58String(i.caller.bytes)
3031 let currentAmount = match getInteger(this, ("platform_bal_" + Caller)) {
3132 case a: Int =>
3233 a
3334 case _ =>
3435 0
3536 }
3637 let newAmount = (currentAmount - amountToWithDraw)
3738 if ((Caller != ownerAddress))
3839 then throw("Not Authorized")
3940 else if ((currentAmount == 0))
4041 then throw("No sufficent amount available")
4142 else [IntegerEntry(("platform_bal" + ownerAddress), newAmount), ScriptTransfer(i.caller, amountToWithDraw, unit)]
4243 }
4344
4445
4546 @Verifier(tx)
4647 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
4748

github/deemru/w8io/169f3d6 
33.63 ms