This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.13; | |
contract secondContract { | |
uint public number = 0; | |
function increaseNumber() { | |
number++; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.13; | |
contract someContract { | |
mapping(address => uint) balances; | |
function deposit() payable { | |
balances[msg.sender] += msg.value; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.21; | |
contract A { | |
/** | |
* Example of a named contract call exception | |
*/ | |
function someAException() public { | |
B myContractB = new B(); | |
myContractB.myB(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity 0.4.24; | |
contract EthereumSession { | |
uint myInt; | |
function setTheInt(uint _myInt) public { | |
myInt = _myInt; | |
} | |
function getTheInt() public view returns(uint) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity 0.5.0; | |
contract SolidityChanges { | |
/** | |
* https://solidity.readthedocs.io/en/v0.5.0/050-breaking-changes.html#semantic-and-syntactic-changes | |
* | |
* The functions .call(), .delegatecall(), staticcall(), | |
* keccak256(), sha256() and ripemd160() now accept only | |
* a single bytes argument. Moreover, the argument is | |
* not padded. This was changed to make more explicit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.5.0; | |
contract Reentrance { | |
mapping (address => uint) userBalance; | |
function getBalance(address u) public view returns(uint){ | |
return userBalance[u]; | |
} | |
function addToBalance() public payable { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM elixir:1.14.3 AS builder | |
# RUN apt-get update && apt-get install -y gmp-dev automake libtool inotify-tools autoconf python3 file qemu-x86_64 | |
# Update default packages | |
RUN apt-get update | |
# Get Ubuntu packages | |
RUN apt-get install -y \ | |
build-essential \ |