tx · 21yrU9gEojno6nyXtMHKa59ozXHdx3qd7vyF2CDSHJFK

3NAoJSThEgz12iLrRFSeMZpP1mEYc4QcGa3:  -0.01000000 Waves

2023.11.19 16:58 [2850352] smart account 3NAoJSThEgz12iLrRFSeMZpP1mEYc4QcGa3 > SELF 0.00000000 Waves

{ "type": 13, "id": "21yrU9gEojno6nyXtMHKa59ozXHdx3qd7vyF2CDSHJFK", "fee": 1000000, "feeAssetId": null, "timestamp": 1700402354428, "version": 2, "chainId": 84, "sender": "3NAoJSThEgz12iLrRFSeMZpP1mEYc4QcGa3", "senderPublicKey": "5TXMdPyvDNfxhdixe86fk7Ya8FScpZGfZ6XNawu8sYK4", "proofs": [ "2FmNgEQMsrk1uUSodeea5vThbLaqjQ19ahDpFsbL6f1oT1EtGzRHmh82x6UTrTHreMMKNLMSuXMgG5VaSSyDKrSp" ], "script": "base64:AAIFAAAAAAAAACIIAhIHCgUREQgIARIGCgQICAgIEgUKAwgBCBIGCgQBCAgIAAAAAQAAAAATdmlhYmxlQ2FsbGVyQWRkcmVzcwIAAAAjM043M2RjdjJqa1RvYmRROVRSTFNYNFB0dnFIYmpzaUt4aVAAAAAEAAAAAWkBAAAADHJlZ2lzdGVyRGF0YQAAAAUAAAALY2xpZW50SW5wdXQAAAANb3Bwb25lbnRJbnB1dAAAAAJpZAAAAApvcHBBZGRyZXNzAAAAB2xndENvbmQEAAAABmNsaWVudAkABCUAAAABCAUAAAABaQAAAAZjYWxsZXIEAAAABHR4SWQJAAJYAAAAAQgFAAAAAWkAAAANdHJhbnNhY3Rpb25JZAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACBQAAAAJpZAUAAAAEdHhJZAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAEdHhJZAIAAAABXwUAAAAGY2xpZW50AgAAAARfYWdlCQABkQAAAAIFAAAAC2NsaWVudElucHV0AAAAAAAAAAAACQAETAAAAAIJ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JsaWNLZXn3YzhE", "height": 2850352, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BJ8XMx67DMxUxAWV8mMvRGcbSvKPYoL81BMcPP8vRria Next: G9e3ZfJKs3pNpcezCchX2r46KcsgZKWiKs7UutUrXJT4 Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-
4+let viableCallerAddress = "3N73dcv2jkTobdQ9TRLSX4PtvqHbjsiKxiP"
55
66 @Callable(i)
77 func registerData (clientInput,opponentInput,id,oppAddress,lgtCond) = {
1919 }
2020
2121
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((id + "_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 = toBytes(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 [StringEntry((id + "_payout"), txId), IntegerEntry((txId + "_amount"), amount), ScriptTransfer(Address(recipient), 1000000, unit)]
42+ }
43+
44+
2245 @Verifier(tx)
2346 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
2447
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-
4+let viableCallerAddress = "3N73dcv2jkTobdQ9TRLSX4PtvqHbjsiKxiP"
55
66 @Callable(i)
77 func registerData (clientInput,opponentInput,id,oppAddress,lgtCond) = {
88 let client = toString(i.caller)
99 let txId = toBase58String(i.transactionId)
1010 [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)]
1111 }
1212
1313
1414
1515 @Callable(i)
1616 func evaluatedData (prediction_id,per_one_address,per_two_address,guilty_person_address) = {
1717 let txId = toBase58String(i.transactionId)
1818 [StringEntry(prediction_id, txId), StringEntry((txId + "_guilty"), guilty_person_address)]
1919 }
2020
2121
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((id + "_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 = toBytes(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 [StringEntry((id + "_payout"), txId), IntegerEntry((txId + "_amount"), amount), ScriptTransfer(Address(recipient), 1000000, unit)]
42+ }
43+
44+
2245 @Verifier(tx)
2346 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
2447

github/deemru/w8io/026f985 
67.27 ms