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?


2 Answers 2


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)

In truffle version 5.0, you have to use await to obtain the result of contract.

let contract = await ContractName.deployed()
let result = await contract.functionName()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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