Skip to content

Instantly share code, notes, and snippets.

// SPDX-License-Identifier: MIT
pragma solidity >0.5.0 <0.8.0;
/**
* @title Lib_MerkleTree
* @author River Keefer
*/
library MerkleUtils{
/**********************
pragma solidity 0.6.4;
/**
* @title ReceiveTest
* @author Shane Fontaine - <shane6fontaine@gmail.com>
* @notice THIS IS UNAUDITED CODE. DO NOT USE IN PRODUCTION. USE AT YOUR OWN RISK.
* @dev Testing Solidity 0.6.x receive() function
*/
// NOTE: This is unaudited code. Do not use in production.
pragma solidity ^0.5.8;
import "./AuthereumEnsResolver.sol";
import "../base/Owned.sol";
import "../utils/strings.sol";
/**
* @title AuthereumEnsManager
Name Description On-chain Retrival Off-chain Retrieval
Creation Bytecode Code that generates the runtime bytecode type(ContractName).creationCode getTransactionByHash
Runtime Bytecode Code that is stored on-chain that describes a smart contract extcodecopy(a) or type(ContractName).runtimeCode getCode
Bytecode Umbrella term that encompasses both runtime bytecode and creation bytecode NA NA
Deployed Bytecode Same as runtime bytecode extcodecopy(a) or type(ContractName).runtimeCode getCode
Init Code Same as creation bytecode type(ContractName).creationCode getTransactionByHash
pragma solidity ^0.4.24;
contract Ownable {
address private _owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner

INFO:Slither:'truffle compile' running (use --truffle-version truffle@x.x.x to use specific version) Truffle v5.0.7 (core: 5.0.7) Node v11.15.0

INFO:Detectors:

ERC20Detailed.______gap (openzeppelin-eth/contracts/token/ERC20/ERC20Detailed.sol) shadows:
	- Initializable.______gap (zos-lib/contracts/Initializable.sol)
ERC20.______gap (openzeppelin-eth/contracts/token/ERC20/ERC20.sol) shadows:
	- Initializable.______gap (zos-lib/contracts/Initializable.sol)
pragma solidity ^0.5.0;
// Flat ERC20
// Updated Jun 7 2019
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
INFO:Detectors:
ERC20Detailed.______gap (openzeppelin-eth/contracts/token/ERC20/ERC20Detailed.sol#45) shadows:
- Initializable.______gap (zos-lib/contracts/Initializable.sol#56)
ERC20.______gap (openzeppelin-eth/contracts/token/ERC20/ERC20.sol#209) shadows:
- Initializable.______gap (zos-lib/contracts/Initializable.sol#56)
Reference: https://github.com/trailofbits/slither/wiki/Detectors-Documentation#state-variable-shadowing
INFO:Detectors:
Initializable.isConstructor (zos-lib/contracts/Initializable.sol#44-53) is declared view but contains assembly code
ECDSA.recover (openzeppelin-eth/contracts/cryptography/ECDSA.sol#18-54) is declared view but contains assembly code
Reference: https://github.com/trailofbits/slither/wiki/Detectors-Documentation#constant-functions-changing-the-state

Keybase proof

I hereby claim:

  • I am shanefontaine on github.
  • I am shanefontaine (https://keybase.io/shanefontaine) on keybase.
  • I have a public key ASAmlUG5W7TZ7BvPBWTlDEw8qfJL1oyE9MsZYGiP1gaM3Ao

To claim this, I am signing this object:

function withdraw() public {
_checkWithdrawal();
_token.safeTransfer(_wallet, _token.balanceOf(address(this)));
}
funciton _checkWithdrawal() internal {
// This could be anything relevant. For example:
// 1. require(now > hasClosed());
// 2. require(isFinalized());
// 3. require(numContributors == maxNumContributors);