tx · H4QtcSzLTRcxHUaZtNzoUgbTdZRomSyiySerU32T7Ngx

3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw:  -0.01000000 Waves

2022.06.08 22:37 [2087821] smart account 3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw > SELF 0.00000000 Waves

{ "type": 13, "id": "H4QtcSzLTRcxHUaZtNzoUgbTdZRomSyiySerU32T7Ngx", "fee": 1000000, "feeAssetId": null, "timestamp": 1654717043963, "version": 2, "chainId": 84, "sender": "3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw", "senderPublicKey": "GTKqLSK6nuFkRdebB5SmTwTU2DnTeLMvhymCFfT2CxX2", "proofs": [ "5T48pKsFbw7J4rkzZFKcm7YRDt9896TQcxyQk57nPkC3a4K2JN3swvLD1F4mDtgh1o6SBh2oYK9GHkwFQFMJWUTz" ], "script": "base64:AAIFAAAAAAAAAAsIAhIAEgMKAQgSAAAAAA0AAAAABEhBU0gBAAAAIJklwE3i+u/bc48vf4d/BnVXhMLmuX4eB+81QVXPc36rAAAAAAhLcm9zc0NhcgEAAAAgNewIuJ8fl0L3aDIXfe5KYUI4pQbPPcpdLtTikAZosrsAAAAABlRvd2luZwEAAAAgLzVn9FxXOELHRV9NM7WHnRz83AP0i2FsXYU/kxb44koAAAAACGRBcHBGZWVzAQAAABoBV5prAZfpnthmNq2ZMbws44Htl6ZEmG28iwAAAAAJQWRtaW5kQXBwAQAAABoBV9BDQuIchL6bmoa833jKal/OBiGoZGoQDgAAAAAJTWluQW1vdW50AAAAAAAAAAK8AAAAAA5Lcm9zc0NhclJld2FyZAAAAAAAAAAAAQAAAAAMVG93aW5nUmV3YXJkAAAAAAAAAAABAAAAAApSZWZlcnJlVGlwAAAAAAAAAAABAAAAAAxtaW5Kb2luV2Vla3MAAAAAAAAAAAgAAAAAClRpbWVUb3dpbmcAAAAAAAAAAB4AAAAABFdlZWsJAABoAAAAAgAAAAAAAAAFoAAAAAAAAAAABwAAAAADRGF5AAA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ByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAAMVXNlck1hdHVyaXR5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAAFExhc3RUb3dpbmdCbG9ja1ZhbHVlBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAD0xhc3RUb3dpbmdCbG9jawMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAwMDCQAAZgAAAAIJAABoAAAAAgUAAAAJTWluQW1vdW50AAAAAAAF9eEACQAAaQAAAAIJAABoAAAAAgUAAAAGYW1vdW50CQAAZQAAAAIFAAAABmhlaWdodAUAAAARVXNlck1hdHVyaXR5VmFsdWUFAAAABFdlZWsGCQAAZgAAAAIJAABoAAAAAgUAAAAMbWluSm9pbldlZWtzBQAAAARXZWVrCQAAZQAAAAIFAAAABmhlaWdodAUAAAARVXNlck1hdHVyaXR5VmFsdWUGCQAAZgAAAAIJAABoAAAAAgUAAAAKVGltZVRvd2luZwUAAAADRGF5BQAAABRMYXN0VG93aW5nQmxvY2tWYWx1ZQkAAAIAAAABAgAAAAd0eXV0eXV0CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwIAAAAQX0xhc3RUb3dpbmdCbG9jawUAAAAGaGVpZ2h0CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgkAAGgAAAACBQAAAAxUb3dpbmdSZXdhcmQAAAAAAAX14QAFAAAABlRvd2luZwUAAAADbmlsAAAAAGZG1cw=", "height": 2087821, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: G6uiKSNZ7NZA6KtZ9qk6mKZkY99ZqaDQPfzNzdLjzBCf Next: Hr1Sw3p32CJ1mZrtK4kbFf5Zpz6kmHiqWgqjFdqZCoUP Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let HASH = base58'BJpmNoB9MABJ1ytHhbLNxuUaeoYcYVeTM1r7kh39P24i'
55
66 let KrossCar = base58'4dVMkKtzaWuHC21kmxBBUwKQ5LGayLZLV9snpkJxsGeW'
77
88 let Towing = base58'4BHPskP7pBoXLD7U8nk54CstqbsqRvuWr3SDP8uMrz5w'
99
1010 let dAppFees = base58'3PG1NyiC2rdgX46jb8c5zPGuEAzWXhr4L2W'
1111
1212 let AdmindApp = base58'3PLv5rYMqR4gSiP5ZSjrX2FStLhHTRgFPbb'
1313
1414 let MinAmount = 700
1515
1616 let KrossCarReward = 1
1717
1818 let TowingReward = 1
1919
2020 let ReferreTip = 1
2121
2222 let minJoinWeeks = 8
2323
2424 let TimeTowing = 30
2525
2626 let Week = (1440 * 7)
2727
2828 let Day = 1440
2929
3030 @Callable(i)
3131 func DepositHASH () = {
3232 let UserDeposit = (toBase58String(i.caller.bytes) + "_Deposit")
3333 let amount = match getInteger(this, UserDeposit) {
3434 case a: Int =>
3535 a
3636 case _ =>
3737 0
3838 }
3939 let pmt = if ((size(i.payments) == 1))
4040 then i.payments[0]
4141 else throw("Attached payment is required")
4242 if (if (((MinAmount * 100000000) > pmt.amount))
4343 then true
4444 else (pmt.assetId != HASH))
4545 then throw("Can only deposit HASH tokens, and minimum amount is 700 HASH")
4646 else {
4747 let UserDepositValue = (amount + pmt.amount)
4848 [IntegerEntry((toBase58String(i.caller.bytes) + "_Deposit"), UserDepositValue), IntegerEntry((toBase58String(i.caller.bytes) + "_DepositBlock"), height), ScriptTransfer(i.caller, (KrossCarReward * 100000000), KrossCar)]
4949 }
5050 }
5151
5252
5353
5454 @Callable(i)
5555 func RewardReferrer (UserWalletAddressStr) = if ((UserWalletAddressStr == ""))
5656 then throw("Referrer Wallet Address cannot be empty !")
5757 else {
5858 let UserWalletAddress = addressFromStringValue(UserWalletAddressStr)
5959 let UserDeposit = (toBase58String(i.caller.bytes) + "_Deposit")
6060 let TippedStatus = (toBase58String(i.caller.bytes) + "_TippedStatus")
6161 let amount = match getInteger(this, UserDeposit) {
6262 case a: Int =>
6363 a
6464 case _ =>
6565 0
6666 }
6767 let TippedStatusValue = match getString(this, TippedStatus) {
6868 case a: String =>
6969 a
7070 case _ =>
7171 "NO"
7272 }
7373 if ((TippedStatusValue == "YES"))
7474 then throw("You already tipped a User, you only can tip once a user")
7575 else if (((MinAmount * 100000000) > amount))
7676 then throw((("To tip your referrer you must have at least deposited: " + toString(MinAmount)) + " HASH"))
7777 else [StringEntry((toBase58String(i.caller.bytes) + "_TippedStatus"), "YES"), ScriptTransfer(UserWalletAddress, (ReferreTip * 100000000), KrossCar)]
7878 }
7979
8080
8181
8282 @Callable(i)
8383 func RequestTowing () = {
8484 let UserDeposit = (toBase58String(i.caller.bytes) + "_Deposit")
8585 let UserMaturity = (toBase58String(i.caller.bytes) + "_DepositBlock")
8686 let LastTowingBlock = (toBase58String(i.caller.bytes) + "_LastTowingBlock")
8787 let amount = match getInteger(this, UserDeposit) {
8888 case a: Int =>
8989 a
9090 case _ =>
9191 0
9292 }
9393 let UserMaturityValue = match getInteger(this, UserMaturity) {
9494 case a: Int =>
9595 a
9696 case _ =>
9797 0
9898 }
9999 let LastTowingBlockValue = match getInteger(this, LastTowingBlock) {
100100 case a: Int =>
101101 a
102102 case _ =>
103103 0
104104 }
105105 if (if (if (((MinAmount * 100000000) > ((amount * (height - UserMaturityValue)) / Week)))
106106 then true
107107 else ((minJoinWeeks * Week) > (height - UserMaturityValue)))
108108 then true
109109 else ((TimeTowing * Day) > LastTowingBlockValue))
110110 then throw("tyutyut")
111111 else [IntegerEntry((toBase58String(i.caller.bytes) + "_LastTowingBlock"), height), ScriptTransfer(i.caller, (TowingReward * 100000000), Towing)]
112112 }
113113
114114

github/deemru/w8io/169f3d6 
26.37 ms