Contract 0xd130b43062d875a4b7af3f8fc036bc6e9d3e1b3e 12

 
 

Txn Hash
Method
Block
From
To
Value [Txn Fee]
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x03d65d3c252f5df048c2dc64772b7154ae7b5410aa0fc570c710bae295f1f2b5134632542021-04-19 9:29:02647 days 13 hrs ago 0x8a5bc19e22d6ad55a2c763b93a75d09f321fe764  Contract Creation0 MATIC
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SequenceUtils

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 999999 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 9 : SequenceUtils.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.7.6;
pragma experimental ABIEncoderV2;

import "./MultiCallUtils.sol";
import "./RequireUtils.sol";


contract SequenceUtils is 
  MultiCallUtils,
  RequireUtils
{
  constructor(
    address _factory,
    address _mainModule
  ) RequireUtils(
    _factory,
    _mainModule
  ) {}
}

File 2 of 9 : MultiCallUtils.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.7.6;
pragma experimental ABIEncoderV2;

import "../commons/interfaces/IModuleCalls.sol";


contract MultiCallUtils {
  function multiCall(
    IModuleCalls.Transaction[] memory _txs
  ) public payable returns (
    bool[] memory _successes,
    bytes[] memory _results
  ) {
    _successes = new bool[](_txs.length);
    _results = new bytes[](_txs.length);

    for (uint256 i = 0; i < _txs.length; i++) {
      IModuleCalls.Transaction memory transaction = _txs[i];

      require(!transaction.delegateCall, 'MultiCallUtils#multiCall: delegateCall not allowed');
      require(gasleft() >= transaction.gasLimit, "MultiCallUtils#multiCall: NOT_ENOUGH_GAS");

      // solhint-disable
      (_successes[i], _results[i]) = transaction.target.call{
        value: transaction.value,
        gas: transaction.gasLimit == 0 ? gasleft() : transaction.gasLimit
      }(transaction.data);
      // solhint-enable

      require(_successes[i] || !_txs[i].revertOnError, 'MultiCallUtils#multiCall: CALL_REVERTED');
    }
  }

  // ///
  // Globals
  // ///

  function callBlockhash(uint256 _i) external view returns (bytes32) {
    return blockhash(_i);
  }

  function callCoinbase() external view returns (address) {
    return block.coinbase;
  }

  function callDifficulty() external view returns (uint256) {
    return block.difficulty;
  }

  function callGasLimit() external view returns (uint256) {
    return block.gaslimit;
  }

  function callBlockNumber() external view returns (uint256) {
    return block.gaslimit;
  }

  function callTimestamp() external view returns (uint256) {
    return block.timestamp;
  }

  function callGasLeft() external view returns (uint256) {
    return gasleft();
  }

  function callGasPrice() external view returns (uint256) {
    return tx.gasprice;
  }

  function callOrigin() external view returns (address) {
    return tx.origin;
  }

  function callBalanceOf(address _addr) external view returns (uint256) {
    return _addr.balance;
  }

  function callCodeSize(address _addr) external view returns (uint256 size) {
    assembly { size := extcodesize(_addr) }
  }

  function callCode(address _addr) external view returns (bytes memory code) {
    assembly {
      let size := extcodesize(_addr)
      code := mload(0x40)
      mstore(0x40, add(code, and(add(add(size, 0x20), 0x1f), not(0x1f))))
      mstore(code, size)
      extcodecopy(_addr, add(code, 0x20), 0, size)
    }
  }

  function callCodeHash(address _addr) external view returns (bytes32 codeHash) {
    assembly { codeHash := extcodehash(_addr) }
  }

  function callChainId() external pure returns (uint256 id) {
    assembly { id := chainid() }
  }
}

File 3 of 9 : RequireUtils.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.7.6;
pragma experimental ABIEncoderV2;

import "../commons/interfaces/IModuleCalls.sol";
import "../commons/interfaces/IModuleAuthUpgradable.sol";
import "../../interfaces/IERC1271Wallet.sol";
import "../../utils/SignatureValidator.sol";
import "../../utils/LibBytes.sol";
import "../../Wallet.sol";

