当前位置:网站首页>Solidity contract address to wallet, wallet address to contract

Solidity contract address to wallet, wallet address to contract

2022-06-25 18:54:00 Wind breaking

    function getTestMaxMax(uint256 value)public{
        address payable ms = msg.sender;
        // The default unit is wei
        ms.transfer(value);
        // Or we can directly define 
        ms.transfer(5 ether);
    }


    // Transfer from wallet address to contract address 
    function transferToken()public payable {

    }

    // Send the contract address to ETH Transfer to wallet address 
    function transferTo(uint256 wad)public returns(bool){
        msg.sender.transfer(wad);
        return true;
    }

    // Query contract address ETH Balance of 
    function getEthAmount()public view returns(uint256){
        return address(this).balance;
    }

原网站

版权声明
本文为[Wind breaking]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/176/202206251821252863.html