tx · BndEjHRpeAJUBX6enaY41EDbe1bpD2pmajTjoVh774nX 3Moz6HJhucpFh4V3VScXhd9efei4Curytfj: -0.01000000 Waves 2023.11.23 12:09 [2855827] smart account 3Moz6HJhucpFh4V3VScXhd9efei4Curytfj > SELF 0.00000000 Waves
{ "type": 13, "id": "BndEjHRpeAJUBX6enaY41EDbe1bpD2pmajTjoVh774nX", "fee": 1000000, "feeAssetId": null, "timestamp": 1700730552127, "version": 2, "chainId": 84, "sender": "3Moz6HJhucpFh4V3VScXhd9efei4Curytfj", "senderPublicKey": "Ec1VLg3r1E7mwHmaNidmoKrFAUJ55UVJFq3J1YKRy5Zm", "proofs": [ "4cDbmKP3fCBS5JZmrLbtNjBNNEnQdnnLG5UV2jDJmP6K7nvdBuDx9Ze28V19jDpQaUH7AkCiiWGHJJ5FxLx4SLCb" ], "script": "base64:AAIFAAAAAAAAAAQIAhIAAAAAAAAAAAEAAAABaQEAAAAEY2FsbAAAAAAEAAAABWFzc2V0CQAEQwAAAAcCAAAABUFzc2V0AgAAAAAAAAAAAAAAAAEAAAAAAAAAAAAGBQAAAAR1bml0AAAAAAAAAAAABAAAAAdhc3NldElkCQAEOAAAAAEFAAAABWFzc2V0BAAAAARkYXBwCQACWQAAAAECAAAAIzNONzNkY3YyamtUb2JkUTlUUkxTWDRQdHZxSGJqc2lLeGlQBAAAAAF6CQAD/AAAAAQJAQAAAAdBZGRyZXNzAAAAAQUAAAAEZGFwcAIAAAAEY2FsbAUAAAADbmlsBQAAAANuaWwJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAAFVGVzdDMCAAAABVRlc3Q0CQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAICAAAABVRlc3Q0AgAAAAVUZXN0NQUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkybl7G", "height": 2855827, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CWc44LPN52RahNwFtpagyUSQapRdnDVnf79eR4bcnUwU Next: DhQYGWcEGeMafsU9yBzeVcuBiMyNbPMv7JT6nZRaBdra Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let viableCallerAddress = "3N73dcv2jkTobdQ9TRLSX4PtvqHbjsiKxiP" | |
5 | - | ||
6 | - | @Callable(i) | |
7 | - | func registerData (clientInput,opponentInput,id,oppAddress,lgtCond) = { | |
8 | - | let client = toString(i.caller) | |
9 | - | let txId = toBase58String(i.transactionId) | |
10 | - | [StringEntry(id, txId), IntegerEntry((((txId + "_") + client) + "_age"), clientInput[0]), IntegerEntry((((txId + "_") + client) + "_sex"), clientInput[1]), IntegerEntry((((txId + "_") + client) + "_damage"), clientInput[2]), IntegerEntry((((txId + "_") + client) + "_fac1"), clientInput[3]), IntegerEntry((((txId + "_") + client) + "_fac2"), clientInput[4]), IntegerEntry((((txId + "_") + client) + "_fac3"), clientInput[5]), IntegerEntry((((txId + "_") + client) + "_fac4"), clientInput[6]), IntegerEntry((((txId + "_") + client) + "_vio1"), clientInput[7]), IntegerEntry((((txId + "_") + client) + "_vio2"), clientInput[8]), IntegerEntry((((txId + "_") + client) + "_vio3"), clientInput[9]), IntegerEntry((((txId + "_") + client) + "_vio4"), clientInput[10]), IntegerEntry((((txId + "_") + oppAddress) + "_age"), opponentInput[0]), IntegerEntry((((txId + "_") + oppAddress) + "_sex"), opponentInput[1]), IntegerEntry((((txId + "_") + oppAddress) + "_damage"), opponentInput[2]), IntegerEntry((((txId + "_") + oppAddress) + "_fac1"), opponentInput[3]), IntegerEntry((((txId + "_") + oppAddress) + "_fac2"), opponentInput[4]), IntegerEntry((((txId + "_") + oppAddress) + "_fac3"), opponentInput[5]), IntegerEntry((((txId + "_") + oppAddress) + "_fac4"), opponentInput[6]), IntegerEntry((((txId + "_") + oppAddress) + "_vio1"), opponentInput[7]), IntegerEntry((((txId + "_") + oppAddress) + "_vio2"), opponentInput[8]), IntegerEntry((((txId + "_") + oppAddress) + "_vio3"), opponentInput[9]), IntegerEntry((((txId + "_") + oppAddress) + "_vio4"), opponentInput[10]), IntegerEntry((txId + "_lgt"), lgtCond)] | |
11 | - | } | |
12 | - | ||
13 | 4 | ||
14 | 5 | ||
15 | 6 | @Callable(i) | |
16 | - | func evaluatedData (prediction_id,per_one_address,per_two_address,guilty_person_address,eligible_person_address) = { | |
17 | - | let txId = toBase58String(i.transactionId) | |
18 | - | [StringEntry(prediction_id, txId), StringEntry((txId + "_guilty"), guilty_person_address), StringEntry((txId + "_eligible_payout"), eligible_person_address)] | |
19 | - | } | |
20 | - | ||
21 | - | ||
22 | - | ||
23 | - | @Callable(i) | |
24 | - | func requestPayout (pred_txId,amount,id) = { | |
25 | - | let client = toString(i.caller) | |
26 | - | let txId = toBase58String(i.transactionId) | |
27 | - | [StringEntry((id + "_request_payout"), txId), IntegerEntry((txId + "_amount"), amount), StringEntry((txId + "_prediction_id"), pred_txId)] | |
28 | - | } | |
29 | - | ||
30 | - | ||
31 | - | ||
32 | - | @Callable(i) | |
33 | - | func PayoutUser (amount,status,id,recipientAddress) = { | |
34 | - | let caller = toString(i.caller) | |
35 | - | let txId = toBase58String(i.transactionId) | |
36 | - | let recipient = Address(fromBase58String(recipientAddress)) | |
37 | - | if ((status == "error")) | |
38 | - | then throw("There is an error with the data") | |
39 | - | else if ((caller != viableCallerAddress)) | |
40 | - | then throw("You are not allowed to authorize payouts") | |
41 | - | else if ((size(fromBase58String(recipientAddress)) != 26)) | |
42 | - | then throw("Invalid recipient address length") | |
43 | - | else [StringEntry((id + "_payout"), txId), IntegerEntry((txId + "_amount"), amount), ScriptTransfer(recipient, 1000000, unit)] | |
7 | + | func call () = { | |
8 | + | let asset = Issue("Asset", "", 1, 0, true, unit, 0) | |
9 | + | let assetId = calculateAssetId(asset) | |
10 | + | let dapp = fromBase58String("3N73dcv2jkTobdQ9TRLSX4PtvqHbjsiKxiP") | |
11 | + | let z = invoke(Address(dapp), "call", nil, nil) | |
12 | + | [StringEntry("Test3", "Test4"), StringEntry("Test4", "Test5")] | |
44 | 13 | } | |
45 | 14 | ||
46 | 15 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let viableCallerAddress = "3N73dcv2jkTobdQ9TRLSX4PtvqHbjsiKxiP" | |
5 | - | ||
6 | - | @Callable(i) | |
7 | - | func registerData (clientInput,opponentInput,id,oppAddress,lgtCond) = { | |
8 | - | let client = toString(i.caller) | |
9 | - | let txId = toBase58String(i.transactionId) | |
10 | - | [StringEntry(id, txId), IntegerEntry((((txId + "_") + client) + "_age"), clientInput[0]), IntegerEntry((((txId + "_") + client) + "_sex"), clientInput[1]), IntegerEntry((((txId + "_") + client) + "_damage"), clientInput[2]), IntegerEntry((((txId + "_") + client) + "_fac1"), clientInput[3]), IntegerEntry((((txId + "_") + client) + "_fac2"), clientInput[4]), IntegerEntry((((txId + "_") + client) + "_fac3"), clientInput[5]), IntegerEntry((((txId + "_") + client) + "_fac4"), clientInput[6]), IntegerEntry((((txId + "_") + client) + "_vio1"), clientInput[7]), IntegerEntry((((txId + "_") + client) + "_vio2"), clientInput[8]), IntegerEntry((((txId + "_") + client) + "_vio3"), clientInput[9]), IntegerEntry((((txId + "_") + client) + "_vio4"), clientInput[10]), IntegerEntry((((txId + "_") + oppAddress) + "_age"), opponentInput[0]), IntegerEntry((((txId + "_") + oppAddress) + "_sex"), opponentInput[1]), IntegerEntry((((txId + "_") + oppAddress) + "_damage"), opponentInput[2]), IntegerEntry((((txId + "_") + oppAddress) + "_fac1"), opponentInput[3]), IntegerEntry((((txId + "_") + oppAddress) + "_fac2"), opponentInput[4]), IntegerEntry((((txId + "_") + oppAddress) + "_fac3"), opponentInput[5]), IntegerEntry((((txId + "_") + oppAddress) + "_fac4"), opponentInput[6]), IntegerEntry((((txId + "_") + oppAddress) + "_vio1"), opponentInput[7]), IntegerEntry((((txId + "_") + oppAddress) + "_vio2"), opponentInput[8]), IntegerEntry((((txId + "_") + oppAddress) + "_vio3"), opponentInput[9]), IntegerEntry((((txId + "_") + oppAddress) + "_vio4"), opponentInput[10]), IntegerEntry((txId + "_lgt"), lgtCond)] | |
11 | - | } | |
12 | - | ||
13 | 4 | ||
14 | 5 | ||
15 | 6 | @Callable(i) | |
16 | - | func evaluatedData (prediction_id,per_one_address,per_two_address,guilty_person_address,eligible_person_address) = { | |
17 | - | let txId = toBase58String(i.transactionId) | |
18 | - | [StringEntry(prediction_id, txId), StringEntry((txId + "_guilty"), guilty_person_address), StringEntry((txId + "_eligible_payout"), eligible_person_address)] | |
19 | - | } | |
20 | - | ||
21 | - | ||
22 | - | ||
23 | - | @Callable(i) | |
24 | - | func requestPayout (pred_txId,amount,id) = { | |
25 | - | let client = toString(i.caller) | |
26 | - | let txId = toBase58String(i.transactionId) | |
27 | - | [StringEntry((id + "_request_payout"), txId), IntegerEntry((txId + "_amount"), amount), StringEntry((txId + "_prediction_id"), pred_txId)] | |
28 | - | } | |
29 | - | ||
30 | - | ||
31 | - | ||
32 | - | @Callable(i) | |
33 | - | func PayoutUser (amount,status,id,recipientAddress) = { | |
34 | - | let caller = toString(i.caller) | |
35 | - | let txId = toBase58String(i.transactionId) | |
36 | - | let recipient = Address(fromBase58String(recipientAddress)) | |
37 | - | if ((status == "error")) | |
38 | - | then throw("There is an error with the data") | |
39 | - | else if ((caller != viableCallerAddress)) | |
40 | - | then throw("You are not allowed to authorize payouts") | |
41 | - | else if ((size(fromBase58String(recipientAddress)) != 26)) | |
42 | - | then throw("Invalid recipient address length") | |
43 | - | else [StringEntry((id + "_payout"), txId), IntegerEntry((txId + "_amount"), amount), ScriptTransfer(recipient, 1000000, unit)] | |
7 | + | func call () = { | |
8 | + | let asset = Issue("Asset", "", 1, 0, true, unit, 0) | |
9 | + | let assetId = calculateAssetId(asset) | |
10 | + | let dapp = fromBase58String("3N73dcv2jkTobdQ9TRLSX4PtvqHbjsiKxiP") | |
11 | + | let z = invoke(Address(dapp), "call", nil, nil) | |
12 | + | [StringEntry("Test3", "Test4"), StringEntry("Test4", "Test5")] | |
44 | 13 | } | |
45 | 14 | ||
46 | 15 | ||
47 | 16 | @Verifier(tx) | |
48 | 17 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
49 | 18 |
github/deemru/w8io/169f3d6 37.12 ms ◑