[Contract] Solidity address payable 轉換與數組地址

 

address payable  -->  addresshtml

address payable addr1 = msg.sender;

address addr2 = addr1; // 隱式轉

address addr3 = address(addr1); // 顯式轉

 

address  -->  address payable數組

address addr1 = msg.sender;

address payable addr2 = address( uint160(addr1) ); // 須要先通過uint160

 

普通數組地址是:address[],可支付數組地址是:address payable[]ui

 

Link:http://www.javashuo.com/article/p-oemuvxdz-mm.htmlspa

相關文章
相關標籤/搜索