I am not sure why I am being told my function is not a function.

I am doing calls as I always do from the Truffle console.

pragma solidity >=0.4.22 <0.6.0;

contract store {
    string public storage_;

    function store_it(string memory s) public {

stor = store.at(store.address)


TypeError: stor.store_it is not a function

What is going wrong?


It seems you are using truffle v5. In that version you have to use await to obtain the result of .at

stor = await store.at(store.address)

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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