Caver-js & caver-js-ext-kas

Hi Klaytn Team,
Recently, we are using caver-js-ext-kas to call a node. In our contract, we have implemented a transfer function that is inherited from KIP-7.

From Nodejs backend, we write a code:

const GAS_LIMIT = 100000;
const caver = new CaverExtKAS(accessKey, secretKey);
const myContract = new caver.klay.Contract(myContractABI, myContractAddress);

const transferMyToken = async(to, value) {
    const _gasPrice = await caver.klay.getGasPrice();
  const _gasAmount = await klaytnMita.methods
    .transfer(to, amount)
    .estimateGas({ from: adminAddress, gas: GAS_LIMIT });
  logger.info(`Estimated Gasprice ${_gasPrice}, Gas: ${_gasAmount}`);
  await myContract.methods
    .transfer(to, amount)
    .send({ from: adminAdress, gas: _gasAmount, gasPrice: _gasPrice })
    .catch((err) => {
      logger.error(`error: ${err.message}`);
    });
}

And we run it on a droplet server from Digital Ocean, with a memory 2GB. Sometimes, we get the error:

"data" and "input" cannot be used as properties of transactions at the same time.

p/s: For a version of caver-js & caver-js-ext

"caver-js": "^1.9.0",
"caver-js-ext-kas": "^1.12.0"

Kindly help me figure it out. Thanks!

Hi, Can I get the transfer function code you implemented?

Hi,
Our smart contract is inherited by ERC20, so transfer function

    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }