CRYPTO NEWS

Use of Blockchain Estimated to Rise as Per Nirmala Sitharaman

Nirmala Sitharam recently appeared in the third edition of FICCI Leads, where she stated that the use of blockchain is estimated to increase by 46% in the years to come. The future of finance remained the central theme of the event, with several speakers sharing their thoughts. The event started with Sanjiv Mehta, the President …

How to deposit and withdraw WETH

When I try to make a deposit, Ethereum is transferred but the Wrapped ether is not received. Here is my code interface IWETH is IERC20 { receive() external payable; function deposit() external payable; function withdraw(uint256 wad) external; } contract Swap { address payable private constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; function wrapEther() external payable { uint256 ETHAmount::Listen

When I try to make a deposit, Ethereum is transferred but the Wrapped ether is not received. Here is my code

interface IWETH is IERC20 {   receive() external payable;    function deposit() external payable;    function withdraw(uint256 wad) external; }  contract Swap {   address payable private constant  WETH =     0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;    function wrapEther() external payable {     uint256 ETHAmount = msg.value;      //create WETH from ETH     if (msg.value != 0) {       IWETH(WETH).deposit{ value: ETHAmount }();     }     require(       IWETH(WETH).balanceOf(address(this)) >= ETHAmount,       "Ethereum not deposited"     );   }    function unwrapEther(uint256 Amount) external {     address payable sender = msg.sender;      if (Amount != 0) {       IWETH(WETH).withdraw(Amount);       sender.transfer(address(this).balance);     }   }  } 

Use of Blockchain Estimated to Rise as Per Nirmala Sitharaman

Shopping cart
There are no products in the cart!
Continue shopping
0