contract RequireUtils is SignatureValidator {
  using LibBytes for bytes;

  uint256 private constant NONCE_BITS = 96;
  bytes32 private constant NONCE_MASK = bytes32((1 << NONCE_BITS) - 1);

  uint256 private constant FLAG_SIGNATURE = 0;
  uint256 private constant FLAG_ADDRESS = 1;
  uint256 private constant FLAG_DYNAMIC_SIGNATURE = 2;

  bytes32 private immutable INIT_CODE_HASH;
  address private immutable FACTORY;

  struct Member {
    uint256 weight;
    address signer;
  }

  event RequiredConfig(
    address indexed _wallet,
    bytes32 indexed _imageHash,
    uint256 _threshold,
    bytes _signers
  );

  event RequiredSigner(
    address indexed _wallet,
    address indexed _signer
  );

  mapping(address => uint256) public lastSignerUpdate;
  mapping(address => uint256) public lastWalletUpdate;
  mapping(address => bytes32) public knownImageHashes;
  mapping(bytes32 => uint256) public lastImageHashUpdate;

  constructor(address _factory, address _mainModule) public {
    FACTORY = _factory;
    INIT_CODE_HASH = keccak256(abi.encodePacked(Wallet.creationCode, uint256(_mainModule)));
  }

  /**
   * @notice Publishes the current configuration of a Sequence wallets using logs
   * @dev Used for fast lookup of a wallet configuration based on its image-hash, compatible with updated and counter-factual wallets.
   *
   * @param _wallet      Sequence wallet
   * @param _threshold   Thershold of the current configuration
   * @param _members     Members of the current configuration
   * @param _index       True if an index in contract-storage is desired 
   */
  function publishConfig(
    address _wallet,
    uint256 _threshold,
    Member[] calldata _members,
    bool _index
  ) external {
    // Compute expected imageHash
    bytes32 imageHash = bytes32(uint256(_threshold));
    for (uint256 i = 0; i < _members.length; i++) {
      imageHash = keccak256(abi.encode(imageHash, _members[i].weight, _members[i].signer));
    }

    // Check against wallet imageHash
    (bool succeed, bytes memory data) = _wallet.call(abi.encodePacked(IModuleAuthUpgradable(_wallet).imageHash.selector));
    if (succeed && data.length == 32) {
      // Check contract defined
      bytes32 currentImageHash = abi.decode(data, (bytes32));
      require(currentImageHash == imageHash, "RequireUtils#publishConfig: UNEXPECTED_IMAGE_HASH");
    } else {
      // Check counter-factual
      require(address(
        uint256(
          keccak256(
            abi.encodePacked(
              byte(0xff),
              FACTORY,
              imageHash,
              INIT_CODE_HASH
            )
          )
        )
      ) == _wallet, "RequireUtils#publishConfig: UNEXPECTED_COUNTERFACTUAL_IMAGE_HASH");

      // Register known image-hash for counter-factual wallet
      if (_index) knownImageHashes[_wallet] = imageHash;
    }

    // Emit event for easy config retrieval
    emit RequiredConfig(_wallet, imageHash, _threshold, abi.encode(_members));

    if (_index) {
      // Register last event for given wallet
      lastWalletUpdate[_wallet] = block.number;

      // Register last event for image-hash
      lastImageHashUpdate[imageHash] = block.number;
    }
  }

  /**
   * @notice Publishes the configuration and set of signers for a counter-factual Sequence wallets using logs
   * @dev Used for fast lookup of a wallet based on its signer members, only signing members are included in the logs
   *   as a mechanism to avoid poisoning of the directory of wallets.
   *
   *   Only the initial counter-factual configuration can be published, to publish updated configurations see `publishConfig`.
   *
   * @param _wallet      Sequence wallet
   * @param _hash        Any hash signed by the wallet
   * @param _sizeMembers Number of members on the counter-factual configuration
   * @param _signature   Signature for the given hash
   * @param _index       True if an index in contract-storage is desired 
   */
  function publishInitialSigners(
    address _wallet,
    bytes32 _hash,
    uint256 _sizeMembers,
    bytes memory _signature,
    bool _index
  ) external {
    // Decode and index signature
    (
      uint16 threshold,  // required threshold signature
      uint256 rindex     // read index
    ) = _signature.readFirstUint16();

    // Generate sub-digest
    bytes32 subDigest; {
      uint256 chainId; assembly { chainId := chainid() }
      subDigest = keccak256(
        abi.encodePacked(
          "\x19\x01",
          chainId,
          _wallet,
          _hash
        )
      );
    }

    // Recover signature
    bytes32 imageHash = bytes32(uint256(threshold));

    Member[] memory members = new Member[](_sizeMembers);
    uint256 membersIndex = 0;

    while (rindex < _signature.length) {
      // Read next item type and addrWeight
      uint256 flag; uint256 addrWeight; address addr;
      (flag, addrWeight, rindex) = _signature.readUint8Uint8(rindex);

      if (flag == FLAG_ADDRESS) {
        // Read plain address
        (addr, rindex) = _signature.readAddress(rindex);
      } else if (flag == FLAG_SIGNATURE) {
        // Read single signature and recover signer
        bytes memory signature;
        (signature, rindex) = _signature.readBytes66(rindex);
        addr = recoverSigner(subDigest, signature);

        // Publish signer
        _publishSigner(_wallet, addr, _index);
      } else if (flag == FLAG_DYNAMIC_SIGNATURE) {
        // Read signer
        (addr, rindex) = _signature.readAddress(rindex);

        {
          // Read signature size
          uint256 size;
          (size, rindex) = _signature.readUint16(rindex);

          // Read dynamic size signature
          bytes memory signature;
          (signature, rindex) = _signature.readBytes(rindex, size);
          require(isValidSignature(subDigest, addr, signature), "ModuleAuth#_signatureValidation: INVALID_SIGNATURE");
        }

        // Publish signer
        _publishSigner(_wallet, addr, _index);
      } else {
        revert("RequireUtils#publishInitialSigners: INVALID_SIGNATURE_FLAG");
      }

      // Store member on array
      members[membersIndex] = Member(addrWeight, addr);
      membersIndex++;

      // Write weight and address to image
      imageHash = keccak256(abi.encode(imageHash, addrWeight, addr));
    }

    require(membersIndex == _sizeMembers, "RequireUtils#publishInitialSigners: INVALID_MEMBERS_COUNT");

    // Check against counter-factual imageHash
    require(address(
      uint256(
        keccak256(
          abi.encodePacked(
            byte(0xff),
            FACTORY,
            imageHash,
            INIT_CODE_HASH
          )
        )
      )
    ) == _wallet, "RequireUtils#publishInitialSigners: UNEXPECTED_COUNTERFACTUAL_IMAGE_HASH");

    // Emit event for easy config retrieval
    emit RequiredConfig(_wallet, imageHash, threshold, abi.encode(members));

    if (_index) {
      // Register last event for given wallet
      lastWalletUpdate[_wallet] = block.number;

      // Register last event for image-hash
      lastImageHashUpdate[imageHash] = block.number;

      // Register known image-hash for counter-factual wallet
      knownImageHashes[_wallet] = imageHash;
    }
  }

  /**
   * @notice Validates that a given expiration hasn't expired
   * @dev Used as an optional transaction on a Sequence batch, to create expirable transactions.
   *
   * @param _expiration  Expiration to check
   */
  function requireNonExpired(uint256 _expiration) external view {
    require(block.timestamp < _expiration, "RequireUtils#requireNonExpired: EXPIRED");
  }

  /**
   * @notice Validates that a given wallet has reached a given nonce
   * @dev Used as an optional transaction on a Sequence batch, to define transaction execution order
   *
   * @param _wallet Sequence wallet
   * @param _nonce  Required nonce
   */
  function requireMinNonce(address _wallet, uint256 _nonce) external view {
    (uint256 space, uint256 nonce) = _decodeNonce(_nonce);
    uint256 currentNonce = IModuleCalls(_wallet).readNonce(space);
    require(currentNonce >= nonce, "RequireUtils#requireMinNonce: NONCE_BELOW_REQUIRED");
  }

  /**
   * @notice Decodes a raw nonce
   * @dev A raw nonce is encoded using the first 160 bits for the space
   *  and the last 96 bits for the nonce
   * @param _rawNonce Nonce to be decoded
   * @return _space The nonce space of the raw nonce
   * @return _nonce The nonce of the raw nonce
   */
  function _decodeNonce(uint256 _rawNonce) private pure returns (uint256 _space, uint256 _nonce) {
    _nonce = uint256(bytes32(_rawNonce) & NONCE_MASK);
    _space = _rawNonce >> NONCE_BITS;
  }

  /**
   * @notice Publishes a signer that was validated to sign for a particular wallet
   * @param _wallet Address of the wallet
   * @param _signer Address of the signer
   * @param _index True if an index on contract storage is desired
   */
  function _publishSigner(address _wallet, address _signer, bool _index) private {
    // Required signer event
    emit RequiredSigner(_wallet, _signer);

    if (_index) {
      // Register last event for given signer
      lastSignerUpdate[_signer] = block.number;
    }
  }
}

