tx · 6pFr73ZuL753q7J9D8uPWmVL14eJQkmYKe6D3ZdvLUFt 3N1Kt6er9nzzrv8DYLUNybdUdKhto6buhu3: -0.00100000 Waves 2022.08.09 10:36 [2176630] smart account 3N1Kt6er9nzzrv8DYLUNybdUdKhto6buhu3 > SELF 0.00000000 Waves
{ "type": 13, "id": "6pFr73ZuL753q7J9D8uPWmVL14eJQkmYKe6D3ZdvLUFt", "fee": 100000, "feeAssetId": null, "timestamp": 1660030593000, "version": 2, "chainId": 84, "sender": "3N1Kt6er9nzzrv8DYLUNybdUdKhto6buhu3", "senderPublicKey": "HgKeKH88GY1mp5NpcZUDMRa9iw9LS79HZAnRt3ntaXpE", "proofs": [ "224LAoj4irf9zP7Fw8WApPA1kFYHSdS4FHBevAsW3F9QyGeaTcC9uvkoZNamAo2895WSYEEfJwNEng127AGWYjDT" ], "script": "base64:BgIHCAISAwoBAQIACE1JTl9USUNLAJjsyf///////wEACE1BWF9USUNLCQEBLQEFCE1JTl9USUNLAQFpARJnZXRTcXJ0UmF0aW9BdFRpY2sBBHRpY2sEB2Fic1RpY2sDCQBmAgAABQR0aWNrCQBoAgUEdGljawD///////////8BBQR0aWNrBANlcnIDCQBmAgUEdGljawUITUFYX1RJQ0sJAAIBAgxpbnZhbGlkIHRpY2sFBHVuaXQDCQAAAgUDZXJyBQNlcnIEBnByaWNlMQkAdgYJALYCAQCRTgAECQC2AgEAAQAAAAQFBERPV04EBnByaWNlMgkAdgYJALYCAQCRTgAECQC2AgEAAQAAABIFBERPV04EBnByaWNlMwkAdgYJALYCAQCRTgAECQC2AgEAAgAAAAQFBERPV04EBnByaWNlNAkAdgYJALYCAQCRTgAECQC2AgEAAgAAABIFBERPV04EBnByaWNlNQkAbAYAFAABAP///////////wEAAAAEBQRET1dOBAZwcmljZTYJAHYGCQC2AgEAFAABCQC2AgEA////////////AQAAAAQFBERPV04JAJQKAgkAzAgCCQELU3RyaW5nRW50cnkCAgdwcmljZV8xCQDaBAEJAJ0DAQUGcHJpY2UxCQDMCAIJAQtTdHJpbmdFbnRyeQICB3ByaWNlXzIJANoEAQkAnQMBBQZwcmljZTIJAMwIAgkBC1N0cmluZ0VudHJ5AgIHcHJpY2VfMwkA2gQBCQCdAwEFBnByaWNlMwkAzAgCCQELU3RyaW5nRW50cnkCAgdwcmljZV80CQDaBAEJAJ0DAQUGcHJpY2U0CQDMCAIJAQtTdHJpbmdFbnRyeQICB3ByaWNlXzUJANoEAQkAmgMBBQZwcmljZTUJAMwIAgkBC1N0cmluZ0VudHJ5AgIHcHJpY2VfNgkA2gQBCQCdAwEFBnByaWNlNgUDbmlsBQR1bml0CQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJ0eAEGdmVyaWZ5AAZ2ZFB2", "height": 2176630, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6o5p54fRpzEqHtKXwU5eeWcii3KKbajx2584djrJpBfG Next: 6KzZUThcF2K6fpPaAGtWkvdLyMGwDx7kPt8vCp4wgwrT Diff:
Old | New | Differences | |
---|---|---|---|
19 | 19 | let price2 = pow(toBigInt(10001), 4, toBigInt(1), 0, 18, DOWN) | |
20 | 20 | let price3 = pow(toBigInt(10001), 4, toBigInt(2), 0, 4, DOWN) | |
21 | 21 | let price4 = pow(toBigInt(10001), 4, toBigInt(2), 0, 18, DOWN) | |
22 | - | $Tuple2([StringEntry("price_1", toBase64String(toBytes(price1))), StringEntry("price_2", toBase64String(toBytes(price2))), StringEntry("price_3", toBase64String(toBytes(price3))), StringEntry("price_4", toBase64String(toBytes(price4)))], unit) | |
22 | + | let price5 = pow(20, 1, -1, 0, 4, DOWN) | |
23 | + | let price6 = pow(toBigInt(20), 1, toBigInt(-1), 0, 4, DOWN) | |
24 | + | $Tuple2([StringEntry("price_1", toBase64String(toBytes(price1))), StringEntry("price_2", toBase64String(toBytes(price2))), StringEntry("price_3", toBase64String(toBytes(price3))), StringEntry("price_4", toBase64String(toBytes(price4))), StringEntry("price_5", toBase64String(toBytes(price5))), StringEntry("price_6", toBase64String(toBytes(price6)))], unit) | |
23 | 25 | } | |
24 | 26 | else throw("Strict value is not equal to itself.") | |
25 | 27 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let MIN_TICK = -887272 | |
5 | 5 | ||
6 | 6 | let MAX_TICK = -(MIN_TICK) | |
7 | 7 | ||
8 | 8 | @Callable(i) | |
9 | 9 | func getSqrtRatioAtTick (tick) = { | |
10 | 10 | let absTick = if ((0 > tick)) | |
11 | 11 | then (tick * -1) | |
12 | 12 | else tick | |
13 | 13 | let err = if ((tick > MAX_TICK)) | |
14 | 14 | then throw("invalid tick") | |
15 | 15 | else unit | |
16 | 16 | if ((err == err)) | |
17 | 17 | then { | |
18 | 18 | let price1 = pow(toBigInt(10001), 4, toBigInt(1), 0, 4, DOWN) | |
19 | 19 | let price2 = pow(toBigInt(10001), 4, toBigInt(1), 0, 18, DOWN) | |
20 | 20 | let price3 = pow(toBigInt(10001), 4, toBigInt(2), 0, 4, DOWN) | |
21 | 21 | let price4 = pow(toBigInt(10001), 4, toBigInt(2), 0, 18, DOWN) | |
22 | - | $Tuple2([StringEntry("price_1", toBase64String(toBytes(price1))), StringEntry("price_2", toBase64String(toBytes(price2))), StringEntry("price_3", toBase64String(toBytes(price3))), StringEntry("price_4", toBase64String(toBytes(price4)))], unit) | |
22 | + | let price5 = pow(20, 1, -1, 0, 4, DOWN) | |
23 | + | let price6 = pow(toBigInt(20), 1, toBigInt(-1), 0, 4, DOWN) | |
24 | + | $Tuple2([StringEntry("price_1", toBase64String(toBytes(price1))), StringEntry("price_2", toBase64String(toBytes(price2))), StringEntry("price_3", toBase64String(toBytes(price3))), StringEntry("price_4", toBase64String(toBytes(price4))), StringEntry("price_5", toBase64String(toBytes(price5))), StringEntry("price_6", toBase64String(toBytes(price6)))], unit) | |
23 | 25 | } | |
24 | 26 | else throw("Strict value is not equal to itself.") | |
25 | 27 | } | |
26 | 28 | ||
27 | 29 | ||
28 | 30 | @Verifier(tx) | |
29 | 31 | func verify () = true | |
30 | 32 |
github/deemru/w8io/169f3d6 25.84 ms ◑