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:AAIFAAAAAAAAAA4IAhIECgIIBBIECgIIAQAAAAAAAAACAAAAAWkBAAAACWdldFRXQVA2MAAAAAIAAAAIYXNzZXRTdHIAAAAFZGVidWcEAAAAA3ZhbAMJAAAAAAAAAgUAAAAIYXNzZXRTdHICAAAABVdBVkVTCQAFFAAAAAIFAAAAA25pbAkABRQAAAACCQEAAAALdmFsdWVPckVsc2UAAAACCQAEGgAAAAIFAAAABHRoaXMCAAAADFdBVkVTX3R3YXA1QgAAAAAAABdkSAkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBoAAAACBQAAAAR0aGlzAgAAAAxXQVZFU190d2FwNUIAAAAAAAAXZEgDCQAAAAAAAAIFAAAACGFzc2V0U3RyAgAAACwyNUZFcUVqUmtxSzZ5Q2tpVDdMejZTQVl6N2dVRkN0eGZDQ2huclZGRDVBVAkABRQAAAACBQAAAANuaWwJAAUUAAAAAgkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBoAAAACBQAAAAR0aGlzAgAAADMyNUZFcUVqUmtxSzZ5Q2tpVDdMejZTQVl6N2dVRkN0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AAAAAFpAQAAAAhzZXRQcmljZQAAAAIAAAAHYXNzZXRJZAAAAAVwcmljZQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACBQAAAAdhc3NldElkAgAAAAdfdHdhcDVCBQAAAAVwcmljZQUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXnv8iri", "height": 2642510, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EXRrxED1883mcDgjjnA5B4M2hM2N8R2Kh7wPnumV46b Next: none Diff:
OldNewDifferences
66 @Callable(i)
77 func getTWAP60 (assetStr,debug) = {
88 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)))
1010 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)))
1212 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)))
1414 else {
1515 let p = {
1616 let @ = reentrantInvoke(Address(base58'3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS'), "getShareAssetPriceREADONLY", [assetStr], nil)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func getTWAP60 (assetStr,debug) = {
88 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)))
1010 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)))
1212 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)))
1414 else {
1515 let p = {
1616 let @ = reentrantInvoke(Address(base58'3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS'), "getShareAssetPriceREADONLY", [assetStr], nil)
1717 if ($isInstanceOf(@, "Int"))
1818 then @
1919 else throw("Couldn't cast Any to Int")
2020 }
2121 if ((p == p))
2222 then $Tuple2(nil, $Tuple2(p, p))
2323 else throw("Strict value is not equal to itself.")
2424 }
2525 if (debug)
2626 then throw(toString(val._2._1))
2727 else val
2828 }
2929
3030
3131
3232 @Callable(i)
3333 func setPrice (assetId,price) = [IntegerEntry((assetId + "_twap5B"), price)]
3434
3535
3636 @Verifier(tx)
3737 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
3838

github/deemru/w8io/169f3d6 
27.39 ms