File 4 of 9 : IModuleCalls.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.7.6;
pragma experimental ABIEncoderV2;


interface IModuleCalls {
  // Events
  event NonceChange(uint256 _space, uint256 _newNonce);
  event TxFailed(bytes32 _tx, bytes _reason);
  event TxExecuted(bytes32 _tx) anonymous;

  // Transaction structure
  struct Transaction {
    bool delegateCall;   // Performs delegatecall
    bool revertOnError;  // Reverts transaction bundle if tx fails
    uint256 gasLimit;    // Maximum gas to be forwarded
    address target;      // Address of the contract to call
    uint256 value;       // Amount of ETH to pass with the call
    bytes data;          // calldata to pass
  }

  /**
   * @notice Returns the next nonce of the default nonce space
   * @dev The default nonce space is 0x00
   * @return The next nonce
   */
  function nonce() external view returns (uint256);

  /**
   * @notice Returns the next nonce of the given nonce space
   * @param _space Nonce space, each space keeps an independent nonce count
   * @return The next nonce
   */
  function readNonce(uint256 _space) external view returns (uint256);

  /**
   * @notice Allow wallet owner to execute an action
   * @param _txs        Transactions to process
   * @param _nonce      Signature nonce (may contain an encoded space)
   * @param _signature  Encoded signature
   */
  function execute(
    Transaction[] calldata _txs,
    uint256 _nonce,
    bytes calldata _signature
  ) external;

  /**
   * @notice Allow wallet to execute an action
   *   without signing the message
   * @param _txs  Transactions to execute
   */
  function selfExecute(
    Transaction[] calldata _txs
  ) external;
}

File 5 of 9 : IModuleAuthUpgradable.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.7.6;


interface IModuleAuthUpgradable {
  /**
   * @notice Updates the signers configuration of the wallet
   * @param _imageHash New required image hash of the signature
   */
  function updateImageHash(bytes32 _imageHash) external;

  /**
   * @notice Returns the current image hash of the wallet
   */
  function imageHash() external view returns (bytes32);
}

File 6 of 9 : IERC1271Wallet.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.7.6;


interface IERC1271Wallet {

  /**
   * @notice Verifies whether the provided signature is valid with respect to the provided data
   * @dev MUST return the correct magic value if the signature provided is valid for the provided data
   *   > The bytes4 magic value to return when signature is valid is 0x20c13b0b : bytes4(keccak256("isValidSignature(bytes,bytes)")
   *   > This function MAY modify Ethereum's state
   * @param _data       Arbitrary length data signed on the behalf of address(this)
   * @param _signature  Signature byte array associated with _data
   * @return magicValue Magic value 0x20c13b0b if the signature is valid and 0x0 otherwise
   */
  function isValidSignature(
    bytes calldata _data,
    bytes calldata _signature)
    external
    view
    returns (bytes4 magicValue);

  /**
   * @notice Verifies whether the provided signature is valid with respect to the provided hash
   * @dev MUST return the correct magic value if the signature provided is valid for the provided hash
   *   > The bytes4 magic value to return when signature is valid is 0x20c13b0b : bytes4(keccak256("isValidSignature(bytes,bytes)")
   *   > This function MAY modify Ethereum's state
   * @param _hash       keccak256 hash that was signed
   * @param _signature  Signature byte array associated with _data
   * @return magicValue Magic value 0x20c13b0b if the signature is valid and 0x0 otherwise
   */
  function isValidSignature(
    bytes32 _hash,
    bytes calldata _signature)
    external
    view
    returns (bytes4 magicValue);
}

File 7 of 9 : SignatureValidator.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.7.6;

import "../interfaces/IERC1271Wallet.sol";

import "./LibBytes.sol";

/**
 * @dev Contains logic for signature validation.
 * Signatures from wallet contracts assume ERC-1271 support (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1271.md)
 * Notes: Methods are strongly inspired by contracts in https://github.com/0xProject/0x-monorepo/blob/development/
 */
contract SignatureValidator {
  using LibBytes for bytes;

  /***********************************|
  |             Variables             |
  |__________________________________*/

  // bytes4(keccak256("isValidSignature(bytes,bytes)"))
  bytes4 constant internal ERC1271_MAGICVALUE = 0x20c13b0b;

  // bytes4(keccak256("isValidSignature(bytes32,bytes)"))
  bytes4 constant internal ERC1271_MAGICVALUE_BYTES32 = 0x1626ba7e;

  // Allowed signature types.
  uint256 private constant SIG_TYPE_EIP712 = 1;
  uint256 private constant SIG_TYPE_ETH_SIGN = 2;
  uint256 private constant SIG_TYPE_WALLET_BYTES32 = 3;

  /***********************************|
  |        Signature Functions        |
  |__________________________________*/

 /**
   * @notice Recover the signer of hash, assuming it's an EOA account
   * @dev Only for SignatureType.EIP712 and SignatureType.EthSign signatures
   * @param _hash      Hash that was signed
   *   encoded as (bytes32 r, bytes32 s, uint8 v, ... , SignatureType sigType)
   */
  function recoverSigner(
    bytes32 _hash,
    bytes memory _signature
  ) internal pure returns (address signer) {
    require(_signature.length == 66, "SignatureValidator#recoverSigner: invalid signature length");
    uint256 signatureType = uint8(_signature[_signature.length - 1]);

    // Variables are not scoped in Solidity.
    uint8 v = uint8(_signature[64]);
    bytes32 r = _signature.readBytes32(0);
    bytes32 s = _signature.readBytes32(32);

    // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
    // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
    // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most
    // signatures from current libraries generate a unique signature with an s-value in the lower half order.
    //
    // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
    // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
    // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
    // these malleable signatures as well.
    //
    // Source OpenZeppelin
    // https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/cryptography/ECDSA.sol

    if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
      revert("SignatureValidator#recoverSigner: invalid signature 's' value");
    }

    if (v != 27 && v != 28) {
      revert("SignatureValidator#recoverSigner: invalid signature 'v' value");
    }

    // Signature using EIP712
    if (signatureType == SIG_TYPE_EIP712) {
      signer = ecrecover(_hash, v, r, s);

    // Signed using web3.eth_sign() or Ethers wallet.signMessage()
    } else if (signatureType == SIG_TYPE_ETH_SIGN) {
      signer = ecrecover(
        keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", _hash)),
        v,
        r,
        s
      );

    } else {
      // Anything other signature types are illegal (We do not return false because
      // the signature may actually be valid, just not in a format
      // that we currently support. In this case returning false
      // may lead the caller to incorrectly believe that the
      // signature was invalid.)
      revert("SignatureValidator#recoverSigner: UNSUPPORTED_SIGNATURE_TYPE");
    }

    // Prevent signer from being 0x0
    require(
      signer != address(0x0),
      "SignatureValidator#recoverSigner: INVALID_SIGNER"
    );

    return signer;
  }

 /**
   * @notice Returns true if the provided signature is valid for the given signer.
   * @dev Supports SignatureType.EIP712, SignatureType.EthSign, and ERC1271 signatures
   * @param _hash      Hash that was signed
   * @param _signer    Address of the signer candidate
   * @param _signature Signature byte array
   */
  function isValidSignature(
    bytes32 _hash,
    address _signer,
    bytes memory _signature
  ) internal view returns (bool valid) {
    uint256 signatureType = uint8(_signature[_signature.length - 1]);

    if (signatureType == SIG_TYPE_EIP712 || signatureType == SIG_TYPE_ETH_SIGN) {
      // Recover signer and compare with provided
      valid = recoverSigner(_hash, _signature) == _signer;

    } else if (signatureType == SIG_TYPE_WALLET_BYTES32) {
      // Remove signature type before calling ERC1271, restore after call
      uint256 prevSize; assembly { prevSize := mload(_signature) mstore(_signature, sub(prevSize, 1)) }
      valid = ERC1271_MAGICVALUE_BYTES32 == IERC1271Wallet(_signer).isValidSignature(_hash, _signature);
      assembly { mstore(_signature, prevSize) }

    } else {
      // Anything other signature types are illegal (We do not return false because
      // the signature may actually be valid, just not in a format
      // that we currently support. In this case returning false
      // may lead the caller to incorrectly believe that the
      // signature was invalid.)
      revert("SignatureValidator#isValidSignature: UNSUPPORTED_SIGNATURE_TYPE");
    }
  }
}

