add "pragma solidity ^0.4.0;" to code examples

This commit is contained in:
Dimitry
2016-09-05 14:54:54 +03:00
parent 341c9436a8
commit 183cd70c47
9 changed files with 96 additions and 0 deletions
+8
View File
@@ -51,6 +51,8 @@ complete contract):
::
pragma solidity ^0.4.0;
// THIS CONTRACT CONTAINS A BUG - DO NOT USE
contract Fund {
/// Mapping of ether shares of the contract.
@@ -73,6 +75,8 @@ outlined further below:
::
pragma solidity ^0.4.0;
contract Fund {
/// Mapping of ether shares of the contract.
mapping(address => uint) shares;
@@ -149,6 +153,8 @@ Never use tx.origin for authorization. Let's say you have a wallet contract like
::
pragma solidity ^0.4.0;
contract TxUserWallet {
address owner;
@@ -166,6 +172,8 @@ Now someone tricks you into sending ether to the address of this attack wallet:
::
pragma solidity ^0.4.0;
contract TxAttackWallet {
address owner;