tx · EV9ioqFYaHZczFbGVeKD68SAbxAgr8jahc1QJpMchLAQ

3Mza5Ao6wJgpw1JG3jxRY1xigD44zgfhdK6:  -0.04000000 Waves

2021.11.04 15:25 [1776258] smart account 3Mza5Ao6wJgpw1JG3jxRY1xigD44zgfhdK6 > SELF 0.00000000 Waves

{ "type": 13, "id": "EV9ioqFYaHZczFbGVeKD68SAbxAgr8jahc1QJpMchLAQ", "fee": 4000000, "feeAssetId": null, "timestamp": 1636028739855, "version": 2, "chainId": 84, "sender": "3Mza5Ao6wJgpw1JG3jxRY1xigD44zgfhdK6", "senderPublicKey": "Gud7Z17wiZEMZiHRbn48k2D9H13jmLEDZZ8b7NCfjRJL", "proofs": [ "EBHr7CrrCQY1u9VkMpUsmBDxaG7Td4a31vyXGZ6NDfe7Ppzq9erqB1DFygxGitNpLYycd33MAfGcVejZNQQi97J" ], "script": "base64:AAIFAAAAAAAAABEIAhIAEgASAwoBARIECgIBCAAAAAAAAAAEAAAAAWkBAAAABGNhbGwAAAAABAAAAAVhc3NldAkABEMAAAAHAgAAAAVBc3NldAIAAAAAAAAAAAAAAAABAAAAAAAAAAAABgUAAAAEdW5pdAAAAAAAAAAAAAQAAAAHYXNzZXRJZAkABDgAAAABBQAAAAVhc3NldAkABEwAAAACCQEAAAALQmluYXJ5RW50cnkAAAACAgAAAANiaW4BAAAAAAkABEwAAAACCQEAAAAMQm9vbGVhbkVudHJ5AAAAAgIAAAAEYm9vbAYJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAA2ludAAAAAAAAAAAAQkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACAgAAAANzdHICAAAAAAkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABAgAAAANzdHIJAARMAAAAAgUAAAAFYXNzZXQJAARMAAAAAgkBAAAAB1JlaXNzdWUAAAADBQAAAAdhc3NldElkAAAAAAAAAAABBwkABEwAAAACCQEAAAAEQnVybgAAAAIFAAAAB2Fzc2V0SWQAAA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AgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAABdAUAAAAHJG1hdGNoMAMFAAAABXNtYXJ0BgUAAAAGc2Vjb25kB/ymmj8=", "height": 1776258, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6YVERfiAHCfZ1fM8Mzt5LYUodEq2mrVV9U3oFhWDaoXb Next: JBqHQLCwbB3aZ4hAR18k1BjBKy3GSepNRfpXiTGV81p9 Diff:
OldNewDifferences
5656 @Callable(i)
5757 func transfer (amount,recipient) = {
5858 let currentKey = toBase58String(i.caller.bytes)
59- let address = fromBase58String(recipient)
60- let recAddress = Address(address)
6159 let currentAmount = match getInteger(this, currentKey) {
6260 case a: Int =>
6361 a
6967 then throw("Can't withdraw negative amount")
7068 else if ((0 > newAmount))
7169 then throw("Not enough balance")
72- else $Tuple2([IntegerEntry(currentKey, newAmount), ScriptTransfer(recAddress, amount, unit)], unit)
70+ else {
71+ let recKey = toBase58String(Address(fromBase58String(recipient)).bytes)
72+ let recAmount = match getInteger(this, recKey) {
73+ case a: Int =>
74+ a
75+ case _ =>
76+ 0
77+ }
78+ $Tuple2([IntegerEntry(currentKey, newAmount), IntegerEntry(currentKey, (recAmount + amount))], unit)
79+ }
7380 }
7481
7582
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func call () = {
88 let asset = Issue("Asset", "", 1, 0, true, unit, 0)
99 let assetId = calculateAssetId(asset)
1010 [BinaryEntry("bin", base58''), BooleanEntry("bool", true), IntegerEntry("int", 1), StringEntry("str", ""), DeleteEntry("str"), asset, Reissue(assetId, 1, false), Burn(assetId, 1), ScriptTransfer(i.caller, 1, assetId)]
1111 }
1212
1313
1414
1515 @Callable(i)
1616 func deposit () = {
1717 let pmt = if ((size(i.payments) == 1))
1818 then i.payments[0]
1919 else throw("Attached payment is required")
2020 if (isDefined(pmt.assetId))
2121 then throw("works with waves only")
2222 else {
2323 let currentKey = toBase58String(i.caller.bytes)
2424 let currentAmount = match getInteger(this, currentKey) {
2525 case a: Int =>
2626 a
2727 case _ =>
2828 0
2929 }
3030 let newAmount = (currentAmount + pmt.amount)
3131 $Tuple2([IntegerEntry(currentKey, newAmount)], unit)
3232 }
3333 }
3434
3535
3636
3737 @Callable(i)
3838 func withdraw (amount) = {
3939 let currentKey = toBase58String(i.caller.bytes)
4040 let currentAmount = match getInteger(this, currentKey) {
4141 case a: Int =>
4242 a
4343 case _ =>
4444 0
4545 }
4646 let newAmount = (currentAmount - amount)
4747 if ((0 > amount))
4848 then throw("Can't withdraw negative amount")
4949 else if ((0 > newAmount))
5050 then throw("Not enough balance")
5151 else $Tuple2([IntegerEntry(currentKey, newAmount), ScriptTransfer(i.caller, amount, unit)], unit)
5252 }
5353
5454
5555
5656 @Callable(i)
5757 func transfer (amount,recipient) = {
5858 let currentKey = toBase58String(i.caller.bytes)
59- let address = fromBase58String(recipient)
60- let recAddress = Address(address)
6159 let currentAmount = match getInteger(this, currentKey) {
6260 case a: Int =>
6361 a
6462 case _ =>
6563 0
6664 }
6765 let newAmount = (currentAmount - amount)
6866 if ((0 > amount))
6967 then throw("Can't withdraw negative amount")
7068 else if ((0 > newAmount))
7169 then throw("Not enough balance")
72- else $Tuple2([IntegerEntry(currentKey, newAmount), ScriptTransfer(recAddress, amount, unit)], unit)
70+ else {
71+ let recKey = toBase58String(Address(fromBase58String(recipient)).bytes)
72+ let recAmount = match getInteger(this, recKey) {
73+ case a: Int =>
74+ a
75+ case _ =>
76+ 0
77+ }
78+ $Tuple2([IntegerEntry(currentKey, newAmount), IntegerEntry(currentKey, (recAmount + amount))], unit)
79+ }
7380 }
7481
7582
7683 @Verifier(tx)
7784 func verify () = {
7885 let smartPK = base58'Gud7Z17wiZEMZiHRbn48k2D9H13jmLEDZZ8b7NCfjRJL'
7986 let secondPK = base58'CwvKLDcXt3Wd2MEyEemVKawiD7gaCV68wh2GcnJRHFqB'
8087 let smart = sigVerify(tx.bodyBytes, tx.proofs[0], smartPK)
8188 let second = sigVerify(tx.bodyBytes, tx.proofs[0], secondPK)
8289 match tx {
8390 case t: SetScriptTransaction =>
8491 true
8592 case t: DataTransaction =>
8693 true
8794 case t: InvokeScriptTransaction =>
8895 true
8996 case t: TransferTransaction =>
9097 if (smart)
9198 then true
9299 else second
93100 case _ =>
94101 false
95102 }
96103 }
97104

github/deemru/w8io/169f3d6 
26.63 ms