Skip to content
Discussion options

You must be logged in to vote

Hello @JimAtActiv
Most of the functions related to get the user balance are more a front-end approach, on which you use libraries like use-dapps or services like Moralis. Because the balance you are using on solidity will return the current balance of the network coin your are on (eth for ethereum blockchain) so if you have something like this:

contract MyContract
{
    // Private state variable
    address private owner;
  
     // Defining a constructor   
     constructor() public{   
        owner=msg.sender;
    }
  
    // Function to get 
    // address of owner
    function getOwner(
    ) public view returns (address) {    
        return owner;
    }
  
    // Function to return 

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@JimAtActiv
Comment options

Answer selected by cromewar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants