From 7336be970f3b15ec2409115bd443a2d54e61c44b Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 31 Jan 2022 22:45:33 +0100 Subject: [PATCH] fix copy deploy payload to clipboard --- libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx b/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx index 0533030946..7fab3aa9d4 100644 --- a/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx @@ -63,7 +63,12 @@ export function ContractGUI (props: ContractGUIProps) { return 'cannot encode empty arguments' } const multiJSON = JSON.parse('[' + multiString + ']') - const encodeObj = txFormat.encodeData(props.funcABI, multiJSON, null) + + const encodeObj = txFormat.encodeData( + props.funcABI, + multiJSON, + props.funcABI.type === 'constructor' ? props.evmBC : null) + if (encodeObj.error) { console.error(encodeObj.error) return encodeObj.error