tx · DtcaYbjFrtt3J5qqC6D99YeoBPcZKJHWwkwtAnjhHubi

3N4Ku96NUeAj995g2uxTBGeqfbv8Lnb9xC5:  -0.01000000 Waves

2022.06.15 17:28 [2097610] smart account 3N4Ku96NUeAj995g2uxTBGeqfbv8Lnb9xC5 > SELF 0.00000000 Waves

{ "type": 13, "id": "DtcaYbjFrtt3J5qqC6D99YeoBPcZKJHWwkwtAnjhHubi", "fee": 1000000, "feeAssetId": null, "timestamp": 1655303322565, "version": 2, "chainId": 84, "sender": "3N4Ku96NUeAj995g2uxTBGeqfbv8Lnb9xC5", "senderPublicKey": "6UwsWrDQLkfaF1QjhBWZ2w7ShAR8uYHa7yhxxkSmQuX8", "proofs": [ "37Jar9BMb6zf4rdunDrVAykotnCCVMr5acg4UwtahMxfxYFv9bAckudeMyisejL7LxY3pcQHhLDTBajkwUkK5Liw" ], "script": "base64:AAIFAAAAAAAAABIIAhIAEgMKAQESBwoFBAIBCB8AAAAAAAAAAwAAAANjdHgBAAAAB2RlcG9zaXQAAAAABAAAAANwbXQDCQAAZgAAAAIJAAGQAAAAAQgFAAAAA2N0eAAAAAhwYXltZW50cwAAAAAAAAAAAAkAAZEAAAACCAUAAAADY3R4AAAACHBheW1lbnRzAAAAAAAAAAAACQAAAgAAAAECAAAAHUF0IGxlYXN0IG9uZSBwYXltZW50IGV4cGVjdGVkBAAAAAdhc3NldElkAwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkBAAAABXZhbHVlAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQAAAgAAAAECAAAAG09ubHkgV0FWRVMgcGF5bWVudCBhY2NlcHRlZAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkABCUAAAABCAUAAAADY3R4AAAABmNhbGxlcggFAAAAA3BtdAAAAAZhbW91bnQFAAAAA25pbAAAAANjdHgBAAAACHdpdGhkcmF3AAAAAQAAAAZhbW91bnQEAAAAB2FkZHJlc3MJAAQ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AAAIFAAAAAiRsBQAAAAIkaQoBAAAABSRmMF8yAAAAAgAAAAIkYQAAAAIkaQMJAABnAAAAAgUAAAACJGkFAAAAAiRzBQAAAAIkYQkAAAIAAAABAgAAABNMaXN0IHNpemUgZXhjZWVkcyA1CQEAAAAFJGYwXzIAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACBQAAAAUkYWNjMAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAgAAAAAAAAAAAwAAAAAAAAAABAAAAAAAAAAABQAAAABWejDo", "height": 2097610, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9cDLAP7WYkoPNZAsHtSwXeApMtGyL5GxQCq1WEPFgkJ3 Next: none 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/026f985 
24.72 ms