Contract Overview
Balance:
0 ETH
ETH Value:
$0.00
My Name Tag:
Not Available
[ Download CSV Export ]
Latest 25 internal transaction
[ Download CSV Export ]
Contract Name:
Broker
Compiler Version
v0.8.10+commit.fc410830
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; import './BrokerStorage.sol'; contract Broker is BrokerStorage { event NewImplementation(address newImplementation); function setImplementation(address newImplementation) external _onlyAdmin_ { implementation = newImplementation; emit NewImplementation(newImplementation); } receive() external payable {} fallback() external payable { address imp = implementation; assembly { calldatacopy(0, 0, calldatasize()) let result := delegatecall(gas(), imp, 0, calldatasize(), 0, 0) returndatacopy(0, 0, returndatasize()) switch result case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; import '../utils/Admin.sol'; abstract contract BrokerStorage is Admin { address public implementation; // user => pool => symbolId => asset => client mapping (address => mapping (address => mapping (bytes32 => mapping (address => address)))) public clients; }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; import './IAdmin.sol'; abstract contract Admin is IAdmin { address public admin; modifier _onlyAdmin_() { require(msg.sender == admin, 'Admin: only admin'); _; } constructor () { admin = msg.sender; emit NewAdmin(admin); } function setAdmin(address newAdmin) external _onlyAdmin_ { admin = newAdmin; emit NewAdmin(newAdmin); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; interface IAdmin { event NewAdmin(address indexed newAdmin); function admin() external view returns (address); function setAdmin(address newAdmin) external; }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newAdmin","type":"address"}],"name":"NewAdmin","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newImplementation","type":"address"}],"name":"NewImplementation","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"address","name":"","type":"address"}],"name":"clients","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"setImplementation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405234801561001057600080fd5b50600080546001600160a01b03191633908117825560405190917f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91a26103718061005c6000396000f3fe60806040526004361061004e5760003560e01c806330447e77146100855780635c60da1b146100f1578063704b6c0214610111578063d784d42614610133578063f851a4401461015357610055565b3661005557005b6001546001600160a01b03163660008037600080366000845af43d6000803e808015610080573d6000f35b3d6000fd5b34801561009157600080fd5b506100d56100a03660046102cc565b60026020908152600094855260408086208252938552838520815291845282842090915282529020546001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b3480156100fd57600080fd5b506001546100d5906001600160a01b031681565b34801561011d57600080fd5b5061013161012c366004610319565b610173565b005b34801561013f57600080fd5b5061013161014e366004610319565b61020e565b34801561015f57600080fd5b506000546100d5906001600160a01b031681565b6000546001600160a01b031633146101c65760405162461bcd60e51b815260206004820152601160248201527020b236b4b71d1037b7363c9030b236b4b760791b60448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b038316908117825560405190917f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91a250565b6000546001600160a01b0316331461025c5760405162461bcd60e51b815260206004820152601160248201527020b236b4b71d1037b7363c9030b236b4b760791b60448201526064016101bd565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f6b70829fcbe4891157f7a7496f9870927de3c8237adbe9cd39bae09b7382c4099060200160405180910390a150565b80356001600160a01b03811681146102c757600080fd5b919050565b600080600080608085870312156102e257600080fd5b6102eb856102b0565b93506102f9602086016102b0565b92506040850135915061030e606086016102b0565b905092959194509250565b60006020828403121561032b57600080fd5b610334826102b0565b939250505056fea264697066735822122016f476612c3945f8210c31867ce1dfb466cebf6a35c2e51e4227bd24aace043764736f6c634300080a0033
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.