tx · 6AjVp3zBookgTckkr4aoSFzPA6jAQdaYVZjahmHgtoY4
3N1XAEyg1TQGa5FCEerrRhLGi5KyVq26Xm8: -0.00100000 Waves
2023.01.13 18:26 [2403351] smart account 3N1XAEyg1TQGa5FCEerrRhLGi5KyVq26Xm8 > SELF 0.00000000 Waves
{
"type": 13,
"id": "6AjVp3zBookgTckkr4aoSFzPA6jAQdaYVZjahmHgtoY4",
"fee": 100000,
"feeAssetId": null,
"timestamp": 1673623638816,
"version": 2,
"chainId": 84,
"sender": "3N1XAEyg1TQGa5FCEerrRhLGi5KyVq26Xm8",
"senderPublicKey": "ATuPi6fn8277fNiCoRgPTav9QG15CJoW95GEGcDmfYt8",
"proofs": [
"5KDzmLKkDGr9UHbch29xoMV7SJTPxnzyhufYYdTCBP99iWh9TbBFq7n1WLws5kvGiBYedNaJEy6cUgoCpS9dYEZU"
],
"script": "base64:BgIECAISAAcABXdjZElkAiw1V0U2SEJWc21BYmFwVG1US3BteVdtVVI2N2ZjMTZ5YkZyTmp4em1EQnRQYQETdG90YWxTaGFyZUJ5VXNlcktFWQEFb3duZXIJALkJAgkAzAgCAgZzaGFyZXMJAMwIAgUFb3duZXIFA25pbAIBXwEUdG90YWxTaGFyZUJ5VXNlclJFQUQBBW93bmVyCQELdmFsdWVPckVsc2UCCQCaCAIFBHRoaXMJARN0b3RhbFNoYXJlQnlVc2VyS0VZAQUFb3duZXIAAAARdG90YWxJc3N1ZWRXQ0RLRVkCEHRvdGFsX2lzc3VlZF9XQ0QBDnRvdGFsSXNzdWVkV0NEAAkBC3ZhbHVlT3JFbHNlAgkAmggCBQR0aGlzBRF0b3RhbElzc3VlZFdDREtFWQAAAA50b3RhbFNoYXJlc0tFWQIMdG90YWxfc2hhcmVzAQt0b3RhbFNoYXJlcwAJAQt2YWx1ZU9yRWxzZQIJAJoIAgUEdGhpcwUOdG90YWxTaGFyZXNLRVkAAAEBaQENZGVwb3NpdF9zaGFyZQAEA3BtdAMJAAACCQCQAwEIBQFpCHBheW1lbnRzAAEJAJEDAggFAWkIcGF5bWVudHMAAAkAAgECHEF0dGFjaGVkIHBheW1lbnQgaXMgcmVxdWlyZWQDCQEJaXNEZWZpbmVkAQgFA3BtdAdhc3NldElkCQACAQIWT25seSBXQVZFUyBpcyBhbGxvd2VkLgQHYWNjb3VudAkApQgBCAUBaQZjYWxsZXIEEHRvdGFsU2hhcmVCeVVzZXIJARR0b3RhbFNoYXJlQnlVc2VyUkVBRAEFB2FjY291bnQED3RvdGFsU2hhcmVzUHJldgkBC3RvdGFsU2hhcmVzAAkAzAgCCQEMSW50ZWdlckVudHJ5AgkBE3RvdGFsU2hhcmVCeVVzZXJLRVkBBQdhY2NvdW50CQBkAgUQdG90YWxTaGFyZUJ5VXNlcggFA3BtdAZhbW91bnQJAMwIAgkBDEludGVnZXJFbnRyeQIFDnRvdGFsU2hhcmVzS0VZCQBkAgUPdG90YWxTaGFyZXNQcmV2CAUDcG10BmFtb3VudAUDbmlsAASJNDI=",
"height": 2403351,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 57m8vJRwg4WqwYheS5VgPfd3BrGoNdtJSySky7ek7gcS
Next: BEWKpjcYDdoy5XrQZNazuT3i9J4YFb5AqebabARtUAvq
Diff:
Old | New | | Differences |
---|
9 | 9 | | func d (c) = valueOrElse(getInteger(this, b(c)), 0) |
---|
10 | 10 | | |
---|
11 | 11 | | |
---|
12 | | - | @Callable(e) |
---|
| 12 | + | let e = "total_issued_WCD" |
---|
| 13 | + | |
---|
| 14 | + | func f () = valueOrElse(getInteger(this, e), 0) |
---|
| 15 | + | |
---|
| 16 | + | |
---|
| 17 | + | let g = "total_shares" |
---|
| 18 | + | |
---|
| 19 | + | func h () = valueOrElse(getInteger(this, g), 0) |
---|
| 20 | + | |
---|
| 21 | + | |
---|
| 22 | + | @Callable(i) |
---|
13 | 23 | | func deposit_share () = { |
---|
14 | | - | let f = if ((size(e.payments) == 1)) |
---|
15 | | - | then e.payments[0] |
---|
| 24 | + | let j = if ((size(i.payments) == 1)) |
---|
| 25 | + | then i.payments[0] |
---|
16 | 26 | | else throw("Attached payment is required") |
---|
17 | | - | if (isDefined(f.assetId)) |
---|
| 27 | + | if (isDefined(j.assetId)) |
---|
18 | 28 | | then throw("Only WAVES is allowed.") |
---|
19 | 29 | | else { |
---|
20 | | - | let g = toString(e.caller) |
---|
21 | | - | let h = d(g) |
---|
22 | | - | [IntegerEntry(b(g), (h + f.amount))] |
---|
| 30 | + | let k = toString(i.caller) |
---|
| 31 | + | let l = d(k) |
---|
| 32 | + | let m = h() |
---|
| 33 | + | [IntegerEntry(b(k), (l + j.amount)), IntegerEntry(g, (m + j.amount))] |
---|
23 | 34 | | } |
---|
24 | 35 | | } |
---|
25 | 36 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 6 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = "5WE6HBVsmAbapTmTKpmyWmUR67fc16ybFrNjxzmDBtPa" |
---|
5 | 5 | | |
---|
6 | 6 | | func b (c) = makeString(["shares", c], "_") |
---|
7 | 7 | | |
---|
8 | 8 | | |
---|
9 | 9 | | func d (c) = valueOrElse(getInteger(this, b(c)), 0) |
---|
10 | 10 | | |
---|
11 | 11 | | |
---|
12 | | - | @Callable(e) |
---|
| 12 | + | let e = "total_issued_WCD" |
---|
| 13 | + | |
---|
| 14 | + | func f () = valueOrElse(getInteger(this, e), 0) |
---|
| 15 | + | |
---|
| 16 | + | |
---|
| 17 | + | let g = "total_shares" |
---|
| 18 | + | |
---|
| 19 | + | func h () = valueOrElse(getInteger(this, g), 0) |
---|
| 20 | + | |
---|
| 21 | + | |
---|
| 22 | + | @Callable(i) |
---|
13 | 23 | | func deposit_share () = { |
---|
14 | | - | let f = if ((size(e.payments) == 1)) |
---|
15 | | - | then e.payments[0] |
---|
| 24 | + | let j = if ((size(i.payments) == 1)) |
---|
| 25 | + | then i.payments[0] |
---|
16 | 26 | | else throw("Attached payment is required") |
---|
17 | | - | if (isDefined(f.assetId)) |
---|
| 27 | + | if (isDefined(j.assetId)) |
---|
18 | 28 | | then throw("Only WAVES is allowed.") |
---|
19 | 29 | | else { |
---|
20 | | - | let g = toString(e.caller) |
---|
21 | | - | let h = d(g) |
---|
22 | | - | [IntegerEntry(b(g), (h + f.amount))] |
---|
| 30 | + | let k = toString(i.caller) |
---|
| 31 | + | let l = d(k) |
---|
| 32 | + | let m = h() |
---|
| 33 | + | [IntegerEntry(b(k), (l + j.amount)), IntegerEntry(g, (m + j.amount))] |
---|
23 | 34 | | } |
---|
24 | 35 | | } |
---|
25 | 36 | | |
---|
26 | 37 | | |
---|