From 7a9fec285948f3a97ebb7c64b7528023d95f82d7 Mon Sep 17 00:00:00 2001 From: David Disu Date: Thu, 19 May 2022 10:02:06 +0100 Subject: [PATCH] Build args --- libs/remix-core-plugin/src/lib/openzeppelin-proxy.ts | 1 - libs/remix-lib/src/execution/txFormat.ts | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/remix-core-plugin/src/lib/openzeppelin-proxy.ts b/libs/remix-core-plugin/src/lib/openzeppelin-proxy.ts index e7b04f74da..c3c930e678 100644 --- a/libs/remix-core-plugin/src/lib/openzeppelin-proxy.ts +++ b/libs/remix-core-plugin/src/lib/openzeppelin-proxy.ts @@ -62,7 +62,6 @@ export class OpenZeppelinProxy extends Plugin { async deployUUPSProxy (implAddress: string, _data: string, implementationContractObject) { const args = [implAddress, _data] const constructorData = await this.blockchain.getEncodedParams(args, UUPSfunAbi) - console.log('constructorData: ', constructorData) const proxyName = 'ERC1967Proxy' const data = { contractABI: UUPSABI, diff --git a/libs/remix-lib/src/execution/txFormat.ts b/libs/remix-lib/src/execution/txFormat.ts index 4f19d3aaa7..a72549bef2 100644 --- a/libs/remix-lib/src/execution/txFormat.ts +++ b/libs/remix-lib/src/execution/txFormat.ts @@ -63,8 +63,9 @@ export function encodeParams (params, funAbi, callback) { try { params = params.replace(/(^|,\s+|,)(\d+)(\s+,|,|$)/g, '$1"$2"$3') // replace non quoted number by quoted number params = params.replace(/(^|,\s+|,)(0[xX][0-9a-fA-F]+)(\s+,|,|$)/g, '$1"$2"$3') // replace non quoted hex string by quoted hex string - params = JSON.stringify([params]) - funArgs = JSON.parse(params) + const args = '[' + params + ']' + + funArgs = JSON.parse(args) } catch (e) { return callback('Error encoding arguments: ' + e) }