ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# 地址相关(Address Related) `<address>.balance (uint256)`: `Address`的余额,以`wei`为单位。 `<address>.transfer(uint256 amount)`: 发送给定数量的`ether`,以`wei`为单位,到某个地址。失败时抛出异常。 `<address>.send(uint256 amount) returns (bool)`: 发送给定数量的`ether`,以`wei`为单位,到某个地址。失败时返回`false`。 `<address>.call(...) returns (bool)`: 发起底层的`call`调用。失败时返回`false`。 `<address>.callcode(...) returns (bool)`: 发起底层的`callcode`调用,失败时返回`false`。 `<address>.delegatecall(...) returns (bool)`: 发起底层的`delegatecall`调用,失败时返回`false`。 更多信息参加Address章节。 使用`send`方法需要注意,调用栈深不能超过1024,或gas不足,都将导致发送失败。使用为了保证你的`ether`安全,要始终检查返回结果。当用户取款时,使用`transfer`或使用最佳实践的模式。 ## 合约相关 `this`(当前合约的类型) 当前合约的类型,可以显式的转换为`Address` `selfdestruct(address recipt)`: 销毁当前合约,并把它所有资金发送到给定的地址。 另外,当前合约里的所有函数均可支持调用,包括当前函数本身。 更新关于地址的call,callcode,delegateCall的介绍。[http://me.tryblockchain.org/Solidity-call-callcode-delegatecall.html](http://me.tryblockchain.org/Solidity-call-callcode-delegatecall.html)  [http://solidity.readthedocs.io/en/develop/common-patterns.html#withdrawal-from-contracts](http://solidity.readthedocs.io/en/develop/common-patterns.html#withdrawal-from-contracts)