tx · 74TkubP6tTbzYWr1ykQ8aJSUFQvrogfxWejrAdUFi3GQ
3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep: -0.01400000 Waves
2019.07.11 12:28 [580851] smart account 3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep > SELF 0.00000000 Waves
{
"type": 13,
"id": "74TkubP6tTbzYWr1ykQ8aJSUFQvrogfxWejrAdUFi3GQ",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1562837361788,
"version": 1,
"sender": "3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep",
"senderPublicKey": "BJAeTqNbDSA5FiYihZZaSWvD6XL5XjpqVXbTGerBJjRK",
"proofs": [
"3KjuGPub5oVjn4uRwd3UWXJDyA6b7ayHgGvbQnY1pBR8ns45ZtEB4GxkDydufHX3tv66kqFYfjR9q9kKmdrrVAvk"
],
"script": "base64:AAIDAAAAAAAAAAAAAAABAQAAABJ1c2VySGFzQWRtaW5BY2Nlc3MAAAABAAAAB2FkZHJlc3MJAAAAAAAAAgUAAAAHYWRkcmVzcwUAAAAEdGhpcwAAAAIAAAABaQEAAAADYmV0AAAAAQAAAAVwcmljZQQAAAAWc3RhcnRUcmFuc2FjdGlvbkhlaWdodAkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwIAAAAFc3RhcnQEAAAACXRpbWVEZWx0YQkAAGUAAAACBQAAAAZoZWlnaHQFAAAAFnN0YXJ0VHJhbnNhY3Rpb25IZWlnaHQEAAAABm1heEJldAkBAAAAB2V4dHJhY3QAAAABCQAEGgAAAAIFAAAABHRoaXMCAAAABm1heEJldAkAAAIAAAABAgAAAARoZXJlAAAAAWkBAAAABXN0YXJ0AAAAAQAAAApzdGFydFByaWNlAwkBAAAAASEAAAABCQEAAAASdXNlckhhc0FkbWluQWNjZXNzAAAAAQgFAAAAAWkAAAAGY2FsbGVyCQAAAgAAAAECAAAAE1lvdSBoYXZlIG5vIGFjY2VzcyEJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAABXN0YXJ0BQAAAAZoZWlnaHQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAABm1heEJldAUAAAAKc3RhcnRQcmljZQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgIAAAALbWF4QmV0T3duZXIJAAJYAAAAAQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5BQAAAANuaWwAAAAAMWR0hQ==",
"chainId": 84,
"height": 580851,
"spentComplexity": 0
}
View: original | compacted
Prev: agNycTAweMLSH4fKaFKiQ5KVkEG6WBS9CVZJYgCPcty
Next: E4LUf4BmAiqYXe2aXBFuErcTSqLhfTwXpfSv1meVNxWU
Diff:
Old | New | | Differences |
---|
9 | 9 | | let e = getIntegerValue(this, "start") |
---|
10 | 10 | | let f = (height - e) |
---|
11 | 11 | | let g = extract(getInteger(this, "maxBet")) |
---|
12 | | - | let h = addressFromPublicKey(extract(getBinary(this, "maxBetOwner"))) |
---|
13 | | - | if ((f > 2000)) |
---|
14 | | - | then throw("The betting was closed") |
---|
15 | | - | else if ((d > g)) |
---|
16 | | - | then ScriptResult(WriteSet([DataEntry("maxBet", d), DataEntry("maxBetOwner", toBase58String(c.callerPublicKey)), DataEntry(toBase58String(c.callerPublicKey), d)]), TransferSet([ScriptTransfer(h, g, unit), ScriptTransfer(this, (d - g), unit)])) |
---|
17 | | - | else throw("Your bet isn't the max bet") |
---|
| 12 | + | throw("here") |
---|
18 | 13 | | } |
---|
19 | 14 | | |
---|
20 | 15 | | |
---|
21 | 16 | | |
---|
22 | 17 | | @Callable(c) |
---|
23 | | - | func start (i) = if (!(a(c.caller))) |
---|
| 18 | + | func start (h) = if (!(a(c.caller))) |
---|
24 | 19 | | then throw("You have no access!") |
---|
25 | | - | else WriteSet([DataEntry("start", height), DataEntry("maxBet", i), DataEntry("maxBetOwner", toBase58String(c.callerPublicKey))]) |
---|
| 20 | + | else WriteSet([DataEntry("start", height), DataEntry("maxBet", h), DataEntry("maxBetOwner", toBase58String(c.callerPublicKey))]) |
---|
26 | 21 | | |
---|
27 | 22 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | func a (b) = (b == this) |
---|
5 | 5 | | |
---|
6 | 6 | | |
---|
7 | 7 | | @Callable(c) |
---|
8 | 8 | | func bet (d) = { |
---|
9 | 9 | | let e = getIntegerValue(this, "start") |
---|
10 | 10 | | let f = (height - e) |
---|
11 | 11 | | let g = extract(getInteger(this, "maxBet")) |
---|
12 | | - | let h = addressFromPublicKey(extract(getBinary(this, "maxBetOwner"))) |
---|
13 | | - | if ((f > 2000)) |
---|
14 | | - | then throw("The betting was closed") |
---|
15 | | - | else if ((d > g)) |
---|
16 | | - | then ScriptResult(WriteSet([DataEntry("maxBet", d), DataEntry("maxBetOwner", toBase58String(c.callerPublicKey)), DataEntry(toBase58String(c.callerPublicKey), d)]), TransferSet([ScriptTransfer(h, g, unit), ScriptTransfer(this, (d - g), unit)])) |
---|
17 | | - | else throw("Your bet isn't the max bet") |
---|
| 12 | + | throw("here") |
---|
18 | 13 | | } |
---|
19 | 14 | | |
---|
20 | 15 | | |
---|
21 | 16 | | |
---|
22 | 17 | | @Callable(c) |
---|
23 | | - | func start (i) = if (!(a(c.caller))) |
---|
| 18 | + | func start (h) = if (!(a(c.caller))) |
---|
24 | 19 | | then throw("You have no access!") |
---|
25 | | - | else WriteSet([DataEntry("start", height), DataEntry("maxBet", i), DataEntry("maxBetOwner", toBase58String(c.callerPublicKey))]) |
---|
| 20 | + | else WriteSet([DataEntry("start", height), DataEntry("maxBet", h), DataEntry("maxBetOwner", toBase58String(c.callerPublicKey))]) |
---|
26 | 21 | | |
---|
27 | 22 | | |
---|