diff --git a/tasks/depositSC.ts b/tasks/depositSC.ts index ca6b375..04af3c4 100644 --- a/tasks/depositSC.ts +++ b/tasks/depositSC.ts @@ -4,9 +4,7 @@ task("deposit-sc", "Deposits token and sends to safe") .addParam("address", "Address of the token to be sent") .addParam("amount", "Amount we want to deposit (full value, with decimals)") .addParam("sc", "MultiversX address hex encoded of the receiver") - .addParam("endpoint", "data field for MVX SC execution") - .addParam("gaslimit", "data field for MVX SC execution") - .addParam("args", "data field for MVX SC execution") + .addParam("calldata", "SC call data in hex format") .addOptionalParam("price", "Gas price in gwei for this transaction", undefined) .setAction(async (taskArgs, hre) => { const fs = require("fs"); @@ -20,16 +18,13 @@ task("deposit-sc", "Deposits token and sends to safe") const address = taskArgs.address; const amount = taskArgs.amount; const receiver = taskArgs.sc; - const endpoint = taskArgs.endpoint; - const gaslimit = taskArgs.gaslimit; - const args = JSON.parse(taskArgs.args); + const callData = taskArgs.calldata - const callData = encodeCallData(endpoint, gaslimit, args); await safe.depositWithSCExecution( address, amount, Buffer.from(receiver, "hex"), - callData, + Buffer.from(callData, "hex"), getDeployOptions(taskArgs), ); });