Source Code
Overview
MON Balance
MON Value
$7,662.59 (@ $0.02/MON)| Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 50172141 | 3 days ago | 0.2 MON | ||||
| 49904255 | 4 days ago | 295.75 MON | ||||
| 49806326 | 4 days ago | 200 MON | ||||
| 49202889 | 7 days ago | 0.3 MON | ||||
| 49132857 | 8 days ago | 5 MON | ||||
| 49085995 | 8 days ago | 4 MON | ||||
| 48777760 | 9 days ago | 2.1 MON | ||||
| 48774678 | 9 days ago | 0.6 MON | ||||
| 48611977 | 10 days ago | 50 MON | ||||
| 48580818 | 10 days ago | 0.3 MON | ||||
| 48514558 | 10 days ago | 0.3 MON | ||||
| 48455433 | 11 days ago | 1.3 MON | ||||
| 48022297 | 13 days ago | 7.6 MON | ||||
| 47571217 | 15 days ago | 2.55 MON | ||||
| 47486286 | 15 days ago | 4.05 MON | ||||
| 47484286 | 15 days ago | 9.45 MON | ||||
| 47393775 | 16 days ago | 20 MON | ||||
| 47198733 | 17 days ago | 4,694.6375 MON | ||||
| 47149848 | 17 days ago | 2.5 MON | ||||
| 46947035 | 18 days ago | 200 MON | ||||
| 46866538 | 18 days ago | 7.5 MON | ||||
| 46866370 | 18 days ago | 0.5 MON | ||||
| 46838750 | 18 days ago | 1.25 MON | ||||
| 46812653 | 18 days ago | 335 MON | ||||
| 46802906 | 18 days ago | 1 MON |
Loading...
Loading
Contract Name:
ArchetypePayouts
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 1 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
// ArchetypePayouts v0.7.0
//
// d8888 888 888
// d88888 888 888
// d88P888 888 888
// d88P 888 888d888 .d8888b 88888b. .d88b. 888888 888 888 88888b. .d88b.
// d88P 888 888P" d88P" 888 "88b d8P Y8b 888 888 888 888 "88b d8P Y8b
// d88P 888 888 888 888 888 88888888 888 888 888 888 888 88888888
// d8888888888 888 Y88b. 888 888 Y8b. Y88b. Y88b 888 888 d88P Y8b.
// d88P 888 888 "Y8888P 888 888 "Y8888 "Y888 "Y88888 88888P" "Y8888
// 888 888
// Y8b d88P 888
//
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
using SafeERC20 for IERC20;
error InvalidLength();
error InvalidSplitShares();
error TransferFailed();
error BalanceEmpty();
error NotApprovedToWithdraw();
contract ArchetypePayouts {
event Withdrawal(address indexed src, address token, uint256 wad);
event FundsAdded(address indexed recipient, address token, uint256 amount);
mapping(address => mapping(address => uint256)) private _balance;
mapping(address => mapping(address => bool)) private _approvals;
function updateBalances(
uint256 totalAmount,
address token,
address[] calldata recipients,
uint16[] calldata splits
) public payable {
if (recipients.length != splits.length) {
revert InvalidLength();
}
uint256 totalShares = 0;
for (uint256 i = 0; i < splits.length; i++) {
totalShares += splits[i];
}
if (totalShares != 10000) {
revert InvalidSplitShares();
}
if (token == address(0)) {
// ETH payments
uint256 totalReceived = msg.value;
for (uint256 i = 0; i < recipients.length; i++) {
if (splits[i] > 0) {
uint256 amountToAdd = (totalReceived * splits[i]) / 10000;
_balance[recipients[i]][token] += amountToAdd;
emit FundsAdded(recipients[i], token, amountToAdd);
}
}
} else {
// ERC20 payments
IERC20 paymentToken = IERC20(token);
paymentToken.safeTransferFrom(msg.sender, address(this), totalAmount);
for (uint256 i = 0; i < recipients.length; i++) {
if (splits[i] > 0) {
uint256 amountToAdd = (totalAmount * splits[i]) / 10000;
_balance[recipients[i]][token] += amountToAdd;
emit FundsAdded(recipients[i], token, amountToAdd);
}
}
}
}
function withdraw() external {
address msgSender = msg.sender;
_withdraw(msgSender, msgSender, address(0));
}
function withdrawTokens(address[] memory tokens) external {
address msgSender = msg.sender;
for (uint256 i = 0; i < tokens.length; i++) {
_withdraw(msgSender, msgSender, tokens[i]);
}
}
function withdrawFrom(address from, address to) public {
if (from != msg.sender && !_approvals[from][to]) {
revert NotApprovedToWithdraw();
}
_withdraw(from, to, address(0));
}
function withdrawTokensFrom(
address from,
address to,
address[] memory tokens
) public {
if (from != msg.sender && !_approvals[from][to]) {
revert NotApprovedToWithdraw();
}
for (uint256 i = 0; i < tokens.length; i++) {
_withdraw(from, to, tokens[i]);
}
}
function _withdraw(
address from,
address to,
address token
) internal {
uint256 wad;
wad = _balance[from][token];
_balance[from][token] = 0;
if (wad == 0) {
revert BalanceEmpty();
}
if (token == address(0)) {
bool success = false;
(success, ) = to.call{ value: wad }("");
if (!success) {
revert TransferFailed();
}
} else {
IERC20 erc20Token = IERC20(token);
erc20Token.safeTransfer(to, wad);
}
emit Withdrawal(from, token, wad);
}
function approveWithdrawal(address delegate, bool approved) external {
_approvals[msg.sender][delegate] = approved;
}
function isApproved(address from, address delegate) external view returns (bool) {
return _approvals[from][delegate];
}
function balance(address recipient) external view returns (uint256) {
return _balance[recipient][address(0)];
}
function balanceToken(address recipient, address token) external view returns (uint256) {
return _balance[recipient][token];
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*
* ==== Security Considerations
*
* There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
* expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
* considered as an intention to spend the allowance in any specific way. The second is that because permits have
* built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
* take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
* generally recommended is:
*
* ```solidity
* function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
* try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
* doThing(..., value);
* }
*
* function doThing(..., uint256 value) public {
* token.safeTransferFrom(msg.sender, address(this), value);
* ...
* }
* ```
*
* Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
* `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
* {SafeERC20-safeTransferFrom}).
*
* Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
* contracts should have entry points that don't rely on permit.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*
* CAUTION: See Security Considerations above.
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/IERC20Permit.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
* Revert on invalid signature.
*/
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
// and not revert is the subcall reverts.
(bool success, bytes memory returndata) = address(token).call(data);
return
success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}{
"optimizer": {
"enabled": true,
"runs": 1
},
"metadata": {
"useLiteralContent": true
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"name":"BalanceEmpty","type":"error"},{"inputs":[],"name":"InvalidLength","type":"error"},{"inputs":[],"name":"InvalidSplitShares","type":"error"},{"inputs":[],"name":"NotApprovedToWithdraw","type":"error"},{"inputs":[],"name":"TransferFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"FundsAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"src","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"wad","type":"uint256"}],"name":"Withdrawal","type":"event"},{"inputs":[{"internalType":"address","name":"delegate","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"approveWithdrawal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"token","type":"address"}],"name":"balanceToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"delegate","type":"address"}],"name":"isApproved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"totalAmount","type":"uint256"},{"internalType":"address","name":"token","type":"address"},{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint16[]","name":"splits","type":"uint16[]"}],"name":"updateBalances","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"withdrawFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"withdrawTokensFrom","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b50611003806100206000396000f3fe6080604052600436106100755760003560e01c80629315b91461007a5780633ccfd60b1461009c5780635ecb16cd146100b15780639a375b07146100d1578063a389783e14610124578063b7f64bd514610159578063e3d670d7146101ab578063e81f02b6146101ea578063ff05280e1461020a575b600080fd5b34801561008657600080fd5b5061009a610095366004610c50565b61021d565b005b3480156100a857600080fd5b5061009a6102c2565b3480156100bd57600080fd5b5061009a6100cc366004610cad565b6102d2565b3480156100dd57600080fd5b5061009a6100ec366004610cef565b3360009081526001602090815260408083206001600160a01b0395909516835293905291909120805460ff1916911515919091179055565b34801561013057600080fd5b5061014461013f366004610d26565b61030d565b60405190151581526020015b60405180910390f35b34801561016557600080fd5b5061019d610174366004610d26565b6001600160a01b0391821660009081526020818152604080832093909416825291909152205490565b604051908152602001610150565b3480156101b757600080fd5b5061019d6101c6366004610d59565b6001600160a01b031660009081526020818152604080832083805290915290205490565b3480156101f657600080fd5b5061009a610205366004610d26565b61033d565b61009a610218366004610dc6565b6103aa565b6001600160a01b038316331480159061025c57506001600160a01b0380841660009081526001602090815260408083209386168352929052205460ff16155b1561027a576040516393256b7d60e01b815260040160405180910390fd5b60005b81518110156102bc576102aa848484848151811061029d5761029d610e4f565b602002602001015161075e565b806102b481610e7b565b91505061027d565b50505050565b336102cf8180600061075e565b50565b3360005b8251811015610308576102f6828385848151811061029d5761029d610e4f565b8061030081610e7b565b9150506102d6565b505050565b6001600160a01b0380831660009081526001602090815260408083209385168352929052205460ff165b92915050565b6001600160a01b038216331480159061037c57506001600160a01b0380831660009081526001602090815260408083209385168352929052205460ff16155b1561039a576040516393256b7d60e01b815260040160405180910390fd5b6103a68282600061075e565b5050565b8281146103ca5760405163251f56a160e21b815260040160405180910390fd5b6000805b8281101561041f578383828181106103e8576103e8610e4f565b90506020020160208101906103fd9190610e94565b61040b9061ffff1683610eb8565b91508061041781610e7b565b9150506103ce565b50806127101461044257604051632429608560e11b815260040160405180910390fd5b6001600160a01b0386166105ca573460005b858110156105c357600085858381811061047057610470610e4f565b90506020020160208101906104859190610e94565b61ffff1611156105b15760006127108686848181106104a6576104a6610e4f565b90506020020160208101906104bb9190610e94565b6104c99061ffff1685610ecb565b6104d39190610ee2565b9050806000808a8a868181106104eb576104eb610e4f565b90506020020160208101906105009190610d59565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546105529190610eb8565b90915550889050878381811061056a5761056a610e4f565b905060200201602081019061057f9190610d59565b6001600160a01b0316600080516020610fae8339815191528a836040516105a7929190610f04565b60405180910390a2505b806105bb81610e7b565b915050610454565b5050610755565b856105e06001600160a01b03821633308b610894565b60005b858110156107525760008585838181106105ff576105ff610e4f565b90506020020160208101906106149190610e94565b61ffff16111561074057600061271086868481811061063557610635610e4f565b905060200201602081019061064a9190610e94565b6106589061ffff168c610ecb565b6106629190610ee2565b9050806000808a8a8681811061067a5761067a610e4f565b905060200201602081019061068f9190610d59565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546106e19190610eb8565b9091555088905087838181106106f9576106f9610e4f565b905060200201602081019061070e9190610d59565b6001600160a01b0316600080516020610fae8339815191528a83604051610736929190610f04565b60405180910390a2505b8061074a81610e7b565b9150506105e3565b50505b50505050505050565b6001600160a01b038381166000908152602081815260408083209385168352929052908120805490829055908190036107aa576040516321cd723f60e21b815260040160405180910390fd5b6001600160a01b038216610834576000836001600160a01b03168260405160006040518083038185875af1925050503d8060008114610805576040519150601f19603f3d011682016040523d82523d6000602084013e61080a565b606091505b5050809150508061082e576040516312171d8360e31b815260040160405180910390fd5b5061084b565b816108496001600160a01b03821685846108ff565b505b836001600160a01b03167f2717ead6b9200dd235aad468c9809ea400fe33ac69b5bfaa6d3e90fc922b63988383604051610886929190610f04565b60405180910390a250505050565b6040516001600160a01b03808516602483015283166044820152606481018290526102bc9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261091e565b6103088363a9059cbb60e01b84846040516024016108c8929190610f04565b6000610973826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166109f89092919063ffffffff16565b90508051600014806109945750808060200190518101906109949190610f1d565b6103085760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084015b60405180910390fd5b6060610a078484600085610a0f565b949350505050565b606082471015610a705760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016109ef565b600080866001600160a01b03168587604051610a8c9190610f5e565b60006040518083038185875af1925050503d8060008114610ac9576040519150601f19603f3d011682016040523d82523d6000602084013e610ace565b606091505b5091509150610adf87838387610aea565b979650505050505050565b60608315610b59578251600003610b52576001600160a01b0385163b610b525760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109ef565b5081610a07565b610a078383815115610b6e5781518083602001fd5b8060405162461bcd60e51b81526004016109ef9190610f7a565b80356001600160a01b0381168114610b9f57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610bcb57600080fd5b813560206001600160401b0380831115610be757610be7610ba4565b8260051b604051601f19603f83011681018181108482111715610c0c57610c0c610ba4565b604052938452858101830193838101925087851115610c2a57600080fd5b83870191505b84821015610adf57610c4182610b88565b83529183019190830190610c30565b600080600060608486031215610c6557600080fd5b610c6e84610b88565b9250610c7c60208501610b88565b915060408401356001600160401b03811115610c9757600080fd5b610ca386828701610bba565b9150509250925092565b600060208284031215610cbf57600080fd5b81356001600160401b03811115610cd557600080fd5b610a0784828501610bba565b80151581146102cf57600080fd5b60008060408385031215610d0257600080fd5b610d0b83610b88565b91506020830135610d1b81610ce1565b809150509250929050565b60008060408385031215610d3957600080fd5b610d4283610b88565b9150610d5060208401610b88565b90509250929050565b600060208284031215610d6b57600080fd5b610d7482610b88565b9392505050565b60008083601f840112610d8d57600080fd5b5081356001600160401b03811115610da457600080fd5b6020830191508360208260051b8501011115610dbf57600080fd5b9250929050565b60008060008060008060808789031215610ddf57600080fd5b86359550610def60208801610b88565b945060408701356001600160401b0380821115610e0b57600080fd5b610e178a838b01610d7b565b90965094506060890135915080821115610e3057600080fd5b50610e3d89828a01610d7b565b979a9699509497509295939492505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201610e8d57610e8d610e65565b5060010190565b600060208284031215610ea657600080fd5b813561ffff81168114610d7457600080fd5b8082018082111561033757610337610e65565b808202811582820484141761033757610337610e65565b600082610eff57634e487b7160e01b600052601260045260246000fd5b500490565b6001600160a01b03929092168252602082015260400190565b600060208284031215610f2f57600080fd5b8151610d7481610ce1565b60005b83811015610f55578181015183820152602001610f3d565b50506000910152565b60008251610f70818460208701610f3a565b9190910192915050565b6020815260008251806020840152610f99816040850160208701610f3a565b601f01601f1916919091016040019291505056fe55f368ec5df1aca853572d5a6cbda215a84cf17a93c765932dcfb1c237df2ecaa2646970667358221220a875993d6dbed1bcfa5d700f437457f998e501782c78ee5ae89a98c7fd7775e064736f6c63430008140033
Deployed Bytecode
0x6080604052600436106100755760003560e01c80629315b91461007a5780633ccfd60b1461009c5780635ecb16cd146100b15780639a375b07146100d1578063a389783e14610124578063b7f64bd514610159578063e3d670d7146101ab578063e81f02b6146101ea578063ff05280e1461020a575b600080fd5b34801561008657600080fd5b5061009a610095366004610c50565b61021d565b005b3480156100a857600080fd5b5061009a6102c2565b3480156100bd57600080fd5b5061009a6100cc366004610cad565b6102d2565b3480156100dd57600080fd5b5061009a6100ec366004610cef565b3360009081526001602090815260408083206001600160a01b0395909516835293905291909120805460ff1916911515919091179055565b34801561013057600080fd5b5061014461013f366004610d26565b61030d565b60405190151581526020015b60405180910390f35b34801561016557600080fd5b5061019d610174366004610d26565b6001600160a01b0391821660009081526020818152604080832093909416825291909152205490565b604051908152602001610150565b3480156101b757600080fd5b5061019d6101c6366004610d59565b6001600160a01b031660009081526020818152604080832083805290915290205490565b3480156101f657600080fd5b5061009a610205366004610d26565b61033d565b61009a610218366004610dc6565b6103aa565b6001600160a01b038316331480159061025c57506001600160a01b0380841660009081526001602090815260408083209386168352929052205460ff16155b1561027a576040516393256b7d60e01b815260040160405180910390fd5b60005b81518110156102bc576102aa848484848151811061029d5761029d610e4f565b602002602001015161075e565b806102b481610e7b565b91505061027d565b50505050565b336102cf8180600061075e565b50565b3360005b8251811015610308576102f6828385848151811061029d5761029d610e4f565b8061030081610e7b565b9150506102d6565b505050565b6001600160a01b0380831660009081526001602090815260408083209385168352929052205460ff165b92915050565b6001600160a01b038216331480159061037c57506001600160a01b0380831660009081526001602090815260408083209385168352929052205460ff16155b1561039a576040516393256b7d60e01b815260040160405180910390fd5b6103a68282600061075e565b5050565b8281146103ca5760405163251f56a160e21b815260040160405180910390fd5b6000805b8281101561041f578383828181106103e8576103e8610e4f565b90506020020160208101906103fd9190610e94565b61040b9061ffff1683610eb8565b91508061041781610e7b565b9150506103ce565b50806127101461044257604051632429608560e11b815260040160405180910390fd5b6001600160a01b0386166105ca573460005b858110156105c357600085858381811061047057610470610e4f565b90506020020160208101906104859190610e94565b61ffff1611156105b15760006127108686848181106104a6576104a6610e4f565b90506020020160208101906104bb9190610e94565b6104c99061ffff1685610ecb565b6104d39190610ee2565b9050806000808a8a868181106104eb576104eb610e4f565b90506020020160208101906105009190610d59565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546105529190610eb8565b90915550889050878381811061056a5761056a610e4f565b905060200201602081019061057f9190610d59565b6001600160a01b0316600080516020610fae8339815191528a836040516105a7929190610f04565b60405180910390a2505b806105bb81610e7b565b915050610454565b5050610755565b856105e06001600160a01b03821633308b610894565b60005b858110156107525760008585838181106105ff576105ff610e4f565b90506020020160208101906106149190610e94565b61ffff16111561074057600061271086868481811061063557610635610e4f565b905060200201602081019061064a9190610e94565b6106589061ffff168c610ecb565b6106629190610ee2565b9050806000808a8a8681811061067a5761067a610e4f565b905060200201602081019061068f9190610d59565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546106e19190610eb8565b9091555088905087838181106106f9576106f9610e4f565b905060200201602081019061070e9190610d59565b6001600160a01b0316600080516020610fae8339815191528a83604051610736929190610f04565b60405180910390a2505b8061074a81610e7b565b9150506105e3565b50505b50505050505050565b6001600160a01b038381166000908152602081815260408083209385168352929052908120805490829055908190036107aa576040516321cd723f60e21b815260040160405180910390fd5b6001600160a01b038216610834576000836001600160a01b03168260405160006040518083038185875af1925050503d8060008114610805576040519150601f19603f3d011682016040523d82523d6000602084013e61080a565b606091505b5050809150508061082e576040516312171d8360e31b815260040160405180910390fd5b5061084b565b816108496001600160a01b03821685846108ff565b505b836001600160a01b03167f2717ead6b9200dd235aad468c9809ea400fe33ac69b5bfaa6d3e90fc922b63988383604051610886929190610f04565b60405180910390a250505050565b6040516001600160a01b03808516602483015283166044820152606481018290526102bc9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261091e565b6103088363a9059cbb60e01b84846040516024016108c8929190610f04565b6000610973826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166109f89092919063ffffffff16565b90508051600014806109945750808060200190518101906109949190610f1d565b6103085760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084015b60405180910390fd5b6060610a078484600085610a0f565b949350505050565b606082471015610a705760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016109ef565b600080866001600160a01b03168587604051610a8c9190610f5e565b60006040518083038185875af1925050503d8060008114610ac9576040519150601f19603f3d011682016040523d82523d6000602084013e610ace565b606091505b5091509150610adf87838387610aea565b979650505050505050565b60608315610b59578251600003610b52576001600160a01b0385163b610b525760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109ef565b5081610a07565b610a078383815115610b6e5781518083602001fd5b8060405162461bcd60e51b81526004016109ef9190610f7a565b80356001600160a01b0381168114610b9f57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610bcb57600080fd5b813560206001600160401b0380831115610be757610be7610ba4565b8260051b604051601f19603f83011681018181108482111715610c0c57610c0c610ba4565b604052938452858101830193838101925087851115610c2a57600080fd5b83870191505b84821015610adf57610c4182610b88565b83529183019190830190610c30565b600080600060608486031215610c6557600080fd5b610c6e84610b88565b9250610c7c60208501610b88565b915060408401356001600160401b03811115610c9757600080fd5b610ca386828701610bba565b9150509250925092565b600060208284031215610cbf57600080fd5b81356001600160401b03811115610cd557600080fd5b610a0784828501610bba565b80151581146102cf57600080fd5b60008060408385031215610d0257600080fd5b610d0b83610b88565b91506020830135610d1b81610ce1565b809150509250929050565b60008060408385031215610d3957600080fd5b610d4283610b88565b9150610d5060208401610b88565b90509250929050565b600060208284031215610d6b57600080fd5b610d7482610b88565b9392505050565b60008083601f840112610d8d57600080fd5b5081356001600160401b03811115610da457600080fd5b6020830191508360208260051b8501011115610dbf57600080fd5b9250929050565b60008060008060008060808789031215610ddf57600080fd5b86359550610def60208801610b88565b945060408701356001600160401b0380821115610e0b57600080fd5b610e178a838b01610d7b565b90965094506060890135915080821115610e3057600080fd5b50610e3d89828a01610d7b565b979a9699509497509295939492505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201610e8d57610e8d610e65565b5060010190565b600060208284031215610ea657600080fd5b813561ffff81168114610d7457600080fd5b8082018082111561033757610337610e65565b808202811582820484141761033757610337610e65565b600082610eff57634e487b7160e01b600052601260045260246000fd5b500490565b6001600160a01b03929092168252602082015260400190565b600060208284031215610f2f57600080fd5b8151610d7481610ce1565b60005b83811015610f55578181015183820152602001610f3d565b50506000910152565b60008251610f70818460208701610f3a565b9190910192915050565b6020815260008251806020840152610f99816040850160208701610f3a565b601f01601f1916919091016040019291505056fe55f368ec5df1aca853572d5a6cbda215a84cf17a93c765932dcfb1c237df2ecaa2646970667358221220a875993d6dbed1bcfa5d700f437457f998e501782c78ee5ae89a98c7fd7775e064736f6c63430008140033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$91,491.74
Net Worth in MON
Token Allocations
ETH
90.88%
MON
8.38%
APE
0.50%
Others
0.24%
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| ETH | 56.72% | $2,953.68 | 17.5702 | $51,896.78 | |
| ETH | 0.16% | $0.000284 | 522,038.3902 | $148.38 | |
| ETH | 0.02% | $0.999702 | 17.02 | $17.01 | |
| ETH | <0.01% | <$0.000001 | 9,772,846.35 | $2.44 | |
| BASE | 34.07% | $2,954.12 | 10.5509 | $31,168.51 | |
| BASE | <0.01% | $0.001337 | 3,482.004 | $4.66 | |
| MONAD | 8.38% | $0.018921 | 404,988.5205 | $7,662.59 | |
| APE | 0.50% | $0.186277 | 2,474.8879 | $461.02 | |
| ARB | 0.06% | $2,953.85 | 0.0174 | $51.38 | |
| POL | 0.04% | $0.125187 | 261.2013 | $32.7 | |
| BLAST | 0.03% | $2,954.12 | 0.0105 | $31.04 | |
| HYPEREVM | 0.02% | $23.53 | 0.611 | $14.37 | |
| MANTLE | <0.01% | $0.906933 | 0.6175 | $0.560031 | |
| BSC | <0.01% | <$0.000001 | 804,828 | $0.2927 |
Loading...
Loading
Loading...
Loading
[ 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.