{"ScriptPreparationCode":"function bigIntToBigEndianBytesLoop(value) {\r\n const hex = value.toString(16).padStart(8 * 2, \u00270\u0027);\r\n const bytes = new Uint8Array(8);\r\n for (let i = 0; i \u003C 8; i\u002B\u002B) {\r\n bytes[i] = parseInt(hex.slice(i * 2, i * 2 \u002B 2), 16);\r\n }\r\n return bytes;\r\n}\r\n\r\nfunction bigIntToBigEndianBytesDataView(value) {\r\n const buf = new ArrayBuffer(8);\r\n const view = new DataView(buf);\r\n\r\n view.setBigUint64(0, value);\r\n return new Uint8Array(buf);\r\n}","TestCases":[{"Name":"for-loop","Code":"bigIntToBigEndianBytesLoop(2382975329865n);","IsDeferred":false},{"Name":"dataview","Code":"bigIntToBigEndianBytesDataView(2382975329865n);","IsDeferred":false}]}