tx · F3nAj4Cxtn7Qfz1BpFk2NVWkop5oZsmmpQBrbct1QfYt

3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp:  -0.01400000 Waves

2021.04.18 04:31 [1487247] smart account 3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp > SELF 0.00000000 Waves

{ "type": 13, "id": "F3nAj4Cxtn7Qfz1BpFk2NVWkop5oZsmmpQBrbct1QfYt", "fee": 1400000, "feeAssetId": null, "timestamp": 1618709495904, "version": 2, "chainId": 84, "sender": "3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp", "senderPublicKey": "ECgJ5aXMvEomM6yWA4tsqXdM3az7ddLr4cLr3yNJwJUb", "proofs": [ "wfrBS1bSvzpNtM4mFys6X7RNuzb6Y7ftKGw6WMf1mAY11CRjwZ9qiaoGpi9o1yLHmcDt8cpm8wzFyJUfEtpbqBi" ], "script": "base64:AAIEAAAAAAAAABIIAhIFCgMIAQESBwoFCAEBAQgAAAACAAAAAAZwYXI3SWQBAAAAIJedbhD+DwLKhAB/H26DYx4Zv6xpfO57kM3OSOXSB0EjAQAAAAdjdXJyZW50AAAAAQAAAAFpBAAAAANwbXQJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAADCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQACWAAAAAEJAQAAAAV2YWx1ZQAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAIAAAAFV0FWRVMAAAACAAAAAWkBAAAADnNwb25zb3JEZXBvc2l0AAAAAwAAAAtjb21wZU51bWJlcgAAABFjb21wZUVuZFRpbWVzdGFtcAAAAAl0aW1lc3RhbXAEAAAAA3BtdAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAQAAAAJY3VycmVudElkCQEAAAAHY3VycmVudAAAAAEFAAAAAWkDCQAAZgAAAAIFAAAACXRpbWVzdGFtcAUAAAARY29tcGVFbmRUaW1lc3Rhb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NlbmRlclB1YmxpY0tleXav/UY=", "height": 1487247, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AMwredNdsoVgdpu3Rb2QwXJT19PBP1iKNWb7YUSDcM6W Next: X6E65JnqjwEkFCaPxQiguZT3D6puBrd1kd5qZt5WYXE Diff:
OldNewDifferences
1919 then throw("Competition is finished")
2020 else {
2121 let currentKey = toBase58String(i.caller.bytes)
22- let currentAmount = match getInteger(this, currentKey) {
22+ let currentAmount = match getInteger(this, ((((("sponsor_" + currentKey) + "_") + currentId) + "_") + compeNumber)) {
2323 case a: Int =>
2424 a
2525 case _ =>
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let par7Id = base58'BCqo4hvDBB2dzmidJQKkVtQtkgEQVVwMy1jjV4R4tNB4'
55
66 func current (i) = {
77 let pmt = i.payments[0]
88 if (isDefined(pmt.assetId))
99 then toBase58String(value(pmt.assetId))
1010 else "WAVES"
1111 }
1212
1313
1414 @Callable(i)
1515 func sponsorDeposit (compeNumber,compeEndTimestamp,timestamp) = {
1616 let pmt = i.payments[0]
1717 let currentId = current(i)
1818 if ((timestamp > compeEndTimestamp))
1919 then throw("Competition is finished")
2020 else {
2121 let currentKey = toBase58String(i.caller.bytes)
22- let currentAmount = match getInteger(this, currentKey) {
22+ let currentAmount = match getInteger(this, ((((("sponsor_" + currentKey) + "_") + currentId) + "_") + compeNumber)) {
2323 case a: Int =>
2424 a
2525 case _ =>
2626 0
2727 }
2828 let newAmount = (currentAmount + pmt.amount)
2929 [IntegerEntry(((((("sponsor_" + currentKey) + "_") + currentId) + "_") + compeNumber), newAmount), IntegerEntry(((compeNumber + "_") + currentId), newAmount)]
3030 }
3131 }
3232
3333
3434
3535 @Callable(i)
3636 func sponsorWithdraw (compeNumber,compeStartTimestamp,timestamp,amount,assetId) = {
3737 let currentKey = toBase58String(i.caller.bytes)
3838 let currentAmount = match getInteger(this, ((((("sponsor_" + currentKey) + "_") + assetId) + "_") + compeNumber)) {
3939 case a: Int =>
4040 a
4141 case _ =>
4242 0
4343 }
4444 let newAmount = (currentAmount - amount)
4545 if ((timestamp > compeStartTimestamp))
4646 then throw("Competition has already started")
4747 else if ((0 > amount))
4848 then throw("Can't withdraw negative amount")
4949 else if ((0 > newAmount))
5050 then throw("Not enough balance")
5151 else [IntegerEntry(((((("sponsor_" + currentKey) + "_") + assetId) + "_") + compeNumber), newAmount), IntegerEntry(((compeNumber + "_") + assetId), newAmount)]
5252 }
5353
5454
5555 @Verifier(tx)
5656 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
5757

github/deemru/w8io/169f3d6 
53.89 ms