Skip to content

Instantly share code, notes, and snippets.

View maurelian's full-sized avatar
💯

Maurelian maurelian

💯
View GitHub Profile
@maurelian
maurelian / solc-versions.js
Created September 1, 2017 13:11
multiple solc versions
const solc = require('solc');
const solcV0410 = solc.useVersion('v0.4.10+commit.f0d539ae')
const simpleContract = 'contract Simple { function g() {} }';
var outputLatest = solc.compile(simpleContract);
console.log(outputLatest.contracts[':Simple']['bytecode']);
// get a legacy version
// This requires this file: https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/bin/soljson-v0.4.10%2Bcommit.f0d539ae.js
@maurelian
maurelian / errors.sol
Created September 19, 2017 19:07
A contract for comparing the behavior of error checks in solidity
pragma solidity ^0.4.15;
contract C{
function throws(){
throw;
}
function reverts(){
revert();
}
pragma solidity ^0.4;
contract Attacker {
Victim public victimContract;
uint x;
function Attacker(){
victimContract = (new Victim).value(10)();
}
contract ReEnter {
TestToken tt;
function ReEnter(address _target){
tt = TestToken(_target);
}
function deposit() payable {
tt.deposit.value(msg.value)();
}
contract ReEnter {
TestToken tt;
function ReEnter(address _target){
tt = TestToken(_target);
}
function deposit() payable {
tt.deposit.value(msg.value)();
}
@maurelian
maurelian / -
Created October 10, 2017 10:00
0x5c79d3d994b54f98cedb0c5d9be4842f26e2fe10
@maurelian
maurelian / -
Created October 10, 2017 10:06
"0x5C79D3D994b54F98CEdB0c5D9Be4842f26E2Fe10"

Smart Contract Auditor Role at ConsenSys Diligence

ConsenSys Diligence is looking for people with a strong knowledge of Solidity and the EVM, to audit exciting contract systems for both ConsenSys spokes, and our clients who are among the top quality projects on the ethereum blockchain.

Our job is to hack crucial contracts before the bad guys do.

$ npm test
> cryptokitty@1.0.0 test /Users/primary/Projects/cryptokitties-bounty
> truffle test
Compiling ./contracts/Auction/ClockAuction.sol...
Compiling ./contracts/Auction/ClockAuctionBase.sol...
Compiling ./contracts/Auction/SaleClockAuction.sol...
Compiling ./contracts/Auction/SiringClockAuction.sol...
Compiling ./contracts/Debuggable.sol...