tx · BCLWYa9tTXra4dQNJtoS6dQb4VCFxLD2ggJo6Ch1QnuQ
3N2fQphpMKWTvrGi3i7iDYLACz8ZvjpPqPk: -0.01000000 Waves
2021.12.14 22:21 [1834341] smart account 3N2fQphpMKWTvrGi3i7iDYLACz8ZvjpPqPk > SELF 0.00000000 Waves
{
"type": 13,
"id": "BCLWYa9tTXra4dQNJtoS6dQb4VCFxLD2ggJo6Ch1QnuQ",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1639509712757,
"version": 2,
"chainId": 84,
"sender": "3N2fQphpMKWTvrGi3i7iDYLACz8ZvjpPqPk",
"senderPublicKey": "gqjcfjsYLJhdBtCBsubcgSJjFrBppHurSH3qbpTNaDC",
"proofs": [
"5mTPqaNmP3YC7FX3Y3zswYeegf3gw4cV8EboC1KNkFwCFSL3NiuJKrPPkWz8kwoo2jxhwUvdHCqfnoqy4MtprhgV"
],
"script": "base64:AAIFAAAAAAAAAHAIAhIDCgEBGg4KAWESCWdldE9sZEJpZBoMCgFiEgdhZGRyZXNzGgwKAWMSByRtYXRjaDAaBgoBZBIBdBoGCgFlEgFpGgoKAWYSBXZhbHVlGhIKAWcSDWNhbGxlckFkZHJlc3MaCwoBaBIGb2xkQmlkAAAAAQEAAAABYQAAAAEAAAABYgQAAAABYwkABBoAAAACBQAAAAR0aGlzCQABLAAAAAIFAAAAAWICAAAABF9iaWQDCQAAAQAAAAIFAAAAAWMCAAAAA0ludAQAAAABZAUAAAABYwUAAAABZAcAAAABAAAAAWUBAAAAA2JpZAAAAAEAAAABZgQAAAABZwkAAlgAAAABCAgFAAAAAWUAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAFoCQEAAAABYQAAAAEFAAAAAWcDBwkAAAIAAAABAgAAABJiZXQgYWxyZWFkeSBwbGFjZWQJAAUUAAAAAgkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACBQAAAAFnAgAAAARfYmlkBQAAAAFmBQAAAANuaWwFAAAAAWYAAAAAqEcmug==",
"height": 1834341,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: none
Next: none
Full:
Old | New | | Differences |
---|
1 | | - | # no script |
---|
| 1 | + | {-# STDLIB_VERSION 5 #-} |
---|
| 2 | + | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
| 3 | + | {-# CONTENT_TYPE DAPP #-} |
---|
| 4 | + | func getOldBid (address) = match getInteger(this, (address + "_bid")) { |
---|
| 5 | + | case t: Int => |
---|
| 6 | + | t |
---|
| 7 | + | case _ => |
---|
| 8 | + | false |
---|
| 9 | + | } |
---|
| 10 | + | |
---|
| 11 | + | |
---|
| 12 | + | @Callable(i) |
---|
| 13 | + | func bid (value) = { |
---|
| 14 | + | let callerAddress = toBase58String(i.caller.bytes) |
---|
| 15 | + | let oldBid = getOldBid(callerAddress) |
---|
| 16 | + | if (false) |
---|
| 17 | + | then throw("bet already placed") |
---|
| 18 | + | else $Tuple2([IntegerEntry((callerAddress + "_bid"), value)], value) |
---|
| 19 | + | } |
---|
| 20 | + | |
---|
| 21 | + | |
---|