tx · vtoCCpzNizbevCMUG4vzNwAraP8ruVgTfCGgGpHdGNa

3N81rtbVaBBCFJV79mTsSEy1GTn7pZiEMaG:  -0.05000000 Waves

2022.04.10 11:10 [2002224] smart account 3N81rtbVaBBCFJV79mTsSEy1GTn7pZiEMaG > SELF 0.00000000 Waves

{ "type": 13, "id": "vtoCCpzNizbevCMUG4vzNwAraP8ruVgTfCGgGpHdGNa", "fee": 5000000, "feeAssetId": null, "timestamp": 1649578216499, "version": 2, "chainId": 84, "sender": "3N81rtbVaBBCFJV79mTsSEy1GTn7pZiEMaG", "senderPublicKey": "Gjvg3XWonvtwS11qYisF5ctyEfXSdfGFc89vdwQ15rgs", "proofs": [ "5rdddsPdUfFCodMuqnaB8WGbTUyzzdTsrbmidoWRenoi5twhh7DGsyEjvGFm5GPYvxXNCNUenCJ56ZADgWK2pJ4N" ], "script": "base64:AAIFAAAAAAAAANUIAhIAEgAaCAoBYRIDQVBQGgsKAWISBkRPTkFURRoSCgFjEg10cnlHZXRJbnRlZ2VyGggKAWQSA2tleRoICgFlEgN2YWwaDAoBZhIHJG1hdGNoMBoGCgFnEgFiGgYKAWgSAWkaCAoBaRIDcG10GgsKAWoSBmFtb3VudBoRCgFrEgxjdXJyZW50VmFsdWUaCwoBbBIGbmV3VmFsGhIKAW0SDWNhbGxlckFkZHJlc3MaDwoBbhIKYXBwQWRkcmVzcxoHCgFvEgJ0eBoLCgFwEgZ2ZXJpZnkAAAADAAAAAAFhAQAAABoBVMaKAQxN6ucN17nYrm3GRhXIB6PoszBfsQAAAAABYgEAAAAaAVQ5nlzIm5WiZ3Y4LveGIZcS/w2qhE5DsSABAAAAAWMAAAABAAAAAWQEAAAAAWUEAAAAAWYJAAQaAAAAAgUAAAAEdGhpcwUAAAABZAMJAAABAAAAAgUAAAABZgIAAAADSW50BAAAAAFnBQAAAAFmBQAAAAFnAAAAAAAAAAAABQAAAAFlAAAAAgAAAAFoAQAAAARzZW5kAAAAAAQAAAABaQkBAAAABXZhbHVlAAAAAQkAAZEAAAACCAUAAAABaAAAAAhwYXltZW50cwAAAAAAAAAAAAQAAAABaggFAAAAAWkAAAAGYW1vdW50BAAAAAFrCQEAAAABYwAAAAECAAAABXZhbHVlBAAAAAFsCQAAZAAAAAIFAAAAAWsFAAAAAWoJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAABXZhbHVlBQAAAAFrBQAAAANuaWwAAAABaAEAAAAGZG9uYXRlAAAAAAQAAAABbQkAAlgAAAABCAgFAAAAAWgAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAFuCQACWAAAAAEFAAAAAWEEAAAAAWsJAQAAAAFjAAAAAQIAAAAFdmFsdWUDCQAAAAAAAAIFAAAAAW0FAAAAAW4DCQAAZgAAAAIFAAAAAWsAAAAAAAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAB0FkZHJlc3MAAAABBQAAAAFiBQAAAAFrBQAAAAR1bml0CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAAAV2YWx1ZQAAAAAAAAAAAAUAAAADbmlsCQAAAgAAAAECAAAAD05vdCBlbm91Z2ggZnVuZAkAAAIAAAABAgAAABhPbmx5IE93bmVyIGNhbiBjYWxsIHRoaXMAAAABAAAAAW8BAAAAAXAAAAAACQAB9AAAAAMIBQAAAAFvAAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAABbwAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAFvAAAAD3NlbmRlclB1YmxpY0tleRgf/KQ=", "height": 2002224, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: D5nLT9vp8ZBBHGFJvgYkPrwWYReSDDN8zizQfFYsXye Next: 6iFZyLLmhFGTNVNzbFtYjgjPJY2bk8j6xmfba1fWCwnK Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let APP = base58'3N81rtbVaBBCFJV79mTsSEy1GTn7pZiEMaG'
55
66 let DONATE = base58'3MuAk151ARFqSSJVvmi9jnnB2CpHEAFJZvw'
77
88 func tryGetInteger (key) = {
99 let val = match getInteger(this, key) {
1010 case b: Int =>
1111 b
1212 case _ =>
1313 0
1414 }
1515 val
1616 }
1717
1818
1919 @Callable(i)
2020 func send () = {
2121 let pmt = value(i.payments[0])
2222 let amount = pmt.amount
2323 let currentValue = tryGetInteger("value")
2424 let newVal = (currentValue + amount)
2525 [IntegerEntry("value", currentValue)]
2626 }
2727
2828
2929
3030 @Callable(i)
3131 func donate () = {
3232 let callerAddress = toBase58String(i.caller.bytes)
3333 let appAddress = toBase58String(APP)
3434 let currentValue = tryGetInteger("value")
3535 if ((callerAddress == appAddress))
3636 then if ((currentValue > 1))
3737 then [ScriptTransfer(Address(DONATE), currentValue, unit), IntegerEntry("value", 0)]
3838 else throw("Not enough fund")
3939 else throw("Only Owner can call this")
4040 }
4141
4242
4343 @Verifier(tx)
4444 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
4545

github/deemru/w8io/026f985 
24.09 ms