Contract

0xA84D4ffAa5a8383a296C817B9fFd4e38b13562aE

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

-

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

1 Internal Transaction found.

Latest 1 internal transaction

Parent Transaction Hash Block From To
4105232024-12-14 18:08:3115 days ago1734199711  Contract Creation0 S
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
AvoGasEstimationsHelper

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 10000000 runs

Other Settings:
default evmVersion
File 1 of 6 : AvoGasEstimationsHelper.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.17;

import { Address } from "@openzeppelin/contracts/utils/Address.sol";

import { IAvoFactory } from "../interfaces/IAvoFactory.sol";
import { IAvocadoMultisigV1 } from "../interfaces/IAvocadoMultisigV1.sol";

// empty interface used for Natspec docs for nice layout in automatically generated docs:
//
/// @title  AvoGasEstimationsHelper v1.0.0
/// @notice Helps to estimate gas costs for execution of arbitrary actions in an Avocado smart wallet,
/// especially when the smart wallet is not deployed yet.
interface AvoGasEstimationsHelper_V1 {

}

interface IAvocadoMultisigWithCallTargets is IAvocadoMultisigV1 {
    function _callTargets(Action[] calldata actions_, uint256 id_) external payable;
}

abstract contract AvoGasEstimationsHelperEvents {
    /// @notice emitted when all actions for `cast()` in an `execute()` method are executed successfully
    event Executed(
        address indexed avocadoOwner,
        uint32 index,
        address indexed avocadoAddress,
        address indexed source,
        bytes metadata
    );

    /// @notice emitted if one of the actions for `cast()` in an `execute()` method fails
    event ExecuteFailed(
        address indexed avocadoOwner,
        uint32 index,
        address indexed avocadoAddress,
        address indexed source,
        bytes metadata,
        string reason
    );
}

