tx · 89y9eg7Kx7BUP1VBgSA6bqcC6wEaVwPpbKGkeYCG7jkp

3My9gyZE1qYKsCtVCWWawEKmYTozn25fe7A:  -0.01400000 Waves

2020.12.13 14:40 [1306868] smart account 3My9gyZE1qYKsCtVCWWawEKmYTozn25fe7A > SELF 0.00000000 Waves

{ "type": 13, "id": "89y9eg7Kx7BUP1VBgSA6bqcC6wEaVwPpbKGkeYCG7jkp", "fee": 1400000, "feeAssetId": null, "timestamp": 1607859622954, "version": 2, "chainId": 84, "sender": "3My9gyZE1qYKsCtVCWWawEKmYTozn25fe7A", "senderPublicKey": "3ugY6FcewrehbRyn2AHQdV4kxmZsXKpx7W2u6ZzVF7Vx", "proofs": [ "2iKWH9DEGrcMjbHYMLRYawHp5apt3pLpgXXxEn4QRZZQxK5wjoaAsei2TzDWaSvDCwmUJHcquHkbcHLYBCMBds9v" ], "script": "base64:AAIEAAAAAAAAAAoIAhIGCgQIAQEBAAAADQAAAAALYWRtaW5QdWJLZXkCAAAAIzNNeTlneVpFMXFZS3NDdFZDV1dhd0VLbVlUb3puMjVmZTdBAQAAABhnZXROdW1iZXJCeUFkZHJlc3NBbmRLZXkAAAACAAAAB2FkZHJlc3MAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEGgAAAAIJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAEFAAAAB2FkZHJlc3MFAAAAA2tleQAAAAAAAAAAAAEAAAAYZ2V0U3RyaW5nQnlBZGRyZXNzQW5kS2V5AAAAAgAAAAdhZGRyZXNzAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABB0AAAACCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABBQAAAAdhZGRyZXNzBQAAAANrZXkCAAAAAAEAAAAWZ2V0Qm9vbEJ5QWRkcmVzc0FuZEtleQAAAAIAAAAHYWRkcmVzcwAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQbAAAAAgkBAAAAEUBleHRyT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zdAkABLUAAAACBQAAAAlhZGRyZXNzZXMCAAAAASwDCQEAAAAPY29udGFpbnNFbGVtZW50AAAAAgUAAAANYWRkcmVzc2VzTGlzdAUAAAAJY2FsbGVyU3RyCQAAAgAAAAECAAAAKkVycm9yISBDYWxsZXIgY2FuIG5vdCBiZSBpbiBhZGRyZXNzZXMgbGlzdAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQEAAAAPZ2V0S2V5QWRkcmVzc2VzAAAAAQUAAAAJY2FsbGVyU3RyBQAAAAlhZGRyZXNzZXMJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAQAAAA5nZXRLZXlEaXNjb3VudAAAAAEFAAAACWNhbGxlclN0cgUAAAAIZGlzY291bnQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAQAAAAxnZXRLZXlBbW91bnQAAAABBQAAAAljYWxsZXJTdHIFAAAABmFtb3VudAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkBAAAAEmdldEtleUVuZFRpbWVzdGFtcAAAAAEFAAAACWNhbGxlclN0cgUAAAAMZW5kVGltZXN0YW1wBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleX9Wv5U=", "height": 1306868, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8jMkibRQgDpNix6MaZctJv2fjSCvRVCSvzQ11NT81Tgg Next: J9ZUch8L3mCACuMFiWxifFGjutgBnMo4K3GcBw4fG89T Diff:
OldNewDifferences
3030 func getKeyAddresses (key) = (key + "_addressesList")
3131
3232
33+func getKeyDiscount (key) = (key + "_discount")
34+
35+
36+func getKeyAmount (key) = (key + "_amount")
37+
38+
39+func getKeyEndTimestamp (key) = (key + "_endTimestamp")
40+
41+
3342 @Callable(i)
34-func addAuction (addresses) = {
43+func addAuction (addresses,discount,amount,endTimestamp) = {
3544 let callerStr = toBase58String(i.caller.bytes)
36- let addressesStr = makeString(addresses, ",")
37-[StringEntry(getKeyAddresses(callerStr), addressesStr)]
45+ let addressesList = split(addresses, ",")
46+ if (containsElement(addressesList, callerStr))
47+ then throw("Error! Caller can not be in addresses list")
48+ else [StringEntry(getKeyAddresses(callerStr), addresses), IntegerEntry(getKeyDiscount(callerStr), discount), IntegerEntry(getKeyAmount(callerStr), amount), IntegerEntry(getKeyEndTimestamp(callerStr), endTimestamp)]
3849 }
3950
4051
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let adminPubKey = "3My9gyZE1qYKsCtVCWWawEKmYTozn25fe7A"
55
66 func getNumberByAddressAndKey (address,key) = valueOrElse(getInteger(addressFromStringValue(address), key), 0)
77
88
99 func getStringByAddressAndKey (address,key) = valueOrElse(getString(addressFromStringValue(address), key), "")
1010
1111
1212 func getBoolByAddressAndKey (address,key) = valueOrElse(getBoolean(addressFromStringValue(address), key), false)
1313
1414
1515 func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0)
1616
1717
1818 func getStringByKey (key) = valueOrElse(getString(this, key), "")
1919
2020
2121 func getBoolByKey (key) = valueOrElse(getBoolean(this, key), false)
2222
2323
2424 func getKeyCustomerName (key) = (key + "_customerName")
2525
2626
2727 func getKeyCustomerRequisits (key) = (key + "_customerReq")
2828
2929
3030 func getKeyAddresses (key) = (key + "_addressesList")
3131
3232
33+func getKeyDiscount (key) = (key + "_discount")
34+
35+
36+func getKeyAmount (key) = (key + "_amount")
37+
38+
39+func getKeyEndTimestamp (key) = (key + "_endTimestamp")
40+
41+
3342 @Callable(i)
34-func addAuction (addresses) = {
43+func addAuction (addresses,discount,amount,endTimestamp) = {
3544 let callerStr = toBase58String(i.caller.bytes)
36- let addressesStr = makeString(addresses, ",")
37-[StringEntry(getKeyAddresses(callerStr), addressesStr)]
45+ let addressesList = split(addresses, ",")
46+ if (containsElement(addressesList, callerStr))
47+ then throw("Error! Caller can not be in addresses list")
48+ else [StringEntry(getKeyAddresses(callerStr), addresses), IntegerEntry(getKeyDiscount(callerStr), discount), IntegerEntry(getKeyAmount(callerStr), amount), IntegerEntry(getKeyEndTimestamp(callerStr), endTimestamp)]
3849 }
3950
4051
4152 @Verifier(tx)
4253 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
4354

github/deemru/w8io/169f3d6 
23.36 ms