text: App = {
    web3Provider: null,
    contracts: {},
      account: '0x0',
  
    init: function() {
  
  
      return App.initWeb3();
    },
  
    initWeb3: function() {
        if (typeof web3 !== 'undefined') {
            // If a web3 instance is already provided by Meta Mask.
            App.web3Provider = web3.currentProvider;
            web3 = new Web3(web3.currentProvider);
        } else {
            // Specify default instance if no web3 instance provided
            App.web3Provider = new Web3.providers.HttpProvider('http://localhost:7545');
            web3 = new Web3(App.web3Provider);
        }
  
      return App.initContract();
    },
  
    initContract: function() {
        $.getJSON("Addition.json", function(Addition) {
            // Instantiate a new truffle contract from the artifact
            App.contracts.Addition = TruffleContract(Addition);
            // Connect provider to interact with contract
            App.contracts.Addition.setProvider(App.web3Provider);
  
            return App.render();
        });
    },
  
      render: function(){
      let additionInstance;
  
          web3.eth.getCoinbase(function(err, account) {
              if (err === null) {
                  App.account = account;
  
              }
          });
  
  
      App.contracts.Addition.deployed().then(function(instance){
        additionInstance = instance;
        return additionInstance.num();
      }).then(function(newNumber){
        $("#para1").html("The number entered by user is "+newNumber);
      })
  
    },
      
      enterNum: function () {
      let numberValue = document.getElementById("inputNum").value;
      App.contracts.Addition.deployed().then(function(instance){
        instance.getNumber(numberValue, {from : App.account});
      });
  
  
          
      }
  
  
  };
  
  $(function() {
    $(window).load(function() {
      App.init();
    });
  });
  