contract AvoGasEstimationsHelper is AvoGasEstimationsHelperEvents {
    using Address for address;

    error AvoGasEstimationsHelper__InvalidParams();
    error AvoGasEstimationsHelper__Unauthorized();

    /// @dev amount of gas to keep in cast caller method as reserve for emitting CastFailed / CastExecuted event.
    /// ~7500 gas + ~1400 gas + buffer. the dynamic part is covered with PER_SIGNER_RESERVE_GAS.
    uint256 internal constant CAST_EVENTS_RESERVE_GAS = 10_000;

    /***********************************|
    |           STATE VARIABLES         |
    |__________________________________*/

    /// @notice AvoFactory that this contract uses to find or create Avocado smart wallet deployments
    IAvoFactory public immutable avoFactory;

    /// @notice cached Avocado Bytecode to directly compute address in this contract to optimize gas usage.
    bytes32 public constant avocadoBytecode = 0x6b106ae0e3afae21508569f62d81c7d826b900a2e9ccc973ba97abfae026fc54;

    /// @notice constructor sets the immutable `avoFactory` address
    /// @param avoFactory_ address of AvoFactory (proxy)
    constructor(IAvoFactory avoFactory_) {
        if (address(avoFactory_) == address(0)) {
            revert AvoGasEstimationsHelper__InvalidParams();
        }
        avoFactory = avoFactory_;
    }

    struct SimulateResult {
        uint256 totalGasUsed;
        uint256 castGasUsed;
        uint256 deploymentGasUsed;
        bool isDeployed;
        bool success;
        string revertReason;
    }

    /// @notice                  Simulates `executeV1`, callable only by msg.sender = dead address
    ///                          (0x000000000000000000000000000000000000dEaD)
    ///                          Helpful to estimate `CastForwardParams.gas` for an Avocado tx.
    ///                          For Avocado v1.
    ///                          Deploys the Avocado smart wallet if necessary.
    /// @dev  Expected use with `.estimateGas()`. User signed `CastForwardParams.gas` should be set to the estimated
    ///       amount minus gas used in AvoForwarder (until AvocadoMultisig logic where the gas param is validated).
    ///       Best to simulate first with a `.callstatic` to determine success / error and other return values.
    /// @param from_             AvocadoMultisig owner
    /// @param index_            index number of Avocado for `owner_` EOA
    /// @param params_           Cast params such as id, avoNonce and actions to execute
    /// @param forwardParams_    Cast params related to validity of forwarding as instructed and signed
    /// @param signaturesParams_ SignatureParams structs array for signature and signer:
    ///                          - signature: the EIP712 signature, 65 bytes ECDSA signature for a default EOA.
    ///                            For smart contract signatures it must fulfill the requirements for the relevant
    ///                            smart contract `.isValidSignature()` EIP1271 logic
    ///                          - signer: address of the signature signer.
    ///                            Must match the actual signature signer or refer to the smart contract
    ///                            that must be an allowed signer and validates signature via EIP1271
    /// @return simulateResult_     result struct with following values:
    ///         - total amount of gas used
    ///         - amount of gas used for executing `cast`
    ///         - amount of gas used for deployment (or for getting the contract if already deployed)
    ///         - boolean flag indicating if Avocado is already deployed
    ///         - boolean flag indicating whether executing actions reverts or not
    ///         - revert reason original error in default format "<action_index>_error"
    function simulateV1(
        address from_,
        uint32 index_,
        IAvocadoMultisigV1.CastParams calldata params_,
        IAvocadoMultisigV1.CastForwardParams calldata forwardParams_,
        IAvocadoMultisigV1.SignatureParams[] calldata signaturesParams_
    ) external payable returns (SimulateResult memory simulateResult_) {
        if (msg.sender != 0x000000000000000000000000000000000000dEaD) {
            revert AvoGasEstimationsHelper__Unauthorized();
        }

        uint256 gasSnapshotBefore_ = gasleft();
        // `_getDeployedAvocado()` automatically checks if Avocado has to be deployed
        // or if it already exists and simply returns the address in that case
        IAvocadoMultisigWithCallTargets avocadoMultisig_ = IAvocadoMultisigWithCallTargets(
            _getDeployedAvocado(from_, index_)
        );
        simulateResult_.deploymentGasUsed = gasSnapshotBefore_ - gasleft();

        simulateResult_.isDeployed = simulateResult_.deploymentGasUsed < 100_000; // avocado for sure not yet deployed if gas used > 100k
        // (deployment costs > 200k)

        bytes memory result_;
        {
            uint256 gasSnapshotBeforeCast_ = gasleft();

            (simulateResult_.success, result_) = address(avocadoMultisig_).call{ value: forwardParams_.value }(
                abi.encodeCall(avocadoMultisig_._callTargets, (params_.actions, params_.id))
            );

            simulateResult_.castGasUsed = gasSnapshotBeforeCast_ - gasleft();
        }

        if (!simulateResult_.success) {
            if (result_.length == 0) {
                // out of gas check with gasleft() not added here as it might cause issues with .estimateGas

                // @dev this case might be caused by edge-case out of gas errors that we were unable to catch,
                // but could potentially also have other reasons
                simulateResult_.revertReason = "AVO__REASON_NOT_DEFINED";
            } else {
                assembly {
                    result_ := add(result_, 0x04)
                }
                simulateResult_.revertReason = abi.decode(result_, (string));
            }
        }

        if (simulateResult_.success) {
            emit Executed(from_, index_, address(avocadoMultisig_), params_.source, params_.metadata);
        } else {
            emit ExecuteFailed(
                from_,
                index_,
                address(avocadoMultisig_),
                params_.source,
                params_.metadata,
                simulateResult_.revertReason
            );
        }

        simulateResult_.totalGasUsed = gasSnapshotBefore_ - gasleft();
    }

    /***********************************|
    |              INTERNAL             |
    |__________________________________*/

    /// @dev gets or if necessary deploys an Avocado for owner `from_` and `index_` and returns the address
    function _getDeployedAvocado(address from_, uint32 index_) internal returns (address) {
        address computedAvocadoAddress_ = _computeAvocado(from_, index_);
        if (Address.isContract(computedAvocadoAddress_)) {
            return computedAvocadoAddress_;
        } else {
            return avoFactory.deploy(from_, index_);
        }
    }

    /// @dev computes the deterministic contract address for an Avocado deployment for `owner_` and `index_`
    function _computeAvocado(address owner_, uint32 index_) internal view returns (address computedAddress_) {
        // replicate Create2 address determination logic
        bytes32 hash = keccak256(
            abi.encodePacked(bytes1(0xff), address(avoFactory), _getSalt(owner_, index_), avocadoBytecode)
        );

        // cast last 20 bytes of hash to address via low level assembly
        assembly {
            computedAddress_ := and(hash, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)
        }
    }

    /// @dev gets the bytes32 salt used for deterministic Avocado deployment for `owner_` and `index_`, same as on AvoFactory
    function _getSalt(address owner_, uint32 index_) internal pure returns (bytes32) {
        // use owner + index of avocado nr per EOA (plus "type", currently always 0)
        // Note CREATE2 deployments take into account the deployers address (i.e. this factory address)
        return keccak256(abi.encode(owner_, index_, 0));
    }
}

File 2 of 6 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [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://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (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);
        }
    }
}

File 3 of 6 : AvocadoMultisigStructs.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.18;

interface AvocadoMultisigStructs {
    /// @notice a combination of a bytes signature and its signer.
    struct SignatureParams {
        ///
        /// @param signature ECDSA signature of `getSigDigest()` for default flow or EIP1271 smart contract signature
        bytes signature;
        ///
        /// @param signer signer of the signature. Can be set to smart contract address that supports EIP1271
        address signer;
    }

    /// @notice an arbitrary executable action
    struct Action {
        ///
        /// @param target the target address to execute the action on
        address target;
        ///
        /// @param data the calldata to be passed to the call for each target
        bytes data;
        ///
        /// @param value the msg.value to be passed to the call for each target. set to 0 if none
        uint256 value;
        ///
        /// @param operation type of operation to execute:
        /// 0 -> .call; 1 -> .delegateCall, 2 -> flashloan (via .call)
        uint256 operation;
    }

