tx · 2RACsvpbVLmpUNdH23VHjKNEnUE7b6wU2WfXRZ5wxEe1 3MqxNQues3HH3kBjuzTSnJ7UKwmS9hgnxxx: -0.01400000 Waves 2022.09.12 23:00 [2226336] smart account 3MqxNQues3HH3kBjuzTSnJ7UKwmS9hgnxxx > SELF 0.00000000 Waves
{ "type": 13, "id": "2RACsvpbVLmpUNdH23VHjKNEnUE7b6wU2WfXRZ5wxEe1", "fee": 1400000, "feeAssetId": null, "timestamp": 1663012810837, "version": 2, "chainId": 84, "sender": "3MqxNQues3HH3kBjuzTSnJ7UKwmS9hgnxxx", "senderPublicKey": "3karvhVe3LgRMXprezaPpdeYknh9ju1rETVV3zdunQ1p", "proofs": [ "3ugvWqkj2p4h73Ysx9kzZPQFfe5B6UZDzwWfZ4ASVxmPeS4p7hiVzYPPC1QjnxkL7RkHYqU1dsRxph7SB4uEhPRq" ], "script": "base64:AAIEAAAAAAAAAA0IAhIDCgEIEgQKAggIAAAAAQAAAAALQ09ERUFzc2V0SUQBAAAAIMO7WpkPv3V6MicEWfxW+TeI3Tjc6gp0OC8l37fTvNKgAAAAAgAAAAFpAQAAAAhSZWNoYXJnZQAAAAEAAAAIVXNlck5hbWUEAAAABHBtdDEJAQAAAAV2YWx1ZQAAAAEJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAABHBtdDIJAQAAAAV2YWx1ZQAAAAEJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAEEAAAAEURlcG9zaXRDT0RFQW1vdW50BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAACFVzZXJOYW1lAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAAFG5ld0RlcG9zaXRDT0RFQW1vdW50CQAAZAAAAAIFAAAAEURlcG9zaXRDT0RFQW1vdW50CAUAAAAEcG10MQAAAAZhbW91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DEwNTMpAAAAAgUAAAAEdGhpcwIAAAARREFwcF9BZG1pbl9SaWdodHMEAAAAC2dldFVzZXJOYW1lCQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQdAAAAAgUAAAAEdGhpcwUAAAAIVXNlck5hbWUCAAAAOlRlbGVncmFtIElEIG5vdCBmb3VuZCwgUGxlYXNlIENyb3NzIENoZWNrIHlvdSBFbmNyeXB0ZWQgSUQDCQEAAAACIT0AAAACBQAAAAthZG1pbnJpZ2h0cwUAAAANY2FsbGVyYWRkcmVzcwkAAAIAAAABCQABLAAAAAIJAAEsAAAAAgIAAAAiSSBrbm93IFlvdSBhcmUgbm90IEFuIEFkbWluLiBPbmx5IAUAAAALYWRtaW5yaWdodHMCAAAAHyBoYXMgcmlnaHRzIHRvIHdpdGhkcmF3IFRva2Vucy4JAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQUAAAAIVXNlck5hbWUJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQUAAAAPV2l0aGRyYXdBZGRyZXNzCQEAAAARQGV4dHJOYXRpdmUoMTA1MCkAAAACBQAAAAR0aGlzBQAAAAhVc2VyTmFtZQUAAAALQ09ERUFzc2V0SUQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5ekMjmQ==", "height": 2226336, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: B1b1MzcPsWWyuiWaJ9YyEG1VpTbMvw5hDgKvEfQ2UUMh Next: FMDTCkMBYFCF3thqdUtA3jBB95LbVZanExgUBfLSB5Rx Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let CODEAssetID = base58' | |
4 | + | let CODEAssetID = base58'EB4CUQH4fHzzQt9YjcHtA6T7uosHNH9RnQKHgBdZHPCB' | |
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | 7 | func Recharge (UserName) = { | |
34 | 34 | let getUserName = valueOrErrorMessage(getString(this, UserName), "Telegram ID not found, Please Cross Check you Encrypted ID") | |
35 | 35 | if ((adminrights != calleraddress)) | |
36 | 36 | then throw((("I know You are not An Admin. Only " + adminrights) + " has rights to withdraw Tokens.")) | |
37 | - | else [DeleteEntry(UserName), ScriptTransfer( | |
37 | + | else [DeleteEntry(UserName), ScriptTransfer(addressFromStringValue(WithdrawAddress), getIntegerValue(this, UserName), CODEAssetID)] | |
38 | 38 | } | |
39 | 39 | ||
40 | 40 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let CODEAssetID = base58' | |
4 | + | let CODEAssetID = base58'EB4CUQH4fHzzQt9YjcHtA6T7uosHNH9RnQKHgBdZHPCB' | |
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | 7 | func Recharge (UserName) = { | |
8 | 8 | let pmt1 = value(i.payments[0]) | |
9 | 9 | let pmt2 = value(i.payments[1]) | |
10 | 10 | let DepositCODEAmount = match getInteger(this, UserName) { | |
11 | 11 | case a: Int => | |
12 | 12 | a | |
13 | 13 | case _ => | |
14 | 14 | 0 | |
15 | 15 | } | |
16 | 16 | let newDepositCODEAmount = (DepositCODEAmount + pmt1.amount) | |
17 | 17 | if ((pmt1.assetId != CODEAssetID)) | |
18 | 18 | then throw("Incorrect asset attached for in payment[1], please attach minimum 10 CODE Token.") | |
19 | 19 | else if ((1000000000 > pmt1.amount)) | |
20 | 20 | then throw("Amount attached is Less than 10 CODE.") | |
21 | 21 | else if (isDefined(pmt2.assetId)) | |
22 | 22 | then throw("Incorrect asset attached for Payment[2], please attach TN only.") | |
23 | 23 | else if ((fraction(pmt1.amount, 1000, 1666) > pmt2.amount)) | |
24 | 24 | then throw((("Incorrect amount of payment[2] attached, please attach minimum " + toString(fraction(pmt1.amount, 1000, 1666))) + "/100000000. [TN]")) | |
25 | 25 | else [IntegerEntry(UserName, newDepositCODEAmount)] | |
26 | 26 | } | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | ||
30 | 30 | @Callable(i) | |
31 | 31 | func Withdraw (UserName,WithdrawAddress) = { | |
32 | 32 | let calleraddress = toBase58String(i.caller.bytes) | |
33 | 33 | let adminrights = getStringValue(this, "DApp_Admin_Rights") | |
34 | 34 | let getUserName = valueOrErrorMessage(getString(this, UserName), "Telegram ID not found, Please Cross Check you Encrypted ID") | |
35 | 35 | if ((adminrights != calleraddress)) | |
36 | 36 | then throw((("I know You are not An Admin. Only " + adminrights) + " has rights to withdraw Tokens.")) | |
37 | - | else [DeleteEntry(UserName), ScriptTransfer( | |
37 | + | else [DeleteEntry(UserName), ScriptTransfer(addressFromStringValue(WithdrawAddress), getIntegerValue(this, UserName), CODEAssetID)] | |
38 | 38 | } | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | @Verifier(tx) | |
42 | 42 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
43 | 43 |
github/deemru/w8io/169f3d6 41.94 ms ◑