diff --git a/packages/libs/sdk/spec/recordings/solana-client-fetchEstimatePriorityFees_4175891121/recording.har b/packages/libs/sdk/spec/recordings/solana-client-fetchEstimatePriorityFees_4175891121/recording.har new file mode 100644 index 00000000..2abc89ac --- /dev/null +++ b/packages/libs/sdk/spec/recordings/solana-client-fetchEstimatePriorityFees_4175891121/recording.har @@ -0,0 +1,140 @@ +{ + "log": { + "_recordingName": "solana-client-fetchEstimatePriorityFees", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "e6e566cc324d0db8ff98c9b15abbb496", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 71, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + }, + { + "_fromType": "array", + "name": "content-length", + "value": "71" + }, + { + "_fromType": "array", + "name": "user-agent", + "value": "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" + }, + { + "_fromType": "array", + "name": "accept-encoding", + "value": "gzip,deflate" + }, + { + "_fromType": "array", + "name": "connection", + "value": "close" + }, + { + "name": "host", + "value": "alien-lingering-fire.solana-mainnet.quiknode.pro" + } + ], + "headersSize": 355, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"method\":\"qn_estimatePriorityFees\",\"params\":{},\"id\":1,\"jsonrpc\":\"2.0\"}" + }, + "queryString": [], + "url": "https://alien-lingering-fire.solana-mainnet.quiknode.pro" + }, + "response": { + "bodySize": 696, + "content": { + "mimeType": "application/json", + "size": 696, + "text": "{\"jsonrpc\":\"2.0\",\"result\":{\"context\":{\"slot\":255150582},\"per_compute_unit\":{\"extreme\":630734,\"high\":119250,\"low\":10714,\"medium\":35714,\"percentiles\":{\"10\":714,\"100\":2000000000,\"15\":1048,\"20\":2000,\"25\":2718,\"30\":4895,\"35\":6948,\"40\":10714,\"45\":13133,\"5\":100,\"50\":19667,\"55\":25541,\"60\":35714,\"65\":50000,\"70\":66918,\"75\":90000,\"80\":119250,\"85\":183005,\"90\":265586,\"95\":630734}},\"per_transaction\":{\"extreme\":886796,\"high\":245714,\"low\":28242,\"medium\":95010,\"percentiles\":{\"10\":700,\"100\":2000000000,\"15\":1303,\"20\":3126,\"25\":8571,\"30\":12000,\"35\":20000,\"40\":28242,\"45\":40225,\"5\":0,\"50\":50000,\"55\":75019,\"60\":95010,\"65\":110000,\"70\":140214,\"75\":180511,\"80\":245714,\"85\":265450,\"90\":296041,\"95\":886796}}},\"id\":1}" + }, + "cookies": [], + "headers": [ + { + "name": "access-control-allow-credentials", + "value": "true" + }, + { + "name": "access-control-allow-headers", + "value": "Content-Type,Authorization,User-Agent,solana-client" + }, + { + "name": "access-control-allow-methods", + "value": "GET, POST, OPTIONS" + }, + { + "name": "access-control-allow-origin", + "value": "" + }, + { + "name": "content-type", + "value": "application/json" + }, + { + "name": "vary", + "value": "Accept-Encoding" + }, + { + "name": "x-host-id", + "value": "bdc3c6b0fcc2f18f" + }, + { + "name": "x-node-id", + "value": "solana_solana-mainnet_jfk" + }, + { + "name": "date", + "value": "Tue, 19 Mar 2024 14:21:04 GMT" + }, + { + "name": "content-length", + "value": "696" + }, + { + "name": "connection", + "value": "close" + } + ], + "headersSize": 405, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-03-19T14:21:03.754Z", + "time": 871, + "timings": { + "blocked": -1, + "connect": -1, + "dns": -1, + "receive": 0, + "send": 0, + "ssl": -1, + "wait": 871 + } + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/packages/libs/sdk/spec/recordings/solana-client-prepareSmartTransaction_3623416322/recording.har b/packages/libs/sdk/spec/recordings/solana-client-prepareSmartTransaction_3623416322/recording.har index 08e2a544..97e8b0c1 100644 --- a/packages/libs/sdk/spec/recordings/solana-client-prepareSmartTransaction_3623416322/recording.har +++ b/packages/libs/sdk/spec/recordings/solana-client-prepareSmartTransaction_3623416322/recording.har @@ -8,11 +8,11 @@ }, "entries": [ { - "_id": "d29a8a03e7650c1d4c9f0dd702fa1079", + "_id": "acbd44d2b59f8bb85098f4a9278b5d64", "_order": 0, "cache": {}, "request": { - "bodySize": 90, + "bodySize": 103, "cookies": [], "headers": [ { @@ -20,6 +20,11 @@ "name": "content-type", "value": "application/json" }, + { + "_fromType": "array", + "name": "solana-client", + "value": "js/0.0.0-development" + }, { "_fromType": "array", "name": "accept", @@ -28,7 +33,7 @@ { "_fromType": "array", "name": "content-length", - "value": "90" + "value": "103" }, { "_fromType": "array", @@ -40,33 +45,28 @@ "name": "accept-encoding", "value": "gzip,deflate" }, - { - "_fromType": "array", - "name": "connection", - "value": "close" - }, { "name": "host", "value": "alien-lingering-fire.solana-mainnet.quiknode.pro" } ], - "headersSize": 355, + "headersSize": 374, "httpVersion": "HTTP/1.1", "method": "POST", "postData": { "mimeType": "application/json", "params": [], - "text": "{\"method\":\"qn_estimatePriorityFees\",\"params\":{\"last_n_blocks\":100},\"id\":1,\"jsonrpc\":\"2.0\"}" + "text": "{\"method\":\"getLatestBlockhash\",\"jsonrpc\":\"2.0\",\"params\":[],\"id\":\"e6aa9c8c-0dd5-4e9a-a5af-78a7461c5c74\"}" }, "queryString": [], "url": "https://alien-lingering-fire.solana-mainnet.quiknode.pro" }, "response": { - "bodySize": 713, + "bodySize": 226, "content": { "mimeType": "application/json", - "size": 713, - "text": "{\"jsonrpc\":\"2.0\",\"result\":{\"context\":{\"slot\":254923002},\"per_compute_unit\":{\"extreme\":1842896,\"high\":250050,\"low\":28315,\"medium\":77957,\"percentiles\":{\"10\":1580,\"100\":8121677495,\"15\":2935,\"20\":7021,\"25\":10714,\"30\":15000,\"35\":20000,\"40\":28315,\"45\":40000,\"5\":721,\"50\":50003,\"55\":71428,\"60\":77957,\"65\":105160,\"70\":150000,\"75\":210526,\"80\":250050,\"85\":493403,\"90\":779577,\"95\":1842896}},\"per_transaction\":{\"extreme\":3295320,\"high\":500000,\"low\":49216,\"medium\":110000,\"percentiles\":{\"10\":700,\"100\":8121677495,\"15\":3182,\"20\":10000,\"25\":15189,\"30\":23004,\"35\":35400,\"40\":49216,\"45\":67500,\"5\":0,\"50\":83683,\"55\":100000,\"60\":110000,\"65\":150000,\"70\":200000,\"75\":250000,\"80\":500000,\"85\":762300,\"90\":1021245,\"95\":3295320}}},\"id\":1}" + "size": 226, + "text": "{\"jsonrpc\":\"2.0\",\"result\":{\"context\":{\"apiVersion\":\"1.17.25\",\"slot\":254922957},\"value\":{\"blockhash\":\"2acCVCzy5dPndawWVvTYDoHWqoe4dXo1srhWQ4W5btnb\",\"lastValidBlockHeight\":235430258}},\"id\":\"e6aa9c8c-0dd5-4e9a-a5af-78a7461c5c74\"}" }, "cookies": [], "headers": [ @@ -96,7 +96,7 @@ }, { "name": "x-host-id", - "value": "bdc3c6b0fcc2f18f" + "value": "a92bc58d2be2e5b8" }, { "name": "x-node-id", @@ -108,21 +108,17 @@ }, { "name": "content-length", - "value": "713" - }, - { - "name": "connection", - "value": "close" + "value": "226" } ], - "headersSize": 405, + "headersSize": 386, "httpVersion": "HTTP/1.1", "redirectURL": "", "status": 200, "statusText": "OK" }, - "startedDateTime": "2024-03-18T11:50:57.611Z", - "time": 694, + "startedDateTime": "2024-03-18T11:50:58.316Z", + "time": 490, "timings": { "blocked": -1, "connect": -1, @@ -130,15 +126,15 @@ "receive": 0, "send": 0, "ssl": -1, - "wait": 694 + "wait": 490 } }, { - "_id": "acbd44d2b59f8bb85098f4a9278b5d64", + "_id": "e6e566cc324d0db8ff98c9b15abbb496", "_order": 0, "cache": {}, "request": { - "bodySize": 103, + "bodySize": 71, "cookies": [], "headers": [ { @@ -146,11 +142,6 @@ "name": "content-type", "value": "application/json" }, - { - "_fromType": "array", - "name": "solana-client", - "value": "js/0.0.0-development" - }, { "_fromType": "array", "name": "accept", @@ -159,7 +150,7 @@ { "_fromType": "array", "name": "content-length", - "value": "103" + "value": "71" }, { "_fromType": "array", @@ -171,28 +162,33 @@ "name": "accept-encoding", "value": "gzip,deflate" }, + { + "_fromType": "array", + "name": "connection", + "value": "close" + }, { "name": "host", "value": "alien-lingering-fire.solana-mainnet.quiknode.pro" } ], - "headersSize": 374, + "headersSize": 355, "httpVersion": "HTTP/1.1", "method": "POST", "postData": { "mimeType": "application/json", "params": [], - "text": "{\"method\":\"getLatestBlockhash\",\"jsonrpc\":\"2.0\",\"params\":[],\"id\":\"e6aa9c8c-0dd5-4e9a-a5af-78a7461c5c74\"}" + "text": "{\"method\":\"qn_estimatePriorityFees\",\"params\":{},\"id\":1,\"jsonrpc\":\"2.0\"}" }, "queryString": [], "url": "https://alien-lingering-fire.solana-mainnet.quiknode.pro" }, "response": { - "bodySize": 226, + "bodySize": 700, "content": { "mimeType": "application/json", - "size": 226, - "text": "{\"jsonrpc\":\"2.0\",\"result\":{\"context\":{\"apiVersion\":\"1.17.25\",\"slot\":254922957},\"value\":{\"blockhash\":\"2acCVCzy5dPndawWVvTYDoHWqoe4dXo1srhWQ4W5btnb\",\"lastValidBlockHeight\":235430258}},\"id\":\"e6aa9c8c-0dd5-4e9a-a5af-78a7461c5c74\"}" + "size": 700, + "text": "{\"jsonrpc\":\"2.0\",\"result\":{\"context\":{\"slot\":255150792},\"per_compute_unit\":{\"extreme\":668589,\"high\":116705,\"low\":11111,\"medium\":38679,\"percentiles\":{\"10\":773,\"100\":1351624532,\"15\":1391,\"20\":2049,\"25\":4125,\"30\":6080,\"35\":10714,\"40\":11111,\"45\":16895,\"5\":500,\"50\":22422,\"55\":33064,\"60\":38679,\"65\":50000,\"70\":69958,\"75\":94356,\"80\":116705,\"85\":175807,\"90\":266696,\"95\":668589}},\"per_transaction\":{\"extreme\":1000000,\"high\":200000,\"low\":35282,\"medium\":79970,\"percentiles\":{\"10\":667,\"100\":1351624532,\"15\":1612,\"20\":4000,\"25\":10003,\"30\":14882,\"35\":25000,\"40\":35282,\"45\":43898,\"5\":0,\"50\":50000,\"55\":55013,\"60\":79970,\"65\":100000,\"70\":120104,\"75\":142857,\"80\":200000,\"85\":266711,\"90\":350000,\"95\":1000000}}},\"id\":1}" }, "cookies": [], "headers": [ @@ -222,7 +218,7 @@ }, { "name": "x-host-id", - "value": "a92bc58d2be2e5b8" + "value": "bdc3c6b0fcc2f18f" }, { "name": "x-node-id", @@ -230,21 +226,25 @@ }, { "name": "date", - "value": "Mon, 18 Mar 2024 11:50:58 GMT" + "value": "Tue, 19 Mar 2024 14:22:30 GMT" }, { "name": "content-length", - "value": "226" + "value": "700" + }, + { + "name": "connection", + "value": "close" } ], - "headersSize": 386, + "headersSize": 405, "httpVersion": "HTTP/1.1", "redirectURL": "", "status": 200, "statusText": "OK" }, - "startedDateTime": "2024-03-18T11:50:58.316Z", - "time": 490, + "startedDateTime": "2024-03-19T14:22:30.248Z", + "time": 527, "timings": { "blocked": -1, "connect": -1, @@ -252,11 +252,11 @@ "receive": 0, "send": 0, "ssl": -1, - "wait": 490 + "wait": 527 } }, { - "_id": "80e7559f462440d7ee899caa4a6cdfb3", + "_id": "e2c784fd4c9b57d1393ff5435469c698", "_order": 0, "cache": {}, "request": { @@ -304,7 +304,7 @@ "postData": { "mimeType": "application/json", "params": [], - "text": "{\"method\":\"simulateTransaction\",\"jsonrpc\":\"2.0\",\"params\":[\"AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAQABAoQRxzJRFnXCoe6MBldnTlUf1q55/eUmCQ4F8R2+2mMoAwZGb+UhFzL/7K26csOb57yM5bvF9xJrLEObOkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIBAAkDhTABAAAAAAABAAkDhTABAAAAAAAA\",{\"replaceRecentBlockhash\":true,\"sigVerify\":false,\"encoding\":\"base64\"}],\"id\":\"adaa266b-07bb-447d-8668-2debebcce681\"}" + "text": "{\"method\":\"simulateTransaction\",\"jsonrpc\":\"2.0\",\"params\":[\"AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAQABAoQRxzJRFnXCoe6MBldnTlUf1q55/eUmCQ4F8R2+2mMoAwZGb+UhFzL/7K26csOb57yM5bvF9xJrLEObOkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIBAAkDF5cAAAAAAAABAAkDF5cAAAAAAAAA\",{\"replaceRecentBlockhash\":true,\"sigVerify\":false,\"encoding\":\"base64\"}],\"id\":\"68b1d6e0-4ef4-4be3-b649-20d4b22f009b\"}" }, "queryString": [], "url": "https://alien-lingering-fire.solana-mainnet.quiknode.pro" @@ -314,7 +314,7 @@ "content": { "mimeType": "application/json", "size": 221, - "text": "{\"jsonrpc\":\"2.0\",\"result\":{\"context\":{\"apiVersion\":\"1.17.26\",\"slot\":255134976},\"value\":{\"accounts\":null,\"err\":\"AccountNotFound\",\"logs\":[],\"returnData\":null,\"unitsConsumed\":0}},\"id\":\"adaa266b-07bb-447d-8668-2debebcce681\"}\n" + "text": "{\"jsonrpc\":\"2.0\",\"result\":{\"context\":{\"apiVersion\":\"1.17.26\",\"slot\":255150758},\"value\":{\"accounts\":null,\"err\":\"AccountNotFound\",\"logs\":[],\"returnData\":null,\"unitsConsumed\":0}},\"id\":\"68b1d6e0-4ef4-4be3-b649-20d4b22f009b\"}\n" }, "cookies": [], "headers": [ @@ -344,7 +344,7 @@ }, { "name": "x-host-id", - "value": "4773c6f26c8f4557" + "value": "91451cb2e1d47651" }, { "name": "x-node-id", @@ -352,7 +352,7 @@ }, { "name": "date", - "value": "Tue, 19 Mar 2024 12:33:00 GMT" + "value": "Tue, 19 Mar 2024 14:22:31 GMT" }, { "name": "content-length", @@ -365,8 +365,8 @@ "status": 200, "statusText": "OK" }, - "startedDateTime": "2024-03-19T12:32:59.870Z", - "time": 1133, + "startedDateTime": "2024-03-19T14:22:31.297Z", + "time": 127, "timings": { "blocked": -1, "connect": -1, @@ -374,7 +374,7 @@ "receive": 0, "send": 0, "ssl": -1, - "wait": 1133 + "wait": 127 } } ], diff --git a/packages/libs/sdk/spec/recordings/solana-client-sendSmartTransaction_2450286823/recording.har b/packages/libs/sdk/spec/recordings/solana-client-sendSmartTransaction_2450286823/recording.har index 259cc7cd..722befcb 100644 --- a/packages/libs/sdk/spec/recordings/solana-client-sendSmartTransaction_2450286823/recording.har +++ b/packages/libs/sdk/spec/recordings/solana-client-sendSmartTransaction_2450286823/recording.har @@ -130,11 +130,11 @@ } }, { - "_id": "d29a8a03e7650c1d4c9f0dd702fa1079", + "_id": "e6e566cc324d0db8ff98c9b15abbb496", "_order": 0, "cache": {}, "request": { - "bodySize": 90, + "bodySize": 71, "cookies": [], "headers": [ { @@ -150,7 +150,7 @@ { "_fromType": "array", "name": "content-length", - "value": "90" + "value": "71" }, { "_fromType": "array", @@ -178,17 +178,17 @@ "postData": { "mimeType": "application/json", "params": [], - "text": "{\"method\":\"qn_estimatePriorityFees\",\"params\":{\"last_n_blocks\":100},\"id\":1,\"jsonrpc\":\"2.0\"}" + "text": "{\"method\":\"qn_estimatePriorityFees\",\"params\":{},\"id\":1,\"jsonrpc\":\"2.0\"}" }, "queryString": [], "url": "https://alien-lingering-fire.solana-mainnet.quiknode.pro" }, "response": { - "bodySize": 713, + "bodySize": 700, "content": { "mimeType": "application/json", - "size": 713, - "text": "{\"jsonrpc\":\"2.0\",\"result\":{\"context\":{\"slot\":254922416},\"per_compute_unit\":{\"extreme\":2158180,\"high\":250000,\"low\":20430,\"medium\":71428,\"percentiles\":{\"10\":1127,\"100\":8333333333,\"15\":2162,\"20\":4579,\"25\":9868,\"30\":10714,\"35\":15000,\"40\":20430,\"45\":30000,\"5\":666,\"50\":46691,\"55\":56000,\"60\":71428,\"65\":101146,\"70\":142857,\"75\":200000,\"80\":250000,\"85\":433208,\"90\":714286,\"95\":2158180}},\"per_transaction\":{\"extreme\":5000000,\"high\":433208,\"low\":50000,\"medium\":140000,\"percentiles\":{\"10\":1388,\"100\":8333333333,\"15\":5003,\"20\":10714,\"25\":19302,\"30\":25546,\"35\":40000,\"40\":50000,\"45\":71428,\"5\":1,\"50\":95010,\"55\":101773,\"60\":140000,\"65\":165411,\"70\":222222,\"75\":345382,\"80\":433208,\"85\":620015,\"90\":1021861,\"95\":5000000}}},\"id\":1}" + "size": 700, + "text": "{\"jsonrpc\":\"2.0\",\"result\":{\"context\":{\"slot\":255150788},\"per_compute_unit\":{\"extreme\":668812,\"high\":116279,\"low\":10714,\"medium\":37461,\"percentiles\":{\"10\":744,\"100\":1351624532,\"15\":1290,\"20\":2000,\"25\":3703,\"30\":6030,\"35\":10275,\"40\":10714,\"45\":16512,\"5\":500,\"50\":21132,\"55\":30326,\"60\":37461,\"65\":50000,\"70\":62857,\"75\":89990,\"80\":116279,\"85\":175773,\"90\":266554,\"95\":668812}},\"per_transaction\":{\"extreme\":1000000,\"high\":200000,\"low\":35241,\"medium\":77957,\"percentiles\":{\"10\":655,\"100\":1351624532,\"15\":1379,\"20\":3579,\"25\":10000,\"30\":14314,\"35\":25000,\"40\":35241,\"45\":43829,\"5\":0,\"50\":50000,\"55\":55000,\"60\":77957,\"65\":100000,\"70\":120000,\"75\":142857,\"80\":200000,\"85\":266595,\"90\":350000,\"95\":1000000}}},\"id\":1}" }, "cookies": [], "headers": [ @@ -226,11 +226,11 @@ }, { "name": "date", - "value": "Mon, 18 Mar 2024 11:46:52 GMT" + "value": "Tue, 19 Mar 2024 14:22:28 GMT" }, { "name": "content-length", - "value": "713" + "value": "700" }, { "name": "connection", @@ -243,8 +243,8 @@ "status": 200, "statusText": "OK" }, - "startedDateTime": "2024-03-18T11:46:52.103Z", - "time": 794, + "startedDateTime": "2024-03-19T14:22:28.431Z", + "time": 604, "timings": { "blocked": -1, "connect": -1, @@ -252,11 +252,11 @@ "receive": 0, "send": 0, "ssl": -1, - "wait": 794 + "wait": 604 } }, { - "_id": "f9be7571431f5766900ea4c5eed30d0f", + "_id": "35244a6aa4ac8734325efac21609ad9c", "_order": 0, "cache": {}, "request": { @@ -304,7 +304,7 @@ "postData": { "mimeType": "application/json", "params": [], - "text": "{\"method\":\"sendTransaction\",\"jsonrpc\":\"2.0\",\"params\":[\"AduSSFWCowDxfELbBpmhfWTGny16JMwmTurwnRVS/Z7QwBdVKAMXhg84cxxHks8yJh03PW9/X4TEOhHGH/7GiwEBAAEChBHHMlEWdcKh7owGV2dOVR/Wrnn95SYJDgXxHb7aYygDBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAHLaYBE/pnlByh2qLtexxJv4xuqEN/9aSFyVZcWLYn+AQEACQMEFwEAAAAAAA==\",{\"encoding\":\"base64\",\"skipPreflight\":true}],\"id\":\"128e0f1d-eaa6-4039-b4b7-4b6a674af25a\"}" + "text": "{\"method\":\"sendTransaction\",\"jsonrpc\":\"2.0\",\"params\":[\"Aci82pcPwf31MTJc0UmBGMTxOqk+P6VfM6Wjv1AEzTGIWmsLgz8ABK+bV8ocMEZV2kloXTXnWbu5qO45o5O8AAEBAAEChBHHMlEWdcKh7owGV2dOVR/Wrnn95SYJDgXxHb7aYygDBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAHLaYBE/pnlByh2qLtexxJv4xuqEN/9aSFyVZcWLYn+AQEACQNVkgAAAAAAAA==\",{\"encoding\":\"base64\",\"skipPreflight\":true}],\"id\":\"52b1dbab-07d1-4c3f-a224-c526c54e5aa6\"}" }, "queryString": [], "url": "https://alien-lingering-fire.solana-mainnet.quiknode.pro" @@ -314,7 +314,7 @@ "content": { "mimeType": "application/json", "size": 162, - "text": "{\"jsonrpc\":\"2.0\",\"result\":\"5PckAvNaSkW2fgWpk2tkeAz8finKFceTqCbJn319yUep8MxBCkFhPdbS4N5TJYbWf6rc5JxZ1uwE3TL3cvj1Skgx\",\"id\":\"128e0f1d-eaa6-4039-b4b7-4b6a674af25a\"}\n" + "text": "{\"jsonrpc\":\"2.0\",\"result\":\"51n3WTQdDFiergup4SMrS3A3mgD16mMH5DJ2Fs1v7F4AGRsnd8XQmTnfCcFcQ9JTMfb36bX2ib1mJGxJkUV75XmJ\",\"id\":\"52b1dbab-07d1-4c3f-a224-c526c54e5aa6\"}\n" }, "cookies": [], "headers": [ @@ -344,7 +344,7 @@ }, { "name": "x-host-id", - "value": "567d68f1d2c02130" + "value": "7b452f0ca022e7f9" }, { "name": "x-node-id", @@ -352,7 +352,7 @@ }, { "name": "date", - "value": "Mon, 18 Mar 2024 11:46:53 GMT" + "value": "Tue, 19 Mar 2024 14:22:30 GMT" }, { "name": "content-length", @@ -365,8 +365,8 @@ "status": 200, "statusText": "OK" }, - "startedDateTime": "2024-03-18T11:46:53.827Z", - "time": 134, + "startedDateTime": "2024-03-19T14:22:29.981Z", + "time": 131, "timings": { "blocked": -1, "connect": -1, @@ -374,11 +374,11 @@ "receive": 0, "send": 0, "ssl": -1, - "wait": 134 + "wait": 131 } }, { - "_id": "d84468653a893bf1ce9d5dfb75d7b369", + "_id": "52456b29349dfd0a6b81e7808606af48", "_order": 0, "cache": {}, "request": { @@ -426,7 +426,7 @@ "postData": { "mimeType": "application/json", "params": [], - "text": "{\"method\":\"simulateTransaction\",\"jsonrpc\":\"2.0\",\"params\":[\"AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAQABAoQRxzJRFnXCoe6MBldnTlUf1q55/eUmCQ4F8R2+2mMoAwZGb+UhFzL/7K26csOb57yM5bvF9xJrLEObOkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIBAAkDBBcBAAAAAAABAAkDBBcBAAAAAAAA\",{\"replaceRecentBlockhash\":true,\"sigVerify\":false,\"encoding\":\"base64\"}],\"id\":\"da6652d2-9fcd-4ac1-bc1d-17242d415cc0\"}" + "text": "{\"method\":\"simulateTransaction\",\"jsonrpc\":\"2.0\",\"params\":[\"AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAQABAoQRxzJRFnXCoe6MBldnTlUf1q55/eUmCQ4F8R2+2mMoAwZGb+UhFzL/7K26csOb57yM5bvF9xJrLEObOkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIBAAkDVZIAAAAAAAABAAkDVZIAAAAAAAAA\",{\"replaceRecentBlockhash\":true,\"sigVerify\":false,\"encoding\":\"base64\"}],\"id\":\"8a4c3a0f-8dad-4315-9764-966930cc4ba6\"}" }, "queryString": [], "url": "https://alien-lingering-fire.solana-mainnet.quiknode.pro" @@ -436,7 +436,7 @@ "content": { "mimeType": "application/json", "size": 221, - "text": "{\"jsonrpc\":\"2.0\",\"result\":{\"context\":{\"apiVersion\":\"1.17.26\",\"slot\":254928509},\"value\":{\"accounts\":null,\"err\":\"AccountNotFound\",\"logs\":[],\"returnData\":null,\"unitsConsumed\":0}},\"id\":\"da6652d2-9fcd-4ac1-bc1d-17242d415cc0\"}\n" + "text": "{\"jsonrpc\":\"2.0\",\"result\":{\"context\":{\"apiVersion\":\"1.17.26\",\"slot\":255150812},\"value\":{\"accounts\":null,\"err\":\"AccountNotFound\",\"logs\":[],\"returnData\":null,\"unitsConsumed\":0}},\"id\":\"8a4c3a0f-8dad-4315-9764-966930cc4ba6\"}\n" }, "cookies": [], "headers": [ @@ -466,7 +466,7 @@ }, { "name": "x-host-id", - "value": "bd35ac261f619f05" + "value": "5ff44affcb12501b" }, { "name": "x-node-id", @@ -474,7 +474,7 @@ }, { "name": "date", - "value": "Mon, 18 Mar 2024 12:29:22 GMT" + "value": "Tue, 19 Mar 2024 14:22:52 GMT" }, { "name": "content-length", @@ -487,8 +487,8 @@ "status": 200, "statusText": "OK" }, - "startedDateTime": "2024-03-18T12:29:21.768Z", - "time": 532, + "startedDateTime": "2024-03-19T14:22:52.133Z", + "time": 660, "timings": { "blocked": -1, "connect": -1, @@ -496,7 +496,7 @@ "receive": 0, "send": 0, "ssl": -1, - "wait": 532 + "wait": 660 } } ], diff --git a/packages/libs/sdk/spec/solana/solanaClient.test.ts b/packages/libs/sdk/spec/solana/solanaClient.test.ts index 02cb6e2c..eb2d8642 100644 --- a/packages/libs/sdk/spec/solana/solanaClient.test.ts +++ b/packages/libs/sdk/spec/solana/solanaClient.test.ts @@ -41,7 +41,7 @@ describe('solana client', () => { await expect( solana.sendSmartTransaction({ transaction, keyPair, feeLevel }) ).resolves.toMatchInlineSnapshot( - `"5PckAvNaSkW2fgWpk2tkeAz8finKFceTqCbJn319yUep8MxBCkFhPdbS4N5TJYbWf6rc5JxZ1uwE3TL3cvj1Skgx"` + `"51n3WTQdDFiergup4SMrS3A3mgD16mMH5DJ2Fs1v7F4AGRsnd8XQmTnfCcFcQ9JTMfb36bX2ib1mJGxJkUV75XmJ"` ); } ); @@ -67,9 +67,9 @@ describe('solana client', () => { Object { "data": Array [ 3, - 133, - 48, - 1, + 23, + 151, + 0, 0, 0, 0, @@ -88,4 +88,82 @@ describe('solana client', () => { } ); }); + + it('should call fetchEstimatePriorityFees', async () => { + await withPolly( + { + recordingName: 'solana-client-fetchEstimatePriorityFees', + }, + async () => { + await expect(solana.fetchEstimatePriorityFees()).resolves + .toMatchInlineSnapshot(` + Object { + "id": 1, + "jsonrpc": "2.0", + "result": Object { + "context": Object { + "slot": 255150582, + }, + "per_compute_unit": Object { + "extreme": 630734, + "high": 119250, + "low": 10714, + "medium": 35714, + "percentiles": Object { + "10": 714, + "100": 2000000000, + "15": 1048, + "20": 2000, + "25": 2718, + "30": 4895, + "35": 6948, + "40": 10714, + "45": 13133, + "5": 100, + "50": 19667, + "55": 25541, + "60": 35714, + "65": 50000, + "70": 66918, + "75": 90000, + "80": 119250, + "85": 183005, + "90": 265586, + "95": 630734, + }, + }, + "per_transaction": Object { + "extreme": 886796, + "high": 245714, + "low": 28242, + "medium": 95010, + "percentiles": Object { + "10": 700, + "100": 2000000000, + "15": 1303, + "20": 3126, + "25": 8571, + "30": 12000, + "35": 20000, + "40": 28242, + "45": 40225, + "5": 0, + "50": 50000, + "55": 75019, + "60": 95010, + "65": 110000, + "70": 140214, + "75": 180511, + "80": 245714, + "85": 265450, + "90": 296041, + "95": 886796, + }, + }, + }, + } + `); + } + ); + }); }); diff --git a/packages/libs/sdk/src/solana/solana.ts b/packages/libs/sdk/src/solana/solana.ts index d1313d5f..990ee518 100644 --- a/packages/libs/sdk/src/solana/solana.ts +++ b/packages/libs/sdk/src/solana/solana.ts @@ -88,21 +88,12 @@ export class Solana { } // Get the priority fee averages based on fee data from the latest blocks - async fetchEstimatePriorityFees({ - last_n_blocks = 100, - account = undefined, - }: EstimatePriorityFeesParams): Promise { - const params: { last_n_blocks?: number; account?: string } = {}; - if (last_n_blocks !== undefined) { - params.last_n_blocks = last_n_blocks; - } - if (account !== undefined) { - params.account = account; - } - + async fetchEstimatePriorityFees( + args: EstimatePriorityFeesParams = {} + ): Promise { const payload: PriorityFeeRequestPayload = { method: 'qn_estimatePriorityFees', - params, + params: args, id: 1, jsonrpc: '2.0', };