    /// @notice common params for both `cast()` and `castAuthorized()`
    struct CastParams {
        Action[] actions;
        ///
        /// @param id             Required:
        ///                       id for actions, e.g. 0 = CALL, 1 = MIXED (call and delegatecall),
        ///                                           20 = FLASHLOAN_CALL, 21 = FLASHLOAN_MIXED
        uint256 id;
        ///
        /// @param avoNonce   Required:
        ///                       avoNonce to be used for this tx. Must equal the avoNonce value on smart
        ///                       wallet or alternatively it must be set to -1 to use a non-sequential nonce instead
        int256 avoNonce;
        ///
        /// @param salt           Optional:
        ///                       Salt to customize non-sequential nonce (if `avoNonce` is set to -1)
        bytes32 salt;
        ///
        /// @param source         Optional:
        ///                       Source / referral for this tx
        address source;
        ///
        /// @param metadata       Optional:
        ///                       metadata for any potential additional data to be tracked in the tx
        bytes metadata;
    }

    /// @notice `cast()` input params related to forwarding validity
    struct CastForwardParams {
        ///
        /// @param gas            Optional:
        ///                       As EIP-2770: user instructed minimum amount of gas that the relayer (AvoForwarder)
        ///                       must send for the execution. Sending less gas will fail the tx at the cost of the relayer.
        ///                       Also protects against potential gas griefing attacks
        ///                       See https://ronan.eth.limo/blog/ethereum-gas-dangers/
        uint256 gas;
        ///
        /// @param gasPrice       Optional:
        ///                       Not implemented / used yet
        uint256 gasPrice;
        ///
        /// @param validAfter     Optional:
        ///                       the earliest block timestamp that the request can be forwarded in,
        ///                       or 0 if the request is not time-limited to occur after a certain time.
        ///                       Protects against relayers executing a certain transaction at an earlier moment
        ///                       not intended by the user, where it might have a completely different effect.
        uint256 validAfter;
        ///
        /// @param validUntil     Optional:
        ///                       Similar to EIP-2770: the latest block timestamp (instead of block number) the request
        ///                       can be forwarded, or 0 if request should be valid forever.
        ///                       Protects against relayers executing a certain transaction at a later moment
        ///                       not intended by the user, where it might have a completely different effect.
        uint256 validUntil;
        ///
        /// @param value          Optional:
        ///                       Not implemented / used yet (msg.value broadcaster should send along)
        uint256 value;
    }

    /// @notice `castAuthorized()` input params
    struct CastAuthorizedParams {
        ///
        /// @param maxFee         Optional:
        ///                       the maximum Avocado charge-up allowed to be paid for tx execution
        uint256 maxFee;
        ///
        /// @param gasPrice       Optional:
        ///                       Not implemented / used yet
        uint256 gasPrice;
        ///
        /// @param validAfter     Optional:
        ///                       the earliest block timestamp that the request can be forwarded in,
        ///                       or 0 if the request is not time-limited to occur after a certain time.
        ///                       Protects against relayers executing a certain transaction at an earlier moment
        ///                       not intended by the user, where it might have a completely different effect.
        uint256 validAfter;
        ///
        /// @param validUntil     Optional:
        ///                       Similar to EIP-2770: the latest block timestamp (instead of block number) the request
        ///                       can be forwarded, or 0 if request should be valid forever.
        ///                       Protects against relayers executing a certain transaction at a later moment
        ///                       not intended by the user, where it might have a completely different effect.
        uint256 validUntil;
    }
}

File 4 of 6 : IAvocadoMultisigV1.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.18;

import { AvocadoMultisigStructs } from "../AvocadoMultisig/AvocadoMultisigStructs.sol";

// @dev base interface without getters for storage variables (to avoid overloads issues)
interface IAvocadoMultisigV1Base is AvocadoMultisigStructs {
    /// @notice initializer called by AvoFactory after deployment, sets the `owner_` as the only signer
    function initialize() external;

    /// @notice returns the domainSeparator for EIP712 signature
    function domainSeparatorV4() external view returns (bytes32);

    /// @notice               gets the digest (hash) used to verify an EIP712 signature for `cast()`.
    ///
    ///                       This is also used as the non-sequential nonce that will be marked as used when the
    ///                       request with the matching `params_` and `forwardParams_` is executed via `cast()`.
    /// @param params_        Cast params such as id, avoNonce and actions to execute
    /// @param forwardParams_ Cast params related to validity of forwarding as instructed and signed
    /// @return               bytes32 digest to verify signature (or used as non-sequential nonce)
    function getSigDigest(
        CastParams calldata params_,
        CastForwardParams calldata forwardParams_
    ) external view returns (bytes32);

    /// @notice                   gets the digest (hash) used to verify an EIP712 signature for `castAuthorized()`.
    ///
    ///                           This is also the non-sequential nonce that will be marked as used when the request
    ///                           with the matching `params_` and `authorizedParams_` is executed via `castAuthorized()`.
    /// @param params_            Cast params such as id, avoNonce and actions to execute
    /// @param authorizedParams_  Cast params related to authorized execution such as maxFee, as signed
    /// @return                   bytes32 digest to verify signature (or used as non-sequential nonce)
    function getSigDigestAuthorized(
        CastParams calldata params_,
        CastAuthorizedParams calldata authorizedParams_
    ) external view returns (bytes32);

    /// @notice                   Verify the signatures for a `cast()' call are valid and can be executed.
    ///                           This does not guarantuee that the tx will not revert, simply that the params are valid.
    ///                           Does not revert and returns successfully if the input is valid.
    ///                           Reverts if input params, signature or avoNonce etc. are invalid.
    /// @param params_            Cast params such as id, avoNonce and actions to execute
    /// @param forwardParams_     Cast params related to validity of forwarding as instructed and signed
    /// @param signaturesParams_  SignatureParams structs array for signature and signer:
    ///                           - signature: the EIP712 signature, 65 bytes ECDSA signature for a default EOA.
    ///                             For smart contract signatures it must fulfill the requirements for the relevant
    ///                             smart contract `.isValidSignature()` EIP1271 logic
    ///                           - signer: address of the signature signer.
    ///                             Must match the actual signature signer or refer to the smart contract
    ///                             that must be an allowed signer and validates signature via EIP1271
    /// @return                   returns true if everything is valid, otherwise reverts
    function verify(
        CastParams calldata params_,
        CastForwardParams calldata forwardParams_,
        SignatureParams[] calldata signaturesParams_
    ) external view returns (bool);

    /// @notice                   Verify the signatures for a `castAuthorized()' call are valid and can be executed.
    ///                           This does not guarantuee that the tx will not revert, simply that the params are valid.
    ///                           Does not revert and returns successfully if the input is valid.
    ///                           Reverts if input params, signature or avoNonce etc. are invalid.
    /// @param params_            Cast params such as id, avoNonce and actions to execute
    /// @param authorizedParams_  Cast params related to authorized execution such as maxFee, as signed
    /// @param signaturesParams_  SignatureParams structs array for signature and signer:
    ///                           - signature: the EIP712 signature, 65 bytes ECDSA signature for a default EOA.
    ///                             For smart contract signatures it must fulfill the requirements for the relevant
    ///                             smart contract `.isValidSignature()` EIP1271 logic
    ///                           - signer: address of the signature signer.
    ///                             Must match the actual signature signer or refer to the smart contract
    ///                             that must be an allowed signer and validates signature via EIP1271
    /// @return                   returns true if everything is valid, otherwise reverts
    function verifyAuthorized(
        CastParams calldata params_,
        CastAuthorizedParams calldata authorizedParams_,
        SignatureParams[] calldata signaturesParams_
    ) external view returns (bool);

    /// @notice                   Executes arbitrary `actions_` with valid signatures. Only executable by AvoForwarder.
    ///                           If one action fails, the transaction doesn't revert, instead emits the `CastFailed` event.
    ///                           In that case, all previous actions are reverted.
    ///                           On success, emits CastExecuted event.
    /// @dev                      validates EIP712 signature then executes each action via .call or .delegatecall
    /// @param params_            Cast params such as id, avoNonce and actions to execute
    /// @param forwardParams_     Cast params related to validity of forwarding as instructed and signed
    /// @param signaturesParams_  SignatureParams structs array for signature and signer:
    ///                           - signature: the EIP712 signature, 65 bytes ECDSA signature for a default EOA.
    ///                             For smart contract signatures it must fulfill the requirements for the relevant
    ///                             smart contract `.isValidSignature()` EIP1271 logic
    ///                           - signer: address of the signature signer.
    ///                             Must match the actual signature signer or refer to the smart contract
    ///                             that must be an allowed signer and validates signature via EIP1271
    /// @return success           true if all actions were executed succesfully, false otherwise.
    /// @return revertReason      revert reason if one of the actions fails in the following format:
    ///                           The revert reason will be prefixed with the index of the action.
    ///                           e.g. if action 1 fails, then the reason will be "1_reason".
    ///                           if an action in the flashloan callback fails (or an otherwise nested action),
    ///                           it will be prefixed with with two numbers: "1_2_reason".
    ///                           e.g. if action 1 is the flashloan, and action 2 of flashloan actions fails,
    ///                           the reason will be 1_2_reason.
    function cast(
        CastParams calldata params_,
        CastForwardParams calldata forwardParams_,
        SignatureParams[] calldata signaturesParams_
    ) external payable returns (bool success, string memory revertReason);

    /// @notice                   Executes arbitrary `actions_` through authorized transaction sent with valid signatures.
    ///                           Includes a fee in native network gas token, amount depends on registry `calcFee()`.
    ///                           If one action fails, the transaction doesn't revert, instead emits the `CastFailed` event.
    ///                           In that case, all previous actions are reverted.
    ///                           On success, emits CastExecuted event.
    /// @dev                      executes a .call or .delegateCall for every action (depending on params)
    /// @param params_            Cast params such as id, avoNonce and actions to execute
    /// @param authorizedParams_  Cast params related to authorized execution such as maxFee, as signed
    /// @param signaturesParams_  SignatureParams structs array for signature and signer:
    ///                           - signature: the EIP712 signature, 65 bytes ECDSA signature for a default EOA.
    ///                             For smart contract signatures it must fulfill the requirements for the relevant
    ///                             smart contract `.isValidSignature()` EIP1271 logic
    ///                           - signer: address of the signature signer.
    ///                             Must match the actual signature signer or refer to the smart contract
    ///                             that must be an allowed signer and validates signature via EIP1271
    /// @return success           true if all actions were executed succesfully, false otherwise.
    /// @return revertReason      revert reason if one of the actions fails in the following format:
    ///                           The revert reason will be prefixed with the index of the action.
    ///                           e.g. if action 1 fails, then the reason will be "1_reason".
    ///                           if an action in the flashloan callback fails (or an otherwise nested action),
    ///                           it will be prefixed with with two numbers: "1_2_reason".
    ///                           e.g. if action 1 is the flashloan, and action 2 of flashloan actions fails,
    ///                           the reason will be 1_2_reason.
    function castAuthorized(
        CastParams calldata params_,
        CastAuthorizedParams calldata authorizedParams_,
        SignatureParams[] calldata signaturesParams_
    ) external payable returns (bool success, string memory revertReason);

    /// @notice checks if an address `signer_` is an allowed signer (returns true if allowed)
    function isSigner(address signer_) external view returns (bool);

    /// @notice returns allowed signers on Avocado wich can trigger actions if reaching quorum `requiredSigners`.
    ///         signers automatically include owner.
    function signers() external view returns (address[] memory signers_);

    /// @notice returns the number of required signers
    function requiredSigners() external view returns (uint8);

    /// @notice returns the number of allowed signers
    function signersCount() external view returns (uint8);

    /// @notice Avocado owner
    function owner() external view returns (address);

    /// @notice Avocado index (number of Avocado for EOA owner)
    function index() external view returns (uint32);
}

// @dev full interface with some getters for storage variables
interface IAvocadoMultisigV1 is IAvocadoMultisigV1Base {
    /// @notice Domain separator name for signatures
    function DOMAIN_SEPARATOR_NAME() external view returns (string memory);

    /// @notice Domain separator version for signatures
    function DOMAIN_SEPARATOR_VERSION() external view returns (string memory);

    /// @notice incrementing nonce for each valid tx executed (to ensure uniqueness)
    function avoNonce() external view returns (uint256);
}

File 5 of 6 : IAvoFactory.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.18;

import { IAvoRegistry } from "./IAvoRegistry.sol";

interface IAvoFactory {
    /// @notice returns AvoRegistry (proxy) address
    function avoRegistry() external view returns (IAvoRegistry);

    /// @notice returns Avocado logic contract address that new Avocado deployments point to
    function avoImpl() external view returns (address);

    /// @notice                 Checks if a certain address is an Avocado smart wallet.
    ///                         Only works for already deployed wallets.
    /// @param avoSmartWallet_  address to check
    /// @return                 true if address is an Avocado
    function isAvocado(address avoSmartWallet_) external view returns (bool);

    /// @notice                     Computes the deterministic Avocado address for `owner_` based on Create2
    /// @param owner_               Avocado owner
    /// @param index_               index number of Avocado for `owner_` EOA
    /// @return computedAddress_    computed address for the Avocado contract
    function computeAvocado(address owner_, uint32 index_) external view returns (address computedAddress_);

    /// @notice         Deploys an Avocado for a certain `owner_` deterministcally using Create2.
    ///                 Does not check if contract at address already exists (AvoForwarder does that)
    /// @param owner_   Avocado owner
    /// @param index_   index number of Avocado for `owner_` EOA
    /// @return         deployed address for the Avocado contract
    function deploy(address owner_, uint32 index_) external returns (address);

    /// @notice                    Deploys an Avocado with non-default version for an `owner_`
    ///                            deterministcally using Create2.
    ///                            Does not check if contract at address already exists (AvoForwarder does that)
    /// @param owner_              Avocado owner
    /// @param index_              index number of Avocado for `owner_` EOA
    /// @param avoVersion_         Version of Avocado logic contract to deploy
    /// @return                    deployed address for the Avocado contract
    function deployWithVersion(address owner_, uint32 index_, address avoVersion_) external returns (address);

    /// @notice                 registry can update the current Avocado implementation contract set as default
    ///                         `_avoImpl` logic contract address for new deployments
    /// @param avoImpl_ the new avoImpl address
    function setAvoImpl(address avoImpl_) external;

    /// @notice returns the byteCode for the Avocado contract used for Create2 address computation
    function avocadoBytecode() external view returns (bytes32);
}

File 6 of 6 : IAvoRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.18;

interface IAvoFeeCollector {
    /// @notice fee config params used to determine the fee for Avocado smart wallet `castAuthorized()` calls
    struct FeeConfig {
        /// @param feeCollector address that the fee should be paid to
        address payable feeCollector;
        /// @param mode current fee mode: 0 = percentage fee (gas cost markup); 1 = static fee (better for L2)
        uint8 mode;
        /// @param fee current fee amount:
        /// - for mode percentage: fee in 1e6 percentage (1e8 = 100%, 1e6 = 1%)
        /// - for static mode: absolute amount in native gas token to charge
        ///                    (max value 30_9485_009,821345068724781055 in 1e18)
        uint88 fee;
    }

    /// @notice calculates the `feeAmount_` for an Avocado (`msg.sender`) transaction `gasUsed_` based on
    ///         fee configuration present on the contract
    /// @param  gasUsed_       amount of gas used, required if mode is percentage. not used if mode is static fee.
    /// @return feeAmount_    calculate fee amount to be paid
    /// @return feeCollector_ address to send the fee to
    function calcFee(uint256 gasUsed_) external view returns (uint256 feeAmount_, address payable feeCollector_);
}

