1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

truffle console - invoking contract function usage (Version 3)

Discussion in 'Programming/Internet' started by Sunil, Oct 8, 2018.

  1. Sunil

    Sunil Guest

    I have a simple contract like below. I was able to successfully compile and migrate the same.

    pragma solidity ^0.4.8;

    contract A {

    function A() payable {

    function getBal() returns(uint a){
    return (10);


    Now I am using truffle console and trying to invoke getBal() function of my contract.

    A.deployed().then(function(instance) { test = instance; return test.getBal();}).then(function(result){});

    I am not getting the new version 3 way of calling the functions.

    Could you help me out and point what I am missing?


    Login To add answer/comment

Share This Page