Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xDc4846F8...F89C32A34 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
MixinAccount
Compiler Version
v0.8.21+commit.d9974bed
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2023-11-21 */ // SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.8.0 <0.9.0; interface IERC20 { function balanceOf(address _who) external view returns (uint256); function transfer(address _to, uint256 _value) external returns (bool); } contract MixinAccount { address public immutable depository; address public custodian; constructor() { depository = msg.sender; } function assignCustodian(address _custodian) external { require(msg.sender == depository, "not depository"); custodian = _custodian; } function claim(address _asset) external { if (_asset == address(0)) { uint256 value = address(this).balance; payable(custodian).transfer(value); } else { uint256 value = IERC20(_asset).balanceOf(address(this)); IERC20(_asset).transfer(custodian, value); } } receive() external payable {} fallback() external payable {} } contract MixinDepository { address public manager; address public custodian; event DepositoryConstructed( address indexed manager, address indexed custodian, bytes code ); event DepositoryManagerAssigned(address indexed manager); event DepositoryCustodianAssigned(address indexed custodian); mapping(uint256 => address) public contracts; mapping(address => uint256) public accounts; constructor(address _manager, address _custodian) { manager = _manager; custodian = _custodian; bytes memory code = type(MixinAccount).creationCode; emit DepositoryConstructed(manager, custodian, code); } function assignManagerAndCustodian(address _manager, address _custodian) external { require(msg.sender == manager, "not manager"); manager = _manager; custodian = _custodian; emit DepositoryManagerAssigned(manager); emit DepositoryCustodianAssigned(custodian); } function assignAccountCustodian(uint256 _index) external { MixinAccount account = MixinAccount(payable(contracts[_index])); account.assignCustodian(custodian); } function deploy(uint256 _index) external returns (address) { address at = contracts[_index]; if (at != address(0)) { require(accounts[at] == _index, "bad code"); return at; } MixinAccount account = new MixinAccount{salt: bytes32(_index)}(); account.assignCustodian(custodian); at = address(account); contracts[_index] = at; accounts[at] = _index; return at; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"address","name":"_custodian","type":"address"}],"name":"assignCustodian","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"custodian","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"depository","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Deployed Bytecode
0x6080604052600436106100405760003560e01c80631e83409a14610049578063375b74c314610069578063bedd12a5146100a5578063d3af44a1146100d957005b3661004757005b005b34801561005557600080fd5b506100476100643660046102ba565b6100f9565b34801561007557600080fd5b50600054610089906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b3480156100b157600080fd5b506100897f0000000000000000000000002c4ee934551bd74503f63083c4b4553a230d208c81565b3480156100e557600080fd5b506100476100f43660046102ba565b61022b565b6001600160a01b038116610147576000805460405147926001600160a01b039092169183156108fc02918491818181858888f19350505050158015610142573d6000803e3d6000fd5b505050565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa15801561018e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101b291906102ea565b60005460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810183905291925083169063a9059cbb906044016020604051808303816000875af1158015610207573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101429190610303565b336001600160a01b037f0000000000000000000000002c4ee934551bd74503f63083c4b4553a230d208c16146102985760405162461bcd60e51b815260206004820152600e60248201526d6e6f74206465706f7369746f727960901b604482015260640160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000602082840312156102cc57600080fd5b81356001600160a01b03811681146102e357600080fd5b9392505050565b6000602082840312156102fc57600080fd5b5051919050565b60006020828403121561031557600080fd5b815180151581146102e357600080fdfea26469706673582212201379a8eefb80c8af245031cbea31e83a1e34946ca80286a3eec60e4b7e8cf13c64736f6c63430008150033
Deployed Bytecode Sourcemap
247:752:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;580:341;;;;;;;;;;-1:-1:-1;580:341:0;;;;;:::i;:::-;;:::i;318:24::-;;;;;;;;;;-1:-1:-1;318:24:0;;;;-1:-1:-1;;;;;318:24:0;;;;;;-1:-1:-1;;;;;469:32:1;;;451:51;;439:2;424:18;318:24:0;;;;;;;276:35;;;;;;;;;;;;;;;415:157;;;;;;;;;;-1:-1:-1;415:157:0;;;;;:::i;:::-;;:::i;580:341::-;-1:-1:-1;;;;;635:20:0;;631:283;;672:13;732:9;;724:34;;688:21;;-1:-1:-1;;;;;732:9:0;;;;724:34;;;;;688:21;;724:34;672:13;724:34;688:21;732:9;724:34;;;;;;;;;;;;;;;;;;;;;657:113;580:341;:::o;631:283::-;807:39;;-1:-1:-1;;;807:39:0;;840:4;807:39;;;451:51:1;791:13:0;;-1:-1:-1;;;;;807:24:0;;;;;424:18:1;;807:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;885:9;;861:41;;-1:-1:-1;;;861:41:0;;-1:-1:-1;;;;;885:9:0;;;861:41;;;876:51:1;943:18;;;936:34;;;791:55:0;;-1:-1:-1;861:23:0;;;;;849:18:1;;861:41:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;415:157::-;488:10;-1:-1:-1;;;;;502:10:0;488:24;;480:51;;;;-1:-1:-1;;;480:51:0;;1465:2:1;480:51:0;;;1447:21:1;1504:2;1484:18;;;1477:30;-1:-1:-1;;;1523:18:1;;;1516:44;1577:18;;480:51:0;;;;;;;;542:9;:22;;-1:-1:-1;;;;;;542:22:0;-1:-1:-1;;;;;542:22:0;;;;;;;;;;415:157::o;14:286:1:-;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;168:23;;-1:-1:-1;;;;;220:31:1;;210:42;;200:70;;266:1;263;256:12;200:70;289:5;14:286;-1:-1:-1;;;14:286:1:o;513:184::-;583:6;636:2;624:9;615:7;611:23;607:32;604:52;;;652:1;649;642:12;604:52;-1:-1:-1;675:16:1;;513:184;-1:-1:-1;513:184:1:o;981:277::-;1048:6;1101:2;1089:9;1080:7;1076:23;1072:32;1069:52;;;1117:1;1114;1107:12;1069:52;1149:9;1143:16;1202:5;1195:13;1188:21;1181:5;1178:32;1168:60;;1224:1;1221;1214:12
Swarm Source
ipfs://1379a8eefb80c8af245031cbea31e83a1e34946ca80286a3eec60e4b7e8cf13c
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.