tx · 2H23W4DWUG6eDLto5HFRFh2J4GXZ9z8r9dduShrm954N

3NABuNeBpSvWZPDR8BN5jjSMLfMqXcodtM8:  -0.01000000 Waves

2023.07.11 01:52 [2660435] smart account 3NABuNeBpSvWZPDR8BN5jjSMLfMqXcodtM8 > SELF 0.00000000 Waves

{ "type": 13, "id": "2H23W4DWUG6eDLto5HFRFh2J4GXZ9z8r9dduShrm954N", "fee": 1000000, "feeAssetId": null, "timestamp": 1689029581251, "version": 2, "chainId": 84, "sender": "3NABuNeBpSvWZPDR8BN5jjSMLfMqXcodtM8", "senderPublicKey": "EYH5iFAFHoFTpSTn7zeh46Ao3BGNwPXNuRfMcfiGmoso", "proofs": [ "2KV7LS6jgTk7yvLXQTBMbkAm9q6w5M3YUG9FMQHe3TWJ1FyaRX5EAHziJTVbjcw3ExAbMAsVT7mehTadr3K4i3iQ" ], "script": "base64:AgQAAAALYWxpY2VQdWJLZXkBAAAAII/srqtuJxY+b7VAtXbrmDgxaamL6yTM4/8R4nx6TKsTBAAAAAlib2JQdWJLZXkBAAAAII/srqtuJxY+b7VAtXbrmDgxaamL6yTM4/8R4nx6TKsTBAAAAAthbGljZVNpZ25lZAMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAthbGljZVB1YktleQAAAAAAAAAAAQAAAAAAAAAAAAQAAAAJYm9iU2lnbmVkAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEFAAAACWJvYlB1YktleQAAAAAAAAAAAQAAAAAAAAAAAAkAAGcAAAACCQAAZAAAAAIFAAAAC2FsaWNlU2lnbmVkBQAAAAlib2JTaWduZWQAAAAAAAAAAAGoZkv2", "height": 2660435, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 63XongDSeWgRwA6Dea9rFfcc8Lc9WBvLrQ7QVLv6ELN3 Next: none Full:
OldNewDifferences
1-{-# STDLIB_VERSION 6 #-}
2-{-# SCRIPT_TYPE ACCOUNT #-}
3-{-# CONTENT_TYPE DAPP #-}
4-func amountByAddrKey (addr) = ("leaseAmt_" + addr)
5-
6-
7-@Callable(i)
8-func reLease (newAmount) = {
9- let addr = toString(i.caller)
10- let addAmount = if ((size(i.payments) == 0))
11- then 0
12- else if (if ((size(i.payments) == 1))
13- then (i.payments[0].assetId == unit)
14- else false)
15- then i.payments[0].amount
16- else throw("Wrong payment")
17- let oldUserAmount = valueOrElse(getInteger(amountByAddrKey(addr)), 0)
18- let totalAmount = valueOrElse(getInteger("totalLeaseAmt"), 0)
19- let userAmount = if ((addAmount > 0))
20- then (oldUserAmount + addAmount)
21- else min([oldUserAmount, newAmount])
22- let deltaUserAmount = (userAmount - oldUserAmount)
23- let lease = Lease(addressFromStringValue("3PnodeAddressHere"), (totalAmount + deltaUserAmount))
24- let oldLease = getBinary("leaseId")
25- if (isDefined(oldLease))
26- then [LeaseCancel(value(oldLease))]
27- else (nil ++ (if ((0 > deltaUserAmount))
28- then [ScriptTransfer(i.caller, -(deltaUserAmount), unit)]
29- else (nil ++ [lease, BinaryEntry("leaseId", calculateLeaseId(lease)), IntegerEntry("totalLeaseAmt", (totalAmount + deltaUserAmount)), IntegerEntry(amountByAddrKey(addr), userAmount)])))
30- }
31-
32-
33-@Verifier(tx)
34-func verify () = match tx {
35- case _ =>
36- sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
37-}
38-
1+{-# STDLIB_VERSION 2 #-}
2+{-# CONTENT_TYPE EXPRESSION #-}
3+let alicePubKey = base58'AgpdBVaBKiNq1p9j1MEc5K1J7gtdFtHPNMjkfFL4mfi2'
4+let bobPubKey = base58'AgpdBVaBKiNq1p9j1MEc5K1J7gtdFtHPNMjkfFL4mfi2'
5+let aliceSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], alicePubKey))
6+ then 1
7+ else 0
8+let bobSigned = if (sigVerify(tx.bodyBytes, tx.proofs[1], bobPubKey))
9+ then 1
10+ else 0
11+((aliceSigned + bobSigned) >= 1)

github/deemru/w8io/169f3d6 
25.70 ms