Contract 0x8B9CbD3da94c637c0652c680Abd3CF7f787aBAF4

Contract Overview

Balance:
0 ETH
Txn Hash Method
Block
From
To
Value
0x3751f66a791075ee6e7c1dd769e68a445945c2364a86eb011667c4b5a193c7fa0x60806040124849662023-07-26 19:00:0060 days 23 hrs ago0xc625f59d51ecdff57fefe535c80d318ca42a0ec4 IN  Create: Settings0 ETH0.0014140027433.00000005
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x9cb573a2c90c35a66ae511cb0758e531fd4990b996cfd9fab57a792e7c0c1dc3125665532023-07-28 16:19:3459 days 2 hrs ago 0x23b826b5d9e78764f3a53d29ff402486101d3629 0x8b9cbd3da94c637c0652c680abd3cf7f787abaf40 ETH
0x76bdacde026917c68218d92c123d5bb97b992919444e9ed2a733856ea10f747f125590032023-07-28 12:07:5459 days 6 hrs ago 0xf05ec36327725e9fd35b07723483823f6a15008d 0x8b9cbd3da94c637c0652c680abd3cf7f787abaf40 ETH
0x76b089dadf508805e59c0d7b9754d5023a2ed34620098ee544871bf0e2fe2c9b125589892023-07-28 12:07:2659 days 6 hrs ago 0xf05ec36327725e9fd35b07723483823f6a15008d 0x8b9cbd3da94c637c0652c680abd3cf7f787abaf40 ETH
0xbe4081ed23410d3d6e815935cdd1ffad77a6375829c4fc44ddc45ebcdf5d6636125589542023-07-28 12:06:1659 days 6 hrs ago 0xf05ec36327725e9fd35b07723483823f6a15008d 0x8b9cbd3da94c637c0652c680abd3cf7f787abaf40 ETH
0x82ba37e1e8673af2ee6d72980ff78fb8e585f0fc4773b8dba33ceacd986fbf37125506042023-07-28 7:27:5659 days 11 hrs ago 0x99e8574d362072adaee5f6c53059be0b7c16167f 0x8b9cbd3da94c637c0652c680abd3cf7f787abaf40 ETH
0x15d0416e6acfb753b46de62427fec0579fb97672f72a284be2ac2ab099db04e6125479972023-07-28 6:01:0259 days 12 hrs ago 0x99e8574d362072adaee5f6c53059be0b7c16167f 0x8b9cbd3da94c637c0652c680abd3cf7f787abaf40 ETH
0x61a0bad5f17ed282a4d8bee0a1c8bb9eb3818d54a3e5d6f84f04aa49db0e276e125464462023-07-28 5:09:2059 days 13 hrs ago 0x99e8574d362072adaee5f6c53059be0b7c16167f 0x8b9cbd3da94c637c0652c680abd3cf7f787abaf40 ETH
0x399e04f52802011c6be342156f7efc83495730a7d0ef400a33a6d3072c316972125369032023-07-27 23:51:1459 days 18 hrs ago 0xf7eb8b643a9e7ff249058969cac7b0326678c736 0x8b9cbd3da94c637c0652c680abd3cf7f787abaf40 ETH
0xa9451b84f10fd141d2dee1d3e2491fa3dc35031b23d9531512e6d4b236010899125368672023-07-27 23:50:0259 days 18 hrs ago 0xf7eb8b643a9e7ff249058969cac7b0326678c736 0x8b9cbd3da94c637c0652c680abd3cf7f787abaf40 ETH
0x678a33f5a0e649c44ae588bcdc411116785399bbd3d3bf8bc8b77bf2620c5035125367082023-07-27 23:44:4459 days 18 hrs ago 0xf7eb8b643a9e7ff249058969cac7b0326678c736 0x8b9cbd3da94c637c0652c680abd3cf7f787abaf40 ETH
0xb48e67c5b67747e6a1f227007eb9a2e74a50067726ba2318b7058b189bcce50e125365012023-07-27 23:37:5059 days 19 hrs ago 0xf7eb8b643a9e7ff249058969cac7b0326678c736 0x8b9cbd3da94c637c0652c680abd3cf7f787abaf40 ETH
0x681ac033154cc3a3906de1d7c3479a5b1664b1cdd16da3c0b3f65d5d81047023125364972023-07-27 23:37:4259 days 19 hrs ago 0xf7eb8b643a9e7ff249058969cac7b0326678c736 0x8b9cbd3da94c637c0652c680abd3cf7f787abaf40 ETH
0xcd113348e3b09c790c677de5712b16163091838ae5ede4056967808cae4eee61125364692023-07-27 23:36:4659 days 19 hrs ago 0xf7eb8b643a9e7ff249058969cac7b0326678c736 0x8b9cbd3da94c637c0652c680abd3cf7f787abaf40 ETH
0x2dbf796995e66ed75f728ef20ba9db69b29a364a0616c4d1fbd8c716efbf8495125362962023-07-27 23:31:0059 days 19 hrs ago 0xf7eb8b643a9e7ff249058969cac7b0326678c736 0x8b9cbd3da94c637c0652c680abd3cf7f787abaf40 ETH
0xf4a147b280a7cdded58937057b70e7dbacf0fe0f94cc1c591db59aa88750d22c125362022023-07-27 23:27:5259 days 19 hrs ago 0xf7eb8b643a9e7ff249058969cac7b0326678c736 0x8b9cbd3da94c637c0652c680abd3cf7f787abaf40 ETH
0x713e380598079fc3f96c8a5e851b3b064b7acc13099fe46c254c8ff70e11b7d4125360102023-07-27 23:21:2859 days 19 hrs ago 0xf7eb8b643a9e7ff249058969cac7b0326678c736 0x8b9cbd3da94c637c0652c680abd3cf7f787abaf40 ETH
0x608b1296a0e7d92265ea0431ec55c4d9a79a844ddc9252a86891929d66e3afba125360072023-07-27 23:21:2259 days 19 hrs ago 0xf7eb8b643a9e7ff249058969cac7b0326678c736 0x8b9cbd3da94c637c0652c680abd3cf7f787abaf40 ETH
0xcd7cfd5b0295e3d98c17bb028c50108dd9f8d484db5ff41dfdfea6e467377d70125359922023-07-27 23:20:5259 days 19 hrs ago 0xf7eb8b643a9e7ff249058969cac7b0326678c736 0x8b9cbd3da94c637c0652c680abd3cf7f787abaf40 ETH
0x3ba833341be01b487c571c9ddfdb8c2ec5b41935d3e0824baede09def2bea949125357792023-07-27 23:13:4659 days 19 hrs ago 0xf7eb8b643a9e7ff249058969cac7b0326678c736 0x8b9cbd3da94c637c0652c680abd3cf7f787abaf40 ETH
0x5ff11a4e43abd922b2cf201b66f816801e979f7d5b781da8d847af59c2e001fc125357752023-07-27 23:13:3859 days 19 hrs ago 0xf7eb8b643a9e7ff249058969cac7b0326678c736 0x8b9cbd3da94c637c0652c680abd3cf7f787abaf40 ETH
0x353505162034c80a40d216a72a07e21d951c867b37d463b9d5f3517ce0f8d84e125357102023-07-27 23:11:2859 days 19 hrs ago 0xf7eb8b643a9e7ff249058969cac7b0326678c736 0x8b9cbd3da94c637c0652c680abd3cf7f787abaf40 ETH
0x36729e93786a098adc2dd07c40f0ca4b69c83c84e303a7d605a15b3b3f52a8eb125357052023-07-27 23:11:1859 days 19 hrs ago 0xf7eb8b643a9e7ff249058969cac7b0326678c736 0x8b9cbd3da94c637c0652c680abd3cf7f787abaf40 ETH
0xa0e1fbb1fd077383dac4b00076e8ff76b13756b269b999520a71e619577db3d8125356812023-07-27 23:10:3059 days 19 hrs ago 0xf7eb8b643a9e7ff249058969cac7b0326678c736 0x8b9cbd3da94c637c0652c680abd3cf7f787abaf40 ETH
0x6ff192f0a3ffb79337d09151a2b6cad17c127c97cf93c663b8f878fd4e2a7aed125355932023-07-27 23:07:3459 days 19 hrs ago 0xf7eb8b643a9e7ff249058969cac7b0326678c736 0x8b9cbd3da94c637c0652c680abd3cf7f787abaf40 ETH
0x602b690f54b79dbe9ca3801f6730c329c2f0a98d2e0b16365c823039996862b3125355882023-07-27 23:07:2459 days 19 hrs ago 0xf7eb8b643a9e7ff249058969cac7b0326678c736 0x8b9cbd3da94c637c0652c680abd3cf7f787abaf40 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Settings

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
paris EvmVersion
File 1 of 3 : Settings.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.18;

import {ISettings} from "src/interfaces/ISettings.sol";
import {Owned} from "src/utils/Owned.sol";

/// @title Kwenta Smart Margin Account Settings
/// @author JaredBorders ([email protected])
/// @notice This contract is used to manage the settings of the Kwenta Smart Margin Account
/// @custom:caution Changes to this contract will effectively clear any existing settings.
/// Post update, the owner will need to reconfigure the settings either in the deploy script or
/// via the Settings contract constructor.
contract Settings is ISettings, Owned {
    /*//////////////////////////////////////////////////////////////
                                 STATE
    //////////////////////////////////////////////////////////////*/

    /// @inheritdoc ISettings
    bool public accountExecutionEnabled = true;

    /// @inheritdoc ISettings
    uint256 public executorFee = 1 ether / 1000;

    /// @notice mapping of whitelisted tokens available for swapping via uniswap commands
    mapping(address => bool) internal _whitelistedTokens;

    /*//////////////////////////////////////////////////////////////
                              CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    /// @notice constructs the Settings contract
    /// @param _owner: address of the owner of the contract
    constructor(address _owner) Owned(_owner) {}

    /*//////////////////////////////////////////////////////////////
                                 VIEWS
    //////////////////////////////////////////////////////////////*/

    /// @inheritdoc ISettings
    function isTokenWhitelisted(address _token)
        external
        view
        override
        returns (bool)
    {
        return _whitelistedTokens[_token];
    }

    /*//////////////////////////////////////////////////////////////
                                SETTERS
    //////////////////////////////////////////////////////////////*/

    /// @inheritdoc ISettings
    function setAccountExecutionEnabled(bool _enabled)
        external
        override
        onlyOwner
    {
        accountExecutionEnabled = _enabled;

        emit AccountExecutionEnabledSet(_enabled);
    }

    /// @inheritdoc ISettings
    function setExecutorFee(uint256 _executorFee) external override onlyOwner {
        executorFee = _executorFee;

        emit ExecutorFeeSet(_executorFee);
    }

    /// @inheritdoc ISettings
    function setTokenWhitelistStatus(address _token, bool _isWhitelisted)
        external
        override
        onlyOwner
    {
        _whitelistedTokens[_token] = _isWhitelisted;

        emit TokenWhitelistStatusUpdated(_token, _isWhitelisted);
    }
}

