0

I am receiving the error: deedrepository.registerDeed()

TypeError: 'registerDeed' is not a function at :1:1

when trying to call the function registerDeed from and geth --dev console terminal window.

This is the contract I deployed https://github.com/conwise18/MasteringEthereum/blob/develop/code/auction_dapp/backend/contracts/DeedRepository.sol

by using web3.deploy.

I have also created the contract in remix and it works fine,

any help as to why the function is unable to be called in my console ?

using: deedrepository.registerDeed()

I have tried calling the function with the parameters as well and I'm receiving the same error.

thanks in advance !

1 Answer 1

0

Problem is solved....

The registerDeed function could not be called because the "mint" function inside the ERC721BasicToken && ERC721Token contracts was specified as internal and could not be called from the deedRepository contract. Changing the function to "public" was how I got around the problem although this imposes a security risk for the code, to alleviate the security risk, I would recommend a modifier function such as one similar to onlyOwner() which requires only the owner of the contract to be able to call the "mint" function.

hope this helps for anyone looking for reference.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.