tx · 39bfsQzVqVLas1KBDVEQL7apMgSv1YYqwcPmrraWkv6w

3NBNKJTqCGbPCDw1A86tAH3oLjFfhAmUYKW:  -0.00100000 Waves

2022.06.18 02:52 [2101051] smart account 3NBNKJTqCGbPCDw1A86tAH3oLjFfhAmUYKW > SELF 0.00000000 Waves

{ "type": 13, "id": "39bfsQzVqVLas1KBDVEQL7apMgSv1YYqwcPmrraWkv6w", "fee": 100000, "feeAssetId": null, "timestamp": 1655509937104, "version": 2, "chainId": 84, "sender": "3NBNKJTqCGbPCDw1A86tAH3oLjFfhAmUYKW", "senderPublicKey": "5KgB1ZojKX7qznjw2mAXoU9asTrLAHv5nEvk36suSN3c", "proofs": [ "5uCp8GwvaSFR8618g5wuA9FtWf2hMAg4sSR6LrLFHFjS6XFdJHfjsBG5e3cUoNqostU8WCKit9od854j3r1kh1Sr" ], "script": "base64:BgIHCAISAwoBAQEABGRhcHABGgFU61C/dqMfxvABbM6dnx1tiGfoEC0nPfYlAQFpAQlmcmVlV2F2ZXMBBmFtb3VudAMJAGYCBQZhbW91bnQAgISvXwkAAgECGXRoZSBtYXggYW1vdW50IGlzIDIgd2F2ZXMEBnNlbmRlcggFAWkGY2FsbGVyBAxnZXRPbGRBbW91bnQJAJoIAgUEdGhpcwkArAICCQClCAEFBnNlbmRlcgIGX1dBVkVTBAlvbGRBbW91bnQEByRtYXRjaDAFDGdldE9sZEFtb3VudAMJAAECBQckbWF0Y2gwAgNJbnQEAmluBQckbWF0Y2gwCQBkAgUCaW4AAAMJAAECBQckbWF0Y2gwAgRVbml0BAJ1bgUHJG1hdGNoMAAAAAADCQBmAgUJb2xkQW1vdW50AICU69wDCQACAQImdGhlIG1heCBhbW91bnQgdG8gd2l0aGRyYXcgaXMgMTAgd2F2ZXMECW5ld0Ftb3VudAkAZAIFCW9sZEFtb3VudAUGYW1vdW50BARzYXZlCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIJAKUIAQUGc2VuZGVyAgZfV0FWRVMFCW5ld0Ftb3VudAUDbmlsBAh0cmFuc2ZlcgkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIFBmFtb3VudAUEdW5pdAUDbmlsBQh0cmFuc2ZlcgBs4gB6", "height": 2101051, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5Hvn5EcK459XJM7xBx8X6bqUB33y6vTDcz8JiMo5pCcM Next: 6Fn3HB9pVEgymfPuqeuzsTVqzQepw3AqRyHfE3xwLSKT Diff:
OldNewDifferences
88 then throw("the max amount is 2 waves")
99 else {
1010 let sender = i.caller
11- let getOldAmount = getInteger(this, "WAVES")
11+ let getOldAmount = getInteger(this, (toString(sender) + "_WAVES"))
1212 let oldAmount = match getOldAmount {
1313 case in: Int =>
1414 (in + 0)
2121 then throw("the max amount to withdraw is 10 waves")
2222 else {
2323 let newAmount = (oldAmount + amount)
24- let save = [IntegerEntry("WAVES", newAmount)]
24+ let save = [IntegerEntry((toString(sender) + "_WAVES"), newAmount)]
2525 let transfer = [ScriptTransfer(i.caller, amount, unit)]
2626 transfer
2727 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let dapp = base58'3NBNKJTqCGbPCDw1A86tAH3oLjFfhAmUYKW'
55
66 @Callable(i)
77 func freeWaves (amount) = if ((amount > 200000000))
88 then throw("the max amount is 2 waves")
99 else {
1010 let sender = i.caller
11- let getOldAmount = getInteger(this, "WAVES")
11+ let getOldAmount = getInteger(this, (toString(sender) + "_WAVES"))
1212 let oldAmount = match getOldAmount {
1313 case in: Int =>
1414 (in + 0)
1515 case un: Unit =>
1616 0
1717 case _ =>
1818 0
1919 }
2020 if ((oldAmount > 1000000000))
2121 then throw("the max amount to withdraw is 10 waves")
2222 else {
2323 let newAmount = (oldAmount + amount)
24- let save = [IntegerEntry("WAVES", newAmount)]
24+ let save = [IntegerEntry((toString(sender) + "_WAVES"), newAmount)]
2525 let transfer = [ScriptTransfer(i.caller, amount, unit)]
2626 transfer
2727 }
2828 }
2929
3030

github/deemru/w8io/169f3d6 
80.70 ms