ETH Price: $3,998.56 (+2.72%)

Contract

0x3c40b488dfD44A9458F0309c205A84e9D21859C2
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Cast126970862021-06-24 13:25:201271 days ago1624541120IN
0x3c40b488...9D21859C2
0 ETH0.0015762516.1
Cast126514032021-06-17 10:26:261279 days ago1623925586IN
0x3c40b488...9D21859C2
0 ETH0.0126741610
Cast126513272021-06-17 10:09:471279 days ago1623924587IN
0x3c40b488...9D21859C2
0 ETH0.0170453610
Cast126411452021-06-15 20:07:071280 days ago1623787627IN
0x3c40b488...9D21859C2
0 ETH0.0016120418
Cast123629382021-05-03 18:44:421323 days ago1620067482IN
0x3c40b488...9D21859C2
0 ETH0.06775335100.3
Cast123629162021-05-03 18:40:241323 days ago1620067224IN
0x3c40b488...9D21859C2
0 ETH0.02185412108
Transfer123628772021-05-03 18:30:511323 days ago1620066651IN
0x3c40b488...9D21859C2
7.8 ETH0.0022052193
Cast118050312021-02-06 20:52:441409 days ago1612644764IN
0x3c40b488...9D21859C2
0 ETH0.0904991109
Cast118035482021-02-06 15:23:211409 days ago1612625001IN
0x3c40b488...9D21859C2
0 ETH0.03752463130
Transfer118032792021-02-06 14:18:001409 days ago1612621080IN
0x3c40b488...9D21859C2
4.82 ETH0.00298824137

Latest 11 internal transactions

Advanced mode:
Parent Transaction Hash Block
From
To
123629382021-05-03 18:44:421323 days ago1620067482
0x3c40b488...9D21859C2
17 ETH
123629382021-05-03 18:44:421323 days ago1620067482
0x3c40b488...9D21859C2
17 ETH
123629382021-05-03 18:44:421323 days ago1620067482
0x3c40b488...9D21859C2
17 ETH
123629382021-05-03 18:44:421323 days ago1620067482
0x3c40b488...9D21859C2
17 ETH
123629162021-05-03 18:40:241323 days ago1620067224
0x3c40b488...9D21859C2
7.8 ETH
118050312021-02-06 20:52:441409 days ago1612644764
0x3c40b488...9D21859C2
11 ETH
118050312021-02-06 20:52:441409 days ago1612644764
0x3c40b488...9D21859C2
11 ETH
118050312021-02-06 20:52:441409 days ago1612644764
0x3c40b488...9D21859C2
11 ETH
118050312021-02-06 20:52:441409 days ago1612644764
0x3c40b488...9D21859C2
11 ETH
118035482021-02-06 15:23:211409 days ago1612625001
0x3c40b488...9D21859C2
4.82 ETH
118031702021-02-06 13:54:131409 days ago1612619653  Contract Creation0 ETH
Loading...
Loading

Minimal Proxy Contract for 0x939daad09fc4a9b8f8a9352a485dab2df4f4b3f8

Contract Name:
InstaAccount

Compiler Version
v0.6.0+commit.26b70077

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at Etherscan.io on 2020-03-26
*/

pragma solidity ^0.6.0;
pragma experimental ABIEncoderV2;

/**
 * @title InstaAccount.
 * @dev DeFi Smart Account Wallet.
 */

interface IndexInterface {
    function connectors(uint version) external view returns (address);
    function check(uint version) external view returns (address);
    function list() external view returns (address);
}

interface ConnectorsInterface {
    function isConnector(address[] calldata logicAddr) external view returns (bool);
    function isStaticConnector(address[] calldata logicAddr) external view returns (bool);
}

interface CheckInterface {
    function isOk() external view returns (bool);
}

interface ListInterface {
    function addAuth(address user) external;
    function removeAuth(address user) external;
}


