tx · DEUtrj42Tk2c1F2bXKzdrtexzYbfF8dRygvYJwwRo8XF
3MxorpV6jKdNhrzHSujnjVXu7fr8PCHhMwi: -0.01400000 Waves
2019.08.28 04:50 [650411] smart account 3MxorpV6jKdNhrzHSujnjVXu7fr8PCHhMwi > SELF 0.00000000 Waves
{
"type": 13,
"id": "DEUtrj42Tk2c1F2bXKzdrtexzYbfF8dRygvYJwwRo8XF",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1566957105155,
"version": 1,
"sender": "3MxorpV6jKdNhrzHSujnjVXu7fr8PCHhMwi",
"senderPublicKey": "BZT5fzv8ZeHVn8xAGZVXZHUvoAkdRNCbtEuBn3pCuXEH",
"proofs": [
"5mKkpKFFiWT3hi1Dv4Fuza6sKjbKkdfUBLQroLCzMdDHGiecTASipe9gqCMemqAh195ghW3QJ1We2yNWbLLM4Gzq"
],
"script": "base64:AAIDAAAAAAAAAAAAAAACAAAAAA5vd25lclB1YmxpY0tleQEAAAAgnOTxzRGlQL/gVO1uf4r6ecWijHA9iBu9xK1V+iHbiGoAAAAAD3ZiRGVwbG95TWVzc2FnZQIAAAAIZGVwbG95ZWQAAAABAAAAAWkBAAAACGRpc3BlbnNlAAAAAAQAAAAEcGFpZAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50BAAAAAZzaXppbmcDCQAAAAAAAAIIBQAAAARwYWlkAAAABmFtb3VudAAAAAAABfXhAAIAAAABUwMJAAAAAAAAAggFAAAABHBhaWQAAAAGYW1vdW50AAAAAAAL68IAAgAAAAFNAwkAAAAAAAACCAUAAAAEcGFpZAAAAAZhbW91bnQAAAAAABfXhAACAAAAAUwCAAAABWVycm9yAwkAAAAAAAACBQAAAAZzaXppbmcCAAAABWVycm9yCQAAAgAAAAECAAAAE1VucmVjb2duaXplZCBzaXppbmcJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyCAUAAAAEcGFpZAAAAAZhbW91bnQFAAAABHVuaXQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAABZAUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAADm93bmVyUHVibGljS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24EAAAAAWQFAAAAByRtYXRjaDAGAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAFkBQAAAAckbWF0Y2gwBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAQSXNzdWVUcmFuc2FjdGlvbgQAAAABZAUAAAAHJG1hdGNoMAYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAElJlaXNzdWVUcmFuc2FjdGlvbgQAAAABZAUAAAAHJG1hdGNoMAYHcNP+0w==",
"chainId": 84,
"height": 650411,
"spentComplexity": 0
}
View: original | compacted
Prev: FSVtayiE8kx7MN1pmrf4sPKkaWjKaTvDeEKDhjhtkefP
Next: DdBzQrF2G2LHPC117WTU4wYnEkVyhHKy36VCvs2cRDLP
Diff:
Old | New | | Differences |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let ownerPublicKey = base58'BZT5fzv8ZeHVn8xAGZVXZHUvoAkdRNCbtEuBn3pCuXEH' |
---|
5 | 5 | | |
---|
6 | | - | let vbDeploy = "deployed" |
---|
| 6 | + | let vbDeployMessage = "deployed" |
---|
7 | 7 | | |
---|
8 | 8 | | @Callable(i) |
---|
9 | | - | func dispense (boxSize) = { |
---|
10 | | - | let x = "nothing" |
---|
11 | | - | if ((x != "nothing")) |
---|
12 | | - | then throw("x is not nothing") |
---|
13 | | - | else throw("x is something") |
---|
| 9 | + | func dispense () = { |
---|
| 10 | + | let paid = extract(i.payment) |
---|
| 11 | + | let sizing = if ((paid.amount == 100000000)) |
---|
| 12 | + | then "S" |
---|
| 13 | + | else if ((paid.amount == 200000000)) |
---|
| 14 | + | then "M" |
---|
| 15 | + | else if ((paid.amount == 400000000)) |
---|
| 16 | + | then "L" |
---|
| 17 | + | else "error" |
---|
| 18 | + | if ((sizing == "error")) |
---|
| 19 | + | then throw("Unrecognized sizing") |
---|
| 20 | + | else TransferSet([ScriptTransfer(i.caller, paid.amount, unit)]) |
---|
14 | 21 | | } |
---|
15 | 22 | | |
---|
16 | 23 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let ownerPublicKey = base58'BZT5fzv8ZeHVn8xAGZVXZHUvoAkdRNCbtEuBn3pCuXEH' |
---|
5 | 5 | | |
---|
6 | | - | let vbDeploy = "deployed" |
---|
| 6 | + | let vbDeployMessage = "deployed" |
---|
7 | 7 | | |
---|
8 | 8 | | @Callable(i) |
---|
9 | | - | func dispense (boxSize) = { |
---|
10 | | - | let x = "nothing" |
---|
11 | | - | if ((x != "nothing")) |
---|
12 | | - | then throw("x is not nothing") |
---|
13 | | - | else throw("x is something") |
---|
| 9 | + | func dispense () = { |
---|
| 10 | + | let paid = extract(i.payment) |
---|
| 11 | + | let sizing = if ((paid.amount == 100000000)) |
---|
| 12 | + | then "S" |
---|
| 13 | + | else if ((paid.amount == 200000000)) |
---|
| 14 | + | then "M" |
---|
| 15 | + | else if ((paid.amount == 400000000)) |
---|
| 16 | + | then "L" |
---|
| 17 | + | else "error" |
---|
| 18 | + | if ((sizing == "error")) |
---|
| 19 | + | then throw("Unrecognized sizing") |
---|
| 20 | + | else TransferSet([ScriptTransfer(i.caller, paid.amount, unit)]) |
---|
14 | 21 | | } |
---|
15 | 22 | | |
---|
16 | 23 | | |
---|
17 | 24 | | @Verifier(tx) |
---|
18 | 25 | | func verify () = match tx { |
---|
19 | 26 | | case d: SetScriptTransaction => |
---|
20 | 27 | | sigVerify(tx.bodyBytes, tx.proofs[0], ownerPublicKey) |
---|
21 | 28 | | case d: DataTransaction => |
---|
22 | 29 | | true |
---|
23 | 30 | | case d: TransferTransaction => |
---|
24 | 31 | | true |
---|
25 | 32 | | case d: IssueTransaction => |
---|
26 | 33 | | true |
---|
27 | 34 | | case d: ReissueTransaction => |
---|
28 | 35 | | true |
---|
29 | 36 | | case _ => |
---|
30 | 37 | | false |
---|
31 | 38 | | } |
---|
32 | 39 | | |
---|