tx · GmdgqA7hjEkVvVm1yV5Wqy8mzuPGErsJTfsUavfQSwxy

3N1iBA7nz6KkAP7RaHtQxU3TC1io912SWBz:  -0.00300000 Waves

2022.08.31 09:55 [2208295] smart account 3N1iBA7nz6KkAP7RaHtQxU3TC1io912SWBz > SELF 0.00000000 Waves

{ "type": 13, "id": "GmdgqA7hjEkVvVm1yV5Wqy8mzuPGErsJTfsUavfQSwxy", "fee": 300000, "feeAssetId": null, "timestamp": 1661928198309, "version": 2, "chainId": 84, "sender": "3N1iBA7nz6KkAP7RaHtQxU3TC1io912SWBz", "senderPublicKey": "upcZco3mz5KhMJ6hafUZU18QAKjN92atRHzDfYdeJJt", "proofs": [ "JHzDd1d6vAdq2EX3rue5mALnZKYVDZpRGge1eWoJ1y7eNmU8j7rbTPGMQtkrUnyZmaMt9X8YYArqK4izie2YoDA" ], "script": "base64:AAIFAAAAAAAAABIIAhIAEgMKAQESBwoFBAIBCB8AAAAAAAAAAwAAAANjdHgBAAAAB2RlcG9zaXQAAAAABAAAAANwbXQDCQAAZgAAAAIJAAGQAAAAAQgFAAAAA2N0eAAAAAhwYXltZW50cwAAAAAAAAAAAAkAAZEAAAACCAUAAAADY3R4AAAACHBheW1lbnRzAAAAAAAAAAAACQAAAgAAAAECAAAAHUF0IGxlYXN0IG9uZSBwYXltZW50IGV4cGVjdGVkBAAAAAdhc3NldElkAwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkBAAAABXZhbHVlAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQAAAgAAAAECAAAAG09ubHkgV0FWRVMgcGF5bWVudCBhY2NlcHRlZAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkABCUAAAABCAUAAAADY3R4AAAABmNhbGxlcggFAAAAA3BtdAAAAAZhbW91bnQFAAAAA25pbAAAAANjdHgBAAAACHdpdGhkcmF3AAAAAQAAAAZhbW91bnQEAAAAB2FkZHJlc3MJAAQlAAAAAQg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AAiRsBQAAAAIkaQoBAAAABSRmMF8yAAAAAgAAAAIkYQAAAAIkaQMJAABnAAAAAgUAAAACJGkFAAAAAiRzBQAAAAIkYQkAAAIAAAABAgAAABNMaXN0IHNpemUgZXhjZWVkcyA1CQEAAAAFJGYwXzIAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACBQAAAAUkYWNjMAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAgAAAAAAAAAAAwAAAAAAAAAABAAAAAAAAAAABQAAAABWejDo", "height": 2208295, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GBRLN5jvW1AYpxVYTXuEZsFvdaEP9mxdk4NAryARxodN Next: DBFu5uNFM8FXyqnof8rjuGA7YCvHqNomppJdvZ5ax3GA Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(ctx)
77 func deposit () = {
88 let pmt = if ((size(ctx.payments) > 0))
99 then ctx.payments[0]
1010 else throw("At least one payment expected")
1111 let assetId = if (isDefined(pmt.assetId))
1212 then value(pmt.assetId)
1313 else throw("Only WAVES payment accepted")
1414 [IntegerEntry(toString(ctx.caller), pmt.amount)]
1515 }
1616
1717
1818
1919 @Callable(ctx)
2020 func withdraw (amount) = {
2121 let address = toString(ctx.caller)
2222 let current = valueOrErrorMessage(getInteger(this, address), "You don't have a deposit")
2323 let amt = if (if ((amount > 0))
2424 then true
2525 else (amount > current))
2626 then amount
2727 else throw("Amount to withdraw must be more than 0 and less than current deposit")
2828 if ((amount == current))
2929 then [DeleteEntry(address)]
3030 else [IntegerEntry(address, (current - amount)), ScriptTransfer(ctx.caller, amount, unit)]
3131 }
3232
3333
3434
3535 @Callable(ctx)
3636 func allArgTypes (bool,bin,int,str,list) = {
3737 let indices = [1, 2, 3, 4, 5]
3838 func convertList (acc,index) = if ((index >= size(list)))
3939 then acc
4040 else {
4141 let ind = toString(index)
4242 (acc :+ match list[index] {
4343 case b: Boolean =>
4444 BooleanEntry((ind + "-bool"), b)
4545 case b: ByteVector =>
4646 BinaryEntry((ind + "-bin"), b)
4747 case i: Int =>
4848 IntegerEntry((ind + "-int"), i)
4949 case s: String =>
5050 StringEntry((ind + "-str"), s)
5151 case _ =>
5252 throw("Match error")
5353 })
5454 }
5555
5656 ([BooleanEntry("bool", bool), BinaryEntry("bin", bin), IntegerEntry("int", int), StringEntry("str", str)] ++ {
5757 let $l = indices
5858 let $s = size($l)
5959 let $acc0 = nil
6060 func $f0_1 ($a,$i) = if (($i >= $s))
6161 then $a
6262 else convertList($a, $l[$i])
6363
6464 func $f0_2 ($a,$i) = if (($i >= $s))
6565 then $a
6666 else throw("List size exceeds 5")
6767
6868 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
6969 })
7070 }
7171
7272

github/deemru/w8io/169f3d6 
28.75 ms