Please excuse this basic question, as I am quite new to this. I created a sample token using OpenZeppelin framework. The token class inherits MintableToken which in turn inherits Ownable. This class has a variable:

address public owner;

which is by default set to msg.sender, but how do i check the address of this owner using web3js/truffle. I've tried this:

coinInstance = testCoin.at("address")

but i only get the following

{ [Function]
  call: [Function],
  sendTransaction: [Function],
  request: [Function: bound ],
  estimateGas: [Function] }

1 Answer 1


I had the same problem, but figured it out! Since owner is a public address, Solidity automatically creates a getter function, which you have to call like so:

coinInstance = testCoin.at("address")

That will return a Promise that should resolve to the owner address.

Your Answer

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

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