tx · EkdCbxSxbjkGJ7kWWU4fq5vGQj1iaXHUZpAgQKtNG2wZ

3N8Cko4wa6ewdnPRXybzTMDpnhuYREfkps7:  -0.00200000 Waves

2023.07.24 19:43 [2680198] smart account 3N8Cko4wa6ewdnPRXybzTMDpnhuYREfkps7 > SELF 0.00000000 Waves

{ "type": 13, "id": "EkdCbxSxbjkGJ7kWWU4fq5vGQj1iaXHUZpAgQKtNG2wZ", "fee": 200000, "feeAssetId": null, "timestamp": 1690216942359, "version": 2, "chainId": 84, "sender": "3N8Cko4wa6ewdnPRXybzTMDpnhuYREfkps7", "senderPublicKey": "4oVxBvsmoAhMaT1WhgSLcKFKX1NzwYxDaR89cAdGRGky", "proofs": [ "4EHhs1uRWK4yZsFEduHy4SwHATNum49zxXjfEVcfjzHmE57qV7m7vQr4ErD2KWAU4nKEjNpca15YFqU7g25XzQdV" ], "script": "base64:BgIOCAISABIECgIIARIAEgAFAAVjaGFpbgkAyQECCQDKAQIIBQR0aGlzBWJ5dGVzAAEAAQALdXNkdEFzc2V0SWQEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDABIITaerIIAz9O0bvKju6Lk7zJgt0LXfoHlqjUI/moD/+5AwkAAAIBAVQFByRtYXRjaDABIFWx2J9yh4Lv5eNbjawFq2XemkOhLxa7BfMat4el8cUYCQACAQINVW5rbm93biBjaGFpbgAPemJpbGxBc3NldElkS2V5Ag16YmlsbF9hc3NldElkAAx6YmlsbEFzc2V0SWQJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkAnAgCBQR0aGlzBQ96YmlsbEFzc2V0SWRLZXkCE05vdCBpbml0aWFsaXplZCB5ZXQAFHpiaWxsSXNzdWVkQW1vdW50S2V5AhJ6YmlsbF9pc3N1ZWRBbW91bnQEAWkBDWNvbnN0cnVjdG9yVjEAAwkBAiE9AggFAWkGY2FsbGVyBQR0aGlzCQACAQIRUGVybWlzc2lvbiBkZW5pZWQDCQEJaXNEZWZpbmVkAQkAoQgBBQ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lAggFA3BtdAdhc3NldElkAhNVU0RUIHBheW1lbnRzIG9ubHkhAwkBAiE9AgUKcG10QXNzZXRJZAULdXNkdEFzc2V0SWQJAAIBAhNVU0RUIHBheW1lbnRzIG9ubHkhBAxpc3N1ZWRBbW91bnQJARFAZXh0ck5hdGl2ZSgxMDU1KQEFFHpiaWxsSXNzdWVkQW1vdW50S2V5CQDMCAIJAQRCdXJuAgUMemJpbGxBc3NldElkBQNhbXQJAMwIAgkBDEludGVnZXJFbnRyeQIFFHpiaWxsSXNzdWVkQW1vdW50S2V5CQBlAgUMaXNzdWVkQW1vdW50BQNhbXQFA25pbAFpARBnZXRGdW5kc1JFQURPTkxZAAMJAQIhPQIJAJADAQgFAWkIcGF5bWVudHMAAAkAAgECE05vIHBheW1lbnRzIGFsbG93ZWQEB2Z1bmRTdW0JAGQCCQDwBwIFBHRoaXMFC3VzZHRBc3NldElkCQDwBwIFBHRoaXMFDHpiaWxsQXNzZXRJZAkAlAoCBQNuaWwFB2Z1bmRTdW0AulHkZA==", "height": 2680198, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6xan8T9sfQm8fbfTtbshPamxRYM1qRFqxdvbb29CCobg Next: Ehsc7HL5umkMKkM4FH3DM1VW1BYwDgCjXbndH7UMMMtY Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = "stakedPieces"
4+let a = take(drop(this.bytes, 1), 1)
55
6-let b = "lastDelta"
7-
8-let c = "lastPiecesRead"
9-
10-func d (e) = {
11- let f = e
12- if ($isInstanceOf(f, "Int"))
13- then {
14- let g = f
15- g
16- }
17- else throw("fail to cast into Int")
6+let b = {
7+ let c = a
8+ if ((base58'2W' == c))
9+ then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi'
10+ else if ((base58'2T' == c))
11+ then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63'
12+ else throw("Unknown chain")
1813 }
1914
15+let d = "zbill_assetId"
2016
21-@Callable(h)
22-func stakeLand (i) = {
23- let j = valueOrElse(getInteger(a), 0)
24- let k = d(invoke(this, "onStakeLand", [i], nil))
25- $Tuple2([IntegerEntry(a, (j + i)), IntegerEntry(c, k)], k)
26- }
17+let e = valueOrErrorMessage(getBinary(this, d), "Not initialized yet")
18+
19+let f = "zbill_issuedAmount"
20+
21+@Callable(g)
22+func constructorV1 () = if ((g.caller != this))
23+ then throw("Permission denied")
24+ else if (isDefined(getBinary(d)))
25+ then throw("Already initialized")
26+ else {
27+ let h = 0
28+ let i = Issue("ZBILL", "USDT Bill of Exchange token", h, 6, true, unit, 0)
29+ let j = calculateAssetId(i)
30+[i, IntegerEntry(f, h), BinaryEntry(d, j)]
31+ }
2732
2833
2934
30-@Callable(h)
31-func onStakeLand (i) = {
32- let j = valueOrElse(getInteger(a), 0)
33- $Tuple2([IntegerEntry(b, i)], j)
34- }
35+@Callable(g)
36+func takeUsdt (k,l) = if ((g.caller != this))
37+ then throw("permission denied")
38+ else if ((size(g.payments) != 0))
39+ then throw("No payments allowed")
40+ else {
41+ let h = getIntegerValue(f)
42+[Reissue(e, l, true), IntegerEntry(f, (h + l)), ScriptTransfer(addressFromStringValue(k), l, b)]
43+ }
44+
45+
46+
47+@Callable(g)
48+func returnUsdt () = if ((size(g.payments) != 1))
49+ then throw("exactly 1 payment must be attached")
50+ else {
51+ let m = g.payments[0]
52+ let n = m.amount
53+ let o = valueOrErrorMessage(m.assetId, "USDT payments only!")
54+ if ((o != b))
55+ then throw("USDT payments only!")
56+ else {
57+ let h = getIntegerValue(f)
58+[Burn(e, n), IntegerEntry(f, (h - n))]
59+ }
60+ }
61+
62+
63+
64+@Callable(g)
65+func getFundsREADONLY () = if ((size(g.payments) != 0))
66+ then throw("No payments allowed")
67+ else {
68+ let p = (assetBalance(this, b) + assetBalance(this, e))
69+ $Tuple2(nil, p)
70+ }
3571
3672

github/deemru/w8io/169f3d6 
25.96 ms