Contract 0xb4e8d46cccc9c10fbdaac8aa5ed299da12a5106f

 
Txn Hash Method
Block
From
To
Value
0xc1a63616c1c2385904581b812cad7b7f0f85ff6d89dd76b2573f16202031abb3Set Credit Limit113885992020-12-04 21:27:40192 days 6 hrs agoAmbisafe Operations IN  0xb4e8d46cccc9c10fbdaac8aa5ed299da12a5106f0 Ether0.00090442452220.0001
0x0b5974c66df7d7d4c631d23797d48c24f14ed42bb4a6ed737496ab2cb5363c0fSet Credit Limit113724312020-12-02 10:15:31194 days 17 hrs agoAmbisafe Operations IN  0xb4e8d46cccc9c10fbdaac8aa5ed299da12a5106f0 Ether0.00135663452230.0001
0x24a3912cdeae1aa25bf44fa54a1af566853124fa4b7a08861a395b9fc9c142a5Set Credit Limit113724312020-12-02 10:15:31194 days 17 hrs agoAmbisafe Operations IN  0xb4e8d46cccc9c10fbdaac8aa5ed299da12a5106f0 Ether0.00135663452230.0001
0xb196c28033c8bb6d214a4de3b132dca75aca531c0db11d47cddb0e59c480c580Set Credit Limit113683202020-12-01 18:42:28195 days 8 hrs agoAmbisafe Operations IN  0xb4e8d46cccc9c10fbdaac8aa5ed299da12a5106f0 Ether0.00090442452220.0001
0x985503d85c210aa9562ddf91ed03c908d7c82c972bd26b5ec3e82d78e4dd86c5Set Credit Limit113683102020-12-01 18:40:18195 days 8 hrs agoAmbisafe Operations IN  0xb4e8d46cccc9c10fbdaac8aa5ed299da12a5106f0 Ether0.00180884452240.0001
0xe0770177cc44105c5372527ced3470dc35657b8187a12b332604127f8ba84af3Set Credit Limit113678752020-12-01 16:59:14195 days 10 hrs agoAmbisafe Operations IN  0xb4e8d46cccc9c10fbdaac8aa5ed299da12a5106f0 Ether0.00180884452240.0001
0x967660d2bb9560c135c1627e7849ca45dd3590ef9e3903d001664672e4ee15c8Set Credit Limit113678712020-12-01 16:58:08195 days 10 hrs agoAmbisafe Operations IN  0xb4e8d46cccc9c10fbdaac8aa5ed299da12a5106f0 Ether0.00180932452340.0001
0x0ff5f0cb06186d4296869f906271480f898c05d6792df598375e0718e0a1dd38Set Credit Limit113673192020-12-01 14:53:10195 days 12 hrs agoAmbisafe Operations IN  0xb4e8d46cccc9c10fbdaac8aa5ed299da12a5106f0 Ether0.004522104522100.0001
0xee3e1bff03e6777f94bcd57a7191e89b89672651824c8d9c4fadc7784862f3600x60806040113671852020-12-01 14:22:03195 days 13 hrs agoAmbisafe Operations IN  Contract Creation0 Ether0.16752342111
[ Download CSV Export 
View more zero value Internal Transactions in Advanced View mode
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MutualCreditResource

Compiler Version
v0.7.1+commit.f4a555be

Optimization Enabled:
Yes with 10000 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2020-12-01
*/

// SPDX-License-Identifier: MIT
pragma solidity 0.7.1;
pragma experimental ABIEncoderV2;


/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return _functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}


/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(_owner == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}


/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}


/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }
}

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}


