We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a4840e commit a1e9c0bCopy full SHA for a1e9c0b
packages/ui/src/solidity/remix.ts
@@ -1,11 +1,9 @@
1
export function remixURL(code: string, upgradeable = false): URL {
2
const remix = new URL('https://remix.ethereum.org');
3
4
- const codeWithEscapedSpecialCharacters = Array.from(new TextEncoder().encode(code), b => String.fromCharCode(b)).join(
5
- '',
6
- );
+ const encodedCode = btoa(String.fromCharCode(...new TextEncoder().encode(code))).replace(/=*$/, '');
7
8
- remix.searchParams.set('code', btoa(codeWithEscapedSpecialCharacters).replace(/=*$/, ''));
+ remix.searchParams.set('code', encodedCode);
9
10
if (upgradeable) {
11
remix.searchParams.set('deployProxy', upgradeable.toString());
0 commit comments