tx · 9qXYNkAdQtZQhJVHcmJrkYijkRo2H8RivtRTzEm2enE8

3MtsQpwSQr7knQgF1Mzdc3nd7ms3JEKo7B8:  -0.01000000 Waves

2023.02.05 01:38 [2435496] smart account 3MtsQpwSQr7knQgF1Mzdc3nd7ms3JEKo7B8 > SELF 0.00000000 Waves

{ "type": 13, "id": "9qXYNkAdQtZQhJVHcmJrkYijkRo2H8RivtRTzEm2enE8", "fee": 1000000, "feeAssetId": null, "timestamp": 1675550372749, "version": 2, "chainId": 84, "sender": "3MtsQpwSQr7knQgF1Mzdc3nd7ms3JEKo7B8", "senderPublicKey": "DBrgC8MVcZdynxH3pXpNcQcSP3CSPx1oeHWTjdWKatxF", "proofs": [ "MEuEwxfEmkEjtv2tmfcCHWj8VJUVTTp8C1gurmPtYv53To2ZSpBcfBrTCFNn6kRNeQ4ucfGwFJkv42SK71rs3V4" ], "script": "base64:AAIFAAAAAAAAAAgIAhIECgIYGAAAAAIBAAAAB2dldERhdGEAAAACAAAAA2FkcgAAAANrZXkEAAAABGRhdGEEAAAAByRtYXRjaDAJAAQbAAAAAgUAAAADYWRyBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAB0Jvb2xlYW4EAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEHBQAAAARkYXRhAQAAAAhhdXRoVXNlcgAAAAEAAAABaQQAAAASZWdnZXJQdWJsaWNLZXlIYXNoCQAB9wAAAAEIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQQAAAAjZWdnZXJQdWJsaWNLZXlIYXNoT25TdXBwbGllckFjY291bnQJAQAAABFAZXh0ck5hdGl2ZSgxMDUyKQAAAAIFAAAABHRoaXMCAAAAFGNvbm5lY3Rpb24uRWdnZXIucmVmAwkAAAAAAAACBQAAACNlZ2dlclB1YmxpY0tleUhhc2hPblN1cHBsaWVyQWNjb3VudAUAAAASZWdnZXJQdWJsaWNLZXlIYXNoBgkAAAIAAAABAgAAAD1BY2NvdW50IGhhdCBuaW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wXzEAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACBQAAAAUkYWNjMAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAgAAAAAAAAAAAwAAAAAAAAAABAAAAAAAAAAABQAAAAAAAAAABgAAAAAAAAAABwAAAAAAAAAACAAAAAAAAAAACQAAAAAAAAAACggFAAAAAXIAAAACXzEAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleSHM4JU=", "height": 2435496, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9tpUKcQVGhuycuVzhSEuKhsdpGLa8VYP4J1mAMzdsVkc Next: Dx2W2axuJzX9PE9vCoiLigzwqaFQ7UrMxqCfTpqxXqj Diff:
OldNewDifferences
1212 }
1313
1414
15+func authUser (i) = {
16+ let eggerPublicKeyHash = sha256(i.callerPublicKey)
17+ let eggerPublicKeyHashOnSupplierAccount = getBinaryValue(this, "connection.Egger.ref")
18+ if ((eggerPublicKeyHashOnSupplierAccount == eggerPublicKeyHash))
19+ then true
20+ else throw("Account hat nicht die nötige Berechtigung für diese Aktion.")
21+ }
22+
23+
1524 @Callable(i)
1625 func saveListOnSupplierAccount (keys,values) = {
26+ let authenticated = authUser(i)
1727 func addStringEntry (accum,nextValue) = {
18- let $t0500523 = accum
19- let result = $t0500523._1
20- let j = $t0500523._2
28+ let $t09771000 = accum
29+ let result = $t09771000._1
30+ let j = $t09771000._2
2131 $Tuple2((result :+ StringEntry(keys[j], nextValue)), (j + 1))
2232 }
2333
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getData (adr,key) = {
55 let data = match getBoolean(adr, key) {
66 case a: Boolean =>
77 a
88 case _ =>
99 false
1010 }
1111 data
1212 }
1313
1414
15+func authUser (i) = {
16+ let eggerPublicKeyHash = sha256(i.callerPublicKey)
17+ let eggerPublicKeyHashOnSupplierAccount = getBinaryValue(this, "connection.Egger.ref")
18+ if ((eggerPublicKeyHashOnSupplierAccount == eggerPublicKeyHash))
19+ then true
20+ else throw("Account hat nicht die nötige Berechtigung für diese Aktion.")
21+ }
22+
23+
1524 @Callable(i)
1625 func saveListOnSupplierAccount (keys,values) = {
26+ let authenticated = authUser(i)
1727 func addStringEntry (accum,nextValue) = {
18- let $t0500523 = accum
19- let result = $t0500523._1
20- let j = $t0500523._2
28+ let $t09771000 = accum
29+ let result = $t09771000._1
30+ let j = $t09771000._2
2131 $Tuple2((result :+ StringEntry(keys[j], nextValue)), (j + 1))
2232 }
2333
2434 let r = {
2535 let $l = values
2636 let $s = size($l)
2737 let $acc0 = $Tuple2(nil, 0)
2838 func $f0_1 ($a,$i) = if (($i >= $s))
2939 then $a
3040 else addStringEntry($a, $l[$i])
3141
3242 func $f0_2 ($a,$i) = if (($i >= $s))
3343 then $a
3444 else throw("List size exceeds 10")
3545
3646 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
3747 }
3848 r._1
3949 }
4050
4151
4252 @Verifier(tx)
4353 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
4454

github/deemru/w8io/026f985 
28.08 ms