tx · FDKG95TFLaVFESjjHgfTSQDSWpq4KZJYjUMVfv3aMFmd

3MpwA3zztn9AiVLgzxtYyj21AAbvtWeBodX:  -0.01000000 Waves

2022.05.05 15:22 [2038388] smart account 3MpwA3zztn9AiVLgzxtYyj21AAbvtWeBodX > SELF 0.00000000 Waves

{ "type": 13, "id": "FDKG95TFLaVFESjjHgfTSQDSWpq4KZJYjUMVfv3aMFmd", "fee": 1000000, "feeAssetId": null, "timestamp": 1651753355189, "version": 2, "chainId": 84, "sender": "3MpwA3zztn9AiVLgzxtYyj21AAbvtWeBodX", "senderPublicKey": "DiHcx3LJuz15WXcQqQE1gEhBzw6k7HqgBE7m1qn3APFw", "proofs": [ "3Er4DPBDCycZJiMVDJZrJhuWS8M4HuyrqXi7fV8hriyRBBSDjVBzYcVTgnmwTeq5jKb5ycof2hr1Up2pQ9Jtut52" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEBAAAAAgAAAAANUEFZTUVOVF9BU1NFVAEAAAAgrZ1IFoWReWfvw0p6hpnR3VDpBUk85P5AREeM4YPEwvQBAAAAC2lzUGF5bWVudE9rAAAAAQAAAAFpBAAAABFhY2NlcHRhYmxlQXNzZXRJZAUAAAANUEFZTUVOVF9BU1NFVAMJAAAAAAAAAgkAAZAAAAABCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAkAAAIAAAABAgAAABRQYXltZW50IG5vdCBhdHRhY2hlZAQAAAABcAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAQAAAAHJG1hdGNoMAgFAAAAAXAAAAAHYXNzZXRJZAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAKQnl0ZVZlY3RvcgQAAAAHYXNzZXRJZAUAAAAHJG1hdGNoMAMJAAAAAAAAAgUAAAAHYXNzZXRJZAUAAAARYWNjZXB0YWJsZUFzc2V0SWQJAAAAAAAAAggFAAAAAXAAAAAGYW1vdW50AAAAAAAAD0JABwkAAAIAAAABAgAAABNXcm9uZyBwYXltZW50IGFzc2V0AAAAAQAAAAFpAQAAAARmbGlwAAAAAQAAAAZjaG9pY2UDCQEAAAALaXNQYXltZW50T2sAAAABBQAAAAFpBAAAAAZ3YWxsZXQJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwIAAAABXwkAAaQAAAABBQAAAAZjaG9pY2UCAAAAAl9jCQAAAgAAAAEFAAAABndhbGxldAkAAAIAAAABAgAAABN3cm9uZyBwYXltZW50IGFzc2V0AAAAAD1iFNs=", "height": 2038388, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 8o3juiN1Dev2zdt11ushde6rfK96F6bXZiyfxcsaBpnq Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let PAYMENT_ASSET = base58'CgidgEMbCKXXErgJXVyZCFRaK8SBNA73Jg8mNXALtVKh'
5+
6+func isPaymentOk (i) = {
7+ let acceptableAssetId = PAYMENT_ASSET
8+ if ((size(i.payments) == 0))
9+ then throw("Payment not attached")
10+ else {
11+ let p = i.payments[0]
12+ match p.assetId {
13+ case assetId: ByteVector =>
14+ if ((assetId == acceptableAssetId))
15+ then (p.amount == 1000000)
16+ else false
17+ case _ =>
18+ throw("Wrong payment asset")
19+ }
20+ }
21+ }
22+
23+
24+@Callable(i)
25+func flip (choice) = if (isPaymentOk(i))
26+ then {
27+ let wallet = (((toBase58String(i.caller.bytes) + "_") + toString(choice)) + "_c")
28+ throw(wallet)
29+ }
30+ else throw("wrong payment asset")
31+
32+

github/deemru/w8io/169f3d6 
23.19 ms