tx · 2WvRQRVsvGwTZ9sYQjzA2Cb85giww6JbaEGknMWpvPS6
3N5KWDSz3ynimUoZyu8d7sHQuGhdjPbnj1T: -0.01000000 Waves
2023.09.28 13:46 [2775165] smart account 3N5KWDSz3ynimUoZyu8d7sHQuGhdjPbnj1T > SELF 0.00000000 Waves
{
"type": 13,
"id": "2WvRQRVsvGwTZ9sYQjzA2Cb85giww6JbaEGknMWpvPS6",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1695898025650,
"version": 2,
"chainId": 84,
"sender": "3N5KWDSz3ynimUoZyu8d7sHQuGhdjPbnj1T",
"senderPublicKey": "DFdS6bGBeh573tRUkRP8LBGiGBfYyrDHm6ABQBfrXyPK",
"proofs": [
"bh7wNTigSCZCJtnBD5R8rjbUwe3w6C1VtZnFfNofN3v15xYnMrjfC835WShChu2m85uin3ZFXRwYVDoHj7bZg8M"
],
"script": "base64:BgIICAISBAoCAQgBAAptZWRhbEJ5dGVzASADClWHaheR/YMoP2XDK81goKJgFjpKqpbgHvXeA0qA3AEBaQEKZ2V0QmFsYW5jZQIGYW1vdW50B2Fzc2V0SWQEBnNlbmRlcgkA2AQBCAgFAWkGY2FsbGVyBWJ5dGVzBA1jdXJyZW50QW1vdW50CQDwBwIFBHRoaXMJAJsDAQUHYXNzZXRJZAQJbmV3QW1vdW50CQBlAgUNY3VycmVudEFtb3VudAUGYW1vdW50AwkAZgIAAAUGYW1vdW50CQACAQIfQ2Fubm90IHdpdGhkcmF3IG5lZ2F0aXZlIGFtb3VudAMJAGYCAAAFCW5ld0Ftb3VudAkAzAgCCQACAQkApAMBBQluZXdBbW91bnQFA25pbAkAzAgCCQACAQkApAMBBQluZXdBbW91bnQFA25pbACo84Hb",
"height": 2775165,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: EmVoLxDk9aTUCY5hXrp1B7UQkS8bxJJg4bCoQZHUxWRG
Next: 65hYFoa6eaopYmX2Z56NnZBeZqBmZrBt9p8A49AwvXGa
Diff:
Old | New | | Differences |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func getBalance (amount,assetId) = { |
---|
8 | 8 | | let sender = toBase58String(i.caller.bytes) |
---|
9 | | - | let currentAmount = valueOrElse(assetBalance(this, toBytes(assetId)), 0) |
---|
| 9 | + | let currentAmount = assetBalance(this, toBytes(assetId)) |
---|
10 | 10 | | let newAmount = (currentAmount - amount) |
---|
11 | 11 | | if ((0 > amount)) |
---|
12 | 12 | | then throw("Cannot withdraw negative amount") |
---|
13 | 13 | | else if ((0 > newAmount)) |
---|
14 | | - | then [throw(assetId), throw(toString(newAmount))] |
---|
| 14 | + | then [throw(toString(newAmount))] |
---|
15 | 15 | | else [throw(toString(newAmount))] |
---|
16 | 16 | | } |
---|
17 | 17 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 6 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let medalBytes = base58'CsN2rorkXvYvF1buXVxZH8qzxfdsiVgZAiJYRanz24s' |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func getBalance (amount,assetId) = { |
---|
8 | 8 | | let sender = toBase58String(i.caller.bytes) |
---|
9 | | - | let currentAmount = valueOrElse(assetBalance(this, toBytes(assetId)), 0) |
---|
| 9 | + | let currentAmount = assetBalance(this, toBytes(assetId)) |
---|
10 | 10 | | let newAmount = (currentAmount - amount) |
---|
11 | 11 | | if ((0 > amount)) |
---|
12 | 12 | | then throw("Cannot withdraw negative amount") |
---|
13 | 13 | | else if ((0 > newAmount)) |
---|
14 | | - | then [throw(assetId), throw(toString(newAmount))] |
---|
| 14 | + | then [throw(toString(newAmount))] |
---|
15 | 15 | | else [throw(toString(newAmount))] |
---|
16 | 16 | | } |
---|
17 | 17 | | |
---|
18 | 18 | | |
---|