tx · 74owzYoXN46o64W83DGSTjDYB8Rt33jq59GXW36dWr8i

3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep:  -0.01400000 Waves

2019.07.12 13:49 [582412] smart account 3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep > SELF 0.00000000 Waves

{ "type": 13, "id": "74owzYoXN46o64W83DGSTjDYB8Rt33jq59GXW36dWr8i", "fee": 1400000, "feeAssetId": null, "timestamp": 1562928566442, "version": 1, "sender": "3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep", "senderPublicKey": "BJAeTqNbDSA5FiYihZZaSWvD6XL5XjpqVXbTGerBJjRK", "proofs": [ "36QDjT9byc6Ef546s7TauJFHD5KfkmRtW6eBZSTAvyVoMGMQEKCNNUGkEjSfejYHwZ8j7yoGohHtSgN1wqWxbxq7" ], "script": "base64:AAIDAAAAAAAAAAAAAAAEAAAAAAp0b2tlbklkRGVmAQAAACCU1B7l35UfeySUCJ5Oe8nTMKHr4huFqp+vPk8CQCqTZQEAAAASdXNlckhhc0FkbWluQWNjZXNzAAAAAQAAAAdhZGRyZXNzCQAAAAAAAAIFAAAAB2FkZHJlc3MFAAAABHRoaXMBAAAABGFkZHIAAAACAAAAB3Rva2VuSWQAAAADcGFyCQABLAAAAAIJAAEsAAAAAgkAAlgAAAABBQAAAAd0b2tlbklkAgAAAAFfBQAAAANwYXIBAAAABXNhZGRyAAAAAgAAAAd0b2tlbklkAAAAA3BhcgkAASwAAAACCQABLAAAAAIFAAAAB3Rva2VuSWQCAAAAAV8FAAAAA3BhcgAAAAMAAAABaQEAAAADYmV0AAAAAQAAAA10b2tlbklkU3RyaW5nBAAAABZzdGFydFRyYW5zYWN0aW9uSGVpZ2h0CQEAAAARQGV4dHJOYXRpdmUoMTA1MCkAAAACBQAAAAR0aGlzCQEAAAAFc2FkZHIAAAACBQAAAA10b2tlbklkU3RyaW5nAgAAAAVzdGFydAQAAAAJdGltZURlbHRhCQAAZQAAAAIFAAAABmhlaWdodA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ABFAZXh0ck5hdGl2ZSgxMDUzKQAAAAIFAAAABHRoaXMJAQAAAARhZGRyAAAAAgUAAAAHdG9rZW5JZAIAAAALbWF4QmV0T3duZXIJAQAAAAxTY3JpcHRSZXN1bHQAAAACCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQEAAAAEYWRkcgAAAAIFAAAAB3Rva2VuSWQCAAAABXN0YXJ0AAAAAAAAAAAABQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAALbWF4QmV0T3duZXIAAAAAAAAAAAEFAAAAB3Rva2VuSWQFAAAAA25pbAAAAADKi/yG", "chainId": 84, "height": 582412, "spentComplexity": 0 } View: original | compacted Prev: FvX9JpaZRwkdMqD9EFTkQ8wNnP2FPi511a9CQtzKdA6X Next: 5bkmDkxxpbduvzf9bBBGjiyCuXi15bebb9k1SyBfWzjF Diff:
OldNewDifferences
2525 then {
2626 let price = pmt.amount
2727 if ((price > 0))
28- then throw("alRight")
28+ then throw(toString(maxBet))
2929 else throw("Your bet isn't the max bet")
3030 }
3131 else throw("You need to place a bet using waves currency")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let tokenIdDef = base58'B1xwWnBLB7z79VPr4sq1jBb5GDqs8TeT5jHojTdiwxfE'
55
66 func userHasAdminAccess (address) = (address == this)
77
88
99 func addr (tokenId,par) = ((toBase58String(tokenId) + "_") + par)
1010
1111
1212 func saddr (tokenId,par) = ((tokenId + "_") + par)
1313
1414
1515 @Callable(i)
1616 func bet (tokenIdString) = {
1717 let startTransactionHeight = getIntegerValue(this, saddr(tokenIdString, "start"))
1818 let timeDelta = (height - startTransactionHeight)
1919 let maxBet = extract(getInteger(this, saddr(tokenIdString, "maxBet")))
2020 let maxBetOwner = addressFromPublicKey(toBytes(getStringValue(this, saddr(tokenIdString, "maxBetOwner"))))
2121 let pmt = extract(i.payment)
2222 if ((20 > 100))
2323 then throw("The betting was closed")
2424 else if (!(isDefined(pmt.assetId)))
2525 then {
2626 let price = pmt.amount
2727 if ((price > 0))
28- then throw("alRight")
28+ then throw(toString(maxBet))
2929 else throw("Your bet isn't the max bet")
3030 }
3131 else throw("You need to place a bet using waves currency")
3232 }
3333
3434
3535
3636 @Callable(i)
3737 func start (startPrice,auctionDuration) = {
3838 let pmt = extract(i.payment)
3939 let tokenId = extract(pmt.assetId)
4040 if (isDefined(tokenId))
4141 then WriteSet([DataEntry(addr(tokenId, "start"), height), DataEntry(addr(tokenId, "startPrice"), startPrice), DataEntry(addr(tokenId, "duration"), auctionDuration), DataEntry(addr(tokenId, "maxBetOwner"), toBase58String(i.callerPublicKey))])
4242 else throw("You can't sell waves using the auction")
4343 }
4444
4545
4646
4747 @Callable(i)
4848 func finish (tokenId) = {
4949 let length = (getIntegerValue(this, addr(tokenId, "start")) - height)
5050 let delta = (getIntegerValue(this, addr(tokenId, "duration")) - length)
5151 if ((delta > 0))
5252 then throw((("The auction cannot be finished yet! " + toString(delta)) + " minutes remaining"))
5353 else {
5454 let maxBetOwner = addressFromPublicKey(toBytes(getStringValue(this, addr(tokenId, "maxBetOwner"))))
5555 ScriptResult(WriteSet([DataEntry(addr(tokenId, "start"), 0)]), TransferSet([ScriptTransfer(maxBetOwner, 1, tokenId)]))
5656 }
5757 }
5858
5959

github/deemru/w8io/026f985 
21.52 ms