Skip to content
This repository was archived by the owner on Dec 14, 2021. It is now read-only.
This repository was archived by the owner on Dec 14, 2021. It is now read-only.

eth.contract is not a function #23

Description

@sathyamlokare

const token = eth.contract(tokenABI).at('0x6e0E0e02377Bc1d90E8a7c21f12BA385C2C35f78');

TypeError: eth.contract is not a function

why does it say so , I even tried "C"ontract web3js

Activity

  1. SilentCicero commented on Mar 9, 2018

    @SilentCicero
    Member
  2. sathyamlokare commented on Mar 9, 2018

    @sathyamlokare
    Author

    yeah as you said the object is not producing the instance properly

    var web3 = require('web3');
    const token = web3.eth.contract(tokenABI).at('address')
    

    This is what i am using

    when I say web3.Eth it says undefined , But there is a var Eth in web3.js

    and then say I want to use this function
    token.totalSupply().then((totalSupply) => {
    // to do
    });

  3. sathyamlokare commented on Mar 9, 2018

    @sathyamlokare
    Author

    I Tried this as you said

    const Token = eth.contract(tokenABI);
    const token = Token.at('0x6e0E0e02377Bc1d90E8a7c21f12BA385C2C35f78');
    
    

    It says

    TypeError: eth.contract is not a function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions