tx · 6K33fU7wMGEZP6HuyW5c8rrPJJVNEYwHoS4dNc8Ek6SQ

3N5KWDSz3ynimUoZyu8d7sHQuGhdjPbnj1T:  -0.01000000 Waves

2023.09.28 13:55 [2775175] smart account 3N5KWDSz3ynimUoZyu8d7sHQuGhdjPbnj1T > SELF 0.00000000 Waves

{ "type": 13, "id": "6K33fU7wMGEZP6HuyW5c8rrPJJVNEYwHoS4dNc8Ek6SQ", "fee": 1000000, "feeAssetId": null, "timestamp": 1695898561187, "version": 2, "chainId": 84, "sender": "3N5KWDSz3ynimUoZyu8d7sHQuGhdjPbnj1T", "senderPublicKey": "DFdS6bGBeh573tRUkRP8LBGiGBfYyrDHm6ABQBfrXyPK", "proofs": [ "gNgbA2JCJzJqH8x5YYJVBBqsPzMpH6H44A3PcERnAKZnrHTaGtZiREXmM2mYJbxLWL8BsWh2kU5VQHQj72nwWvP" ], "script": "base64:BgIICAISBAoCAQgBAAptZWRhbEJ5dGVzASADClWHaheR/YMoP2XDK81goKJgFjpKqpbgHvXeA0qA3AEBaQEKZ2V0QmFsYW5jZQIGYW1vdW50B2Fzc2V0SWQEBnNlbmRlcgkA2AQBCAgFAWkGY2FsbGVyBWJ5dGVzBA1jdXJyZW50QW1vdW50CQDwBwIJAQdBZGRyZXNzAQEaAVSo99sA1HQlGnsyX1zwD0Fjsvop8kUe72oFCm1lZGFsQnl0ZXMECW5ld0Ftb3VudAkAZQIFDWN1cnJlbnRBbW91bnQFBmFtb3VudAMJAGYCAAAFBmFtb3VudAkAAgECH0Nhbm5vdCB3aXRoZHJhdyBuZWdhdGl2ZSBhbW91bnQDCQBmAgAABQluZXdBbW91bnQJAMwIAgkAAgEJAKQDAQUNY3VycmVudEFtb3VudAUDbmlsCQDMCAIJAAIBCQCkAwEFDWN1cnJlbnRBbW91bnQFA25pbAC5uji0", "height": 2775175, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 65hYFoa6eaopYmX2Z56NnZBeZqBmZrBt9p8A49AwvXGa Next: 3QykcesKsmApobJVioRssNnhAyvZzFAwojDQocuFsWeG Diff:
OldNewDifferences
66 @Callable(i)
77 func getBalance (amount,assetId) = {
88 let sender = toBase58String(i.caller.bytes)
9- let currentAmount = assetBalance(Address(base58'3N5KWDSz3ynimUoZyu8d7sHQuGhdjPbnj1T'), toBytes(assetId))
9+ let currentAmount = assetBalance(Address(base58'3N5KWDSz3ynimUoZyu8d7sHQuGhdjPbnj1T'), medalBytes)
1010 let newAmount = (currentAmount - amount)
1111 if ((0 > amount))
1212 then throw("Cannot withdraw negative amount")
1313 else if ((0 > newAmount))
14- then [throw(toString(newAmount))]
15- else [throw(toString(newAmount))]
14+ then [throw(toString(currentAmount))]
15+ else [throw(toString(currentAmount))]
1616 }
1717
1818
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let medalBytes = base58'CsN2rorkXvYvF1buXVxZH8qzxfdsiVgZAiJYRanz24s'
55
66 @Callable(i)
77 func getBalance (amount,assetId) = {
88 let sender = toBase58String(i.caller.bytes)
9- let currentAmount = assetBalance(Address(base58'3N5KWDSz3ynimUoZyu8d7sHQuGhdjPbnj1T'), toBytes(assetId))
9+ let currentAmount = assetBalance(Address(base58'3N5KWDSz3ynimUoZyu8d7sHQuGhdjPbnj1T'), medalBytes)
1010 let newAmount = (currentAmount - amount)
1111 if ((0 > amount))
1212 then throw("Cannot withdraw negative amount")
1313 else if ((0 > newAmount))
14- then [throw(toString(newAmount))]
15- else [throw(toString(newAmount))]
14+ then [throw(toString(currentAmount))]
15+ else [throw(toString(currentAmount))]
1616 }
1717
1818

github/deemru/w8io/03bedc9 
18.62 ms