I have deployed a smart contract that inherits ERC721EnumerableUpgradeable
which inherits ERC721Upgradeable
.
When I deploy using Remix
, for example, I see the function safeTransferFrom
, which is a function of the contract ERC721Upgradeable
, despite I have just deployed my main contract, and all the methods that are public from inherited smart contracts are already there for me:
But when I use Hardhat
and I want to test that same function, it seems that the ERC721Upgradeable
contract is not being recognized, because I am getting the following error:
TypeError: smartVault.safeTransferFrom is not a function
The test I am running is this one:
it("Owner should be able to transfer smart NFT", async function () {
const { smartVault, owner, otherAccount } = await loadFixture(deploySmartVault);
await smartVault.safeTransferFrom(owner.address, otherAccount.address, 0);
});
How can I get to interact with that function using Hardhat
?