title: How can we send ether to payable function in solidity?
body: <p>I `ve got this function at my .sol file</p>
  <pre><code>function enter() public payable{
          require(msg.value &gt; .01 ether);
          players.push(msg.sender);
      }
  </code></pre>
  <p>But when i`m trying to send some eth on it from deployed file it says 'invalid address or ENS name'.</p>
  <pre><code>const lotteryContract = new ethers.Contract(
          addr,
          LotteryArtifact.abi,
          acc2
      )
  
      const tx ={
          from:acc2,
          value:ethers.utils.parseEther('2'),
      }
  
      await lotteryContract.enter(tx)
  </code></pre>
  <p>Seems like it`s syntactically error in this way of calling it.Also i tried to send it this way</p>
  <pre><code> const tx ={
          to:lotteryContract.enter(),
          value:ethers.utils.parseEther('2'),
      }
  
     await acc1.sendTransaction(tx)
  </code></pre>
  <p>Testing this 'enter' function in remix ide logging this
  <a href="https://i.stack.imgur.com/VzdDD.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>According to the screenshot can anyone explain does 0xf8e81D47203A594245E36C48e151709F0C19fBe8 means the 'enter' function address?</p>