diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2016-10-16 06:06:15 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2016-10-19 21:02:50 +0800 |
commit | 448f1fba536e9a120968ac146e1aae9a63a1c564 (patch) | |
tree | 9b89d14a3920b9b518fda012f30eedac6b08bd29 | |
parent | 9bec1e1efd43206d2fb86a30c14a44782e823c13 (diff) | |
download | dexon-solidity-448f1fba536e9a120968ac146e1aae9a63a1c564.tar.gz dexon-solidity-448f1fba536e9a120968ac146e1aae9a63a1c564.tar.zst dexon-solidity-448f1fba536e9a120968ac146e1aae9a63a1c564.zip |
FAQ: remove address(this) section (already explained elsewhere)
-rw-r--r-- | docs/frequently-asked-questions.rst | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/docs/frequently-asked-questions.rst b/docs/frequently-asked-questions.rst index 77cb81cb..43fba332 100644 --- a/docs/frequently-asked-questions.rst +++ b/docs/frequently-asked-questions.rst @@ -85,18 +85,6 @@ Use a non-constant function (req ``sendTransaction``) to increment a variable in See `value_incrementer.sol <https://github.com/fivedogit/solidity-baby-steps/blob/master/contracts/20_value_incrementer.sol>`_. -Get contract address in Solidity -================================ - -Short answer: The global variable ``this`` is the contract address. - -See `basic_info_getter <https://github.com/fivedogit/solidity-baby-steps/blob/master/contracts/15_basic_info_getter.sol>`_. - -Long answer: ``this`` is a variable representing the current contract. -Its type is the type of the contract. Since any contract type basically inherits from the -``address`` type, ``this`` is always convertible to ``address`` and in this case contains -its own address. - Get a contract to return its funds to you (not using ``selfdestruct(...)``). ============================================================================ |