Functions and addresses declared as payable can receive Ether.
payable
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; contract Payable { // Payable address can receive Ether address payable public owner; // Payable constructor can receive Ether constructor() payable { owner = payable(msg.sender); } function deposit() external payable{ // code here } }
Last updated 2 years ago
Was this helpful?