interface IAvoRegistry is IAvoFeeCollector {
    /// @notice                      checks if an address is listed as allowed AvoForwarder version, reverts if not.
    /// @param avoForwarderVersion_  address of the AvoForwarder logic contract to check
    function requireValidAvoForwarderVersion(address avoForwarderVersion_) external view;

    /// @notice                     checks if an address is listed as allowed Avocado version, reverts if not.
    /// @param avoVersion_          address of the Avocado logic contract to check
    function requireValidAvoVersion(address avoVersion_) external view;
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 10000000
  },
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IAvoFactory","name":"avoFactory_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AvoGasEstimationsHelper__InvalidParams","type":"error"},{"inputs":[],"name":"AvoGasEstimationsHelper__Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"avocadoOwner","type":"address"},{"indexed":false,"internalType":"uint32","name":"index","type":"uint32"},{"indexed":true,"internalType":"address","name":"avocadoAddress","type":"address"},{"indexed":true,"internalType":"address","name":"source","type":"address"},{"indexed":false,"internalType":"bytes","name":"metadata","type":"bytes"},{"indexed":false,"internalType":"string","name":"reason","type":"string"}],"name":"ExecuteFailed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"avocadoOwner","type":"address"},{"indexed":false,"internalType":"uint32","name":"index","type":"uint32"},{"indexed":true,"internalType":"address","name":"avocadoAddress","type":"address"},{"indexed":true,"internalType":"address","name":"source","type":"address"},{"indexed":false,"internalType":"bytes","name":"metadata","type":"bytes"}],"name":"Executed","type":"event"},{"inputs":[],"name":"avoFactory","outputs":[{"internalType":"contract IAvoFactory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"avocadoBytecode","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"uint32","name":"index_","type":"uint32"},{"components":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"operation","type":"uint256"}],"internalType":"struct AvocadoMultisigStructs.Action[]","name":"actions","type":"tuple[]"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"int256","name":"avoNonce","type":"int256"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"address","name":"source","type":"address"},{"internalType":"bytes","name":"metadata","type":"bytes"}],"internalType":"struct AvocadoMultisigStructs.CastParams","name":"params_","type":"tuple"},{"components":[{"internalType":"uint256","name":"gas","type":"uint256"},{"internalType":"uint256","name":"gasPrice","type":"uint256"},{"internalType":"uint256","name":"validAfter","type":"uint256"},{"internalType":"uint256","name":"validUntil","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct AvocadoMultisigStructs.CastForwardParams","name":"forwardParams_","type":"tuple"},{"components":[{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"address","name":"signer","type":"address"}],"internalType":"struct AvocadoMultisigStructs.SignatureParams[]","name":"signaturesParams_","type":"tuple[]"}],"name":"simulateV1","outputs":[{"components":[{"internalType":"uint256","name":"totalGasUsed","type":"uint256"},{"internalType":"uint256","name":"castGasUsed","type":"uint256"},{"internalType":"uint256","name":"deploymentGasUsed","type":"uint256"},{"internalType":"bool","name":"isDeployed","type":"bool"},{"internalType":"bool","name":"success","type":"bool"},{"internalType":"string","name":"revertReason","type":"string"}],"internalType":"struct AvoGasEstimationsHelper.SimulateResult","name":"simulateResult_","type":"tuple"}],"stateMutability":"payable","type":"function"}]