File 2 of 3 : ISettings.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.18;

/// @title Kwenta Smart Margin Account Settings Interface
/// @author JaredBorders ([email protected])
interface ISettings {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    /// @notice emitted when account execution is enabled or disabled
    /// @param enabled: true if account execution is enabled, false if disabled
    event AccountExecutionEnabledSet(bool enabled);

    /// @notice emitted when the executor fee is updated
    /// @param executorFee: the executor fee
    event ExecutorFeeSet(uint256 executorFee);

    /// @notice emitted when a token is added to or removed from the whitelist
    /// @param token: address of the token
    /// @param isWhitelisted: true if token is whitelisted, false if not
    event TokenWhitelistStatusUpdated(address token, bool isWhitelisted);

    /*//////////////////////////////////////////////////////////////
                                 VIEWS
    //////////////////////////////////////////////////////////////*/

    /// @notice checks if account execution is enabled or disabled
    /// @return enabled: true if account execution is enabled, false if disabled
    function accountExecutionEnabled() external view returns (bool);

    /// @notice gets the conditional order executor fee
    /// @return executorFee: the executor fee
    function executorFee() external view returns (uint256);

    /// @notice checks if token is whitelisted
    /// @param _token: address of the token to check
    /// @return true if token is whitelisted, false if not
    function isTokenWhitelisted(address _token) external view returns (bool);

    /*//////////////////////////////////////////////////////////////
                                SETTERS
    //////////////////////////////////////////////////////////////*/

    /// @notice enables or disables account execution
    /// @param _enabled: true if account execution is enabled, false if disabled
    function setAccountExecutionEnabled(bool _enabled) external;

    /// @notice sets the conditional order executor fee
    /// @param _executorFee: the executor fee
    function setExecutorFee(uint256 _executorFee) external;

    /// @notice adds/removes token to/from whitelist
    /// @dev does not check if token was previously whitelisted
    /// @param _token: address of the token to add
    /// @param _isWhitelisted: true if token is to be whitelisted, false if not
    function setTokenWhitelistStatus(address _token, bool _isWhitelisted)
        external;
}