/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20 {
    using SafeMath for uint256;
    using Address for address;

    mapping (address => uint256) private _balances;

    mapping (address => mapping (address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name, string memory symbol) {
        _name = name;
        _symbol = symbol;
        _decimals = 18;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
     * called.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view returns (uint8) {
        return _decimals;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20};
     *
     * Requirements:
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(address sender, address recipient, uint256 amount) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
     *
     * This is internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal {
        _decimals = decimals_;
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be to transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}



/**
 * @dev Extension of {ERC20} that allows token holders to destroy both their own
 * tokens and those that they have an allowance for, in a way that can be
 * recognized off-chain (via event analysis).
 */
abstract contract ERC20Burnable is Context, ERC20 {
    using SafeMath for uint256;

    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public virtual {
        uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, "ERC20: burn amount exceeds allowance");

        _approve(account, _msgSender(), decreasedAllowance);
        _burn(account, amount);
    }
}


library ExtraMath {
    function toUInt128(uint _a) internal pure returns(uint128) {
        require(_a <= uint128(-1), 'uint128 overflow');
        return uint128(_a);
    }
}

contract MutualCreditResource is Ownable, ERC20Burnable {
    using SafeMath for *;
    using ExtraMath for *;

    struct Member {
        uint128 creditBalance;
        uint128 creditLimit;
    }

    mapping(address => Member) private _members;

    event CreditLimitUpdate(address to, uint limit);

    constructor() ERC20('Mutual Credit Resource System', 'rUSD') {
        _setupDecimals(6);
    }

    function creditBalanceOf(address _member) public view returns(uint) {
        return _members[_member].creditBalance;
    }

    function creditLimitOf(address _member) public view returns(uint) {
        return _members[_member].creditLimit;
    }

    function creditLimitLeftOf(address _member) public view returns(uint) {
        Member memory _localMember = _members[_member];
        if (_localMember.creditBalance >= _localMember.creditLimit) {
            return 0;
        }
        return _localMember.creditLimit.sub(_localMember.creditBalance);
    }

    function setCreditLimit(address _member, uint _limit) external onlyOwner() {
        _members[_member].creditLimit = _limit.toUInt128();
        emit CreditLimitUpdate(_member, _limit);
    }

    function _transfer(address _from, address _to, uint _amount) internal override {
        _beforeTransfer(_from, _amount);
        super._transfer(_from, _to, _amount);
        _afterTransfer(_to, _amount);
    }

    function _beforeTransfer(address _from, uint _amount) private {
        uint _balanceFrom = balanceOf(_from);
        if (_balanceFrom >= _amount) {
            return;
        }

        Member memory _memberFrom = _members[_from];
        uint _missingBalance = _amount.sub(_balanceFrom);
        uint _creditLeft = _memberFrom.creditLimit.sub(_memberFrom.creditBalance, 'Insufficient credit');
        require(_creditLeft >= _missingBalance, 'Insufficient credit');
        _members[_from].creditBalance = _memberFrom.creditBalance.add(_missingBalance).toUInt128();
        _mint(_from, _missingBalance);
    }

    function _afterTransfer(address _to, uint _amount) private {
        Member memory _memberTo = _members[_to];
        uint _repay = Math.min(_memberTo.creditBalance, _amount);
        if (_repay == 0) {
            return;
        }
        _members[_to].creditBalance = _memberTo.creditBalance.sub(_repay).toUInt128();
        _burn(_to, _repay);
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"limit","type":"uint256"}],"name":"CreditLimitUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_member","type":"address"}],"name":"creditBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_member","type":"address"}],"name":"creditLimitLeftOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_member","type":"address"}],"name":"creditLimitOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_member","type":"address"},{"internalType":"uint256","name":"_limit","type":"uint256"}],"name":"setCreditLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b506040518060400160405280601d81526020017f4d757475616c20437265646974205265736f757263652053797374656d000000815250604051806040016040528060048152602001631c9554d160e21b8152506000620000776200010d60201b60201c565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508151620000d690600490602085019062000127565b508051620000ec90600590602084019062000127565b50506006805460ff1916601217815562000107915062000111565b620001c3565b3390565b6006805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200016a57805160ff19168380011785556200019a565b828001600101855582156200019a579182015b828111156200019a5782518255916020019190600101906200017d565b50620001a8929150620001ac565b5090565b5b80821115620001a85760008155600101620001ad565b6118b480620001d36000396000f3fe608060405234801561001057600080fd5b506004361061016c5760003560e01c806370a08231116100cd57806395d89b4111610081578063a9059cbb11610066578063a9059cbb146102be578063dd62ed3e146102d1578063f2fde38b146102e45761016c565b806395d89b41146102a3578063a457c2d7146102ab5761016c565b806379cc6790116100b257806379cc6790146102685780638da5cb5b1461027b5780639469ea39146102905761016c565b806370a082311461024d578063715018a6146102605761016c565b806332a922291161012457806342966c681161010957806342966c681461021257806349d5034d146102275780634a9a75aa1461023a5761016c565b806332a92229146101ec57806339509351146101ff5761016c565b806318160ddd1161015557806318160ddd146101af57806323b872dd146101c4578063313ce567146101d75761016c565b806306fdde0314610171578063095ea7b31461018f575b600080fd5b6101796102f7565b60405161018691906113fe565b60405180910390f35b6101a261019d36600461136a565b6103ab565b60405161018691906113f3565b6101b76103c9565b60405161018691906117ae565b6101a26101d236600461132d565b6103cf565b6101df610470565b60405161018691906117b7565b6101b76101fa3660046112de565b610479565b6101a261020d36600461136a565b6104b7565b610225610220366004611394565b610512565b005b61022561023536600461136a565b610526565b6101b76102483660046112de565b61060f565b6101b761025b3660046112de565b61065d565b610225610685565b61022561027636600461136a565b610736565b61028361078b565b60405161018691906113ac565b6101b761029e3660046112de565b6107a7565b610179610853565b6101a26102b936600461136a565b6108d2565b6101a26102cc36600461136a565b610947565b6101b76102df3660046112f9565b61095b565b6102256102f23660046112de565b610993565b60048054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103a15780601f10610376576101008083540402835291602001916103a1565b820191906000526020600020905b81548152906001019060200180831161038457829003601f168201915b5050505050905090565b60006103bf6103b8610a95565b8484610a99565b5060015b92915050565b60035490565b60006103dc848484610b74565b610466846103e8610a95565b6104618560405180606001604052806028815260200161180e6028913973ffffffffffffffffffffffffffffffffffffffff8a16600090815260026020526040812090610433610a95565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020549190610b93565b610a99565b5060019392505050565b60065460ff1690565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600760205260409020546fffffffffffffffffffffffffffffffff165b919050565b60006103bf6104c4610a95565b8461046185600260006104d5610a95565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918c168152925290205490610bbf565b61052361051d610a95565b82610be4565b50565b61052e610a95565b60005473ffffffffffffffffffffffffffffffffffffffff9081169116146105715760405162461bcd60e51b81526004016105689061162b565b60405180910390fd5b61057a81610cfa565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600760205260409081902080546fffffffffffffffffffffffffffffffff93841670010000000000000000000000000000000002931692909217909155517fe136e6d0a27c5f8661a7aed0168b607aa2edeb7d0e0a588be613ae5b5ad2db2c9061060390849084906113cd565b60405180910390a15050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526007602052604090205470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b61068d610a95565b60005473ffffffffffffffffffffffffffffffffffffffff9081169116146106c75760405162461bcd60e51b81526004016105689061162b565b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60006107688260405180606001604052806024815260200161183660249139610761866102df610a95565b9190610b93565b905061077c83610776610a95565b83610a99565b6107868383610be4565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60006107b16112a3565b5073ffffffffffffffffffffffffffffffffffffffff82166000908152600760209081526040918290208251808401909352546fffffffffffffffffffffffffffffffff80821680855270010000000000000000000000000000000090920416918301829052106108265760009150506104b2565b8051602082015161084c916fffffffffffffffffffffffffffffffff9182169116610d30565b9392505050565b60058054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103a15780601f10610376576101008083540402835291602001916103a1565b60006103bf6108df610a95565b846104618560405180606001604052806025815260200161185a6025913960026000610909610a95565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918d16815292529020549190610b93565b60006103bf610954610a95565b8484610b74565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020908152604080832093909416825291909152205490565b61099b610a95565b60005473ffffffffffffffffffffffffffffffffffffffff9081169116146109d55760405162461bcd60e51b81526004016105689061162b565b73ffffffffffffffffffffffffffffffffffffffff8116610a085760405162461bcd60e51b815260040161056890611503565b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b3390565b73ffffffffffffffffffffffffffffffffffffffff8316610acc5760405162461bcd60e51b81526004016105689061171a565b73ffffffffffffffffffffffffffffffffffffffff8216610aff5760405162461bcd60e51b815260040161056890611560565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526002602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610b679085906117ae565b60405180910390a3505050565b610b7e8382610d72565b610b89838383610f3e565b6107868282611094565b60008184841115610bb75760405162461bcd60e51b815260040161056891906113fe565b505050900390565b60008282018381101561084c5760405162461bcd60e51b8152600401610568906115bd565b73ffffffffffffffffffffffffffffffffffffffff8216610c175760405162461bcd60e51b815260040161056890611660565b610c2382600083610786565b610c6d816040518060600160405280602281526020016117c66022913973ffffffffffffffffffffffffffffffffffffffff85166000908152600160205260409020549190610b93565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260016020526040902055600354610ca09082610d30565b60035560405160009073ffffffffffffffffffffffffffffffffffffffff8416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610cee9085906117ae565b60405180910390a35050565b60006fffffffffffffffffffffffffffffffff821115610d2c5760405162461bcd60e51b8152600401610568906114cc565b5090565b600061084c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610b93565b6000610d7d8361065d565b9050818110610d8c5750610f3a565b610d946112a3565b5073ffffffffffffffffffffffffffffffffffffffff831660009081526007602090815260408083208151808301909252546fffffffffffffffffffffffffffffffff8082168352700100000000000000000000000000000000909104169181019190915290610e048484610d30565b90506000610e7e83600001516fffffffffffffffffffffffffffffffff166040518060400160405280601381526020017f496e73756666696369656e74206372656469740000000000000000000000000081525085602001516fffffffffffffffffffffffffffffffff16610b939092919063ffffffff16565b905081811015610ea05760405162461bcd60e51b8152600401610568906115f4565b8251610ec790610ec2906fffffffffffffffffffffffffffffffff1684610bbf565b610cfa565b73ffffffffffffffffffffffffffffffffffffffff8716600090815260076020526040902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff92909216919091179055610f3586836111b2565b505050505b5050565b73ffffffffffffffffffffffffffffffffffffffff8316610f715760405162461bcd60e51b8152600401610568906116bd565b73ffffffffffffffffffffffffffffffffffffffff8216610fa45760405162461bcd60e51b81526004016105689061146f565b610faf838383610786565b610ff9816040518060600160405280602681526020016117e86026913973ffffffffffffffffffffffffffffffffffffffff86166000908152600160205260409020549190610b93565b73ffffffffffffffffffffffffffffffffffffffff80851660009081526001602052604080822093909355908416815220546110359082610bbf565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610b679085906117ae565b61109c6112a3565b5073ffffffffffffffffffffffffffffffffffffffff821660009081526007602090815260408083208151808301909252546fffffffffffffffffffffffffffffffff8082168084527001000000000000000000000000000000009092041692820192909252919061110e908461128d565b90508061111c575050610f3a565b815161113e90610ec2906fffffffffffffffffffffffffffffffff1683610d30565b73ffffffffffffffffffffffffffffffffffffffff8516600090815260076020526040902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff929092169190911790556111ac8482610be4565b50505050565b73ffffffffffffffffffffffffffffffffffffffff82166111e55760405162461bcd60e51b815260040161056890611777565b6111f160008383610786565b6003546111fe9082610bbf565b60035573ffffffffffffffffffffffffffffffffffffffff82166000908152600160205260409020546112319082610bbf565b73ffffffffffffffffffffffffffffffffffffffff83166000818152600160205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610cee9085906117ae565b600081831061129c578161084c565b5090919050565b604080518082019091526000808252602082015290565b803573ffffffffffffffffffffffffffffffffffffffff811681146103c357600080fd5b6000602082840312156112ef578081fd5b61084c83836112ba565b6000806040838503121561130b578081fd5b61131584846112ba565b915061132484602085016112ba565b90509250929050565b600080600060608486031215611341578081fd5b61134b85856112ba565b925061135a85602086016112ba565b9150604084013590509250925092565b6000806040838503121561137c578182fd5b61138684846112ba565b946020939093013593505050565b6000602082840312156113a5578081fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b901515815260200190565b6000602080835283518082850152825b8181101561142a5785810183015185820160400152820161140e565b8181111561143b5783604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201527f6573730000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526010908201527f75696e74313238206f766572666c6f7700000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560408201527f7373000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526013908201527f496e73756666696369656e742063726564697400000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360408201527f7300000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460408201527f6472657373000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460408201527f7265737300000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b90815260200190565b60ff9190911681526020019056fe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e20616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212204a27d01dbbd7e7ef968ec3dd17aba553e20c4ab137e86dd475804ea1b8ddda4564736f6c63430007010033

