Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Currently implementing Web3

Bernhard Mueller b-mueller

💭
Currently implementing Web3
View GitHub Profile
View MainModuleInstrumented.sol
pragma solidity ^0.6.8;
pragma experimental ABIEncoderV2;
abstract contract IModuleAuth {
/**
* @notice Hashed _data to be signed
* @param _data Data to be hashed
* @return hashed data for this wallet
*/
View gist:6346598dd506c99f49c1b9401b69aa47
pragma solidity ^0.6.8;
pragma experimental ABIEncoderV2;
abstract contract IModuleAuth {
/**
* @notice Hashed _data to be signed
* @param _data Data to be hashed
* @return hashed data for this wallet
*/
View Input file
pragma solidity ^0.6.8;
pragma experimental ABIEncoderV2;
abstract contract IModuleAuth {
/**
* @notice Hashed _data to be signed
* @param _data Data to be hashed
* @return hashed data for this wallet
*/
View MainModule.sol
pragma solidity ^0.6.8;
pragma experimental ABIEncoderV2;
contract MythXVerification {
event AssertionFailed(string message);
modifier checkInvariants {
_;
View wallet-analysis-report.json
[
{
"issues": [
{
"swcID": "SWC-104",
"swcTitle": "Unchecked Call Return Value",
"description": {
"head": "Unchecked return value from external call.",
"tail": "External calls return a boolean value. If the callee halts with an exception, 'false' is returned and execution continues in the caller. The caller should check whether an exception happened and react accordingly to avoid unexpected behavior. For example it is often desirable to wrap external calls in require() so the transaction is reverted if the call fails."
View Web3Bazaar.sol
pragma solidity >0.4.99 <0.6.0;
/** @title Utility to expand strings' functionality.
* @author Mohd Shahnawaz
*/
library LibraryDemo {
uint constant private ALLOCATION_FOR_STRING = 32;
/** @dev Get size of allocation of given string variable.
View WalletLibrary.sol
//sol Wallet
// A simplified version of the famous multi-sig, daily-limited account proxy/wallet.
// @authors:
// Gav Wood <g@ethdev.com>
// Adapted by B. Mueller
// inheritable "property" contract that enables methods to be protected by requiring the acquiescence of either a
// single, or, crucially, each of a number of, designated owners.
// usage:
// use modifiers onlyowner (just own owned) or onlymanyowners(hash), whereby the same hash must be provided by
View QuickVsStandard.sol
pragma solidity ^0.5.0;
contract Vulnerable2Calls {
address public owner;
modifier onlyOwner {
require(msg.sender == owner);
_;
}
View funwithnumbers.sol
pragma solidity ^0.5.0;
contract FunWithNumbers {
uint constant public tokensPerEth = 10;
uint constant public weiPerEth = 1e18;
mapping(address => uint) public balances;
function buyTokens() public payable {
uint tokens = msg.value/weiPerEth*tokensPerEth; // convert wei to eth, then multiply by token rate
balances[msg.sender] += tokens;
View SymbolicArbitrage.sol
pragma solidity ^0.5.0;
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*