I am tasked with interacting with a function in a smart contract that has already been deployed. I know the contract address and the function signature and I have a solution that uses interfaces. However, this function I am interacting with then sends an NFT to msg.sender which in this case is the contract with the interface solution as opposed to my personal account.
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;
interface ITargetContract {
function addWhitelist(bytes32 _something, string memory _id)
external;
}
contract MyContract {
function addWhitelist(
address _t,
bytes32 _something,
string memory _id
) public {
ITargetContract(_t).addWhitelist(_something, _id);
}
}
So to avoid this NFT being sent to my contract, can I interact with the deployed contract directly with my personal account if I only know the contract address and function signature?