tx · FVzHmwav6pHJ9zkrV9JegDSsLMbNQvS5uJrCBpZ7J2GC
3N4KbMnJH8FaM94jqxNFe2oyZ8GB7Z8yVBP: -0.01000000 Waves
2023.06.28 15:31 [2642510] smart account 3N4KbMnJH8FaM94jqxNFe2oyZ8GB7Z8yVBP > SELF 0.00000000 Waves
{
"type": 13,
"id": "FVzHmwav6pHJ9zkrV9JegDSsLMbNQvS5uJrCBpZ7J2GC",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1687955563923,
"version": 2,
"chainId": 84,
"sender": "3N4KbMnJH8FaM94jqxNFe2oyZ8GB7Z8yVBP",
"senderPublicKey": "5sTpaMQe2KW8dskXeG41rUyomuUePPeo57FbhuoSsq2R",
"proofs": [
"3dsGUQ14LcioxmwtZ6HGJuUGfSupgdcP9rgpA4arPWupX5XTrGzU1NmMiwnhfzRX43Hn7GywDwFnCnSSt9bpmNa3"
],
"script": "base64:AAIFAAAAAAAAAA4IAhIECgIIBBIECgIIAQAAAAAAAAACAAAAAWkBAAAACWdldFRXQVA2MAAAAAIAAAAIYXNzZXRTdHIAAAAFZGVidWcEAAAAA3ZhbAMJAAAAAAAAAgUAAAAIYXNzZXRTdHICAAAABVdBVkVTCQAFFAAAAAIFAAAAA25pbAkABRQAAAACCQEAAAALdmFsdWVPckVsc2UAAAACCQAEGgAAAAIFAAAABHRoaXMCAAAADFdBVkVTX3R3YXA1QgAAAAAAABdkSAkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBoAAAACBQAAAAR0aGlzAgAAAAxXQVZFU190d2FwNUIAAAAAAAAXZEgDCQAAAAAAAAIFAAAACGFzc2V0U3RyAgAAACwyNUZFcUVqUmtxSzZ5Q2tpVDdMejZTQVl6N2dVRkN0eGZDQ2huclZGRDVBVAkABRQAAAACBQAAAANuaWwJAAUUAAAAAgkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBoAAAACBQAAAAR0aGlzAgAAADMyNUZFcUVqUmtxSzZ5Q2tpVDdMejZTQVl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AAAA3ZhbAAAAAFpAQAAAAhzZXRQcmljZQAAAAIAAAAHYXNzZXRJZAAAAAVwcmljZQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACBQAAAAdhc3NldElkAgAAAAdfdHdhcDVCBQAAAAVwcmljZQUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXnv8iri",
"height": 2642510,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: EXRrxED1883mcDgjjnA5B4M2hM2N8R2Kh7wPnumV46b
Next: none
Diff:
Old | New | | Differences |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func getTWAP60 (assetStr,debug) = { |
---|
8 | 8 | | let val = if ((assetStr == "WAVES")) |
---|
9 | | - | then $Tuple2(nil, $Tuple2(valueOrElse(getInteger(this, "price_WAVES"), 1533000), valueOrElse(getInteger(this, "price_WAVES"), 1533000))) |
---|
| 9 | + | then $Tuple2(nil, $Tuple2(valueOrElse(getInteger(this, "WAVES_twap5B"), 1533000), valueOrElse(getInteger(this, "WAVES_twap5B"), 1533000))) |
---|
10 | 10 | | else if ((assetStr == "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT")) |
---|
11 | | - | then $Tuple2(nil, $Tuple2(valueOrElse(getInteger(this, "price_25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), 85633), valueOrElse(getInteger(this, "price_25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), 85633))) |
---|
| 11 | + | then $Tuple2(nil, $Tuple2(valueOrElse(getInteger(this, "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT_twap5B"), 85633), valueOrElse(getInteger(this, "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT_twap5B"), 85633))) |
---|
12 | 12 | | else if ((assetStr == "EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc")) |
---|
13 | | - | then $Tuple2(nil, $Tuple2(valueOrElse(getInteger(this, "price_EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc"), 85633), valueOrElse(getInteger(this, "price_EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc"), 85633))) |
---|
| 13 | + | then $Tuple2(nil, $Tuple2(valueOrElse(getInteger(this, "EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc_twap5B"), 85633), valueOrElse(getInteger(this, "EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc_twap5B"), 85633))) |
---|
14 | 14 | | else { |
---|
15 | 15 | | let p = { |
---|
16 | 16 | | let @ = reentrantInvoke(Address(base58'3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS'), "getShareAssetPriceREADONLY", [assetStr], nil) |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func getTWAP60 (assetStr,debug) = { |
---|
8 | 8 | | let val = if ((assetStr == "WAVES")) |
---|
9 | | - | then $Tuple2(nil, $Tuple2(valueOrElse(getInteger(this, "price_WAVES"), 1533000), valueOrElse(getInteger(this, "price_WAVES"), 1533000))) |
---|
| 9 | + | then $Tuple2(nil, $Tuple2(valueOrElse(getInteger(this, "WAVES_twap5B"), 1533000), valueOrElse(getInteger(this, "WAVES_twap5B"), 1533000))) |
---|
10 | 10 | | else if ((assetStr == "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT")) |
---|
11 | | - | then $Tuple2(nil, $Tuple2(valueOrElse(getInteger(this, "price_25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), 85633), valueOrElse(getInteger(this, "price_25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), 85633))) |
---|
| 11 | + | then $Tuple2(nil, $Tuple2(valueOrElse(getInteger(this, "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT_twap5B"), 85633), valueOrElse(getInteger(this, "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT_twap5B"), 85633))) |
---|
12 | 12 | | else if ((assetStr == "EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc")) |
---|
13 | | - | then $Tuple2(nil, $Tuple2(valueOrElse(getInteger(this, "price_EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc"), 85633), valueOrElse(getInteger(this, "price_EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc"), 85633))) |
---|
| 13 | + | then $Tuple2(nil, $Tuple2(valueOrElse(getInteger(this, "EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc_twap5B"), 85633), valueOrElse(getInteger(this, "EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc_twap5B"), 85633))) |
---|
14 | 14 | | else { |
---|
15 | 15 | | let p = { |
---|
16 | 16 | | let @ = reentrantInvoke(Address(base58'3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS'), "getShareAssetPriceREADONLY", [assetStr], nil) |
---|
17 | 17 | | if ($isInstanceOf(@, "Int")) |
---|
18 | 18 | | then @ |
---|
19 | 19 | | else throw("Couldn't cast Any to Int") |
---|
20 | 20 | | } |
---|
21 | 21 | | if ((p == p)) |
---|
22 | 22 | | then $Tuple2(nil, $Tuple2(p, p)) |
---|
23 | 23 | | else throw("Strict value is not equal to itself.") |
---|
24 | 24 | | } |
---|
25 | 25 | | if (debug) |
---|
26 | 26 | | then throw(toString(val._2._1)) |
---|
27 | 27 | | else val |
---|
28 | 28 | | } |
---|
29 | 29 | | |
---|
30 | 30 | | |
---|
31 | 31 | | |
---|
32 | 32 | | @Callable(i) |
---|
33 | 33 | | func setPrice (assetId,price) = [IntegerEntry((assetId + "_twap5B"), price)] |
---|
34 | 34 | | |
---|
35 | 35 | | |
---|
36 | 36 | | @Verifier(tx) |
---|
37 | 37 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
38 | 38 | | |
---|