File 8 of 9 : LibBytes.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.7.6;

library LibBytes {
  using LibBytes for bytes;

  /***********************************|
  |        Read Bytes Functions       |
  |__________________________________*/

  /**
   * @dev Read firsts uint16 value.
   * @param data Byte array to be read.
   * @return a uint16 value of data at index zero.
   * @return newIndex Updated index after reading the values.
   */
  function readFirstUint16(
    bytes memory data
  ) internal pure returns (
    uint16 a,
    uint256 newIndex
  ) {
    assembly {
      let word := mload(add(32, data))
      a := shr(240, word)
      newIndex := 2
    }
    require(2 <= data.length, "LibBytes#readFirstUint16: OUT_OF_BOUNDS");
  }

  /**
   * @dev Reads consecutive bool (8 bits) and uint8 values.
   * @param data Byte array to be read.
   * @param index Index in byte array of uint8 and uint8 values.
   * @return a uint8 value of data at given index.
   * @return b uint8 value of data at given index + 8.
   * @return newIndex Updated index after reading the values.
   */
  function readUint8Uint8(
    bytes memory data,
    uint256 index
  ) internal pure returns (
    uint8 a,
    uint8 b,
    uint256 newIndex
  ) {
    assembly {
      let word := mload(add(index, add(32, data)))
      a := shr(248, word)
      b := and(shr(240, word), 0xff)
      newIndex := add(index, 2)
    }
    assert(newIndex > index);
    require(newIndex <= data.length, "LibBytes#readUint8Uint8: OUT_OF_BOUNDS");
  }

  /**
   * @dev Reads an address value from a position in a byte array.
   * @param data Byte array to be read.
   * @param index Index in byte array of address value.
   * @return a address value of data at given index.
   * @return newIndex Updated index after reading the value.
   */
  function readAddress(
    bytes memory data,
    uint256 index
  ) internal pure returns (
    address a,
    uint256 newIndex
  ) {
    assembly {
      let word := mload(add(index, add(32, data)))
      a := and(shr(96, word), 0xffffffffffffffffffffffffffffffffffffffff)
      newIndex := add(index, 20)
    }
    assert(newIndex > index);
    require(newIndex <= data.length, "LibBytes#readAddress: OUT_OF_BOUNDS");
  }

  /**
   * @dev Reads 66 bytes from a position in a byte array.
   * @param data Byte array to be read.
   * @param index Index in byte array of 66 bytes value.
   * @return a 66 bytes bytes array value of data at given index.
   * @return newIndex Updated index after reading the value.
   */
  function readBytes66(
    bytes memory data,
    uint256 index
  ) internal pure returns (
    bytes memory a,
    uint256 newIndex
  ) {
    a = new bytes(66);
    assembly {
      let offset := add(32, add(data, index))
      mstore(add(a, 32), mload(offset))
      mstore(add(a, 64), mload(add(offset, 32)))
      mstore(add(a, 66), mload(add(offset, 34)))
      newIndex := add(index, 66)
    }
    assert(newIndex > index);
    require(newIndex <= data.length, "LibBytes#readBytes66: OUT_OF_BOUNDS");
  }

  /**
   * @dev Reads a bytes32 value from a position in a byte array.
   * @param b Byte array containing a bytes32 value.
   * @param index Index in byte array of bytes32 value.
   * @return result bytes32 value from byte array.
   */
  function readBytes32(
    bytes memory b,
    uint256 index
  )
    internal
    pure
    returns (bytes32 result)
  {
    require(
      b.length >= index + 32,
      "LibBytes#readBytes32: GREATER_OR_EQUAL_TO_32_LENGTH_REQUIRED"
    );

    // Arrays are prefixed by a 256 bit length parameter
    uint256 pos = index + 32;

    // Read the bytes32 from array memory
    assembly {
      result := mload(add(b, pos))
    }
    return result;
  }

  /**
   * @dev Reads an uint16 value from a position in a byte array.
   * @param data Byte array to be read.
   * @param index Index in byte array of uint16 value.
   * @return a uint16 value of data at given index.
   * @return newIndex Updated index after reading the value.
   */
  function readUint16(
    bytes memory data,
    uint256 index
  ) internal pure returns (uint16 a, uint256 newIndex) {
    assembly {
      let word := mload(add(index, add(32, data)))
      a := and(shr(240, word), 0xffff)
      newIndex := add(index, 2)
    }
    assert(newIndex > index);
    require(newIndex <= data.length, "LibBytes#readUint16: OUT_OF_BOUNDS");
  }

  /**
   * @dev Reads bytes from a position in a byte array.
   * @param data Byte array to be read.
   * @param index Index in byte array of bytes value.
   * @param size Number of bytes to read.
   * @return a bytes bytes array value of data at given index.
   * @return newIndex Updated index after reading the value.
   */
  function readBytes(
    bytes memory data,
    uint256 index,
    uint256 size
  ) internal pure returns (bytes memory a, uint256 newIndex) {
    a = new bytes(size);

    assembly {
      let offset := add(32, add(data, index))

      let i := 0 let n := 32
      // Copy each word, except last one
      for { } lt(n, size) { i := n n := add(n, 32) } {
        mstore(add(a, n), mload(add(offset, i)))
      }

      // Load word after new array
      let suffix := add(a, add(32, size))
      let suffixWord := mload(suffix)

      // Copy last word, overwrites after array 
      mstore(add(a, n), mload(add(offset, i)))

      // Restore after array
      mstore(suffix, suffixWord)

      newIndex := add(index, size)
    }

    assert(newIndex >= index);
    require(newIndex <= data.length, "LibBytes#readBytes: OUT_OF_BOUNDS");
  }
}