60a060405234801561001057600080fd5b50604051610ddc380380610ddc83398101604081905261002f91610067565b6001600160a01b038116610056576040516333c461bd60e01b815260040160405180910390fd5b6001600160a01b0316608052610097565b60006020828403121561007957600080fd5b81516001600160a01b038116811461009057600080fd5b9392505050565b608051610d1d6100bf6000396000818160740152818161050b01526105fd0152610d1d6000f3fe6080604052600436106100345760003560e01c806368626d8f14610039578063b0c5ea8814610062578063db421487146100bb575b600080fd5b61004c6100473660046106e5565b6100fd565b6040516100599190610831565b60405180910390f35b34801561006e57600080fd5b506100967f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610059565b3480156100c757600080fd5b506100ef7f6b106ae0e3afae21508569f62d81c7d826b900a2e9ccc973ba97abfae026fc5481565b604051908152602001610059565b61013a6040518060c00160405280600081526020016000815260200160008152602001600015158152602001600015158152602001606081525090565b61dead3314610175576040517f4775cb4b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005a905060006101868989610494565b90505a610193908361088a565b60408401819052620186a01160608085019190915260005a905073ffffffffffffffffffffffffffffffffffffffff831660808901358163b92e87fa6101d98d806108c4565b8e602001356040516024016101f093929190610975565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1660e09490941b93909317909252905161025b9250610ad0565b60006040518083038185875af1925050503d8060008114610298576040519150601f19603f3d011682016040523d82523d6000602084013e61029d565b606091505b50901515608087015291505a6102b3908261088a565b60208601525060808401516103295780516000036103095760408051808201909152601781527f41564f5f5f524541534f4e5f4e4f545f444546494e4544000000000000000000602082015260a0850152610329565b600481019050808060200190518101906103239190610b1b565b60a08501525b8360800151156103d55761034360a0890160808a01610be6565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff167fdaf1e6e151973de199f3ea25b9c6a7c3d94299dc85e269cfd20e48e517ecf7048c8c8060a001906103b99190610c0a565b6040516103c893929190610c6f565b60405180910390a4610479565b6103e560a0890160808a01610be6565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff167f5350e8e0c8cacf19dd5334174c3d5a3e8b7d7e00fdb5457d7ddec04b5e4a1af38c8c8060a0019061045b9190610c0a565b8a60a001516040516104709493929190610c98565b60405180910390a45b5a610484908461088a565b8452509198975050505050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff84811660208084019190915263ffffffff851683850152600060608085018290528551808603820181526080860187528051908401207fff0000000000000000000000000000000000000000000000000000000000000060a08701527f000000000000000000000000000000000000000000000000000000000000000090911b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660a186015260b58501527f6b106ae0e3afae21508569f62d81c7d826b900a2e9ccc973ba97abfae026fc5460d5808601919091528551808603909101815260f5909401909452825192019190912016803b156105ac57905061066e565b6040517f2adc4cf700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116600483015263ffffffff851660248301527f00000000000000000000000000000000000000000000000000000000000000001690632adc4cf7906044016020604051808303816000875af1158015610646573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066a9190610cca565b9150505b92915050565b73ffffffffffffffffffffffffffffffffffffffff8116811461069657600080fd5b50565b60008083601f8401126106ab57600080fd5b50813567ffffffffffffffff8111156106c357600080fd5b6020830191508360208260051b85010111156106de57600080fd5b9250929050565b60008060008060008086880361012081121561070057600080fd5b873561070b81610674565b9650602088013563ffffffff8116811461072457600080fd5b9550604088013567ffffffffffffffff8082111561074157600080fd5b9089019060c0828c03121561075557600080fd5b81965060a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa08401121561078857600080fd5b60608a0195506101008a01359250808311156107a357600080fd5b50506107b189828a01610699565b979a9699509497509295939492505050565b60005b838110156107de5781810151838201526020016107c6565b50506000910152565b600081518084526107ff8160208601602086016107c3565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081528151602082015260208201516040820152604082015160608201526060820151151560808201526080820151151560a0820152600060a083015160c08084015261088260e08401826107e7565b949350505050565b8181038181111561066e577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126108f957600080fd5b83018035915067ffffffffffffffff82111561091457600080fd5b6020019150600581901b36038213156106de57600080fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b60408082528181018490526000906060808401600587901b8501820188855b89811015610ab9577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa088840301845281357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff818c36030181126109f557600080fd5b8b0160808135610a0481610674565b73ffffffffffffffffffffffffffffffffffffffff168552602082810135368490037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1018112610a5357600080fd5b8301818101903567ffffffffffffffff811115610a6f57600080fd5b803603821315610a7e57600080fd5b8383890152610a90848901828461092c565b858c0135898d0152948a0135978a01979097525095860195919450509190910190600101610994565b505080945050505050826020830152949350505050565b60008251610ae28184602087016107c3565b9190910192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600060208284031215610b2d57600080fd5b815167ffffffffffffffff80821115610b4557600080fd5b818401915084601f830112610b5957600080fd5b815181811115610b6b57610b6b610aec565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715610bb157610bb1610aec565b81604052828152876020848701011115610bca57600080fd5b610bdb8360208301602088016107c3565b979650505050505050565b600060208284031215610bf857600080fd5b8135610c0381610674565b9392505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112610c3f57600080fd5b83018035915067ffffffffffffffff821115610c5a57600080fd5b6020019150368190038213156106de57600080fd5b63ffffffff84168152604060208201526000610c8f60408301848661092c565b95945050505050565b63ffffffff85168152606060208201526000610cb860608301858761092c565b8281036040840152610bdb81856107e7565b600060208284031215610cdc57600080fd5b8151610c038161067456fea2646970667358221220f96c3880830f821cf0d2c0778ed909abba13c7f9715359549b95dbb39467c3fa64736f6c63430008120033000000000000000000000000e981e50c7c47f0df8826b5ce3f533f5e4440e687

Deployed Bytecode

