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
{ | |
"config": { | |
"target": "http://localhost", | |
"phases": [ | |
{"duration": 10, "arrivalRate": 20} | |
] | |
}, | |
"scenarios": [ | |
{ | |
"flow": [ |
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
0x2be1039Fa61797e723fA08C36E680ec5b6836b9E |
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 { | |
address[] public addrs; | |
function A () public { | |
while (addrs.length < 10) | |
addrs.push(msg.sender); | |
} |
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.23; | |
contract AddSub { | |
function add(uint a, uint b) internal pure returns (uint) { | |
return a + b; | |
} | |
function sub(uint a, uint b) internal pure returns (uint) { | |
return a - b; |
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.23; | |
contract FunctionTypes { | |
constructor() public payable { require(msg.value != 0); } | |
function withdraw() private { | |
require(msg.value == 0, 'dont send funds!'); | |
address(msg.sender).transfer(address(this).balance); | |
} |
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.23; | |
contract SafeExecution { | |
address public owner; | |
modifier noOwner() { | |
require(owner == 0, 'level already completed'); | |
_; | |
} |
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.23; | |
contract Attacker { | |
address public owner; | |
function () public { | |
owner = msg.sender; | |
msg.sender.transfer(address(this).balance); | |
} |
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.23; | |
contract Soln1 { | |
address public owner; | |
function execute(address) public { | |
owner = msg.sender; | |
} | |
} |
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.23; | |
contract Calldata { | |
// Alters the values on the stack for _a and _b, and returns values not located in calldata | |
function ignoreCalldata(address _a, bytes memory _b) public view returns (address, bytes memory) { | |
_a = address(this); | |
_b = new bytes(5); | |
_b[0] = 0xaa; | |
_b[4] = 0xdd; |
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.23; | |
contract Solver { | |
bytes4 internal constant SEL = bytes4(keccak256('Set(uint256)')); | |
function execute(address) public pure { | |
// constants are not accessible in assembly | |
bytes4 sel = SEL; | |
assembly { |
OlderNewer