File 9 of 9 : Wallet.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.7.6;

/**
    Minimal upgradeable proxy implementation, delegates all calls to the address
    defined by the storage slot matching the wallet address.

    Inspired by EIP-1167 Implementation (https://eips.ethereum.org/EIPS/eip-1167)

    deployed code:

        0x00    0x36         0x36      CALLDATASIZE      cds
        0x01    0x3d         0x3d      RETURNDATASIZE    0 cds
        0x02    0x3d         0x3d      RETURNDATASIZE    0 0 cds
        0x03    0x37         0x37      CALLDATACOPY
        0x04    0x3d         0x3d      RETURNDATASIZE    0
        0x05    0x3d         0x3d      RETURNDATASIZE    0 0
        0x06    0x3d         0x3d      RETURNDATASIZE    0 0 0
        0x07    0x36         0x36      CALLDATASIZE      cds 0 0 0
        0x08    0x3d         0x3d      RETURNDATASIZE    0 cds 0 0 0
        0x09    0x30         0x30      ADDRESS           addr 0 cds 0 0 0
        0x0A    0x54         0x54      SLOAD             imp 0 cds 0 0 0
        0x0B    0x5a         0x5a      GAS               gas imp 0 cds 0 0 0
        0x0C    0xf4         0xf4      DELEGATECALL      suc 0
        0x0D    0x3d         0x3d      RETURNDATASIZE    rds suc 0
        0x0E    0x82         0x82      DUP3              0 rds suc 0
        0x0F    0x80         0x80      DUP1              0 0 rds suc 0
        0x10    0x3e         0x3e      RETURNDATACOPY    suc 0
        0x11    0x90         0x90      SWAP1             0 suc
        0x12    0x3d         0x3d      RETURNDATASIZE    rds 0 suc
        0x13    0x91         0x91      SWAP2             suc 0 rds
        0x14    0x60 0x18    0x6018    PUSH1             0x18 suc 0 rds
    /-- 0x16    0x57         0x57      JUMPI             0 rds
    |   0x17    0xfd         0xfd      REVERT
    \-> 0x18    0x5b         0x5b      JUMPDEST          0 rds
        0x19    0xf3         0xf3      RETURN

    flat deployed code: 0x363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3

    deploy function:

        0x00    0x60 0x3a    0x603a    PUSH1             0x3a
        0x02    0x60 0x0e    0x600e    PUSH1             0x0e 0x3a
        0x04    0x3d         0x3d      RETURNDATASIZE    0 0x0e 0x3a
        0x05    0x39         0x39      CODECOPY
        0x06    0x60 0x1a    0x601a    PUSH1             0x1a
        0x08    0x80         0x80      DUP1              0x1a 0x1a
        0x09    0x51         0x51      MLOAD             imp 0x1a
        0x0A    0x30         0x30      ADDRESS           addr imp 0x1a
        0x0B    0x55         0x55      SSTORE            0x1a
        0x0C    0x3d         0x3d      RETURNDATASIZE    0 0x1a
        0x0D    0xf3         0xf3      RETURN
        [...deployed code]

    flat deploy function: 0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3
*/
library Wallet {
  bytes internal constant creationCode = hex"603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3";
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 999999,
    "details": {
      "yul": true
    }
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_mainModule","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_wallet","type":"address"},{"indexed":true,"internalType":"bytes32","name":"_imageHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"_threshold","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"_signers","type":"bytes"}],"name":"RequiredConfig","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_wallet","type":"address"},{"indexed":true,"internalType":"address","name":"_signer","type":"address"}],"name":"RequiredSigner","type":"event"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"callBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"callBlockNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_i","type":"uint256"}],"name":"callBlockhash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"callChainId","outputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"callCode","outputs":[{"internalType":"bytes","name":"code","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"callCodeHash","outputs":[{"internalType":"bytes32","name":"codeHash","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"callCodeSize","outputs":[{"internalType":"uint256","name":"size","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"callCoinbase","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"callDifficulty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"callGasLeft","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"callGasLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"callGasPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"callOrigin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"callTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"knownImageHashes","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"lastImageHashUpdate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastSignerUpdate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastWalletUpdate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bool","name":"delegateCall","type":"bool"},{"internalType":"bool","name":"revertOnError","type":"bool"},{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct IModuleCalls.Transaction[]","name":"_txs","type":"tuple[]"}],"name":"multiCall","outputs":[{"internalType":"bool[]","name":"_successes","type":"bool[]"},{"internalType":"bytes[]","name":"_results","type":"bytes[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"},{"internalType":"uint256","name":"_threshold","type":"uint256"},{"components":[{"internalType":"uint256","name":"weight","type":"uint256"},{"internalType":"address","name":"signer","type":"address"}],"internalType":"struct RequireUtils.Member[]","name":"_members","type":"tuple[]"},{"internalType":"bool","name":"_index","type":"bool"}],"name":"publishConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"},{"internalType":"bytes32","name":"_hash","type":"bytes32"},{"internalType":"uint256","name":"_sizeMembers","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"},{"internalType":"bool","name":"_index","type":"bool"}],"name":"publishInitialSigners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"},{"internalType":"uint256","name":"_nonce","type":"uint256"}],"name":"requireMinNonce","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_expiration","type":"uint256"}],"name":"requireNonExpired","outputs":[],"stateMutability":"view","type":"function"}]

