Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 52 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Distribute | 14206486 | 896 days ago | IN | 0 ETH | 0.00289238 | ||||
Distribute | 14185686 | 899 days ago | IN | 0 ETH | 0.00381865 | ||||
Set Distribute T... | 14185683 | 899 days ago | IN | 0 ETH | 0.01153492 | ||||
Distribute | 14153425 | 904 days ago | IN | 0 ETH | 0.00785058 | ||||
Set Is Call | 14153424 | 904 days ago | IN | 0 ETH | 0.0028049 | ||||
Distribute | 14153394 | 904 days ago | IN | 0 ETH | 0.01091647 | ||||
Distribute | 14153339 | 905 days ago | IN | 0 ETH | 0.00884136 | ||||
Set Distribute T... | 14128815 | 908 days ago | IN | 0 ETH | 0.02884092 | ||||
Distribute | 14115903 | 910 days ago | IN | 0 ETH | 0.02332774 | ||||
Distribute | 14106189 | 912 days ago | IN | 0 ETH | 0.01003012 | ||||
Distribute | 14090166 | 914 days ago | IN | 0 ETH | 0.02348041 | ||||
Distribute | 14064327 | 918 days ago | IN | 0 ETH | 0.01579246 | ||||
Distribute | 14041013 | 922 days ago | IN | 0 ETH | 0.01324078 | ||||
Distribute | 14022516 | 925 days ago | IN | 0 ETH | 0.00884836 | ||||
Distribute | 13997008 | 929 days ago | IN | 0 ETH | 0.01843037 | ||||
Distribute | 13982757 | 931 days ago | IN | 0 ETH | 0.01811079 | ||||
Distribute | 13960831 | 934 days ago | IN | 0 ETH | 0.01875434 | ||||
Distribute | 13951955 | 936 days ago | IN | 0 ETH | 0.01701881 | ||||
Distribute | 13937685 | 938 days ago | IN | 0 ETH | 0.01126 | ||||
Distribute | 13922485 | 940 days ago | IN | 0 ETH | 0.01244421 | ||||
Distribute | 13902619 | 943 days ago | IN | 0 ETH | 0.01790438 | ||||
Distribute | 13882291 | 946 days ago | IN | 0 ETH | 0.00768318 | ||||
Distribute | 13866652 | 949 days ago | IN | 0 ETH | 0.00797578 | ||||
Distribute | 13848462 | 952 days ago | IN | 0 ETH | 0.00467835 | ||||
Distribute | 13836566 | 953 days ago | IN | 0 ETH | 0.00722852 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
14206486 | 896 days ago | 0.47469496 ETH | ||||
14201623 | 897 days ago | 0.00577894 ETH | ||||
14201228 | 897 days ago | 0.19320689 ETH | ||||
14198205 | 898 days ago | 0.17511851 ETH | ||||
14189966 | 899 days ago | 0.10059061 ETH | ||||
14185686 | 899 days ago | 1.06901884 ETH | ||||
14185683 | 899 days ago | 1.06901884 ETH | ||||
14185683 | 899 days ago | 1.06901884 ETH | ||||
14182708 | 900 days ago | 0.24251405 ETH | ||||
14181626 | 900 days ago | 0.13306707 ETH | ||||
14181137 | 900 days ago | 0.05376585 ETH | ||||
14180642 | 900 days ago | 0.0061413 ETH | ||||
14180045 | 900 days ago | 0.00780925 ETH | ||||
14180024 | 900 days ago | 0.20309762 ETH | ||||
14178755 | 901 days ago | 0.08086094 ETH | ||||
14176752 | 901 days ago | 0.11192144 ETH | ||||
14176233 | 901 days ago | 0.0967284 ETH | ||||
14175590 | 901 days ago | 0.06594986 ETH | ||||
14174567 | 901 days ago | 0.06250974 ETH | ||||
14173608 | 901 days ago | 0.05963689 ETH | ||||
14173115 | 901 days ago | 0.03420792 ETH | ||||
14171563 | 902 days ago | 0.00672494 ETH | ||||
14170801 | 902 days ago | 0.00587575 ETH | ||||
14169850 | 902 days ago | 0.04086526 ETH | ||||
14168053 | 902 days ago | 0.0328031 ETH |
Loading...
Loading
Contract Name:
MyobuDistributor
Compiler Version
v0.8.7+commit.e28d00a7
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; import "./Utils/Ownable.sol"; import "./Interfaces/IMyobuDistributor.sol"; contract MyobuDistributor is IMyobuDistributor, Ownable { mapping(address => bool) public isCall; mapping(uint256 => DistributeTo) private distributeTo_; function distributeTo(uint256 index) external view override returns (DistributeTo memory) { return distributeTo_[index]; } uint256 public override distributeToCount; function addArrayToMapping(DistributeTo[] memory array) private { distributeToCount = array.length; for (uint256 i; i < array.length; i++) { distributeTo_[i] = array[i]; } } function setDistributeTo(DistributeTo[] calldata toDistributeTo) external onlyOwner { if (distributeToCount != 0) distribute(); uint256 totalPercentage; for (uint256 i; i < toDistributeTo.length; i++) { totalPercentage += toDistributeTo[i].percentage; } require(totalPercentage == 100, "Total percentage must equal to 100"); addArrayToMapping(toDistributeTo); emit DistributeToChanged(toDistributeTo); } function setIsCall(address _address, bool onoff) external onlyOwner { isCall[_address] = onoff; } function distribute() public override { require(distributeToCount != 0, "Must have distribution set"); if (address(this).balance == 0) return; uint256 totalBalance = address(this).balance; for (uint256 i; i < distributeToCount; i++) { address to = distributeTo_[i].addr; uint256 amount = totalBalance * distributeTo_[i].percentage / 100; if (isCall[to]) { // Calls with non empty calldata to trigger fallback() payable(to).call{value: amount} ("a"); } else { payable(to).send(amount); } } emit Distributed(totalBalance, _msgSender()); } // solhint-disable-next-line receive() external payable {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IMyobuDistributor { struct DistributeTo { address addr; uint256 percentage; } event DistributeToChanged(DistributeTo[] _distributeTo); function distributeTo(uint256 index) external view returns (DistributeTo memory); function distributeToCount() external view returns (uint256); event Distributed(uint256 amount, address sender); function distribute() external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require( newOwner != address(0), "Ownable: new owner is the zero address" ); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"percentage","type":"uint256"}],"indexed":false,"internalType":"struct IMyobuDistributor.DistributeTo[]","name":"_distributeTo","type":"tuple[]"}],"name":"DistributeToChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"sender","type":"address"}],"name":"Distributed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"distribute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"distributeTo","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"percentage","type":"uint256"}],"internalType":"struct IMyobuDistributor.DistributeTo","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"distributeToCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isCall","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"percentage","type":"uint256"}],"internalType":"struct IMyobuDistributor.DistributeTo[]","name":"toDistributeTo","type":"tuple[]"}],"name":"setDistributeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bool","name":"onoff","type":"bool"}],"name":"setIsCall","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610a188061007e6000396000f3fe60806040526004361061008a5760003560e01c8063926f172711610059578063926f17271461011a578063b4cf04ff1461015a578063e4fc6b6d1461017e578063f2fde38b14610193578063f8e9273a146101b357600080fd5b80634c1cd65714610096578063715018a6146100b85780638277d2ea146100cd5780638da5cb5b146100ed57600080fd5b3661009157005b600080fd5b3480156100a257600080fd5b506100b66100b1366004610787565b610239565b005b3480156100c457600080fd5b506100b6610297565b3480156100d957600080fd5b506100b66100e83660046107c3565b6102cd565b3480156100f957600080fd5b506000546040516001600160a01b0390911681526020015b60405180910390f35b34801561012657600080fd5b5061014a610135366004610765565b60016020526000908152604090205460ff1681565b6040519015158152602001610111565b34801561016657600080fd5b5061017060035481565b604051908152602001610111565b34801561018a57600080fd5b506100b6610443565b34801561019f57600080fd5b506100b66101ae366004610765565b6105e7565b3480156101bf57600080fd5b506102156101ce36600461089d565b604080518082019091526000808252602082015250600090815260026020908152604091829020825180840190935280546001600160a01b03168352600101549082015290565b6040805182516001600160a01b031681526020928301519281019290925201610111565b6000546001600160a01b0316331461026c5760405162461bcd60e51b81526004016102639061090d565b60405180910390fd5b6001600160a01b03919091166000908152600160205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146102c15760405162461bcd60e51b81526004016102639061090d565b6102cb6000610682565b565b6000546001600160a01b031633146102f75760405162461bcd60e51b81526004016102639061090d565b6003541561030757610307610443565b6000805b8281101561034e57838382818110610325576103256109cc565b905060400201602001358261033a9190610942565b9150806103468161099b565b91505061030b565b50806064146103aa5760405162461bcd60e51b815260206004820152602260248201527f546f74616c2070657263656e74616765206d75737420657175616c20746f2031604482015261030360f41b6064820152608401610263565b6104058383808060200260200160405190810160405280939291908181526020016000905b828210156103fb576103ec60408302860136819003810190610838565b815260200190600101906103cf565b50505050506106d2565b7f4f8a6a7dfa6178a813d32a68a4bd3411ecf0cbeb476030701293a386b9ce6dd183836040516104369291906108b6565b60405180910390a1505050565b6003546104925760405162461bcd60e51b815260206004820152601a60248201527f4d757374206861766520646973747269627574696f6e207365740000000000006044820152606401610263565b4761049957565b4760005b6003548110156105a957600081815260026020526040812080546001909101546001600160a01b0390911691906064906104d7908661097c565b6104e1919061095a565b6001600160a01b03831660009081526001602052604090205490915060ff161561056e57816001600160a01b03168160405161052490606160f81b815260010190565b60006040518083038185875af1925050503d8060008114610561576040519150601f19603f3d011682016040523d82523d6000602084013e610566565b606091505b505050610594565b6040516001600160a01b0383169082156108fc029083906000818181858888f150505050505b505080806105a19061099b565b91505061049d565b506040805182815233602082015281517f6f0c43eb568796d764f36f0413e491b0b334101cb8b6288756cd9b76a8c00f8a929181900390910190a150565b6000546001600160a01b031633146106115760405162461bcd60e51b81526004016102639061090d565b6001600160a01b0381166106765760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610263565b61067f81610682565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b805160035560005b8151811015610745578181815181106106f5576106f56109cc565b60209081029190910181015160008381526002835260409020815181546001600160a01b0319166001600160a01b039091161781559101516001909101558061073d8161099b565b9150506106da565b5050565b80356001600160a01b038116811461076057600080fd5b919050565b60006020828403121561077757600080fd5b61078082610749565b9392505050565b6000806040838503121561079a57600080fd5b6107a383610749565b9150602083013580151581146107b857600080fd5b809150509250929050565b600080602083850312156107d657600080fd5b823567ffffffffffffffff808211156107ee57600080fd5b818501915085601f83011261080257600080fd5b81358181111561081157600080fd5b8660208260061b850101111561082657600080fd5b60209290920196919550909350505050565b60006040828403121561084a57600080fd5b6040516040810181811067ffffffffffffffff8211171561087b57634e487b7160e01b600052604160045260246000fd5b60405261088783610749565b8152602083013560208201528091505092915050565b6000602082840312156108af57600080fd5b5035919050565b6020808252818101839052600090604080840186845b87811015610900576001600160a01b036108e583610749565b168352818501358584015291830191908301906001016108cc565b5090979650505050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115610955576109556109b6565b500190565b60008261097757634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615610996576109966109b6565b500290565b60006000198214156109af576109af6109b6565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fdfea264697066735822122033236b9c8f09c01659b4010b63ebf87457941d20df503988c1881047c4555c2664736f6c63430008070033
Deployed Bytecode
0x60806040526004361061008a5760003560e01c8063926f172711610059578063926f17271461011a578063b4cf04ff1461015a578063e4fc6b6d1461017e578063f2fde38b14610193578063f8e9273a146101b357600080fd5b80634c1cd65714610096578063715018a6146100b85780638277d2ea146100cd5780638da5cb5b146100ed57600080fd5b3661009157005b600080fd5b3480156100a257600080fd5b506100b66100b1366004610787565b610239565b005b3480156100c457600080fd5b506100b6610297565b3480156100d957600080fd5b506100b66100e83660046107c3565b6102cd565b3480156100f957600080fd5b506000546040516001600160a01b0390911681526020015b60405180910390f35b34801561012657600080fd5b5061014a610135366004610765565b60016020526000908152604090205460ff1681565b6040519015158152602001610111565b34801561016657600080fd5b5061017060035481565b604051908152602001610111565b34801561018a57600080fd5b506100b6610443565b34801561019f57600080fd5b506100b66101ae366004610765565b6105e7565b3480156101bf57600080fd5b506102156101ce36600461089d565b604080518082019091526000808252602082015250600090815260026020908152604091829020825180840190935280546001600160a01b03168352600101549082015290565b6040805182516001600160a01b031681526020928301519281019290925201610111565b6000546001600160a01b0316331461026c5760405162461bcd60e51b81526004016102639061090d565b60405180910390fd5b6001600160a01b03919091166000908152600160205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146102c15760405162461bcd60e51b81526004016102639061090d565b6102cb6000610682565b565b6000546001600160a01b031633146102f75760405162461bcd60e51b81526004016102639061090d565b6003541561030757610307610443565b6000805b8281101561034e57838382818110610325576103256109cc565b905060400201602001358261033a9190610942565b9150806103468161099b565b91505061030b565b50806064146103aa5760405162461bcd60e51b815260206004820152602260248201527f546f74616c2070657263656e74616765206d75737420657175616c20746f2031604482015261030360f41b6064820152608401610263565b6104058383808060200260200160405190810160405280939291908181526020016000905b828210156103fb576103ec60408302860136819003810190610838565b815260200190600101906103cf565b50505050506106d2565b7f4f8a6a7dfa6178a813d32a68a4bd3411ecf0cbeb476030701293a386b9ce6dd183836040516104369291906108b6565b60405180910390a1505050565b6003546104925760405162461bcd60e51b815260206004820152601a60248201527f4d757374206861766520646973747269627574696f6e207365740000000000006044820152606401610263565b4761049957565b4760005b6003548110156105a957600081815260026020526040812080546001909101546001600160a01b0390911691906064906104d7908661097c565b6104e1919061095a565b6001600160a01b03831660009081526001602052604090205490915060ff161561056e57816001600160a01b03168160405161052490606160f81b815260010190565b60006040518083038185875af1925050503d8060008114610561576040519150601f19603f3d011682016040523d82523d6000602084013e610566565b606091505b505050610594565b6040516001600160a01b0383169082156108fc029083906000818181858888f150505050505b505080806105a19061099b565b91505061049d565b506040805182815233602082015281517f6f0c43eb568796d764f36f0413e491b0b334101cb8b6288756cd9b76a8c00f8a929181900390910190a150565b6000546001600160a01b031633146106115760405162461bcd60e51b81526004016102639061090d565b6001600160a01b0381166106765760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610263565b61067f81610682565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b805160035560005b8151811015610745578181815181106106f5576106f56109cc565b60209081029190910181015160008381526002835260409020815181546001600160a01b0319166001600160a01b039091161781559101516001909101558061073d8161099b565b9150506106da565b5050565b80356001600160a01b038116811461076057600080fd5b919050565b60006020828403121561077757600080fd5b61078082610749565b9392505050565b6000806040838503121561079a57600080fd5b6107a383610749565b9150602083013580151581146107b857600080fd5b809150509250929050565b600080602083850312156107d657600080fd5b823567ffffffffffffffff808211156107ee57600080fd5b818501915085601f83011261080257600080fd5b81358181111561081157600080fd5b8660208260061b850101111561082657600080fd5b60209290920196919550909350505050565b60006040828403121561084a57600080fd5b6040516040810181811067ffffffffffffffff8211171561087b57634e487b7160e01b600052604160045260246000fd5b60405261088783610749565b8152602083013560208201528091505092915050565b6000602082840312156108af57600080fd5b5035919050565b6020808252818101839052600090604080840186845b87811015610900576001600160a01b036108e583610749565b168352818501358584015291830191908301906001016108cc565b5090979650505050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115610955576109556109b6565b500190565b60008261097757634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615610996576109966109b6565b500290565b60006000198214156109af576109af6109b6565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fdfea264697066735822122033236b9c8f09c01659b4010b63ebf87457941d20df503988c1881047c4555c2664736f6c63430008070033
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.