File 3 of 3 : Owned.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.18;

/// @notice Simple single owner authorization mixin.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/auth/Owned.sol)
abstract contract Owned {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

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

    /*//////////////////////////////////////////////////////////////
                            OWNERSHIP STORAGE
    //////////////////////////////////////////////////////////////*/

    address public owner;

    modifier onlyOwner() virtual {
        require(msg.sender == owner, "UNAUTHORIZED");

        _;
    }

    /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(address _owner) {
        owner = _owner;

        emit OwnershipTransferred(address(0), _owner);
    }

    /*//////////////////////////////////////////////////////////////
                             OWNERSHIP LOGIC
    //////////////////////////////////////////////////////////////*/

    function transferOwnership(address newOwner) public virtual onlyOwner {
        owner = newOwner;

        emit OwnershipTransferred(msg.sender, newOwner);
    }
}

Settings
{
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 1000000
  },
  "metadata": {
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "libraries": {}
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"AccountExecutionEnabledSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"executorFee","type":"uint256"}],"name":"ExecutorFeeSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"bool","name":"isWhitelisted","type":"bool"}],"name":"TokenWhitelistStatusUpdated","type":"event"},{"inputs":[],"name":"accountExecutionEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"executorFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"isTokenWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_enabled","type":"bool"}],"name":"setAccountExecutionEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_executorFee","type":"uint256"}],"name":"setExecutorFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bool","name":"_isWhitelisted","type":"bool"}],"name":"setTokenWhitelistStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526000805460ff60a01b1916600160a01b17905566038d7ea4c6800060015534801561002e57600080fd5b5060405161073d38038061073d83398101604081905261004d9161009c565b600080546001600160a01b0319166001600160a01b03831690811782556040518392907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350506100cc565b6000602082840312156100ae57600080fd5b81516001600160a01b03811681146100c557600080fd5b9392505050565b610662806100db6000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c80638da5cb5b1161005b5780638da5cb5b14610106578063b5af090f1461014b578063ebb5723814610184578063f2fde38b1461019757600080fd5b8063062af0b01461008d578063125127b3146100a95780637e8d7245146100de5780638010faca146100f3575b600080fd5b61009660015481565b6040519081526020015b60405180910390f35b6000546100ce9074010000000000000000000000000000000000000000900460ff1681565b60405190151581526020016100a0565b6100f16100ec36600461057f565b6101aa565b005b6100f16101013660046105c5565b6102b4565b6000546101269073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100a0565b6100ce6101593660046105f8565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205460ff1690565b6100f1610192366004610613565b6103c3565b6100f16101a53660046105f8565b610479565b60005473ffffffffffffffffffffffffffffffffffffffff163314610230576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6000805482151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff9091161790556040517f8d6f261c44da2e77cf0823a5ea4c93cceedad6f037f0ce7ee4be3575baab944d906102a990831515815260200190565b60405180910390a150565b60005473ffffffffffffffffffffffffffffffffffffffff163314610335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610227565b73ffffffffffffffffffffffffffffffffffffffff821660008181526002602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168515159081179091558251938452908301527fb913ce092ad70ab4289ac16f73c878fa699fa3c02b122d593d29fb0fe73c352b910160405180910390a15050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610444576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610227565b60018190556040518181527fad1606d0d14ba44f6f1342eab97c390c269a0918ad22773094b8c14037d78e58906020016102a9565b60005473ffffffffffffffffffffffffffffffffffffffff1633146104fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610227565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b8035801515811461057a57600080fd5b919050565b60006020828403121561059157600080fd5b61059a8261056a565b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461057a57600080fd5b600080604083850312156105d857600080fd5b6105e1836105a1565b91506105ef6020840161056a565b90509250929050565b60006020828403121561060a57600080fd5b61059a826105a1565b60006020828403121561062557600080fd5b503591905056fea264697066735822122049b318df81c5db67ab297a35ee19af539e6e2de393756a4dde7f3c1f5d4afdc664736f6c63430008120033000000000000000000000000c625f59d51ecdff57fefe535c80d318ca42a0ec4

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

000000000000000000000000c625f59d51ecdff57fefe535c80d318ca42a0ec4

-----Decoded View---------------
Arg [0] : _owner (address): 0xc625F59d51ecDff57FEFE535C80d318CA42A0Ec4

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


Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading