tx · 38VUTgbgDwh7Yzn5gN7Awr3eoutRW7b2MFDko6x7n1zo

3N6n8WVtJiGPeAdTCRxbt6Nf4TmfnKkPGiR:  -0.01400000 Waves

2019.09.08 18:28 [667275] smart account 3N6n8WVtJiGPeAdTCRxbt6Nf4TmfnKkPGiR > SELF 0.00000000 Waves

{ "type": 13, "id": "38VUTgbgDwh7Yzn5gN7Awr3eoutRW7b2MFDko6x7n1zo", "fee": 1400000, "feeAssetId": null, "timestamp": 1567956556122, "version": 1, "sender": "3N6n8WVtJiGPeAdTCRxbt6Nf4TmfnKkPGiR", "senderPublicKey": "Dp3WdDEoG1vcorYEAuS3LGKpNPsTTrghrYDZmwJEhQmM", "proofs": [ "3TpxEcPSi6ae72BwWoy8ftHPSZwTzaPfaKQ35Aqm5rQYkRqJs35BjefZoVfPLhNhczG4xSzCjUaazZ6ATnRtCnCB" ], "script": "base64:AAIDAAAAAAAAAAAAAAADAQAAAAtpc0FjdGl2YXRlZAAAAAAEAAAABHVzZXIJAQAAABFAZXh0ck5hdGl2ZSgxMDUzKQAAAAIFAAAABHRoaXMCAAAABHVzZXIJAQAAAAIhPQAAAAIFAAAABHVzZXICAAAAAAEAAAAQdmVyaWZ5TWluRGVwb3NpdAAAAAEAAAAHZGVwb3NpdAQAAAAOcHJpY2VQZXJNaW51dGUJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMCAAAADnByaWNlUGVyTWludXRlBAAAAAttaW5pbXVtVGltZQkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwIAAAALbWluaW11bVRpbWUJAABmAAAAAgkAAGkAAAACBQAAAAdkZXBvc2l0BQAAAA5wcmljZVBlck1pbnV0ZQUAAAALbWluaW11bVRpbWUBAAAAEGlzVGltZUxvY2tPcGVuZWQAAAABAAAAC2N1cnJlbnRUaW1lBAAAAAl0aW1lc3RhcnQJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaX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QAAAADiJR56", "chainId": 84, "height": 667275, "spentComplexity": 0 } View: original | compacted Prev: 4mexWXpWg4FQm6q7A8MKCMynpf1pUmzjUTJnpaDfaJWF Next: none Diff:
OldNewDifferences
6767 else throw("withdraw rejected because timelock is still active")
6868
6969
70-@Verifier(p)
71-func q () = true
72-
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func a () = {
55 let b = getStringValue(this, "user")
66 (b != "")
77 }
88
99
1010 func c (d) = {
1111 let e = getIntegerValue(this, "pricePerMinute")
1212 let f = getIntegerValue(this, "minimumTime")
1313 ((d / e) > f)
1414 }
1515
1616
1717 func g (h) = {
1818 let i = getIntegerValue(this, "timestart")
1919 let e = getIntegerValue(this, "pricePerMinute")
2020 let d = getIntegerValue(this, "deposit")
2121 ((h - i) > (d / e))
2222 }
2323
2424
2525 @Callable(j)
2626 func init () = if (if ((this == j.caller))
2727 then !(isDefined(getInteger(this, "pricePerMinute")))
2828 else false)
2929 then WriteSet([DataEntry("minimumTime", 30), DataEntry("pricePerMinute", 1), DataEntry("user", ""), DataEntry("timestart", ""), DataEntry("deposit", 0), DataEntry("withDrawAddress", "3N5KacfEg3N5155jWmxVY39rpdox566YxXa")])
3030 else throw("contract is already inited")
3131
3232
3333
3434 @Callable(j)
3535 func activate () = {
3636 let k = extract(j.payment)
3737 if (a())
3838 then throw("The scooter is already activated")
3939 else if (!(c(k.amount)))
4040 then throw("Your deposit should be for 30 minutes minimum")
4141 else WriteSet([DataEntry("deposit", k.amount), DataEntry("user", toBase58String(j.callerPublicKey)), DataEntry("timestart", lastBlock.timestamp)])
4242 }
4343
4444
4545
4646 @Callable(j)
4747 func payAndStop (l) = {
4848 let m = value(addressFromPublicKey(fromBase58String(getStringValue(this, "user"))))
4949 let n = getStringValue(this, "withDrawAddress")
5050 let d = getIntegerValue(this, "deposit")
5151 let o = (d - l)
5252 if ((j.caller == m))
5353 then TransferSet([ScriptTransfer(m, o, unit), ScriptTransfer(Address(fromBase58String(n)), l, unit)])
5454 else throw("not the adress of the renter")
5555 }
5656
5757
5858
5959 @Callable(j)
6060 func withdraw () = if (if (g(lastBlock.timestamp))
6161 then (this == j.caller)
6262 else false)
6363 then {
6464 let d = getIntegerValue(this, "deposit")
6565 ScriptResult(WriteSet([DataEntry("deposit", 0), DataEntry("user", ""), DataEntry("timestart", "")]), TransferSet([ScriptTransfer(Address(toBytes(getStringValue(this, "withDrawAddress"))), d, unit)]))
6666 }
6767 else throw("withdraw rejected because timelock is still active")
6868
6969
70-@Verifier(p)
71-func q () = true
72-

github/deemru/w8io/026f985 
37.60 ms