Address类型
address: Holds a 20 byte value (size of an Ethereum address). Address types also have members and serve as base for all contracts. 引用自here
方法:
- balance
- transfer
使用:
address类型一般用来保存accounts的公钥(地址)信息。
代码如下:
pragma solidity 0.4.10;
contract Coin {
address public abc;
function Coin() {
abc = msg.sender;
}
function pay() returns (address n) {
address result;
result = msg.sender;
return result;
}
}
原文:http://www.ethchinese.com/?p=1095
QQ群:559649971 (区块链学堂粉丝群)
个人微信:steven_k_colin
获取最新区块链咨询,请关注《以太中文网》微信公众号:以太中文网