Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save codinghistorian/2ebfd1b787a56da976779d955c16836b to your computer and use it in GitHub Desktop.

Select an option

Save codinghistorian/2ebfd1b787a56da976779d955c16836b to your computer and use it in GitHub Desktop.

Revisions

  1. codinghistorian created this gist Oct 14, 2023.
    Sorry, we could not display the entire diff because it was too big.
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,95 @@
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

    pragma solidity ^0.8.0;

    import "../utils/ContextUpgradeable.sol";
    import "../proxy/utils/Initializable.sol";

    /**
    * @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.
    */
    abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

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

    /**
    * @dev Initializes the contract setting the deployer as the initial owner.
    */
    function __Ownable_init() internal onlyInitializing {
    __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
    _transferOwnership(_msgSender());
    }

    /**
    * @dev Throws if called by any account other than the owner.
    */
    modifier onlyOwner() {
    _checkOwner();
    _;
    }

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

    /**
    * @dev Throws if the sender is not the owner.
    */
    function _checkOwner() internal view virtual {
    require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
    * @dev Leaves the contract without owner. It will not be possible to call
    * `onlyOwner` functions. Can only be called by the current owner.
    *
    * NOTE: Renouncing ownership will leave the contract without an owner,
    * thereby disabling any functionality that is only available to the owner.
    */
    function renounceOwnership() public virtual onlyOwner {
    _transferOwnership(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");
    _transferOwnership(newOwner);
    }

    /**
    * @dev Transfers ownership of the contract to a new account (`newOwner`).
    * Internal function without access restriction.
    */
    function _transferOwnership(address newOwner) internal virtual {
    address oldOwner = _owner;
    _owner = newOwner;
    emit OwnershipTransferred(oldOwner, newOwner);
    }

    /**
    * @dev This empty reserved space is put in place to allow future versions to add new
    * variables without shifting down storage in the inheritance chain.
    * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
    */
    uint256[49] private __gap;
    }
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,166 @@
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)

    pragma solidity ^0.8.2;

    import "../../utils/AddressUpgradeable.sol";

    /**
    * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
    * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
    * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
    * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
    *
    * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
    * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
    * case an upgrade adds a module that needs to be initialized.
    *
    * For example:
    *
    * [.hljs-theme-light.nopadding]
    * ```solidity
    * contract MyToken is ERC20Upgradeable {
    * function initialize() initializer public {
    * __ERC20_init("MyToken", "MTK");
    * }
    * }
    *
    * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
    * function initializeV2() reinitializer(2) public {
    * __ERC20Permit_init("MyToken");
    * }
    * }
    * ```
    *
    * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
    * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
    *
    * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
    * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
    *
    * [CAUTION]
    * ====
    * Avoid leaving a contract uninitialized.
    *
    * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
    * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
    * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
    *
    * [.hljs-theme-light.nopadding]
    * ```
    * /// @custom:oz-upgrades-unsafe-allow constructor
    * constructor() {
    * _disableInitializers();
    * }
    * ```
    * ====
    */
    abstract contract Initializable {
    /**
    * @dev Indicates that the contract has been initialized.
    * @custom:oz-retyped-from bool
    */
    uint8 private _initialized;

    /**
    * @dev Indicates that the contract is in the process of being initialized.
    */
    bool private _initializing;

    /**
    * @dev Triggered when the contract has been initialized or reinitialized.
    */
    event Initialized(uint8 version);

    /**
    * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
    * `onlyInitializing` functions can be used to initialize parent contracts.
    *
    * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
    * constructor.
    *
    * Emits an {Initialized} event.
    */
    modifier initializer() {
    bool isTopLevelCall = !_initializing;
    require(
    (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
    "Initializable: contract is already initialized"
    );
    _initialized = 1;
    if (isTopLevelCall) {
    _initializing = true;
    }
    _;
    if (isTopLevelCall) {
    _initializing = false;
    emit Initialized(1);
    }
    }

    /**
    * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
    * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
    * used to initialize parent contracts.
    *
    * A reinitializer may be used after the original initialization step. This is essential to configure modules that
    * are added through upgrades and that require initialization.
    *
    * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
    * cannot be nested. If one is invoked in the context of another, execution will revert.
    *
    * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
    * a contract, executing them in the right order is up to the developer or operator.
    *
    * WARNING: setting the version to 255 will prevent any future reinitialization.
    *
    * Emits an {Initialized} event.
    */
    modifier reinitializer(uint8 version) {
    require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
    _initialized = version;
    _initializing = true;
    _;
    _initializing = false;
    emit Initialized(version);
    }

    /**
    * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
    * {initializer} and {reinitializer} modifiers, directly or indirectly.
    */
    modifier onlyInitializing() {
    require(_initializing, "Initializable: contract is not initializing");
    _;
    }

    /**
    * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
    * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
    * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
    * through proxies.
    *
    * Emits an {Initialized} event the first time it is successfully executed.
    */
    function _disableInitializers() internal virtual {
    require(!_initializing, "Initializable: contract is initializing");
    if (_initialized != type(uint8).max) {
    _initialized = type(uint8).max;
    emit Initialized(type(uint8).max);
    }
    }

    /**
    * @dev Returns the highest version that has been initialized. See {reinitializer}.
    */
    function _getInitializedVersion() internal view returns (uint8) {
    return _initialized;
    }

    /**
    * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
    */
    function _isInitializing() internal view returns (bool) {
    return _initializing;
    }
    }
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,117 @@
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

    pragma solidity ^0.8.0;

    import "../utils/ContextUpgradeable.sol";
    import "../proxy/utils/Initializable.sol";

    /**
    * @dev Contract module which allows children to implement an emergency stop
    * mechanism that can be triggered by an authorized account.
    *
    * This module is used through inheritance. It will make available the
    * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
    * the functions of your contract. Note that they will not be pausable by
    * simply including this module, only once the modifiers are put in place.
    */
    abstract contract PausableUpgradeable is Initializable, ContextUpgradeable {
    /**
    * @dev Emitted when the pause is triggered by `account`.
    */
    event Paused(address account);

    /**
    * @dev Emitted when the pause is lifted by `account`.
    */
    event Unpaused(address account);

    bool private _paused;

    /**
    * @dev Initializes the contract in unpaused state.
    */
    function __Pausable_init() internal onlyInitializing {
    __Pausable_init_unchained();
    }

    function __Pausable_init_unchained() internal onlyInitializing {
    _paused = false;
    }

    /**
    * @dev Modifier to make a function callable only when the contract is not paused.
    *
    * Requirements:
    *
    * - The contract must not be paused.
    */
    modifier whenNotPaused() {
    _requireNotPaused();
    _;
    }

    /**
    * @dev Modifier to make a function callable only when the contract is paused.
    *
    * Requirements:
    *
    * - The contract must be paused.
    */
    modifier whenPaused() {
    _requirePaused();
    _;
    }

    /**
    * @dev Returns true if the contract is paused, and false otherwise.
    */
    function paused() public view virtual returns (bool) {
    return _paused;
    }

    /**
    * @dev Throws if the contract is paused.
    */
    function _requireNotPaused() internal view virtual {
    require(!paused(), "Pausable: paused");
    }

    /**
    * @dev Throws if the contract is not paused.
    */
    function _requirePaused() internal view virtual {
    require(paused(), "Pausable: not paused");
    }

    /**
    * @dev Triggers stopped state.
    *
    * Requirements:
    *
    * - The contract must not be paused.
    */
    function _pause() internal virtual whenNotPaused {
    _paused = true;
    emit Paused(_msgSender());
    }

    /**
    * @dev Returns to normal state.
    *
    * Requirements:
    *
    * - The contract must be paused.
    */
    function _unpause() internal virtual whenPaused {
    _paused = false;
    emit Unpaused(_msgSender());
    }

    /**
    * @dev This empty reserved space is put in place to allow future versions to add new
    * variables without shifting down storage in the inheritance chain.
    * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
    */
    uint256[49] private __gap;
    }
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,89 @@
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)

    pragma solidity ^0.8.0;
    import "../proxy/utils/Initializable.sol";

    /**
    * @dev Contract module that helps prevent reentrant calls to a function.
    *
    * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
    * available, which can be applied to functions to make sure there are no nested
    * (reentrant) calls to them.
    *
    * Note that because there is a single `nonReentrant` guard, functions marked as
    * `nonReentrant` may not call one another. This can be worked around by making
    * those functions `private`, and then adding `external` `nonReentrant` entry
    * points to them.
    *
    * TIP: If you would like to learn more about reentrancy and alternative ways
    * to protect against it, check out our blog post
    * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
    */
    abstract contract ReentrancyGuardUpgradeable is Initializable {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    function __ReentrancyGuard_init() internal onlyInitializing {
    __ReentrancyGuard_init_unchained();
    }

    function __ReentrancyGuard_init_unchained() internal onlyInitializing {
    _status = _NOT_ENTERED;
    }

    /**
    * @dev Prevents a contract from calling itself, directly or indirectly.
    * Calling a `nonReentrant` function from another `nonReentrant`
    * function is not supported. It is possible to prevent this from happening
    * by making the `nonReentrant` function external, and making it call a
    * `private` function that does the actual work.
    */
    modifier nonReentrant() {
    _nonReentrantBefore();
    _;
    _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
    // On the first call to nonReentrant, _status will be _NOT_ENTERED
    require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

    // Any calls to nonReentrant after this point will fail
    _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
    // By storing the original value once again, a refund is triggered (see
    // https://eips.ethereum.org/EIPS/eip-2200)
    _status = _NOT_ENTERED;
    }

    /**
    * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
    * `nonReentrant` function in the call stack.
    */
    function _reentrancyGuardEntered() internal view returns (bool) {
    return _status == _ENTERED;
    }

    /**
    * @dev This empty reserved space is put in place to allow future versions to add new
    * variables without shifting down storage in the inheritance chain.
    * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
    */
    uint256[49] private __gap;
    }
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,244 @@
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

    pragma solidity ^0.8.1;

    /**
    * @dev Collection of functions related to the address type
    */
    library AddressUpgradeable {
    /**
    * @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
    *
    * Furthermore, `isContract` will also return true if the target contract within
    * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
    * which only has an effect at the end of a transaction.
    * ====
    *
    * [IMPORTANT]
    * ====
    * You shouldn't rely on `isContract` to protect against flash loan attacks!
    *
    * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
    * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
    * constructor.
    * ====
    */
    function isContract(address account) internal view returns (bool) {
    // This method relies on extcodesize/address.code.length, which returns 0
    // for contracts in construction, since the code is only stored at the end
    // of the constructor execution.

    return account.code.length > 0;
    }

    /**
    * @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://consensys.net/diligence/blog/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.8.0/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");

    (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 functionCallWithValue(target, data, 0, "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");
    (bool success, bytes memory returndata) = target.call{value: value}(data);
    return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
    * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
    * but performing a static call.
    *
    * _Available since v3.3._
    */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
    return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
    * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
    * but performing a static call.
    *
    * _Available since v3.3._
    */
    function functionStaticCall(
    address target,
    bytes memory data,
    string memory errorMessage
    ) internal view returns (bytes memory) {
    (bool success, bytes memory returndata) = target.staticcall(data);
    return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
    * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
    * but performing a delegate call.
    *
    * _Available since v3.4._
    */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
    return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
    * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
    * but performing a delegate call.
    *
    * _Available since v3.4._
    */
    function functionDelegateCall(
    address target,
    bytes memory data,
    string memory errorMessage
    ) internal returns (bytes memory) {
    (bool success, bytes memory returndata) = target.delegatecall(data);
    return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
    * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
    * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
    *
    * _Available since v4.8._
    */
    function verifyCallResultFromTarget(
    address target,
    bool success,
    bytes memory returndata,
    string memory errorMessage
    ) internal view returns (bytes memory) {
    if (success) {
    if (returndata.length == 0) {
    // only check isContract if the call was successful and the return data is empty
    // otherwise we already know that it was a contract
    require(isContract(target), "Address: call to non-contract");
    }
    return returndata;
    } else {
    _revert(returndata, errorMessage);
    }
    }

    /**
    * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
    * revert reason or using the provided one.
    *
    * _Available since v4.3._
    */
    function verifyCallResult(
    bool success,
    bytes memory returndata,
    string memory errorMessage
    ) internal pure returns (bytes memory) {
    if (success) {
    return returndata;
    } else {
    _revert(returndata, errorMessage);
    }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
    // 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
    /// @solidity memory-safe-assembly
    assembly {
    let returndata_size := mload(returndata)
    revert(add(32, returndata), returndata_size)
    }
    } else {
    revert(errorMessage);
    }
    }
    }
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,37 @@
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

    pragma solidity ^0.8.0;
    import "../proxy/utils/Initializable.sol";

    /**
    * @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 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 ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
    return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
    return msg.data;
    }

    /**
    * @dev This empty reserved space is put in place to allow future versions to add new
    * variables without shifting down storage in the inheritance chain.
    * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
    */
    uint256[50] private __gap;
    }
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,215 @@
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)

    pragma solidity ^0.8.0;

    // CAUTION
    // This version of SafeMath should only be used with Solidity 0.8 or later,
    // because it relies on the compiler's built in overflow checks.

    /**
    * @dev Wrappers over Solidity's arithmetic operations.
    *
    * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
    * now has built in overflow checking.
    */
    library SafeMathUpgradeable {
    /**
    * @dev Returns the addition of two unsigned integers, with an overflow flag.
    *
    * _Available since v3.4._
    */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
    unchecked {
    uint256 c = a + b;
    if (c < a) return (false, 0);
    return (true, c);
    }
    }

    /**
    * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
    *
    * _Available since v3.4._
    */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
    unchecked {
    if (b > a) return (false, 0);
    return (true, a - b);
    }
    }

    /**
    * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
    *
    * _Available since v3.4._
    */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
    unchecked {
    // 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 (true, 0);
    uint256 c = a * b;
    if (c / a != b) return (false, 0);
    return (true, c);
    }
    }

    /**
    * @dev Returns the division of two unsigned integers, with a division by zero flag.
    *
    * _Available since v3.4._
    */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
    unchecked {
    if (b == 0) return (false, 0);
    return (true, a / b);
    }
    }

    /**
    * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
    *
    * _Available since v3.4._
    */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
    unchecked {
    if (b == 0) return (false, 0);
    return (true, a % b);
    }
    }

    /**
    * @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) {
    return a + b;
    }

    /**
    * @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 a - b;
    }

    /**
    * @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) {
    return a * b;
    }

    /**
    * @dev Returns the integer division of two unsigned integers, reverting on
    * division by zero. The result is rounded towards zero.
    *
    * Counterpart to Solidity's `/` operator.
    *
    * Requirements:
    *
    * - The divisor cannot be zero.
    */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
    return a / b;
    }

    /**
    * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
    * reverting 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 a % b;
    }

    /**
    * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
    * overflow (when the result is negative).
    *
    * CAUTION: This function is deprecated because it requires allocating memory for the error
    * message unnecessarily. For custom revert reasons use {trySub}.
    *
    * Counterpart to Solidity's `-` operator.
    *
    * Requirements:
    *
    * - Subtraction cannot overflow.
    */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
    unchecked {
    require(b <= a, errorMessage);
    return a - b;
    }
    }

    /**
    * @dev Returns the integer division of two unsigned integers, reverting 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) {
    unchecked {
    require(b > 0, errorMessage);
    return a / b;
    }
    }

    /**
    * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
    * reverting with custom message when dividing by zero.
    *
    * CAUTION: This function is deprecated because it requires allocating memory for the error
    * message unnecessarily. For custom revert reasons use {tryMod}.
    *
    * 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) {
    unchecked {
    require(b > 0, errorMessage);
    return a % b;
    }
    }
    }
    247 changes: 247 additions & 0 deletions .deps...npm...@openzeppelin...contracts...access...AccessControl.sol
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,247 @@
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol)

    pragma solidity ^0.8.0;

    import "./IAccessControl.sol";
    import "../utils/Context.sol";
    import "../utils/Strings.sol";
    import "../utils/introspection/ERC165.sol";

    /**
    * @dev Contract module that allows children to implement role-based access
    * control mechanisms. This is a lightweight version that doesn't allow enumerating role
    * members except through off-chain means by accessing the contract event logs. Some
    * applications may benefit from on-chain enumerability, for those cases see
    * {AccessControlEnumerable}.
    *
    * Roles are referred to by their `bytes32` identifier. These should be exposed
    * in the external API and be unique. The best way to achieve this is by
    * using `public constant` hash digests:
    *
    * ```
    * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
    * ```
    *
    * Roles can be used to represent a set of permissions. To restrict access to a
    * function call, use {hasRole}:
    *
    * ```
    * function foo() public {
    * require(hasRole(MY_ROLE, msg.sender));
    * ...
    * }
    * ```
    *
    * Roles can be granted and revoked dynamically via the {grantRole} and
    * {revokeRole} functions. Each role has an associated admin role, and only
    * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
    *
    * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
    * that only accounts with this role will be able to grant or revoke other
    * roles. More complex role relationships can be created by using
    * {_setRoleAdmin}.
    *
    * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
    * grant and revoke this role. Extra precautions should be taken to secure
    * accounts that have been granted it.
    */
    abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
    mapping(address => bool) members;
    bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
    * @dev Modifier that checks that an account has a specific role. Reverts
    * with a standardized message including the required role.
    *
    * The format of the revert reason is given by the following regular expression:
    *
    * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
    *
    * _Available since v4.1._
    */
    modifier onlyRole(bytes32 role) {
    _checkRole(role);
    _;
    }

    /**
    * @dev See {IERC165-supportsInterface}.
    */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
    return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
    * @dev Returns `true` if `account` has been granted `role`.
    */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
    return _roles[role].members[account];
    }

    /**
    * @dev Revert with a standard message if `_msgSender()` is missing `role`.
    * Overriding this function changes the behavior of the {onlyRole} modifier.
    *
    * Format of the revert message is described in {_checkRole}.
    *
    * _Available since v4.6._
    */
    function _checkRole(bytes32 role) internal view virtual {
    _checkRole(role, _msgSender());
    }

    /**
    * @dev Revert with a standard message if `account` is missing `role`.
    *
    * The format of the revert reason is given by the following regular expression:
    *
    * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
    */
    function _checkRole(bytes32 role, address account) internal view virtual {
    if (!hasRole(role, account)) {
    revert(
    string(
    abi.encodePacked(
    "AccessControl: account ",
    Strings.toHexString(account),
    " is missing role ",
    Strings.toHexString(uint256(role), 32)
    )
    )
    );
    }
    }

    /**
    * @dev Returns the admin role that controls `role`. See {grantRole} and
    * {revokeRole}.
    *
    * To change a role's admin, use {_setRoleAdmin}.
    */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
    return _roles[role].adminRole;
    }

    /**
    * @dev Grants `role` to `account`.
    *
    * If `account` had not been already granted `role`, emits a {RoleGranted}
    * event.
    *
    * Requirements:
    *
    * - the caller must have ``role``'s admin role.
    *
    * May emit a {RoleGranted} event.
    */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
    _grantRole(role, account);
    }

    /**
    * @dev Revokes `role` from `account`.
    *
    * If `account` had been granted `role`, emits a {RoleRevoked} event.
    *
    * Requirements:
    *
    * - the caller must have ``role``'s admin role.
    *
    * May emit a {RoleRevoked} event.
    */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
    _revokeRole(role, account);
    }

    /**
    * @dev Revokes `role` from the calling account.
    *
    * Roles are often managed via {grantRole} and {revokeRole}: this function's
    * purpose is to provide a mechanism for accounts to lose their privileges
    * if they are compromised (such as when a trusted device is misplaced).
    *
    * If the calling account had been revoked `role`, emits a {RoleRevoked}
    * event.
    *
    * Requirements:
    *
    * - the caller must be `account`.
    *
    * May emit a {RoleRevoked} event.
    */
    function renounceRole(bytes32 role, address account) public virtual override {
    require(account == _msgSender(), "AccessControl: can only renounce roles for self");

    _revokeRole(role, account);
    }

    /**
    * @dev Grants `role` to `account`.
    *
    * If `account` had not been already granted `role`, emits a {RoleGranted}
    * event. Note that unlike {grantRole}, this function doesn't perform any
    * checks on the calling account.
    *
    * May emit a {RoleGranted} event.
    *
    * [WARNING]
    * ====
    * This function should only be called from the constructor when setting
    * up the initial roles for the system.
    *
    * Using this function in any other way is effectively circumventing the admin
    * system imposed by {AccessControl}.
    * ====
    *
    * NOTE: This function is deprecated in favor of {_grantRole}.
    */
    function _setupRole(bytes32 role, address account) internal virtual {
    _grantRole(role, account);
    }

    /**
    * @dev Sets `adminRole` as ``role``'s admin role.
    *
    * Emits a {RoleAdminChanged} event.
    */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
    bytes32 previousAdminRole = getRoleAdmin(role);
    _roles[role].adminRole = adminRole;
    emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
    * @dev Grants `role` to `account`.
    *
    * Internal function without access restriction.
    *
    * May emit a {RoleGranted} event.
    */
    function _grantRole(bytes32 role, address account) internal virtual {
    if (!hasRole(role, account)) {
    _roles[role].members[account] = true;
    emit RoleGranted(role, account, _msgSender());
    }
    }

    /**
    * @dev Revokes `role` from `account`.
    *
    * Internal function without access restriction.
    *
    * May emit a {RoleRevoked} event.
    */
    function _revokeRole(bytes32 role, address account) internal virtual {
    if (hasRole(role, account)) {
    _roles[role].members[account] = false;
    emit RoleRevoked(role, account, _msgSender());
    }
    }
    }
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,88 @@
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

    pragma solidity ^0.8.0;

    /**
    * @dev External interface of AccessControl declared to support ERC165 detection.
    */
    interface IAccessControl {
    /**
    * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
    *
    * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
    * {RoleAdminChanged} not being emitted signaling this.
    *
    * _Available since v3.1._
    */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
    * @dev Emitted when `account` is granted `role`.
    *
    * `sender` is the account that originated the contract call, an admin role
    * bearer except when using {AccessControl-_setupRole}.
    */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
    * @dev Emitted when `account` is revoked `role`.
    *
    * `sender` is the account that originated the contract call:
    * - if using `revokeRole`, it is the admin role bearer
    * - if using `renounceRole`, it is the role bearer (i.e. `account`)
    */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
    * @dev Returns `true` if `account` has been granted `role`.
    */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
    * @dev Returns the admin role that controls `role`. See {grantRole} and
    * {revokeRole}.
    *
    * To change a role's admin, use {AccessControl-_setRoleAdmin}.
    */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
    * @dev Grants `role` to `account`.
    *
    * If `account` had not been already granted `role`, emits a {RoleGranted}
    * event.
    *
    * Requirements:
    *
    * - the caller must have ``role``'s admin role.
    */
    function grantRole(bytes32 role, address account) external;

    /**
    * @dev Revokes `role` from `account`.
    *
    * If `account` had been granted `role`, emits a {RoleRevoked} event.
    *
    * Requirements:
    *
    * - the caller must have ``role``'s admin role.
    */
    function revokeRole(bytes32 role, address account) external;

    /**
    * @dev Revokes `role` from the calling account.
    *
    * Roles are often managed via {grantRole} and {revokeRole}: this function's
    * purpose is to provide a mechanism for accounts to lose their privileges
    * if they are compromised (such as when a trusted device is misplaced).
    *
    * If the calling account had been granted `role`, emits a {RoleRevoked}
    * event.
    *
    * Requirements:
    *
    * - the caller must be `account`.
    */
    function renounceRole(bytes32 role, address account) external;
    }
    105 changes: 105 additions & 0 deletions .deps...npm...@openzeppelin...contracts...security...Pausable.sol
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,105 @@
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

    pragma solidity ^0.8.0;

    import "../utils/Context.sol";

    /**
    * @dev Contract module which allows children to implement an emergency stop
    * mechanism that can be triggered by an authorized account.
    *
    * This module is used through inheritance. It will make available the
    * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
    * the functions of your contract. Note that they will not be pausable by
    * simply including this module, only once the modifiers are put in place.
    */
    abstract contract Pausable is Context {
    /**
    * @dev Emitted when the pause is triggered by `account`.
    */
    event Paused(address account);

    /**
    * @dev Emitted when the pause is lifted by `account`.
    */
    event Unpaused(address account);

    bool private _paused;

    /**
    * @dev Initializes the contract in unpaused state.
    */
    constructor() {
    _paused = false;
    }

    /**
    * @dev Modifier to make a function callable only when the contract is not paused.
    *
    * Requirements:
    *
    * - The contract must not be paused.
    */
    modifier whenNotPaused() {
    _requireNotPaused();
    _;
    }

    /**
    * @dev Modifier to make a function callable only when the contract is paused.
    *
    * Requirements:
    *
    * - The contract must be paused.
    */
    modifier whenPaused() {
    _requirePaused();
    _;
    }

    /**
    * @dev Returns true if the contract is paused, and false otherwise.
    */
    function paused() public view virtual returns (bool) {
    return _paused;
    }

    /**
    * @dev Throws if the contract is paused.
    */
    function _requireNotPaused() internal view virtual {
    require(!paused(), "Pausable: paused");
    }

    /**
    * @dev Throws if the contract is not paused.
    */
    function _requirePaused() internal view virtual {
    require(paused(), "Pausable: not paused");
    }

    /**
    * @dev Triggers stopped state.
    *
    * Requirements:
    *
    * - The contract must not be paused.
    */
    function _pause() internal virtual whenNotPaused {
    _paused = true;
    emit Paused(_msgSender());
    }

    /**
    * @dev Returns to normal state.
    *
    * Requirements:
    *
    * - The contract must be paused.
    */
    function _unpause() internal virtual whenPaused {
    _paused = false;
    emit Unpaused(_msgSender());
    }
    }
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,69 @@
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

    pragma solidity ^0.8.0;

    /**
    * @dev Contract module that helps prevent reentrant calls to a function.
    *
    * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
    * available, which can be applied to functions to make sure there are no nested
    * (reentrant) calls to them.
    *
    * Note that because there is a single `nonReentrant` guard, functions marked as
    * `nonReentrant` may not call one another. This can be worked around by making
    * those functions `private`, and then adding `external` `nonReentrant` entry
    * points to them.
    *
    * TIP: If you would like to learn more about reentrancy and alternative ways
    * to protect against it, check out our blog post
    * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
    */
    abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
    _status = _NOT_ENTERED;
    }

    /**
    * @dev Prevents a contract from calling itself, directly or indirectly.
    * Calling a `nonReentrant` function from another `nonReentrant`
    * function is not supported. It is possible to prevent this from happening
    * by making the `nonReentrant` function external, and making it call a
    * `private` function that does the actual work.
    */
    modifier nonReentrant() {
    _nonReentrantBefore();
    _;
    _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
    // On the first call to nonReentrant, _status will be _NOT_ENTERED
    require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

    // Any calls to nonReentrant after this point will fail
    _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
    // By storing the original value once again, a refund is triggered (see
    // https://eips.ethereum.org/EIPS/eip-2200)
    _status = _NOT_ENTERED;
    }
    }
    24 changes: 24 additions & 0 deletions [email protected]
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

    pragma solidity ^0.8.0;

    /**
    * @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 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) {
    return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
    return msg.data;
    }
    }
    70 changes: 70 additions & 0 deletions [email protected]
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,70 @@
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

    pragma solidity ^0.8.0;

    import "./math/Math.sol";

    /**
    * @dev String operations.
    */
    library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
    * @dev Converts a `uint256` to its ASCII `string` decimal representation.
    */
    function toString(uint256 value) internal pure returns (string memory) {
    unchecked {
    uint256 length = Math.log10(value) + 1;
    string memory buffer = new string(length);
    uint256 ptr;
    /// @solidity memory-safe-assembly
    assembly {
    ptr := add(buffer, add(32, length))
    }
    while (true) {
    ptr--;
    /// @solidity memory-safe-assembly
    assembly {
    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
    }
    value /= 10;
    if (value == 0) break;
    }
    return buffer;
    }
    }

    /**
    * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
    */
    function toHexString(uint256 value) internal pure returns (string memory) {
    unchecked {
    return toHexString(value, Math.log256(value) + 1);
    }
    }

    /**
    * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
    */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
    bytes memory buffer = new bytes(2 * length + 2);
    buffer[0] = "0";
    buffer[1] = "x";
    for (uint256 i = 2 * length + 1; i > 1; --i) {
    buffer[i] = _SYMBOLS[value & 0xf];
    value >>= 4;
    }
    require(value == 0, "Strings: hex length insufficient");
    return string(buffer);
    }

    /**
    * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
    */
    function toHexString(address addr) internal pure returns (string memory) {
    return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
    }
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

    pragma solidity ^0.8.0;

    import "./IERC165.sol";

    /**
    * @dev Implementation of the {IERC165} interface.
    *
    * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
    * for the additional interface id that will be supported. For example:
    *
    * ```solidity
    * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
    * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
    * }
    * ```
    *
    * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
    */
    abstract contract ERC165 is IERC165 {
    /**
    * @dev See {IERC165-supportsInterface}.
    */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
    return interfaceId == type(IERC165).interfaceId;
    }
    }
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

    pragma solidity ^0.8.0;

    /**
    * @dev Interface of the ERC165 standard, as defined in the
    * https://eips.ethereum.org/EIPS/eip-165[EIP].
    *
    * Implementers can declare support of contract interfaces, which can then be
    * queried by others ({ERC165Checker}).
    *
    * For an implementation, see {ERC165}.
    */
    interface IERC165 {
    /**
    * @dev Returns true if this contract implements the interface defined by
    * `interfaceId`. See the corresponding
    * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
    * to learn more about how these ids are created.
    *
    * This function call must use less than 30 000 gas.
    */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
    }
    345 changes: 345 additions & 0 deletions .deps...npm...@openzeppelin...contracts...utils...math...Math.sol
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,345 @@
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

    pragma solidity ^0.8.0;

    /**
    * @dev Standard math utilities missing in the Solidity language.
    */
    library Math {
    enum Rounding {
    Down, // Toward negative infinity
    Up, // Toward infinity
    Zero // Toward zero
    }

    /**
    * @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.
    return (a & b) + (a ^ b) / 2;
    }

    /**
    * @dev Returns the ceiling of the division of two numbers.
    *
    * This differs from standard division with `/` in that it rounds up instead
    * of rounding down.
    */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
    // (a + b - 1) / b can overflow on addition, so we distribute.
    return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
    * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
    * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
    * with further edits by Uniswap Labs also under MIT license.
    */
    function mulDiv(
    uint256 x,
    uint256 y,
    uint256 denominator
    ) internal pure returns (uint256 result) {
    unchecked {
    // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
    // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
    // variables such that product = prod1 * 2^256 + prod0.
    uint256 prod0; // Least significant 256 bits of the product
    uint256 prod1; // Most significant 256 bits of the product
    assembly {
    let mm := mulmod(x, y, not(0))
    prod0 := mul(x, y)
    prod1 := sub(sub(mm, prod0), lt(mm, prod0))
    }

    // Handle non-overflow cases, 256 by 256 division.
    if (prod1 == 0) {
    return prod0 / denominator;
    }

    // Make sure the result is less than 2^256. Also prevents denominator == 0.
    require(denominator > prod1);

    ///////////////////////////////////////////////
    // 512 by 256 division.
    ///////////////////////////////////////////////

    // Make division exact by subtracting the remainder from [prod1 prod0].
    uint256 remainder;
    assembly {
    // Compute remainder using mulmod.
    remainder := mulmod(x, y, denominator)

    // Subtract 256 bit number from 512 bit number.
    prod1 := sub(prod1, gt(remainder, prod0))
    prod0 := sub(prod0, remainder)
    }

    // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
    // See https://cs.stackexchange.com/q/138556/92363.

    // Does not overflow because the denominator cannot be zero at this stage in the function.
    uint256 twos = denominator & (~denominator + 1);
    assembly {
    // Divide denominator by twos.
    denominator := div(denominator, twos)

    // Divide [prod1 prod0] by twos.
    prod0 := div(prod0, twos)

    // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
    twos := add(div(sub(0, twos), twos), 1)
    }

    // Shift in bits from prod1 into prod0.
    prod0 |= prod1 * twos;

    // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
    // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
    // four bits. That is, denominator * inv = 1 mod 2^4.
    uint256 inverse = (3 * denominator) ^ 2;

    // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
    // in modular arithmetic, doubling the correct bits in each step.
    inverse *= 2 - denominator * inverse; // inverse mod 2^8
    inverse *= 2 - denominator * inverse; // inverse mod 2^16
    inverse *= 2 - denominator * inverse; // inverse mod 2^32
    inverse *= 2 - denominator * inverse; // inverse mod 2^64
    inverse *= 2 - denominator * inverse; // inverse mod 2^128
    inverse *= 2 - denominator * inverse; // inverse mod 2^256

    // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
    // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
    // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
    // is no longer required.
    result = prod0 * inverse;
    return result;
    }
    }

    /**
    * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
    */
    function mulDiv(
    uint256 x,
    uint256 y,
    uint256 denominator,
    Rounding rounding
    ) internal pure returns (uint256) {
    uint256 result = mulDiv(x, y, denominator);
    if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
    result += 1;
    }
    return result;
    }

    /**
    * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
    *
    * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
    */
    function sqrt(uint256 a) internal pure returns (uint256) {
    if (a == 0) {
    return 0;
    }

    // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
    //
    // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
    // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
    //
    // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
    // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
    // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
    //
    // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
    uint256 result = 1 << (log2(a) >> 1);

    // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
    // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
    // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
    // into the expected uint128 result.
    unchecked {
    result = (result + a / result) >> 1;
    result = (result + a / result) >> 1;
    result = (result + a / result) >> 1;
    result = (result + a / result) >> 1;
    result = (result + a / result) >> 1;
    result = (result + a / result) >> 1;
    result = (result + a / result) >> 1;
    return min(result, a / result);
    }
    }

    /**
    * @notice Calculates sqrt(a), following the selected rounding direction.
    */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
    unchecked {
    uint256 result = sqrt(a);
    return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
    }
    }

    /**
    * @dev Return the log in base 2, rounded down, of a positive value.
    * Returns 0 if given 0.
    */
    function log2(uint256 value) internal pure returns (uint256) {
    uint256 result = 0;
    unchecked {
    if (value >> 128 > 0) {
    value >>= 128;
    result += 128;
    }
    if (value >> 64 > 0) {
    value >>= 64;
    result += 64;
    }
    if (value >> 32 > 0) {
    value >>= 32;
    result += 32;
    }
    if (value >> 16 > 0) {
    value >>= 16;
    result += 16;
    }
    if (value >> 8 > 0) {
    value >>= 8;
    result += 8;
    }
    if (value >> 4 > 0) {
    value >>= 4;
    result += 4;
    }
    if (value >> 2 > 0) {
    value >>= 2;
    result += 2;
    }
    if (value >> 1 > 0) {
    result += 1;
    }
    }
    return result;
    }

    /**
    * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
    * Returns 0 if given 0.
    */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
    unchecked {
    uint256 result = log2(value);
    return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
    }
    }

    /**
    * @dev Return the log in base 10, rounded down, of a positive value.
    * Returns 0 if given 0.
    */
    function log10(uint256 value) internal pure returns (uint256) {
    uint256 result = 0;
    unchecked {
    if (value >= 10**64) {
    value /= 10**64;
    result += 64;
    }
    if (value >= 10**32) {
    value /= 10**32;
    result += 32;
    }
    if (value >= 10**16) {
    value /= 10**16;
    result += 16;
    }
    if (value >= 10**8) {
    value /= 10**8;
    result += 8;
    }
    if (value >= 10**4) {
    value /= 10**4;
    result += 4;
    }
    if (value >= 10**2) {
    value /= 10**2;
    result += 2;
    }
    if (value >= 10**1) {
    result += 1;
    }
    }
    return result;
    }

    /**
    * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
    * Returns 0 if given 0.
    */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
    unchecked {
    uint256 result = log10(value);
    return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
    }
    }

    /**
    * @dev Return the log in base 256, rounded down, of a positive value.
    * Returns 0 if given 0.
    *
    * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
    */
    function log256(uint256 value) internal pure returns (uint256) {
    uint256 result = 0;
    unchecked {
    if (value >> 128 > 0) {
    value >>= 128;
    result += 16;
    }
    if (value >> 64 > 0) {
    value >>= 64;
    result += 8;
    }
    if (value >> 32 > 0) {
    value >>= 32;
    result += 4;
    }
    if (value >> 16 > 0) {
    value >>= 16;
    result += 2;
    }
    if (value >> 8 > 0) {
    result += 1;
    }
    }
    return result;
    }

    /**
    * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
    * Returns 0 if given 0.
    */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
    unchecked {
    uint256 result = log256(value);
    return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
    }
    }
    }
    38 changes: 38 additions & 0 deletions .prettierrc.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,38 @@
    {
    "overrides": [
    {
    "files": "*.sol",
    "options": {
    "printWidth": 80,
    "tabWidth": 4,
    "useTabs": false,
    "singleQuote": false,
    "bracketSpacing": false
    }
    },
    {
    "files": "*.yml",
    "options": {}
    },
    {
    "files": "*.yaml",
    "options": {}
    },
    {
    "files": "*.toml",
    "options": {}
    },
    {
    "files": "*.json",
    "options": {}
    },
    {
    "files": "*.js",
    "options": {}
    },
    {
    "files": "*.ts",
    "options": {}
    }
    ]
    }
    28 changes: 28 additions & 0 deletions README.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    REMIX DEFAULT WORKSPACE

    Remix default workspace is present when:
    i. Remix loads for the very first time
    ii. A new workspace is created with 'Default' template
    iii. There are no files existing in the File Explorer

    This workspace contains 3 directories:

    1. 'contracts': Holds three contracts with increasing levels of complexity.
    2. 'scripts': Contains four typescript files to deploy a contract. It is explained below.
    3. 'tests': Contains one Solidity test file for 'Ballot' contract & one JS test file for 'Storage' contract.

    SCRIPTS

    The 'scripts' folder has four typescript files which help to deploy the 'Storage' contract using 'web3.js' and 'ethers.js' libraries.

    For the deployment of any other contract, just update the contract's name from 'Storage' to the desired contract and provide constructor arguments accordingly
    in the file `deploy_with_ethers.ts` or `deploy_with_web3.ts`

    In the 'tests' folder there is a script containing Mocha-Chai unit tests for 'Storage' contract.

    To run a script, right click on file name in the file explorer and click 'Run'. Remember, Solidity file must already be compiled.
    Output from script will appear in remix terminal.

    Please note, require/import is supported in a limited manner for Remix supported modules.
    For now, modules supported by Remix are ethers, web3, swarmgw, chai, multihashes, remix and hardhat only for hardhat.ethers object/plugin.
    For unsupported modules, an error like this will be thrown: '<module_name> module require is not supported by Remix IDE' will be shown.
    21 changes: 21 additions & 0 deletions contracts...1_OverflowTest.sol
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    // SPDX-License-Identifier: GPL-3.0

    pragma solidity >=0.7.0 <0.9.0;

    contract OverflowTest {
    function addOverflow(uint256 x, int256 y) external pure returns (uint256 z) {
    unchecked {
    z = x + uint256(y);
    }
    // require(y >= 0 || z <= x);
    // require(y <= 0 || z >= x);
    }

    function addProtected(uint256 x, int256 y) external pure returns (uint256 z) {
    unchecked {
    z = x + uint256(y);
    }
    require(y >= 0 || z <= x, "hurdle#1");
    require(y <= 0 || z >= x, "hurdle#2");
    }
    }
    76 changes: 76 additions & 0 deletions contracts...2_Vault.sol
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,76 @@
    // SPDX-License-Identifier: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    import "@openzeppelin/contracts/security/Pausable.sol";
    import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
    import "@openzeppelin/contracts/access/AccessControl.sol";

    import "./IVault.sol";
    import "./IAccessControlConfig.sol";


    contract Vault is IVault, Pausable, ReentrancyGuard {

    address accessControlConfig;
    event LogLockXDC(uint256 amount);
    event LogUnlockXDC(address indexed _destination, uint256 amount);

    // modifier onlyOwnerOrGov() {
    // IAccessControlConfig _accessControlConfig = IAccessControlConfig(accessControlConfig);
    // require(
    // _accessControlConfig.hasRole(_accessControlConfig.OWNER_ROLE(), msg.sender) ||
    // _accessControlConfig.hasRole(_accessControlConfig.GOV_ROLE(), msg.sender),
    // "!(ownerRole or govRole)"
    // );
    // _;
    // }

    // modifier onlyVanillaAdapter() {
    // IAccessControlConfig _accessControlConfig = IAccessControlConfig(accessControlConfig);
    // require(
    // _accessControlConfig.hasRole(_accessControlConfig.VANILLA_ADAPTER_ROLE(), msg.sender),
    // "!(ownerRole or govRole)"
    // );
    // _;
    // }

    // constructor(
    // address _accessControlConfig
    // ) {
    // accessControlConfig = _accessControlConfig;
    // }

    function lockXDC(
    bytes calldata data
    ) external payable nonReentrant whenNotPaused {
    emit LogLockXDC(msg.value);
    }

    function unlockXDC(
    address destination,
    uint256 wad,
    bytes calldata data
    ) external nonReentrant whenNotPaused
    // onlyVanillaAdapter
    {
    (bool success2, ) = destination.call{value: wad}("");
    require(success2, "Vault/XDC-withdrawl-fail");
    emit LogUnlockXDC(destination, wad);
    }

    function pause() external
    // onlyOwnerOrGov
    {
    _pause();
    }

    function unpause() external
    // onlyOwnerOrGov
    {
    _unpause();
    }

    receive() external payable {
    }

    }
    9 changes: 9 additions & 0 deletions contracts...Calldata.sol
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    // SPDX-License-Identifier: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    contract Calldata {
    function whatIsTheMeaningOfLife() external pure returns (bytes memory) {
    bytes memory calldataVal = msg.data;
    return calldataVal;
    }
    }
    15 changes: 15 additions & 0 deletions contracts...Deployer.sol
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    // SPDX-License-Identifier: MIT
    pragma solidity 0.8.17;

    contract Deployer {
    function deploy(bytes memory _bytecode) public returns (address) {
    address deployedContract;

    assembly {
    deployedContract := create(0, add(_bytecode, 0x20), mload(_bytecode))
    }

    require(deployedContract != address(0), "Failed to deploy contract");
    return deployedContract;
    }
    }
    8 changes: 8 additions & 0 deletions contracts...DivisionLoss.sol
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    // SPDX-License-Identifier: AGPL-3.0-or-later
    pragma solidity 0.8.18;

    contract DivisionLoss {
    function division(uint256 a, uint256 b) external pure returns (uint256) {
    return a / b;
    }
    }
    1,999 changes: 1,999 additions & 0 deletions contracts...FlashLiquidator.sol
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,1999 @@

    /**
    * SourceUnit: /Users/sangjun.lee/Sangjun/fathom-stablecoin-liquidation-bot/src/smart-contracts/flash-liquidator-contracts/contracts/FlashLiquidator.sol
    */

    ////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    interface IToken {
    function decimals() external view returns (uint8);

    function balanceOf(address) external view returns (uint256);

    function transfer(address, uint256) external returns (bool);

    function transferFrom(address, address, uint256) external returns (bool);

    function approve(address, uint256) external returns (bool);
    }




    /**
    * SourceUnit: /Users/sangjun.lee/Sangjun/fathom-stablecoin-liquidation-bot/src/smart-contracts/flash-liquidator-contracts/contracts/FlashLiquidator.sol
    */

    ////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    interface ILiquidationStrategy {
    function execute(
    bytes32 collateralPoolId,
    uint256 positionDebtShare, // Debt Value [rad]
    uint256 positionCollateralAmount, // Collateral Amount [wad]
    address positionAddress, // Address that will receive any leftover collateral
    uint256 debtShareToBeLiquidated, // The value of debt to be liquidated as specified by the liquidator [rad]
    uint256 maxDebtShareToBeLiquidated, // The maximum value of debt to be liquidated as specified by the liquidator in case of full liquidation for slippage control [rad]
    address _liquidatorAddress,
    address collateralRecipient,
    bytes calldata data
    ) external;
    }




    /**
    * SourceUnit: /Users/sangjun.lee/Sangjun/fathom-stablecoin-liquidation-bot/src/smart-contracts/flash-liquidator-contracts/contracts/FlashLiquidator.sol
    */

    ////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    ////import "../interfaces/IToken.sol";

    interface IGenericTokenAdapter {
    function decimals() external returns (uint256);

    function deposit(address positionAddress, uint256 wad, bytes calldata data) external payable;

    function withdraw(address positionAddress, uint256 wad, bytes calldata data) external;

    function onAdjustPosition(
    address src,
    address dst,
    int256 collateralValue,
    int256 debtShare,
    bytes calldata data
    ) external;

    function onMoveCollateral(address src, address dst, uint256 wad, bytes calldata data) external;

    function collateralPoolId() external view returns (bytes32);

    function collateralToken() external returns (address);
    }




    /**
    * SourceUnit: /Users/sangjun.lee/Sangjun/fathom-stablecoin-liquidation-bot/src/smart-contracts/flash-liquidator-contracts/contracts/FlashLiquidator.sol
    */

    ////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    interface IPriceFeed {
    function readPrice() external view returns (bytes32); // [wad]

    function peekPrice() external returns (bytes32, bool); // [wad]

    function isPriceOk() external view returns (bool);

    function poolId() external view returns (bytes32);

    function setPrice(uint256 _price) external;
    }




    /**
    * SourceUnit: /Users/sangjun.lee/Sangjun/fathom-stablecoin-liquidation-bot/src/smart-contracts/flash-liquidator-contracts/contracts/FlashLiquidator.sol
    */

    ////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    interface IAccessControlConfig {
    function hasRole(bytes32 role, address account) external view returns (bool);

    function OWNER_ROLE() external view returns (bytes32);

    function GOV_ROLE() external view returns (bytes32);

    function PRICE_ORACLE_ROLE() external view returns (bytes32);

    function ADAPTER_ROLE() external view returns (bytes32);

    function LIQUIDATION_ENGINE_ROLE() external view returns (bytes32);

    function STABILITY_FEE_COLLECTOR_ROLE() external view returns (bytes32);

    function SHOW_STOPPER_ROLE() external view returns (bytes32);

    function POSITION_MANAGER_ROLE() external view returns (bytes32);

    function MINTABLE_ROLE() external view returns (bytes32);

    function BOOK_KEEPER_ROLE() external view returns (bytes32);

    function COLLATERAL_MANAGER_ROLE() external view returns (bytes32);
    }




    /**
    * SourceUnit: /Users/sangjun.lee/Sangjun/fathom-stablecoin-liquidation-bot/src/smart-contracts/flash-liquidator-contracts/contracts/FlashLiquidator.sol
    */

    ////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    ////import "./IPriceFeed.sol";
    ////import "./IGenericTokenAdapter.sol";
    ////import "./ILiquidationStrategy.sol";

    interface ICollateralPoolConfig {
    struct CollateralPool {
    uint256 totalDebtShare; // Total debt share of Fathom Stablecoin of this collateral pool [wad]
    uint256 debtAccumulatedRate; // Accumulated rates (equivalent to ibToken Price) [ray]
    uint256 priceWithSafetyMargin; // Price with safety margin (taken into account the Collateral Ratio) [ray]
    uint256 debtCeiling; // Debt ceiling of this collateral pool [rad]
    uint256 debtFloor; // Position debt floor of this collateral pool [rad]
    address priceFeed; // Price Feed
    uint256 liquidationRatio; // Liquidation ratio or Collateral ratio [ray]
    uint256 stabilityFeeRate; // Collateral-specific, per-second stability fee debtAccumulatedRate or mint interest debtAccumulatedRate [ray]
    uint256 lastAccumulationTime; // Time of last call to `collect` [unix epoch time]
    address adapter;
    uint256 closeFactorBps; // Percentage (BPS) of how much of debt could be liquidated in a single liquidation
    uint256 liquidatorIncentiveBps; // Percentage (BPS) of how much additional collateral will be given to the liquidator incentive
    uint256 treasuryFeesBps; // Percentage (BPS) of how much additional collateral will be transferred to the treasury
    address strategy; // Liquidation strategy for this collateral pool
    }

    struct CollateralPoolInfo {
    uint256 debtAccumulatedRate; // [ray]
    uint256 totalDebtShare; // [wad]
    uint256 debtCeiling; // [rad]
    uint256 priceWithSafetyMargin; // [ray]
    uint256 debtFloor; // [rad]
    }

    function setPriceWithSafetyMargin(bytes32 collateralPoolId, uint256 priceWithSafetyMargin) external;

    function collateralPools(bytes32 _collateralPoolId) external view returns (CollateralPool memory);

    function setTotalDebtShare(bytes32 _collateralPoolId, uint256 _totalDebtShare) external;

    function setDebtAccumulatedRate(bytes32 _collateralPoolId, uint256 _debtAccumulatedRate) external;

    function updateLastAccumulationTime(bytes32 _collateralPoolId) external;

    function getTotalDebtShare(bytes32 _collateralPoolId) external view returns (uint256);

    function getDebtAccumulatedRate(bytes32 _collateralPoolId) external view returns (uint256);

    function getPriceWithSafetyMargin(bytes32 _collateralPoolId) external view returns (uint256);

    function getDebtCeiling(bytes32 _collateralPoolId) external view returns (uint256);

    function getDebtFloor(bytes32 _collateralPoolId) external view returns (uint256);

    function getPriceFeed(bytes32 _collateralPoolId) external view returns (address);

    function getLiquidationRatio(bytes32 _collateralPoolId) external view returns (uint256);

    function getStabilityFeeRate(bytes32 _collateralPoolId) external view returns (uint256);

    function getLastAccumulationTime(bytes32 _collateralPoolId) external view returns (uint256);

    function getAdapter(bytes32 _collateralPoolId) external view returns (address);

    function getCloseFactorBps(bytes32 _collateralPoolId) external view returns (uint256);

    function getLiquidatorIncentiveBps(bytes32 _collateralPoolId) external view returns (uint256);

    function getTreasuryFeesBps(bytes32 _collateralPoolId) external view returns (uint256);

    function getStrategy(bytes32 _collateralPoolId) external view returns (address);

    function getCollateralPoolInfo(bytes32 _collateralPoolId) external view returns (CollateralPoolInfo memory);
    }




    /**
    * SourceUnit: /Users/sangjun.lee/Sangjun/fathom-stablecoin-liquidation-bot/src/smart-contracts/flash-liquidator-contracts/contracts/FlashLiquidator.sol
    */

    ////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    ////import "./IToken.sol";

    interface IStablecoin is IToken {
    function mint(address, uint256) external;

    function burn(address, uint256) external;

    function increaseAllowance(address, uint256) external returns (bool);

    function decreaseAllowance(address, uint256) external returns (bool);
    }




    /**
    * SourceUnit: /Users/sangjun.lee/Sangjun/fathom-stablecoin-liquidation-bot/src/smart-contracts/flash-liquidator-contracts/contracts/FlashLiquidator.sol
    */

    ////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    ////import "../interfaces/ICollateralPoolConfig.sol";
    ////import "../interfaces/IAccessControlConfig.sol";

    interface IBookKeeper {
    function collateralToken(bytes32 collateralPoolId, address ownerAddress) external view returns (uint256);

    function addCollateral(
    bytes32 collateralPoolId,
    address ownerAddress,
    int256 amount // [wad]
    ) external;

    function movePosition(
    bytes32 collateralPoolId,
    address src,
    address dst,
    int256 collateralAmount,
    int256 debtShare
    ) external;

    function positionWhitelist(address positionAddress, address whitelistedAddress) external view returns (uint256);

    function adjustPosition(
    bytes32 collateralPoolId,
    address positionAddress,
    address collateralOwner,
    address stablecoinOwner,
    int256 collateralValue,
    int256 debtShare
    ) external;

    function stablecoin(address ownerAddress) external view returns (uint256);

    function positions(
    bytes32 collateralPoolId,
    address positionAddress
    )
    external
    view
    returns (
    uint256 lockedCollateral, // [wad]
    uint256 debtShare // [wad]
    );

    function totalStablecoinIssued() external returns (uint256);

    function moveStablecoin(
    address src,
    address dst,
    uint256 value // [rad]
    ) external;

    function moveCollateral(
    bytes32 collateralPoolId,
    address src,
    address dst,
    uint256 amount // [wad]
    ) external;

    function confiscatePosition(
    bytes32 collateralPoolId,
    address positionAddress,
    address collateralCreditor,
    address stablecoinDebtor,
    int256 collateralAmount, // [wad]
    int256 debtShare // [wad]
    ) external;

    function mintUnbackedStablecoin(
    address from,
    address to,
    uint256 value // [rad]
    ) external;

    function accrueStabilityFee(
    bytes32 collateralPoolId,
    address stabilityFeeRecipient,
    int256 debtAccumulatedRate // [ray]
    ) external;

    function systemBadDebt(address ownerAddress) external view returns (uint256); // [rad]

    function settleSystemBadDebt(uint256 value) external; // [rad]

    function poolStablecoinIssued(bytes32 collateralPoolId) external view returns (uint256); // [rad]

    function whitelist(address toBeWhitelistedAddress) external;

    function blacklist(address toBeBlacklistedAddress) external;

    function collateralPoolConfig() external view returns (address);

    function accessControlConfig() external view returns (address);
    }




    /**
    * SourceUnit: /Users/sangjun.lee/Sangjun/fathom-stablecoin-liquidation-bot/src/smart-contracts/flash-liquidator-contracts/contracts/FlashLiquidator.sol
    */

    ////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    ////import "../interfaces/IBookKeeper.sol";
    ////import "../interfaces/IStablecoin.sol";

    interface IStablecoinAdapter {
    function bookKeeper() external returns (IBookKeeper);

    function stablecoin() external returns (IStablecoin);

    function deposit(address positionAddress, uint256 wad, bytes calldata data) external payable;

    function depositRAD(address positionAddress, uint256 wad, bytes calldata data) external payable;

    function withdraw(address positionAddress, uint256 wad, bytes calldata data) external;
    }




    /**
    * SourceUnit: /Users/sangjun.lee/Sangjun/fathom-stablecoin-liquidation-bot/src/smart-contracts/flash-liquidator-contracts/contracts/FlashLiquidator.sol
    */

    /////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: AGPL-3.0-or-later

    pragma solidity 0.8.17;

    // a library for performing overflow-safe math, courtesy of DappHub (https://github.com/dapphub/ds-math)

    library SafeMath {
    function add(uint x, uint y) internal pure returns (uint z) {
    require((z = x + y) >= x, "ds-math-add-overflow");
    }

    function sub(uint x, uint y) internal pure returns (uint z) {
    require((z = x - y) <= x, "ds-math-sub-underflow");
    }

    function mul(uint x, uint y) internal pure returns (uint z) {
    require(y == 0 || (z = x * y) / y == x, "ds-math-mul-overflow");
    }
    }




    /**
    * SourceUnit: /Users/sangjun.lee/Sangjun/fathom-stablecoin-liquidation-bot/src/smart-contracts/flash-liquidator-contracts/contracts/FlashLiquidator.sol
    */

    ////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    ////import "../interfaces/IStablecoinAdapter.sol";

    interface IStableSwapModule {
    function swapTokenToStablecoin(address _usr, uint256 _tokenAmount) external;

    function swapStablecoinToToken(address _usr, uint256 _tokenAmount) external;

    function depositToken(address _token, uint256 _amount) external;

    function withdrawFees(address _account) external;

    function emergencyWithdraw(address _account) external;

    function feeIn() external view returns (uint256);

    function token() external view returns (address);
    }




    /**
    * SourceUnit: /Users/sangjun.lee/Sangjun/fathom-stablecoin-liquidation-bot/src/smart-contracts/flash-liquidator-contracts/contracts/FlashLiquidator.sol
    */

    /////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    interface IUniswapV2Router01 {
    function factory() external pure returns (address);

    function WETH() external pure returns (address);

    function addLiquidity(
    address tokenA,
    address tokenB,
    uint amountADesired,
    uint amountBDesired,
    uint amountAMin,
    uint amountBMin,
    address to,
    uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);

    function addLiquidityETH(
    address token,
    uint amountTokenDesired,
    uint amountTokenMin,
    uint amountETHMin,
    address to,
    uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);

    function removeLiquidity(
    address tokenA,
    address tokenB,
    uint liquidity,
    uint amountAMin,
    uint amountBMin,
    address to,
    uint deadline
    ) external returns (uint amountA, uint amountB);

    function removeLiquidityETH(
    address token,
    uint liquidity,
    uint amountTokenMin,
    uint amountETHMin,
    address to,
    uint deadline
    ) external returns (uint amountToken, uint amountETH);

    function removeLiquidityWithPermit(
    address tokenA,
    address tokenB,
    uint liquidity,
    uint amountAMin,
    uint amountBMin,
    address to,
    uint deadline,
    bool approveMax,
    uint8 v,
    bytes32 r,
    bytes32 s
    ) external returns (uint amountA, uint amountB);

    function removeLiquidityETHWithPermit(
    address token,
    uint liquidity,
    uint amountTokenMin,
    uint amountETHMin,
    address to,
    uint deadline,
    bool approveMax,
    uint8 v,
    bytes32 r,
    bytes32 s
    ) external returns (uint amountToken, uint amountETH);

    function swapExactTokensForTokens(
    uint amountIn,
    uint amountOutMin,
    address[] calldata path,
    address to,
    uint deadline
    ) external returns (uint[] memory amounts);

    function swapTokensForExactTokens(
    uint amountOut,
    uint amountInMax,
    address[] calldata path,
    address to,
    uint deadline
    ) external returns (uint[] memory amounts);

    function swapExactETHForTokens(
    uint amountOutMin,
    address[] calldata path,
    address to,
    uint deadline
    ) external payable returns (uint[] memory amounts);

    function swapTokensForExactETH(
    uint amountOut,
    uint amountInMax,
    address[] calldata path,
    address to,
    uint deadline
    ) external returns (uint[] memory amounts);

    function swapExactTokensForETH(
    uint amountIn,
    uint amountOutMin,
    address[] calldata path,
    address to,
    uint deadline
    ) external returns (uint[] memory amounts);

    function swapETHForExactTokens(
    uint amountOut,
    address[] calldata path,
    address to,
    uint deadline
    ) external payable returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);

    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);

    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);

    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);

    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
    }




    /**
    * SourceUnit: /Users/sangjun.lee/Sangjun/fathom-stablecoin-liquidation-bot/src/smart-contracts/flash-liquidator-contracts/contracts/FlashLiquidator.sol
    */

    /////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    ////import "../interfaces/IStableSwapModule.sol";
    ////import "../interfaces/IToken.sol";

    ////import "./SafeMath.sol";

    library FathomLibrary {
    using SafeMath for uint;

    uint256 internal constant WAD = 10 ** 18;

    function _getStableSwapTokenToStablecoinAmountOut(
    address _stableSwap,
    uint256 _amountIn
    ) internal view returns (uint256) {
    address token = IStableSwapModule(_stableSwap).token();
    uint256 feeIn = IStableSwapModule(_stableSwap).feeIn();

    uint256 tokenAmount18 = _convertDecimals(_amountIn, IToken(token).decimals(), 18);
    uint256 fee = (tokenAmount18 * feeIn) / WAD;
    uint256 stablecoinAmount = tokenAmount18 - fee;

    return stablecoinAmount;
    }

    function _convertDecimals(
    uint256 _amount,
    uint256 _fromDecimals,
    uint256 _toDecimals
    ) internal pure returns (uint256 result) {
    result = _toDecimals >= _fromDecimals
    ? _amount * (10 ** (_toDecimals - _fromDecimals))
    : _amount / (10 ** (_fromDecimals - _toDecimals));
    }
    }




    /**
    * SourceUnit: /Users/sangjun.lee/Sangjun/fathom-stablecoin-liquidation-bot/src/smart-contracts/flash-liquidator-contracts/contracts/FlashLiquidator.sol
    */

    ////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: MIT
    pragma solidity 0.8.17;

    /**
    * @title Bytes Helper
    * @dev Different operations with bytes
    */
    library BytesHelper {
    /**
    * @notice Get pointer to bytes array
    * @param bts Bytes array
    */
    function _getPointer(bytes memory bts) internal pure returns (uint) {
    uint ptr;
    assembly {
    ptr := bts
    }
    return ptr;
    }

    // MARK: - Bytes operations

    /**
    * @notice Bytes -> bytes array
    * @param data Bytes array
    */
    function _bytesToBytesArray(bytes memory data) internal pure returns (bytes[] memory result) {
    return abi.decode(data, (bytes[]));
    }

    /**
    * @notice Cut first 32 bytes
    * @param data Bytes array
    */
    function _bytesToBytes32(bytes memory data) internal pure returns (bytes32 result) {
    assembly {
    result := mload(add(data, 0x20))
    }
    }

    /**
    * @notice Bytes -> bytes32 array
    * @param data Bytes array
    */
    function _bytesToBytes32Array(bytes memory data) internal pure returns (bytes32[] memory result) {
    return abi.decode(data, (bytes32[]));
    }

    /**
    * @notice bytes value to address
    * @param value Value to be converted to address
    */
    function _bytesToAddress(bytes memory value) internal pure returns (address) {
    return address(uint160(uint(_bytesToBytes32(value))));
    }

    /**
    * @notice Bytes -> address array
    * @param data Bytes array
    */
    function _bytesToAddressArray(bytes memory data) internal pure returns (address[] memory result) {
    return abi.decode(data, (address[]));
    }

    /**
    * @notice bytes value to address
    * @param value Value to be converted to address
    */
    function _bytesToAddressShiftRight(bytes memory value) internal pure returns (address) {
    return address(uint160(uint(_bytesToBytes32(value)) >> 96));
    }

    /**
    * @notice Cut first 32 bytes and converts it to uint
    * @param data Bytes array
    */
    function _bytesToUInt(bytes memory data) internal pure returns (uint result) {
    assembly {
    result := mload(add(data, 0x20))
    }
    }

    /**
    * @notice Bytes -> uint array
    * @param data Bytes array
    */
    function _bytesToUIntArray(bytes memory data) internal pure returns (uint[] memory result) {
    return abi.decode(data, (uint[]));
    }

    /**
    * @notice Converts bytes to uint8
    * @param data Bytes array
    * @param start Start index
    */
    function _bytesToUInt8(bytes memory data, uint start) internal pure returns (uint8 result) {
    require(data.length >= (start + 1), "_bytesToUInt8: Wrong start");

    assembly {
    result := mload(add(add(data, 0x1), start))
    }
    }

    /**
    * @notice Converts bytes to uint8 unsafely
    * @param data Bytes array
    */
    function _bytesToUInt8UNSAFE(bytes memory data) internal pure returns (uint8 result) {
    assembly {
    result := mload(add(data, 0x1))
    }
    }

    /**
    * @notice Cut first 32 bytes and converts it to int
    * @param data Bytes array
    */
    function _bytesToInt(bytes memory data) internal pure returns (int result) {
    assembly {
    result := mload(add(data, 0x20))
    }
    }

    /**
    * @notice Cut first 32 bytes and converts it to int array
    * @param data Bytes array
    */
    function _bytesToIntArray(bytes memory data) internal pure returns (int[] memory result) {
    return abi.decode(data, (int[]));
    }

    /**
    * @notice Converts bytes to bool
    * @param data Bytes array
    */
    function _bytesToBool(bytes memory data) internal pure returns (bool result) {
    return abi.decode(data, (bool));
    }

    /**
    * @notice Converts bytes to bool array
    * @param data Bytes array
    */
    function _bytesToBoolArray(bytes memory data) internal pure returns (bool[] memory result) {
    return abi.decode(data, (bool[]));
    }

    /**
    * @notice Converts bytes to string
    * @param data Bytes array
    */
    function _bytesToString(bytes memory data) internal pure returns (string memory result) {
    return string(data);
    }

    /**
    * @notice Converts bytes to string array
    * @param data Bytes array
    */
    function _bytesToStringArray(bytes memory data) internal pure returns (string[] memory result) {
    return abi.decode(data, (string[]));
    }

    /**
    * @notice Converts 32 bytes to uint
    * @param data Bytes array
    */
    function _asciiBytesToUInt(bytes memory data) internal pure returns (uint result) {
    require(data.length <= 32, "_asciiBytesToUInt: Overflow");

    return _asciiBytesToUIntImpl(data);
    }

    /**
    * @notice Converts 32 bytes to int
    * @param data Bytes array
    */
    function _asciiBytesToInt(bytes memory data) internal pure returns (int result) {
    require(data.length > 0 && data.length <= 32, "_asciiBytesToInt: Overflow");
    bool isNegative = false;
    if (data[0] == "-") {
    isNegative = true;
    data[0] = "0";
    }

    uint uintResult = _asciiBytesToUIntImpl(data);

    return isNegative ? int(uintResult) * -1 : int(uintResult);
    }

    function _asciiBytesToUIntImpl(bytes memory data) internal pure returns (uint result) {
    for (uint i = 0; i < data.length; i++) {
    uint char = uint(uint8(data[i]));
    require(char >= 48 && char <= 57, "_asciiBytesToUInt: Wrong char");
    result = result * 10 + (char - 48);
    }
    return result;
    }

    /**
    * @notice Modified version from https://gitter.im/ethereum/solidity?at=56b085b5eaf741c118d65198
    * @notice In the original there is no necessary conversion in ASCII. Also added leading 0x
    */
    function _bytesToASCIIBytes(bytes memory input) internal pure returns (bytes memory) {
    uint inputLen = input.length;
    bytes memory res = new bytes(inputLen * 2);

    for (uint i = 0; i < inputLen; i++) {
    uint8 symbol = uint8(input[i]);
    (bytes1 high, bytes1 low) = _uint8ConvertToAscii(symbol);
    res[2 * i] = high;
    res[2 * i + 1] = low;
    }

    return abi.encodePacked("0x", res);
    }

    // MARK: - Bytes32 operation

    /**
    * @notice Convert uint type to the bytes32 type
    * @param value Uint to convert
    */
    function _uintToBytes32(uint value) internal pure returns (bytes32 bts) {
    return bytes32(value);
    }

    /**
    * @notice Convert address type to the bytes type shifting left
    * @param addr Address to convert
    */
    function _addressToBytes32ShiftLeft(address addr) internal pure returns (bytes32 bts) {
    return bytes32(uint(uint160(addr)) << 96);
    }

    /**
    * @notice Convert address type to the bytes32 type
    * @param addr Address to convert
    */
    function _addressToBytes32(address addr) internal pure returns (bytes32 bts) {
    return bytes32(uint(uint160(addr)));
    }

    /**
    * @notice Change bytes32 to upper case
    * @param data Bytes
    */
    function _bytes32toUpper(bytes32 data) internal pure returns (bytes32 bts) {
    bytes32 pointer;
    assembly {
    pointer := mload(0x40)
    }
    bytes memory baseBytes = new bytes(32);
    for (uint i = 0; i < 32; i++) {
    bytes1 b1 = data[i];
    if (b1 >= 0x61 && b1 <= 0x7A) {
    b1 = bytes1(uint8(b1) - 32);
    }
    baseBytes[i] = b1;
    }

    assembly {
    bts := mload(add(pointer, 0x20))
    }
    }

    /**
    * @notice Bytes32 value to address
    * @param value Value to be converted to address
    */
    function _bytes32ToAddressShiftRight(bytes32 value) internal pure returns (address) {
    return address(uint160(uint(value) >> 96));
    }

    /**
    * @notice Bytes32 value to address
    * @param value Value to be converted to address
    */
    function _bytes32ToAddress(bytes32 value) internal pure returns (address) {
    return address(uint160(uint(value)));
    }

    /**
    * @notice Extract 32 bytes from the bytes array by provided offset
    * @param input Input bytes
    * @param offset Offset from which will be extracted 32 bytes
    */
    function _extractBytes32(bytes memory input, uint offset) internal pure returns (bytes32 result) {
    require(offset + 32 <= input.length, "_extractBytes32: Wrong offset");
    assembly {
    result := mload(add(add(0x20, input), offset))
    }
    }

    /**
    * @notice Calculates length without empty bytes
    * @param x Value
    */
    function _countPureLengthForBytes32(bytes32 x) internal pure returns (uint) {
    uint charCount = 0;
    for (uint j = 0; j < 32; j++) {
    bytes1 char = bytes1(bytes32(uint(x) << (j * 8)));
    if (char != 0) {
    charCount++;
    }
    }

    return charCount;
    }

    /**
    * @notice removes empty bytes from the 32 bytes value
    * @param x Value to be converted
    * @return trimmed value bytes
    */
    function _trimBytes32(bytes32 x) internal pure returns (bytes memory) {
    bytes memory bytesArray = new bytes(32);
    uint charCount = 0;
    for (uint j = 0; j < 32; j++) {
    bytes1 char = bytes1(bytes32(uint(x) << (j * 8)));
    if (char != 0) {
    bytesArray[charCount] = char;
    charCount++;
    }
    }

    bytes memory bytesTrimmed = new bytes(charCount);
    for (uint j = 0; j < charCount; j++) {
    bytesTrimmed[j] = bytesArray[j];
    }

    return bytesTrimmed;
    }

    // MARK: - To bytes conversions

    /**
    * @notice Convert address type to the bytes type
    * @param addr Address to convert
    */
    function _addressToBytesPacked(address addr) internal pure returns (bytes memory bts) {
    assembly {
    let m := mload(0x40)
    mstore(add(m, 20), xor(0x140000000000000000000000000000000000000000, addr))
    mstore(0x40, add(m, 52))
    bts := m
    }
    }

    /**
    * @notice Convert bytes32 type to the bytes type
    * @param value Bytes32 to convert
    */
    function _bytes32ToBytes(bytes32 value) internal pure returns (bytes memory bts) {
    return abi.encode(value);
    }

    /**
    * @notice Convert bytes32 array type to the bytes type
    * @param value Bytes32 to convert
    */
    function _bytes32ArrayToBytes(bytes32[] memory value) internal pure returns (bytes memory bts) {
    return abi.encode(value);
    }

    /**
    * @notice Convert address type to the bytes type
    * @param addr Address to convert
    */
    function _addressToBytes(address addr) internal pure returns (bytes memory bts) {
    return abi.encode(addr);
    }

    /**
    * @notice Convert address array type to the bytes type
    * @param addr Address to convert
    */
    function _addressArrayToBytes(address[] memory addr) internal pure returns (bytes memory bts) {
    return abi.encode(addr);
    }

    function _addressToBytesShiftLeft(address addr) internal pure returns (bytes memory bts) {
    return abi.encode(_addressToBytes32ShiftLeft(addr));
    }

    /**
    * @notice Converts uint to bytes
    * @param value Uint value
    */
    function _uintToBytes(uint value) internal pure returns (bytes memory) {
    return abi.encode(value);
    }

    /**
    * @notice Converts uint8 to bytes
    * @param value Uint8 value
    */
    function _uint8ToBytes(uint8 value) internal pure returns (bytes memory) {
    return abi.encode(value);
    }

    /**
    * @notice Converts uint array to bytes
    * @param value Uint array value
    */
    function _uintArrayToBytes(uint[] memory value) internal pure returns (bytes memory) {
    return abi.encode(value);
    }

    /**
    * @notice Converts uint array to bytes
    * @param value Uint8 array value
    */
    function _uint8ArrayToBytes(uint8[] memory value) internal pure returns (bytes memory) {
    return abi.encode(value);
    }

    /**
    * @notice Converts int to bytes
    * @param value Int value
    */
    function _intToBytes(int value) internal pure returns (bytes memory) {
    return abi.encode(value);
    }

    /**
    * @notice Converts int array to bytes
    * @param value Int array value
    */
    function _intArrayToBytes(int[] memory value) internal pure returns (bytes memory) {
    return abi.encode(value);
    }

    /**
    * @notice Converts boolean to bytes
    * @param value Boolean value
    */
    function _boolToBytes(bool value) internal pure returns (bytes memory) {
    return abi.encode(value);
    }

    /**
    * @notice Converts boolean array to bytes
    * @param value Boolean array value
    */
    function _boolArrayToBytes(bool[] memory value) internal pure returns (bytes memory) {
    return abi.encode(value);
    }

    /**
    * @notice Converts string to bytes
    * @param value string value
    */
    function _stringToBytes(string memory value) internal pure returns (bytes memory) {
    return bytes(value);
    }

    /**
    * @notice Converts string array to bytes
    * @param value string array value
    */
    function _stringArrayToBytes(string[] memory value) internal pure returns (bytes memory) {
    return abi.encode(value);
    }

    /**
    * @notice Converts bytes array to bytes
    * @param value bytes value
    */
    function _bytesArrayToBytes(bytes[] memory value) internal pure returns (bytes memory) {
    return abi.encode(value);
    }

    /**
    * @notice Original Copyright (c) 2015-2016 Oraclize SRL
    * @notice Original Copyright (c) 2016 Oraclize LTD
    * @notice Modified Copyright (c) 2020 SECURRENCY INC.
    * @dev Converts an unsigned integer to its bytes representation
    * @notice https://github.com/provable-things/ethereum-api/blob/master/oraclizeAPI_0.5.sol#L1045
    * @param num The number to be converted
    * @return Bytes representation of the number
    */
    function _uintToASCIIBytes(uint num) internal pure returns (bytes memory) {
    uint _i = num;
    if (_i == 0) {
    return "0";
    }
    uint j = _i;
    uint len;
    while (j != 0) {
    len++;
    j /= 10;
    }
    bytes memory bstr = new bytes(len);
    while (_i != 0) {
    bstr[len - 1] = bytes1(uint8(48 + (_i % 10)));
    _i /= 10;
    len--;
    }
    return bstr;
    }

    /**
    * @notice Modified version from https://gitter.im/ethereum/solidity?at=56b085b5eaf741c118d65198
    * @notice In the original there is no necessary conversion in ASCII. Also added leading 0x
    */
    function _addressToASCIIBytes(address addr) internal pure returns (bytes memory) {
    bytes memory res = new bytes(40);

    for (uint i = 0; i < 20; i++) {
    uint8 symbol = uint8(uint(uint160(addr)) >> (8 * (19 - i)));

    (bytes1 high, bytes1 low) = _uint8ConvertToAscii(symbol);
    res[2 * i] = high;
    res[2 * i + 1] = low;
    }

    return abi.encodePacked("0x", res);
    }

    /**
    * @notice Converts bytes32 array to ASCII Bytes
    */
    function _bytes32ArrayToASCIIBytes(bytes32[] memory input) internal pure returns (bytes memory) {
    bytes memory result;
    uint length = input.length;

    if (length > 0) {
    result = abi.encodePacked(_bytes32ToASCIIBytes(input[0]));
    for (uint i = 1; i < length; i++) {
    result = abi.encodePacked(result, ", ", _bytes32ToASCIIBytes(input[i]));
    }
    }

    return result;
    }

    /**
    * @notice Modified version from https://gitter.im/ethereum/solidity?at=56b085b5eaf741c118d65198
    * @notice In the original there is no necessary conversion in ASCII. Also added leading 0x
    */
    function _bytes32ToASCIIBytes(bytes32 input) internal pure returns (bytes memory) {
    bytes memory res = new bytes(64);

    for (uint i = 0; i < 32; i++) {
    uint8 symbol = uint8(uint(input) >> (8 * (31 - i)));

    (bytes1 high, bytes1 low) = _uint8ConvertToAscii(symbol);
    res[2 * i] = high;
    res[2 * i + 1] = low;
    }

    return abi.encodePacked("0x", res);
    }

    // MARK: - Slices

    /**
    * @notice Returns slice from bytes with fixed length
    * @param data Bytes array
    * @param start Start index
    * @param length Slice length
    */
    function _getSlice(bytes memory data, uint start, uint length) internal pure returns (bytes memory result) {
    require(data.length >= (start + length), "_getSlice: Wrong start or length");

    assembly {
    switch iszero(length)
    case 0 {
    result := mload(0x40)

    let lengthmod := and(length, 31)

    let mc := add(add(result, lengthmod), mul(0x20, iszero(lengthmod)))
    let end := add(mc, length)

    for {
    let cc := add(add(add(data, lengthmod), mul(0x20, iszero(lengthmod))), start)
    } lt(mc, end) {
    mc := add(mc, 0x20)
    cc := add(cc, 0x20)
    } {
    mstore(mc, mload(cc))
    }

    mstore(result, length)

    mstore(0x40, and(add(mc, 31), not(31)))
    }
    default {
    result := mload(0x40)

    mstore(0x40, add(result, 0x20))
    }
    }
    }

    /**
    * @notice Returns slice of bytes32 array from range
    * @param data Bytes32 array
    * @param start Start index
    * @param end End index
    */
    function _getSliceBytes32(bytes32[] memory data, uint start, uint end) internal pure returns (bytes32[] memory) {
    bytes32[] memory result = new bytes32[](end - start);
    for (uint i = 0; i < end - start; i++) {
    result[i] = data[i + start];
    }
    return result;
    }

    /**
    * @notice Returns slice from range
    * @param data Bytes array
    * @param start Start index
    * @param end End index
    */
    function _getSlice(bytes[] memory data, uint start, uint end) internal pure returns (bytes[] memory) {
    bytes[] memory result = new bytes[](end - start);
    for (uint i = 0; i < end - start; i++) {
    result[i] = data[i + start];
    }
    return result;
    }

    // MARK: - Strings

    /**
    * @notice takes an array of strings and a separator
    * @notice and merge all strings into a single string
    * @param strArray, array containing all the strings to be concatenated
    * @param separator, separator to place between each concatenation
    * @return res string merged with separators
    */
    function _append(string[] memory strArray, string memory separator) internal pure returns (string memory res) {
    uint length = strArray.length;
    if (length > 0) {
    for (uint i = 0; i < length; i++) {
    if (i == 0) {
    res = string(abi.encodePacked(res, strArray[i]));
    } else {
    res = string(abi.encodePacked(res, separator, strArray[i]));
    }
    }
    } else {
    res = "";
    }
    }

    /**
    * @notice takes an array of bytes and a separator
    * @notice and merge all bytes into a single string
    * @param bytesArray, array containing all the bytes to be concatenated
    * @param separator, separator to place between each concatenation
    * @return res string merged with separators
    */
    function _append(bytes[] memory bytesArray, string memory separator) internal pure returns (string memory res) {
    uint length = bytesArray.length;
    if (length > 0) {
    for (uint i = 0; i < length; i++) {
    if (i == 0) {
    res = string(abi.encodePacked(res, string(bytesArray[i])));
    } else {
    res = string(abi.encodePacked(res, separator, string(bytesArray[i])));
    }
    }
    } else {
    res = "";
    }
    }

    // MARK: - Bytes[] values conversions

    /**
    * @notice Converts boolean to bytes array
    * @param value Boolean value
    */
    function _boolToBytesArray(bool value) internal pure returns (bytes[] memory) {
    bytes[] memory bvalue = new bytes[](1);
    bvalue[0] = abi.encodePacked(value);

    return bvalue;
    }

    /**
    * @notice Converts bytes[] value to uint[]
    * @param valuesArray Value to convert
    * @return uint[] value
    */
    function _bytesArrayToUIntArray(bytes[] memory valuesArray) internal pure returns (uint[] memory) {
    uint length = valuesArray.length;
    uint[] memory result = new uint[](length);
    for (uint i = 0; i < length; i++) {
    result[i] = _bytesToUInt(valuesArray[i]);
    }
    return result;
    }

    /**
    * @notice Converts bytes[] value to int[]
    * @param valuesArray Value to convert
    * @return int[] value
    */
    function _bytesArrayToIntArray(bytes[] memory valuesArray) internal pure returns (int[] memory) {
    uint length = valuesArray.length;
    int[] memory result = new int[](length);
    for (uint i = 0; i < length; i++) {
    result[i] = _bytesToInt(valuesArray[i]);
    }
    return result;
    }

    /**
    * @notice Converts bytes[] value to bool[]
    * @param valuesArray Value to convert
    * @return bool[] value
    */
    function _bytesArrayToBoolArray(bytes[] memory valuesArray) internal pure returns (bool[] memory) {
    uint length = valuesArray.length;
    bool[] memory result = new bool[](length);
    for (uint i = 0; i < length; i++) {
    require(valuesArray[i].length == 1, "_bytesArrayToBoolArray: Wrong values length");
    result[i] = (valuesArray[i][0] == bytes1(0x01)) ? true : false;
    }
    return result;
    }

    /**
    * @notice Converts bytes[] value to bytes32[]
    * @param valuesArray Value to convert
    * @return bytes32[] value
    */
    function _bytesArrayToBytes32Array(bytes[] memory valuesArray) internal pure returns (bytes32[] memory) {
    uint length = valuesArray.length;
    bytes32[] memory result = new bytes32[](length);
    for (uint i = 0; i < length; i++) {
    result[i] = _bytesToBytes32(valuesArray[i]);
    }
    return result;
    }

    /**
    * @notice Converts bytes[] value to string[]
    * @param valuesArray Value to convert
    * @return string[] value
    */
    function _bytesArrayToStringArray(bytes[] memory valuesArray) internal pure returns (string[] memory) {
    uint length = valuesArray.length;
    string[] memory result = new string[](length);
    for (uint i = 0; i < length; i++) {
    result[i] = string(valuesArray[i]);
    }
    return result;
    }

    // MARK: - Comparizon
    /**
    * @return bool - true if values are equal
    * @param expectedValue Value expected
    * @param gotValue Value got
    */
    function _isEqual(bytes[] memory expectedValue, bytes[] memory gotValue) internal pure returns (bool) {
    return keccak256(abi.encode(expectedValue)) == keccak256(abi.encode(gotValue));
    }

    // MARK: - Memory manipulations

    /**
    * @dev Adds val to the list
    */
    function _pushBytes(bytes[] memory arr, bytes memory val) internal pure returns (bytes[] memory) {
    uint length = arr.length;
    assembly {
    mstore(arr, add(mload(arr), 1))
    mstore(0x40, add(mload(0x40), 0x32))
    }
    arr[length] = val;
    return arr;
    }

    /**
    * @dev Adds val to the list
    */
    function _pushBytes32(bytes32[] memory arr, bytes32 val) internal pure returns (bytes32[] memory) {
    uint length = arr.length;
    assembly {
    mstore(arr, add(mload(arr), 1))
    mstore(0x40, add(mload(0x40), 0x32))
    }
    arr[length] = val;
    return arr;
    }

    /**
    * @dev Adds val to the list
    */
    function _pushAddress(address[] memory arr, address val) internal pure returns (address[] memory) {
    uint length = arr.length;
    assembly {
    mstore(arr, add(mload(arr), 1))
    mstore(0x40, add(mload(0x40), 0x32))
    }
    arr[length] = val;
    return arr;
    }

    /**
    * @dev Removes val from the list
    */
    function _popBytes(bytes[] memory arr) internal pure returns (bytes[] memory) {
    require(arr.length > 0, "_popByte2: empty");
    assembly {
    mstore(arr, sub(mload(arr), 1))
    }
    return arr;
    }

    /**
    * @dev Removes val from the list
    */
    function _popBytes32(bytes32[] memory arr) internal pure returns (bytes32[] memory) {
    require(arr.length > 0, "_popBytes32: empty");
    assembly {
    mstore(arr, sub(mload(arr), 1))
    }
    return arr;
    }

    /**
    * @dev Removes val from the list
    */
    function _popAddress(address[] memory arr) internal pure returns (address[] memory) {
    require(arr.length > 0, "_popAddress: empty");
    assembly {
    mstore(arr, sub(mload(arr), 1))
    }
    return arr;
    }

    // MARK: - Letters

    /**
    * @notice Converts symbol to acsii
    */
    function _uint8ConvertToAscii(uint8 symbol) private pure returns (bytes1 high, bytes1 low) {
    uint8 _high = symbol / 16;
    uint8 _low = symbol - 16 * _high;

    high = _high < 10 ? bytes1(_high + 0x30) : bytes1(_high + 0x57);
    low = _low < 10 ? bytes1(_low + 0x30) : bytes1(_low + 0x57);
    }
    }




    /**
    * SourceUnit: /Users/sangjun.lee/Sangjun/fathom-stablecoin-liquidation-bot/src/smart-contracts/flash-liquidator-contracts/contracts/FlashLiquidator.sol
    */

    ////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: MIT
    pragma solidity >=0.6.6;

    interface ERC20Interface {
    function balanceOf(address user) external view returns (uint256);
    }

    library SafeToken {
    function myBalance(address token) internal view returns (uint256) {
    return ERC20Interface(token).balanceOf(address(this));
    }

    function balanceOf(address token, address user) internal view returns (uint256) {
    return ERC20Interface(token).balanceOf(user);
    }

    function safeApprove(address token, address to, uint256 value) internal {
    (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value)); // bytes4(keccak256(bytes('approve(address,uint256)')));
    require(success && (data.length == 0 || abi.decode(data, (bool))), "!safeApprove");
    }

    function safeTransfer(address token, address to, uint256 value) internal {
    (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value)); // bytes4(keccak256(bytes('transfer(address,uint256)')));
    require(success && (data.length == 0 || abi.decode(data, (bool))), "!safeTransfer");
    }

    function safeTransferFrom(address token, address from, address to, uint256 value) internal {
    (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value)); // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
    require(success && (data.length == 0 || abi.decode(data, (bool))), "!safeTransferFrom");
    }

    function safeTransferETH(address to, uint256 value) internal {
    (bool success, ) = to.call{ value: value }(new bytes(0));
    require(success, "!safeTransferETH");
    }
    }




    /**
    * SourceUnit: /Users/sangjun.lee/Sangjun/fathom-stablecoin-liquidation-bot/src/smart-contracts/flash-liquidator-contracts/contracts/FlashLiquidator.sol
    */

    ////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: MIT
    pragma solidity 0.8.17;

    interface IERC165 {
    /**
    * @dev Returns true if this contract implements the interface defined by
    * `interfaceId`. See the corresponding
    * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
    * to learn more about how these ids are created.
    *
    * This function call must use less than 30 000 gas.
    */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
    }




    /**
    * SourceUnit: /Users/sangjun.lee/Sangjun/fathom-stablecoin-liquidation-bot/src/smart-contracts/flash-liquidator-contracts/contracts/FlashLiquidator.sol
    */

    ////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    interface IFlashLendingCallee {
    function flashLendingCall(
    address caller,
    uint256 debtValueToRepay, // [rad]
    uint256 collateralAmountToLiquidate, // [wad]
    bytes calldata
    ) external;
    }




    /**
    * SourceUnit: /Users/sangjun.lee/Sangjun/fathom-stablecoin-liquidation-bot/src/smart-contracts/flash-liquidator-contracts/contracts/FlashLiquidator.sol
    */

    /////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: AGPL-3.0-or-later

    pragma solidity >=0.5.0;

    interface IUniswapV2Factory {
    event PairCreated(address indexed token0, address indexed token1, address pair, uint);

    function feeTo() external view returns (address);

    function feeToSetter() external view returns (address);

    function getPair(address tokenA, address tokenB) external view returns (address pair);

    function allPairs(uint) external view returns (address pair);

    function allPairsLength() external view returns (uint);

    function createPair(address tokenA, address tokenB) external returns (address pair);

    function setFeeTo(address) external;

    function setFeeToSetter(address) external;
    }




    /**
    * SourceUnit: /Users/sangjun.lee/Sangjun/fathom-stablecoin-liquidation-bot/src/smart-contracts/flash-liquidator-contracts/contracts/FlashLiquidator.sol
    */

    /////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    ////import "./IUniswapV2Router01.sol";

    interface IUniswapV2Router02 is IUniswapV2Router01 {
    function factory() external pure override returns (address);

    function removeLiquidityETHSupportingFeeOnTransferTokens(
    address token,
    uint liquidity,
    uint amountTokenMin,
    uint amountETHMin,
    address to,
    uint deadline
    ) external returns (uint amountETH);

    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
    address token,
    uint liquidity,
    uint amountTokenMin,
    uint amountETHMin,
    address to,
    uint deadline,
    bool approveMax,
    uint8 v,
    bytes32 r,
    bytes32 s
    ) external returns (uint amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
    uint amountIn,
    uint amountOutMin,
    address[] calldata path,
    address to,
    uint deadline
    ) external;

    function swapExactETHForTokensSupportingFeeOnTransferTokens(
    uint amountOutMin,
    address[] calldata path,
    address to,
    uint deadline
    ) external payable;

    function swapExactTokensForETHSupportingFeeOnTransferTokens(
    uint amountIn,
    uint amountOutMin,
    address[] calldata path,
    address to,
    uint deadline
    ) external;

    function getAmountsOut(
    uint amountIn,
    address[] calldata path
    ) external view override returns (uint[] memory amounts);
    }




    /**
    * SourceUnit: /Users/sangjun.lee/Sangjun/fathom-stablecoin-liquidation-bot/src/smart-contracts/flash-liquidator-contracts/contracts/FlashLiquidator.sol
    */

    /////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: AGPL-3.0-or-later
    pragma solidity >=0.5.0;

    interface IERC20 {
    function approve(address spender, uint value) external returns (bool);

    function balanceOf(address owner) external view returns (uint);

    function transfer(address to, uint value) external returns (bool);

    function allowance(address owner, address spender) external view returns (uint);

    /**
    * @dev Moves `amount` tokens from `from` to `to` 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 from, address to, uint256 amount) external returns (bool);
    }


    /**
    * SourceUnit: /Users/sangjun.lee/Sangjun/fathom-stablecoin-liquidation-bot/src/smart-contracts/flash-liquidator-contracts/contracts/FlashLiquidator.sol
    */

    /////// SPDX-License-Identifier-FLATTEN-SUPPRESS-WARNING: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
    import "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol";
    import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
    import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
    ////import "./interfaces/IERC20.sol";
    ////import "./interfaces/IUniswapV2Router02.sol";
    ////import "./interfaces/IUniswapV2Factory.sol";
    ////import "./interfaces/IFlashLendingCallee.sol";
    ////import "./interfaces/IGenericTokenAdapter.sol";
    ////import "./interfaces/IBookKeeper.sol";
    ////import "./interfaces/IStablecoinAdapter.sol";
    ////import "./interfaces/IERC165.sol";
    ////import "./utils/SafeToken.sol";
    ////import "./libraries/BytesHelper.sol";
    ////import "./libraries/FathomLibrary.sol";

    contract FlashLiquidator is
    OwnableUpgradeable,
    PausableUpgradeable,
    ReentrancyGuardUpgradeable,
    IFlashLendingCallee,
    IERC165
    {
    using SafeToken for address;
    using SafeMathUpgradeable for uint256;
    using BytesHelper for *;

    struct LocalVars {
    address liquidatorAddress;
    IGenericTokenAdapter tokenAdapter;
    IUniswapV2Router02 router;
    }

    event LogFlashLiquidationSuccess(
    address indexed liquidatorAddress,
    uint256 indexed debtValueToRepay,
    uint256 indexed collateralAmountToLiquidate,
    uint256 liquidationProfit,
    uint256 dexAmountOut,
    uint256 stableSwapAmountOut,
    uint256 fundsUsedFromLiquidator,
    address[] path
    );

    // --- Math ---
    uint256 constant WAD = 10 ** 18;
    uint256 constant RAY = 10 ** 27;

    IBookKeeper public bookKeeper;
    IStablecoinAdapter public stablecoinAdapter;
    address public fixedSpreadLiquidationStrategy;
    address public fathomStablecoin;
    address public profitRecipient;
    address public usdToken;
    address public stableSwap;

    function initialize(
    address _bookKeeper,
    address _fathomStablecoin,
    address _stablecoinAdapter,
    address _fixedSpreadLiquidationStrategy,
    address _profitRecipient,
    address _usdToken,
    address _stableSwap
    ) external initializer {
    OwnableUpgradeable.__Ownable_init();
    PausableUpgradeable.__Pausable_init();
    ReentrancyGuardUpgradeable.__ReentrancyGuard_init();

    bookKeeper = IBookKeeper(_bookKeeper);
    fathomStablecoin = _fathomStablecoin;
    stablecoinAdapter = IStablecoinAdapter(_stablecoinAdapter);
    fixedSpreadLiquidationStrategy = _fixedSpreadLiquidationStrategy;
    profitRecipient = _profitRecipient;
    usdToken = _usdToken;
    stableSwap = _stableSwap;
    }

    function pause() external onlyOwner {
    _pause();
    }

    function unpause() external onlyOwner {
    _unpause();
    }

    function flashLendingCall(
    address,
    uint256 _debtValueToRepay, // [rad]
    uint256 _collateralAmountToLiquidate, // [wad]
    bytes calldata data
    ) external override whenNotPaused nonReentrant {
    require(msg.sender == fixedSpreadLiquidationStrategy, "flashLendingCall: invalid sender");

    LocalVars memory _vars;
    (_vars.liquidatorAddress, _vars.tokenAdapter, _vars.router) = abi.decode(
    data,
    (address, IGenericTokenAdapter, IUniswapV2Router02)
    );

    // Retrieve collateral token
    _retrieveCollateral(_vars.tokenAdapter, _collateralAmountToLiquidate);

    uint256 amountNeededToPayDebt = _debtValueToRepay.div(RAY) + 1;

    (address[] memory path, uint256 dexAmountOut, uint256 stableSwapAmountOut) = _computeMostProfitablePath(
    _vars.router,
    _vars.tokenAdapter.collateralToken(),
    _collateralAmountToLiquidate
    );

    // If the most profitable path does not return what we need, still swap for what we can get.
    // The difference will be paid by the liquidator.
    uint256 minAmountOut = dexAmountOut < amountNeededToPayDebt ? dexAmountOut : amountNeededToPayDebt;

    uint256 fathomStablecoinReceived = _sellCollateral(
    _vars.tokenAdapter.collateralToken(),
    path,
    _vars.router,
    _collateralAmountToLiquidate,
    minAmountOut
    );

    // If we didn't receive enough to repay the debt - send the amount we received
    // and the liquidator will try to pay the difference with its own funds.
    uint256 fundsUsedFromLiquidator;
    if (fathomStablecoinReceived < amountNeededToPayDebt) {
    uint256 balance = fathomStablecoin.balanceOf(_vars.liquidatorAddress);
    uint256 remainder = amountNeededToPayDebt - fathomStablecoinReceived;
    if (balance >= remainder) {
    fathomStablecoin.safeTransferFrom(_vars.liquidatorAddress, address(this), remainder);
    fundsUsedFromLiquidator = remainder;
    }
    }

    require(
    fathomStablecoin.balanceOf(address(this)) >= amountNeededToPayDebt,
    "flashLendingCall: not enough to repay debt"
    );

    // Deposit Fathom Stablecoin for liquidatorAddress
    uint256 liquidationProfit = _depositStablecoin(amountNeededToPayDebt, _vars.liquidatorAddress);

    // transfer profit to profit recipient. There may not be any profit in some cases.
    if (liquidationProfit > 0) {
    fathomStablecoin.safeTransfer(profitRecipient, fathomStablecoin.balanceOf(address(this)));
    }

    emit LogFlashLiquidationSuccess(
    _vars.liquidatorAddress,
    _debtValueToRepay,
    _collateralAmountToLiquidate,
    liquidationProfit,
    dexAmountOut,
    stableSwapAmountOut,
    fundsUsedFromLiquidator,
    path
    );
    }

    function _retrieveCollateral(IGenericTokenAdapter _tokenAdapter, uint256 _amount) internal {
    bookKeeper.whitelist(address(_tokenAdapter));
    _tokenAdapter.withdraw(address(this), _amount, abi.encode(address(this)));
    }

    function _computeMostProfitablePath(
    IUniswapV2Router02 _router,
    address _collateralToken,
    uint256 _collateralAmountToLiquidate
    ) internal view returns (address[] memory, uint256, uint256) {
    // DEX (Collateral -> FXD)
    address[] memory path1 = new address[](2);
    path1[0] = _collateralToken;
    path1[1] = fathomStablecoin;
    uint256 scenarioOneAmountOut = _getDexAmountOut(_collateralAmountToLiquidate, path1, _router);

    // DEX (Collateral -> USDT) -> DEX (USDT -> FXD)
    address[] memory path2 = new address[](3);
    path2[0] = _collateralToken;
    path2[1] = usdToken;
    path2[2] = fathomStablecoin;
    uint256 scenarioTwoAmountOut = _getDexAmountOut(_collateralAmountToLiquidate, path2, _router);

    // DEX (Collateral -> USDT) -> Stable Swap (USDT -> FXD)
    address[] memory path3 = new address[](2);
    path3[0] = _collateralToken;
    path3[1] = usdToken;
    uint256 quotedUsdAmountOut = _getDexAmountOut(_collateralAmountToLiquidate, path3, _router);
    uint256 scenarioThreeAmountOut = FathomLibrary._getStableSwapTokenToStablecoinAmountOut(
    stableSwap,
    quotedUsdAmountOut
    );

    if (scenarioOneAmountOut >= scenarioTwoAmountOut && scenarioOneAmountOut >= scenarioThreeAmountOut) {
    // DEX (Collateral -> FXD)
    return (path1, scenarioOneAmountOut, 0);
    } else if (scenarioTwoAmountOut >= scenarioOneAmountOut && scenarioTwoAmountOut >= scenarioThreeAmountOut) {
    // DEX (Collateral -> USDT) -> DEX (USDT -> FXD)
    return (path2, scenarioTwoAmountOut, 0);
    } else {
    // DEX (Collateral -> USDT) -> Stable Swap (USDT -> FXD)
    return (path3, quotedUsdAmountOut, scenarioThreeAmountOut);
    }
    }

    function _getDexAmountOut(
    uint256 _collateralAmountToLiquidate,
    address[] memory _path,
    IUniswapV2Router02 _router
    ) internal view returns (uint256) {
    uint256[] memory amounts = _router.getAmountsOut(_collateralAmountToLiquidate, _path);
    uint256 amountToReceive = amounts[amounts.length - 1];
    return amountToReceive;
    }

    function _sellCollateral(
    address _token,
    address[] memory _path,
    IUniswapV2Router02 _router,
    uint256 _amount,
    uint256 _minAmountOut
    ) internal returns (uint256 receivedAmount) {
    if (_path.length != 0) {
    address _tokencoinAddress = _path[_path.length - 1];
    uint256 _tokencoinBalanceBefore = _tokencoinAddress.balanceOf(address(this));

    // Check if enough FXD will be returned from the DEX to complete flash liquidation
    uint256[] memory amounts = _router.getAmountsOut(_amount, _path);

    uint256 amountToReceive = amounts[amounts.length - 1];

    if (amountToReceive < _minAmountOut) {
    revert(
    string(
    abi.encodePacked(
    " collateralReceived : ",
    string(_token.balanceOf(address(this))._uintToASCIIBytes()),
    " collaterallToSell : ",
    string(_amount._uintToASCIIBytes()),
    " amountNeeded : ",
    string((_minAmountOut)._uintToASCIIBytes()),
    " actualAmountReceived : ",
    string(amountToReceive._uintToASCIIBytes()),
    " output token : ",
    string(_path[_path.length - 1]._addressToASCIIBytes())
    )
    )
    );
    }

    _token.safeApprove(address(_router), type(uint).max);
    _router.swapExactTokensForTokens(
    _amount, // xdc
    _minAmountOut, // fxd
    _path,
    address(this),
    block.timestamp + 1000
    );
    _token.safeApprove(address(_router), 0);

    uint256 _tokencoinBalanceAfter = _tokencoinAddress.balanceOf(address(this));

    receivedAmount = _tokencoinBalanceAfter.sub(_tokencoinBalanceBefore);

    if (_tokencoinAddress == usdToken) {
    receivedAmount = _stableSwapTokenToStablecoin(receivedAmount);
    }
    }
    }

    function _stableSwapTokenToStablecoin(uint256 _usdAmount) internal returns (uint256 stablecoinBalance) {
    // Approve the stable swap module to transfer USD
    IERC20(usdToken).approve(stableSwap, _usdAmount);

    uint256 balanceBefore = IERC20(fathomStablecoin).balanceOf(address(this));

    // Stable swap USD to stablecoin 1:1
    IStableSwapModule(stableSwap).swapTokenToStablecoin(address(this), _usdAmount);

    uint256 balanceAfter = IERC20(fathomStablecoin).balanceOf(address(this));
    stablecoinBalance = balanceAfter.sub(balanceBefore);
    }

    function _depositStablecoin(
    uint256 _amount,
    address _liquidatorAddress
    ) internal returns (uint256 _liquidationProfit) {
    uint256 balanceBefore = fathomStablecoin.myBalance();
    fathomStablecoin.safeApprove(address(stablecoinAdapter), type(uint).max);
    stablecoinAdapter.deposit(_liquidatorAddress, _amount, abi.encode(0));
    fathomStablecoin.safeApprove(address(stablecoinAdapter), 0);
    _liquidationProfit = balanceBefore.sub(_amount);
    }

    function setProfitRecipient(address _profitRecipient) external onlyOwner whenNotPaused {
    profitRecipient = _profitRecipient;
    }

    function supportsInterface(bytes4 _interfaceId) external pure returns (bool) {
    return type(IFlashLendingCallee).interfaceId == _interfaceId;
    }

    fallback() external payable {
    revert();
    }

    receive() external payable {
    revert();
    }
    }

    31 changes: 31 additions & 0 deletions contracts...IAccessControlConfig.sol
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,31 @@
    // SPDX-License-Identifier: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    interface IAccessControlConfig {
    function hasRole(bytes32 role, address account) external view returns (bool);

    function OWNER_ROLE() external view returns (bytes32);

    function GOV_ROLE() external view returns (bytes32);

    function PRICE_ORACLE_ROLE() external view returns (bytes32);

    function ADAPTER_ROLE() external view returns (bytes32);

    function LIQUIDATION_ENGINE_ROLE() external view returns (bytes32);

    function STABILITY_FEE_COLLECTOR_ROLE() external view returns (bytes32);

    function SHOW_STOPPER_ROLE() external view returns (bytes32);

    function POSITION_MANAGER_ROLE() external view returns (bytes32);

    function MINTABLE_ROLE() external view returns (bytes32);

    function BOOK_KEEPER_ROLE() external view returns (bytes32);

    function COLLATERAL_MANAGER_ROLE() external view returns (bytes32);

    function VANILLA_ADAPTER_ROLE() external view returns (bytes32);

    }
    14 changes: 14 additions & 0 deletions contracts...IBookKeeper.sol
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@



    // SPDX-License-Identifier: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    struct Position {
    uint256 lockedCollateral; // Locked collateral inside this position (used for minting) [wad]
    uint256 debtShare; // The debt share of this position or the share amount of minted Fathom Stablecoin [wad]
    }

    interface IERC20 {
    function positions(bytes32 CollateralID, address _owner) external view returns (Position memory);
    }
    7 changes: 7 additions & 0 deletions contracts...ICollateralPoolConfig.sol
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@

    // SPDX-License-Identifier: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    interface IColPoolConfig {
    function getAdapter(bytes32) external view returns(address);
    }
    6 changes: 6 additions & 0 deletions contracts...ICollateralTokenAdapter.sol
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    // SPDX-License-Identifier: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    interface ICollateralTokenAdapter {
    function bookKeeper() external view returns (address);
    }
    7 changes: 7 additions & 0 deletions contracts...ICounter.sol
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@

    // SPDX-License-Identifier: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    interface ICounter {
    function counter() external view returns(uint256);
    }
    9 changes: 9 additions & 0 deletions contracts...IERC20.sol
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@


    // SPDX-License-Identifier: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    interface IERC20 {
    function balanceOf(address _owner) external view returns (uint256);
    function approve(address _spender, uint256 amount) external;
    }
    16 changes: 16 additions & 0 deletions contracts...ILiqEngine.sol
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@


    // SPDX-License-Identifier: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    interface ILiqEngn {
    function liquidate(
    bytes32 _collateralPoolId,
    address _positionAddress,
    uint256 _debtShareToBeLiquidated, // [rad]
    uint256 _maxDebtShareToBeLiquidated, // [wad]
    address _collateralRecipient,
    bytes calldata _data
    ) external;

    }
    7 changes: 7 additions & 0 deletions contracts...IPeekPrice.sol
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@

    // SPDX-License-Identifier: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    interface IPeekPrice {
    function peekPrice() external;
    }
    9 changes: 9 additions & 0 deletions contracts...IPositions.sol
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@

    // SPDX-License-Identifier: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    interface ILiqEngn {
    function positions(
    uint256 _kk
    ) external view returns (address);
    }
    7 changes: 7 additions & 0 deletions contracts...IPriceOracle.sol
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@

    // SPDX-License-Identifier: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    interface PriceOracle {
    function setPrice(bytes32 colId) external;
    }
    6 changes: 6 additions & 0 deletions contracts...IProxyWallet.sol
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    // SPDX-License-Identifier: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    interface IProxyWallet {
    function execute(bytes memory _data) external payable returns (bytes memory _response);
    }
    7 changes: 7 additions & 0 deletions contracts...IProxyWalletRegistry.sol
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    // SPDX-License-Identifier: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    interface IProxyWalletRegistry {
    function build(address owner) external returns (address payable _proxy);
    function proxies(address owner) external view returns (address _proxy);
    }
    8 changes: 8 additions & 0 deletions contracts...IVault.sol
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    // SPDX-License-Identifier: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    interface IVault {
    function lockXDC(bytes calldata data) external payable;

    function unlockXDC(address destination, uint256 wad, bytes calldata data) external;
    }
    9 changes: 9 additions & 0 deletions contracts...IWL.sol
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@

    // SPDX-License-Identifier: AGPL-3.0-or-later
    pragma solidity 0.8.17;

    interface IWL {
    function whitelist(
    uint256 _kk
    ) external view returns (address);
    }
    34 changes: 34 additions & 0 deletions contracts...Test.sol
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    // SPDX-License-Identifier: AGPL-3.0-or-later
    pragma solidity 0.8.18;

    interface IBookKeeper {
    function totalStablecoinIssued() external view returns (uint256);
    }

    contract LittleTest {
    function testRevert(address _bookKeeper) external view returns (uint256) {
    // require(IBookKeeper(_bookKeeper).totalStablecoinIssued() >= 0, "ProxyWalletFactory/invalid-bookKeeper"); // Sanity Check Cal
    require(IBookKeeper(_bookKeeper).totalStablecoinIssued() > 10, "ProxyWalletFactory/invalid-bookKeeper"); // Sanity Check Cal
    return IBookKeeper(_bookKeeper).totalStablecoinIssued();
    }
    }

    contract RightBookKeeper {
    function totalStablecoinIssued() external pure returns (uint256) {
    return 123123123123;
    }
    }


    contract BookKeeperWithNoMethod {
    function NotTotalStablecoinIssued() external pure returns (uint256) {
    return 0;
    }
    }

    contract BookKeeperWithTooSmallNumber {
    function totalStablecoinIssued() external pure returns (uint256) {
    return 5;
    }
    }

    331 changes: 331 additions & 0 deletions contracts...artifacts...BookKeeperWithNoMethod.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,331 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "608060405234801561001057600080fd5b5060b28061001f6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80633f624e3414602d575b600080fd5b60336047565b604051603e91906063565b60405180910390f35b600090565b6000819050919050565b605d81604c565b82525050565b6000602082019050607660008301846056565b9291505056fea264697066735822122058481ccd4342d972b0066c0a4d42e72570e2ef421a192b7b2e57d7f9091e856a64736f6c63430008120033",
    "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0xB2 DUP1 PUSH2 0x1F PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x28 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x3F624E34 EQ PUSH1 0x2D JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x33 PUSH1 0x47 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x3E SWAP2 SWAP1 PUSH1 0x63 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x5D DUP2 PUSH1 0x4C JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH1 0x76 PUSH1 0x0 DUP4 ADD DUP5 PUSH1 0x56 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PC BASEFEE SHR 0xCD NUMBER TIMESTAMP 0xD9 PUSH19 0xB0066C0A4D42E72570E2EF421A192B7B2E57D7 0xF9 MULMOD 0x1E DUP6 PUSH11 0x64736F6C63430008120033 ",
    "sourceMap": "749:133:0:-:0;;;;;;;;;;;;;;;;;;;"
    },
    "deployedBytecode": {
    "functionDebugData": {
    "@NotTotalStablecoinIssued_50": {
    "entryPoint": 71,
    "id": 50,
    "parameterSlots": 0,
    "returnSlots": 1
    },
    "abi_encode_t_uint256_to_t_uint256_fromStack": {
    "entryPoint": 86,
    "id": null,
    "parameterSlots": 2,
    "returnSlots": 0
    },
    "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed": {
    "entryPoint": 99,
    "id": null,
    "parameterSlots": 2,
    "returnSlots": 1
    },
    "cleanup_t_uint256": {
    "entryPoint": 76,
    "id": null,
    "parameterSlots": 1,
    "returnSlots": 1
    }
    },
    "generatedSources": [
    {
    "ast": {
    "nodeType": "YulBlock",
    "src": "0:439:1",
    "statements": [
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "52:32:1",
    "statements": [
    {
    "nodeType": "YulAssignment",
    "src": "62:16:1",
    "value": {
    "name": "value",
    "nodeType": "YulIdentifier",
    "src": "73:5:1"
    },
    "variableNames": [
    {
    "name": "cleaned",
    "nodeType": "YulIdentifier",
    "src": "62:7:1"
    }
    ]
    }
    ]
    },
    "name": "cleanup_t_uint256",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "value",
    "nodeType": "YulTypedName",
    "src": "34:5:1",
    "type": ""
    }
    ],
    "returnVariables": [
    {
    "name": "cleaned",
    "nodeType": "YulTypedName",
    "src": "44:7:1",
    "type": ""
    }
    ],
    "src": "7:77:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "155:53:1",
    "statements": [
    {
    "expression": {
    "arguments": [
    {
    "name": "pos",
    "nodeType": "YulIdentifier",
    "src": "172:3:1"
    },
    {
    "arguments": [
    {
    "name": "value",
    "nodeType": "YulIdentifier",
    "src": "195:5:1"
    }
    ],
    "functionName": {
    "name": "cleanup_t_uint256",
    "nodeType": "YulIdentifier",
    "src": "177:17:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "177:24:1"
    }
    ],
    "functionName": {
    "name": "mstore",
    "nodeType": "YulIdentifier",
    "src": "165:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "165:37:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "165:37:1"
    }
    ]
    },
    "name": "abi_encode_t_uint256_to_t_uint256_fromStack",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "value",
    "nodeType": "YulTypedName",
    "src": "143:5:1",
    "type": ""
    },
    {
    "name": "pos",
    "nodeType": "YulTypedName",
    "src": "150:3:1",
    "type": ""
    }
    ],
    "src": "90:118:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "312:124:1",
    "statements": [
    {
    "nodeType": "YulAssignment",
    "src": "322:26:1",
    "value": {
    "arguments": [
    {
    "name": "headStart",
    "nodeType": "YulIdentifier",
    "src": "334:9:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "345:2:1",
    "type": "",
    "value": "32"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "330:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "330:18:1"
    },
    "variableNames": [
    {
    "name": "tail",
    "nodeType": "YulIdentifier",
    "src": "322:4:1"
    }
    ]
    },
    {
    "expression": {
    "arguments": [
    {
    "name": "value0",
    "nodeType": "YulIdentifier",
    "src": "402:6:1"
    },
    {
    "arguments": [
    {
    "name": "headStart",
    "nodeType": "YulIdentifier",
    "src": "415:9:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "426:1:1",
    "type": "",
    "value": "0"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "411:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "411:17:1"
    }
    ],
    "functionName": {
    "name": "abi_encode_t_uint256_to_t_uint256_fromStack",
    "nodeType": "YulIdentifier",
    "src": "358:43:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "358:71:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "358:71:1"
    }
    ]
    },
    "name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "headStart",
    "nodeType": "YulTypedName",
    "src": "284:9:1",
    "type": ""
    },
    {
    "name": "value0",
    "nodeType": "YulTypedName",
    "src": "296:6:1",
    "type": ""
    }
    ],
    "returnVariables": [
    {
    "name": "tail",
    "nodeType": "YulTypedName",
    "src": "307:4:1",
    "type": ""
    }
    ],
    "src": "214:222:1"
    }
    ]
    },
    "contents": "{\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n}\n",
    "id": 1,
    "language": "Yul",
    "name": "#utility.yul"
    }
    ],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "6080604052348015600f57600080fd5b506004361060285760003560e01c80633f624e3414602d575b600080fd5b60336047565b604051603e91906063565b60405180910390f35b600090565b6000819050919050565b605d81604c565b82525050565b6000602082019050607660008301846056565b9291505056fea264697066735822122058481ccd4342d972b0066c0a4d42e72570e2ef421a192b7b2e57d7f9091e856a64736f6c63430008120033",
    "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x28 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x3F624E34 EQ PUSH1 0x2D JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x33 PUSH1 0x47 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x3E SWAP2 SWAP1 PUSH1 0x63 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x5D DUP2 PUSH1 0x4C JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH1 0x76 PUSH1 0x0 DUP4 ADD DUP5 PUSH1 0x56 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PC BASEFEE SHR 0xCD NUMBER TIMESTAMP 0xD9 PUSH19 0xB0066C0A4D42E72570E2EF421A192B7B2E57D7 0xF9 MULMOD 0x1E DUP6 PUSH11 0x64736F6C63430008120033 ",
    "sourceMap": "749:133:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;787:93;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;846:7;787:93;:::o;7:77:1:-;44:7;73:5;62:16;;7:77;;;:::o;90:118::-;177:24;195:5;177:24;:::i;:::-;172:3;165:37;90:118;;:::o;214:222::-;307:4;345:2;334:9;330:18;322:26;;358:71;426:1;415:9;411:17;402:6;358:71;:::i;:::-;214:222;;;;:::o"
    },
    "gasEstimates": {
    "creation": {
    "codeDepositCost": "35600",
    "executionCost": "87",
    "totalCost": "35687"
    },
    "external": {
    "NotTotalStablecoinIssued()": "307"
    }
    },
    "methodIdentifiers": {
    "NotTotalStablecoinIssued()": "3f624e34"
    }
    },
    "abi": [
    {
    "inputs": [],
    "name": "NotTotalStablecoinIssued",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "pure",
    "type": "function"
    }
    ]
    }
    59 changes: 59 additions & 0 deletions contracts...artifacts...BookKeeperWithNoMethod_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,59 @@
    {
    "compiler": {
    "version": "0.8.18+commit.87f61d96"
    },
    "language": "Solidity",
    "output": {
    "abi": [
    {
    "inputs": [],
    "name": "NotTotalStablecoinIssued",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "pure",
    "type": "function"
    }
    ],
    "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/Test.sol": "BookKeeperWithNoMethod"
    },
    "evmVersion": "paris",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "contracts/Test.sol": {
    "keccak256": "0xc3f79707495880d21109790405fa8b07855e9f85f188c809998f6f97a172d113",
    "license": "AGPL-3.0-or-later",
    "urls": [
    "bzz-raw://2d7b607281ddf2d5541918446a49664929de40900f883e0637867c71b7aca36a",
    "dweb:/ipfs/QmNZQSELRGCpEpBWKnMM1Xh9N7DHq8PE6w3oAsj12WAgyK"
    ]
    }
    },
    "version": 1
    }
    331 changes: 331 additions & 0 deletions contracts...artifacts...BookKeeperWithTooSmallNumber.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,331 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "608060405234801561001057600080fd5b5060b68061001f6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80636f3a3bfc14602d575b600080fd5b60336047565b604051603e91906067565b60405180910390f35b60006005905090565b6000819050919050565b6061816050565b82525050565b6000602082019050607a6000830184605a565b9291505056fea2646970667358221220b8f3ac6cf92899ec2a4559e09ea0f92181e9ae6fdf25cb4e7cdf5ef101d3419c64736f6c63430008120033",
    "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0xB6 DUP1 PUSH2 0x1F PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x28 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x6F3A3BFC EQ PUSH1 0x2D JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x33 PUSH1 0x47 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x3E SWAP2 SWAP1 PUSH1 0x67 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 PUSH1 0x5 SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x61 DUP2 PUSH1 0x50 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH1 0x7A PUSH1 0x0 DUP4 ADD DUP5 PUSH1 0x5A JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xB8 RETURN 0xAC PUSH13 0xF92899EC2A4559E09EA0F92181 0xE9 0xAE PUSH16 0xDF25CB4E7CDF5EF101D3419C64736F6C PUSH4 0x43000812 STOP CALLER ",
    "sourceMap": "884:136:0:-:0;;;;;;;;;;;;;;;;;;;"
    },
    "deployedBytecode": {
    "functionDebugData": {
    "@totalStablecoinIssued_59": {
    "entryPoint": 71,
    "id": 59,
    "parameterSlots": 0,
    "returnSlots": 1
    },
    "abi_encode_t_uint256_to_t_uint256_fromStack": {
    "entryPoint": 90,
    "id": null,
    "parameterSlots": 2,
    "returnSlots": 0
    },
    "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed": {
    "entryPoint": 103,
    "id": null,
    "parameterSlots": 2,
    "returnSlots": 1
    },
    "cleanup_t_uint256": {
    "entryPoint": 80,
    "id": null,
    "parameterSlots": 1,
    "returnSlots": 1
    }
    },
    "generatedSources": [
    {
    "ast": {
    "nodeType": "YulBlock",
    "src": "0:439:1",
    "statements": [
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "52:32:1",
    "statements": [
    {
    "nodeType": "YulAssignment",
    "src": "62:16:1",
    "value": {
    "name": "value",
    "nodeType": "YulIdentifier",
    "src": "73:5:1"
    },
    "variableNames": [
    {
    "name": "cleaned",
    "nodeType": "YulIdentifier",
    "src": "62:7:1"
    }
    ]
    }
    ]
    },
    "name": "cleanup_t_uint256",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "value",
    "nodeType": "YulTypedName",
    "src": "34:5:1",
    "type": ""
    }
    ],
    "returnVariables": [
    {
    "name": "cleaned",
    "nodeType": "YulTypedName",
    "src": "44:7:1",
    "type": ""
    }
    ],
    "src": "7:77:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "155:53:1",
    "statements": [
    {
    "expression": {
    "arguments": [
    {
    "name": "pos",
    "nodeType": "YulIdentifier",
    "src": "172:3:1"
    },
    {
    "arguments": [
    {
    "name": "value",
    "nodeType": "YulIdentifier",
    "src": "195:5:1"
    }
    ],
    "functionName": {
    "name": "cleanup_t_uint256",
    "nodeType": "YulIdentifier",
    "src": "177:17:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "177:24:1"
    }
    ],
    "functionName": {
    "name": "mstore",
    "nodeType": "YulIdentifier",
    "src": "165:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "165:37:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "165:37:1"
    }
    ]
    },
    "name": "abi_encode_t_uint256_to_t_uint256_fromStack",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "value",
    "nodeType": "YulTypedName",
    "src": "143:5:1",
    "type": ""
    },
    {
    "name": "pos",
    "nodeType": "YulTypedName",
    "src": "150:3:1",
    "type": ""
    }
    ],
    "src": "90:118:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "312:124:1",
    "statements": [
    {
    "nodeType": "YulAssignment",
    "src": "322:26:1",
    "value": {
    "arguments": [
    {
    "name": "headStart",
    "nodeType": "YulIdentifier",
    "src": "334:9:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "345:2:1",
    "type": "",
    "value": "32"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "330:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "330:18:1"
    },
    "variableNames": [
    {
    "name": "tail",
    "nodeType": "YulIdentifier",
    "src": "322:4:1"
    }
    ]
    },
    {
    "expression": {
    "arguments": [
    {
    "name": "value0",
    "nodeType": "YulIdentifier",
    "src": "402:6:1"
    },
    {
    "arguments": [
    {
    "name": "headStart",
    "nodeType": "YulIdentifier",
    "src": "415:9:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "426:1:1",
    "type": "",
    "value": "0"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "411:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "411:17:1"
    }
    ],
    "functionName": {
    "name": "abi_encode_t_uint256_to_t_uint256_fromStack",
    "nodeType": "YulIdentifier",
    "src": "358:43:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "358:71:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "358:71:1"
    }
    ]
    },
    "name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "headStart",
    "nodeType": "YulTypedName",
    "src": "284:9:1",
    "type": ""
    },
    {
    "name": "value0",
    "nodeType": "YulTypedName",
    "src": "296:6:1",
    "type": ""
    }
    ],
    "returnVariables": [
    {
    "name": "tail",
    "nodeType": "YulTypedName",
    "src": "307:4:1",
    "type": ""
    }
    ],
    "src": "214:222:1"
    }
    ]
    },
    "contents": "{\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n}\n",
    "id": 1,
    "language": "Yul",
    "name": "#utility.yul"
    }
    ],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "6080604052348015600f57600080fd5b506004361060285760003560e01c80636f3a3bfc14602d575b600080fd5b60336047565b604051603e91906067565b60405180910390f35b60006005905090565b6000819050919050565b6061816050565b82525050565b6000602082019050607a6000830184605a565b9291505056fea2646970667358221220b8f3ac6cf92899ec2a4559e09ea0f92181e9ae6fdf25cb4e7cdf5ef101d3419c64736f6c63430008120033",
    "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x28 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x6F3A3BFC EQ PUSH1 0x2D JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x33 PUSH1 0x47 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x3E SWAP2 SWAP1 PUSH1 0x67 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 PUSH1 0x5 SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x61 DUP2 PUSH1 0x50 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH1 0x7A PUSH1 0x0 DUP4 ADD DUP5 PUSH1 0x5A JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xB8 RETURN 0xAC PUSH13 0xF92899EC2A4559E09EA0F92181 0xE9 0xAE PUSH16 0xDF25CB4E7CDF5EF101D3419C64736F6C PUSH4 0x43000812 STOP CALLER ",
    "sourceMap": "884:136:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;928:90;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;984:7;1010:1;1003:8;;928:90;:::o;7:77:1:-;44:7;73:5;62:16;;7:77;;;:::o;90:118::-;177:24;195:5;177:24;:::i;:::-;172:3;165:37;90:118;;:::o;214:222::-;307:4;345:2;334:9;330:18;322:26;;358:71;426:1;415:9;411:17;402:6;358:71;:::i;:::-;214:222;;;;:::o"
    },
    "gasEstimates": {
    "creation": {
    "codeDepositCost": "36400",
    "executionCost": "87",
    "totalCost": "36487"
    },
    "external": {
    "totalStablecoinIssued()": "315"
    }
    },
    "methodIdentifiers": {
    "totalStablecoinIssued()": "6f3a3bfc"
    }
    },
    "abi": [
    {
    "inputs": [],
    "name": "totalStablecoinIssued",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "pure",
    "type": "function"
    }
    ]
    }
    59 changes: 59 additions & 0 deletions contracts...artifacts...BookKeeperWithTooSmallNumber_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,59 @@
    {
    "compiler": {
    "version": "0.8.18+commit.87f61d96"
    },
    "language": "Solidity",
    "output": {
    "abi": [
    {
    "inputs": [],
    "name": "totalStablecoinIssued",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "pure",
    "type": "function"
    }
    ],
    "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/Test.sol": "BookKeeperWithTooSmallNumber"
    },
    "evmVersion": "paris",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "contracts/Test.sol": {
    "keccak256": "0xc3f79707495880d21109790405fa8b07855e9f85f188c809998f6f97a172d113",
    "license": "AGPL-3.0-or-later",
    "urls": [
    "bzz-raw://2d7b607281ddf2d5541918446a49664929de40900f883e0637867c71b7aca36a",
    "dweb:/ipfs/QmNZQSELRGCpEpBWKnMM1Xh9N7DHq8PE6w3oAsj12WAgyK"
    ]
    }
    },
    "version": 1
    }
    132 changes: 132 additions & 0 deletions contracts...artifacts...BytesHelper.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,132 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122016f683a1ffdb125f55fa82fb0f57f3887f5d7d275f2ad58a52b82e58dbe0507064736f6c63430008110033",
    "opcodes": "PUSH1 0x56 PUSH1 0x50 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x43 JUMPI PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 AND 0xF6 DUP4 LOG1 SELFDESTRUCT 0xDB SLT 0x5F SSTORE STATICCALL DUP3 0xFB 0xF JUMPI RETURN DUP9 PUSH32 0x5D7D275F2AD58A52B82E58DBE0507064736F6C63430008110033000000000000 ",
    "sourceMap": "20083:26050:7:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
    },
    "deployedBytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122016f683a1ffdb125f55fa82fb0f57f3887f5d7d275f2ad58a52b82e58dbe0507064736f6c63430008110033",
    "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 AND 0xF6 DUP4 LOG1 SELFDESTRUCT 0xDB SLT 0x5F SSTORE STATICCALL DUP3 0xFB 0xF JUMPI RETURN DUP9 PUSH32 0x5D7D275F2AD58A52B82E58DBE0507064736F6C63430008110033000000000000 ",
    "sourceMap": "20083:26050:7:-:0;;;;;;;;"
    },
    "gasEstimates": {
    "creation": {
    "codeDepositCost": "17200",
    "executionCost": "97",
    "totalCost": "17297"
    },
    "internal": {
    "_addressArrayToBytes(address[] memory)": "infinite",
    "_addressToASCIIBytes(address)": "infinite",
    "_addressToBytes(address)": "infinite",
    "_addressToBytes32(address)": "infinite",
    "_addressToBytes32ShiftLeft(address)": "infinite",
    "_addressToBytesPacked(address)": "infinite",
    "_addressToBytesShiftLeft(address)": "infinite",
    "_append(bytes memory[] memory,string memory)": "infinite",
    "_append(string memory[] memory,string memory)": "infinite",
    "_asciiBytesToInt(bytes memory)": "infinite",
    "_asciiBytesToUInt(bytes memory)": "infinite",
    "_asciiBytesToUIntImpl(bytes memory)": "infinite",
    "_boolArrayToBytes(bool[] memory)": "infinite",
    "_boolToBytes(bool)": "infinite",
    "_boolToBytesArray(bool)": "infinite",
    "_bytes32ArrayToASCIIBytes(bytes32[] memory)": "infinite",
    "_bytes32ArrayToBytes(bytes32[] memory)": "infinite",
    "_bytes32ToASCIIBytes(bytes32)": "infinite",
    "_bytes32ToAddress(bytes32)": "infinite",
    "_bytes32ToAddressShiftRight(bytes32)": "infinite",
    "_bytes32ToBytes(bytes32)": "infinite",
    "_bytes32toUpper(bytes32)": "infinite",
    "_bytesArrayToBoolArray(bytes memory[] memory)": "infinite",
    "_bytesArrayToBytes(bytes memory[] memory)": "infinite",
    "_bytesArrayToBytes32Array(bytes memory[] memory)": "infinite",
    "_bytesArrayToIntArray(bytes memory[] memory)": "infinite",
    "_bytesArrayToStringArray(bytes memory[] memory)": "infinite",
    "_bytesArrayToUIntArray(bytes memory[] memory)": "infinite",
    "_bytesToASCIIBytes(bytes memory)": "infinite",
    "_bytesToAddress(bytes memory)": "infinite",
    "_bytesToAddressArray(bytes memory)": "infinite",
    "_bytesToAddressShiftRight(bytes memory)": "infinite",
    "_bytesToBool(bytes memory)": "infinite",
    "_bytesToBoolArray(bytes memory)": "infinite",
    "_bytesToBytes32(bytes memory)": "infinite",
    "_bytesToBytes32Array(bytes memory)": "infinite",
    "_bytesToBytesArray(bytes memory)": "infinite",
    "_bytesToInt(bytes memory)": "infinite",
    "_bytesToIntArray(bytes memory)": "infinite",
    "_bytesToString(bytes memory)": "infinite",
    "_bytesToStringArray(bytes memory)": "infinite",
    "_bytesToUInt(bytes memory)": "infinite",
    "_bytesToUInt8(bytes memory,uint256)": "infinite",
    "_bytesToUInt8UNSAFE(bytes memory)": "infinite",
    "_bytesToUIntArray(bytes memory)": "infinite",
    "_countPureLengthForBytes32(bytes32)": "infinite",
    "_extractBytes32(bytes memory,uint256)": "infinite",
    "_getPointer(bytes memory)": "infinite",
    "_getSlice(bytes memory,uint256,uint256)": "infinite",
    "_getSlice(bytes memory[] memory,uint256,uint256)": "infinite",
    "_getSliceBytes32(bytes32[] memory,uint256,uint256)": "infinite",
    "_intArrayToBytes(int256[] memory)": "infinite",
    "_intToBytes(int256)": "infinite",
    "_isEqual(bytes memory[] memory,bytes memory[] memory)": "infinite",
    "_popAddress(address[] memory)": "infinite",
    "_popBytes(bytes memory[] memory)": "infinite",
    "_popBytes32(bytes32[] memory)": "infinite",
    "_pushAddress(address[] memory,address)": "infinite",
    "_pushBytes(bytes memory[] memory,bytes memory)": "infinite",
    "_pushBytes32(bytes32[] memory,bytes32)": "infinite",
    "_stringArrayToBytes(string memory[] memory)": "infinite",
    "_stringToBytes(string memory)": "infinite",
    "_trimBytes32(bytes32)": "infinite",
    "_uint8ArrayToBytes(uint8[] memory)": "infinite",
    "_uint8ConvertToAscii(uint8)": "infinite",
    "_uint8ToBytes(uint8)": "infinite",
    "_uintArrayToBytes(uint256[] memory)": "infinite",
    "_uintToASCIIBytes(uint256)": "infinite",
    "_uintToBytes(uint256)": "infinite",
    "_uintToBytes32(uint256)": "infinite"
    }
    },
    "methodIdentifiers": {}
    },
    "abi": []
    }
    102 changes: 102 additions & 0 deletions contracts...artifacts...BytesHelper_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,102 @@
    {
    "compiler": {
    "version": "0.8.17+commit.8df45f5f"
    },
    "language": "Solidity",
    "output": {
    "abi": [],
    "devdoc": {
    "details": "Different operations with bytes",
    "kind": "dev",
    "methods": {},
    "title": "Bytes Helper",
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/FlashLiquidator.sol": "BytesHelper"
    },
    "evmVersion": "london",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": {
    "keccak256": "0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98",
    "license": "MIT",
    "urls": [
    "bzz-raw://99c8cb3cd19a44bbfb6612605affb7d8b06cee1f6aa9362a37a8672b4f7eeaf8",
    "dweb:/ipfs/QmasyxFDBUp7k5KFgfDWEzM8PYSKEq7GVznzMJ1VxVRF4B"
    ]
    },
    "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": {
    "keccak256": "0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794",
    "license": "MIT",
    "urls": [
    "bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e",
    "dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": {
    "keccak256": "0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250",
    "license": "MIT",
    "urls": [
    "bzz-raw://9c7d1f5e15633ab912b74c2f57e24559e66b03232300d4b27ff0f25bc452ecad",
    "dweb:/ipfs/QmYTJkc1cntYkKQ1Tu11nBcJLakiy93Tjytc4XHELo4GmR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol": {
    "keccak256": "0xb82ef33f43b6b96109687d91b39c94573fdccaaa423fe28e8ba0977b31c023e0",
    "license": "MIT",
    "urls": [
    "bzz-raw://ec9c629f63e66379f9c868a74f971064701cc6e30583872aa653f8b932518025",
    "dweb:/ipfs/QmY4MnZF2VMFwJkAwpdQwxEWA3KcGbNBKEmAVYePMVQWUR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": {
    "keccak256": "0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422",
    "license": "MIT",
    "urls": [
    "bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b",
    "dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": {
    "keccak256": "0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149",
    "license": "MIT",
    "urls": [
    "bzz-raw://d6520943ea55fdf5f0bafb39ed909f64de17051bc954ff3e88c9e5621412c79c",
    "dweb:/ipfs/QmWZ4rAKTQbNG2HxGs46AcTXShsVytKeLs7CUCdCSv5N7a"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol": {
    "keccak256": "0xb1561a6950b1aaa504c8f81b7d46bccfa77ccd10de3eb865cf34b1acd5ad505e",
    "license": "MIT",
    "urls": [
    "bzz-raw://9a56cb91629dacd161be24908fbf94315f3f45dd6fee8dad82b27af853cbc4ee",
    "dweb:/ipfs/QmNfEzdf4NTpxyhzWKAmeDwwSpJ6ZjNizK3GXw3TEuTTgn"
    ]
    },
    "contracts/FlashLiquidator.sol": {
    "keccak256": "0xc25bd5e47e982df9423525f9d200040f9fb38c7452baf49f3c904bf1a4301699",
    "urls": [
    "bzz-raw://31ea053099740751cf3aaa6a606afbdd28c8ad8e13452d008bc3c16732eb6f93",
    "dweb:/ipfs/QmY1nfhF67uDfwfEFZkdFqZMc7i6PzFDY5JTu6oy4HJkUs"
    ]
    }
    },
    "version": 1
    }
    950 changes: 950 additions & 0 deletions contracts...artifacts...Calldata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,950 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "608060405234801561001057600080fd5b50610188806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063650500c114610030575b600080fd5b61003861004e565b6040516100459190610130565b60405180910390f35b6060600080368080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090508091505090565b600081519050919050565b600082825260208201905092915050565b60005b838110156100da5780820151818401526020810190506100bf565b60008484015250505050565b6000601f19601f8301169050919050565b6000610102826100a0565b61010c81856100ab565b935061011c8185602086016100bc565b610125816100e6565b840191505092915050565b6000602082019050818103600083015261014a81846100f7565b90509291505056fea2646970667358221220d8a9785a3a97facdafac2312f9ef2f9467676a5afffa7ee027a92e0c79ab5fc164736f6c63430008110033",
    "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x188 DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x2B JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x650500C1 EQ PUSH2 0x30 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x38 PUSH2 0x4E JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x45 SWAP2 SWAP1 PUSH2 0x130 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x60 PUSH1 0x0 DUP1 CALLDATASIZE DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 DUP2 DUP5 ADD MSTORE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND SWAP1 POP DUP1 DUP4 ADD SWAP3 POP POP POP POP POP POP POP SWAP1 POP DUP1 SWAP2 POP POP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xDA JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0xBF JUMP JUMPDEST PUSH1 0x0 DUP5 DUP5 ADD MSTORE POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x102 DUP3 PUSH2 0xA0 JUMP JUMPDEST PUSH2 0x10C DUP2 DUP6 PUSH2 0xAB JUMP JUMPDEST SWAP4 POP PUSH2 0x11C DUP2 DUP6 PUSH1 0x20 DUP7 ADD PUSH2 0xBC JUMP JUMPDEST PUSH2 0x125 DUP2 PUSH2 0xE6 JUMP JUMPDEST DUP5 ADD SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x14A DUP2 DUP5 PUSH2 0xF7 JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xD8 0xA9 PUSH25 0x5A3A97FACDAFAC2312F9EF2F9467676A5AFFFA7EE027A92E0C PUSH26 0xAB5FC164736F6C63430008110033000000000000000000000000 ",
    "sourceMap": "71:177:0:-:0;;;;;;;;;;;;;;;;;;;"
    },
    "deployedBytecode": {
    "functionDebugData": {
    "@whatIsTheMeaningOfLife_14": {
    "entryPoint": 78,
    "id": 14,
    "parameterSlots": 0,
    "returnSlots": 1
    },
    "abi_encode_t_bytes_memory_ptr_to_t_bytes_memory_ptr_fromStack": {
    "entryPoint": 247,
    "id": null,
    "parameterSlots": 2,
    "returnSlots": 1
    },
    "abi_encode_tuple_t_bytes_memory_ptr__to_t_bytes_memory_ptr__fromStack_reversed": {
    "entryPoint": 304,
    "id": null,
    "parameterSlots": 2,
    "returnSlots": 1
    },
    "array_length_t_bytes_memory_ptr": {
    "entryPoint": 160,
    "id": null,
    "parameterSlots": 1,
    "returnSlots": 1
    },
    "array_storeLengthForEncoding_t_bytes_memory_ptr_fromStack": {
    "entryPoint": 171,
    "id": null,
    "parameterSlots": 2,
    "returnSlots": 1
    },
    "copy_memory_to_memory_with_cleanup": {
    "entryPoint": 188,
    "id": null,
    "parameterSlots": 3,
    "returnSlots": 0
    },
    "round_up_to_mul_of_32": {
    "entryPoint": 230,
    "id": null,
    "parameterSlots": 1,
    "returnSlots": 1
    }
    },
    "generatedSources": [
    {
    "ast": {
    "nodeType": "YulBlock",
    "src": "0:1336:1",
    "statements": [
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "65:40:1",
    "statements": [
    {
    "nodeType": "YulAssignment",
    "src": "76:22:1",
    "value": {
    "arguments": [
    {
    "name": "value",
    "nodeType": "YulIdentifier",
    "src": "92:5:1"
    }
    ],
    "functionName": {
    "name": "mload",
    "nodeType": "YulIdentifier",
    "src": "86:5:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "86:12:1"
    },
    "variableNames": [
    {
    "name": "length",
    "nodeType": "YulIdentifier",
    "src": "76:6:1"
    }
    ]
    }
    ]
    },
    "name": "array_length_t_bytes_memory_ptr",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "value",
    "nodeType": "YulTypedName",
    "src": "48:5:1",
    "type": ""
    }
    ],
    "returnVariables": [
    {
    "name": "length",
    "nodeType": "YulTypedName",
    "src": "58:6:1",
    "type": ""
    }
    ],
    "src": "7:98:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "206:73:1",
    "statements": [
    {
    "expression": {
    "arguments": [
    {
    "name": "pos",
    "nodeType": "YulIdentifier",
    "src": "223:3:1"
    },
    {
    "name": "length",
    "nodeType": "YulIdentifier",
    "src": "228:6:1"
    }
    ],
    "functionName": {
    "name": "mstore",
    "nodeType": "YulIdentifier",
    "src": "216:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "216:19:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "216:19:1"
    },
    {
    "nodeType": "YulAssignment",
    "src": "244:29:1",
    "value": {
    "arguments": [
    {
    "name": "pos",
    "nodeType": "YulIdentifier",
    "src": "263:3:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "268:4:1",
    "type": "",
    "value": "0x20"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "259:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "259:14:1"
    },
    "variableNames": [
    {
    "name": "updated_pos",
    "nodeType": "YulIdentifier",
    "src": "244:11:1"
    }
    ]
    }
    ]
    },
    "name": "array_storeLengthForEncoding_t_bytes_memory_ptr_fromStack",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "pos",
    "nodeType": "YulTypedName",
    "src": "178:3:1",
    "type": ""
    },
    {
    "name": "length",
    "nodeType": "YulTypedName",
    "src": "183:6:1",
    "type": ""
    }
    ],
    "returnVariables": [
    {
    "name": "updated_pos",
    "nodeType": "YulTypedName",
    "src": "194:11:1",
    "type": ""
    }
    ],
    "src": "111:168:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "347:184:1",
    "statements": [
    {
    "nodeType": "YulVariableDeclaration",
    "src": "357:10:1",
    "value": {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "366:1:1",
    "type": "",
    "value": "0"
    },
    "variables": [
    {
    "name": "i",
    "nodeType": "YulTypedName",
    "src": "361:1:1",
    "type": ""
    }
    ]
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "426:63:1",
    "statements": [
    {
    "expression": {
    "arguments": [
    {
    "arguments": [
    {
    "name": "dst",
    "nodeType": "YulIdentifier",
    "src": "451:3:1"
    },
    {
    "name": "i",
    "nodeType": "YulIdentifier",
    "src": "456:1:1"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "447:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "447:11:1"
    },
    {
    "arguments": [
    {
    "arguments": [
    {
    "name": "src",
    "nodeType": "YulIdentifier",
    "src": "470:3:1"
    },
    {
    "name": "i",
    "nodeType": "YulIdentifier",
    "src": "475:1:1"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "466:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "466:11:1"
    }
    ],
    "functionName": {
    "name": "mload",
    "nodeType": "YulIdentifier",
    "src": "460:5:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "460:18:1"
    }
    ],
    "functionName": {
    "name": "mstore",
    "nodeType": "YulIdentifier",
    "src": "440:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "440:39:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "440:39:1"
    }
    ]
    },
    "condition": {
    "arguments": [
    {
    "name": "i",
    "nodeType": "YulIdentifier",
    "src": "387:1:1"
    },
    {
    "name": "length",
    "nodeType": "YulIdentifier",
    "src": "390:6:1"
    }
    ],
    "functionName": {
    "name": "lt",
    "nodeType": "YulIdentifier",
    "src": "384:2:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "384:13:1"
    },
    "nodeType": "YulForLoop",
    "post": {
    "nodeType": "YulBlock",
    "src": "398:19:1",
    "statements": [
    {
    "nodeType": "YulAssignment",
    "src": "400:15:1",
    "value": {
    "arguments": [
    {
    "name": "i",
    "nodeType": "YulIdentifier",
    "src": "409:1:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "412:2:1",
    "type": "",
    "value": "32"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "405:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "405:10:1"
    },
    "variableNames": [
    {
    "name": "i",
    "nodeType": "YulIdentifier",
    "src": "400:1:1"
    }
    ]
    }
    ]
    },
    "pre": {
    "nodeType": "YulBlock",
    "src": "380:3:1",
    "statements": []
    },
    "src": "376:113:1"
    },
    {
    "expression": {
    "arguments": [
    {
    "arguments": [
    {
    "name": "dst",
    "nodeType": "YulIdentifier",
    "src": "509:3:1"
    },
    {
    "name": "length",
    "nodeType": "YulIdentifier",
    "src": "514:6:1"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "505:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "505:16:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "523:1:1",
    "type": "",
    "value": "0"
    }
    ],
    "functionName": {
    "name": "mstore",
    "nodeType": "YulIdentifier",
    "src": "498:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "498:27:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "498:27:1"
    }
    ]
    },
    "name": "copy_memory_to_memory_with_cleanup",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "src",
    "nodeType": "YulTypedName",
    "src": "329:3:1",
    "type": ""
    },
    {
    "name": "dst",
    "nodeType": "YulTypedName",
    "src": "334:3:1",
    "type": ""
    },
    {
    "name": "length",
    "nodeType": "YulTypedName",
    "src": "339:6:1",
    "type": ""
    }
    ],
    "src": "285:246:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "585:54:1",
    "statements": [
    {
    "nodeType": "YulAssignment",
    "src": "595:38:1",
    "value": {
    "arguments": [
    {
    "arguments": [
    {
    "name": "value",
    "nodeType": "YulIdentifier",
    "src": "613:5:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "620:2:1",
    "type": "",
    "value": "31"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "609:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "609:14:1"
    },
    {
    "arguments": [
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "629:2:1",
    "type": "",
    "value": "31"
    }
    ],
    "functionName": {
    "name": "not",
    "nodeType": "YulIdentifier",
    "src": "625:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "625:7:1"
    }
    ],
    "functionName": {
    "name": "and",
    "nodeType": "YulIdentifier",
    "src": "605:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "605:28:1"
    },
    "variableNames": [
    {
    "name": "result",
    "nodeType": "YulIdentifier",
    "src": "595:6:1"
    }
    ]
    }
    ]
    },
    "name": "round_up_to_mul_of_32",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "value",
    "nodeType": "YulTypedName",
    "src": "568:5:1",
    "type": ""
    }
    ],
    "returnVariables": [
    {
    "name": "result",
    "nodeType": "YulTypedName",
    "src": "578:6:1",
    "type": ""
    }
    ],
    "src": "537:102:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "735:283:1",
    "statements": [
    {
    "nodeType": "YulVariableDeclaration",
    "src": "745:52:1",
    "value": {
    "arguments": [
    {
    "name": "value",
    "nodeType": "YulIdentifier",
    "src": "791:5:1"
    }
    ],
    "functionName": {
    "name": "array_length_t_bytes_memory_ptr",
    "nodeType": "YulIdentifier",
    "src": "759:31:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "759:38:1"
    },
    "variables": [
    {
    "name": "length",
    "nodeType": "YulTypedName",
    "src": "749:6:1",
    "type": ""
    }
    ]
    },
    {
    "nodeType": "YulAssignment",
    "src": "806:77:1",
    "value": {
    "arguments": [
    {
    "name": "pos",
    "nodeType": "YulIdentifier",
    "src": "871:3:1"
    },
    {
    "name": "length",
    "nodeType": "YulIdentifier",
    "src": "876:6:1"
    }
    ],
    "functionName": {
    "name": "array_storeLengthForEncoding_t_bytes_memory_ptr_fromStack",
    "nodeType": "YulIdentifier",
    "src": "813:57:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "813:70:1"
    },
    "variableNames": [
    {
    "name": "pos",
    "nodeType": "YulIdentifier",
    "src": "806:3:1"
    }
    ]
    },
    {
    "expression": {
    "arguments": [
    {
    "arguments": [
    {
    "name": "value",
    "nodeType": "YulIdentifier",
    "src": "931:5:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "938:4:1",
    "type": "",
    "value": "0x20"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "927:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "927:16:1"
    },
    {
    "name": "pos",
    "nodeType": "YulIdentifier",
    "src": "945:3:1"
    },
    {
    "name": "length",
    "nodeType": "YulIdentifier",
    "src": "950:6:1"
    }
    ],
    "functionName": {
    "name": "copy_memory_to_memory_with_cleanup",
    "nodeType": "YulIdentifier",
    "src": "892:34:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "892:65:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "892:65:1"
    },
    {
    "nodeType": "YulAssignment",
    "src": "966:46:1",
    "value": {
    "arguments": [
    {
    "name": "pos",
    "nodeType": "YulIdentifier",
    "src": "977:3:1"
    },
    {
    "arguments": [
    {
    "name": "length",
    "nodeType": "YulIdentifier",
    "src": "1004:6:1"
    }
    ],
    "functionName": {
    "name": "round_up_to_mul_of_32",
    "nodeType": "YulIdentifier",
    "src": "982:21:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "982:29:1"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "973:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "973:39:1"
    },
    "variableNames": [
    {
    "name": "end",
    "nodeType": "YulIdentifier",
    "src": "966:3:1"
    }
    ]
    }
    ]
    },
    "name": "abi_encode_t_bytes_memory_ptr_to_t_bytes_memory_ptr_fromStack",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "value",
    "nodeType": "YulTypedName",
    "src": "716:5:1",
    "type": ""
    },
    {
    "name": "pos",
    "nodeType": "YulTypedName",
    "src": "723:3:1",
    "type": ""
    }
    ],
    "returnVariables": [
    {
    "name": "end",
    "nodeType": "YulTypedName",
    "src": "731:3:1",
    "type": ""
    }
    ],
    "src": "645:373:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "1140:193:1",
    "statements": [
    {
    "nodeType": "YulAssignment",
    "src": "1150:26:1",
    "value": {
    "arguments": [
    {
    "name": "headStart",
    "nodeType": "YulIdentifier",
    "src": "1162:9:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "1173:2:1",
    "type": "",
    "value": "32"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "1158:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1158:18:1"
    },
    "variableNames": [
    {
    "name": "tail",
    "nodeType": "YulIdentifier",
    "src": "1150:4:1"
    }
    ]
    },
    {
    "expression": {
    "arguments": [
    {
    "arguments": [
    {
    "name": "headStart",
    "nodeType": "YulIdentifier",
    "src": "1197:9:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "1208:1:1",
    "type": "",
    "value": "0"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "1193:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1193:17:1"
    },
    {
    "arguments": [
    {
    "name": "tail",
    "nodeType": "YulIdentifier",
    "src": "1216:4:1"
    },
    {
    "name": "headStart",
    "nodeType": "YulIdentifier",
    "src": "1222:9:1"
    }
    ],
    "functionName": {
    "name": "sub",
    "nodeType": "YulIdentifier",
    "src": "1212:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1212:20:1"
    }
    ],
    "functionName": {
    "name": "mstore",
    "nodeType": "YulIdentifier",
    "src": "1186:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1186:47:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "1186:47:1"
    },
    {
    "nodeType": "YulAssignment",
    "src": "1242:84:1",
    "value": {
    "arguments": [
    {
    "name": "value0",
    "nodeType": "YulIdentifier",
    "src": "1312:6:1"
    },
    {
    "name": "tail",
    "nodeType": "YulIdentifier",
    "src": "1321:4:1"
    }
    ],
    "functionName": {
    "name": "abi_encode_t_bytes_memory_ptr_to_t_bytes_memory_ptr_fromStack",
    "nodeType": "YulIdentifier",
    "src": "1250:61:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1250:76:1"
    },
    "variableNames": [
    {
    "name": "tail",
    "nodeType": "YulIdentifier",
    "src": "1242:4:1"
    }
    ]
    }
    ]
    },
    "name": "abi_encode_tuple_t_bytes_memory_ptr__to_t_bytes_memory_ptr__fromStack_reversed",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "headStart",
    "nodeType": "YulTypedName",
    "src": "1112:9:1",
    "type": ""
    },
    {
    "name": "value0",
    "nodeType": "YulTypedName",
    "src": "1124:6:1",
    "type": ""
    }
    ],
    "returnVariables": [
    {
    "name": "tail",
    "nodeType": "YulTypedName",
    "src": "1135:4:1",
    "type": ""
    }
    ],
    "src": "1024:309:1"
    }
    ]
    },
    "contents": "{\n\n function array_length_t_bytes_memory_ptr(value) -> length {\n\n length := mload(value)\n\n }\n\n function array_storeLengthForEncoding_t_bytes_memory_ptr_fromStack(pos, length) -> updated_pos {\n mstore(pos, length)\n updated_pos := add(pos, 0x20)\n }\n\n function copy_memory_to_memory_with_cleanup(src, dst, length) {\n let i := 0\n for { } lt(i, length) { i := add(i, 32) }\n {\n mstore(add(dst, i), mload(add(src, i)))\n }\n mstore(add(dst, length), 0)\n }\n\n function round_up_to_mul_of_32(value) -> result {\n result := and(add(value, 31), not(31))\n }\n\n function abi_encode_t_bytes_memory_ptr_to_t_bytes_memory_ptr_fromStack(value, pos) -> end {\n let length := array_length_t_bytes_memory_ptr(value)\n pos := array_storeLengthForEncoding_t_bytes_memory_ptr_fromStack(pos, length)\n copy_memory_to_memory_with_cleanup(add(value, 0x20), pos, length)\n end := add(pos, round_up_to_mul_of_32(length))\n }\n\n function abi_encode_tuple_t_bytes_memory_ptr__to_t_bytes_memory_ptr__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_bytes_memory_ptr_to_t_bytes_memory_ptr_fromStack(value0, tail)\n\n }\n\n}\n",
    "id": 1,
    "language": "Yul",
    "name": "#utility.yul"
    }
    ],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "608060405234801561001057600080fd5b506004361061002b5760003560e01c8063650500c114610030575b600080fd5b61003861004e565b6040516100459190610130565b60405180910390f35b6060600080368080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090508091505090565b600081519050919050565b600082825260208201905092915050565b60005b838110156100da5780820151818401526020810190506100bf565b60008484015250505050565b6000601f19601f8301169050919050565b6000610102826100a0565b61010c81856100ab565b935061011c8185602086016100bc565b610125816100e6565b840191505092915050565b6000602082019050818103600083015261014a81846100f7565b90509291505056fea2646970667358221220d8a9785a3a97facdafac2312f9ef2f9467676a5afffa7ee027a92e0c79ab5fc164736f6c63430008110033",
    "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x2B JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x650500C1 EQ PUSH2 0x30 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x38 PUSH2 0x4E JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x45 SWAP2 SWAP1 PUSH2 0x130 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x60 PUSH1 0x0 DUP1 CALLDATASIZE DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 DUP2 DUP5 ADD MSTORE PUSH1 0x1F NOT PUSH1 0x1F DUP3 ADD AND SWAP1 POP DUP1 DUP4 ADD SWAP3 POP POP POP POP POP POP POP SWAP1 POP DUP1 SWAP2 POP POP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xDA JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0xBF JUMP JUMPDEST PUSH1 0x0 DUP5 DUP5 ADD MSTORE POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x102 DUP3 PUSH2 0xA0 JUMP JUMPDEST PUSH2 0x10C DUP2 DUP6 PUSH2 0xAB JUMP JUMPDEST SWAP4 POP PUSH2 0x11C DUP2 DUP6 PUSH1 0x20 DUP7 ADD PUSH2 0xBC JUMP JUMPDEST PUSH2 0x125 DUP2 PUSH2 0xE6 JUMP JUMPDEST DUP5 ADD SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x14A DUP2 DUP5 PUSH2 0xF7 JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xD8 0xA9 PUSH25 0x5A3A97FACDAFAC2312F9EF2F9467676A5AFFFA7EE027A92E0C PUSH26 0xAB5FC164736F6C63430008110033000000000000000000000000 ",
    "sourceMap": "71:177:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;95:151;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;152:12;176:24;203:8;;176:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;228:11;221:18;;;95:151;:::o;7:98:1:-;58:6;92:5;86:12;76:22;;7:98;;;:::o;111:168::-;194:11;228:6;223:3;216:19;268:4;263:3;259:14;244:29;;111:168;;;;:::o;285:246::-;366:1;376:113;390:6;387:1;384:13;376:113;;;475:1;470:3;466:11;460:18;456:1;451:3;447:11;440:39;412:2;409:1;405:10;400:15;;376:113;;;523:1;514:6;509:3;505:16;498:27;347:184;285:246;;;:::o;537:102::-;578:6;629:2;625:7;620:2;613:5;609:14;605:28;595:38;;537:102;;;:::o;645:373::-;731:3;759:38;791:5;759:38;:::i;:::-;813:70;876:6;871:3;813:70;:::i;:::-;806:77;;892:65;950:6;945:3;938:4;931:5;927:16;892:65;:::i;:::-;982:29;1004:6;982:29;:::i;:::-;977:3;973:39;966:46;;735:283;645:373;;;;:::o;1024:309::-;1135:4;1173:2;1162:9;1158:18;1150:26;;1222:9;1216:4;1212:20;1208:1;1197:9;1193:17;1186:47;1250:76;1321:4;1312:6;1250:76;:::i;:::-;1242:84;;1024:309;;;;:::o"
    },
    "gasEstimates": {
    "creation": {
    "codeDepositCost": "78400",
    "executionCost": "129",
    "totalCost": "78529"
    },
    "external": {
    "whatIsTheMeaningOfLife()": "infinite"
    }
    },
    "methodIdentifiers": {
    "whatIsTheMeaningOfLife()": "650500c1"
    }
    },
    "abi": [
    {
    "inputs": [],
    "name": "whatIsTheMeaningOfLife",
    "outputs": [
    {
    "internalType": "bytes",
    "name": "",
    "type": "bytes"
    }
    ],
    "stateMutability": "pure",
    "type": "function"
    }
    ]
    }
    59 changes: 59 additions & 0 deletions contracts...artifacts...Calldata_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,59 @@
    {
    "compiler": {
    "version": "0.8.17+commit.8df45f5f"
    },
    "language": "Solidity",
    "output": {
    "abi": [
    {
    "inputs": [],
    "name": "whatIsTheMeaningOfLife",
    "outputs": [
    {
    "internalType": "bytes",
    "name": "",
    "type": "bytes"
    }
    ],
    "stateMutability": "pure",
    "type": "function"
    }
    ],
    "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/Calldata.sol": "Calldata"
    },
    "evmVersion": "london",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "contracts/Calldata.sol": {
    "keccak256": "0x901553618fa29db558218ddff32098f5f0633e2fa82f0598221ea8f3d7874b6e",
    "license": "AGPL-3.0-or-later",
    "urls": [
    "bzz-raw://56d584f7b24c48203224c59f63a9d4ea588a6196c7cba6e98251bf77b14103f4",
    "dweb:/ipfs/QmaRsxP18K5J8Qjy5SFzV4FYm9Vmwig7VeV28QQvGVqJAP"
    ]
    }
    },
    "version": 1
    }
    2,486 changes: 2,486 additions & 0 deletions contracts...artifacts...Deployer.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2486 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "608060405234801561001057600080fd5b50610397806100206000396000f3fe608060405234801561001057600080fd5b506004361061002a5760003560e01c80627743601461002f575b600080fd5b6100496004803603810190610044919061023f565b61005f565b60405161005691906102c9565b60405180910390f35b6000808251602084016000f09050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036100dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100d390610341565b60405180910390fd5b80915050919050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61014c82610103565b810181811067ffffffffffffffff8211171561016b5761016a610114565b5b80604052505050565b600061017e6100e5565b905061018a8282610143565b919050565b600067ffffffffffffffff8211156101aa576101a9610114565b5b6101b382610103565b9050602081019050919050565b82818337600083830152505050565b60006101e26101dd8461018f565b610174565b9050828152602081018484840111156101fe576101fd6100fe565b5b6102098482856101c0565b509392505050565b600082601f830112610226576102256100f9565b5b81356102368482602086016101cf565b91505092915050565b600060208284031215610255576102546100ef565b5b600082013567ffffffffffffffff811115610273576102726100f4565b5b61027f84828501610211565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006102b382610288565b9050919050565b6102c3816102a8565b82525050565b60006020820190506102de60008301846102ba565b92915050565b600082825260208201905092915050565b7f4661696c656420746f206465706c6f7920636f6e747261637400000000000000600082015250565b600061032b6019836102e4565b9150610336826102f5565b602082019050919050565b6000602082019050818103600083015261035a8161031e565b905091905056fea2646970667358221220a545d25274233be2e2ebe456b6b3ceb9919a2cbc32d8e44e659adf1bbd26c2bd64736f6c63430008110033",
    "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x397 DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x2A JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH3 0x774360 EQ PUSH2 0x2F JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x49 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x44 SWAP2 SWAP1 PUSH2 0x23F JUMP JUMPDEST PUSH2 0x5F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x56 SWAP2 SWAP1 PUSH2 0x2C9 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 DUP1 DUP3 MLOAD PUSH1 0x20 DUP5 ADD PUSH1 0x0 CREATE SWAP1 POP PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SUB PUSH2 0xDC JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xD3 SWAP1 PUSH2 0x341 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP1 SWAP2 POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x41 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH2 0x14C DUP3 PUSH2 0x103 JUMP JUMPDEST DUP2 ADD DUP2 DUP2 LT PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT OR ISZERO PUSH2 0x16B JUMPI PUSH2 0x16A PUSH2 0x114 JUMP JUMPDEST JUMPDEST DUP1 PUSH1 0x40 MSTORE POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x17E PUSH2 0xE5 JUMP JUMPDEST SWAP1 POP PUSH2 0x18A DUP3 DUP3 PUSH2 0x143 JUMP JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x1AA JUMPI PUSH2 0x1A9 PUSH2 0x114 JUMP JUMPDEST JUMPDEST PUSH2 0x1B3 DUP3 PUSH2 0x103 JUMP JUMPDEST SWAP1 POP PUSH1 0x20 DUP2 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST DUP3 DUP2 DUP4 CALLDATACOPY PUSH1 0x0 DUP4 DUP4 ADD MSTORE POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1E2 PUSH2 0x1DD DUP5 PUSH2 0x18F JUMP JUMPDEST PUSH2 0x174 JUMP JUMPDEST SWAP1 POP DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 ADD DUP5 DUP5 DUP5 ADD GT ISZERO PUSH2 0x1FE JUMPI PUSH2 0x1FD PUSH2 0xFE JUMP JUMPDEST JUMPDEST PUSH2 0x209 DUP5 DUP3 DUP6 PUSH2 0x1C0 JUMP JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x226 JUMPI PUSH2 0x225 PUSH2 0xF9 JUMP JUMPDEST JUMPDEST DUP2 CALLDATALOAD PUSH2 0x236 DUP5 DUP3 PUSH1 0x20 DUP7 ADD PUSH2 0x1CF JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x255 JUMPI PUSH2 0x254 PUSH2 0xEF JUMP JUMPDEST JUMPDEST PUSH1 0x0 DUP3 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x273 JUMPI PUSH2 0x272 PUSH2 0xF4 JUMP JUMPDEST JUMPDEST PUSH2 0x27F DUP5 DUP3 DUP6 ADD PUSH2 0x211 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2B3 DUP3 PUSH2 0x288 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x2C3 DUP2 PUSH2 0x2A8 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x2DE PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x2BA JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x4661696C656420746F206465706C6F7920636F6E747261637400000000000000 PUSH1 0x0 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x32B PUSH1 0x19 DUP4 PUSH2 0x2E4 JUMP JUMPDEST SWAP2 POP PUSH2 0x336 DUP3 PUSH2 0x2F5 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x35A DUP2 PUSH2 0x31E JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xA5 GASLIMIT 0xD2 MSTORE PUSH21 0x233BE2E2EBE456B6B3CEB9919A2CBC32D8E44E659A 0xDF SHL 0xBD 0x26 0xC2 0xBD PUSH5 0x736F6C6343 STOP ADDMOD GT STOP CALLER ",
    "sourceMap": "57:364:0:-:0;;;;;;;;;;;;;;;;;;;"
    },
    "deployedBytecode": {
    "functionDebugData": {
    "@deploy_25": {
    "entryPoint": 95,
    "id": 25,
    "parameterSlots": 1,
    "returnSlots": 1
    },
    "abi_decode_available_length_t_bytes_memory_ptr": {
    "entryPoint": 463,
    "id": null,
    "parameterSlots": 3,
    "returnSlots": 1
    },
    "abi_decode_t_bytes_memory_ptr": {
    "entryPoint": 529,
    "id": null,
    "parameterSlots": 2,
    "returnSlots": 1
    },
    "abi_decode_tuple_t_bytes_memory_ptr": {
    "entryPoint": 575,
    "id": null,
    "parameterSlots": 2,
    "returnSlots": 1
    },
    "abi_encode_t_address_to_t_address_fromStack": {
    "entryPoint": 698,
    "id": null,
    "parameterSlots": 2,
    "returnSlots": 0
    },
    "abi_encode_t_stringliteral_a52efd5fc7abcaedfe6da622199610c9d847c639d1cc33141b93504fb0422dd1_to_t_string_memory_ptr_fromStack": {
    "entryPoint": 798,
    "id": null,
    "parameterSlots": 1,
    "returnSlots": 1
    },
    "abi_encode_tuple_t_address__to_t_address__fromStack_reversed": {
    "entryPoint": 713,
    "id": null,
    "parameterSlots": 2,
    "returnSlots": 1
    },
    "abi_encode_tuple_t_stringliteral_a52efd5fc7abcaedfe6da622199610c9d847c639d1cc33141b93504fb0422dd1__to_t_string_memory_ptr__fromStack_reversed": {
    "entryPoint": 833,
    "id": null,
    "parameterSlots": 1,
    "returnSlots": 1
    },
    "allocate_memory": {
    "entryPoint": 372,
    "id": null,
    "parameterSlots": 1,
    "returnSlots": 1
    },
    "allocate_unbounded": {
    "entryPoint": 229,
    "id": null,
    "parameterSlots": 0,
    "returnSlots": 1
    },
    "array_allocation_size_t_bytes_memory_ptr": {
    "entryPoint": 399,
    "id": null,
    "parameterSlots": 1,
    "returnSlots": 1
    },
    "array_storeLengthForEncoding_t_string_memory_ptr_fromStack": {
    "entryPoint": 740,
    "id": null,
    "parameterSlots": 2,
    "returnSlots": 1
    },
    "cleanup_t_address": {
    "entryPoint": 680,
    "id": null,
    "parameterSlots": 1,
    "returnSlots": 1
    },
    "cleanup_t_uint160": {
    "entryPoint": 648,
    "id": null,
    "parameterSlots": 1,
    "returnSlots": 1
    },
    "copy_calldata_to_memory_with_cleanup": {
    "entryPoint": 448,
    "id": null,
    "parameterSlots": 3,
    "returnSlots": 0
    },
    "finalize_allocation": {
    "entryPoint": 323,
    "id": null,
    "parameterSlots": 2,
    "returnSlots": 0
    },
    "panic_error_0x41": {
    "entryPoint": 276,
    "id": null,
    "parameterSlots": 0,
    "returnSlots": 0
    },
    "revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d": {
    "entryPoint": 249,
    "id": null,
    "parameterSlots": 0,
    "returnSlots": 0
    },
    "revert_error_987264b3b1d58a9c7f8255e93e81c77d86d6299019c33110a076957a3e06e2ae": {
    "entryPoint": 254,
    "id": null,
    "parameterSlots": 0,
    "returnSlots": 0
    },
    "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": {
    "entryPoint": 244,
    "id": null,
    "parameterSlots": 0,
    "returnSlots": 0
    },
    "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": {
    "entryPoint": 239,
    "id": null,
    "parameterSlots": 0,
    "returnSlots": 0
    },
    "round_up_to_mul_of_32": {
    "entryPoint": 259,
    "id": null,
    "parameterSlots": 1,
    "returnSlots": 1
    },
    "store_literal_in_memory_a52efd5fc7abcaedfe6da622199610c9d847c639d1cc33141b93504fb0422dd1": {
    "entryPoint": 757,
    "id": null,
    "parameterSlots": 1,
    "returnSlots": 0
    }
    },
    "generatedSources": [
    {
    "ast": {
    "nodeType": "YulBlock",
    "src": "0:4796:1",
    "statements": [
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "47:35:1",
    "statements": [
    {
    "nodeType": "YulAssignment",
    "src": "57:19:1",
    "value": {
    "arguments": [
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "73:2:1",
    "type": "",
    "value": "64"
    }
    ],
    "functionName": {
    "name": "mload",
    "nodeType": "YulIdentifier",
    "src": "67:5:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "67:9:1"
    },
    "variableNames": [
    {
    "name": "memPtr",
    "nodeType": "YulIdentifier",
    "src": "57:6:1"
    }
    ]
    }
    ]
    },
    "name": "allocate_unbounded",
    "nodeType": "YulFunctionDefinition",
    "returnVariables": [
    {
    "name": "memPtr",
    "nodeType": "YulTypedName",
    "src": "40:6:1",
    "type": ""
    }
    ],
    "src": "7:75:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "177:28:1",
    "statements": [
    {
    "expression": {
    "arguments": [
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "194:1:1",
    "type": "",
    "value": "0"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "197:1:1",
    "type": "",
    "value": "0"
    }
    ],
    "functionName": {
    "name": "revert",
    "nodeType": "YulIdentifier",
    "src": "187:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "187:12:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "187:12:1"
    }
    ]
    },
    "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
    "nodeType": "YulFunctionDefinition",
    "src": "88:117:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "300:28:1",
    "statements": [
    {
    "expression": {
    "arguments": [
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "317:1:1",
    "type": "",
    "value": "0"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "320:1:1",
    "type": "",
    "value": "0"
    }
    ],
    "functionName": {
    "name": "revert",
    "nodeType": "YulIdentifier",
    "src": "310:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "310:12:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "310:12:1"
    }
    ]
    },
    "name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
    "nodeType": "YulFunctionDefinition",
    "src": "211:117:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "423:28:1",
    "statements": [
    {
    "expression": {
    "arguments": [
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "440:1:1",
    "type": "",
    "value": "0"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "443:1:1",
    "type": "",
    "value": "0"
    }
    ],
    "functionName": {
    "name": "revert",
    "nodeType": "YulIdentifier",
    "src": "433:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "433:12:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "433:12:1"
    }
    ]
    },
    "name": "revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d",
    "nodeType": "YulFunctionDefinition",
    "src": "334:117:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "546:28:1",
    "statements": [
    {
    "expression": {
    "arguments": [
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "563:1:1",
    "type": "",
    "value": "0"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "566:1:1",
    "type": "",
    "value": "0"
    }
    ],
    "functionName": {
    "name": "revert",
    "nodeType": "YulIdentifier",
    "src": "556:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "556:12:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "556:12:1"
    }
    ]
    },
    "name": "revert_error_987264b3b1d58a9c7f8255e93e81c77d86d6299019c33110a076957a3e06e2ae",
    "nodeType": "YulFunctionDefinition",
    "src": "457:117:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "628:54:1",
    "statements": [
    {
    "nodeType": "YulAssignment",
    "src": "638:38:1",
    "value": {
    "arguments": [
    {
    "arguments": [
    {
    "name": "value",
    "nodeType": "YulIdentifier",
    "src": "656:5:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "663:2:1",
    "type": "",
    "value": "31"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "652:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "652:14:1"
    },
    {
    "arguments": [
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "672:2:1",
    "type": "",
    "value": "31"
    }
    ],
    "functionName": {
    "name": "not",
    "nodeType": "YulIdentifier",
    "src": "668:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "668:7:1"
    }
    ],
    "functionName": {
    "name": "and",
    "nodeType": "YulIdentifier",
    "src": "648:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "648:28:1"
    },
    "variableNames": [
    {
    "name": "result",
    "nodeType": "YulIdentifier",
    "src": "638:6:1"
    }
    ]
    }
    ]
    },
    "name": "round_up_to_mul_of_32",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "value",
    "nodeType": "YulTypedName",
    "src": "611:5:1",
    "type": ""
    }
    ],
    "returnVariables": [
    {
    "name": "result",
    "nodeType": "YulTypedName",
    "src": "621:6:1",
    "type": ""
    }
    ],
    "src": "580:102:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "716:152:1",
    "statements": [
    {
    "expression": {
    "arguments": [
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "733:1:1",
    "type": "",
    "value": "0"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "736:77:1",
    "type": "",
    "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856"
    }
    ],
    "functionName": {
    "name": "mstore",
    "nodeType": "YulIdentifier",
    "src": "726:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "726:88:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "726:88:1"
    },
    {
    "expression": {
    "arguments": [
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "830:1:1",
    "type": "",
    "value": "4"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "833:4:1",
    "type": "",
    "value": "0x41"
    }
    ],
    "functionName": {
    "name": "mstore",
    "nodeType": "YulIdentifier",
    "src": "823:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "823:15:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "823:15:1"
    },
    {
    "expression": {
    "arguments": [
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "854:1:1",
    "type": "",
    "value": "0"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "857:4:1",
    "type": "",
    "value": "0x24"
    }
    ],
    "functionName": {
    "name": "revert",
    "nodeType": "YulIdentifier",
    "src": "847:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "847:15:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "847:15:1"
    }
    ]
    },
    "name": "panic_error_0x41",
    "nodeType": "YulFunctionDefinition",
    "src": "688:180:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "917:238:1",
    "statements": [
    {
    "nodeType": "YulVariableDeclaration",
    "src": "927:58:1",
    "value": {
    "arguments": [
    {
    "name": "memPtr",
    "nodeType": "YulIdentifier",
    "src": "949:6:1"
    },
    {
    "arguments": [
    {
    "name": "size",
    "nodeType": "YulIdentifier",
    "src": "979:4:1"
    }
    ],
    "functionName": {
    "name": "round_up_to_mul_of_32",
    "nodeType": "YulIdentifier",
    "src": "957:21:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "957:27:1"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "945:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "945:40:1"
    },
    "variables": [
    {
    "name": "newFreePtr",
    "nodeType": "YulTypedName",
    "src": "931:10:1",
    "type": ""
    }
    ]
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "1096:22:1",
    "statements": [
    {
    "expression": {
    "arguments": [],
    "functionName": {
    "name": "panic_error_0x41",
    "nodeType": "YulIdentifier",
    "src": "1098:16:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1098:18:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "1098:18:1"
    }
    ]
    },
    "condition": {
    "arguments": [
    {
    "arguments": [
    {
    "name": "newFreePtr",
    "nodeType": "YulIdentifier",
    "src": "1039:10:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "1051:18:1",
    "type": "",
    "value": "0xffffffffffffffff"
    }
    ],
    "functionName": {
    "name": "gt",
    "nodeType": "YulIdentifier",
    "src": "1036:2:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1036:34:1"
    },
    {
    "arguments": [
    {
    "name": "newFreePtr",
    "nodeType": "YulIdentifier",
    "src": "1075:10:1"
    },
    {
    "name": "memPtr",
    "nodeType": "YulIdentifier",
    "src": "1087:6:1"
    }
    ],
    "functionName": {
    "name": "lt",
    "nodeType": "YulIdentifier",
    "src": "1072:2:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1072:22:1"
    }
    ],
    "functionName": {
    "name": "or",
    "nodeType": "YulIdentifier",
    "src": "1033:2:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1033:62:1"
    },
    "nodeType": "YulIf",
    "src": "1030:88:1"
    },
    {
    "expression": {
    "arguments": [
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "1134:2:1",
    "type": "",
    "value": "64"
    },
    {
    "name": "newFreePtr",
    "nodeType": "YulIdentifier",
    "src": "1138:10:1"
    }
    ],
    "functionName": {
    "name": "mstore",
    "nodeType": "YulIdentifier",
    "src": "1127:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1127:22:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "1127:22:1"
    }
    ]
    },
    "name": "finalize_allocation",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "memPtr",
    "nodeType": "YulTypedName",
    "src": "903:6:1",
    "type": ""
    },
    {
    "name": "size",
    "nodeType": "YulTypedName",
    "src": "911:4:1",
    "type": ""
    }
    ],
    "src": "874:281:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "1202:88:1",
    "statements": [
    {
    "nodeType": "YulAssignment",
    "src": "1212:30:1",
    "value": {
    "arguments": [],
    "functionName": {
    "name": "allocate_unbounded",
    "nodeType": "YulIdentifier",
    "src": "1222:18:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1222:20:1"
    },
    "variableNames": [
    {
    "name": "memPtr",
    "nodeType": "YulIdentifier",
    "src": "1212:6:1"
    }
    ]
    },
    {
    "expression": {
    "arguments": [
    {
    "name": "memPtr",
    "nodeType": "YulIdentifier",
    "src": "1271:6:1"
    },
    {
    "name": "size",
    "nodeType": "YulIdentifier",
    "src": "1279:4:1"
    }
    ],
    "functionName": {
    "name": "finalize_allocation",
    "nodeType": "YulIdentifier",
    "src": "1251:19:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1251:33:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "1251:33:1"
    }
    ]
    },
    "name": "allocate_memory",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "size",
    "nodeType": "YulTypedName",
    "src": "1186:4:1",
    "type": ""
    }
    ],
    "returnVariables": [
    {
    "name": "memPtr",
    "nodeType": "YulTypedName",
    "src": "1195:6:1",
    "type": ""
    }
    ],
    "src": "1161:129:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "1362:241:1",
    "statements": [
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "1467:22:1",
    "statements": [
    {
    "expression": {
    "arguments": [],
    "functionName": {
    "name": "panic_error_0x41",
    "nodeType": "YulIdentifier",
    "src": "1469:16:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1469:18:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "1469:18:1"
    }
    ]
    },
    "condition": {
    "arguments": [
    {
    "name": "length",
    "nodeType": "YulIdentifier",
    "src": "1439:6:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "1447:18:1",
    "type": "",
    "value": "0xffffffffffffffff"
    }
    ],
    "functionName": {
    "name": "gt",
    "nodeType": "YulIdentifier",
    "src": "1436:2:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1436:30:1"
    },
    "nodeType": "YulIf",
    "src": "1433:56:1"
    },
    {
    "nodeType": "YulAssignment",
    "src": "1499:37:1",
    "value": {
    "arguments": [
    {
    "name": "length",
    "nodeType": "YulIdentifier",
    "src": "1529:6:1"
    }
    ],
    "functionName": {
    "name": "round_up_to_mul_of_32",
    "nodeType": "YulIdentifier",
    "src": "1507:21:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1507:29:1"
    },
    "variableNames": [
    {
    "name": "size",
    "nodeType": "YulIdentifier",
    "src": "1499:4:1"
    }
    ]
    },
    {
    "nodeType": "YulAssignment",
    "src": "1573:23:1",
    "value": {
    "arguments": [
    {
    "name": "size",
    "nodeType": "YulIdentifier",
    "src": "1585:4:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "1591:4:1",
    "type": "",
    "value": "0x20"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "1581:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1581:15:1"
    },
    "variableNames": [
    {
    "name": "size",
    "nodeType": "YulIdentifier",
    "src": "1573:4:1"
    }
    ]
    }
    ]
    },
    "name": "array_allocation_size_t_bytes_memory_ptr",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "length",
    "nodeType": "YulTypedName",
    "src": "1346:6:1",
    "type": ""
    }
    ],
    "returnVariables": [
    {
    "name": "size",
    "nodeType": "YulTypedName",
    "src": "1357:4:1",
    "type": ""
    }
    ],
    "src": "1296:307:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "1673:82:1",
    "statements": [
    {
    "expression": {
    "arguments": [
    {
    "name": "dst",
    "nodeType": "YulIdentifier",
    "src": "1696:3:1"
    },
    {
    "name": "src",
    "nodeType": "YulIdentifier",
    "src": "1701:3:1"
    },
    {
    "name": "length",
    "nodeType": "YulIdentifier",
    "src": "1706:6:1"
    }
    ],
    "functionName": {
    "name": "calldatacopy",
    "nodeType": "YulIdentifier",
    "src": "1683:12:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1683:30:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "1683:30:1"
    },
    {
    "expression": {
    "arguments": [
    {
    "arguments": [
    {
    "name": "dst",
    "nodeType": "YulIdentifier",
    "src": "1733:3:1"
    },
    {
    "name": "length",
    "nodeType": "YulIdentifier",
    "src": "1738:6:1"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "1729:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1729:16:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "1747:1:1",
    "type": "",
    "value": "0"
    }
    ],
    "functionName": {
    "name": "mstore",
    "nodeType": "YulIdentifier",
    "src": "1722:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1722:27:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "1722:27:1"
    }
    ]
    },
    "name": "copy_calldata_to_memory_with_cleanup",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "src",
    "nodeType": "YulTypedName",
    "src": "1655:3:1",
    "type": ""
    },
    {
    "name": "dst",
    "nodeType": "YulTypedName",
    "src": "1660:3:1",
    "type": ""
    },
    {
    "name": "length",
    "nodeType": "YulTypedName",
    "src": "1665:6:1",
    "type": ""
    }
    ],
    "src": "1609:146:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "1844:340:1",
    "statements": [
    {
    "nodeType": "YulAssignment",
    "src": "1854:74:1",
    "value": {
    "arguments": [
    {
    "arguments": [
    {
    "name": "length",
    "nodeType": "YulIdentifier",
    "src": "1920:6:1"
    }
    ],
    "functionName": {
    "name": "array_allocation_size_t_bytes_memory_ptr",
    "nodeType": "YulIdentifier",
    "src": "1879:40:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1879:48:1"
    }
    ],
    "functionName": {
    "name": "allocate_memory",
    "nodeType": "YulIdentifier",
    "src": "1863:15:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1863:65:1"
    },
    "variableNames": [
    {
    "name": "array",
    "nodeType": "YulIdentifier",
    "src": "1854:5:1"
    }
    ]
    },
    {
    "expression": {
    "arguments": [
    {
    "name": "array",
    "nodeType": "YulIdentifier",
    "src": "1944:5:1"
    },
    {
    "name": "length",
    "nodeType": "YulIdentifier",
    "src": "1951:6:1"
    }
    ],
    "functionName": {
    "name": "mstore",
    "nodeType": "YulIdentifier",
    "src": "1937:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1937:21:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "1937:21:1"
    },
    {
    "nodeType": "YulVariableDeclaration",
    "src": "1967:27:1",
    "value": {
    "arguments": [
    {
    "name": "array",
    "nodeType": "YulIdentifier",
    "src": "1982:5:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "1989:4:1",
    "type": "",
    "value": "0x20"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "1978:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1978:16:1"
    },
    "variables": [
    {
    "name": "dst",
    "nodeType": "YulTypedName",
    "src": "1971:3:1",
    "type": ""
    }
    ]
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "2032:83:1",
    "statements": [
    {
    "expression": {
    "arguments": [],
    "functionName": {
    "name": "revert_error_987264b3b1d58a9c7f8255e93e81c77d86d6299019c33110a076957a3e06e2ae",
    "nodeType": "YulIdentifier",
    "src": "2034:77:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "2034:79:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "2034:79:1"
    }
    ]
    },
    "condition": {
    "arguments": [
    {
    "arguments": [
    {
    "name": "src",
    "nodeType": "YulIdentifier",
    "src": "2013:3:1"
    },
    {
    "name": "length",
    "nodeType": "YulIdentifier",
    "src": "2018:6:1"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "2009:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "2009:16:1"
    },
    {
    "name": "end",
    "nodeType": "YulIdentifier",
    "src": "2027:3:1"
    }
    ],
    "functionName": {
    "name": "gt",
    "nodeType": "YulIdentifier",
    "src": "2006:2:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "2006:25:1"
    },
    "nodeType": "YulIf",
    "src": "2003:112:1"
    },
    {
    "expression": {
    "arguments": [
    {
    "name": "src",
    "nodeType": "YulIdentifier",
    "src": "2161:3:1"
    },
    {
    "name": "dst",
    "nodeType": "YulIdentifier",
    "src": "2166:3:1"
    },
    {
    "name": "length",
    "nodeType": "YulIdentifier",
    "src": "2171:6:1"
    }
    ],
    "functionName": {
    "name": "copy_calldata_to_memory_with_cleanup",
    "nodeType": "YulIdentifier",
    "src": "2124:36:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "2124:54:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "2124:54:1"
    }
    ]
    },
    "name": "abi_decode_available_length_t_bytes_memory_ptr",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "src",
    "nodeType": "YulTypedName",
    "src": "1817:3:1",
    "type": ""
    },
    {
    "name": "length",
    "nodeType": "YulTypedName",
    "src": "1822:6:1",
    "type": ""
    },
    {
    "name": "end",
    "nodeType": "YulTypedName",
    "src": "1830:3:1",
    "type": ""
    }
    ],
    "returnVariables": [
    {
    "name": "array",
    "nodeType": "YulTypedName",
    "src": "1838:5:1",
    "type": ""
    }
    ],
    "src": "1761:423:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "2264:277:1",
    "statements": [
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "2313:83:1",
    "statements": [
    {
    "expression": {
    "arguments": [],
    "functionName": {
    "name": "revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d",
    "nodeType": "YulIdentifier",
    "src": "2315:77:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "2315:79:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "2315:79:1"
    }
    ]
    },
    "condition": {
    "arguments": [
    {
    "arguments": [
    {
    "arguments": [
    {
    "name": "offset",
    "nodeType": "YulIdentifier",
    "src": "2292:6:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "2300:4:1",
    "type": "",
    "value": "0x1f"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "2288:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "2288:17:1"
    },
    {
    "name": "end",
    "nodeType": "YulIdentifier",
    "src": "2307:3:1"
    }
    ],
    "functionName": {
    "name": "slt",
    "nodeType": "YulIdentifier",
    "src": "2284:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "2284:27:1"
    }
    ],
    "functionName": {
    "name": "iszero",
    "nodeType": "YulIdentifier",
    "src": "2277:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "2277:35:1"
    },
    "nodeType": "YulIf",
    "src": "2274:122:1"
    },
    {
    "nodeType": "YulVariableDeclaration",
    "src": "2405:34:1",
    "value": {
    "arguments": [
    {
    "name": "offset",
    "nodeType": "YulIdentifier",
    "src": "2432:6:1"
    }
    ],
    "functionName": {
    "name": "calldataload",
    "nodeType": "YulIdentifier",
    "src": "2419:12:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "2419:20:1"
    },
    "variables": [
    {
    "name": "length",
    "nodeType": "YulTypedName",
    "src": "2409:6:1",
    "type": ""
    }
    ]
    },
    {
    "nodeType": "YulAssignment",
    "src": "2448:87:1",
    "value": {
    "arguments": [
    {
    "arguments": [
    {
    "name": "offset",
    "nodeType": "YulIdentifier",
    "src": "2508:6:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "2516:4:1",
    "type": "",
    "value": "0x20"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "2504:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "2504:17:1"
    },
    {
    "name": "length",
    "nodeType": "YulIdentifier",
    "src": "2523:6:1"
    },
    {
    "name": "end",
    "nodeType": "YulIdentifier",
    "src": "2531:3:1"
    }
    ],
    "functionName": {
    "name": "abi_decode_available_length_t_bytes_memory_ptr",
    "nodeType": "YulIdentifier",
    "src": "2457:46:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "2457:78:1"
    },
    "variableNames": [
    {
    "name": "array",
    "nodeType": "YulIdentifier",
    "src": "2448:5:1"
    }
    ]
    }
    ]
    },
    "name": "abi_decode_t_bytes_memory_ptr",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "offset",
    "nodeType": "YulTypedName",
    "src": "2242:6:1",
    "type": ""
    },
    {
    "name": "end",
    "nodeType": "YulTypedName",
    "src": "2250:3:1",
    "type": ""
    }
    ],
    "returnVariables": [
    {
    "name": "array",
    "nodeType": "YulTypedName",
    "src": "2258:5:1",
    "type": ""
    }
    ],
    "src": "2203:338:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "2622:432:1",
    "statements": [
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "2668:83:1",
    "statements": [
    {
    "expression": {
    "arguments": [],
    "functionName": {
    "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
    "nodeType": "YulIdentifier",
    "src": "2670:77:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "2670:79:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "2670:79:1"
    }
    ]
    },
    "condition": {
    "arguments": [
    {
    "arguments": [
    {
    "name": "dataEnd",
    "nodeType": "YulIdentifier",
    "src": "2643:7:1"
    },
    {
    "name": "headStart",
    "nodeType": "YulIdentifier",
    "src": "2652:9:1"
    }
    ],
    "functionName": {
    "name": "sub",
    "nodeType": "YulIdentifier",
    "src": "2639:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "2639:23:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "2664:2:1",
    "type": "",
    "value": "32"
    }
    ],
    "functionName": {
    "name": "slt",
    "nodeType": "YulIdentifier",
    "src": "2635:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "2635:32:1"
    },
    "nodeType": "YulIf",
    "src": "2632:119:1"
    },
    {
    "nodeType": "YulBlock",
    "src": "2761:286:1",
    "statements": [
    {
    "nodeType": "YulVariableDeclaration",
    "src": "2776:45:1",
    "value": {
    "arguments": [
    {
    "arguments": [
    {
    "name": "headStart",
    "nodeType": "YulIdentifier",
    "src": "2807:9:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "2818:1:1",
    "type": "",
    "value": "0"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "2803:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "2803:17:1"
    }
    ],
    "functionName": {
    "name": "calldataload",
    "nodeType": "YulIdentifier",
    "src": "2790:12:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "2790:31:1"
    },
    "variables": [
    {
    "name": "offset",
    "nodeType": "YulTypedName",
    "src": "2780:6:1",
    "type": ""
    }
    ]
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "2868:83:1",
    "statements": [
    {
    "expression": {
    "arguments": [],
    "functionName": {
    "name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
    "nodeType": "YulIdentifier",
    "src": "2870:77:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "2870:79:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "2870:79:1"
    }
    ]
    },
    "condition": {
    "arguments": [
    {
    "name": "offset",
    "nodeType": "YulIdentifier",
    "src": "2840:6:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "2848:18:1",
    "type": "",
    "value": "0xffffffffffffffff"
    }
    ],
    "functionName": {
    "name": "gt",
    "nodeType": "YulIdentifier",
    "src": "2837:2:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "2837:30:1"
    },
    "nodeType": "YulIf",
    "src": "2834:117:1"
    },
    {
    "nodeType": "YulAssignment",
    "src": "2965:72:1",
    "value": {
    "arguments": [
    {
    "arguments": [
    {
    "name": "headStart",
    "nodeType": "YulIdentifier",
    "src": "3009:9:1"
    },
    {
    "name": "offset",
    "nodeType": "YulIdentifier",
    "src": "3020:6:1"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "3005:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "3005:22:1"
    },
    {
    "name": "dataEnd",
    "nodeType": "YulIdentifier",
    "src": "3029:7:1"
    }
    ],
    "functionName": {
    "name": "abi_decode_t_bytes_memory_ptr",
    "nodeType": "YulIdentifier",
    "src": "2975:29:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "2975:62:1"
    },
    "variableNames": [
    {
    "name": "value0",
    "nodeType": "YulIdentifier",
    "src": "2965:6:1"
    }
    ]
    }
    ]
    }
    ]
    },
    "name": "abi_decode_tuple_t_bytes_memory_ptr",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "headStart",
    "nodeType": "YulTypedName",
    "src": "2592:9:1",
    "type": ""
    },
    {
    "name": "dataEnd",
    "nodeType": "YulTypedName",
    "src": "2603:7:1",
    "type": ""
    }
    ],
    "returnVariables": [
    {
    "name": "value0",
    "nodeType": "YulTypedName",
    "src": "2615:6:1",
    "type": ""
    }
    ],
    "src": "2547:507:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "3105:81:1",
    "statements": [
    {
    "nodeType": "YulAssignment",
    "src": "3115:65:1",
    "value": {
    "arguments": [
    {
    "name": "value",
    "nodeType": "YulIdentifier",
    "src": "3130:5:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "3137:42:1",
    "type": "",
    "value": "0xffffffffffffffffffffffffffffffffffffffff"
    }
    ],
    "functionName": {
    "name": "and",
    "nodeType": "YulIdentifier",
    "src": "3126:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "3126:54:1"
    },
    "variableNames": [
    {
    "name": "cleaned",
    "nodeType": "YulIdentifier",
    "src": "3115:7:1"
    }
    ]
    }
    ]
    },
    "name": "cleanup_t_uint160",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "value",
    "nodeType": "YulTypedName",
    "src": "3087:5:1",
    "type": ""
    }
    ],
    "returnVariables": [
    {
    "name": "cleaned",
    "nodeType": "YulTypedName",
    "src": "3097:7:1",
    "type": ""
    }
    ],
    "src": "3060:126:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "3237:51:1",
    "statements": [
    {
    "nodeType": "YulAssignment",
    "src": "3247:35:1",
    "value": {
    "arguments": [
    {
    "name": "value",
    "nodeType": "YulIdentifier",
    "src": "3276:5:1"
    }
    ],
    "functionName": {
    "name": "cleanup_t_uint160",
    "nodeType": "YulIdentifier",
    "src": "3258:17:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "3258:24:1"
    },
    "variableNames": [
    {
    "name": "cleaned",
    "nodeType": "YulIdentifier",
    "src": "3247:7:1"
    }
    ]
    }
    ]
    },
    "name": "cleanup_t_address",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "value",
    "nodeType": "YulTypedName",
    "src": "3219:5:1",
    "type": ""
    }
    ],
    "returnVariables": [
    {
    "name": "cleaned",
    "nodeType": "YulTypedName",
    "src": "3229:7:1",
    "type": ""
    }
    ],
    "src": "3192:96:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "3359:53:1",
    "statements": [
    {
    "expression": {
    "arguments": [
    {
    "name": "pos",
    "nodeType": "YulIdentifier",
    "src": "3376:3:1"
    },
    {
    "arguments": [
    {
    "name": "value",
    "nodeType": "YulIdentifier",
    "src": "3399:5:1"
    }
    ],
    "functionName": {
    "name": "cleanup_t_address",
    "nodeType": "YulIdentifier",
    "src": "3381:17:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "3381:24:1"
    }
    ],
    "functionName": {
    "name": "mstore",
    "nodeType": "YulIdentifier",
    "src": "3369:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "3369:37:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "3369:37:1"
    }
    ]
    },
    "name": "abi_encode_t_address_to_t_address_fromStack",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "value",
    "nodeType": "YulTypedName",
    "src": "3347:5:1",
    "type": ""
    },
    {
    "name": "pos",
    "nodeType": "YulTypedName",
    "src": "3354:3:1",
    "type": ""
    }
    ],
    "src": "3294:118:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "3516:124:1",
    "statements": [
    {
    "nodeType": "YulAssignment",
    "src": "3526:26:1",
    "value": {
    "arguments": [
    {
    "name": "headStart",
    "nodeType": "YulIdentifier",
    "src": "3538:9:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "3549:2:1",
    "type": "",
    "value": "32"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "3534:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "3534:18:1"
    },
    "variableNames": [
    {
    "name": "tail",
    "nodeType": "YulIdentifier",
    "src": "3526:4:1"
    }
    ]
    },
    {
    "expression": {
    "arguments": [
    {
    "name": "value0",
    "nodeType": "YulIdentifier",
    "src": "3606:6:1"
    },
    {
    "arguments": [
    {
    "name": "headStart",
    "nodeType": "YulIdentifier",
    "src": "3619:9:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "3630:1:1",
    "type": "",
    "value": "0"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "3615:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "3615:17:1"
    }
    ],
    "functionName": {
    "name": "abi_encode_t_address_to_t_address_fromStack",
    "nodeType": "YulIdentifier",
    "src": "3562:43:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "3562:71:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "3562:71:1"
    }
    ]
    },
    "name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "headStart",
    "nodeType": "YulTypedName",
    "src": "3488:9:1",
    "type": ""
    },
    {
    "name": "value0",
    "nodeType": "YulTypedName",
    "src": "3500:6:1",
    "type": ""
    }
    ],
    "returnVariables": [
    {
    "name": "tail",
    "nodeType": "YulTypedName",
    "src": "3511:4:1",
    "type": ""
    }
    ],
    "src": "3418:222:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "3742:73:1",
    "statements": [
    {
    "expression": {
    "arguments": [
    {
    "name": "pos",
    "nodeType": "YulIdentifier",
    "src": "3759:3:1"
    },
    {
    "name": "length",
    "nodeType": "YulIdentifier",
    "src": "3764:6:1"
    }
    ],
    "functionName": {
    "name": "mstore",
    "nodeType": "YulIdentifier",
    "src": "3752:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "3752:19:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "3752:19:1"
    },
    {
    "nodeType": "YulAssignment",
    "src": "3780:29:1",
    "value": {
    "arguments": [
    {
    "name": "pos",
    "nodeType": "YulIdentifier",
    "src": "3799:3:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "3804:4:1",
    "type": "",
    "value": "0x20"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "3795:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "3795:14:1"
    },
    "variableNames": [
    {
    "name": "updated_pos",
    "nodeType": "YulIdentifier",
    "src": "3780:11:1"
    }
    ]
    }
    ]
    },
    "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "pos",
    "nodeType": "YulTypedName",
    "src": "3714:3:1",
    "type": ""
    },
    {
    "name": "length",
    "nodeType": "YulTypedName",
    "src": "3719:6:1",
    "type": ""
    }
    ],
    "returnVariables": [
    {
    "name": "updated_pos",
    "nodeType": "YulTypedName",
    "src": "3730:11:1",
    "type": ""
    }
    ],
    "src": "3646:169:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "3927:69:1",
    "statements": [
    {
    "expression": {
    "arguments": [
    {
    "arguments": [
    {
    "name": "memPtr",
    "nodeType": "YulIdentifier",
    "src": "3949:6:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "3957:1:1",
    "type": "",
    "value": "0"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "3945:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "3945:14:1"
    },
    {
    "hexValue": "4661696c656420746f206465706c6f7920636f6e7472616374",
    "kind": "string",
    "nodeType": "YulLiteral",
    "src": "3961:27:1",
    "type": "",
    "value": "Failed to deploy contract"
    }
    ],
    "functionName": {
    "name": "mstore",
    "nodeType": "YulIdentifier",
    "src": "3938:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "3938:51:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "3938:51:1"
    }
    ]
    },
    "name": "store_literal_in_memory_a52efd5fc7abcaedfe6da622199610c9d847c639d1cc33141b93504fb0422dd1",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "memPtr",
    "nodeType": "YulTypedName",
    "src": "3919:6:1",
    "type": ""
    }
    ],
    "src": "3821:175:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "4148:220:1",
    "statements": [
    {
    "nodeType": "YulAssignment",
    "src": "4158:74:1",
    "value": {
    "arguments": [
    {
    "name": "pos",
    "nodeType": "YulIdentifier",
    "src": "4224:3:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "4229:2:1",
    "type": "",
    "value": "25"
    }
    ],
    "functionName": {
    "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack",
    "nodeType": "YulIdentifier",
    "src": "4165:58:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "4165:67:1"
    },
    "variableNames": [
    {
    "name": "pos",
    "nodeType": "YulIdentifier",
    "src": "4158:3:1"
    }
    ]
    },
    {
    "expression": {
    "arguments": [
    {
    "name": "pos",
    "nodeType": "YulIdentifier",
    "src": "4330:3:1"
    }
    ],
    "functionName": {
    "name": "store_literal_in_memory_a52efd5fc7abcaedfe6da622199610c9d847c639d1cc33141b93504fb0422dd1",
    "nodeType": "YulIdentifier",
    "src": "4241:88:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "4241:93:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "4241:93:1"
    },
    {
    "nodeType": "YulAssignment",
    "src": "4343:19:1",
    "value": {
    "arguments": [
    {
    "name": "pos",
    "nodeType": "YulIdentifier",
    "src": "4354:3:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "4359:2:1",
    "type": "",
    "value": "32"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "4350:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "4350:12:1"
    },
    "variableNames": [
    {
    "name": "end",
    "nodeType": "YulIdentifier",
    "src": "4343:3:1"
    }
    ]
    }
    ]
    },
    "name": "abi_encode_t_stringliteral_a52efd5fc7abcaedfe6da622199610c9d847c639d1cc33141b93504fb0422dd1_to_t_string_memory_ptr_fromStack",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "pos",
    "nodeType": "YulTypedName",
    "src": "4136:3:1",
    "type": ""
    }
    ],
    "returnVariables": [
    {
    "name": "end",
    "nodeType": "YulTypedName",
    "src": "4144:3:1",
    "type": ""
    }
    ],
    "src": "4002:366:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "4545:248:1",
    "statements": [
    {
    "nodeType": "YulAssignment",
    "src": "4555:26:1",
    "value": {
    "arguments": [
    {
    "name": "headStart",
    "nodeType": "YulIdentifier",
    "src": "4567:9:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "4578:2:1",
    "type": "",
    "value": "32"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "4563:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "4563:18:1"
    },
    "variableNames": [
    {
    "name": "tail",
    "nodeType": "YulIdentifier",
    "src": "4555:4:1"
    }
    ]
    },
    {
    "expression": {
    "arguments": [
    {
    "arguments": [
    {
    "name": "headStart",
    "nodeType": "YulIdentifier",
    "src": "4602:9:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "4613:1:1",
    "type": "",
    "value": "0"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "4598:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "4598:17:1"
    },
    {
    "arguments": [
    {
    "name": "tail",
    "nodeType": "YulIdentifier",
    "src": "4621:4:1"
    },
    {
    "name": "headStart",
    "nodeType": "YulIdentifier",
    "src": "4627:9:1"
    }
    ],
    "functionName": {
    "name": "sub",
    "nodeType": "YulIdentifier",
    "src": "4617:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "4617:20:1"
    }
    ],
    "functionName": {
    "name": "mstore",
    "nodeType": "YulIdentifier",
    "src": "4591:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "4591:47:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "4591:47:1"
    },
    {
    "nodeType": "YulAssignment",
    "src": "4647:139:1",
    "value": {
    "arguments": [
    {
    "name": "tail",
    "nodeType": "YulIdentifier",
    "src": "4781:4:1"
    }
    ],
    "functionName": {
    "name": "abi_encode_t_stringliteral_a52efd5fc7abcaedfe6da622199610c9d847c639d1cc33141b93504fb0422dd1_to_t_string_memory_ptr_fromStack",
    "nodeType": "YulIdentifier",
    "src": "4655:124:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "4655:131:1"
    },
    "variableNames": [
    {
    "name": "tail",
    "nodeType": "YulIdentifier",
    "src": "4647:4:1"
    }
    ]
    }
    ]
    },
    "name": "abi_encode_tuple_t_stringliteral_a52efd5fc7abcaedfe6da622199610c9d847c639d1cc33141b93504fb0422dd1__to_t_string_memory_ptr__fromStack_reversed",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "headStart",
    "nodeType": "YulTypedName",
    "src": "4525:9:1",
    "type": ""
    }
    ],
    "returnVariables": [
    {
    "name": "tail",
    "nodeType": "YulTypedName",
    "src": "4540:4:1",
    "type": ""
    }
    ],
    "src": "4374:419:1"
    }
    ]
    },
    "contents": "{\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\n revert(0, 0)\n }\n\n function revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d() {\n revert(0, 0)\n }\n\n function revert_error_987264b3b1d58a9c7f8255e93e81c77d86d6299019c33110a076957a3e06e2ae() {\n revert(0, 0)\n }\n\n function round_up_to_mul_of_32(value) -> result {\n result := and(add(value, 31), not(31))\n }\n\n function panic_error_0x41() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x41)\n revert(0, 0x24)\n }\n\n function finalize_allocation(memPtr, size) {\n let newFreePtr := add(memPtr, round_up_to_mul_of_32(size))\n // protect against overflow\n if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() }\n mstore(64, newFreePtr)\n }\n\n function allocate_memory(size) -> memPtr {\n memPtr := allocate_unbounded()\n finalize_allocation(memPtr, size)\n }\n\n function array_allocation_size_t_bytes_memory_ptr(length) -> size {\n // Make sure we can allocate memory without overflow\n if gt(length, 0xffffffffffffffff) { panic_error_0x41() }\n\n size := round_up_to_mul_of_32(length)\n\n // add length slot\n size := add(size, 0x20)\n\n }\n\n function copy_calldata_to_memory_with_cleanup(src, dst, length) {\n calldatacopy(dst, src, length)\n mstore(add(dst, length), 0)\n }\n\n function abi_decode_available_length_t_bytes_memory_ptr(src, length, end) -> array {\n array := allocate_memory(array_allocation_size_t_bytes_memory_ptr(length))\n mstore(array, length)\n let dst := add(array, 0x20)\n if gt(add(src, length), end) { revert_error_987264b3b1d58a9c7f8255e93e81c77d86d6299019c33110a076957a3e06e2ae() }\n copy_calldata_to_memory_with_cleanup(src, dst, length)\n }\n\n // bytes\n function abi_decode_t_bytes_memory_ptr(offset, end) -> array {\n if iszero(slt(add(offset, 0x1f), end)) { revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d() }\n let length := calldataload(offset)\n array := abi_decode_available_length_t_bytes_memory_ptr(add(offset, 0x20), length, end)\n }\n\n function abi_decode_tuple_t_bytes_memory_ptr(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := calldataload(add(headStart, 0))\n if gt(offset, 0xffffffffffffffff) { revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() }\n\n value0 := abi_decode_t_bytes_memory_ptr(add(headStart, offset), dataEnd)\n }\n\n }\n\n function cleanup_t_uint160(value) -> cleaned {\n cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)\n }\n\n function cleanup_t_address(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\n }\n\n function abi_encode_t_address_to_t_address_fromStack(value, pos) {\n mstore(pos, cleanup_t_address(value))\n }\n\n function abi_encode_tuple_t_address__to_t_address__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_address_to_t_address_fromStack(value0, add(headStart, 0))\n\n }\n\n function array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length) -> updated_pos {\n mstore(pos, length)\n updated_pos := add(pos, 0x20)\n }\n\n function store_literal_in_memory_a52efd5fc7abcaedfe6da622199610c9d847c639d1cc33141b93504fb0422dd1(memPtr) {\n\n mstore(add(memPtr, 0), \"Failed to deploy contract\")\n\n }\n\n function abi_encode_t_stringliteral_a52efd5fc7abcaedfe6da622199610c9d847c639d1cc33141b93504fb0422dd1_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 25)\n store_literal_in_memory_a52efd5fc7abcaedfe6da622199610c9d847c639d1cc33141b93504fb0422dd1(pos)\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_stringliteral_a52efd5fc7abcaedfe6da622199610c9d847c639d1cc33141b93504fb0422dd1__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_a52efd5fc7abcaedfe6da622199610c9d847c639d1cc33141b93504fb0422dd1_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n}\n",
    "id": 1,
    "language": "Yul",
    "name": "#utility.yul"
    }
    ],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "608060405234801561001057600080fd5b506004361061002a5760003560e01c80627743601461002f575b600080fd5b6100496004803603810190610044919061023f565b61005f565b60405161005691906102c9565b60405180910390f35b6000808251602084016000f09050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036100dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100d390610341565b60405180910390fd5b80915050919050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61014c82610103565b810181811067ffffffffffffffff8211171561016b5761016a610114565b5b80604052505050565b600061017e6100e5565b905061018a8282610143565b919050565b600067ffffffffffffffff8211156101aa576101a9610114565b5b6101b382610103565b9050602081019050919050565b82818337600083830152505050565b60006101e26101dd8461018f565b610174565b9050828152602081018484840111156101fe576101fd6100fe565b5b6102098482856101c0565b509392505050565b600082601f830112610226576102256100f9565b5b81356102368482602086016101cf565b91505092915050565b600060208284031215610255576102546100ef565b5b600082013567ffffffffffffffff811115610273576102726100f4565b5b61027f84828501610211565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006102b382610288565b9050919050565b6102c3816102a8565b82525050565b60006020820190506102de60008301846102ba565b92915050565b600082825260208201905092915050565b7f4661696c656420746f206465706c6f7920636f6e747261637400000000000000600082015250565b600061032b6019836102e4565b9150610336826102f5565b602082019050919050565b6000602082019050818103600083015261035a8161031e565b905091905056fea2646970667358221220a545d25274233be2e2ebe456b6b3ceb9919a2cbc32d8e44e659adf1bbd26c2bd64736f6c63430008110033",
    "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x2A JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH3 0x774360 EQ PUSH2 0x2F JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x49 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x44 SWAP2 SWAP1 PUSH2 0x23F JUMP JUMPDEST PUSH2 0x5F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x56 SWAP2 SWAP1 PUSH2 0x2C9 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 DUP1 DUP3 MLOAD PUSH1 0x20 DUP5 ADD PUSH1 0x0 CREATE SWAP1 POP PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SUB PUSH2 0xDC JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xD3 SWAP1 PUSH2 0x341 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST DUP1 SWAP2 POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x41 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH2 0x14C DUP3 PUSH2 0x103 JUMP JUMPDEST DUP2 ADD DUP2 DUP2 LT PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT OR ISZERO PUSH2 0x16B JUMPI PUSH2 0x16A PUSH2 0x114 JUMP JUMPDEST JUMPDEST DUP1 PUSH1 0x40 MSTORE POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x17E PUSH2 0xE5 JUMP JUMPDEST SWAP1 POP PUSH2 0x18A DUP3 DUP3 PUSH2 0x143 JUMP JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x1AA JUMPI PUSH2 0x1A9 PUSH2 0x114 JUMP JUMPDEST JUMPDEST PUSH2 0x1B3 DUP3 PUSH2 0x103 JUMP JUMPDEST SWAP1 POP PUSH1 0x20 DUP2 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST DUP3 DUP2 DUP4 CALLDATACOPY PUSH1 0x0 DUP4 DUP4 ADD MSTORE POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1E2 PUSH2 0x1DD DUP5 PUSH2 0x18F JUMP JUMPDEST PUSH2 0x174 JUMP JUMPDEST SWAP1 POP DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 ADD DUP5 DUP5 DUP5 ADD GT ISZERO PUSH2 0x1FE JUMPI PUSH2 0x1FD PUSH2 0xFE JUMP JUMPDEST JUMPDEST PUSH2 0x209 DUP5 DUP3 DUP6 PUSH2 0x1C0 JUMP JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x226 JUMPI PUSH2 0x225 PUSH2 0xF9 JUMP JUMPDEST JUMPDEST DUP2 CALLDATALOAD PUSH2 0x236 DUP5 DUP3 PUSH1 0x20 DUP7 ADD PUSH2 0x1CF JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x255 JUMPI PUSH2 0x254 PUSH2 0xEF JUMP JUMPDEST JUMPDEST PUSH1 0x0 DUP3 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x273 JUMPI PUSH2 0x272 PUSH2 0xF4 JUMP JUMPDEST JUMPDEST PUSH2 0x27F DUP5 DUP3 DUP6 ADD PUSH2 0x211 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2B3 DUP3 PUSH2 0x288 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x2C3 DUP2 PUSH2 0x2A8 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x2DE PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x2BA JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x4661696C656420746F206465706C6F7920636F6E747261637400000000000000 PUSH1 0x0 DUP3 ADD MSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x32B PUSH1 0x19 DUP4 PUSH2 0x2E4 JUMP JUMPDEST SWAP2 POP PUSH2 0x336 DUP3 PUSH2 0x2F5 JUMP JUMPDEST PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x35A DUP2 PUSH2 0x31E JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xA5 GASLIMIT 0xD2 MSTORE PUSH21 0x233BE2E2EBE456B6B3CEB9919A2CBC32D8E44E659A 0xDF SHL 0xBD 0x26 0xC2 0xBD PUSH5 0x736F6C6343 STOP ADDMOD GT STOP CALLER ",
    "sourceMap": "57:364:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;81:338;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;137:7;156:24;280:9;274:16;267:4;256:9;252:20;249:1;242:49;222:69;;347:1;319:30;;:16;:30;;;311:68;;;;;;;;;;;;:::i;:::-;;;;;;;;;396:16;389:23;;;81:338;;;:::o;7:75:1:-;40:6;73:2;67:9;57:19;;7:75;:::o;88:117::-;197:1;194;187:12;211:117;320:1;317;310:12;334:117;443:1;440;433:12;457:117;566:1;563;556:12;580:102;621:6;672:2;668:7;663:2;656:5;652:14;648:28;638:38;;580:102;;;:::o;688:180::-;736:77;733:1;726:88;833:4;830:1;823:15;857:4;854:1;847:15;874:281;957:27;979:4;957:27;:::i;:::-;949:6;945:40;1087:6;1075:10;1072:22;1051:18;1039:10;1036:34;1033:62;1030:88;;;1098:18;;:::i;:::-;1030:88;1138:10;1134:2;1127:22;917:238;874:281;;:::o;1161:129::-;1195:6;1222:20;;:::i;:::-;1212:30;;1251:33;1279:4;1271:6;1251:33;:::i;:::-;1161:129;;;:::o;1296:307::-;1357:4;1447:18;1439:6;1436:30;1433:56;;;1469:18;;:::i;:::-;1433:56;1507:29;1529:6;1507:29;:::i;:::-;1499:37;;1591:4;1585;1581:15;1573:23;;1296:307;;;:::o;1609:146::-;1706:6;1701:3;1696;1683:30;1747:1;1738:6;1733:3;1729:16;1722:27;1609:146;;;:::o;1761:423::-;1838:5;1863:65;1879:48;1920:6;1879:48;:::i;:::-;1863:65;:::i;:::-;1854:74;;1951:6;1944:5;1937:21;1989:4;1982:5;1978:16;2027:3;2018:6;2013:3;2009:16;2006:25;2003:112;;;2034:79;;:::i;:::-;2003:112;2124:54;2171:6;2166:3;2161;2124:54;:::i;:::-;1844:340;1761:423;;;;;:::o;2203:338::-;2258:5;2307:3;2300:4;2292:6;2288:17;2284:27;2274:122;;2315:79;;:::i;:::-;2274:122;2432:6;2419:20;2457:78;2531:3;2523:6;2516:4;2508:6;2504:17;2457:78;:::i;:::-;2448:87;;2264:277;2203:338;;;;:::o;2547:507::-;2615:6;2664:2;2652:9;2643:7;2639:23;2635:32;2632:119;;;2670:79;;:::i;:::-;2632:119;2818:1;2807:9;2803:17;2790:31;2848:18;2840:6;2837:30;2834:117;;;2870:79;;:::i;:::-;2834:117;2975:62;3029:7;3020:6;3009:9;3005:22;2975:62;:::i;:::-;2965:72;;2761:286;2547:507;;;;:::o;3060:126::-;3097:7;3137:42;3130:5;3126:54;3115:65;;3060:126;;;:::o;3192:96::-;3229:7;3258:24;3276:5;3258:24;:::i;:::-;3247:35;;3192:96;;;:::o;3294:118::-;3381:24;3399:5;3381:24;:::i;:::-;3376:3;3369:37;3294:118;;:::o;3418:222::-;3511:4;3549:2;3538:9;3534:18;3526:26;;3562:71;3630:1;3619:9;3615:17;3606:6;3562:71;:::i;:::-;3418:222;;;;:::o;3646:169::-;3730:11;3764:6;3759:3;3752:19;3804:4;3799:3;3795:14;3780:29;;3646:169;;;;:::o;3821:175::-;3961:27;3957:1;3949:6;3945:14;3938:51;3821:175;:::o;4002:366::-;4144:3;4165:67;4229:2;4224:3;4165:67;:::i;:::-;4158:74;;4241:93;4330:3;4241:93;:::i;:::-;4359:2;4354:3;4350:12;4343:19;;4002:366;;;:::o;4374:419::-;4540:4;4578:2;4567:9;4563:18;4555:26;;4627:9;4621:4;4617:20;4613:1;4602:9;4598:17;4591:47;4655:131;4781:4;4655:131;:::i;:::-;4647:139;;4374:419;;;:::o"
    },
    "gasEstimates": {
    "creation": {
    "codeDepositCost": "183800",
    "executionCost": "226",
    "totalCost": "184026"
    },
    "external": {
    "deploy(bytes)": "infinite"
    }
    },
    "methodIdentifiers": {
    "deploy(bytes)": "00774360"
    }
    },
    "abi": [
    {
    "inputs": [
    {
    "internalType": "bytes",
    "name": "_bytecode",
    "type": "bytes"
    }
    ],
    "name": "deploy",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ]
    }
    65 changes: 65 additions & 0 deletions contracts...artifacts...Deployer_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,65 @@
    {
    "compiler": {
    "version": "0.8.17+commit.8df45f5f"
    },
    "language": "Solidity",
    "output": {
    "abi": [
    {
    "inputs": [
    {
    "internalType": "bytes",
    "name": "_bytecode",
    "type": "bytes"
    }
    ],
    "name": "deploy",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ],
    "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/Deployer.sol": "Deployer"
    },
    "evmVersion": "london",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "contracts/Deployer.sol": {
    "keccak256": "0x1b3f23f440be1e0de31ef8701716c3ce561cd8fe4cc3911c460b7b42f25eff84",
    "license": "MIT",
    "urls": [
    "bzz-raw://40ac8df67944dc662919927ae3ffe9164b5c8975c2baa89f49691df79cebc551",
    "dweb:/ipfs/QmTAc2xMdu5NiyAiVtjkZmMVph2FE5R8eTqepKJfS9sREg"
    ]
    }
    },
    "version": 1
    }
    1,308 changes: 1,308 additions & 0 deletions contracts...artifacts...DivisionLoss.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,1308 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "608060405234801561001057600080fd5b506101b1806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063e006805214610030575b600080fd5b61004a600480360381019061004591906100b1565b610060565b6040516100579190610100565b60405180910390f35b6000818361006e919061014a565b905092915050565b600080fd5b6000819050919050565b61008e8161007b565b811461009957600080fd5b50565b6000813590506100ab81610085565b92915050565b600080604083850312156100c8576100c7610076565b5b60006100d68582860161009c565b92505060206100e78582860161009c565b9150509250929050565b6100fa8161007b565b82525050565b600060208201905061011560008301846100f1565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006101558261007b565b91506101608361007b565b9250826101705761016f61011b565b5b82820490509291505056fea2646970667358221220e538b63c3a01362eea710fe2784a49f401a0eb32726ad921b96bef44e95272c964736f6c63430008120033",
    "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1B1 DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x2B JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0xE0068052 EQ PUSH2 0x30 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4A PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x45 SWAP2 SWAP1 PUSH2 0xB1 JUMP JUMPDEST PUSH2 0x60 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x57 SWAP2 SWAP1 PUSH2 0x100 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 DUP2 DUP4 PUSH2 0x6E SWAP2 SWAP1 PUSH2 0x14A JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x8E DUP2 PUSH2 0x7B JUMP JUMPDEST DUP2 EQ PUSH2 0x99 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0xAB DUP2 PUSH2 0x85 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xC8 JUMPI PUSH2 0xC7 PUSH2 0x76 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0xD6 DUP6 DUP3 DUP7 ADD PUSH2 0x9C JUMP JUMPDEST SWAP3 POP POP PUSH1 0x20 PUSH2 0xE7 DUP6 DUP3 DUP7 ADD PUSH2 0x9C JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH2 0xFA DUP2 PUSH2 0x7B JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x115 PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0xF1 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x12 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x155 DUP3 PUSH2 0x7B JUMP JUMPDEST SWAP2 POP PUSH2 0x160 DUP4 PUSH2 0x7B JUMP JUMPDEST SWAP3 POP DUP3 PUSH2 0x170 JUMPI PUSH2 0x16F PUSH2 0x11B JUMP JUMPDEST JUMPDEST DUP3 DUP3 DIV SWAP1 POP SWAP3 SWAP2 POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xE5 CODESIZE 0xB6 EXTCODECOPY GASPRICE ADD CALLDATASIZE 0x2E 0xEA PUSH18 0xFE2784A49F401A0EB32726AD921B96BEF44 0xE9 MSTORE PUSH19 0xC964736F6C6343000812003300000000000000 ",
    "sourceMap": "71:131:0:-:0;;;;;;;;;;;;;;;;;;;"
    },
    "deployedBytecode": {
    "functionDebugData": {
    "@division_15": {
    "entryPoint": 96,
    "id": 15,
    "parameterSlots": 2,
    "returnSlots": 1
    },
    "abi_decode_t_uint256": {
    "entryPoint": 156,
    "id": null,
    "parameterSlots": 2,
    "returnSlots": 1
    },
    "abi_decode_tuple_t_uint256t_uint256": {
    "entryPoint": 177,
    "id": null,
    "parameterSlots": 2,
    "returnSlots": 2
    },
    "abi_encode_t_uint256_to_t_uint256_fromStack": {
    "entryPoint": 241,
    "id": null,
    "parameterSlots": 2,
    "returnSlots": 0
    },
    "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed": {
    "entryPoint": 256,
    "id": null,
    "parameterSlots": 2,
    "returnSlots": 1
    },
    "allocate_unbounded": {
    "entryPoint": null,
    "id": null,
    "parameterSlots": 0,
    "returnSlots": 1
    },
    "checked_div_t_uint256": {
    "entryPoint": 330,
    "id": null,
    "parameterSlots": 2,
    "returnSlots": 1
    },
    "cleanup_t_uint256": {
    "entryPoint": 123,
    "id": null,
    "parameterSlots": 1,
    "returnSlots": 1
    },
    "panic_error_0x11": {
    "entryPoint": null,
    "id": null,
    "parameterSlots": 0,
    "returnSlots": 0
    },
    "panic_error_0x12": {
    "entryPoint": 283,
    "id": null,
    "parameterSlots": 0,
    "returnSlots": 0
    },
    "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": {
    "entryPoint": null,
    "id": null,
    "parameterSlots": 0,
    "returnSlots": 0
    },
    "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": {
    "entryPoint": 118,
    "id": null,
    "parameterSlots": 0,
    "returnSlots": 0
    },
    "validator_revert_t_uint256": {
    "entryPoint": 133,
    "id": null,
    "parameterSlots": 1,
    "returnSlots": 0
    }
    },
    "generatedSources": [
    {
    "ast": {
    "nodeType": "YulBlock",
    "src": "0:2082:1",
    "statements": [
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "47:35:1",
    "statements": [
    {
    "nodeType": "YulAssignment",
    "src": "57:19:1",
    "value": {
    "arguments": [
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "73:2:1",
    "type": "",
    "value": "64"
    }
    ],
    "functionName": {
    "name": "mload",
    "nodeType": "YulIdentifier",
    "src": "67:5:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "67:9:1"
    },
    "variableNames": [
    {
    "name": "memPtr",
    "nodeType": "YulIdentifier",
    "src": "57:6:1"
    }
    ]
    }
    ]
    },
    "name": "allocate_unbounded",
    "nodeType": "YulFunctionDefinition",
    "returnVariables": [
    {
    "name": "memPtr",
    "nodeType": "YulTypedName",
    "src": "40:6:1",
    "type": ""
    }
    ],
    "src": "7:75:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "177:28:1",
    "statements": [
    {
    "expression": {
    "arguments": [
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "194:1:1",
    "type": "",
    "value": "0"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "197:1:1",
    "type": "",
    "value": "0"
    }
    ],
    "functionName": {
    "name": "revert",
    "nodeType": "YulIdentifier",
    "src": "187:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "187:12:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "187:12:1"
    }
    ]
    },
    "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
    "nodeType": "YulFunctionDefinition",
    "src": "88:117:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "300:28:1",
    "statements": [
    {
    "expression": {
    "arguments": [
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "317:1:1",
    "type": "",
    "value": "0"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "320:1:1",
    "type": "",
    "value": "0"
    }
    ],
    "functionName": {
    "name": "revert",
    "nodeType": "YulIdentifier",
    "src": "310:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "310:12:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "310:12:1"
    }
    ]
    },
    "name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
    "nodeType": "YulFunctionDefinition",
    "src": "211:117:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "379:32:1",
    "statements": [
    {
    "nodeType": "YulAssignment",
    "src": "389:16:1",
    "value": {
    "name": "value",
    "nodeType": "YulIdentifier",
    "src": "400:5:1"
    },
    "variableNames": [
    {
    "name": "cleaned",
    "nodeType": "YulIdentifier",
    "src": "389:7:1"
    }
    ]
    }
    ]
    },
    "name": "cleanup_t_uint256",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "value",
    "nodeType": "YulTypedName",
    "src": "361:5:1",
    "type": ""
    }
    ],
    "returnVariables": [
    {
    "name": "cleaned",
    "nodeType": "YulTypedName",
    "src": "371:7:1",
    "type": ""
    }
    ],
    "src": "334:77:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "460:79:1",
    "statements": [
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "517:16:1",
    "statements": [
    {
    "expression": {
    "arguments": [
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "526:1:1",
    "type": "",
    "value": "0"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "529:1:1",
    "type": "",
    "value": "0"
    }
    ],
    "functionName": {
    "name": "revert",
    "nodeType": "YulIdentifier",
    "src": "519:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "519:12:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "519:12:1"
    }
    ]
    },
    "condition": {
    "arguments": [
    {
    "arguments": [
    {
    "name": "value",
    "nodeType": "YulIdentifier",
    "src": "483:5:1"
    },
    {
    "arguments": [
    {
    "name": "value",
    "nodeType": "YulIdentifier",
    "src": "508:5:1"
    }
    ],
    "functionName": {
    "name": "cleanup_t_uint256",
    "nodeType": "YulIdentifier",
    "src": "490:17:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "490:24:1"
    }
    ],
    "functionName": {
    "name": "eq",
    "nodeType": "YulIdentifier",
    "src": "480:2:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "480:35:1"
    }
    ],
    "functionName": {
    "name": "iszero",
    "nodeType": "YulIdentifier",
    "src": "473:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "473:43:1"
    },
    "nodeType": "YulIf",
    "src": "470:63:1"
    }
    ]
    },
    "name": "validator_revert_t_uint256",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "value",
    "nodeType": "YulTypedName",
    "src": "453:5:1",
    "type": ""
    }
    ],
    "src": "417:122:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "597:87:1",
    "statements": [
    {
    "nodeType": "YulAssignment",
    "src": "607:29:1",
    "value": {
    "arguments": [
    {
    "name": "offset",
    "nodeType": "YulIdentifier",
    "src": "629:6:1"
    }
    ],
    "functionName": {
    "name": "calldataload",
    "nodeType": "YulIdentifier",
    "src": "616:12:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "616:20:1"
    },
    "variableNames": [
    {
    "name": "value",
    "nodeType": "YulIdentifier",
    "src": "607:5:1"
    }
    ]
    },
    {
    "expression": {
    "arguments": [
    {
    "name": "value",
    "nodeType": "YulIdentifier",
    "src": "672:5:1"
    }
    ],
    "functionName": {
    "name": "validator_revert_t_uint256",
    "nodeType": "YulIdentifier",
    "src": "645:26:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "645:33:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "645:33:1"
    }
    ]
    },
    "name": "abi_decode_t_uint256",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "offset",
    "nodeType": "YulTypedName",
    "src": "575:6:1",
    "type": ""
    },
    {
    "name": "end",
    "nodeType": "YulTypedName",
    "src": "583:3:1",
    "type": ""
    }
    ],
    "returnVariables": [
    {
    "name": "value",
    "nodeType": "YulTypedName",
    "src": "591:5:1",
    "type": ""
    }
    ],
    "src": "545:139:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "773:391:1",
    "statements": [
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "819:83:1",
    "statements": [
    {
    "expression": {
    "arguments": [],
    "functionName": {
    "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
    "nodeType": "YulIdentifier",
    "src": "821:77:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "821:79:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "821:79:1"
    }
    ]
    },
    "condition": {
    "arguments": [
    {
    "arguments": [
    {
    "name": "dataEnd",
    "nodeType": "YulIdentifier",
    "src": "794:7:1"
    },
    {
    "name": "headStart",
    "nodeType": "YulIdentifier",
    "src": "803:9:1"
    }
    ],
    "functionName": {
    "name": "sub",
    "nodeType": "YulIdentifier",
    "src": "790:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "790:23:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "815:2:1",
    "type": "",
    "value": "64"
    }
    ],
    "functionName": {
    "name": "slt",
    "nodeType": "YulIdentifier",
    "src": "786:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "786:32:1"
    },
    "nodeType": "YulIf",
    "src": "783:119:1"
    },
    {
    "nodeType": "YulBlock",
    "src": "912:117:1",
    "statements": [
    {
    "nodeType": "YulVariableDeclaration",
    "src": "927:15:1",
    "value": {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "941:1:1",
    "type": "",
    "value": "0"
    },
    "variables": [
    {
    "name": "offset",
    "nodeType": "YulTypedName",
    "src": "931:6:1",
    "type": ""
    }
    ]
    },
    {
    "nodeType": "YulAssignment",
    "src": "956:63:1",
    "value": {
    "arguments": [
    {
    "arguments": [
    {
    "name": "headStart",
    "nodeType": "YulIdentifier",
    "src": "991:9:1"
    },
    {
    "name": "offset",
    "nodeType": "YulIdentifier",
    "src": "1002:6:1"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "987:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "987:22:1"
    },
    {
    "name": "dataEnd",
    "nodeType": "YulIdentifier",
    "src": "1011:7:1"
    }
    ],
    "functionName": {
    "name": "abi_decode_t_uint256",
    "nodeType": "YulIdentifier",
    "src": "966:20:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "966:53:1"
    },
    "variableNames": [
    {
    "name": "value0",
    "nodeType": "YulIdentifier",
    "src": "956:6:1"
    }
    ]
    }
    ]
    },
    {
    "nodeType": "YulBlock",
    "src": "1039:118:1",
    "statements": [
    {
    "nodeType": "YulVariableDeclaration",
    "src": "1054:16:1",
    "value": {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "1068:2:1",
    "type": "",
    "value": "32"
    },
    "variables": [
    {
    "name": "offset",
    "nodeType": "YulTypedName",
    "src": "1058:6:1",
    "type": ""
    }
    ]
    },
    {
    "nodeType": "YulAssignment",
    "src": "1084:63:1",
    "value": {
    "arguments": [
    {
    "arguments": [
    {
    "name": "headStart",
    "nodeType": "YulIdentifier",
    "src": "1119:9:1"
    },
    {
    "name": "offset",
    "nodeType": "YulIdentifier",
    "src": "1130:6:1"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "1115:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1115:22:1"
    },
    {
    "name": "dataEnd",
    "nodeType": "YulIdentifier",
    "src": "1139:7:1"
    }
    ],
    "functionName": {
    "name": "abi_decode_t_uint256",
    "nodeType": "YulIdentifier",
    "src": "1094:20:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1094:53:1"
    },
    "variableNames": [
    {
    "name": "value1",
    "nodeType": "YulIdentifier",
    "src": "1084:6:1"
    }
    ]
    }
    ]
    }
    ]
    },
    "name": "abi_decode_tuple_t_uint256t_uint256",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "headStart",
    "nodeType": "YulTypedName",
    "src": "735:9:1",
    "type": ""
    },
    {
    "name": "dataEnd",
    "nodeType": "YulTypedName",
    "src": "746:7:1",
    "type": ""
    }
    ],
    "returnVariables": [
    {
    "name": "value0",
    "nodeType": "YulTypedName",
    "src": "758:6:1",
    "type": ""
    },
    {
    "name": "value1",
    "nodeType": "YulTypedName",
    "src": "766:6:1",
    "type": ""
    }
    ],
    "src": "690:474:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "1235:53:1",
    "statements": [
    {
    "expression": {
    "arguments": [
    {
    "name": "pos",
    "nodeType": "YulIdentifier",
    "src": "1252:3:1"
    },
    {
    "arguments": [
    {
    "name": "value",
    "nodeType": "YulIdentifier",
    "src": "1275:5:1"
    }
    ],
    "functionName": {
    "name": "cleanup_t_uint256",
    "nodeType": "YulIdentifier",
    "src": "1257:17:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1257:24:1"
    }
    ],
    "functionName": {
    "name": "mstore",
    "nodeType": "YulIdentifier",
    "src": "1245:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1245:37:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "1245:37:1"
    }
    ]
    },
    "name": "abi_encode_t_uint256_to_t_uint256_fromStack",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "value",
    "nodeType": "YulTypedName",
    "src": "1223:5:1",
    "type": ""
    },
    {
    "name": "pos",
    "nodeType": "YulTypedName",
    "src": "1230:3:1",
    "type": ""
    }
    ],
    "src": "1170:118:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "1392:124:1",
    "statements": [
    {
    "nodeType": "YulAssignment",
    "src": "1402:26:1",
    "value": {
    "arguments": [
    {
    "name": "headStart",
    "nodeType": "YulIdentifier",
    "src": "1414:9:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "1425:2:1",
    "type": "",
    "value": "32"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "1410:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1410:18:1"
    },
    "variableNames": [
    {
    "name": "tail",
    "nodeType": "YulIdentifier",
    "src": "1402:4:1"
    }
    ]
    },
    {
    "expression": {
    "arguments": [
    {
    "name": "value0",
    "nodeType": "YulIdentifier",
    "src": "1482:6:1"
    },
    {
    "arguments": [
    {
    "name": "headStart",
    "nodeType": "YulIdentifier",
    "src": "1495:9:1"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "1506:1:1",
    "type": "",
    "value": "0"
    }
    ],
    "functionName": {
    "name": "add",
    "nodeType": "YulIdentifier",
    "src": "1491:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1491:17:1"
    }
    ],
    "functionName": {
    "name": "abi_encode_t_uint256_to_t_uint256_fromStack",
    "nodeType": "YulIdentifier",
    "src": "1438:43:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1438:71:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "1438:71:1"
    }
    ]
    },
    "name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "headStart",
    "nodeType": "YulTypedName",
    "src": "1364:9:1",
    "type": ""
    },
    {
    "name": "value0",
    "nodeType": "YulTypedName",
    "src": "1376:6:1",
    "type": ""
    }
    ],
    "returnVariables": [
    {
    "name": "tail",
    "nodeType": "YulTypedName",
    "src": "1387:4:1",
    "type": ""
    }
    ],
    "src": "1294:222:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "1550:152:1",
    "statements": [
    {
    "expression": {
    "arguments": [
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "1567:1:1",
    "type": "",
    "value": "0"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "1570:77:1",
    "type": "",
    "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856"
    }
    ],
    "functionName": {
    "name": "mstore",
    "nodeType": "YulIdentifier",
    "src": "1560:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1560:88:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "1560:88:1"
    },
    {
    "expression": {
    "arguments": [
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "1664:1:1",
    "type": "",
    "value": "4"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "1667:4:1",
    "type": "",
    "value": "0x12"
    }
    ],
    "functionName": {
    "name": "mstore",
    "nodeType": "YulIdentifier",
    "src": "1657:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1657:15:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "1657:15:1"
    },
    {
    "expression": {
    "arguments": [
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "1688:1:1",
    "type": "",
    "value": "0"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "1691:4:1",
    "type": "",
    "value": "0x24"
    }
    ],
    "functionName": {
    "name": "revert",
    "nodeType": "YulIdentifier",
    "src": "1681:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1681:15:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "1681:15:1"
    }
    ]
    },
    "name": "panic_error_0x12",
    "nodeType": "YulFunctionDefinition",
    "src": "1522:180:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "1736:152:1",
    "statements": [
    {
    "expression": {
    "arguments": [
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "1753:1:1",
    "type": "",
    "value": "0"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "1756:77:1",
    "type": "",
    "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856"
    }
    ],
    "functionName": {
    "name": "mstore",
    "nodeType": "YulIdentifier",
    "src": "1746:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1746:88:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "1746:88:1"
    },
    {
    "expression": {
    "arguments": [
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "1850:1:1",
    "type": "",
    "value": "4"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "1853:4:1",
    "type": "",
    "value": "0x11"
    }
    ],
    "functionName": {
    "name": "mstore",
    "nodeType": "YulIdentifier",
    "src": "1843:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1843:15:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "1843:15:1"
    },
    {
    "expression": {
    "arguments": [
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "1874:1:1",
    "type": "",
    "value": "0"
    },
    {
    "kind": "number",
    "nodeType": "YulLiteral",
    "src": "1877:4:1",
    "type": "",
    "value": "0x24"
    }
    ],
    "functionName": {
    "name": "revert",
    "nodeType": "YulIdentifier",
    "src": "1867:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1867:15:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "1867:15:1"
    }
    ]
    },
    "name": "panic_error_0x11",
    "nodeType": "YulFunctionDefinition",
    "src": "1708:180:1"
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "1936:143:1",
    "statements": [
    {
    "nodeType": "YulAssignment",
    "src": "1946:25:1",
    "value": {
    "arguments": [
    {
    "name": "x",
    "nodeType": "YulIdentifier",
    "src": "1969:1:1"
    }
    ],
    "functionName": {
    "name": "cleanup_t_uint256",
    "nodeType": "YulIdentifier",
    "src": "1951:17:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1951:20:1"
    },
    "variableNames": [
    {
    "name": "x",
    "nodeType": "YulIdentifier",
    "src": "1946:1:1"
    }
    ]
    },
    {
    "nodeType": "YulAssignment",
    "src": "1980:25:1",
    "value": {
    "arguments": [
    {
    "name": "y",
    "nodeType": "YulIdentifier",
    "src": "2003:1:1"
    }
    ],
    "functionName": {
    "name": "cleanup_t_uint256",
    "nodeType": "YulIdentifier",
    "src": "1985:17:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "1985:20:1"
    },
    "variableNames": [
    {
    "name": "y",
    "nodeType": "YulIdentifier",
    "src": "1980:1:1"
    }
    ]
    },
    {
    "body": {
    "nodeType": "YulBlock",
    "src": "2027:22:1",
    "statements": [
    {
    "expression": {
    "arguments": [],
    "functionName": {
    "name": "panic_error_0x12",
    "nodeType": "YulIdentifier",
    "src": "2029:16:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "2029:18:1"
    },
    "nodeType": "YulExpressionStatement",
    "src": "2029:18:1"
    }
    ]
    },
    "condition": {
    "arguments": [
    {
    "name": "y",
    "nodeType": "YulIdentifier",
    "src": "2024:1:1"
    }
    ],
    "functionName": {
    "name": "iszero",
    "nodeType": "YulIdentifier",
    "src": "2017:6:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "2017:9:1"
    },
    "nodeType": "YulIf",
    "src": "2014:35:1"
    },
    {
    "nodeType": "YulAssignment",
    "src": "2059:14:1",
    "value": {
    "arguments": [
    {
    "name": "x",
    "nodeType": "YulIdentifier",
    "src": "2068:1:1"
    },
    {
    "name": "y",
    "nodeType": "YulIdentifier",
    "src": "2071:1:1"
    }
    ],
    "functionName": {
    "name": "div",
    "nodeType": "YulIdentifier",
    "src": "2064:3:1"
    },
    "nodeType": "YulFunctionCall",
    "src": "2064:9:1"
    },
    "variableNames": [
    {
    "name": "r",
    "nodeType": "YulIdentifier",
    "src": "2059:1:1"
    }
    ]
    }
    ]
    },
    "name": "checked_div_t_uint256",
    "nodeType": "YulFunctionDefinition",
    "parameters": [
    {
    "name": "x",
    "nodeType": "YulTypedName",
    "src": "1925:1:1",
    "type": ""
    },
    {
    "name": "y",
    "nodeType": "YulTypedName",
    "src": "1928:1:1",
    "type": ""
    }
    ],
    "returnVariables": [
    {
    "name": "r",
    "nodeType": "YulTypedName",
    "src": "1934:1:1",
    "type": ""
    }
    ],
    "src": "1894:185:1"
    }
    ]
    },
    "contents": "{\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\n revert(0, 0)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function validator_revert_t_uint256(value) {\n if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }\n }\n\n function abi_decode_t_uint256(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_tuple_t_uint256t_uint256(headStart, dataEnd) -> value0, value1 {\n if slt(sub(dataEnd, headStart), 64) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 32\n\n value1 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n function panic_error_0x12() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x12)\n revert(0, 0x24)\n }\n\n function panic_error_0x11() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x11)\n revert(0, 0x24)\n }\n\n function checked_div_t_uint256(x, y) -> r {\n x := cleanup_t_uint256(x)\n y := cleanup_t_uint256(y)\n if iszero(y) { panic_error_0x12() }\n\n r := div(x, y)\n }\n\n}\n",
    "id": 1,
    "language": "Yul",
    "name": "#utility.yul"
    }
    ],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "608060405234801561001057600080fd5b506004361061002b5760003560e01c8063e006805214610030575b600080fd5b61004a600480360381019061004591906100b1565b610060565b6040516100579190610100565b60405180910390f35b6000818361006e919061014a565b905092915050565b600080fd5b6000819050919050565b61008e8161007b565b811461009957600080fd5b50565b6000813590506100ab81610085565b92915050565b600080604083850312156100c8576100c7610076565b5b60006100d68582860161009c565b92505060206100e78582860161009c565b9150509250929050565b6100fa8161007b565b82525050565b600060208201905061011560008301846100f1565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006101558261007b565b91506101608361007b565b9250826101705761016f61011b565b5b82820490509291505056fea2646970667358221220e538b63c3a01362eea710fe2784a49f401a0eb32726ad921b96bef44e95272c964736f6c63430008120033",
    "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x2B JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0xE0068052 EQ PUSH2 0x30 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4A PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x45 SWAP2 SWAP1 PUSH2 0xB1 JUMP JUMPDEST PUSH2 0x60 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x57 SWAP2 SWAP1 PUSH2 0x100 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 DUP2 DUP4 PUSH2 0x6E SWAP2 SWAP1 PUSH2 0x14A JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x8E DUP2 PUSH2 0x7B JUMP JUMPDEST DUP2 EQ PUSH2 0x99 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0xAB DUP2 PUSH2 0x85 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xC8 JUMPI PUSH2 0xC7 PUSH2 0x76 JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0xD6 DUP6 DUP3 DUP7 ADD PUSH2 0x9C JUMP JUMPDEST SWAP3 POP POP PUSH1 0x20 PUSH2 0xE7 DUP6 DUP3 DUP7 ADD PUSH2 0x9C JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH2 0xFA DUP2 PUSH2 0x7B JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x115 PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0xF1 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x12 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x155 DUP3 PUSH2 0x7B JUMP JUMPDEST SWAP2 POP PUSH2 0x160 DUP4 PUSH2 0x7B JUMP JUMPDEST SWAP3 POP DUP3 PUSH2 0x170 JUMPI PUSH2 0x16F PUSH2 0x11B JUMP JUMPDEST JUMPDEST DUP3 DUP3 DIV SWAP1 POP SWAP3 SWAP2 POP POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xE5 CODESIZE 0xB6 EXTCODECOPY GASPRICE ADD CALLDATASIZE 0x2E 0xEA PUSH18 0xFE2784A49F401A0EB32726AD921B96BEF44 0xE9 MSTORE PUSH19 0xC964736F6C6343000812003300000000000000 ",
    "sourceMap": "71:131:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;99:101;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;162:7;192:1;188;:5;;;;:::i;:::-;181:12;;99:101;;;;:::o;88:117:1:-;197:1;194;187:12;334:77;371:7;400:5;389:16;;334:77;;;:::o;417:122::-;490:24;508:5;490:24;:::i;:::-;483:5;480:35;470:63;;529:1;526;519:12;470:63;417:122;:::o;545:139::-;591:5;629:6;616:20;607:29;;645:33;672:5;645:33;:::i;:::-;545:139;;;;:::o;690:474::-;758:6;766;815:2;803:9;794:7;790:23;786:32;783:119;;;821:79;;:::i;:::-;783:119;941:1;966:53;1011:7;1002:6;991:9;987:22;966:53;:::i;:::-;956:63;;912:117;1068:2;1094:53;1139:7;1130:6;1119:9;1115:22;1094:53;:::i;:::-;1084:63;;1039:118;690:474;;;;;:::o;1170:118::-;1257:24;1275:5;1257:24;:::i;:::-;1252:3;1245:37;1170:118;;:::o;1294:222::-;1387:4;1425:2;1414:9;1410:18;1402:26;;1438:71;1506:1;1495:9;1491:17;1482:6;1438:71;:::i;:::-;1294:222;;;;:::o;1522:180::-;1570:77;1567:1;1560:88;1667:4;1664:1;1657:15;1691:4;1688:1;1681:15;1894:185;1934:1;1951:20;1969:1;1951:20;:::i;:::-;1946:25;;1985:20;2003:1;1985:20;:::i;:::-;1980:25;;2024:1;2014:35;;2029:18;;:::i;:::-;2014:35;2071:1;2068;2064:9;2059:14;;1894:185;;;;:::o"
    },
    "gasEstimates": {
    "creation": {
    "codeDepositCost": "86600",
    "executionCost": "135",
    "totalCost": "86735"
    },
    "external": {
    "division(uint256,uint256)": "infinite"
    }
    },
    "methodIdentifiers": {
    "division(uint256,uint256)": "e0068052"
    }
    },
    "abi": [
    {
    "inputs": [
    {
    "internalType": "uint256",
    "name": "a",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "b",
    "type": "uint256"
    }
    ],
    "name": "division",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "pure",
    "type": "function"
    }
    ]
    }
    70 changes: 70 additions & 0 deletions contracts...artifacts...DivisionLoss_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,70 @@
    {
    "compiler": {
    "version": "0.8.18+commit.87f61d96"
    },
    "language": "Solidity",
    "output": {
    "abi": [
    {
    "inputs": [
    {
    "internalType": "uint256",
    "name": "a",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "b",
    "type": "uint256"
    }
    ],
    "name": "division",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "pure",
    "type": "function"
    }
    ],
    "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/DivisionLoss.sol": "DivisionLoss"
    },
    "evmVersion": "paris",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "contracts/DivisionLoss.sol": {
    "keccak256": "0xd11849aea1cf2ea96f2041098e6544fb4bee51248fc5a593f95883b2797fa90a",
    "license": "AGPL-3.0-or-later",
    "urls": [
    "bzz-raw://4555362de844bd2e51069b6dd853424d212ead049deabf73747a8ad643e703ce",
    "dweb:/ipfs/QmVrLBD3D2mMGyHosNvrFy1SJCbm6PUY5UqP9kYS5xY4T2"
    ]
    }
    },
    "version": 1
    }
    76 changes: 76 additions & 0 deletions contracts...artifacts...ERC20Interface.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,76 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "deployedBytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "gasEstimates": null,
    "methodIdentifiers": {
    "balanceOf(address)": "70a08231"
    }
    },
    "abi": [
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "user",
    "type": "address"
    }
    ],
    "name": "balanceOf",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    }
    ]
    }
    120 changes: 120 additions & 0 deletions contracts...artifacts...ERC20Interface_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,120 @@
    {
    "compiler": {
    "version": "0.8.17+commit.8df45f5f"
    },
    "language": "Solidity",
    "output": {
    "abi": [
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "user",
    "type": "address"
    }
    ],
    "name": "balanceOf",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    }
    ],
    "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/FlashLiquidator.sol": "ERC20Interface"
    },
    "evmVersion": "london",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": {
    "keccak256": "0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98",
    "license": "MIT",
    "urls": [
    "bzz-raw://99c8cb3cd19a44bbfb6612605affb7d8b06cee1f6aa9362a37a8672b4f7eeaf8",
    "dweb:/ipfs/QmasyxFDBUp7k5KFgfDWEzM8PYSKEq7GVznzMJ1VxVRF4B"
    ]
    },
    "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": {
    "keccak256": "0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794",
    "license": "MIT",
    "urls": [
    "bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e",
    "dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": {
    "keccak256": "0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250",
    "license": "MIT",
    "urls": [
    "bzz-raw://9c7d1f5e15633ab912b74c2f57e24559e66b03232300d4b27ff0f25bc452ecad",
    "dweb:/ipfs/QmYTJkc1cntYkKQ1Tu11nBcJLakiy93Tjytc4XHELo4GmR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol": {
    "keccak256": "0xb82ef33f43b6b96109687d91b39c94573fdccaaa423fe28e8ba0977b31c023e0",
    "license": "MIT",
    "urls": [
    "bzz-raw://ec9c629f63e66379f9c868a74f971064701cc6e30583872aa653f8b932518025",
    "dweb:/ipfs/QmY4MnZF2VMFwJkAwpdQwxEWA3KcGbNBKEmAVYePMVQWUR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": {
    "keccak256": "0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422",
    "license": "MIT",
    "urls": [
    "bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b",
    "dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": {
    "keccak256": "0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149",
    "license": "MIT",
    "urls": [
    "bzz-raw://d6520943ea55fdf5f0bafb39ed909f64de17051bc954ff3e88c9e5621412c79c",
    "dweb:/ipfs/QmWZ4rAKTQbNG2HxGs46AcTXShsVytKeLs7CUCdCSv5N7a"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol": {
    "keccak256": "0xb1561a6950b1aaa504c8f81b7d46bccfa77ccd10de3eb865cf34b1acd5ad505e",
    "license": "MIT",
    "urls": [
    "bzz-raw://9a56cb91629dacd161be24908fbf94315f3f45dd6fee8dad82b27af853cbc4ee",
    "dweb:/ipfs/QmNfEzdf4NTpxyhzWKAmeDwwSpJ6ZjNizK3GXw3TEuTTgn"
    ]
    },
    "contracts/FlashLiquidator.sol": {
    "keccak256": "0xc25bd5e47e982df9423525f9d200040f9fb38c7452baf49f3c904bf1a4301699",
    "urls": [
    "bzz-raw://31ea053099740751cf3aaa6a606afbdd28c8ad8e13452d008bc3c16732eb6f93",
    "dweb:/ipfs/QmY1nfhF67uDfwfEFZkdFqZMc7i6PzFDY5JTu6oy4HJkUs"
    ]
    }
    },
    "version": 1
    }
    64 changes: 64 additions & 0 deletions contracts...artifacts...FathomLibrary.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,64 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220b6ac32aef46b1cd44578f919b1a67e55822d4b0ae092811faa79f8ecb8048dea64736f6c63430008110033",
    "opcodes": "PUSH1 0x56 PUSH1 0x50 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x43 JUMPI PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xB6 0xAC ORIGIN 0xAE DELEGATECALL PUSH12 0x1CD44578F919B1A67E55822D 0x4B EXP 0xE0 SWAP3 DUP2 0x1F 0xAA PUSH26 0xF8ECB8048DEA64736F6C63430008110033000000000000000000 ",
    "sourceMap": "18785:961:7:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
    },
    "deployedBytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220b6ac32aef46b1cd44578f919b1a67e55822d4b0ae092811faa79f8ecb8048dea64736f6c63430008110033",
    "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xB6 0xAC ORIGIN 0xAE DELEGATECALL PUSH12 0x1CD44578F919B1A67E55822D 0x4B EXP 0xE0 SWAP3 DUP2 0x1F 0xAA PUSH26 0xF8ECB8048DEA64736F6C63430008110033000000000000000000 ",
    "sourceMap": "18785:961:7:-:0;;;;;;;;"
    },
    "gasEstimates": {
    "creation": {
    "codeDepositCost": "17200",
    "executionCost": "97",
    "totalCost": "17297"
    },
    "internal": {
    "_convertDecimals(uint256,uint256,uint256)": "infinite",
    "_getStableSwapTokenToStablecoinAmountOut(address,uint256)": "infinite"
    }
    },
    "methodIdentifiers": {}
    },
    "abi": []
    }
    100 changes: 100 additions & 0 deletions contracts...artifacts...FathomLibrary_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,100 @@
    {
    "compiler": {
    "version": "0.8.17+commit.8df45f5f"
    },
    "language": "Solidity",
    "output": {
    "abi": [],
    "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/FlashLiquidator.sol": "FathomLibrary"
    },
    "evmVersion": "london",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": {
    "keccak256": "0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98",
    "license": "MIT",
    "urls": [
    "bzz-raw://99c8cb3cd19a44bbfb6612605affb7d8b06cee1f6aa9362a37a8672b4f7eeaf8",
    "dweb:/ipfs/QmasyxFDBUp7k5KFgfDWEzM8PYSKEq7GVznzMJ1VxVRF4B"
    ]
    },
    "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": {
    "keccak256": "0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794",
    "license": "MIT",
    "urls": [
    "bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e",
    "dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": {
    "keccak256": "0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250",
    "license": "MIT",
    "urls": [
    "bzz-raw://9c7d1f5e15633ab912b74c2f57e24559e66b03232300d4b27ff0f25bc452ecad",
    "dweb:/ipfs/QmYTJkc1cntYkKQ1Tu11nBcJLakiy93Tjytc4XHELo4GmR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol": {
    "keccak256": "0xb82ef33f43b6b96109687d91b39c94573fdccaaa423fe28e8ba0977b31c023e0",
    "license": "MIT",
    "urls": [
    "bzz-raw://ec9c629f63e66379f9c868a74f971064701cc6e30583872aa653f8b932518025",
    "dweb:/ipfs/QmY4MnZF2VMFwJkAwpdQwxEWA3KcGbNBKEmAVYePMVQWUR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": {
    "keccak256": "0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422",
    "license": "MIT",
    "urls": [
    "bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b",
    "dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": {
    "keccak256": "0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149",
    "license": "MIT",
    "urls": [
    "bzz-raw://d6520943ea55fdf5f0bafb39ed909f64de17051bc954ff3e88c9e5621412c79c",
    "dweb:/ipfs/QmWZ4rAKTQbNG2HxGs46AcTXShsVytKeLs7CUCdCSv5N7a"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol": {
    "keccak256": "0xb1561a6950b1aaa504c8f81b7d46bccfa77ccd10de3eb865cf34b1acd5ad505e",
    "license": "MIT",
    "urls": [
    "bzz-raw://9a56cb91629dacd161be24908fbf94315f3f45dd6fee8dad82b27af853cbc4ee",
    "dweb:/ipfs/QmNfEzdf4NTpxyhzWKAmeDwwSpJ6ZjNizK3GXw3TEuTTgn"
    ]
    },
    "contracts/FlashLiquidator.sol": {
    "keccak256": "0xc25bd5e47e982df9423525f9d200040f9fb38c7452baf49f3c904bf1a4301699",
    "urls": [
    "bzz-raw://31ea053099740751cf3aaa6a606afbdd28c8ad8e13452d008bc3c16732eb6f93",
    "dweb:/ipfs/QmY1nfhF67uDfwfEFZkdFqZMc7i6PzFDY5JTu6oy4HJkUs"
    ]
    }
    },
    "version": 1
    }
    22,900 changes: 22,900 additions & 0 deletions contracts...artifacts...FlashLiquidator.json
    22,900 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
    489 changes: 489 additions & 0 deletions contracts...artifacts...FlashLiquidator_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,489 @@
    {
    "compiler": {
    "version": "0.8.17+commit.8df45f5f"
    },
    "language": "Solidity",
    "output": {
    "abi": [
    {
    "anonymous": false,
    "inputs": [
    {
    "indexed": false,
    "internalType": "uint8",
    "name": "version",
    "type": "uint8"
    }
    ],
    "name": "Initialized",
    "type": "event"
    },
    {
    "anonymous": false,
    "inputs": [
    {
    "indexed": true,
    "internalType": "address",
    "name": "liquidatorAddress",
    "type": "address"
    },
    {
    "indexed": true,
    "internalType": "uint256",
    "name": "debtValueToRepay",
    "type": "uint256"
    },
    {
    "indexed": true,
    "internalType": "uint256",
    "name": "collateralAmountToLiquidate",
    "type": "uint256"
    },
    {
    "indexed": false,
    "internalType": "uint256",
    "name": "liquidationProfit",
    "type": "uint256"
    },
    {
    "indexed": false,
    "internalType": "uint256",
    "name": "dexAmountOut",
    "type": "uint256"
    },
    {
    "indexed": false,
    "internalType": "uint256",
    "name": "stableSwapAmountOut",
    "type": "uint256"
    },
    {
    "indexed": false,
    "internalType": "uint256",
    "name": "fundsUsedFromLiquidator",
    "type": "uint256"
    },
    {
    "indexed": false,
    "internalType": "address[]",
    "name": "path",
    "type": "address[]"
    }
    ],
    "name": "LogFlashLiquidationSuccess",
    "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": false,
    "internalType": "address",
    "name": "account",
    "type": "address"
    }
    ],
    "name": "Paused",
    "type": "event"
    },
    {
    "anonymous": false,
    "inputs": [
    {
    "indexed": false,
    "internalType": "address",
    "name": "account",
    "type": "address"
    }
    ],
    "name": "Unpaused",
    "type": "event"
    },
    {
    "stateMutability": "payable",
    "type": "fallback"
    },
    {
    "inputs": [],
    "name": "bookKeeper",
    "outputs": [
    {
    "internalType": "contract IBookKeeper",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "fathomStablecoin",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "fixedSpreadLiquidationStrategy",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "_debtValueToRepay",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "_collateralAmountToLiquidate",
    "type": "uint256"
    },
    {
    "internalType": "bytes",
    "name": "data",
    "type": "bytes"
    }
    ],
    "name": "flashLendingCall",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "_bookKeeper",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "_fathomStablecoin",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "_stablecoinAdapter",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "_fixedSpreadLiquidationStrategy",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "_profitRecipient",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "_usdToken",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "_stableSwap",
    "type": "address"
    }
    ],
    "name": "initialize",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "owner",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "pause",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "paused",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "profitRecipient",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "renounceOwnership",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "_profitRecipient",
    "type": "address"
    }
    ],
    "name": "setProfitRecipient",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "stableSwap",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "stablecoinAdapter",
    "outputs": [
    {
    "internalType": "contract IStablecoinAdapter",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes4",
    "name": "_interfaceId",
    "type": "bytes4"
    }
    ],
    "name": "supportsInterface",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "pure",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "newOwner",
    "type": "address"
    }
    ],
    "name": "transferOwnership",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "unpause",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "usdToken",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "stateMutability": "payable",
    "type": "receive"
    }
    ],
    "devdoc": {
    "kind": "dev",
    "methods": {
    "owner()": {
    "details": "Returns the address of the current owner."
    },
    "paused()": {
    "details": "Returns true if the contract is paused, and false otherwise."
    },
    "renounceOwnership()": {
    "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."
    },
    "transferOwnership(address)": {
    "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
    }
    },
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/FlashLiquidator.sol": "FlashLiquidator"
    },
    "evmVersion": "london",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": {
    "keccak256": "0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98",
    "license": "MIT",
    "urls": [
    "bzz-raw://99c8cb3cd19a44bbfb6612605affb7d8b06cee1f6aa9362a37a8672b4f7eeaf8",
    "dweb:/ipfs/QmasyxFDBUp7k5KFgfDWEzM8PYSKEq7GVznzMJ1VxVRF4B"
    ]
    },
    "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": {
    "keccak256": "0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794",
    "license": "MIT",
    "urls": [
    "bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e",
    "dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": {
    "keccak256": "0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250",
    "license": "MIT",
    "urls": [
    "bzz-raw://9c7d1f5e15633ab912b74c2f57e24559e66b03232300d4b27ff0f25bc452ecad",
    "dweb:/ipfs/QmYTJkc1cntYkKQ1Tu11nBcJLakiy93Tjytc4XHELo4GmR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol": {
    "keccak256": "0xb82ef33f43b6b96109687d91b39c94573fdccaaa423fe28e8ba0977b31c023e0",
    "license": "MIT",
    "urls": [
    "bzz-raw://ec9c629f63e66379f9c868a74f971064701cc6e30583872aa653f8b932518025",
    "dweb:/ipfs/QmY4MnZF2VMFwJkAwpdQwxEWA3KcGbNBKEmAVYePMVQWUR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": {
    "keccak256": "0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422",
    "license": "MIT",
    "urls": [
    "bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b",
    "dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": {
    "keccak256": "0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149",
    "license": "MIT",
    "urls": [
    "bzz-raw://d6520943ea55fdf5f0bafb39ed909f64de17051bc954ff3e88c9e5621412c79c",
    "dweb:/ipfs/QmWZ4rAKTQbNG2HxGs46AcTXShsVytKeLs7CUCdCSv5N7a"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol": {
    "keccak256": "0xb1561a6950b1aaa504c8f81b7d46bccfa77ccd10de3eb865cf34b1acd5ad505e",
    "license": "MIT",
    "urls": [
    "bzz-raw://9a56cb91629dacd161be24908fbf94315f3f45dd6fee8dad82b27af853cbc4ee",
    "dweb:/ipfs/QmNfEzdf4NTpxyhzWKAmeDwwSpJ6ZjNizK3GXw3TEuTTgn"
    ]
    },
    "contracts/FlashLiquidator.sol": {
    "keccak256": "0xc25bd5e47e982df9423525f9d200040f9fb38c7452baf49f3c904bf1a4301699",
    "urls": [
    "bzz-raw://31ea053099740751cf3aaa6a606afbdd28c8ad8e13452d008bc3c16732eb6f93",
    "dweb:/ipfs/QmY1nfhF67uDfwfEFZkdFqZMc7i6PzFDY5JTu6oy4HJkUs"
    ]
    }
    },
    "version": 1
    }
    235 changes: 235 additions & 0 deletions contracts...artifacts...IAccessControlConfig.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,235 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "deployedBytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "gasEstimates": null,
    "methodIdentifiers": {
    "ADAPTER_ROLE()": "02a882e6",
    "BOOK_KEEPER_ROLE()": "6792166f",
    "COLLATERAL_MANAGER_ROLE()": "2e718ab7",
    "GOV_ROLE()": "b536818a",
    "LIQUIDATION_ENGINE_ROLE()": "e8ff193d",
    "MINTABLE_ROLE()": "08e45bc5",
    "OWNER_ROLE()": "e58378bb",
    "POSITION_MANAGER_ROLE()": "6e19aa59",
    "PRICE_ORACLE_ROLE()": "b998902f",
    "SHOW_STOPPER_ROLE()": "d7a47a69",
    "STABILITY_FEE_COLLECTOR_ROLE()": "23868800",
    "hasRole(bytes32,address)": "91d14854"
    }
    },
    "abi": [
    {
    "inputs": [],
    "name": "ADAPTER_ROLE",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "BOOK_KEEPER_ROLE",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "COLLATERAL_MANAGER_ROLE",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "GOV_ROLE",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "LIQUIDATION_ENGINE_ROLE",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "MINTABLE_ROLE",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "OWNER_ROLE",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "POSITION_MANAGER_ROLE",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "PRICE_ORACLE_ROLE",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "SHOW_STOPPER_ROLE",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "STABILITY_FEE_COLLECTOR_ROLE",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "role",
    "type": "bytes32"
    },
    {
    "internalType": "address",
    "name": "account",
    "type": "address"
    }
    ],
    "name": "hasRole",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    }
    ]
    }
    268 changes: 268 additions & 0 deletions contracts...artifacts...IAccessControlConfig_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,268 @@
    {
    "compiler": {
    "version": "0.8.17+commit.8df45f5f"
    },
    "language": "Solidity",
    "output": {
    "abi": [
    {
    "inputs": [],
    "name": "ADAPTER_ROLE",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "BOOK_KEEPER_ROLE",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "COLLATERAL_MANAGER_ROLE",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "GOV_ROLE",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "LIQUIDATION_ENGINE_ROLE",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "MINTABLE_ROLE",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "OWNER_ROLE",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "POSITION_MANAGER_ROLE",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "PRICE_ORACLE_ROLE",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "SHOW_STOPPER_ROLE",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "STABILITY_FEE_COLLECTOR_ROLE",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "role",
    "type": "bytes32"
    },
    {
    "internalType": "address",
    "name": "account",
    "type": "address"
    }
    ],
    "name": "hasRole",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    }
    ],
    "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/FlashLiquidator.sol": "IAccessControlConfig"
    },
    "evmVersion": "london",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": {
    "keccak256": "0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98",
    "license": "MIT",
    "urls": [
    "bzz-raw://99c8cb3cd19a44bbfb6612605affb7d8b06cee1f6aa9362a37a8672b4f7eeaf8",
    "dweb:/ipfs/QmasyxFDBUp7k5KFgfDWEzM8PYSKEq7GVznzMJ1VxVRF4B"
    ]
    },
    "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": {
    "keccak256": "0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794",
    "license": "MIT",
    "urls": [
    "bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e",
    "dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": {
    "keccak256": "0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250",
    "license": "MIT",
    "urls": [
    "bzz-raw://9c7d1f5e15633ab912b74c2f57e24559e66b03232300d4b27ff0f25bc452ecad",
    "dweb:/ipfs/QmYTJkc1cntYkKQ1Tu11nBcJLakiy93Tjytc4XHELo4GmR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol": {
    "keccak256": "0xb82ef33f43b6b96109687d91b39c94573fdccaaa423fe28e8ba0977b31c023e0",
    "license": "MIT",
    "urls": [
    "bzz-raw://ec9c629f63e66379f9c868a74f971064701cc6e30583872aa653f8b932518025",
    "dweb:/ipfs/QmY4MnZF2VMFwJkAwpdQwxEWA3KcGbNBKEmAVYePMVQWUR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": {
    "keccak256": "0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422",
    "license": "MIT",
    "urls": [
    "bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b",
    "dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": {
    "keccak256": "0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149",
    "license": "MIT",
    "urls": [
    "bzz-raw://d6520943ea55fdf5f0bafb39ed909f64de17051bc954ff3e88c9e5621412c79c",
    "dweb:/ipfs/QmWZ4rAKTQbNG2HxGs46AcTXShsVytKeLs7CUCdCSv5N7a"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol": {
    "keccak256": "0xb1561a6950b1aaa504c8f81b7d46bccfa77ccd10de3eb865cf34b1acd5ad505e",
    "license": "MIT",
    "urls": [
    "bzz-raw://9a56cb91629dacd161be24908fbf94315f3f45dd6fee8dad82b27af853cbc4ee",
    "dweb:/ipfs/QmNfEzdf4NTpxyhzWKAmeDwwSpJ6ZjNizK3GXw3TEuTTgn"
    ]
    },
    "contracts/FlashLiquidator.sol": {
    "keccak256": "0xc25bd5e47e982df9423525f9d200040f9fb38c7452baf49f3c904bf1a4301699",
    "urls": [
    "bzz-raw://31ea053099740751cf3aaa6a606afbdd28c8ad8e13452d008bc3c16732eb6f93",
    "dweb:/ipfs/QmY1nfhF67uDfwfEFZkdFqZMc7i6PzFDY5JTu6oy4HJkUs"
    ]
    }
    },
    "version": 1
    }
    517 changes: 517 additions & 0 deletions contracts...artifacts...IBookKeeper.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,517 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "deployedBytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "gasEstimates": null,
    "methodIdentifiers": {
    "accessControlConfig()": "c8cc243f",
    "accrueStabilityFee(bytes32,address,int256)": "90d53639",
    "addCollateral(bytes32,address,int256)": "d295927a",
    "adjustPosition(bytes32,address,address,address,int256,int256)": "56bd594a",
    "blacklist(address)": "f9f92be4",
    "collateralPoolConfig()": "d8682461",
    "collateralToken(bytes32,address)": "f8be242c",
    "confiscatePosition(bytes32,address,address,address,int256,int256)": "b1df2594",
    "mintUnbackedStablecoin(address,address,uint256)": "6a321151",
    "moveCollateral(bytes32,address,address,uint256)": "b5d99329",
    "movePosition(bytes32,address,address,int256,int256)": "03ab9076",
    "moveStablecoin(address,address,uint256)": "8c157854",
    "poolStablecoinIssued(bytes32)": "d0c26ff1",
    "positionWhitelist(address,address)": "d9ea9155",
    "positions(bytes32,address)": "29d88594",
    "settleSystemBadDebt(uint256)": "815110ec",
    "stablecoin(address)": "b4ac08bb",
    "systemBadDebt(address)": "e137ddc5",
    "totalStablecoinIssued()": "6f3a3bfc",
    "whitelist(address)": "9b19251a"
    }
    },
    "abi": [
    {
    "inputs": [],
    "name": "accessControlConfig",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "collateralPoolId",
    "type": "bytes32"
    },
    {
    "internalType": "address",
    "name": "stabilityFeeRecipient",
    "type": "address"
    },
    {
    "internalType": "int256",
    "name": "debtAccumulatedRate",
    "type": "int256"
    }
    ],
    "name": "accrueStabilityFee",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "collateralPoolId",
    "type": "bytes32"
    },
    {
    "internalType": "address",
    "name": "ownerAddress",
    "type": "address"
    },
    {
    "internalType": "int256",
    "name": "amount",
    "type": "int256"
    }
    ],
    "name": "addCollateral",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "collateralPoolId",
    "type": "bytes32"
    },
    {
    "internalType": "address",
    "name": "positionAddress",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "collateralOwner",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "stablecoinOwner",
    "type": "address"
    },
    {
    "internalType": "int256",
    "name": "collateralValue",
    "type": "int256"
    },
    {
    "internalType": "int256",
    "name": "debtShare",
    "type": "int256"
    }
    ],
    "name": "adjustPosition",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "toBeBlacklistedAddress",
    "type": "address"
    }
    ],
    "name": "blacklist",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "collateralPoolConfig",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "collateralPoolId",
    "type": "bytes32"
    },
    {
    "internalType": "address",
    "name": "ownerAddress",
    "type": "address"
    }
    ],
    "name": "collateralToken",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "collateralPoolId",
    "type": "bytes32"
    },
    {
    "internalType": "address",
    "name": "positionAddress",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "collateralCreditor",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "stablecoinDebtor",
    "type": "address"
    },
    {
    "internalType": "int256",
    "name": "collateralAmount",
    "type": "int256"
    },
    {
    "internalType": "int256",
    "name": "debtShare",
    "type": "int256"
    }
    ],
    "name": "confiscatePosition",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "from",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "to",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "value",
    "type": "uint256"
    }
    ],
    "name": "mintUnbackedStablecoin",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "collateralPoolId",
    "type": "bytes32"
    },
    {
    "internalType": "address",
    "name": "src",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "dst",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "amount",
    "type": "uint256"
    }
    ],
    "name": "moveCollateral",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "collateralPoolId",
    "type": "bytes32"
    },
    {
    "internalType": "address",
    "name": "src",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "dst",
    "type": "address"
    },
    {
    "internalType": "int256",
    "name": "collateralAmount",
    "type": "int256"
    },
    {
    "internalType": "int256",
    "name": "debtShare",
    "type": "int256"
    }
    ],
    "name": "movePosition",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "src",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "dst",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "value",
    "type": "uint256"
    }
    ],
    "name": "moveStablecoin",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "poolStablecoinIssued",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "positionAddress",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "whitelistedAddress",
    "type": "address"
    }
    ],
    "name": "positionWhitelist",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "collateralPoolId",
    "type": "bytes32"
    },
    {
    "internalType": "address",
    "name": "positionAddress",
    "type": "address"
    }
    ],
    "name": "positions",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "lockedCollateral",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "debtShare",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "uint256",
    "name": "value",
    "type": "uint256"
    }
    ],
    "name": "settleSystemBadDebt",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "ownerAddress",
    "type": "address"
    }
    ],
    "name": "stablecoin",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "ownerAddress",
    "type": "address"
    }
    ],
    "name": "systemBadDebt",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "totalStablecoinIssued",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "toBeWhitelistedAddress",
    "type": "address"
    }
    ],
    "name": "whitelist",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ]
    }
    542 changes: 542 additions & 0 deletions contracts...artifacts...IBookKeeper_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,542 @@
    {
    "compiler": {
    "version": "0.8.17+commit.8df45f5f"
    },
    "language": "Solidity",
    "output": {
    "abi": [
    {
    "inputs": [],
    "name": "accessControlConfig",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "collateralPoolId",
    "type": "bytes32"
    },
    {
    "internalType": "address",
    "name": "stabilityFeeRecipient",
    "type": "address"
    },
    {
    "internalType": "int256",
    "name": "debtAccumulatedRate",
    "type": "int256"
    }
    ],
    "name": "accrueStabilityFee",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "collateralPoolId",
    "type": "bytes32"
    },
    {
    "internalType": "address",
    "name": "ownerAddress",
    "type": "address"
    },
    {
    "internalType": "int256",
    "name": "amount",
    "type": "int256"
    }
    ],
    "name": "addCollateral",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "collateralPoolId",
    "type": "bytes32"
    },
    {
    "internalType": "address",
    "name": "positionAddress",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "collateralOwner",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "stablecoinOwner",
    "type": "address"
    },
    {
    "internalType": "int256",
    "name": "collateralValue",
    "type": "int256"
    },
    {
    "internalType": "int256",
    "name": "debtShare",
    "type": "int256"
    }
    ],
    "name": "adjustPosition",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "toBeBlacklistedAddress",
    "type": "address"
    }
    ],
    "name": "blacklist",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "collateralPoolConfig",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "collateralPoolId",
    "type": "bytes32"
    },
    {
    "internalType": "address",
    "name": "ownerAddress",
    "type": "address"
    }
    ],
    "name": "collateralToken",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "collateralPoolId",
    "type": "bytes32"
    },
    {
    "internalType": "address",
    "name": "positionAddress",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "collateralCreditor",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "stablecoinDebtor",
    "type": "address"
    },
    {
    "internalType": "int256",
    "name": "collateralAmount",
    "type": "int256"
    },
    {
    "internalType": "int256",
    "name": "debtShare",
    "type": "int256"
    }
    ],
    "name": "confiscatePosition",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "from",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "to",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "value",
    "type": "uint256"
    }
    ],
    "name": "mintUnbackedStablecoin",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "collateralPoolId",
    "type": "bytes32"
    },
    {
    "internalType": "address",
    "name": "src",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "dst",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "amount",
    "type": "uint256"
    }
    ],
    "name": "moveCollateral",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "collateralPoolId",
    "type": "bytes32"
    },
    {
    "internalType": "address",
    "name": "src",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "dst",
    "type": "address"
    },
    {
    "internalType": "int256",
    "name": "collateralAmount",
    "type": "int256"
    },
    {
    "internalType": "int256",
    "name": "debtShare",
    "type": "int256"
    }
    ],
    "name": "movePosition",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "src",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "dst",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "value",
    "type": "uint256"
    }
    ],
    "name": "moveStablecoin",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "poolStablecoinIssued",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "positionAddress",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "whitelistedAddress",
    "type": "address"
    }
    ],
    "name": "positionWhitelist",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "collateralPoolId",
    "type": "bytes32"
    },
    {
    "internalType": "address",
    "name": "positionAddress",
    "type": "address"
    }
    ],
    "name": "positions",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "lockedCollateral",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "debtShare",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "uint256",
    "name": "value",
    "type": "uint256"
    }
    ],
    "name": "settleSystemBadDebt",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "ownerAddress",
    "type": "address"
    }
    ],
    "name": "stablecoin",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "ownerAddress",
    "type": "address"
    }
    ],
    "name": "systemBadDebt",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "totalStablecoinIssued",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "toBeWhitelistedAddress",
    "type": "address"
    }
    ],
    "name": "whitelist",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ],
    "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/FlashLiquidator.sol": "IBookKeeper"
    },
    "evmVersion": "london",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": {
    "keccak256": "0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98",
    "license": "MIT",
    "urls": [
    "bzz-raw://99c8cb3cd19a44bbfb6612605affb7d8b06cee1f6aa9362a37a8672b4f7eeaf8",
    "dweb:/ipfs/QmasyxFDBUp7k5KFgfDWEzM8PYSKEq7GVznzMJ1VxVRF4B"
    ]
    },
    "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": {
    "keccak256": "0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794",
    "license": "MIT",
    "urls": [
    "bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e",
    "dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": {
    "keccak256": "0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250",
    "license": "MIT",
    "urls": [
    "bzz-raw://9c7d1f5e15633ab912b74c2f57e24559e66b03232300d4b27ff0f25bc452ecad",
    "dweb:/ipfs/QmYTJkc1cntYkKQ1Tu11nBcJLakiy93Tjytc4XHELo4GmR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol": {
    "keccak256": "0xb82ef33f43b6b96109687d91b39c94573fdccaaa423fe28e8ba0977b31c023e0",
    "license": "MIT",
    "urls": [
    "bzz-raw://ec9c629f63e66379f9c868a74f971064701cc6e30583872aa653f8b932518025",
    "dweb:/ipfs/QmY4MnZF2VMFwJkAwpdQwxEWA3KcGbNBKEmAVYePMVQWUR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": {
    "keccak256": "0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422",
    "license": "MIT",
    "urls": [
    "bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b",
    "dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": {
    "keccak256": "0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149",
    "license": "MIT",
    "urls": [
    "bzz-raw://d6520943ea55fdf5f0bafb39ed909f64de17051bc954ff3e88c9e5621412c79c",
    "dweb:/ipfs/QmWZ4rAKTQbNG2HxGs46AcTXShsVytKeLs7CUCdCSv5N7a"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol": {
    "keccak256": "0xb1561a6950b1aaa504c8f81b7d46bccfa77ccd10de3eb865cf34b1acd5ad505e",
    "license": "MIT",
    "urls": [
    "bzz-raw://9a56cb91629dacd161be24908fbf94315f3f45dd6fee8dad82b27af853cbc4ee",
    "dweb:/ipfs/QmNfEzdf4NTpxyhzWKAmeDwwSpJ6ZjNizK3GXw3TEuTTgn"
    ]
    },
    "contracts/FlashLiquidator.sol": {
    "keccak256": "0xc25bd5e47e982df9423525f9d200040f9fb38c7452baf49f3c904bf1a4301699",
    "urls": [
    "bzz-raw://31ea053099740751cf3aaa6a606afbdd28c8ad8e13452d008bc3c16732eb6f93",
    "dweb:/ipfs/QmY1nfhF67uDfwfEFZkdFqZMc7i6PzFDY5JTu6oy4HJkUs"
    ]
    }
    },
    "version": 1
    }
    76 changes: 76 additions & 0 deletions contracts...artifacts...IColPoolConfig.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,76 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "deployedBytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "gasEstimates": null,
    "methodIdentifiers": {
    "getAdapter(bytes32)": "8272e138"
    }
    },
    "abi": [
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "name": "getAdapter",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    }
    ]
    }
    65 changes: 65 additions & 0 deletions contracts...artifacts...IColPoolConfig_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,65 @@
    {
    "compiler": {
    "version": "0.8.17+commit.8df45f5f"
    },
    "language": "Solidity",
    "output": {
    "abi": [
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "name": "getAdapter",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    }
    ],
    "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/ICollateralPoolConfig.sol": "IColPoolConfig"
    },
    "evmVersion": "london",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "contracts/ICollateralPoolConfig.sol": {
    "keccak256": "0x691843e3296ef4a40920c18ae461d6e7b91cf9f3343aed672c43b9ccdf48102e",
    "license": "AGPL-3.0-or-later",
    "urls": [
    "bzz-raw://c5e8089ec8ed163ba6727ba9f58832a7602a646e7da1ae8c9ac90fca6626a6d0",
    "dweb:/ipfs/QmWdVKCWrGRVLGawMgohJEem2hVyUWq3PZaeHeuWkRMApz"
    ]
    }
    },
    "version": 1
    }
    546 changes: 546 additions & 0 deletions contracts...artifacts...ICollateralPoolConfig.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,546 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "deployedBytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "gasEstimates": null,
    "methodIdentifiers": {
    "collateralPools(bytes32)": "d97a3649",
    "getAdapter(bytes32)": "8272e138",
    "getCloseFactorBps(bytes32)": "e73bbc79",
    "getCollateralPoolInfo(bytes32)": "1204769e",
    "getDebtAccumulatedRate(bytes32)": "a09b0fe0",
    "getDebtCeiling(bytes32)": "ad41d85d",
    "getDebtFloor(bytes32)": "9c1985d5",
    "getLastAccumulationTime(bytes32)": "bbd112a5",
    "getLiquidationRatio(bytes32)": "44d0c937",
    "getLiquidatorIncentiveBps(bytes32)": "0ec057e5",
    "getPriceFeed(bytes32)": "8c0adf62",
    "getPriceWithSafetyMargin(bytes32)": "8c492d07",
    "getStabilityFeeRate(bytes32)": "1fea158d",
    "getStrategy(bytes32)": "28c84bbd",
    "getTotalDebtShare(bytes32)": "7a8bd02e",
    "getTreasuryFeesBps(bytes32)": "73a4f962",
    "setDebtAccumulatedRate(bytes32,uint256)": "e47f3c6f",
    "setPriceWithSafetyMargin(bytes32,uint256)": "be7c9f32",
    "setTotalDebtShare(bytes32,uint256)": "b3b1cfa2",
    "updateLastAccumulationTime(bytes32)": "e73eb92e"
    }
    },
    "abi": [
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "collateralPools",
    "outputs": [
    {
    "components": [
    {
    "internalType": "uint256",
    "name": "totalDebtShare",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "debtAccumulatedRate",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "priceWithSafetyMargin",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "debtCeiling",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "debtFloor",
    "type": "uint256"
    },
    {
    "internalType": "address",
    "name": "priceFeed",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "liquidationRatio",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "stabilityFeeRate",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "lastAccumulationTime",
    "type": "uint256"
    },
    {
    "internalType": "address",
    "name": "adapter",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "closeFactorBps",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "liquidatorIncentiveBps",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "treasuryFeesBps",
    "type": "uint256"
    },
    {
    "internalType": "address",
    "name": "strategy",
    "type": "address"
    }
    ],
    "internalType": "struct ICollateralPoolConfig.CollateralPool",
    "name": "",
    "type": "tuple"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getAdapter",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getCloseFactorBps",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getCollateralPoolInfo",
    "outputs": [
    {
    "components": [
    {
    "internalType": "uint256",
    "name": "debtAccumulatedRate",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "totalDebtShare",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "debtCeiling",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "priceWithSafetyMargin",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "debtFloor",
    "type": "uint256"
    }
    ],
    "internalType": "struct ICollateralPoolConfig.CollateralPoolInfo",
    "name": "",
    "type": "tuple"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getDebtAccumulatedRate",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getDebtCeiling",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getDebtFloor",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getLastAccumulationTime",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getLiquidationRatio",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getLiquidatorIncentiveBps",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getPriceFeed",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getPriceWithSafetyMargin",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getStabilityFeeRate",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getStrategy",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getTotalDebtShare",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getTreasuryFeesBps",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    },
    {
    "internalType": "uint256",
    "name": "_debtAccumulatedRate",
    "type": "uint256"
    }
    ],
    "name": "setDebtAccumulatedRate",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "collateralPoolId",
    "type": "bytes32"
    },
    {
    "internalType": "uint256",
    "name": "priceWithSafetyMargin",
    "type": "uint256"
    }
    ],
    "name": "setPriceWithSafetyMargin",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    },
    {
    "internalType": "uint256",
    "name": "_totalDebtShare",
    "type": "uint256"
    }
    ],
    "name": "setTotalDebtShare",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "updateLastAccumulationTime",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ]
    }
    571 changes: 571 additions & 0 deletions contracts...artifacts...ICollateralPoolConfig_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,571 @@
    {
    "compiler": {
    "version": "0.8.17+commit.8df45f5f"
    },
    "language": "Solidity",
    "output": {
    "abi": [
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "collateralPools",
    "outputs": [
    {
    "components": [
    {
    "internalType": "uint256",
    "name": "totalDebtShare",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "debtAccumulatedRate",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "priceWithSafetyMargin",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "debtCeiling",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "debtFloor",
    "type": "uint256"
    },
    {
    "internalType": "address",
    "name": "priceFeed",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "liquidationRatio",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "stabilityFeeRate",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "lastAccumulationTime",
    "type": "uint256"
    },
    {
    "internalType": "address",
    "name": "adapter",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "closeFactorBps",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "liquidatorIncentiveBps",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "treasuryFeesBps",
    "type": "uint256"
    },
    {
    "internalType": "address",
    "name": "strategy",
    "type": "address"
    }
    ],
    "internalType": "struct ICollateralPoolConfig.CollateralPool",
    "name": "",
    "type": "tuple"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getAdapter",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getCloseFactorBps",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getCollateralPoolInfo",
    "outputs": [
    {
    "components": [
    {
    "internalType": "uint256",
    "name": "debtAccumulatedRate",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "totalDebtShare",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "debtCeiling",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "priceWithSafetyMargin",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "debtFloor",
    "type": "uint256"
    }
    ],
    "internalType": "struct ICollateralPoolConfig.CollateralPoolInfo",
    "name": "",
    "type": "tuple"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getDebtAccumulatedRate",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getDebtCeiling",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getDebtFloor",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getLastAccumulationTime",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getLiquidationRatio",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getLiquidatorIncentiveBps",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getPriceFeed",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getPriceWithSafetyMargin",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getStabilityFeeRate",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getStrategy",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getTotalDebtShare",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "getTreasuryFeesBps",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    },
    {
    "internalType": "uint256",
    "name": "_debtAccumulatedRate",
    "type": "uint256"
    }
    ],
    "name": "setDebtAccumulatedRate",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "collateralPoolId",
    "type": "bytes32"
    },
    {
    "internalType": "uint256",
    "name": "priceWithSafetyMargin",
    "type": "uint256"
    }
    ],
    "name": "setPriceWithSafetyMargin",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    },
    {
    "internalType": "uint256",
    "name": "_totalDebtShare",
    "type": "uint256"
    }
    ],
    "name": "setTotalDebtShare",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "_collateralPoolId",
    "type": "bytes32"
    }
    ],
    "name": "updateLastAccumulationTime",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ],
    "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/FlashLiquidator.sol": "ICollateralPoolConfig"
    },
    "evmVersion": "london",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": {
    "keccak256": "0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98",
    "license": "MIT",
    "urls": [
    "bzz-raw://99c8cb3cd19a44bbfb6612605affb7d8b06cee1f6aa9362a37a8672b4f7eeaf8",
    "dweb:/ipfs/QmasyxFDBUp7k5KFgfDWEzM8PYSKEq7GVznzMJ1VxVRF4B"
    ]
    },
    "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": {
    "keccak256": "0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794",
    "license": "MIT",
    "urls": [
    "bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e",
    "dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": {
    "keccak256": "0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250",
    "license": "MIT",
    "urls": [
    "bzz-raw://9c7d1f5e15633ab912b74c2f57e24559e66b03232300d4b27ff0f25bc452ecad",
    "dweb:/ipfs/QmYTJkc1cntYkKQ1Tu11nBcJLakiy93Tjytc4XHELo4GmR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol": {
    "keccak256": "0xb82ef33f43b6b96109687d91b39c94573fdccaaa423fe28e8ba0977b31c023e0",
    "license": "MIT",
    "urls": [
    "bzz-raw://ec9c629f63e66379f9c868a74f971064701cc6e30583872aa653f8b932518025",
    "dweb:/ipfs/QmY4MnZF2VMFwJkAwpdQwxEWA3KcGbNBKEmAVYePMVQWUR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": {
    "keccak256": "0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422",
    "license": "MIT",
    "urls": [
    "bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b",
    "dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": {
    "keccak256": "0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149",
    "license": "MIT",
    "urls": [
    "bzz-raw://d6520943ea55fdf5f0bafb39ed909f64de17051bc954ff3e88c9e5621412c79c",
    "dweb:/ipfs/QmWZ4rAKTQbNG2HxGs46AcTXShsVytKeLs7CUCdCSv5N7a"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol": {
    "keccak256": "0xb1561a6950b1aaa504c8f81b7d46bccfa77ccd10de3eb865cf34b1acd5ad505e",
    "license": "MIT",
    "urls": [
    "bzz-raw://9a56cb91629dacd161be24908fbf94315f3f45dd6fee8dad82b27af853cbc4ee",
    "dweb:/ipfs/QmNfEzdf4NTpxyhzWKAmeDwwSpJ6ZjNizK3GXw3TEuTTgn"
    ]
    },
    "contracts/FlashLiquidator.sol": {
    "keccak256": "0xc25bd5e47e982df9423525f9d200040f9fb38c7452baf49f3c904bf1a4301699",
    "urls": [
    "bzz-raw://31ea053099740751cf3aaa6a606afbdd28c8ad8e13452d008bc3c16732eb6f93",
    "dweb:/ipfs/QmY1nfhF67uDfwfEFZkdFqZMc7i6PzFDY5JTu6oy4HJkUs"
    ]
    }
    },
    "version": 1
    }
    70 changes: 70 additions & 0 deletions contracts...artifacts...ICollateralTokenAdapter.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,70 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "deployedBytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "gasEstimates": null,
    "methodIdentifiers": {
    "bookKeeper()": "e3b3932a"
    }
    },
    "abi": [
    {
    "inputs": [],
    "name": "bookKeeper",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    }
    ]
    }
    59 changes: 59 additions & 0 deletions contracts...artifacts...ICollateralTokenAdapter_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,59 @@
    {
    "compiler": {
    "version": "0.8.17+commit.8df45f5f"
    },
    "language": "Solidity",
    "output": {
    "abi": [
    {
    "inputs": [],
    "name": "bookKeeper",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    }
    ],
    "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/ICollateralTokenAdapter.sol": "ICollateralTokenAdapter"
    },
    "evmVersion": "london",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "contracts/ICollateralTokenAdapter.sol": {
    "keccak256": "0xfc5a8cec3e4d0a665d5379e0264247208bf989f7e4d1138e3324d0ff6f0f6f03",
    "license": "AGPL-3.0-or-later",
    "urls": [
    "bzz-raw://67216c4ac725c5e2d49039ef438161fced042a346e6aa3ab70d66763962ffe51",
    "dweb:/ipfs/Qmdaesbp9G3jSoAcetZLBnLiVeUPsfUcpTENAebeADv3rg"
    ]
    }
    },
    "version": 1
    }
    70 changes: 70 additions & 0 deletions contracts...artifacts...ICounter.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,70 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "deployedBytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "gasEstimates": null,
    "methodIdentifiers": {
    "counter()": "61bc221a"
    }
    },
    "abi": [
    {
    "inputs": [],
    "name": "counter",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    }
    ]
    }
    59 changes: 59 additions & 0 deletions contracts...artifacts...ICounter_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,59 @@
    {
    "compiler": {
    "version": "0.8.17+commit.8df45f5f"
    },
    "language": "Solidity",
    "output": {
    "abi": [
    {
    "inputs": [],
    "name": "counter",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    }
    ],
    "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/ICounter.sol": "ICounter"
    },
    "evmVersion": "london",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "contracts/ICounter.sol": {
    "keccak256": "0xa68371209dffbb058a40fb0863ebe4ca50a39c338cfc31213c239c8fdc78816d",
    "license": "AGPL-3.0-or-later",
    "urls": [
    "bzz-raw://da77814d7bb4834adea9ad219f19f46f3f6dd39ab9122bd9bdecd92c421c7aaf",
    "dweb:/ipfs/QmZe2sTXwoEQAAN6E9J57SFciTS7Qr9H83kFd4q5fdZwwT"
    ]
    }
    },
    "version": 1
    }
    76 changes: 76 additions & 0 deletions contracts...artifacts...IERC165.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,76 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "deployedBytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "gasEstimates": null,
    "methodIdentifiers": {
    "supportsInterface(bytes4)": "01ffc9a7"
    }
    },
    "abi": [
    {
    "inputs": [
    {
    "internalType": "bytes4",
    "name": "interfaceId",
    "type": "bytes4"
    }
    ],
    "name": "supportsInterface",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    }
    ]
    }
    124 changes: 124 additions & 0 deletions contracts...artifacts...IERC165_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,124 @@
    {
    "compiler": {
    "version": "0.8.17+commit.8df45f5f"
    },
    "language": "Solidity",
    "output": {
    "abi": [
    {
    "inputs": [
    {
    "internalType": "bytes4",
    "name": "interfaceId",
    "type": "bytes4"
    }
    ],
    "name": "supportsInterface",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    }
    ],
    "devdoc": {
    "kind": "dev",
    "methods": {
    "supportsInterface(bytes4)": {
    "details": "Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas."
    }
    },
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/FlashLiquidator.sol": "IERC165"
    },
    "evmVersion": "london",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": {
    "keccak256": "0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98",
    "license": "MIT",
    "urls": [
    "bzz-raw://99c8cb3cd19a44bbfb6612605affb7d8b06cee1f6aa9362a37a8672b4f7eeaf8",
    "dweb:/ipfs/QmasyxFDBUp7k5KFgfDWEzM8PYSKEq7GVznzMJ1VxVRF4B"
    ]
    },
    "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": {
    "keccak256": "0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794",
    "license": "MIT",
    "urls": [
    "bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e",
    "dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": {
    "keccak256": "0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250",
    "license": "MIT",
    "urls": [
    "bzz-raw://9c7d1f5e15633ab912b74c2f57e24559e66b03232300d4b27ff0f25bc452ecad",
    "dweb:/ipfs/QmYTJkc1cntYkKQ1Tu11nBcJLakiy93Tjytc4XHELo4GmR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol": {
    "keccak256": "0xb82ef33f43b6b96109687d91b39c94573fdccaaa423fe28e8ba0977b31c023e0",
    "license": "MIT",
    "urls": [
    "bzz-raw://ec9c629f63e66379f9c868a74f971064701cc6e30583872aa653f8b932518025",
    "dweb:/ipfs/QmY4MnZF2VMFwJkAwpdQwxEWA3KcGbNBKEmAVYePMVQWUR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": {
    "keccak256": "0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422",
    "license": "MIT",
    "urls": [
    "bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b",
    "dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": {
    "keccak256": "0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149",
    "license": "MIT",
    "urls": [
    "bzz-raw://d6520943ea55fdf5f0bafb39ed909f64de17051bc954ff3e88c9e5621412c79c",
    "dweb:/ipfs/QmWZ4rAKTQbNG2HxGs46AcTXShsVytKeLs7CUCdCSv5N7a"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol": {
    "keccak256": "0xb1561a6950b1aaa504c8f81b7d46bccfa77ccd10de3eb865cf34b1acd5ad505e",
    "license": "MIT",
    "urls": [
    "bzz-raw://9a56cb91629dacd161be24908fbf94315f3f45dd6fee8dad82b27af853cbc4ee",
    "dweb:/ipfs/QmNfEzdf4NTpxyhzWKAmeDwwSpJ6ZjNizK3GXw3TEuTTgn"
    ]
    },
    "contracts/FlashLiquidator.sol": {
    "keccak256": "0xc25bd5e47e982df9423525f9d200040f9fb38c7452baf49f3c904bf1a4301699",
    "urls": [
    "bzz-raw://31ea053099740751cf3aaa6a606afbdd28c8ad8e13452d008bc3c16732eb6f93",
    "dweb:/ipfs/QmY1nfhF67uDfwfEFZkdFqZMc7i6PzFDY5JTu6oy4HJkUs"
    ]
    }
    },
    "version": 1
    }
    181 changes: 181 additions & 0 deletions contracts...artifacts...IERC20.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,181 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "deployedBytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "gasEstimates": null,
    "methodIdentifiers": {
    "allowance(address,address)": "dd62ed3e",
    "approve(address,uint256)": "095ea7b3",
    "balanceOf(address)": "70a08231",
    "transfer(address,uint256)": "a9059cbb",
    "transferFrom(address,address,uint256)": "23b872dd"
    }
    },
    "abi": [
    {
    "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": "value",
    "type": "uint256"
    }
    ],
    "name": "approve",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "owner",
    "type": "address"
    }
    ],
    "name": "balanceOf",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "to",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "value",
    "type": "uint256"
    }
    ],
    "name": "transfer",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "from",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "to",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "amount",
    "type": "uint256"
    }
    ],
    "name": "transferFrom",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ]
    }
    225 changes: 225 additions & 0 deletions contracts...artifacts...IERC20_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,225 @@
    {
    "compiler": {
    "version": "0.8.17+commit.8df45f5f"
    },
    "language": "Solidity",
    "output": {
    "abi": [
    {
    "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": "value",
    "type": "uint256"
    }
    ],
    "name": "approve",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "owner",
    "type": "address"
    }
    ],
    "name": "balanceOf",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "to",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "value",
    "type": "uint256"
    }
    ],
    "name": "transfer",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "from",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "to",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "amount",
    "type": "uint256"
    }
    ],
    "name": "transferFrom",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ],
    "devdoc": {
    "kind": "dev",
    "methods": {
    "transferFrom(address,address,uint256)": {
    "details": "Moves `amount` tokens from `from` to `to` 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."
    }
    },
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/FlashLiquidator.sol": "IERC20"
    },
    "evmVersion": "london",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": {
    "keccak256": "0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98",
    "license": "MIT",
    "urls": [
    "bzz-raw://99c8cb3cd19a44bbfb6612605affb7d8b06cee1f6aa9362a37a8672b4f7eeaf8",
    "dweb:/ipfs/QmasyxFDBUp7k5KFgfDWEzM8PYSKEq7GVznzMJ1VxVRF4B"
    ]
    },
    "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": {
    "keccak256": "0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794",
    "license": "MIT",
    "urls": [
    "bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e",
    "dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": {
    "keccak256": "0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250",
    "license": "MIT",
    "urls": [
    "bzz-raw://9c7d1f5e15633ab912b74c2f57e24559e66b03232300d4b27ff0f25bc452ecad",
    "dweb:/ipfs/QmYTJkc1cntYkKQ1Tu11nBcJLakiy93Tjytc4XHELo4GmR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol": {
    "keccak256": "0xb82ef33f43b6b96109687d91b39c94573fdccaaa423fe28e8ba0977b31c023e0",
    "license": "MIT",
    "urls": [
    "bzz-raw://ec9c629f63e66379f9c868a74f971064701cc6e30583872aa653f8b932518025",
    "dweb:/ipfs/QmY4MnZF2VMFwJkAwpdQwxEWA3KcGbNBKEmAVYePMVQWUR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": {
    "keccak256": "0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422",
    "license": "MIT",
    "urls": [
    "bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b",
    "dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": {
    "keccak256": "0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149",
    "license": "MIT",
    "urls": [
    "bzz-raw://d6520943ea55fdf5f0bafb39ed909f64de17051bc954ff3e88c9e5621412c79c",
    "dweb:/ipfs/QmWZ4rAKTQbNG2HxGs46AcTXShsVytKeLs7CUCdCSv5N7a"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol": {
    "keccak256": "0xb1561a6950b1aaa504c8f81b7d46bccfa77ccd10de3eb865cf34b1acd5ad505e",
    "license": "MIT",
    "urls": [
    "bzz-raw://9a56cb91629dacd161be24908fbf94315f3f45dd6fee8dad82b27af853cbc4ee",
    "dweb:/ipfs/QmNfEzdf4NTpxyhzWKAmeDwwSpJ6ZjNizK3GXw3TEuTTgn"
    ]
    },
    "contracts/FlashLiquidator.sol": {
    "keccak256": "0xc25bd5e47e982df9423525f9d200040f9fb38c7452baf49f3c904bf1a4301699",
    "urls": [
    "bzz-raw://31ea053099740751cf3aaa6a606afbdd28c8ad8e13452d008bc3c16732eb6f93",
    "dweb:/ipfs/QmY1nfhF67uDfwfEFZkdFqZMc7i6PzFDY5JTu6oy4HJkUs"
    ]
    }
    },
    "version": 1
    }
    85 changes: 85 additions & 0 deletions contracts...artifacts...IFlashLendingCallee.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,85 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "deployedBytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "gasEstimates": null,
    "methodIdentifiers": {
    "flashLendingCall(address,uint256,uint256,bytes)": "af7bd142"
    }
    },
    "abi": [
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "caller",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "debtValueToRepay",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "collateralAmountToLiquidate",
    "type": "uint256"
    },
    {
    "internalType": "bytes",
    "name": "",
    "type": "bytes"
    }
    ],
    "name": "flashLendingCall",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ]
    }
    129 changes: 129 additions & 0 deletions contracts...artifacts...IFlashLendingCallee_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,129 @@
    {
    "compiler": {
    "version": "0.8.17+commit.8df45f5f"
    },
    "language": "Solidity",
    "output": {
    "abi": [
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "caller",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "debtValueToRepay",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "collateralAmountToLiquidate",
    "type": "uint256"
    },
    {
    "internalType": "bytes",
    "name": "",
    "type": "bytes"
    }
    ],
    "name": "flashLendingCall",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ],
    "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/FlashLiquidator.sol": "IFlashLendingCallee"
    },
    "evmVersion": "london",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": {
    "keccak256": "0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98",
    "license": "MIT",
    "urls": [
    "bzz-raw://99c8cb3cd19a44bbfb6612605affb7d8b06cee1f6aa9362a37a8672b4f7eeaf8",
    "dweb:/ipfs/QmasyxFDBUp7k5KFgfDWEzM8PYSKEq7GVznzMJ1VxVRF4B"
    ]
    },
    "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": {
    "keccak256": "0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794",
    "license": "MIT",
    "urls": [
    "bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e",
    "dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": {
    "keccak256": "0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250",
    "license": "MIT",
    "urls": [
    "bzz-raw://9c7d1f5e15633ab912b74c2f57e24559e66b03232300d4b27ff0f25bc452ecad",
    "dweb:/ipfs/QmYTJkc1cntYkKQ1Tu11nBcJLakiy93Tjytc4XHELo4GmR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol": {
    "keccak256": "0xb82ef33f43b6b96109687d91b39c94573fdccaaa423fe28e8ba0977b31c023e0",
    "license": "MIT",
    "urls": [
    "bzz-raw://ec9c629f63e66379f9c868a74f971064701cc6e30583872aa653f8b932518025",
    "dweb:/ipfs/QmY4MnZF2VMFwJkAwpdQwxEWA3KcGbNBKEmAVYePMVQWUR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": {
    "keccak256": "0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422",
    "license": "MIT",
    "urls": [
    "bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b",
    "dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": {
    "keccak256": "0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149",
    "license": "MIT",
    "urls": [
    "bzz-raw://d6520943ea55fdf5f0bafb39ed909f64de17051bc954ff3e88c9e5621412c79c",
    "dweb:/ipfs/QmWZ4rAKTQbNG2HxGs46AcTXShsVytKeLs7CUCdCSv5N7a"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol": {
    "keccak256": "0xb1561a6950b1aaa504c8f81b7d46bccfa77ccd10de3eb865cf34b1acd5ad505e",
    "license": "MIT",
    "urls": [
    "bzz-raw://9a56cb91629dacd161be24908fbf94315f3f45dd6fee8dad82b27af853cbc4ee",
    "dweb:/ipfs/QmNfEzdf4NTpxyhzWKAmeDwwSpJ6ZjNizK3GXw3TEuTTgn"
    ]
    },
    "contracts/FlashLiquidator.sol": {
    "keccak256": "0xc25bd5e47e982df9423525f9d200040f9fb38c7452baf49f3c904bf1a4301699",
    "urls": [
    "bzz-raw://31ea053099740751cf3aaa6a606afbdd28c8ad8e13452d008bc3c16732eb6f93",
    "dweb:/ipfs/QmY1nfhF67uDfwfEFZkdFqZMc7i6PzFDY5JTu6oy4HJkUs"
    ]
    }
    },
    "version": 1
    }
    209 changes: 209 additions & 0 deletions contracts...artifacts...IGenericTokenAdapter.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,209 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "deployedBytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "gasEstimates": null,
    "methodIdentifiers": {
    "collateralPoolId()": "dca07dc5",
    "collateralToken()": "b2016bd4",
    "decimals()": "313ce567",
    "deposit(address,uint256,bytes)": "49bdc2b8",
    "onAdjustPosition(address,address,int256,int256,bytes)": "f77c4036",
    "onMoveCollateral(address,address,uint256,bytes)": "99443616",
    "withdraw(address,uint256,bytes)": "31f09265"
    }
    },
    "abi": [
    {
    "inputs": [],
    "name": "collateralPoolId",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "collateralToken",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "decimals",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "positionAddress",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "wad",
    "type": "uint256"
    },
    {
    "internalType": "bytes",
    "name": "data",
    "type": "bytes"
    }
    ],
    "name": "deposit",
    "outputs": [],
    "stateMutability": "payable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "src",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "dst",
    "type": "address"
    },
    {
    "internalType": "int256",
    "name": "collateralValue",
    "type": "int256"
    },
    {
    "internalType": "int256",
    "name": "debtShare",
    "type": "int256"
    },
    {
    "internalType": "bytes",
    "name": "data",
    "type": "bytes"
    }
    ],
    "name": "onAdjustPosition",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "src",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "dst",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "wad",
    "type": "uint256"
    },
    {
    "internalType": "bytes",
    "name": "data",
    "type": "bytes"
    }
    ],
    "name": "onMoveCollateral",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "positionAddress",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "wad",
    "type": "uint256"
    },
    {
    "internalType": "bytes",
    "name": "data",
    "type": "bytes"
    }
    ],
    "name": "withdraw",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ]
    }
    247 changes: 247 additions & 0 deletions contracts...artifacts...IGenericTokenAdapter_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,247 @@
    {
    "compiler": {
    "version": "0.8.17+commit.8df45f5f"
    },
    "language": "Solidity",
    "output": {
    "abi": [
    {
    "inputs": [],
    "name": "collateralPoolId",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "collateralToken",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "decimals",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "positionAddress",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "wad",
    "type": "uint256"
    },
    {
    "internalType": "bytes",
    "name": "data",
    "type": "bytes"
    }
    ],
    "name": "deposit",
    "outputs": [],
    "stateMutability": "payable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "src",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "dst",
    "type": "address"
    },
    {
    "internalType": "int256",
    "name": "collateralValue",
    "type": "int256"
    },
    {
    "internalType": "int256",
    "name": "debtShare",
    "type": "int256"
    },
    {
    "internalType": "bytes",
    "name": "data",
    "type": "bytes"
    }
    ],
    "name": "onAdjustPosition",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "src",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "dst",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "wad",
    "type": "uint256"
    },
    {
    "internalType": "bytes",
    "name": "data",
    "type": "bytes"
    }
    ],
    "name": "onMoveCollateral",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "positionAddress",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "wad",
    "type": "uint256"
    },
    {
    "internalType": "bytes",
    "name": "data",
    "type": "bytes"
    }
    ],
    "name": "withdraw",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ],
    "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/FlashLiquidator.sol": "IGenericTokenAdapter"
    },
    "evmVersion": "london",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": {
    "keccak256": "0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98",
    "license": "MIT",
    "urls": [
    "bzz-raw://99c8cb3cd19a44bbfb6612605affb7d8b06cee1f6aa9362a37a8672b4f7eeaf8",
    "dweb:/ipfs/QmasyxFDBUp7k5KFgfDWEzM8PYSKEq7GVznzMJ1VxVRF4B"
    ]
    },
    "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": {
    "keccak256": "0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794",
    "license": "MIT",
    "urls": [
    "bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e",
    "dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": {
    "keccak256": "0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250",
    "license": "MIT",
    "urls": [
    "bzz-raw://9c7d1f5e15633ab912b74c2f57e24559e66b03232300d4b27ff0f25bc452ecad",
    "dweb:/ipfs/QmYTJkc1cntYkKQ1Tu11nBcJLakiy93Tjytc4XHELo4GmR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol": {
    "keccak256": "0xb82ef33f43b6b96109687d91b39c94573fdccaaa423fe28e8ba0977b31c023e0",
    "license": "MIT",
    "urls": [
    "bzz-raw://ec9c629f63e66379f9c868a74f971064701cc6e30583872aa653f8b932518025",
    "dweb:/ipfs/QmY4MnZF2VMFwJkAwpdQwxEWA3KcGbNBKEmAVYePMVQWUR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": {
    "keccak256": "0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422",
    "license": "MIT",
    "urls": [
    "bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b",
    "dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": {
    "keccak256": "0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149",
    "license": "MIT",
    "urls": [
    "bzz-raw://d6520943ea55fdf5f0bafb39ed909f64de17051bc954ff3e88c9e5621412c79c",
    "dweb:/ipfs/QmWZ4rAKTQbNG2HxGs46AcTXShsVytKeLs7CUCdCSv5N7a"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol": {
    "keccak256": "0xb1561a6950b1aaa504c8f81b7d46bccfa77ccd10de3eb865cf34b1acd5ad505e",
    "license": "MIT",
    "urls": [
    "bzz-raw://9a56cb91629dacd161be24908fbf94315f3f45dd6fee8dad82b27af853cbc4ee",
    "dweb:/ipfs/QmNfEzdf4NTpxyhzWKAmeDwwSpJ6ZjNizK3GXw3TEuTTgn"
    ]
    },
    "contracts/FlashLiquidator.sol": {
    "keccak256": "0xc25bd5e47e982df9423525f9d200040f9fb38c7452baf49f3c904bf1a4301699",
    "urls": [
    "bzz-raw://31ea053099740751cf3aaa6a606afbdd28c8ad8e13452d008bc3c16732eb6f93",
    "dweb:/ipfs/QmY1nfhF67uDfwfEFZkdFqZMc7i6PzFDY5JTu6oy4HJkUs"
    ]
    }
    },
    "version": 1
    }
    76 changes: 76 additions & 0 deletions contracts...artifacts...ILiqEngn.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,76 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "deployedBytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "gasEstimates": null,
    "methodIdentifiers": {
    "positions(uint256)": "99fbab88"
    }
    },
    "abi": [
    {
    "inputs": [
    {
    "internalType": "uint256",
    "name": "_kk",
    "type": "uint256"
    }
    ],
    "name": "positions",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    }
    ]
    }
    65 changes: 65 additions & 0 deletions contracts...artifacts...ILiqEngn_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,65 @@
    {
    "compiler": {
    "version": "0.8.17+commit.8df45f5f"
    },
    "language": "Solidity",
    "output": {
    "abi": [
    {
    "inputs": [
    {
    "internalType": "uint256",
    "name": "_kk",
    "type": "uint256"
    }
    ],
    "name": "positions",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    }
    ],
    "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/IPeekPrice.sol": "ILiqEngn"
    },
    "evmVersion": "london",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "contracts/IPeekPrice.sol": {
    "keccak256": "0x4166f55b138cf6d36b547e57302ff29489762db7a1e7021fe1cd85858704f221",
    "license": "AGPL-3.0-or-later",
    "urls": [
    "bzz-raw://340d40606961f59b32f49d80e5294ba9c6f7402cedf008f977a991d2ba6cfb09",
    "dweb:/ipfs/QmNMfSaCMzyFWb9weZ6p1QoHsWJDxyN3wDWizfSnUfiSjt"
    ]
    }
    },
    "version": 1
    }
    110 changes: 110 additions & 0 deletions contracts...artifacts...ILiquidationStrategy.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,110 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "deployedBytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "gasEstimates": null,
    "methodIdentifiers": {
    "execute(bytes32,uint256,uint256,address,uint256,uint256,address,address,bytes)": "16d8d291"
    }
    },
    "abi": [
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "collateralPoolId",
    "type": "bytes32"
    },
    {
    "internalType": "uint256",
    "name": "positionDebtShare",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "positionCollateralAmount",
    "type": "uint256"
    },
    {
    "internalType": "address",
    "name": "positionAddress",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "debtShareToBeLiquidated",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "maxDebtShareToBeLiquidated",
    "type": "uint256"
    },
    {
    "internalType": "address",
    "name": "_liquidatorAddress",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "collateralRecipient",
    "type": "address"
    },
    {
    "internalType": "bytes",
    "name": "data",
    "type": "bytes"
    }
    ],
    "name": "execute",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ]
    }
    154 changes: 154 additions & 0 deletions contracts...artifacts...ILiquidationStrategy_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,154 @@
    {
    "compiler": {
    "version": "0.8.17+commit.8df45f5f"
    },
    "language": "Solidity",
    "output": {
    "abi": [
    {
    "inputs": [
    {
    "internalType": "bytes32",
    "name": "collateralPoolId",
    "type": "bytes32"
    },
    {
    "internalType": "uint256",
    "name": "positionDebtShare",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "positionCollateralAmount",
    "type": "uint256"
    },
    {
    "internalType": "address",
    "name": "positionAddress",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "debtShareToBeLiquidated",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "maxDebtShareToBeLiquidated",
    "type": "uint256"
    },
    {
    "internalType": "address",
    "name": "_liquidatorAddress",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "collateralRecipient",
    "type": "address"
    },
    {
    "internalType": "bytes",
    "name": "data",
    "type": "bytes"
    }
    ],
    "name": "execute",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ],
    "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/FlashLiquidator.sol": "ILiquidationStrategy"
    },
    "evmVersion": "london",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": {
    "keccak256": "0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98",
    "license": "MIT",
    "urls": [
    "bzz-raw://99c8cb3cd19a44bbfb6612605affb7d8b06cee1f6aa9362a37a8672b4f7eeaf8",
    "dweb:/ipfs/QmasyxFDBUp7k5KFgfDWEzM8PYSKEq7GVznzMJ1VxVRF4B"
    ]
    },
    "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": {
    "keccak256": "0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794",
    "license": "MIT",
    "urls": [
    "bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e",
    "dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": {
    "keccak256": "0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250",
    "license": "MIT",
    "urls": [
    "bzz-raw://9c7d1f5e15633ab912b74c2f57e24559e66b03232300d4b27ff0f25bc452ecad",
    "dweb:/ipfs/QmYTJkc1cntYkKQ1Tu11nBcJLakiy93Tjytc4XHELo4GmR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol": {
    "keccak256": "0xb82ef33f43b6b96109687d91b39c94573fdccaaa423fe28e8ba0977b31c023e0",
    "license": "MIT",
    "urls": [
    "bzz-raw://ec9c629f63e66379f9c868a74f971064701cc6e30583872aa653f8b932518025",
    "dweb:/ipfs/QmY4MnZF2VMFwJkAwpdQwxEWA3KcGbNBKEmAVYePMVQWUR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": {
    "keccak256": "0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422",
    "license": "MIT",
    "urls": [
    "bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b",
    "dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": {
    "keccak256": "0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149",
    "license": "MIT",
    "urls": [
    "bzz-raw://d6520943ea55fdf5f0bafb39ed909f64de17051bc954ff3e88c9e5621412c79c",
    "dweb:/ipfs/QmWZ4rAKTQbNG2HxGs46AcTXShsVytKeLs7CUCdCSv5N7a"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol": {
    "keccak256": "0xb1561a6950b1aaa504c8f81b7d46bccfa77ccd10de3eb865cf34b1acd5ad505e",
    "license": "MIT",
    "urls": [
    "bzz-raw://9a56cb91629dacd161be24908fbf94315f3f45dd6fee8dad82b27af853cbc4ee",
    "dweb:/ipfs/QmNfEzdf4NTpxyhzWKAmeDwwSpJ6ZjNizK3GXw3TEuTTgn"
    ]
    },
    "contracts/FlashLiquidator.sol": {
    "keccak256": "0xc25bd5e47e982df9423525f9d200040f9fb38c7452baf49f3c904bf1a4301699",
    "urls": [
    "bzz-raw://31ea053099740751cf3aaa6a606afbdd28c8ad8e13452d008bc3c16732eb6f93",
    "dweb:/ipfs/QmY1nfhF67uDfwfEFZkdFqZMc7i6PzFDY5JTu6oy4HJkUs"
    ]
    }
    },
    "version": 1
    }
    64 changes: 64 additions & 0 deletions contracts...artifacts...IPeekPrice.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,64 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "deployedBytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "gasEstimates": null,
    "methodIdentifiers": {
    "peekPrice()": "140d2720"
    }
    },
    "abi": [
    {
    "inputs": [],
    "name": "peekPrice",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ]
    }
    53 changes: 53 additions & 0 deletions contracts...artifacts...IPeekPrice_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,53 @@
    {
    "compiler": {
    "version": "0.8.17+commit.8df45f5f"
    },
    "language": "Solidity",
    "output": {
    "abi": [
    {
    "inputs": [],
    "name": "peekPrice",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ],
    "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/IPeekPrice.sol": "IPeekPrice"
    },
    "evmVersion": "london",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "contracts/IPeekPrice.sol": {
    "keccak256": "0x468b7f8034d2122e59e3abb49271d837c1f64c50080752f2d42ebcc05fbac1eb",
    "license": "AGPL-3.0-or-later",
    "urls": [
    "bzz-raw://323d62019a1535815aa627188c8face8ab04797335d6cf44db56e322a19d6378",
    "dweb:/ipfs/QmYyFQ1GsDZa84HeCgYtrgUZS435LATr2jSf8993PkeAnN"
    ]
    }
    },
    "version": 1
    }
    131 changes: 131 additions & 0 deletions contracts...artifacts...IPriceFeed.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,131 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "deployedBytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "gasEstimates": null,
    "methodIdentifiers": {
    "isPriceOk()": "0184a92a",
    "peekPrice()": "140d2720",
    "poolId()": "3e0dc34e",
    "readPrice()": "7e91400f",
    "setPrice(uint256)": "91b7f5ed"
    }
    },
    "abi": [
    {
    "inputs": [],
    "name": "isPriceOk",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "peekPrice",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    },
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "poolId",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "readPrice",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "uint256",
    "name": "_price",
    "type": "uint256"
    }
    ],
    "name": "setPrice",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ]
    }
    171 changes: 171 additions & 0 deletions contracts...artifacts...IPriceFeed_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,171 @@
    {
    "compiler": {
    "version": "0.8.17+commit.8df45f5f"
    },
    "language": "Solidity",
    "output": {
    "abi": [
    {
    "inputs": [],
    "name": "isPriceOk",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "peekPrice",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    },
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "poolId",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "readPrice",
    "outputs": [
    {
    "internalType": "bytes32",
    "name": "",
    "type": "bytes32"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "uint256",
    "name": "_price",
    "type": "uint256"
    }
    ],
    "name": "setPrice",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ],
    "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/FlashLiquidator.sol": "IPriceFeed"
    },
    "evmVersion": "london",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": {
    "keccak256": "0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98",
    "license": "MIT",
    "urls": [
    "bzz-raw://99c8cb3cd19a44bbfb6612605affb7d8b06cee1f6aa9362a37a8672b4f7eeaf8",
    "dweb:/ipfs/QmasyxFDBUp7k5KFgfDWEzM8PYSKEq7GVznzMJ1VxVRF4B"
    ]
    },
    "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": {
    "keccak256": "0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794",
    "license": "MIT",
    "urls": [
    "bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e",
    "dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": {
    "keccak256": "0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250",
    "license": "MIT",
    "urls": [
    "bzz-raw://9c7d1f5e15633ab912b74c2f57e24559e66b03232300d4b27ff0f25bc452ecad",
    "dweb:/ipfs/QmYTJkc1cntYkKQ1Tu11nBcJLakiy93Tjytc4XHELo4GmR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol": {
    "keccak256": "0xb82ef33f43b6b96109687d91b39c94573fdccaaa423fe28e8ba0977b31c023e0",
    "license": "MIT",
    "urls": [
    "bzz-raw://ec9c629f63e66379f9c868a74f971064701cc6e30583872aa653f8b932518025",
    "dweb:/ipfs/QmY4MnZF2VMFwJkAwpdQwxEWA3KcGbNBKEmAVYePMVQWUR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": {
    "keccak256": "0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422",
    "license": "MIT",
    "urls": [
    "bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b",
    "dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": {
    "keccak256": "0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149",
    "license": "MIT",
    "urls": [
    "bzz-raw://d6520943ea55fdf5f0bafb39ed909f64de17051bc954ff3e88c9e5621412c79c",
    "dweb:/ipfs/QmWZ4rAKTQbNG2HxGs46AcTXShsVytKeLs7CUCdCSv5N7a"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol": {
    "keccak256": "0xb1561a6950b1aaa504c8f81b7d46bccfa77ccd10de3eb865cf34b1acd5ad505e",
    "license": "MIT",
    "urls": [
    "bzz-raw://9a56cb91629dacd161be24908fbf94315f3f45dd6fee8dad82b27af853cbc4ee",
    "dweb:/ipfs/QmNfEzdf4NTpxyhzWKAmeDwwSpJ6ZjNizK3GXw3TEuTTgn"
    ]
    },
    "contracts/FlashLiquidator.sol": {
    "keccak256": "0xc25bd5e47e982df9423525f9d200040f9fb38c7452baf49f3c904bf1a4301699",
    "urls": [
    "bzz-raw://31ea053099740751cf3aaa6a606afbdd28c8ad8e13452d008bc3c16732eb6f93",
    "dweb:/ipfs/QmY1nfhF67uDfwfEFZkdFqZMc7i6PzFDY5JTu6oy4HJkUs"
    ]
    }
    },
    "version": 1
    }
    76 changes: 76 additions & 0 deletions contracts...artifacts...IProxyWallet.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,76 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "deployedBytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "gasEstimates": null,
    "methodIdentifiers": {
    "execute(bytes)": "09c5eabe"
    }
    },
    "abi": [
    {
    "inputs": [
    {
    "internalType": "bytes",
    "name": "_data",
    "type": "bytes"
    }
    ],
    "name": "execute",
    "outputs": [
    {
    "internalType": "bytes",
    "name": "_response",
    "type": "bytes"
    }
    ],
    "stateMutability": "payable",
    "type": "function"
    }
    ]
    }
    96 changes: 96 additions & 0 deletions contracts...artifacts...IProxyWalletRegistry.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,96 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "deployedBytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "gasEstimates": null,
    "methodIdentifiers": {
    "build(address)": "f3701da2",
    "proxies(address)": "c4552791"
    }
    },
    "abi": [
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "owner",
    "type": "address"
    }
    ],
    "name": "build",
    "outputs": [
    {
    "internalType": "address payable",
    "name": "_proxy",
    "type": "address"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "owner",
    "type": "address"
    }
    ],
    "name": "proxies",
    "outputs": [
    {
    "internalType": "address",
    "name": "_proxy",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    }
    ]
    }
    84 changes: 84 additions & 0 deletions contracts...artifacts...IProxyWalletRegistry_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,84 @@
    {
    "compiler": {
    "version": "0.8.17+commit.8df45f5f"
    },
    "language": "Solidity",
    "output": {
    "abi": [
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "owner",
    "type": "address"
    }
    ],
    "name": "build",
    "outputs": [
    {
    "internalType": "address payable",
    "name": "_proxy",
    "type": "address"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "owner",
    "type": "address"
    }
    ],
    "name": "proxies",
    "outputs": [
    {
    "internalType": "address",
    "name": "_proxy",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    }
    ],
    "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/IProxyWalletRegistry.sol": "IProxyWalletRegistry"
    },
    "evmVersion": "london",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "contracts/IProxyWalletRegistry.sol": {
    "keccak256": "0x5cfd9df6929ea3e32365deece06831847228c03d898c7de46b8ade2b4c7f7212",
    "license": "AGPL-3.0-or-later",
    "urls": [
    "bzz-raw://32cb9f8c85d2f1df7fd7ca6c54acdfad55ea8f0e1ddbd4b0765e4e7d708c09f3",
    "dweb:/ipfs/QmPTtZMKD3WpUHiBMkhZNoi3uqYii5CQbqiub6DVRfp9V6"
    ]
    }
    },
    "version": 1
    }
    65 changes: 65 additions & 0 deletions contracts...artifacts...IProxyWallet_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,65 @@
    {
    "compiler": {
    "version": "0.8.17+commit.8df45f5f"
    },
    "language": "Solidity",
    "output": {
    "abi": [
    {
    "inputs": [
    {
    "internalType": "bytes",
    "name": "_data",
    "type": "bytes"
    }
    ],
    "name": "execute",
    "outputs": [
    {
    "internalType": "bytes",
    "name": "_response",
    "type": "bytes"
    }
    ],
    "stateMutability": "payable",
    "type": "function"
    }
    ],
    "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/IProxyWallet.sol": "IProxyWallet"
    },
    "evmVersion": "london",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "contracts/IProxyWallet.sol": {
    "keccak256": "0xcc2aa15ef17d7869688fd37b688e3a250171e26db47fbd234ed0914c054701c4",
    "license": "AGPL-3.0-or-later",
    "urls": [
    "bzz-raw://0f4f42f579e4a9a564c29abe34b7871e771351d8da0f9764ee1ec3e07713831d",
    "dweb:/ipfs/QmT3fKMevSYRYNh59rLEDHJUPKBQdTVPtWuuymhESZi2eQ"
    ]
    }
    },
    "version": 1
    }
    169 changes: 169 additions & 0 deletions contracts...artifacts...IStableSwapModule.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,169 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "deployedBytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "gasEstimates": null,
    "methodIdentifiers": {
    "depositToken(address,uint256)": "338b5dea",
    "emergencyWithdraw(address)": "6ff1c9bc",
    "feeIn()": "769a48d9",
    "swapStablecoinToToken(address,uint256)": "81e28cc7",
    "swapTokenToStablecoin(address,uint256)": "40853dce",
    "token()": "fc0c546a",
    "withdrawFees(address)": "164e68de"
    }
    },
    "abi": [
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "_token",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "_amount",
    "type": "uint256"
    }
    ],
    "name": "depositToken",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "_account",
    "type": "address"
    }
    ],
    "name": "emergencyWithdraw",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "feeIn",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "_usr",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "_tokenAmount",
    "type": "uint256"
    }
    ],
    "name": "swapStablecoinToToken",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "_usr",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "_tokenAmount",
    "type": "uint256"
    }
    ],
    "name": "swapTokenToStablecoin",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "token",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "_account",
    "type": "address"
    }
    ],
    "name": "withdrawFees",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ]
    }
    207 changes: 207 additions & 0 deletions contracts...artifacts...IStableSwapModule_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,207 @@
    {
    "compiler": {
    "version": "0.8.17+commit.8df45f5f"
    },
    "language": "Solidity",
    "output": {
    "abi": [
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "_token",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "_amount",
    "type": "uint256"
    }
    ],
    "name": "depositToken",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "_account",
    "type": "address"
    }
    ],
    "name": "emergencyWithdraw",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "feeIn",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "_usr",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "_tokenAmount",
    "type": "uint256"
    }
    ],
    "name": "swapStablecoinToToken",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "_usr",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "_tokenAmount",
    "type": "uint256"
    }
    ],
    "name": "swapTokenToStablecoin",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "token",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "_account",
    "type": "address"
    }
    ],
    "name": "withdrawFees",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ],
    "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/FlashLiquidator.sol": "IStableSwapModule"
    },
    "evmVersion": "london",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": {
    "keccak256": "0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98",
    "license": "MIT",
    "urls": [
    "bzz-raw://99c8cb3cd19a44bbfb6612605affb7d8b06cee1f6aa9362a37a8672b4f7eeaf8",
    "dweb:/ipfs/QmasyxFDBUp7k5KFgfDWEzM8PYSKEq7GVznzMJ1VxVRF4B"
    ]
    },
    "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": {
    "keccak256": "0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794",
    "license": "MIT",
    "urls": [
    "bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e",
    "dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": {
    "keccak256": "0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250",
    "license": "MIT",
    "urls": [
    "bzz-raw://9c7d1f5e15633ab912b74c2f57e24559e66b03232300d4b27ff0f25bc452ecad",
    "dweb:/ipfs/QmYTJkc1cntYkKQ1Tu11nBcJLakiy93Tjytc4XHELo4GmR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol": {
    "keccak256": "0xb82ef33f43b6b96109687d91b39c94573fdccaaa423fe28e8ba0977b31c023e0",
    "license": "MIT",
    "urls": [
    "bzz-raw://ec9c629f63e66379f9c868a74f971064701cc6e30583872aa653f8b932518025",
    "dweb:/ipfs/QmY4MnZF2VMFwJkAwpdQwxEWA3KcGbNBKEmAVYePMVQWUR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": {
    "keccak256": "0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422",
    "license": "MIT",
    "urls": [
    "bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b",
    "dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": {
    "keccak256": "0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149",
    "license": "MIT",
    "urls": [
    "bzz-raw://d6520943ea55fdf5f0bafb39ed909f64de17051bc954ff3e88c9e5621412c79c",
    "dweb:/ipfs/QmWZ4rAKTQbNG2HxGs46AcTXShsVytKeLs7CUCdCSv5N7a"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol": {
    "keccak256": "0xb1561a6950b1aaa504c8f81b7d46bccfa77ccd10de3eb865cf34b1acd5ad505e",
    "license": "MIT",
    "urls": [
    "bzz-raw://9a56cb91629dacd161be24908fbf94315f3f45dd6fee8dad82b27af853cbc4ee",
    "dweb:/ipfs/QmNfEzdf4NTpxyhzWKAmeDwwSpJ6ZjNizK3GXw3TEuTTgn"
    ]
    },
    "contracts/FlashLiquidator.sol": {
    "keccak256": "0xc25bd5e47e982df9423525f9d200040f9fb38c7452baf49f3c904bf1a4301699",
    "urls": [
    "bzz-raw://31ea053099740751cf3aaa6a606afbdd28c8ad8e13452d008bc3c16732eb6f93",
    "dweb:/ipfs/QmY1nfhF67uDfwfEFZkdFqZMc7i6PzFDY5JTu6oy4HJkUs"
    ]
    }
    },
    "version": 1
    }
    258 changes: 258 additions & 0 deletions contracts...artifacts...IStablecoin.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,258 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "deployedBytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "gasEstimates": null,
    "methodIdentifiers": {
    "approve(address,uint256)": "095ea7b3",
    "balanceOf(address)": "70a08231",
    "burn(address,uint256)": "9dc29fac",
    "decimals()": "313ce567",
    "decreaseAllowance(address,uint256)": "a457c2d7",
    "increaseAllowance(address,uint256)": "39509351",
    "mint(address,uint256)": "40c10f19",
    "transfer(address,uint256)": "a9059cbb",
    "transferFrom(address,address,uint256)": "23b872dd"
    }
    },
    "abi": [
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "name": "approve",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "name": "balanceOf",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "name": "burn",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "decimals",
    "outputs": [
    {
    "internalType": "uint8",
    "name": "",
    "type": "uint8"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "name": "decreaseAllowance",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "name": "increaseAllowance",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "name": "mint",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "name": "transfer",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "name": "transferFrom",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ]
    }
    156 changes: 156 additions & 0 deletions contracts...artifacts...IStablecoinAdapter.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,156 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "deployedBytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "gasEstimates": null,
    "methodIdentifiers": {
    "bookKeeper()": "e3b3932a",
    "deposit(address,uint256,bytes)": "49bdc2b8",
    "depositRAD(address,uint256,bytes)": "653623ab",
    "stablecoin()": "e9cbd822",
    "withdraw(address,uint256,bytes)": "31f09265"
    }
    },
    "abi": [
    {
    "inputs": [],
    "name": "bookKeeper",
    "outputs": [
    {
    "internalType": "contract IBookKeeper",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "positionAddress",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "wad",
    "type": "uint256"
    },
    {
    "internalType": "bytes",
    "name": "data",
    "type": "bytes"
    }
    ],
    "name": "deposit",
    "outputs": [],
    "stateMutability": "payable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "positionAddress",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "wad",
    "type": "uint256"
    },
    {
    "internalType": "bytes",
    "name": "data",
    "type": "bytes"
    }
    ],
    "name": "depositRAD",
    "outputs": [],
    "stateMutability": "payable",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "stablecoin",
    "outputs": [
    {
    "internalType": "contract IStablecoin",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "positionAddress",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "wad",
    "type": "uint256"
    },
    {
    "internalType": "bytes",
    "name": "data",
    "type": "bytes"
    }
    ],
    "name": "withdraw",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ]
    }
    196 changes: 196 additions & 0 deletions contracts...artifacts...IStablecoinAdapter_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,196 @@
    {
    "compiler": {
    "version": "0.8.17+commit.8df45f5f"
    },
    "language": "Solidity",
    "output": {
    "abi": [
    {
    "inputs": [],
    "name": "bookKeeper",
    "outputs": [
    {
    "internalType": "contract IBookKeeper",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "positionAddress",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "wad",
    "type": "uint256"
    },
    {
    "internalType": "bytes",
    "name": "data",
    "type": "bytes"
    }
    ],
    "name": "deposit",
    "outputs": [],
    "stateMutability": "payable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "positionAddress",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "wad",
    "type": "uint256"
    },
    {
    "internalType": "bytes",
    "name": "data",
    "type": "bytes"
    }
    ],
    "name": "depositRAD",
    "outputs": [],
    "stateMutability": "payable",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "stablecoin",
    "outputs": [
    {
    "internalType": "contract IStablecoin",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "positionAddress",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "wad",
    "type": "uint256"
    },
    {
    "internalType": "bytes",
    "name": "data",
    "type": "bytes"
    }
    ],
    "name": "withdraw",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ],
    "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/FlashLiquidator.sol": "IStablecoinAdapter"
    },
    "evmVersion": "london",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": {
    "keccak256": "0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98",
    "license": "MIT",
    "urls": [
    "bzz-raw://99c8cb3cd19a44bbfb6612605affb7d8b06cee1f6aa9362a37a8672b4f7eeaf8",
    "dweb:/ipfs/QmasyxFDBUp7k5KFgfDWEzM8PYSKEq7GVznzMJ1VxVRF4B"
    ]
    },
    "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": {
    "keccak256": "0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794",
    "license": "MIT",
    "urls": [
    "bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e",
    "dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": {
    "keccak256": "0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250",
    "license": "MIT",
    "urls": [
    "bzz-raw://9c7d1f5e15633ab912b74c2f57e24559e66b03232300d4b27ff0f25bc452ecad",
    "dweb:/ipfs/QmYTJkc1cntYkKQ1Tu11nBcJLakiy93Tjytc4XHELo4GmR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol": {
    "keccak256": "0xb82ef33f43b6b96109687d91b39c94573fdccaaa423fe28e8ba0977b31c023e0",
    "license": "MIT",
    "urls": [
    "bzz-raw://ec9c629f63e66379f9c868a74f971064701cc6e30583872aa653f8b932518025",
    "dweb:/ipfs/QmY4MnZF2VMFwJkAwpdQwxEWA3KcGbNBKEmAVYePMVQWUR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": {
    "keccak256": "0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422",
    "license": "MIT",
    "urls": [
    "bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b",
    "dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": {
    "keccak256": "0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149",
    "license": "MIT",
    "urls": [
    "bzz-raw://d6520943ea55fdf5f0bafb39ed909f64de17051bc954ff3e88c9e5621412c79c",
    "dweb:/ipfs/QmWZ4rAKTQbNG2HxGs46AcTXShsVytKeLs7CUCdCSv5N7a"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol": {
    "keccak256": "0xb1561a6950b1aaa504c8f81b7d46bccfa77ccd10de3eb865cf34b1acd5ad505e",
    "license": "MIT",
    "urls": [
    "bzz-raw://9a56cb91629dacd161be24908fbf94315f3f45dd6fee8dad82b27af853cbc4ee",
    "dweb:/ipfs/QmNfEzdf4NTpxyhzWKAmeDwwSpJ6ZjNizK3GXw3TEuTTgn"
    ]
    },
    "contracts/FlashLiquidator.sol": {
    "keccak256": "0xc25bd5e47e982df9423525f9d200040f9fb38c7452baf49f3c904bf1a4301699",
    "urls": [
    "bzz-raw://31ea053099740751cf3aaa6a606afbdd28c8ad8e13452d008bc3c16732eb6f93",
    "dweb:/ipfs/QmY1nfhF67uDfwfEFZkdFqZMc7i6PzFDY5JTu6oy4HJkUs"
    ]
    }
    },
    "version": 1
    }
    294 changes: 294 additions & 0 deletions contracts...artifacts...IStablecoin_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,294 @@
    {
    "compiler": {
    "version": "0.8.17+commit.8df45f5f"
    },
    "language": "Solidity",
    "output": {
    "abi": [
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "name": "approve",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "name": "balanceOf",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "name": "burn",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "decimals",
    "outputs": [
    {
    "internalType": "uint8",
    "name": "",
    "type": "uint8"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "name": "decreaseAllowance",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "name": "increaseAllowance",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "name": "mint",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "name": "transfer",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "name": "transferFrom",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ],
    "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/FlashLiquidator.sol": "IStablecoin"
    },
    "evmVersion": "london",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": {
    "keccak256": "0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98",
    "license": "MIT",
    "urls": [
    "bzz-raw://99c8cb3cd19a44bbfb6612605affb7d8b06cee1f6aa9362a37a8672b4f7eeaf8",
    "dweb:/ipfs/QmasyxFDBUp7k5KFgfDWEzM8PYSKEq7GVznzMJ1VxVRF4B"
    ]
    },
    "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": {
    "keccak256": "0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794",
    "license": "MIT",
    "urls": [
    "bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e",
    "dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": {
    "keccak256": "0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250",
    "license": "MIT",
    "urls": [
    "bzz-raw://9c7d1f5e15633ab912b74c2f57e24559e66b03232300d4b27ff0f25bc452ecad",
    "dweb:/ipfs/QmYTJkc1cntYkKQ1Tu11nBcJLakiy93Tjytc4XHELo4GmR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol": {
    "keccak256": "0xb82ef33f43b6b96109687d91b39c94573fdccaaa423fe28e8ba0977b31c023e0",
    "license": "MIT",
    "urls": [
    "bzz-raw://ec9c629f63e66379f9c868a74f971064701cc6e30583872aa653f8b932518025",
    "dweb:/ipfs/QmY4MnZF2VMFwJkAwpdQwxEWA3KcGbNBKEmAVYePMVQWUR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": {
    "keccak256": "0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422",
    "license": "MIT",
    "urls": [
    "bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b",
    "dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": {
    "keccak256": "0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149",
    "license": "MIT",
    "urls": [
    "bzz-raw://d6520943ea55fdf5f0bafb39ed909f64de17051bc954ff3e88c9e5621412c79c",
    "dweb:/ipfs/QmWZ4rAKTQbNG2HxGs46AcTXShsVytKeLs7CUCdCSv5N7a"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol": {
    "keccak256": "0xb1561a6950b1aaa504c8f81b7d46bccfa77ccd10de3eb865cf34b1acd5ad505e",
    "license": "MIT",
    "urls": [
    "bzz-raw://9a56cb91629dacd161be24908fbf94315f3f45dd6fee8dad82b27af853cbc4ee",
    "dweb:/ipfs/QmNfEzdf4NTpxyhzWKAmeDwwSpJ6ZjNizK3GXw3TEuTTgn"
    ]
    },
    "contracts/FlashLiquidator.sol": {
    "keccak256": "0xc25bd5e47e982df9423525f9d200040f9fb38c7452baf49f3c904bf1a4301699",
    "urls": [
    "bzz-raw://31ea053099740751cf3aaa6a606afbdd28c8ad8e13452d008bc3c16732eb6f93",
    "dweb:/ipfs/QmY1nfhF67uDfwfEFZkdFqZMc7i6PzFDY5JTu6oy4HJkUs"
    ]
    }
    },
    "version": 1
    }
    170 changes: 170 additions & 0 deletions contracts...artifacts...IToken.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,170 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "deployedBytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "gasEstimates": null,
    "methodIdentifiers": {
    "approve(address,uint256)": "095ea7b3",
    "balanceOf(address)": "70a08231",
    "decimals()": "313ce567",
    "transfer(address,uint256)": "a9059cbb",
    "transferFrom(address,address,uint256)": "23b872dd"
    }
    },
    "abi": [
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "name": "approve",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "name": "balanceOf",
    "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": "",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "name": "transfer",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "name": "transferFrom",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ]
    }
    210 changes: 210 additions & 0 deletions contracts...artifacts...IToken_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,210 @@
    {
    "compiler": {
    "version": "0.8.17+commit.8df45f5f"
    },
    "language": "Solidity",
    "output": {
    "abi": [
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "name": "approve",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "name": "balanceOf",
    "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": "",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "name": "transfer",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "name": "transferFrom",
    "outputs": [
    {
    "internalType": "bool",
    "name": "",
    "type": "bool"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ],
    "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/FlashLiquidator.sol": "IToken"
    },
    "evmVersion": "london",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": {
    "keccak256": "0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98",
    "license": "MIT",
    "urls": [
    "bzz-raw://99c8cb3cd19a44bbfb6612605affb7d8b06cee1f6aa9362a37a8672b4f7eeaf8",
    "dweb:/ipfs/QmasyxFDBUp7k5KFgfDWEzM8PYSKEq7GVznzMJ1VxVRF4B"
    ]
    },
    "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": {
    "keccak256": "0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794",
    "license": "MIT",
    "urls": [
    "bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e",
    "dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": {
    "keccak256": "0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250",
    "license": "MIT",
    "urls": [
    "bzz-raw://9c7d1f5e15633ab912b74c2f57e24559e66b03232300d4b27ff0f25bc452ecad",
    "dweb:/ipfs/QmYTJkc1cntYkKQ1Tu11nBcJLakiy93Tjytc4XHELo4GmR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol": {
    "keccak256": "0xb82ef33f43b6b96109687d91b39c94573fdccaaa423fe28e8ba0977b31c023e0",
    "license": "MIT",
    "urls": [
    "bzz-raw://ec9c629f63e66379f9c868a74f971064701cc6e30583872aa653f8b932518025",
    "dweb:/ipfs/QmY4MnZF2VMFwJkAwpdQwxEWA3KcGbNBKEmAVYePMVQWUR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": {
    "keccak256": "0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422",
    "license": "MIT",
    "urls": [
    "bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b",
    "dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": {
    "keccak256": "0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149",
    "license": "MIT",
    "urls": [
    "bzz-raw://d6520943ea55fdf5f0bafb39ed909f64de17051bc954ff3e88c9e5621412c79c",
    "dweb:/ipfs/QmWZ4rAKTQbNG2HxGs46AcTXShsVytKeLs7CUCdCSv5N7a"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol": {
    "keccak256": "0xb1561a6950b1aaa504c8f81b7d46bccfa77ccd10de3eb865cf34b1acd5ad505e",
    "license": "MIT",
    "urls": [
    "bzz-raw://9a56cb91629dacd161be24908fbf94315f3f45dd6fee8dad82b27af853cbc4ee",
    "dweb:/ipfs/QmNfEzdf4NTpxyhzWKAmeDwwSpJ6ZjNizK3GXw3TEuTTgn"
    ]
    },
    "contracts/FlashLiquidator.sol": {
    "keccak256": "0xc25bd5e47e982df9423525f9d200040f9fb38c7452baf49f3c904bf1a4301699",
    "urls": [
    "bzz-raw://31ea053099740751cf3aaa6a606afbdd28c8ad8e13452d008bc3c16732eb6f93",
    "dweb:/ipfs/QmY1nfhF67uDfwfEFZkdFqZMc7i6PzFDY5JTu6oy4HJkUs"
    ]
    }
    },
    "version": 1
    }
    227 changes: 227 additions & 0 deletions contracts...artifacts...IUniswapV2Factory.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,227 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "deployedBytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "gasEstimates": null,
    "methodIdentifiers": {
    "allPairs(uint256)": "1e3dd18b",
    "allPairsLength()": "574f2ba3",
    "createPair(address,address)": "c9c65396",
    "feeTo()": "017e7e58",
    "feeToSetter()": "094b7415",
    "getPair(address,address)": "e6a43905",
    "setFeeTo(address)": "f46901ed",
    "setFeeToSetter(address)": "a2e74af6"
    }
    },
    "abi": [
    {
    "anonymous": false,
    "inputs": [
    {
    "indexed": true,
    "internalType": "address",
    "name": "token0",
    "type": "address"
    },
    {
    "indexed": true,
    "internalType": "address",
    "name": "token1",
    "type": "address"
    },
    {
    "indexed": false,
    "internalType": "address",
    "name": "pair",
    "type": "address"
    },
    {
    "indexed": false,
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "name": "PairCreated",
    "type": "event"
    },
    {
    "inputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "name": "allPairs",
    "outputs": [
    {
    "internalType": "address",
    "name": "pair",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "allPairsLength",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "tokenA",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "tokenB",
    "type": "address"
    }
    ],
    "name": "createPair",
    "outputs": [
    {
    "internalType": "address",
    "name": "pair",
    "type": "address"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "feeTo",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "feeToSetter",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "tokenA",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "tokenB",
    "type": "address"
    }
    ],
    "name": "getPair",
    "outputs": [
    {
    "internalType": "address",
    "name": "pair",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "name": "setFeeTo",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "name": "setFeeToSetter",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ]
    }
    264 changes: 264 additions & 0 deletions contracts...artifacts...IUniswapV2Factory_metadata.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,264 @@
    {
    "compiler": {
    "version": "0.8.17+commit.8df45f5f"
    },
    "language": "Solidity",
    "output": {
    "abi": [
    {
    "anonymous": false,
    "inputs": [
    {
    "indexed": true,
    "internalType": "address",
    "name": "token0",
    "type": "address"
    },
    {
    "indexed": true,
    "internalType": "address",
    "name": "token1",
    "type": "address"
    },
    {
    "indexed": false,
    "internalType": "address",
    "name": "pair",
    "type": "address"
    },
    {
    "indexed": false,
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "name": "PairCreated",
    "type": "event"
    },
    {
    "inputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "name": "allPairs",
    "outputs": [
    {
    "internalType": "address",
    "name": "pair",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "allPairsLength",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "",
    "type": "uint256"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "tokenA",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "tokenB",
    "type": "address"
    }
    ],
    "name": "createPair",
    "outputs": [
    {
    "internalType": "address",
    "name": "pair",
    "type": "address"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "feeTo",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "feeToSetter",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "tokenA",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "tokenB",
    "type": "address"
    }
    ],
    "name": "getPair",
    "outputs": [
    {
    "internalType": "address",
    "name": "pair",
    "type": "address"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "name": "setFeeTo",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "name": "setFeeToSetter",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ],
    "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
    },
    "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
    }
    },
    "settings": {
    "compilationTarget": {
    "contracts/FlashLiquidator.sol": "IUniswapV2Factory"
    },
    "evmVersion": "london",
    "libraries": {},
    "metadata": {
    "bytecodeHash": "ipfs"
    },
    "optimizer": {
    "enabled": false,
    "runs": 200
    },
    "remappings": []
    },
    "sources": {
    "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": {
    "keccak256": "0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98",
    "license": "MIT",
    "urls": [
    "bzz-raw://99c8cb3cd19a44bbfb6612605affb7d8b06cee1f6aa9362a37a8672b4f7eeaf8",
    "dweb:/ipfs/QmasyxFDBUp7k5KFgfDWEzM8PYSKEq7GVznzMJ1VxVRF4B"
    ]
    },
    "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": {
    "keccak256": "0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794",
    "license": "MIT",
    "urls": [
    "bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e",
    "dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": {
    "keccak256": "0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250",
    "license": "MIT",
    "urls": [
    "bzz-raw://9c7d1f5e15633ab912b74c2f57e24559e66b03232300d4b27ff0f25bc452ecad",
    "dweb:/ipfs/QmYTJkc1cntYkKQ1Tu11nBcJLakiy93Tjytc4XHELo4GmR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol": {
    "keccak256": "0xb82ef33f43b6b96109687d91b39c94573fdccaaa423fe28e8ba0977b31c023e0",
    "license": "MIT",
    "urls": [
    "bzz-raw://ec9c629f63e66379f9c868a74f971064701cc6e30583872aa653f8b932518025",
    "dweb:/ipfs/QmY4MnZF2VMFwJkAwpdQwxEWA3KcGbNBKEmAVYePMVQWUR"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": {
    "keccak256": "0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422",
    "license": "MIT",
    "urls": [
    "bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b",
    "dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": {
    "keccak256": "0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149",
    "license": "MIT",
    "urls": [
    "bzz-raw://d6520943ea55fdf5f0bafb39ed909f64de17051bc954ff3e88c9e5621412c79c",
    "dweb:/ipfs/QmWZ4rAKTQbNG2HxGs46AcTXShsVytKeLs7CUCdCSv5N7a"
    ]
    },
    "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol": {
    "keccak256": "0xb1561a6950b1aaa504c8f81b7d46bccfa77ccd10de3eb865cf34b1acd5ad505e",
    "license": "MIT",
    "urls": [
    "bzz-raw://9a56cb91629dacd161be24908fbf94315f3f45dd6fee8dad82b27af853cbc4ee",
    "dweb:/ipfs/QmNfEzdf4NTpxyhzWKAmeDwwSpJ6ZjNizK3GXw3TEuTTgn"
    ]
    },
    "contracts/FlashLiquidator.sol": {
    "keccak256": "0xc25bd5e47e982df9423525f9d200040f9fb38c7452baf49f3c904bf1a4301699",
    "urls": [
    "bzz-raw://31ea053099740751cf3aaa6a606afbdd28c8ad8e13452d008bc3c16732eb6f93",
    "dweb:/ipfs/QmY1nfhF67uDfwfEFZkdFqZMc7i6PzFDY5JTu6oy4HJkUs"
    ]
    }
    },
    "version": 1
    }
    824 changes: 824 additions & 0 deletions contracts...artifacts...IUniswapV2Router01.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,824 @@
    {
    "deploy": {
    "VM:-": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "main:1": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "ropsten:3": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "rinkeby:4": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "kovan:42": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "goerli:5": {
    "linkReferences": {},
    "autoDeployLib": true
    },
    "Custom": {
    "linkReferences": {},
    "autoDeployLib": true
    }
    },
    "data": {
    "bytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "deployedBytecode": {
    "functionDebugData": {},
    "generatedSources": [],
    "immutableReferences": {},
    "linkReferences": {},
    "object": "",
    "opcodes": "",
    "sourceMap": ""
    },
    "gasEstimates": null,
    "methodIdentifiers": {
    "WETH()": "ad5c4648",
    "addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)": "e8e33700",
    "addLiquidityETH(address,uint256,uint256,uint256,address,uint256)": "f305d719",
    "factory()": "c45a0155",
    "getAmountIn(uint256,uint256,uint256)": "85f8c259",
    "getAmountOut(uint256,uint256,uint256)": "054d50d4",
    "getAmountsIn(uint256,address[])": "1f00ca74",
    "getAmountsOut(uint256,address[])": "d06ca61f",
    "quote(uint256,uint256,uint256)": "ad615dec",
    "removeLiquidity(address,address,uint256,uint256,uint256,address,uint256)": "baa2abde",
    "removeLiquidityETH(address,uint256,uint256,uint256,address,uint256)": "02751cec",
    "removeLiquidityETHWithPermit(address,uint256,uint256,uint256,address,uint256,bool,uint8,bytes32,bytes32)": "ded9382a",
    "removeLiquidityWithPermit(address,address,uint256,uint256,uint256,address,uint256,bool,uint8,bytes32,bytes32)": "2195995c",
    "swapETHForExactTokens(uint256,address[],address,uint256)": "fb3bdb41",
    "swapExactETHForTokens(uint256,address[],address,uint256)": "7ff36ab5",
    "swapExactTokensForETH(uint256,uint256,address[],address,uint256)": "18cbafe5",
    "swapExactTokensForTokens(uint256,uint256,address[],address,uint256)": "38ed1739",
    "swapTokensForExactETH(uint256,uint256,address[],address,uint256)": "4a25d94a",
    "swapTokensForExactTokens(uint256,uint256,address[],address,uint256)": "8803dbee"
    }
    },
    "abi": [
    {
    "inputs": [],
    "name": "WETH",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "pure",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "tokenA",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "tokenB",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "amountADesired",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "amountBDesired",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "amountAMin",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "amountBMin",
    "type": "uint256"
    },
    {
    "internalType": "address",
    "name": "to",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "deadline",
    "type": "uint256"
    }
    ],
    "name": "addLiquidity",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "amountA",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "amountB",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "liquidity",
    "type": "uint256"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "token",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "amountTokenDesired",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "amountTokenMin",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "amountETHMin",
    "type": "uint256"
    },
    {
    "internalType": "address",
    "name": "to",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "deadline",
    "type": "uint256"
    }
    ],
    "name": "addLiquidityETH",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "amountToken",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "amountETH",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "liquidity",
    "type": "uint256"
    }
    ],
    "stateMutability": "payable",
    "type": "function"
    },
    {
    "inputs": [],
    "name": "factory",
    "outputs": [
    {
    "internalType": "address",
    "name": "",
    "type": "address"
    }
    ],
    "stateMutability": "pure",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "uint256",
    "name": "amountOut",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "reserveIn",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "reserveOut",
    "type": "uint256"
    }
    ],
    "name": "getAmountIn",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "amountIn",
    "type": "uint256"
    }
    ],
    "stateMutability": "pure",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "uint256",
    "name": "amountIn",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "reserveIn",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "reserveOut",
    "type": "uint256"
    }
    ],
    "name": "getAmountOut",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "amountOut",
    "type": "uint256"
    }
    ],
    "stateMutability": "pure",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "uint256",
    "name": "amountOut",
    "type": "uint256"
    },
    {
    "internalType": "address[]",
    "name": "path",
    "type": "address[]"
    }
    ],
    "name": "getAmountsIn",
    "outputs": [
    {
    "internalType": "uint256[]",
    "name": "amounts",
    "type": "uint256[]"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "uint256",
    "name": "amountIn",
    "type": "uint256"
    },
    {
    "internalType": "address[]",
    "name": "path",
    "type": "address[]"
    }
    ],
    "name": "getAmountsOut",
    "outputs": [
    {
    "internalType": "uint256[]",
    "name": "amounts",
    "type": "uint256[]"
    }
    ],
    "stateMutability": "view",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "uint256",
    "name": "amountA",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "reserveA",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "reserveB",
    "type": "uint256"
    }
    ],
    "name": "quote",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "amountB",
    "type": "uint256"
    }
    ],
    "stateMutability": "pure",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "tokenA",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "tokenB",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "liquidity",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "amountAMin",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "amountBMin",
    "type": "uint256"
    },
    {
    "internalType": "address",
    "name": "to",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "deadline",
    "type": "uint256"
    }
    ],
    "name": "removeLiquidity",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "amountA",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "amountB",
    "type": "uint256"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "token",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "liquidity",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "amountTokenMin",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "amountETHMin",
    "type": "uint256"
    },
    {
    "internalType": "address",
    "name": "to",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "deadline",
    "type": "uint256"
    }
    ],
    "name": "removeLiquidityETH",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "amountToken",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "amountETH",
    "type": "uint256"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "token",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "liquidity",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "amountTokenMin",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "amountETHMin",
    "type": "uint256"
    },
    {
    "internalType": "address",
    "name": "to",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "deadline",
    "type": "uint256"
    },
    {
    "internalType": "bool",
    "name": "approveMax",
    "type": "bool"
    },
    {
    "internalType": "uint8",
    "name": "v",
    "type": "uint8"
    },
    {
    "internalType": "bytes32",
    "name": "r",
    "type": "bytes32"
    },
    {
    "internalType": "bytes32",
    "name": "s",
    "type": "bytes32"
    }
    ],
    "name": "removeLiquidityETHWithPermit",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "amountToken",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "amountETH",
    "type": "uint256"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "address",
    "name": "tokenA",
    "type": "address"
    },
    {
    "internalType": "address",
    "name": "tokenB",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "liquidity",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "amountAMin",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "amountBMin",
    "type": "uint256"
    },
    {
    "internalType": "address",
    "name": "to",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "deadline",
    "type": "uint256"
    },
    {
    "internalType": "bool",
    "name": "approveMax",
    "type": "bool"
    },
    {
    "internalType": "uint8",
    "name": "v",
    "type": "uint8"
    },
    {
    "internalType": "bytes32",
    "name": "r",
    "type": "bytes32"
    },
    {
    "internalType": "bytes32",
    "name": "s",
    "type": "bytes32"
    }
    ],
    "name": "removeLiquidityWithPermit",
    "outputs": [
    {
    "internalType": "uint256",
    "name": "amountA",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "amountB",
    "type": "uint256"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "uint256",
    "name": "amountOut",
    "type": "uint256"
    },
    {
    "internalType": "address[]",
    "name": "path",
    "type": "address[]"
    },
    {
    "internalType": "address",
    "name": "to",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "deadline",
    "type": "uint256"
    }
    ],
    "name": "swapETHForExactTokens",
    "outputs": [
    {
    "internalType": "uint256[]",
    "name": "amounts",
    "type": "uint256[]"
    }
    ],
    "stateMutability": "payable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "uint256",
    "name": "amountOutMin",
    "type": "uint256"
    },
    {
    "internalType": "address[]",
    "name": "path",
    "type": "address[]"
    },
    {
    "internalType": "address",
    "name": "to",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "deadline",
    "type": "uint256"
    }
    ],
    "name": "swapExactETHForTokens",
    "outputs": [
    {
    "internalType": "uint256[]",
    "name": "amounts",
    "type": "uint256[]"
    }
    ],
    "stateMutability": "payable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "uint256",
    "name": "amountIn",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "amountOutMin",
    "type": "uint256"
    },
    {
    "internalType": "address[]",
    "name": "path",
    "type": "address[]"
    },
    {
    "internalType": "address",
    "name": "to",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "deadline",
    "type": "uint256"
    }
    ],
    "name": "swapExactTokensForETH",
    "outputs": [
    {
    "internalType": "uint256[]",
    "name": "amounts",
    "type": "uint256[]"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "uint256",
    "name": "amountIn",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "amountOutMin",
    "type": "uint256"
    },
    {
    "internalType": "address[]",
    "name": "path",
    "type": "address[]"
    },
    {
    "internalType": "address",
    "name": "to",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "deadline",
    "type": "uint256"
    }
    ],
    "name": "swapExactTokensForTokens",
    "outputs": [
    {
    "internalType": "uint256[]",
    "name": "amounts",
    "type": "uint256[]"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "uint256",
    "name": "amountOut",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "amountInMax",
    "type": "uint256"
    },
    {
    "internalType": "address[]",
    "name": "path",
    "type": "address[]"
    },
    {
    "internalType": "address",
    "name": "to",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "deadline",
    "type": "uint256"
    }
    ],
    "name": "swapTokensForExactETH",
    "outputs": [
    {
    "internalType": "uint256[]",
    "name": "amounts",
    "type": "uint256[]"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    },
    {
    "inputs": [
    {
    "internalType": "uint256",
    "name": "amountOut",
    "type": "uint256"
    },
    {
    "internalType": "uint256",
    "name": "amountInMax",
    "type": "uint256"
    },
    {
    "internalType": "address[]",
    "name": "path",
    "type": "address[]"
    },
    {
    "internalType": "address",
    "name": "to",
    "type": "address"
    },
    {
    "internalType": "uint256",
    "name": "deadline",
    "type": "uint256"
    }
    ],
    "name": "swapTokensForExactTokens",
    "outputs": [
    {
    "internalType": "uint256[]",
    "name": "amounts",
    "type": "uint256[]"
    }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
    }
    ]
    }
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Empty file added scripts...deploy_with_ethers.ts
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Empty file added scripts...deploy_with_web3.ts
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Empty file added scripts...ethers-lib.ts
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Empty file added scripts...web3-lib.ts
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Empty file added tests...Ballot_test.sol
    Sorry, we could not display the changes to this file because there were too many other changes to display.
    Empty file added tests...storage.test.js
    Sorry, we could not display the changes to this file because there were too many other changes to display.