0x6080604052600436106100345760003560e01c806368626d8f14610039578063b0c5ea8814610062578063db421487146100bb575b600080fd5b61004c6100473660046106e5565b6100fd565b6040516100599190610831565b60405180910390f35b34801561006e57600080fd5b506100967f000000000000000000000000e981e50c7c47f0df8826b5ce3f533f5e4440e68781565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610059565b3480156100c757600080fd5b506100ef7f6b106ae0e3afae21508569f62d81c7d826b900a2e9ccc973ba97abfae026fc5481565b604051908152602001610059565b61013a6040518060c00160405280600081526020016000815260200160008152602001600015158152602001600015158152602001606081525090565b61dead3314610175576040517f4775cb4b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005a905060006101868989610494565b90505a610193908361088a565b60408401819052620186a01160608085019190915260005a905073ffffffffffffffffffffffffffffffffffffffff831660808901358163b92e87fa6101d98d806108c4565b8e602001356040516024016101f093929190610975565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1660e09490941b93909317909252905161025b9250610ad0565b60006040518083038185875af1925050503d8060008114610298576040519150601f19603f3d011682016040523d82523d6000602084013e61029d565b606091505b50901515608087015291505a6102b3908261088a565b60208601525060808401516103295780516000036103095760408051808201909152601781527f41564f5f5f524541534f4e5f4e4f545f444546494e4544000000000000000000602082015260a0850152610329565b600481019050808060200190518101906103239190610b1b565b60a08501525b8360800151156103d55761034360a0890160808a01610be6565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff167fdaf1e6e151973de199f3ea25b9c6a7c3d94299dc85e269cfd20e48e517ecf7048c8c8060a001906103b99190610c0a565b6040516103c893929190610c6f565b60405180910390a4610479565b6103e560a0890160808a01610be6565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff167f5350e8e0c8cacf19dd5334174c3d5a3e8b7d7e00fdb5457d7ddec04b5e4a1af38c8c8060a0019061045b9190610c0a565b8a60a001516040516104709493929190610c98565b60405180910390a45b5a610484908461088a565b8452509198975050505050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff84811660208084019190915263ffffffff851683850152600060608085018290528551808603820181526080860187528051908401207fff0000000000000000000000000000000000000000000000000000000000000060a08701527f000000000000000000000000e981e50c7c47f0df8826b5ce3f533f5e4440e68790911b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660a186015260b58501527f6b106ae0e3afae21508569f62d81c7d826b900a2e9ccc973ba97abfae026fc5460d5808601919091528551808603909101815260f5909401909452825192019190912016803b156105ac57905061066e565b6040517f2adc4cf700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116600483015263ffffffff851660248301527f000000000000000000000000e981e50c7c47f0df8826b5ce3f533f5e4440e6871690632adc4cf7906044016020604051808303816000875af1158015610646573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066a9190610cca565b9150505b92915050565b73ffffffffffffffffffffffffffffffffffffffff8116811461069657600080fd5b50565b60008083601f8401126106ab57600080fd5b50813567ffffffffffffffff8111156106c357600080fd5b6020830191508360208260051b85010111156106de57600080fd5b9250929050565b60008060008060008086880361012081121561070057600080fd5b873561070b81610674565b9650602088013563ffffffff8116811461072457600080fd5b9550604088013567ffffffffffffffff8082111561074157600080fd5b9089019060c0828c03121561075557600080fd5b81965060a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa08401121561078857600080fd5b60608a0195506101008a01359250808311156107a357600080fd5b50506107b189828a01610699565b979a9699509497509295939492505050565b60005b838110156107de5781810151838201526020016107c6565b50506000910152565b600081518084526107ff8160208601602086016107c3565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081528151602082015260208201516040820152604082015160608201526060820151151560808201526080820151151560a0820152600060a083015160c08084015261088260e08401826107e7565b949350505050565b8181038181111561066e577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126108f957600080fd5b83018035915067ffffffffffffffff82111561091457600080fd5b6020019150600581901b36038213156106de57600080fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b60408082528181018490526000906060808401600587901b8501820188855b89811015610ab9577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa088840301845281357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff818c36030181126109f557600080fd5b8b0160808135610a0481610674565b73ffffffffffffffffffffffffffffffffffffffff168552602082810135368490037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1018112610a5357600080fd5b8301818101903567ffffffffffffffff811115610a6f57600080fd5b803603821315610a7e57600080fd5b8383890152610a90848901828461092c565b858c0135898d0152948a0135978a01979097525095860195919450509190910190600101610994565b505080945050505050826020830152949350505050565b60008251610ae28184602087016107c3565b9190910192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600060208284031215610b2d57600080fd5b815167ffffffffffffffff80821115610b4557600080fd5b818401915084601f830112610b5957600080fd5b815181811115610b6b57610b6b610aec565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715610bb157610bb1610aec565b81604052828152876020848701011115610bca57600080fd5b610bdb8360208301602088016107c3565b979650505050505050565b600060208284031215610bf857600080fd5b8135610c0381610674565b9392505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112610c3f57600080fd5b83018035915067ffffffffffffffff821115610c5a57600080fd5b6020019150368190038213156106de57600080fd5b63ffffffff84168152604060208201526000610c8f60408301848661092c565b95945050505050565b63ffffffff85168152606060208201526000610cb860608301858761092c565b8281036040840152610bdb81856107e7565b600060208284031215610cdc57600080fd5b8151610c038161067456fea2646970667358221220f96c3880830f821cf0d2c0778ed909abba13c7f9715359549b95dbb39467c3fa64736f6c63430008120033

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

000000000000000000000000e981e50c7c47f0df8826b5ce3f533f5e4440e687

-----Decoded View---------------
Arg [0] : avoFactory_ (address): 0xe981E50c7c47F0Df8826B5ce3F533f5E4440e687

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000e981e50c7c47f0df8826b5ce3f533f5e4440e687


Block Transaction Gas Used Reward
view all blocks produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.