Deployed ByteCode Sourcemap

30360:2431:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20226:83;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;22332:169;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;21301:100::-;;;:::i;:::-;;;;;;;:::i;22975:321::-;;;;;;:::i;:::-;;:::i;21153:83::-;;;:::i;:::-;;;;;;;:::i;30785:125::-;;;;;;:::i;:::-;;:::i;23705:218::-;;;;;;:::i;:::-;;:::i;29461:91::-;;;;;;:::i;:::-;;:::i;:::-;;31369:194;;;;;;:::i;:::-;;:::i;30918:121::-;;;;;;:::i;:::-;;:::i;21464:119::-;;;;;;:::i;:::-;;:::i;8795:148::-;;;:::i;29871:295::-;;;;;;:::i;:::-;;:::i;8153:79::-;;;:::i;:::-;;;;;;;:::i;31047:314::-;;;;;;:::i;:::-;;:::i;20428:87::-;;;:::i;24426:269::-;;;;;;:::i;:::-;;:::i;21796:175::-;;;;;;:::i;:::-;;:::i;22034:151::-;;;;;;:::i;:::-;;:::i;9098:244::-;;;;;;:::i;:::-;;:::i;20226:83::-;20296:5;20289:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20263:13;;20289:12;;20296:5;;20289:12;;20296:5;20289:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20226:83;:::o;22332:169::-;22415:4;22432:39;22441:12;:10;:12::i;:::-;22455:7;22464:6;22432:8;:39::i;:::-;-1:-1:-1;22489:4:0;22332:169;;;;;:::o;21301:100::-;21381:12;;21301:100;:::o;22975:321::-;23081:4;23098:36;23108:6;23116:9;23127:6;23098:9;:36::i;:::-;23145:121;23154:6;23162:12;:10;:12::i;:::-;23176:89;23214:6;23176:89;;;;;;;;;;;;;;;;;:19;;;;;;;:11;:19;;;;;;23196:12;:10;:12::i;:::-;23176:33;;;;;;;;;;;;;-1:-1:-1;23176:33:0;;;:89;:37;:89::i;:::-;23145:8;:121::i;:::-;-1:-1:-1;23284:4:0;22975:321;;;;;:::o;21153:83::-;21219:9;;;;21153:83;:::o;30785:125::-;30871:17;;;30847:4;30871:17;;;:8;:17;;;;;:31;;;30785:125;;;;:::o;23705:218::-;23793:4;23810:83;23819:12;:10;:12::i;:::-;23833:7;23842:50;23881:10;23842:11;:25;23854:12;:10;:12::i;:::-;23842:25;;;;;;;;;;;;;;;;;;-1:-1:-1;23842:25:0;;;:34;;;;;;;;;;;:38;:50::i;29461:91::-;29517:27;29523:12;:10;:12::i;:::-;29537:6;29517:5;:27::i;:::-;29461:91;:::o;31369:194::-;8375:12;:10;:12::i;:::-;8365:6;;:22;:6;;;:22;;;8357:67;;;;-1:-1:-1;;;8357:67:0;;;;;;;:::i;:::-;;;;;;;;;31487:18:::1;:6;:16;:18::i;:::-;31455:17;::::0;::::1;;::::0;;;:8:::1;:17;::::0;;;;;;:50;;::::1;::::0;;::::1;::::0;::::1;::::0;::::1;::::0;;;::::1;::::0;;;31521:34;::::1;::::0;::::1;::::0;31464:7;;31548:6;;31521:34:::1;:::i;:::-;;;;;;;;31369:194:::0;;:::o;30918:121::-;31002:17;;30978:4;31002:17;;;:8;:17;;;;;:29;;;;;;;30918:121::o;21464:119::-;21557:18;;21530:7;21557:18;;;:9;:18;;;;;;;21464:119::o;8795:148::-;8375:12;:10;:12::i;:::-;8365:6;;:22;:6;;;:22;;;8357:67;;;;-1:-1:-1;;;8357:67:0;;;;;;;:::i;:::-;8902:1:::1;8886:6:::0;;8865:40:::1;::::0;::::1;8886:6:::0;;::::1;::::0;8865:40:::1;::::0;8902:1;;8865:40:::1;8933:1;8916:19:::0;;;::::1;::::0;;8795:148::o;29871:295::-;29948:26;29977:84;30014:6;29977:84;;;;;;;;;;;;;;;;;:32;29987:7;29996:12;:10;:12::i;29977:32::-;:36;:84;:36;:84::i;:::-;29948:113;;30074:51;30083:7;30092:12;:10;:12::i;:::-;30106:18;30074:8;:51::i;:::-;30136:22;30142:7;30151:6;30136:5;:22::i;:::-;29871:295;;;:::o;8153:79::-;8191:7;8218:6;;;8153:79;:::o;31047:314::-;31111:4;31128:26;;:::i;:::-;-1:-1:-1;31157:17:0;;;;;;;:8;:17;;;;;;;;;31128:46;;;;;;;;;;;;;;;;;;;;;;;;;;;31189:54;31185:95;;31267:1;31260:8;;;;;31185:95;31326:26;;31297:24;;;;:56;;;:28;;;;:56;:28;:56::i;:::-;31290:63;31047:314;-1:-1:-1;;;31047:314:0:o;20428:87::-;20500:7;20493:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20467:13;;20493:14;;20500:7;;20493:14;;20500:7;20493:14;;;;;;;;;;;;;;;;;;;;;;;;24426:269;24519:4;24536:129;24545:12;:10;:12::i;:::-;24559:7;24568:96;24607:15;24568:96;;;;;;;;;;;;;;;;;:11;:25;24580:12;:10;:12::i;:::-;24568:25;;;;;;;;;;;;;;;;;;-1:-1:-1;24568:25:0;;;:34;;;;;;;;;;;:96;:38;:96::i;21796:175::-;21882:4;21899:42;21909:12;:10;:12::i;:::-;21923:9;21934:6;21899:9;:42::i;22034:151::-;22150:18;;;;22123:7;22150:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;22034:151::o;9098:244::-;8375:12;:10;:12::i;:::-;8365:6;;:22;:6;;;:22;;;8357:67;;;;-1:-1:-1;;;8357:67:0;;;;;;;:::i;:::-;9187:22:::1;::::0;::::1;9179:73;;;;-1:-1:-1::0;;;9179:73:0::1;;;;;;;:::i;:::-;9289:6;::::0;;9268:38:::1;::::0;::::1;::::0;;::::1;::::0;9289:6;::::1;::::0;9268:38:::1;::::0;::::1;9317:6;:17:::0;;;::::1;;::::0;;;::::1;::::0;;;::::1;::::0;;9098:244::o;6800:106::-;6888:10;6800:106;:::o;27573:346::-;27675:19;;;27667:68;;;;-1:-1:-1;;;27667:68:0;;;;;;;:::i;:::-;27754:21;;;27746:68;;;;-1:-1:-1;;;27746:68:0;;;;;;;:::i;:::-;27827:18;;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;;:36;;;27879:32;;;;;27857:6;;27879:32;:::i;:::-;;;;;;;;27573:346;;;:::o;31571:215::-;31661:31;31677:5;31684:7;31661:15;:31::i;:::-;31703:36;31719:5;31726:3;31731:7;31703:15;:36::i;:::-;31750:28;31765:3;31770:7;31750:14;:28::i;11094:192::-;11180:7;11216:12;11208:6;;;;11200:29;;;;-1:-1:-1;;;11200:29:0;;;;;;;;:::i;:::-;-1:-1:-1;;;11252:5:0;;;11094:192::o;10191:181::-;10249:7;10281:5;;;10305:6;;;;10297:46;;;;-1:-1:-1;;;10297:46:0;;;;;;;:::i;26715:418::-;26799:21;;;26791:67;;;;-1:-1:-1;;;26791:67:0;;;;;;;:::i;:::-;26871:49;26892:7;26909:1;26913:6;26871:20;:49::i;:::-;26954:68;26977:6;26954:68;;;;;;;;;;;;;;;;;:18;;;;;;;:9;:18;;;;;;;:68;:22;:68::i;:::-;26933:18;;;;;;;:9;:18;;;;;:89;27048:12;;:24;;27065:6;27048:16;:24::i;:::-;27033:12;:39;27088:37;;27114:1;;27088:37;;;;;;;;27118:6;;27088:37;:::i;:::-;;;;;;;;26715:418;;:::o;30200:153::-;30250:7;30278:17;;;;30270:46;;;;-1:-1:-1;;;30270:46:0;;;;;;;:::i;:::-;-1:-1:-1;30342:2:0;30200:153::o;10655:136::-;10713:7;10740:43;10744:1;10747;10740:43;;;;;;;;;;;;;;;;;:3;:43::i;31794:625::-;31867:17;31887:16;31897:5;31887:9;:16::i;:::-;31867:36;;31934:7;31918:12;:23;31914:62;;31958:7;;;31914:62;31988:25;;:::i;:::-;-1:-1:-1;32016:15:0;;;;;;;:8;:15;;;;;;;;31988:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;32065:25;:7;32077:12;32065:11;:25::i;:::-;32042:48;;32101:16;32120:77;32148:11;:25;;;32120:77;;;;;;;;;;;;;;;;;;;:11;:23;;;:27;;;;:77;;;;;:::i;:::-;32101:96;;32231:15;32216:11;:30;;32208:62;;;;-1:-1:-1;;;32208:62:0;;;;;;;:::i;:::-;32313:25;;:58;;:46;;:29;;32343:15;32313:29;:46::i;:::-;:56;:58::i;:::-;32281:15;;;;;;;:8;:15;;;;;:90;;;;;;;;;;;;;;;32382:29;32281:15;32395;32382:5;:29::i;:::-;31794:625;;;;;;;:::o;25185:539::-;25291:20;;;25283:70;;;;-1:-1:-1;;;25283:70:0;;;;;;;:::i;:::-;25372:23;;;25364:71;;;;-1:-1:-1;;;25364:71:0;;;;;;;:::i;:::-;25448:47;25469:6;25477:9;25488:6;25448:20;:47::i;:::-;25528:71;25550:6;25528:71;;;;;;;;;;;;;;;;;:17;;;;;;;:9;:17;;;;;;;:71;:21;:71::i;:::-;25508:17;;;;;;;;:9;:17;;;;;;:91;;;;25633:20;;;;;;;:32;;25658:6;25633:24;:32::i;:::-;25610:20;;;;;;;;:9;:20;;;;;;;:55;;;;25681:35;;;;;;;;;;25709:6;;25681:35;:::i;32427:361::-;32497:23;;:::i;:::-;-1:-1:-1;32523:13:0;;;;;;;:8;:13;;;;;;;;32497:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32523:13;32561:42;;32595:7;32561:8;:42::i;:::-;32547:56;-1:-1:-1;32618:11:0;32614:50;;32646:7;;;;32614:50;32704:23;;:47;;:35;;:27;;32732:6;32704:27;:35::i;:47::-;32674:13;;;;;;;:8;:13;;;;;:77;;;;;;;;;;;;;;;32762:18;32674:13;32773:6;32762:5;:18::i;:::-;32427:361;;;;:::o;26005:378::-;26089:21;;;26081:65;;;;-1:-1:-1;;;26081:65:0;;;;;;;:::i;:::-;26159:49;26188:1;26192:7;26201:6;26159:20;:49::i;:::-;26236:12;;:24;;26253:6;26236:16;:24::i;:::-;26221:12;:39;26292:18;;;;;;;:9;:18;;;;;;:30;;26315:6;26292:22;:30::i;:::-;26271:18;;;;;;;:9;:18;;;;;;:51;;;;26338:37;;26271:18;;;26338:37;;;;26368:6;;26338:37;:::i;15000:106::-;15058:7;15089:1;15085;:5;:13;;15097:1;15085:13;;;-1:-1:-1;15093:1:0;;15000:106;-1:-1:-1;15000:106:0:o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;:::o;5:130::-;72:20;;13567:42;13556:54;;14230:35;;14220:2;;14279:1;;14269:12;279:241;;383:2;371:9;362:7;358:23;354:32;351:2;;;-1:-1;;389:12;351:2;451:53;496:7;472:22;451:53;:::i;527:366::-;;;648:2;636:9;627:7;623:23;619:32;616:2;;;-1:-1;;654:12;616:2;716:53;761:7;737:22;716:53;:::i;:::-;706:63;;824:53;869:7;806:2;849:9;845:22;824:53;:::i;:::-;814:63;;610:283;;;;;:::o;900:491::-;;;;1038:2;1026:9;1017:7;1013:23;1009:32;1006:2;;;-1:-1;;1044:12;1006:2;1106:53;1151:7;1127:22;1106:53;:::i;:::-;1096:63;;1214:53;1259:7;1196:2;1239:9;1235:22;1214:53;:::i;:::-;1204:63;;1304:2;1347:9;1343:22;209:20;1312:63;;1000:391;;;;;:::o;1398:366::-;;;1519:2;1507:9;1498:7;1494:23;1490:32;1487:2;;;-1:-1;;1525:12;1487:2;1587:53;1632:7;1608:22;1587:53;:::i;:::-;1577:63;1677:2;1716:22;;;;209:20;;-1:-1;;;1481:283::o;1771:241::-;;1875:2;1863:9;1854:7;1850:23;1846:32;1843:2;;;-1:-1;;1881:12;1843:2;-1:-1;209:20;;1837:175;-1:-1;1837:175::o;6797:222::-;13567:42;13556:54;;;;2090:37;;6924:2;6909:18;;6895:124::o;7026:333::-;13567:42;13556:54;;;;2090:37;;7345:2;7330:18;;6634:37;7181:2;7166:18;;7152:207::o;7366:210::-;13468:13;;13461:21;2204:34;;7487:2;7472:18;;7458:118::o;7583:310::-;;7730:2;;7751:17;7744:47;2395:5;13091:12;13248:6;7730:2;7719:9;7715:18;13236:19;-1:-1;13862:101;13876:6;13873:1;13870:13;13862:101;;;13943:11;;;;;13937:18;13924:11;;;13276:14;13924:11;13917:39;13891:10;;13862:101;;;13978:6;13975:1;13972:13;13969:2;;;-1:-1;13276:14;14034:6;7719:9;14025:16;;14018:27;13969:2;-1:-1;14154:2;14134:14;14150:7;14130:28;2553:39;;;;13276:14;2553:39;;7701:192;-1:-1;;;7701:192::o;7900:416::-;8100:2;8114:47;;;2829:2;8085:18;;;13236:19;2865:34;13276:14;;;2845:55;2934:5;2920:12;;;2913:27;2959:12;;;8071:245::o;8323:416::-;8523:2;8537:47;;;3210:2;8508:18;;;13236:19;3246:18;13276:14;;;3226:39;3284:12;;;8494:245::o;8746:416::-;8946:2;8960:47;;;3535:2;8931:18;;;13236:19;3571:34;13276:14;;;3551:55;3640:8;3626:12;;;3619:30;3668:12;;;8917:245::o;9169:416::-;9369:2;9383:47;;;3919:2;9354:18;;;13236:19;3955:34;13276:14;;;3935:55;4024:4;4010:12;;;4003:26;4048:12;;;9340:245::o;9592:416::-;9792:2;9806:47;;;4299:2;9777:18;;;13236:19;4335:29;13276:14;;;4315:50;4384:12;;;9763:245::o;10015:416::-;10215:2;10229:47;;;4635:2;10200:18;;;13236:19;4671:21;13276:14;;;4651:42;4712:12;;;10186:245::o;10438:416::-;10638:2;10652:47;;;10623:18;;;13236:19;4999:34;13276:14;;;4979:55;5053:12;;;10609:245::o;10861:416::-;11061:2;11075:47;;;5304:2;11046:18;;;13236:19;5340:34;13276:14;;;5320:55;5409:3;5395:12;;;5388:25;5432:12;;;11032:245::o;11284:416::-;11484:2;11498:47;;;5683:2;11469:18;;;13236:19;5719:34;13276:14;;;5699:55;5788:7;5774:12;;;5767:29;5815:12;;;11455:245::o;11707:416::-;11907:2;11921:47;;;6066:2;11892:18;;;13236:19;6102:34;13276:14;;;6082:55;6171:6;6157:12;;;6150:28;6197:12;;;11878:245::o;12130:416::-;12330:2;12344:47;;;6448:2;12315:18;;;13236:19;6484:33;13276:14;;;6464:54;6537:12;;;12301:245::o;12553:222::-;6634:37;;;12680:2;12665:18;;12651:124::o;12782:214::-;13772:4;13761:16;;;;6750:35;;12905:2;12890:18;;12876:120::o

Swarm Source

ipfs://4a27d01dbbd7e7ef968ec3dd17aba553e20c4ab137e86dd475804ea1b8ddda45
Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.