tx · E2e14YobAPgMzZePjAn4QHXK7t2zSc4fibVSTjQPCT1Y

3N8Cko4wa6ewdnPRXybzTMDpnhuYREfkps7:  -0.00200000 Waves

2023.09.21 20:55 [2765466] smart account 3N8Cko4wa6ewdnPRXybzTMDpnhuYREfkps7 > SELF 0.00000000 Waves

{ "type": 13, "id": "E2e14YobAPgMzZePjAn4QHXK7t2zSc4fibVSTjQPCT1Y", "fee": 200000, "feeAssetId": null, "timestamp": 1695318932093, "version": 2, "chainId": 84, "sender": "3N8Cko4wa6ewdnPRXybzTMDpnhuYREfkps7", "senderPublicKey": "4oVxBvsmoAhMaT1WhgSLcKFKX1NzwYxDaR89cAdGRGky", "proofs": [ "uM1pSjg8w5qDCQZ2oqz3FXufWYdUVi8r2VTMxYXxu6Wd4MSxgB4KyWw7qpNg3YLHYU1zNwXRknDA6GWRQAeZ8pz" ], "script": "base64:BgIOCAISABIECgIIARIAEgAGAAVjaGFpbgkAyQECCQDKAQIIBQR0aGlzBWJ5dGVzAAEAAQALdXNkdEFzc2V0SWQEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDABIITaerIIAz9O0bvKju6Lk7zJgt0LXfoHlqjUI/moD/+5AwkAAAIBAVQFByRtYXRjaDABIFWx2J9yh4Lv5eNbjawFq2XemkOhLxa7BfMat4el8cUYCQACAQINVW5rbm93biBjaGFpbgEKZml4ZWRQb2ludAIDdmFsCGRlY2ltYWxzBAZ0ZW5Qb3cJAGwGAAoAAAUIZGVjaW1hbHMAAAAABQRET1dOBAdsb3dQYXJ0CQCkAwEJAGoCBQN2YWwFBnRlblBvdwQGemVyb2VzCQCwAgIJAKQDAQUGdGVuUG93CQBkAgABCQCxAgEFB2xvd1BhcnQJAKwCAgkArAICCQCsAgIJAKQDAQkAaQIFA3ZhbAUGdGVuUG93AgEuBQZ6ZXJvZXMFB2xvd1BhcnQAD3piaWxsQXNzZXRJZEtleQINemJpbGxfYXNzZXRJZAAMemJpbGxBc3NldElkCQETdmFsdW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VzdEFkZHIFBmFtb3VudAULdXNkdEFzc2V0SWQFA25pbAFpAQpyZXR1cm5Vc2R0AAMJAQIhPQIJAJADAQgFAWkIcGF5bWVudHMAAQkAAgECImV4YWN0bHkgMSBwYXltZW50IG11c3QgYmUgYXR0YWNoZWQEA3BtdAkAkQMCCAUBaQhwYXltZW50cwAABANhbXQIBQNwbXQGYW1vdW50AwMJAQEhAQkBCWlzRGVmaW5lZAEIBQNwbXQHYXNzZXRJZAYJAQIhPQIJAQV2YWx1ZQEIBQNwbXQHYXNzZXRJZAULdXNkdEFzc2V0SWQJAAIBAhNVU0RUIHBheW1lbnRzIG9ubHkhBAxpc3N1ZWRBbW91bnQJARFAZXh0ck5hdGl2ZSgxMDU1KQEFFHpiaWxsSXNzdWVkQW1vdW50S2V5AwkAZgIFA2FtdAUMaXNzdWVkQW1vdW50CQACAQkArAICCQCsAgIJAKwCAgkArAICAhhDYW4ndCByZXR1cm4gbW9yZSBVU0RUICgJAQpmaXhlZFBvaW50AgUDYW10AAYCFiksIHRoYW4gaXNzdWVkIFpCSUxMICgJAQpmaXhlZFBvaW50AgUMaXNzdWVkQW1vdW50AAYCASkJAMwIAgkBBEJ1cm4CBQx6YmlsbEFzc2V0SWQFA2FtdAkAzAgCCQEMSW50ZWdlckVudHJ5AgUUemJpbGxJc3N1ZWRBbW91bnRLZXkJAGUCBQxpc3N1ZWRBbW91bnQFA2FtdAUDbmlsAWkBEGdldEZ1bmRzUkVBRE9OTFkAAwkBAiE9AgkAkAMBCAUBaQhwYXltZW50cwAACQACAQITTm8gcGF5bWVudHMgYWxsb3dlZAQHZnVuZFN1bQkAZAIJAPAHAgUEdGhpcwULdXNkdEFzc2V0SWQJAPAHAgUEdGhpcwUMemJpbGxBc3NldElkCQCUCgIFA25pbAUHZnVuZFN1bQDFbzqs", "height": 2765466, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9Mjqvv6ZevHtMMZgYVU3ihjyTR2SoKz9wKjcdQuMeTU4 Next: HVUfaymB7YJtS7qkCw7jrjs3bWhGgAJWSoFBZccjsHvY Diff:
OldNewDifferences
5858 else {
5959 let s = m.payments[0]
6060 let t = s.amount
61- let u = valueOrErrorMessage(s.assetId, "USDT payments only!")
62- if ((u != b))
61+ if (if (!(isDefined(s.assetId)))
62+ then true
63+ else (value(s.assetId) != b))
6364 then throw("USDT payments only!")
6465 else {
6566 let n = getIntegerValue(l)
7576 func getFundsREADONLY () = if ((size(m.payments) != 0))
7677 then throw("No payments allowed")
7778 else {
78- let v = (assetBalance(this, b) + assetBalance(this, k))
79- $Tuple2(nil, v)
79+ let u = (assetBalance(this, b) + assetBalance(this, k))
80+ $Tuple2(nil, u)
8081 }
8182
8283
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = take(drop(this.bytes, 1), 1)
55
66 let b = {
77 let c = a
88 if ((base58'2W' == c))
99 then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi'
1010 else if ((base58'2T' == c))
1111 then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63'
1212 else throw("Unknown chain")
1313 }
1414
1515 func d (e,f) = {
1616 let g = pow(10, 0, f, 0, 0, DOWN)
1717 let h = toString((e % g))
1818 let i = drop(toString(g), (1 + size(h)))
1919 (((toString((e / g)) + ".") + i) + h)
2020 }
2121
2222
2323 let j = "zbill_assetId"
2424
2525 let k = valueOrErrorMessage(getBinary(this, j), "Not initialized yet")
2626
2727 let l = "zbill_issuedAmount"
2828
2929 @Callable(m)
3030 func constructorV1 () = if ((m.caller != this))
3131 then throw("Permission denied")
3232 else if (isDefined(getBinary(j)))
3333 then throw("Already initialized")
3434 else {
3535 let n = 0
3636 let o = Issue("ZBILL", "USDT Bill of Exchange token", n, 6, true, unit, 0)
3737 let p = calculateAssetId(o)
3838 [o, IntegerEntry(l, n), BinaryEntry(j, p)]
3939 }
4040
4141
4242
4343 @Callable(m)
4444 func takeUsdt (q,r) = if ((m.caller != this))
4545 then throw("permission denied")
4646 else if ((size(m.payments) != 0))
4747 then throw("No payments allowed")
4848 else {
4949 let n = getIntegerValue(l)
5050 [Reissue(k, r, true), IntegerEntry(l, (n + r)), ScriptTransfer(addressFromStringValue(q), r, b)]
5151 }
5252
5353
5454
5555 @Callable(m)
5656 func returnUsdt () = if ((size(m.payments) != 1))
5757 then throw("exactly 1 payment must be attached")
5858 else {
5959 let s = m.payments[0]
6060 let t = s.amount
61- let u = valueOrErrorMessage(s.assetId, "USDT payments only!")
62- if ((u != b))
61+ if (if (!(isDefined(s.assetId)))
62+ then true
63+ else (value(s.assetId) != b))
6364 then throw("USDT payments only!")
6465 else {
6566 let n = getIntegerValue(l)
6667 if ((t > n))
6768 then throw((((("Can't return more USDT (" + d(t, 6)) + "), than issued ZBILL (") + d(n, 6)) + ")"))
6869 else [Burn(k, t), IntegerEntry(l, (n - t))]
6970 }
7071 }
7172
7273
7374
7475 @Callable(m)
7576 func getFundsREADONLY () = if ((size(m.payments) != 0))
7677 then throw("No payments allowed")
7778 else {
78- let v = (assetBalance(this, b) + assetBalance(this, k))
79- $Tuple2(nil, v)
79+ let u = (assetBalance(this, b) + assetBalance(this, k))
80+ $Tuple2(nil, u)
8081 }
8182
8283

github/deemru/w8io/169f3d6 
24.36 ms