60c06040523480156200001157600080fd5b5060405162002ad638038062002ad68339810160408190526200003491620000cd565b8181816001600160a01b031660a0816001600160a01b031660601b8152505060405180606001604052806028815260200162002aae60289139816001600160a01b03166040516020016200008a92919062000104565b60408051601f198184030181529190528051602090910120608052506200014692505050565b80516001600160a01b0381168114620000c857600080fd5b919050565b60008060408385031215620000e0578182fd5b620000eb83620000b0565b9150620000fb60208401620000b0565b90509250929050565b60008351815b818110156200012657602081870181015185830152016200010a565b81811115620001355782828501525b509190910191825250602001919050565b60805160a05160601c61293762000177600039806106515280610b1b5250806106755280610b3f52506129376000f3fe6080604052600436106101805760003560e01c806398f9fbc4116100d6578063d1db39071161007f578063e90f13e711610059578063e90f13e714610395578063f209883a146103ea578063ffd7d741146103ff57610180565b8063d1db390714610395578063d5b5337f146103aa578063e717aba9146103ca57610180565b8063c272d5c3116100b0578063c272d5c314610333578063c39f2d5c14610348578063c66764e11461036857610180565b806398f9fbc4146102e9578063aeea5fb5146102fe578063b472f0a21461031357610180565b806348acd29f116101385780637ae99638116101125780637ae99638146102875780637f29d538146102a7578063984395bc146102c757610180565b806348acd29f14610227578063543196eb146102475780637082503b1461026757610180565b80631cd05dc4116101695780631cd05dc4146101d057806343d9c935146101f057806344d466c21461020557610180565b80630fdecfac146101855780631551f0ab146101b0575b600080fd5b34801561019157600080fd5b5061019a610420565b6040516101a79190612190565b60405180910390f35b3480156101bc57600080fd5b5061019a6101cb366004611e76565b610424565b3480156101dc57600080fd5b5061019a6101eb366004611bea565b610436565b3480156101fc57600080fd5b5061019a610448565b34801561021157600080fd5b50610225610220366004611ca4565b610450565b005b34801561023357600080fd5b5061019a610242366004611bea565b61080a565b34801561025357600080fd5b5061019a610262366004611bea565b610828565b34801561027357600080fd5b50610225610282366004611c0b565b61082c565b34801561029357600080fd5b5061019a6102a2366004611bea565b610cb0565b3480156102b357600080fd5b506102256102c2366004611e76565b610cc2565b3480156102d357600080fd5b506102dc610cfe565b6040516101a79190612000565b3480156102f557600080fd5b506102dc610d02565b34801561030a57600080fd5b5061019a610d06565b34801561031f57600080fd5b5061022561032e366004611c7b565b610d0a565b34801561033f57600080fd5b5061019a610de8565b34801561035457600080fd5b5061019a610363366004611bea565b610dec565b34801561037457600080fd5b50610388610383366004611bea565b610df0565b6040516101a791906121c5565b3480156103a157600080fd5b5061019a610e35565b3480156103b657600080fd5b5061019a6103c5366004611e76565b610e39565b3480156103d657600080fd5b5061019a6103e5366004611bea565b610e3d565b3480156103f657600080fd5b5061019a610e4f565b61041261040d366004611d34565b610e53565b6040516101a7929190612021565b4690565b60036020526000908152604090205481565b60006020819052908152604090205481565b60005a905090565b8360005b838110156104e9578185858381811061046957fe5b9050604002016000013586868481811061047f57fe5b90506040020160200160208101906104979190611bea565b6040516020016104a993929190612199565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101209150600101610454565b506000808773ffffffffffffffffffffffffffffffffffffffff166351605d8060e01b60405160200161051c9190611f54565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261055491611f81565b6000604051808303816000865af19150503d8060008114610591576040519150601f19603f3d011682016040523d82523d6000602084013e610596565b606091505b50915091508180156105a9575080516020145b1561060e576000818060200190518101906105c49190611e8e565b9050838114610608576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff90612543565b60405180910390fd5b50610732565b60405173ffffffffffffffffffffffffffffffffffffffff89169061069d907fff00000000000000000000000000000000000000000000000000000000000000907f00000000000000000000000000000000000000000000000000000000000000009087907f000000000000000000000000000000000000000000000000000000000000000090602001611ef0565b6040516020818303038152906040528051906020012060001c73ffffffffffffffffffffffffffffffffffffffff1614610703576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff906125a0565b83156107325773ffffffffffffffffffffffffffffffffffffffff881660009081526002602052604090208390555b828873ffffffffffffffffffffffffffffffffffffffff167fb502b7446ca079086188acf3abef47c2f464f2ee9a72fcdf05ffcb74dcc17cee89898960405160200161077f9291906120c7565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526107b89291612623565b60405180910390a383156108005773ffffffffffffffffffffffffffffffffffffffff8816600090815260016020908152604080832043908190558684526003909252909120555b5050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8116315b919050565b3f90565b600080610838846110c3565b9150915060008046905080898960405160200161085793929190611f9d565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012091505061ffff831660008767ffffffffffffffff811180156108ae57600080fd5b506040519080825280602002602001820160405280156108e857816020015b6108d5611b1c565b8152602001906001900390816108cd5790505b50905060005b8751851015610a9f57600080806109058b89611131565b995060ff9182169450169150600183141561092d576109248b896111b2565b98509050610a20565b8261095f57606061093e8c8a61122a565b9950905061094c88826112db565b91506109598f838d611665565b50610a20565b60028314156109ee576109728b896111b2565b9850905060006109828c8a6116f3565b995061ffff16905060606109978d8b84611764565b9a5090506109a6898483611853565b6109dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff9061242c565b50506109e98e828c611665565b610a20565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff906121d8565b60405180604001604052808381526020018273ffffffffffffffffffffffffffffffffffffffff16815250858581518110610a5757fe5b60200260200101819052508380600101945050858282604051602001610a7f93929190612199565b6040516020818303038152906040528051906020012095505050506108ee565b888114610ad8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff906124e6565b60405173ffffffffffffffffffffffffffffffffffffffff8c1690610b67907fff00000000000000000000000000000000000000000000000000000000000000907f00000000000000000000000000000000000000000000000000000000000000009087907f000000000000000000000000000000000000000000000000000000000000000090602001611ef0565b6040516020818303038152906040528051906020012060001c73ffffffffffffffffffffffffffffffffffffffff1614610bcd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff906123a9565b828b73ffffffffffffffffffffffffffffffffffffffff167fb502b7446ca079086188acf3abef47c2f464f2ee9a72fcdf05ffcb74dcc17cee8885604051602001610c18919061212b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610c5192916125fe565b60405180910390a38615610ca35773ffffffffffffffffffffffffffffffffffffffff8b1660008181526001602090815260408083204390819055878452600383528184205592825260029052208390555b5050505050505050505050565b60026020526000908152604090205481565b804210610cfb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff9061234c565b50565b3290565b4190565b4490565b600080610d1683611a9b565b9150915060008473ffffffffffffffffffffffffffffffffffffffff16638c3f5563846040518263ffffffff1660e01b8152600401610d559190612190565b60206040518083038186803b158015610d6d57600080fd5b505afa158015610d81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610da59190611e8e565b905081811015610de1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff906122ef565b5050505050565b3a90565b3b90565b60408051603f833b9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092528181529080600060208401853c50919050565b4590565b4090565b60016020526000908152604090205481565b4290565b606080825167ffffffffffffffff81118015610e6e57600080fd5b50604051908082528060200260200182016040528015610e98578160200160208202803683370190505b509150825167ffffffffffffffff81118015610eb357600080fd5b50604051908082528060200260200182016040528015610ee757816020015b6060815260200190600190039081610ed25790505b50905060005b83518110156110bd576000848281518110610f0457fe5b60200260200101519050806000015115610f4a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff90612489565b80604001515a1015610f88576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff90612292565b806060015173ffffffffffffffffffffffffffffffffffffffff1681608001518260400151600014610fbe578260400151610fc0565b5a5b908360a00151604051610fd39190611f81565b600060405180830381858888f193505050503d8060008114611011576040519150601f19603f3d011682016040523d82523d6000602084013e611016565b606091505b5085848151811061102357fe5b6020026020010185858151811061103657fe5b602002602001018290528215151515815250505083828151811061105657fe5b60200260200101518061107e575084828151811061107057fe5b602002602001015160200151155b6110b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ff90612235565b50600101610eed565b50915091565b6020810151815160f09190911c9060029081111561112c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061272b6027913960400191505060405180910390fd5b915091565b8082016020015160f881901c9060f01c60ff166002830183811161115157fe5b84518111156111ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061285d6026913960400191505060405180910390fd5b9250925092565b8082016020015160601c601482018281116111c957fe5b8351811115611223576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806127086023913960400191505060405180910390fd5b9250929050565b60408051604280825260808201909252606091600091906020820181803683370190505091508284016020018051602084015260208101516040840152602281015160428401525060428301905082811161128157fe5b8351811115611223576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806127fe6023913960400191505060405180910390fd5b60008151604214611337576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a8152602001806126ce603a913960400191505060405180910390fd5b60008260018451038151811061134957fe5b602001015160f81c60f81b60f81c60ff16905060008360408151811061136b57fe5b016020015160f81c905060006113818582611ab4565b90506000611390866020611ab4565b90507f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a081111561140b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180612691603d913960400191505060405180910390fd5b8260ff16601b1415801561142357508260ff16601c14155b15611479576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180612752603d913960400191505060405180910390fd5b60018414156114ed5760018784848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156114dc573d6000803e3d6000fd5b5050506020604051035194506115ef565b600284141561159e5760018760405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c018281526020019150506040516020818303038152906040528051906020012084848460405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156114dc573d6000803e3d6000fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c815260200180612821603c913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff851661165b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603081526020018061278f6030913960400191505060405180910390fd5b5050505092915050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f600ba597427f042bcd559a0d06fa1732cc104d6dd43cbe8845b5a0e804b2b39f60405160405180910390a380156116ee5773ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604090204390555b505050565b8082016020015160f01c6002820182811161170a57fe5b8351811115611223576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806128a46022913960400191505060405180910390fd5b606060008267ffffffffffffffff8111801561177f57600080fd5b506040519080825280601f01601f1916602001820160405280156117aa576020820181803683370190505b509150838501602001600060205b858110156117d1579082015184820152602081016117b8565b84860160200180519390920151908501525250828201838110156117f157fe5b845181111561184b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806128836021913960400191505060405180910390fd5b935093915050565b6000808260018451038151811061186657fe5b016020015160f81c9050600181148061187f5750600281145b156118c3578373ffffffffffffffffffffffffffffffffffffffff166118a586856112db565b73ffffffffffffffffffffffffffffffffffffffff16149150611a93565b6003811415611a425782517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018452604080517f1626ba7e000000000000000000000000000000000000000000000000000000008152600481018881526024820192835286516044830152865173ffffffffffffffffffffffffffffffffffffffff891693631626ba7e938b938a9390929160640190602085019080838360005b8381101561197d578181015183820152602001611965565b50505050905090810190601f1680156119aa5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b1580156119c857600080fd5b505afa1580156119dc573d6000803e3d6000fd5b505050506040513d60208110156119f257600080fd5b50519084527fffffffff00000000000000000000000000000000000000000000000000000000167f1626ba7e00000000000000000000000000000000000000000000000000000000149150611a93565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603f8152602001806127bf603f913960400191505060405180910390fd5b509392505050565b606081901c916bffffffffffffffffffffffff90911690565b60008160200183511015611b13576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c8152602001806128c6603c913960400191505060405180910390fd5b50016020015190565b604080518082019091526000808252602082015290565b803573ffffffffffffffffffffffffffffffffffffffff8116811461082357600080fd5b8035801515811461082357600080fd5b600082601f830112611b77578081fd5b813567ffffffffffffffff811115611b8b57fe5b611bbc60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161263c565b818152846020838601011115611bd0578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215611bfb578081fd5b611c0482611b33565b9392505050565b600080600080600060a08688031215611c22578081fd5b611c2b86611b33565b94506020860135935060408601359250606086013567ffffffffffffffff811115611c54578182fd5b611c6088828901611b67565b925050611c6f60808701611b57565b90509295509295909350565b60008060408385031215611c8d578182fd5b611c9683611b33565b946020939093013593505050565b600080600080600060808688031215611cbb578081fd5b611cc486611b33565b945060208601359350604086013567ffffffffffffffff80821115611ce7578283fd5b818801915088601f830112611cfa578283fd5b813581811115611d08578384fd5b896020604083028501011115611d1c578384fd5b602083019550809450505050611c6f60608701611b57565b60006020808385031215611d46578182fd5b823567ffffffffffffffff80821115611d5d578384fd5b818501915085601f830112611d70578384fd5b813581811115611d7c57fe5b611d89848583020161263c565b81815284810190848601875b84811015611e67578135870160c0807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0838f03011215611dd3578a8bfd5b604080518281018181108b82111715611de857fe5b8252611df5848d01611b57565b8152611e02828501611b57565b8c82015260608085013583830152611e1c60808601611b33565b9082015260a08481013560808301529284013592915089831115611e3e578c8dfd5b611e4c8f8d85870101611b67565b91810191909152865250509287019290870190600101611d95565b50909998505050505050505050565b600060208284031215611e87578081fd5b5035919050565b600060208284031215611e9f578081fd5b5051919050565b60008151808452611ebe816020860160208601612660565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7fff0000000000000000000000000000000000000000000000000000000000000094909416845260609290921b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660018401526015830152603582015260550190565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260040190565b60008251611f93818460208701612660565b9190910192915050565b7f19010000000000000000000000000000000000000000000000000000000000008152600281019390935260609190911b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166022830152603682015260560190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b604080825283519082018190526000906020906060840190828701845b8281101561205c57815115158452928401929084019060010161203e565b5050508381038285015284518082528282019080840283018401878501865b83811015611e67577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08684030185526120b5838351611ea6565b9487019492509086019060010161207b565b6020808252818101839052600090604080840186845b8781101561211e578135835273ffffffffffffffffffffffffffffffffffffffff612109868401611b33565b168386015291830191908301906001016120dd565b5090979650505050505050565b602080825282518282018190526000919060409081850190868401855b828110156121835781518051855286015173ffffffffffffffffffffffffffffffffffffffff16868501529284019290850190600101612148565b5091979650505050505050565b90815260200190565b928352602083019190915273ffffffffffffffffffffffffffffffffffffffff16604082015260600190565b600060208252611c046020830184611ea6565b6020808252603a908201527f526571756972655574696c73237075626c697368496e697469616c5369676e6560408201527f72733a20494e56414c49445f5349474e41545552455f464c4147000000000000606082015260800190565b60208082526027908201527f4d756c746943616c6c5574696c73236d756c746943616c6c3a2043414c4c5f5260408201527f4556455254454400000000000000000000000000000000000000000000000000606082015260800190565b60208082526028908201527f4d756c746943616c6c5574696c73236d756c746943616c6c3a204e4f545f454e60408201527f4f5547485f474153000000000000000000000000000000000000000000000000606082015260800190565b60208082526032908201527f526571756972655574696c7323726571756972654d696e4e6f6e63653a204e4f60408201527f4e43455f42454c4f575f52455155495245440000000000000000000000000000606082015260800190565b60208082526027908201527f526571756972655574696c7323726571756972654e6f6e457870697265643a2060408201527f4558504952454400000000000000000000000000000000000000000000000000606082015260800190565b60208082526048908201527f526571756972655574696c73237075626c697368496e697469616c5369676e6560408201527f72733a20554e45585045435445445f434f554e5445524641435455414c5f494d60608201527f4147455f48415348000000000000000000000000000000000000000000000000608082015260a00190565b60208082526032908201527f4d6f64756c6541757468235f7369676e617475726556616c69646174696f6e3a60408201527f20494e56414c49445f5349474e41545552450000000000000000000000000000606082015260800190565b60208082526032908201527f4d756c746943616c6c5574696c73236d756c746943616c6c3a2064656c65676160408201527f746543616c6c206e6f7420616c6c6f7765640000000000000000000000000000606082015260800190565b60208082526039908201527f526571756972655574696c73237075626c697368496e697469616c5369676e6560408201527f72733a20494e56414c49445f4d454d424552535f434f554e5400000000000000606082015260800190565b60208082526031908201527f526571756972655574696c73237075626c697368436f6e6669673a20554e455860408201527f5045435445445f494d4147455f48415348000000000000000000000000000000606082015260800190565b602080825260409082018190527f526571756972655574696c73237075626c697368436f6e6669673a20554e4558908201527f5045435445445f434f554e5445524641435455414c5f494d4147455f48415348606082015260800190565b600061ffff841682526040602083015261261b6040830184611ea6565b949350505050565b60008382526040602083015261261b6040830184611ea6565b60405181810167ffffffffffffffff8111828210171561265857fe5b604052919050565b60005b8381101561267b578181015183820152602001612663565b8381111561268a576000848401525b5050505056fe5369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265202773272076616c75655369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265206c656e6774684c696242797465732372656164416464726573733a204f55545f4f465f424f554e44534c696242797465732372656164466972737455696e7431363a204f55545f4f465f424f554e44535369676e617475726556616c696461746f72237265636f7665725369676e65723a20696e76616c6964207369676e6174757265202776272076616c75655369676e617475726556616c696461746f72237265636f7665725369676e65723a20494e56414c49445f5349474e45525369676e617475726556616c696461746f7223697356616c69645369676e61747572653a20554e535550504f525445445f5349474e41545552455f545950454c696242797465732372656164427974657336363a204f55545f4f465f424f554e44535369676e617475726556616c696461746f72237265636f7665725369676e65723a20554e535550504f525445445f5349474e41545552455f545950454c69624279746573237265616455696e743855696e74383a204f55545f4f465f424f554e44534c69624279746573237265616442797465733a204f55545f4f465f424f554e44534c69624279746573237265616455696e7431363a204f55545f4f465f424f554e44534c696242797465732372656164427974657333323a20475245415445525f4f525f455155414c5f544f5f33325f4c454e4754485f5245515549524544a26469706673582212200abb842b6eea58df953f048e3a9aa7589fd3ce15ca086e43b61cdb0c0c42723564736f6c63430007060033603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3000000000000000000000000f9d09d634fb818b05149329c1dccfaea53639d96000000000000000000000000d01f11855bccb95f88d7a48492f66410d4637313

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000f9d09d634fb818b05149329c1dccfaea53639d96000000000000000000000000d01f11855bccb95f88d7a48492f66410d4637313

-----Decoded View---------------
Arg [0] : _factory (address): 0xf9d09d634fb818b05149329c1dccfaea53639d96
Arg [1] : _mainModule (address): 0xd01f11855bccb95f88d7a48492f66410d4637313

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000f9d09d634fb818b05149329c1dccfaea53639d96
Arg [1] : 000000000000000000000000d01f11855bccb95f88d7a48492f66410d4637313


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
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.