contract Record {

    event LogEnable(address indexed user);
    event LogDisable(address indexed user);
    event LogSwitchShield(bool _shield);

    // InstaIndex Address.
    address public constant instaIndex = 0x2971AdFa57b20E5a416aE5a708A8655A9c74f723;
    // The Account Module Version.
    uint public constant version = 1;
    // Auth Module(Address of Auth => bool).
    mapping (address => bool) private auth;
    // Is shield true/false.
    bool public shield;

    /**
     * @dev Check for Auth if enabled.
     * @param user address/user/owner.
     */
    function isAuth(address user) public view returns (bool) {
        return auth[user];
    }

    /**
     * @dev Change Shield State.
    */
    function switchShield(bool _shield) external {
        require(auth[msg.sender], "not-self");
        require(shield != _shield, "shield is set");
        shield = _shield;
        emit LogSwitchShield(shield);
    }

    /**
     * @dev Enable New User.
     * @param user Owner of the Smart Account.
    */
    function enable(address user) public {
        require(msg.sender == address(this) || msg.sender == instaIndex, "not-self-index");
        require(user != address(0), "not-valid");
        require(!auth[user], "already-enabled");
        auth[user] = true;
        ListInterface(IndexInterface(instaIndex).list()).addAuth(user);
        emit LogEnable(user);
    }

    /**
     * @dev Disable User.
     * @param user Owner of the Smart Account.
    */
    function disable(address user) public {
        require(msg.sender == address(this), "not-self");
        require(user != address(0), "not-valid");
        require(auth[user], "already-disabled");
        delete auth[user];
        ListInterface(IndexInterface(instaIndex).list()).removeAuth(user);
        emit LogDisable(user);
    }

}

contract InstaAccount is Record {

    event LogCast(address indexed origin, address indexed sender, uint value);

    receive() external payable {}

     /**
     * @dev Delegate the calls to Connector And this function is ran by cast().
     * @param _target Target to of Connector.
     * @param _data CallData of function in Connector.
    */
    function spell(address _target, bytes memory _data) internal {
        require(_target != address(0), "target-invalid");
        assembly {
            let succeeded := delegatecall(gas(), _target, add(_data, 0x20), mload(_data), 0, 0)

            switch iszero(succeeded)
                case 1 {
                    // throw if delegatecall failed
                    let size := returndatasize()
                    returndatacopy(0x00, 0x00, size)
                    revert(0x00, size)
                }
        }
    }

    /**
     * @dev This is the main function, Where all the different functions are called
     * from Smart Account.
     * @param _targets Array of Target(s) to of Connector.
     * @param _datas Array of Calldata(S) of function.
    */
    function cast(
        address[] calldata _targets,
        bytes[] calldata _datas,
        address _origin
    )
    external
    payable
    {
        require(isAuth(msg.sender) || msg.sender == instaIndex, "permission-denied");
        require(_targets.length == _datas.length , "array-length-invalid");
        IndexInterface indexContract = IndexInterface(instaIndex);
        bool isShield = shield;
        if (!isShield) {
            require(ConnectorsInterface(indexContract.connectors(version)).isConnector(_targets), "not-connector");
        } else {
            require(ConnectorsInterface(indexContract.connectors(version)).isStaticConnector(_targets), "not-static-connector");
        }
        for (uint i = 0; i < _targets.length; i++) {
            spell(_targets[i], _datas[i]);
        }
        address _check = indexContract.check(version);
        if (_check != address(0) && !isShield) require(CheckInterface(_check).isOk(), "not-ok");
        emit LogCast(_origin, msg.sender, msg.value);
    }

}

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"origin","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"LogCast","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"LogDisable","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"LogEnable","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"_shield","type":"bool"}],"name":"LogSwitchShield","type":"event"},{"inputs":[{"internalType":"address[]","name":"_targets","type":"address[]"},{"internalType":"bytes[]","name":"_datas","type":"bytes[]"},{"internalType":"address","name":"_origin","type":"address"}],"name":"cast","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"disable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"enable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"instaIndex","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"isAuth","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"shield","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_shield","type":"bool"}],"name":"switchShield","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

Block Transaction Difficulty 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
Loading...
Loading
[ Download: CSV Export  ]
[ 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.