tx · j5SYJKcaTsx5Lc6m9PC9fXPCW2FkuU1zw3qLKDrhgJM

3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep:  -0.01400000 Waves

2019.07.11 13:48 [580934] smart account 3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep > SELF 0.00000000 Waves

{ "type": 13, "id": "j5SYJKcaTsx5Lc6m9PC9fXPCW2FkuU1zw3qLKDrhgJM", "fee": 1400000, "feeAssetId": null, "timestamp": 1562842138778, "version": 1, "sender": "3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep", "senderPublicKey": "BJAeTqNbDSA5FiYihZZaSWvD6XL5XjpqVXbTGerBJjRK", "proofs": [ "4oKjGLgecmgpkW55yoezxFFPNSAcdTVGJX5g2bAoiH5yy2jhqyVTXtgjKBnBwjX6PYMvmEkWQ2vBWokWepidRoPt" ], "script": "base64:AAIDAAAAAAAAAAAAAAACAAAAAAd0b2tlbklkAQAAACCU1B7l35UfeySUCJ5Oe8nTMKHr4huFqp+vPk8CQCqTZQEAAAASdXNlckhhc0FkbWluQWNjZXNzAAAAAQAAAAdhZGRyZXNzCQAAAAAAAAIFAAAAB2FkZHJlc3MFAAAABHRoaXMAAAADAAAAAWkBAAAAA2JldAAAAAAEAAAAFnN0YXJ0VHJhbnNhY3Rpb25IZWlnaHQJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMCAAAABXN0YXJ0BAAAAAl0aW1lRGVsdGEJAABlAAAAAgUAAAAGaGVpZ2h0BQAAABZzdGFydFRyYW5zYWN0aW9uSGVpZ2h0BAAAAAZtYXhCZXQJAQAAAAdleHRyYWN0AAAAAQkABBoAAAACBQAAAAR0aGlzAgAAAAZtYXhCZXQEAAAAC21heEJldE93bmVyCQEAAAAUYWRkcmVzc0Zyb21QdWJsaWNLZXkAAAABCQABmwAAAAEJAQAAABFAZXh0ck5hdGl2ZSgxMDUzKQAAAAIFAAAABHRoaXMCAAAAC21heEJldE93bmVyBAAA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N0YXJ0BQAAAAZoZWlnaHQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAABm1heEJldAUAAAAKc3RhcnRQcmljZQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgIAAAALbWF4QmV0T3duZXIJAAJYAAAAAQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5BQAAAANuaWwAAAABaQEAAAAGZmluaXNoAAAAAAMJAQAAAAEhAAAAAQkBAAAAEnVzZXJIYXNBZG1pbkFjY2VzcwAAAAEIBQAAAAFpAAAABmNhbGxlcgkAAAIAAAABAgAAABNZb3UgaGF2ZSBubyBhY2Nlc3MhBAAAAAttYXhCZXRPd25lcgkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQkAAZsAAAABCQEAAAARQGV4dHJOYXRpdmUoMTA1MykAAAACBQAAAAR0aGlzAgAAAAttYXhCZXRPd25lcgkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAABXN0YXJ0AAAAAAAAAAAABQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAALbWF4QmV0T3duZXIAAAAAAAAAAAEFAAAAB3Rva2VuSWQFAAAAA25pbAAAAAAtiviW", "chainId": 84, "height": 580934, "spentComplexity": 0 } View: original | compacted Prev: 9gwjCMJYVeUAQ9k64jja42jBFM8mephMhApvLJ4tuqf7 Next: EYXDPZxqCwJfRiCEymYW1K43BcM3DnwrKxQymrqRPmpb Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let tokenId = base58'B1xwWnBLB7z79VPr4sq1jBb5GDqs8TeT5jHojTdiwxfE'
55
66 func userHasAdminAccess (address) = (address == this)
77
88
99 @Callable(i)
1010 func bet () = {
1111 let startTransactionHeight = getIntegerValue(this, "start")
1212 let timeDelta = (height - startTransactionHeight)
1313 let maxBet = extract(getInteger(this, "maxBet"))
1414 let maxBetOwner = addressFromPublicKey(toBytes(getStringValue(this, "maxBetOwner")))
1515 let pmt = extract(i.payment)
1616 if ((timeDelta > 2000))
1717 then throw("The betting was closed")
1818 else if (!(isDefined(pmt.assetId)))
1919 then {
2020 let price = pmt.amount
2121 if ((price > maxBet))
2222 then ScriptResult(WriteSet([DataEntry("maxBet", price), DataEntry("maxBetOwner", toBase58String(i.callerPublicKey)), DataEntry(toBase58String(i.callerPublicKey), price)]), TransferSet([ScriptTransfer(maxBetOwner, maxBet, unit)]))
2323 else throw("Your bet isn't the max bet")
2424 }
2525 else throw("You need to place a bet using waves currency")
2626 }
2727
2828
2929
3030 @Callable(i)
3131 func start (startPrice) = if (!(userHasAdminAccess(i.caller)))
3232 then throw("You have no access!")
3333 else WriteSet([DataEntry("start", height), DataEntry("maxBet", startPrice), DataEntry("maxBetOwner", toBase58String(i.callerPublicKey))])
3434
3535
3636
3737 @Callable(i)
3838 func finish () = if (!(userHasAdminAccess(i.caller)))
3939 then throw("You have no access!")
4040 else {
4141 let maxBetOwner = addressFromPublicKey(toBytes(getStringValue(this, "maxBetOwner")))
4242 ScriptResult(WriteSet([DataEntry("start", 0)]), TransferSet([ScriptTransfer(maxBetOwner, 1, tokenId)]))
4343 }
4444
4545

github/deemru/w8io/169f3d6 
37.78 ms