tx · 6jvmEP5PDRxMjJNrzvNChpbG33ioHx8SPF1Lvq1qXNKF 3NAoJSThEgz12iLrRFSeMZpP1mEYc4QcGa3: -0.01000000 Waves 2023.11.19 20:39 [2850573] smart account 3NAoJSThEgz12iLrRFSeMZpP1mEYc4QcGa3 > SELF 0.00000000 Waves
{ "type": 13, "id": "6jvmEP5PDRxMjJNrzvNChpbG33ioHx8SPF1Lvq1qXNKF", "fee": 1000000, "feeAssetId": null, "timestamp": 1700415600942, "version": 2, "chainId": 84, "sender": "3NAoJSThEgz12iLrRFSeMZpP1mEYc4QcGa3", "senderPublicKey": "5TXMdPyvDNfxhdixe86fk7Ya8FScpZGfZ6XNawu8sYK4", "proofs": [ "4bQ4fiLERYmnruL5xb8WfRx94hdPbBPFWPqyXgsXS9hhtYWfzHKDm4PQcCe1TTbL2ucoZYXr7c3pNSgpQwfqYAPj" ], "script": "base64:AAIFAAAAAAAAACMIAhIHCgUREQgIARIHCgUICAgICBIFCgMIAQgSBgoEAQgICAAAAAEAAAAAE3ZpYWJsZUNhbGxlckFkZHJlc3MCAAAAIzNONzNkY3YyamtUb2JkUTlUUkxTWDRQdHZxSGJqc2lLeGlQAAAABAAAAAFpAQAAAAxyZWdpc3RlckRhdGEAAAAFAAAAC2NsaWVudElucHV0AAAADW9wcG9uZW50SW5wdXQAAAACaWQAAAAKb3BwQWRkcmVzcwAAAAdsZ3RDb25kBAAAAAZjbGllbnQJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyBAAAAAR0eElkCQACWAAAAAEIBQAAAAFpAAAADXRyYW5zYWN0aW9uSWQJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgUAAAACaWQFAAAABHR4SWQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIFAAAABHR4SWQCAAAAAV8FAAAABmNsaWVudAIAAAAEX2FnZQkAAZEAAAACBQAAAAtjbGllbnRJbnB1dAAAAAAAAAA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ABHR4SWQCAAAAB19hbW91bnQFAAAABmFtb3VudAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAlyZWNpcGllbnQAAAAAAAAPQkAFAAAABHVuaXQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5+92hUg==", "height": 2850573, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8HMxtKn4835ySttFwXZ5RW1jP6frJNMhQeRiEvg6yoiX Next: ycPH1d7XV4DvEqnUqqsCJSCLz1ZyVHanqL75BM7z9gQ Diff:
Old | New | Differences | |
---|---|---|---|
33 | 33 | func PayoutUser (amount,status,id,recipientAddress) = { | |
34 | 34 | let caller = toString(i.caller) | |
35 | 35 | let txId = toBase58String(i.transactionId) | |
36 | - | let recipient = | |
36 | + | let recipient = Address(fromBase58String(recipientAddress)) | |
37 | 37 | if ((status == "error")) | |
38 | 38 | then throw("There is an error with the data") | |
39 | 39 | else if ((caller != viableCallerAddress)) | |
40 | 40 | then throw("You are not allowed to authorize payouts") | |
41 | - | else [StringEntry((id + "_payout"), txId), IntegerEntry((txId + "_amount"), amount), ScriptTransfer(Address(recipient), 1000000, unit)] | |
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)] | |
42 | 44 | } | |
43 | 45 | ||
44 | 46 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let viableCallerAddress = "3N73dcv2jkTobdQ9TRLSX4PtvqHbjsiKxiP" | |
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | 7 | func registerData (clientInput,opponentInput,id,oppAddress,lgtCond) = { | |
8 | 8 | let client = toString(i.caller) | |
9 | 9 | let txId = toBase58String(i.transactionId) | |
10 | 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 | 11 | } | |
12 | 12 | ||
13 | 13 | ||
14 | 14 | ||
15 | 15 | @Callable(i) | |
16 | 16 | func evaluatedData (prediction_id,per_one_address,per_two_address,guilty_person_address,eligible_person_address) = { | |
17 | 17 | let txId = toBase58String(i.transactionId) | |
18 | 18 | [StringEntry(prediction_id, txId), StringEntry((txId + "_guilty"), guilty_person_address), StringEntry((txId + "_eligible_payout"), eligible_person_address)] | |
19 | 19 | } | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | ||
23 | 23 | @Callable(i) | |
24 | 24 | func requestPayout (pred_txId,amount,id) = { | |
25 | 25 | let client = toString(i.caller) | |
26 | 26 | let txId = toBase58String(i.transactionId) | |
27 | 27 | [StringEntry((id + "_request_payout"), txId), IntegerEntry((txId + "_amount"), amount), StringEntry((txId + "_prediction_id"), pred_txId)] | |
28 | 28 | } | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | ||
32 | 32 | @Callable(i) | |
33 | 33 | func PayoutUser (amount,status,id,recipientAddress) = { | |
34 | 34 | let caller = toString(i.caller) | |
35 | 35 | let txId = toBase58String(i.transactionId) | |
36 | - | let recipient = | |
36 | + | let recipient = Address(fromBase58String(recipientAddress)) | |
37 | 37 | if ((status == "error")) | |
38 | 38 | then throw("There is an error with the data") | |
39 | 39 | else if ((caller != viableCallerAddress)) | |
40 | 40 | then throw("You are not allowed to authorize payouts") | |
41 | - | else [StringEntry((id + "_payout"), txId), IntegerEntry((txId + "_amount"), amount), ScriptTransfer(Address(recipient), 1000000, unit)] | |
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)] | |
42 | 44 | } | |
43 | 45 | ||
44 | 46 | ||
45 | 47 | @Verifier(tx) | |
46 | 48 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
47 | 49 |
github/deemru/w8io/026f985 25.95 ms ◑