Source Code
Overview
ETH Balance
0 ETH
ETH Value
$0.00| Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 9150536 | 87 days ago | Contract Creation | 0 ETH |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
PaymentSplitter
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
Yes with 200 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: SEL-1.0
// Copyright © 2025 Veda Tech Labs
// Derived from Boring Vault Software © 2025 Veda Tech Labs (TEST ONLY – NO COMMERCIAL USE)
// Licensed under Software Evaluation License, Version 1.0
pragma solidity 0.8.21;
import {FixedPointMathLib} from "@solmate/utils/FixedPointMathLib.sol";
import {ERC20} from "@solmate/tokens/ERC20.sol";
import {SafeTransferLib} from "@solmate/utils/SafeTransferLib.sol";
import {Auth, Authority} from "@solmate/auth/Auth.sol";
contract PaymentSplitter is Auth {
using FixedPointMathLib for uint256;
using SafeTransferLib for ERC20;
//============================== STRUCTS ===============================
/**
* @dev Represents a split of fee payments.
* @param percent The percentage of the total fee to send to this address.
* @param to The address to send the split to.
*/
struct SplitInformation {
uint96 percent;
address to;
}
//============================== STATE ===============================
/**
* @notice Contains split information for each address.
*/
SplitInformation[] public splits;
//============================== IMMUTABLES ===============================
/**
* @notice The cumualative percents of all splits.
*/
uint256 internal immutable totalPercent;
constructor(address _owner, uint256 _totalPercent, SplitInformation[] memory _splits)
Auth(_owner, Authority(address(0)))
{
totalPercent = _totalPercent;
uint256 totalSplitPercent;
for (uint256 i = 0; i < _splits.length; i++) {
totalSplitPercent += _splits[i].percent;
splits.push(_splits[i]);
}
require(totalSplitPercent == totalPercent, "PaymentSplitter: total percent is not 100%");
}
// ========================================= ADMIN =========================================
/**
* @notice Adjusts the splits of fee payments.
*/
function adjustSplits(SplitInformation[] calldata _splits) external requiresAuth {
// Empty out old splits.
uint256 splitsLength = splits.length;
for (uint256 i; i < splitsLength; i++) {
splits.pop();
}
uint256 totalSplitPercent;
for (uint256 i = 0; i < _splits.length; i++) {
totalSplitPercent += _splits[i].percent;
splits.push(_splits[i]);
}
require(totalSplitPercent == totalPercent, "PaymentSplitter: total percent is not 100%");
}
/**
* @notice Rescues any ERC20 asset sent to this contract.
*/
function rescueERC20(ERC20 asset) external requiresAuth {
asset.safeTransfer(msg.sender, asset.balanceOf(address(this)));
}
// ========================================= PAYOUT =========================================
/**
* @notice Pays out the splits to the respective addresses.
*/
function payoutSplits(ERC20 asset) external requiresAuth {
// Subtract 1 from balance so we revert if balance is 0, and to also leave dust in this contract,
// to reduce gas costs for future transactions.
uint256 balance = asset.balanceOf(address(this)) - 1;
for (uint256 i = 0; i < splits.length; ++i) {
uint256 amount = balance.mulDivDown(splits[i].percent, totalPercent);
asset.safeTransfer(splits[i].to, amount);
}
}
}// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;
/// @notice Arithmetic library with operations for fixed-point numbers.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/FixedPointMathLib.sol)
/// @author Inspired by USM (https://github.com/usmfum/USM/blob/master/contracts/WadMath.sol)
library FixedPointMathLib {
/*//////////////////////////////////////////////////////////////
SIMPLIFIED FIXED POINT OPERATIONS
//////////////////////////////////////////////////////////////*/
uint256 internal constant MAX_UINT256 = 2**256 - 1;
uint256 internal constant WAD = 1e18; // The scalar of ETH and most ERC20s.
function mulWadDown(uint256 x, uint256 y) internal pure returns (uint256) {
return mulDivDown(x, y, WAD); // Equivalent to (x * y) / WAD rounded down.
}
function mulWadUp(uint256 x, uint256 y) internal pure returns (uint256) {
return mulDivUp(x, y, WAD); // Equivalent to (x * y) / WAD rounded up.
}
function divWadDown(uint256 x, uint256 y) internal pure returns (uint256) {
return mulDivDown(x, WAD, y); // Equivalent to (x * WAD) / y rounded down.
}
function divWadUp(uint256 x, uint256 y) internal pure returns (uint256) {
return mulDivUp(x, WAD, y); // Equivalent to (x * WAD) / y rounded up.
}
/*//////////////////////////////////////////////////////////////
LOW LEVEL FIXED POINT OPERATIONS
//////////////////////////////////////////////////////////////*/
function mulDivDown(
uint256 x,
uint256 y,
uint256 denominator
) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
// Equivalent to require(denominator != 0 && (y == 0 || x <= type(uint256).max / y))
if iszero(mul(denominator, iszero(mul(y, gt(x, div(MAX_UINT256, y)))))) {
revert(0, 0)
}
// Divide x * y by the denominator.
z := div(mul(x, y), denominator)
}
}
function mulDivUp(
uint256 x,
uint256 y,
uint256 denominator
) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
// Equivalent to require(denominator != 0 && (y == 0 || x <= type(uint256).max / y))
if iszero(mul(denominator, iszero(mul(y, gt(x, div(MAX_UINT256, y)))))) {
revert(0, 0)
}
// If x * y modulo the denominator is strictly greater than 0,
// 1 is added to round up the division of x * y by the denominator.
z := add(gt(mod(mul(x, y), denominator), 0), div(mul(x, y), denominator))
}
}
function rpow(
uint256 x,
uint256 n,
uint256 scalar
) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
switch x
case 0 {
switch n
case 0 {
// 0 ** 0 = 1
z := scalar
}
default {
// 0 ** n = 0
z := 0
}
}
default {
switch mod(n, 2)
case 0 {
// If n is even, store scalar in z for now.
z := scalar
}
default {
// If n is odd, store x in z for now.
z := x
}
// Shifting right by 1 is like dividing by 2.
let half := shr(1, scalar)
for {
// Shift n right by 1 before looping to halve it.
n := shr(1, n)
} n {
// Shift n right by 1 each iteration to halve it.
n := shr(1, n)
} {
// Revert immediately if x ** 2 would overflow.
// Equivalent to iszero(eq(div(xx, x), x)) here.
if shr(128, x) {
revert(0, 0)
}
// Store x squared.
let xx := mul(x, x)
// Round to the nearest number.
let xxRound := add(xx, half)
// Revert if xx + half overflowed.
if lt(xxRound, xx) {
revert(0, 0)
}
// Set x to scaled xxRound.
x := div(xxRound, scalar)
// If n is even:
if mod(n, 2) {
// Compute z * x.
let zx := mul(z, x)
// If z * x overflowed:
if iszero(eq(div(zx, x), z)) {
// Revert if x is non-zero.
if iszero(iszero(x)) {
revert(0, 0)
}
}
// Round to the nearest number.
let zxRound := add(zx, half)
// Revert if zx + half overflowed.
if lt(zxRound, zx) {
revert(0, 0)
}
// Return properly scaled zxRound.
z := div(zxRound, scalar)
}
}
}
}
}
/*//////////////////////////////////////////////////////////////
GENERAL NUMBER UTILITIES
//////////////////////////////////////////////////////////////*/
function sqrt(uint256 x) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
let y := x // We start y at x, which will help us make our initial estimate.
z := 181 // The "correct" value is 1, but this saves a multiplication later.
// This segment is to get a reasonable initial estimate for the Babylonian method. With a bad
// start, the correct # of bits increases ~linearly each iteration instead of ~quadratically.
// We check y >= 2^(k + 8) but shift right by k bits
// each branch to ensure that if x >= 256, then y >= 256.
if iszero(lt(y, 0x10000000000000000000000000000000000)) {
y := shr(128, y)
z := shl(64, z)
}
if iszero(lt(y, 0x1000000000000000000)) {
y := shr(64, y)
z := shl(32, z)
}
if iszero(lt(y, 0x10000000000)) {
y := shr(32, y)
z := shl(16, z)
}
if iszero(lt(y, 0x1000000)) {
y := shr(16, y)
z := shl(8, z)
}
// Goal was to get z*z*y within a small factor of x. More iterations could
// get y in a tighter range. Currently, we will have y in [256, 256*2^16).
// We ensured y >= 256 so that the relative difference between y and y+1 is small.
// That's not possible if x < 256 but we can just verify those cases exhaustively.
// Now, z*z*y <= x < z*z*(y+1), and y <= 2^(16+8), and either y >= 256, or x < 256.
// Correctness can be checked exhaustively for x < 256, so we assume y >= 256.
// Then z*sqrt(y) is within sqrt(257)/sqrt(256) of sqrt(x), or about 20bps.
// For s in the range [1/256, 256], the estimate f(s) = (181/1024) * (s+1) is in the range
// (1/2.84 * sqrt(s), 2.84 * sqrt(s)), with largest error when s = 1 and when s = 256 or 1/256.
// Since y is in [256, 256*2^16), let a = y/65536, so that a is in [1/256, 256). Then we can estimate
// sqrt(y) using sqrt(65536) * 181/1024 * (a + 1) = 181/4 * (y + 65536)/65536 = 181 * (y + 65536)/2^18.
// There is no overflow risk here since y < 2^136 after the first branch above.
z := shr(18, mul(z, add(y, 65536))) // A mul() is saved from starting z at 181.
// Given the worst case multiplicative error of 2.84 above, 7 iterations should be enough.
z := shr(1, add(z, div(x, z)))
z := shr(1, add(z, div(x, z)))
z := shr(1, add(z, div(x, z)))
z := shr(1, add(z, div(x, z)))
z := shr(1, add(z, div(x, z)))
z := shr(1, add(z, div(x, z)))
z := shr(1, add(z, div(x, z)))
// If x+1 is a perfect square, the Babylonian method cycles between
// floor(sqrt(x)) and ceil(sqrt(x)). This statement ensures we return floor.
// See: https://en.wikipedia.org/wiki/Integer_square_root#Using_only_integer_division
// Since the ceil is rare, we save gas on the assignment and repeat division in the rare case.
// If you don't care whether the floor or ceil square root is returned, you can remove this statement.
z := sub(z, lt(div(x, z), z))
}
}
function unsafeMod(uint256 x, uint256 y) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
// Mod x by y. Note this will return
// 0 instead of reverting if y is zero.
z := mod(x, y)
}
}
function unsafeDiv(uint256 x, uint256 y) internal pure returns (uint256 r) {
/// @solidity memory-safe-assembly
assembly {
// Divide x by y. Note this will return
// 0 instead of reverting if y is zero.
r := div(x, y)
}
}
function unsafeDivUp(uint256 x, uint256 y) internal pure returns (uint256 z) {
/// @solidity memory-safe-assembly
assembly {
// Add 1 to x * y if x % y > 0. Note this will
// return 0 instead of reverting if y is zero.
z := add(gt(mod(x, y), 0), div(x, y))
}
}
}// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;
/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol)
/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)
/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.
abstract contract ERC20 {
/*//////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
event Transfer(address indexed from, address indexed to, uint256 amount);
event Approval(address indexed owner, address indexed spender, uint256 amount);
/*//////////////////////////////////////////////////////////////
METADATA STORAGE
//////////////////////////////////////////////////////////////*/
string public name;
string public symbol;
uint8 public immutable decimals;
/*//////////////////////////////////////////////////////////////
ERC20 STORAGE
//////////////////////////////////////////////////////////////*/
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
/*//////////////////////////////////////////////////////////////
EIP-2612 STORAGE
//////////////////////////////////////////////////////////////*/
uint256 internal immutable INITIAL_CHAIN_ID;
bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;
mapping(address => uint256) public nonces;
/*//////////////////////////////////////////////////////////////
CONSTRUCTOR
//////////////////////////////////////////////////////////////*/
constructor(
string memory _name,
string memory _symbol,
uint8 _decimals
) {
name = _name;
symbol = _symbol;
decimals = _decimals;
INITIAL_CHAIN_ID = block.chainid;
INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();
}
/*//////////////////////////////////////////////////////////////
ERC20 LOGIC
//////////////////////////////////////////////////////////////*/
function approve(address spender, uint256 amount) public virtual returns (bool) {
allowance[msg.sender][spender] = amount;
emit Approval(msg.sender, spender, amount);
return true;
}
function transfer(address to, uint256 amount) public virtual returns (bool) {
balanceOf[msg.sender] -= amount;
// Cannot overflow because the sum of all user
// balances can't exceed the max uint256 value.
unchecked {
balanceOf[to] += amount;
}
emit Transfer(msg.sender, to, amount);
return true;
}
function transferFrom(
address from,
address to,
uint256 amount
) public virtual returns (bool) {
uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.
if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;
balanceOf[from] -= amount;
// Cannot overflow because the sum of all user
// balances can't exceed the max uint256 value.
unchecked {
balanceOf[to] += amount;
}
emit Transfer(from, to, amount);
return true;
}
/*//////////////////////////////////////////////////////////////
EIP-2612 LOGIC
//////////////////////////////////////////////////////////////*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) public virtual {
require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED");
// Unchecked because the only math done is incrementing
// the owner's nonce which cannot realistically overflow.
unchecked {
address recoveredAddress = ecrecover(
keccak256(
abi.encodePacked(
"\x19\x01",
DOMAIN_SEPARATOR(),
keccak256(
abi.encode(
keccak256(
"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"
),
owner,
spender,
value,
nonces[owner]++,
deadline
)
)
)
),
v,
r,
s
);
require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER");
allowance[recoveredAddress][spender] = value;
}
emit Approval(owner, spender, value);
}
function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {
return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();
}
function computeDomainSeparator() internal view virtual returns (bytes32) {
return
keccak256(
abi.encode(
keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
keccak256(bytes(name)),
keccak256("1"),
block.chainid,
address(this)
)
);
}
/*//////////////////////////////////////////////////////////////
INTERNAL MINT/BURN LOGIC
//////////////////////////////////////////////////////////////*/
function _mint(address to, uint256 amount) internal virtual {
totalSupply += amount;
// Cannot overflow because the sum of all user
// balances can't exceed the max uint256 value.
unchecked {
balanceOf[to] += amount;
}
emit Transfer(address(0), to, amount);
}
function _burn(address from, uint256 amount) internal virtual {
balanceOf[from] -= amount;
// Cannot underflow because a user's balance
// will never be larger than the total supply.
unchecked {
totalSupply -= amount;
}
emit Transfer(from, address(0), amount);
}
}// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;
import {ERC20} from "../tokens/ERC20.sol";
/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol)
/// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer.
/// @dev Note that none of the functions in this library check that a token has code at all! That responsibility is delegated to the caller.
library SafeTransferLib {
/*//////////////////////////////////////////////////////////////
ETH OPERATIONS
//////////////////////////////////////////////////////////////*/
function safeTransferETH(address to, uint256 amount) internal {
bool success;
/// @solidity memory-safe-assembly
assembly {
// Transfer the ETH and store if it succeeded or not.
success := call(gas(), to, amount, 0, 0, 0, 0)
}
require(success, "ETH_TRANSFER_FAILED");
}
/*//////////////////////////////////////////////////////////////
ERC20 OPERATIONS
//////////////////////////////////////////////////////////////*/
function safeTransferFrom(
ERC20 token,
address from,
address to,
uint256 amount
) internal {
bool success;
/// @solidity memory-safe-assembly
assembly {
// Get a pointer to some free memory.
let freeMemoryPointer := mload(0x40)
// Write the abi-encoded calldata into memory, beginning with the function selector.
mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000)
mstore(add(freeMemoryPointer, 4), and(from, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "from" argument.
mstore(add(freeMemoryPointer, 36), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument.
mstore(add(freeMemoryPointer, 68), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type.
success := and(
// Set success to whether the call reverted, if not we check it either
// returned exactly 1 (can't just be non-zero data), or had no return data.
or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
// We use 100 because the length of our calldata totals up like so: 4 + 32 * 3.
// We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
// Counterintuitively, this call must be positioned second to the or() call in the
// surrounding and() call or else returndatasize() will be zero during the computation.
call(gas(), token, 0, freeMemoryPointer, 100, 0, 32)
)
}
require(success, "TRANSFER_FROM_FAILED");
}
function safeTransfer(
ERC20 token,
address to,
uint256 amount
) internal {
bool success;
/// @solidity memory-safe-assembly
assembly {
// Get a pointer to some free memory.
let freeMemoryPointer := mload(0x40)
// Write the abi-encoded calldata into memory, beginning with the function selector.
mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)
mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument.
mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type.
success := and(
// Set success to whether the call reverted, if not we check it either
// returned exactly 1 (can't just be non-zero data), or had no return data.
or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
// We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.
// We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
// Counterintuitively, this call must be positioned second to the or() call in the
// surrounding and() call or else returndatasize() will be zero during the computation.
call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)
)
}
require(success, "TRANSFER_FAILED");
}
function safeApprove(
ERC20 token,
address to,
uint256 amount
) internal {
bool success;
/// @solidity memory-safe-assembly
assembly {
// Get a pointer to some free memory.
let freeMemoryPointer := mload(0x40)
// Write the abi-encoded calldata into memory, beginning with the function selector.
mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000)
mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument.
mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type.
success := and(
// Set success to whether the call reverted, if not we check it either
// returned exactly 1 (can't just be non-zero data), or had no return data.
or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
// We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.
// We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
// Counterintuitively, this call must be positioned second to the or() call in the
// surrounding and() call or else returndatasize() will be zero during the computation.
call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)
)
}
require(success, "APPROVE_FAILED");
}
}// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;
/// @notice Provides a flexible and updatable auth pattern which is completely separate from application logic.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/auth/Auth.sol)
/// @author Modified from Dappsys (https://github.com/dapphub/ds-auth/blob/master/src/auth.sol)
abstract contract Auth {
event OwnershipTransferred(address indexed user, address indexed newOwner);
event AuthorityUpdated(address indexed user, Authority indexed newAuthority);
address public owner;
Authority public authority;
constructor(address _owner, Authority _authority) {
owner = _owner;
authority = _authority;
emit OwnershipTransferred(msg.sender, _owner);
emit AuthorityUpdated(msg.sender, _authority);
}
modifier requiresAuth() virtual {
require(isAuthorized(msg.sender, msg.sig), "UNAUTHORIZED");
_;
}
function isAuthorized(address user, bytes4 functionSig) internal view virtual returns (bool) {
Authority auth = authority; // Memoizing authority saves us a warm SLOAD, around 100 gas.
// Checking if the caller is the owner only after calling the authority saves gas in most cases, but be
// aware that this makes protected functions uncallable even to the owner if the authority is out of order.
return (address(auth) != address(0) && auth.canCall(user, address(this), functionSig)) || user == owner;
}
function setAuthority(Authority newAuthority) public virtual {
// We check if the caller is the owner first because we want to ensure they can
// always swap out the authority even if it's reverting or using up a lot of gas.
require(msg.sender == owner || authority.canCall(msg.sender, address(this), msg.sig));
authority = newAuthority;
emit AuthorityUpdated(msg.sender, newAuthority);
}
function transferOwnership(address newOwner) public virtual requiresAuth {
owner = newOwner;
emit OwnershipTransferred(msg.sender, newOwner);
}
}
/// @notice A generic interface for a contract which provides authorization data to an Auth instance.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/auth/Auth.sol)
/// @author Modified from Dappsys (https://github.com/dapphub/ds-auth/blob/master/src/auth.sol)
interface Authority {
function canCall(
address user,
address target,
bytes4 functionSig
) external view returns (bool);
}{
"remappings": [
"@solmate/=lib/solmate/src/",
"@forge-std/=lib/forge-std/src/",
"@ds-test/=lib/forge-std/lib/ds-test/src/",
"ds-test/=lib/forge-std/lib/ds-test/src/",
"@openzeppelin/=lib/openzeppelin-contracts/",
"@ccip/=lib/ccip/",
"@oapp-auth/=lib/OAppAuth/src/",
"@devtools-oapp-evm/=lib/OAppAuth/lib/devtools/packages/oapp-evm/contracts/oapp/",
"@layerzerolabs/lz-evm-messagelib-v2/=lib/OAppAuth/node_modules/@layerzerolabs/lz-evm-messagelib-v2/",
"@layerzerolabs/lz-evm-protocol-v2/=lib/OAppAuth/lib/LayerZero-V2/packages/layerzero-v2/evm/protocol/",
"@layerzerolabs/oapp-evm/=lib/OAppAuth/lib/devtools/packages/oapp-evm/",
"@lz-oapp-evm/=lib/OAppAuth/lib/LayerZero-V2/packages/layerzero-v2/evm/oapp/contracts/oapp/",
"@sbu/=lib/OAppAuth/lib/solidity-bytes-utils/",
"LayerZero-V2/=lib/OAppAuth/lib/",
"OAppAuth/=lib/OAppAuth/",
"ccip/=lib/ccip/contracts/",
"erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
"forge-std/=lib/forge-std/src/",
"halmos-cheatcodes/=lib/OAppAuth/lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/",
"solidity-bytes-utils/=lib/OAppAuth/node_modules/solidity-bytes-utils/",
"solmate/=lib/solmate/src/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "shanghai",
"viaIR": false
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_totalPercent","type":"uint256"},{"components":[{"internalType":"uint96","name":"percent","type":"uint96"},{"internalType":"address","name":"to","type":"address"}],"internalType":"struct PaymentSplitter.SplitInformation[]","name":"_splits","type":"tuple[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"contract Authority","name":"newAuthority","type":"address"}],"name":"AuthorityUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"components":[{"internalType":"uint96","name":"percent","type":"uint96"},{"internalType":"address","name":"to","type":"address"}],"internalType":"struct PaymentSplitter.SplitInformation[]","name":"_splits","type":"tuple[]"}],"name":"adjustSplits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"authority","outputs":[{"internalType":"contract Authority","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ERC20","name":"asset","type":"address"}],"name":"payoutSplits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ERC20","name":"asset","type":"address"}],"name":"rescueERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract Authority","name":"newAuthority","type":"address"}],"name":"setAuthority","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"splits","outputs":[{"internalType":"uint96","name":"percent","type":"uint96"},{"internalType":"address","name":"to","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60a060405234801562000010575f80fd5b5060405162000e6138038062000e61833981016040819052620000339162000281565b5f80546001600160a01b0385166001600160a01b031991821681178355600180549092169091556040518592919033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908490a36040516001600160a01b0382169033907fa3396fd7f6e0a21b50e5089d2da70d5ac0a3bbbd1f617a93f134b76389980198905f90a3505060808290525f805b82518110156200017f57828181518110620000e657620000e66200038f565b60200260200101515f01516001600160601b031682620001079190620003b7565b915060028382815181106200012057620001206200038f565b60209081029190910181015182546001810184555f93845292829020815191909201516001600160a01b03166c01000000000000000000000000026001600160601b0390911617910155806200017681620003d3565b915050620000c7565b506080518114620001e95760405162461bcd60e51b815260206004820152602a60248201527f5061796d656e7453706c69747465723a20746f74616c2070657263656e74206960448201526973206e6f74203130302560b01b606482015260840160405180910390fd5b50505050620003ee565b80516001600160a01b03811681146200020a575f80fd5b919050565b634e487b7160e01b5f52604160045260245ffd5b604080519081016001600160401b03811182821017156200024857620002486200020f565b60405290565b604051601f8201601f191681016001600160401b03811182821017156200027957620002796200020f565b604052919050565b5f805f6060848603121562000294575f80fd5b6200029f84620001f3565b9250602080850151925060408086015160018060401b0380821115620002c3575f80fd5b818801915088601f830112620002d7575f80fd5b815181811115620002ec57620002ec6200020f565b620002fc858260051b016200024e565b818152858101925060069190911b83018501908a8211156200031c575f80fd5b928501925b818410156200037f5784848c0312156200033a575f8081fd5b6200034462000223565b84516001600160601b03811681146200035c575f8081fd5b81526200036b858801620001f3565b818801528352928401929185019162000321565b8096505050505050509250925092565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115620003cd57620003cd620003a3565b92915050565b5f60018201620003e757620003e7620003a3565b5060010190565b608051610a536200040e5f395f818161028601526103ef0152610a535ff3fe608060405234801561000f575f80fd5b5060043610610085575f3560e01c80638da5cb5b116100585780638da5cb5b14610103578063bf7e214f1461012d578063ccec371614610140578063f2fde38b14610153575f80fd5b80630a62787e146100895780633d3d9fbf1461009e5780637a9e5e4b146100b1578063884c3006146100c4575b5f80fd5b61009c6100973660046107ef565b610166565b005b61009c6100ac366004610872565b61030c565b61009c6100bf366004610872565b610466565b6100d76100d2366004610894565b61054a565b604080516001600160601b0390931683526001600160a01b039091166020830152015b60405180910390f35b5f54610115906001600160a01b031681565b6040516001600160a01b0390911681526020016100fa565b600154610115906001600160a01b031681565b61009c61014e366004610872565b610583565b61009c610161366004610872565b610634565b61017b335f356001600160e01b0319166106af565b6101a05760405162461bcd60e51b8152600401610197906108ab565b60405180910390fd5b6002545f5b818110156101e65760028054806101be576101be6108d1565b5f8281526020812082015f1990810191909155019055806101de816108f9565b9150506101a5565b505f805b838110156102835784848281811061020457610204610911565b61021a9260206040909202019081019150610939565b61022d906001600160601b031683610954565b9150600285858381811061024357610243610911565b83546001810185555f94855260209094206040909102929092019291909101905061026e8282610967565b5050808061027b906108f9565b9150506101ea565b507f000000000000000000000000000000000000000000000000000000000000000081146103065760405162461bcd60e51b815260206004820152602a60248201527f5061796d656e7453706c69747465723a20746f74616c2070657263656e74206960448201526973206e6f74203130302560b01b6064820152608401610197565b50505050565b610321335f356001600160e01b0319166106af565b61033d5760405162461bcd60e51b8152600401610197906108ab565b6040516370a0823160e01b81523060048201525f906001906001600160a01b038416906370a0823190602401602060405180830381865afa158015610384573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103a891906109a7565b6103b291906109be565b90505f5b600254811015610461575f610413600283815481106103d7576103d7610911565b5f9182526020909120015484906001600160601b03167f0000000000000000000000000000000000000000000000000000000000000000610757565b90506104506002838154811061042b5761042b610911565b5f918252602090912001546001600160a01b0386811691600160601b90041683610772565b5061045a816108f9565b90506103b6565b505050565b5f546001600160a01b03163314806104f7575060015460405163b700961360e01b81526001600160a01b039091169063b7009613906104b890339030906001600160e01b03195f3516906004016109d1565b602060405180830381865afa1580156104d3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104f791906109fe565b6104ff575f80fd5b600180546001600160a01b0319166001600160a01b03831690811790915560405133907fa3396fd7f6e0a21b50e5089d2da70d5ac0a3bbbd1f617a93f134b76389980198905f90a350565b60028181548110610559575f80fd5b5f918252602090912001546001600160601b0381169150600160601b90046001600160a01b031682565b610598335f356001600160e01b0319166106af565b6105b45760405162461bcd60e51b8152600401610197906108ab565b6040516370a0823160e01b81523060048201526106319033906001600160a01b038416906370a0823190602401602060405180830381865afa1580156105fc573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061062091906109a7565b6001600160a01b0384169190610772565b50565b610649335f356001600160e01b0319166106af565b6106655760405162461bcd60e51b8152600401610197906108ab565b5f80546001600160a01b0319166001600160a01b0383169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b6001545f906001600160a01b03168015801590610736575060405163b700961360e01b81526001600160a01b0382169063b7009613906106f7908790309088906004016109d1565b602060405180830381865afa158015610712573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061073691906109fe565b8061074d57505f546001600160a01b038581169116145b9150505b92915050565b5f825f19048411830215820261076b575f80fd5b5091020490565b5f60405163a9059cbb60e01b81526001600160a01b038416600482015282602482015260205f6044835f895af13d15601f3d1160015f5114161716915050806103065760405162461bcd60e51b815260206004820152600f60248201526e1514905394d1915497d19052531151608a1b6044820152606401610197565b5f8060208385031215610800575f80fd5b823567ffffffffffffffff80821115610817575f80fd5b818501915085601f83011261082a575f80fd5b813581811115610838575f80fd5b8660208260061b850101111561084c575f80fd5b60209290920196919550909350505050565b6001600160a01b0381168114610631575f80fd5b5f60208284031215610882575f80fd5b813561088d8161085e565b9392505050565b5f602082840312156108a4575f80fd5b5035919050565b6020808252600c908201526b15539055551213d49256915160a21b604082015260600190565b634e487b7160e01b5f52603160045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f6001820161090a5761090a6108e5565b5060010190565b634e487b7160e01b5f52603260045260245ffd5b6001600160601b0381168114610631575f80fd5b5f60208284031215610949575f80fd5b813561088d81610925565b80820180821115610751576107516108e5565b813561097281610925565b6001600160601b03811690506001600160601b03198181845416178355602084013561099d8161085e565b60601b1617905550565b5f602082840312156109b7575f80fd5b5051919050565b81810381811115610751576107516108e5565b6001600160a01b0393841681529190921660208201526001600160e01b0319909116604082015260600190565b5f60208284031215610a0e575f80fd5b8151801515811461088d575f80fdfea26469706673582212200bfaecaf0bb9e5716fb6425e870db34bde5f560d4c0bd53298ecf4176d891d9a64736f6c634300081500330000000000000000000000005f2f11ad8656439d5c14d9b351f8b09cdac2a02d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561000f575f80fd5b5060043610610085575f3560e01c80638da5cb5b116100585780638da5cb5b14610103578063bf7e214f1461012d578063ccec371614610140578063f2fde38b14610153575f80fd5b80630a62787e146100895780633d3d9fbf1461009e5780637a9e5e4b146100b1578063884c3006146100c4575b5f80fd5b61009c6100973660046107ef565b610166565b005b61009c6100ac366004610872565b61030c565b61009c6100bf366004610872565b610466565b6100d76100d2366004610894565b61054a565b604080516001600160601b0390931683526001600160a01b039091166020830152015b60405180910390f35b5f54610115906001600160a01b031681565b6040516001600160a01b0390911681526020016100fa565b600154610115906001600160a01b031681565b61009c61014e366004610872565b610583565b61009c610161366004610872565b610634565b61017b335f356001600160e01b0319166106af565b6101a05760405162461bcd60e51b8152600401610197906108ab565b60405180910390fd5b6002545f5b818110156101e65760028054806101be576101be6108d1565b5f8281526020812082015f1990810191909155019055806101de816108f9565b9150506101a5565b505f805b838110156102835784848281811061020457610204610911565b61021a9260206040909202019081019150610939565b61022d906001600160601b031683610954565b9150600285858381811061024357610243610911565b83546001810185555f94855260209094206040909102929092019291909101905061026e8282610967565b5050808061027b906108f9565b9150506101ea565b507f000000000000000000000000000000000000000000000000000000000000000081146103065760405162461bcd60e51b815260206004820152602a60248201527f5061796d656e7453706c69747465723a20746f74616c2070657263656e74206960448201526973206e6f74203130302560b01b6064820152608401610197565b50505050565b610321335f356001600160e01b0319166106af565b61033d5760405162461bcd60e51b8152600401610197906108ab565b6040516370a0823160e01b81523060048201525f906001906001600160a01b038416906370a0823190602401602060405180830381865afa158015610384573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103a891906109a7565b6103b291906109be565b90505f5b600254811015610461575f610413600283815481106103d7576103d7610911565b5f9182526020909120015484906001600160601b03167f0000000000000000000000000000000000000000000000000000000000000000610757565b90506104506002838154811061042b5761042b610911565b5f918252602090912001546001600160a01b0386811691600160601b90041683610772565b5061045a816108f9565b90506103b6565b505050565b5f546001600160a01b03163314806104f7575060015460405163b700961360e01b81526001600160a01b039091169063b7009613906104b890339030906001600160e01b03195f3516906004016109d1565b602060405180830381865afa1580156104d3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104f791906109fe565b6104ff575f80fd5b600180546001600160a01b0319166001600160a01b03831690811790915560405133907fa3396fd7f6e0a21b50e5089d2da70d5ac0a3bbbd1f617a93f134b76389980198905f90a350565b60028181548110610559575f80fd5b5f918252602090912001546001600160601b0381169150600160601b90046001600160a01b031682565b610598335f356001600160e01b0319166106af565b6105b45760405162461bcd60e51b8152600401610197906108ab565b6040516370a0823160e01b81523060048201526106319033906001600160a01b038416906370a0823190602401602060405180830381865afa1580156105fc573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061062091906109a7565b6001600160a01b0384169190610772565b50565b610649335f356001600160e01b0319166106af565b6106655760405162461bcd60e51b8152600401610197906108ab565b5f80546001600160a01b0319166001600160a01b0383169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b6001545f906001600160a01b03168015801590610736575060405163b700961360e01b81526001600160a01b0382169063b7009613906106f7908790309088906004016109d1565b602060405180830381865afa158015610712573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061073691906109fe565b8061074d57505f546001600160a01b038581169116145b9150505b92915050565b5f825f19048411830215820261076b575f80fd5b5091020490565b5f60405163a9059cbb60e01b81526001600160a01b038416600482015282602482015260205f6044835f895af13d15601f3d1160015f5114161716915050806103065760405162461bcd60e51b815260206004820152600f60248201526e1514905394d1915497d19052531151608a1b6044820152606401610197565b5f8060208385031215610800575f80fd5b823567ffffffffffffffff80821115610817575f80fd5b818501915085601f83011261082a575f80fd5b813581811115610838575f80fd5b8660208260061b850101111561084c575f80fd5b60209290920196919550909350505050565b6001600160a01b0381168114610631575f80fd5b5f60208284031215610882575f80fd5b813561088d8161085e565b9392505050565b5f602082840312156108a4575f80fd5b5035919050565b6020808252600c908201526b15539055551213d49256915160a21b604082015260600190565b634e487b7160e01b5f52603160045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f6001820161090a5761090a6108e5565b5060010190565b634e487b7160e01b5f52603260045260245ffd5b6001600160601b0381168114610631575f80fd5b5f60208284031215610949575f80fd5b813561088d81610925565b80820180821115610751576107516108e5565b813561097281610925565b6001600160601b03811690506001600160601b03198181845416178355602084013561099d8161085e565b60601b1617905550565b5f602082840312156109b7575f80fd5b5051919050565b81810381811115610751576107516108e5565b6001600160a01b0393841681529190921660208201526001600160e01b0319909116604082015260600190565b5f60208284031215610a0e575f80fd5b8151801515811461088d575f80fdfea26469706673582212200bfaecaf0bb9e5716fb6425e870db34bde5f560d4c0bd53298ecf4176d891d9a64736f6c63430008150033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000005f2f11ad8656439d5c14d9b351f8b09cdac2a02d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _owner (address): 0x5F2F11ad8656439d5C14d9B351f8b09cDaC2A02d
Arg [1] : _totalPercent (uint256): 0
Arg [2] : _splits (tuple[]):
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000005f2f11ad8656439d5c14d9b351f8b09cdac2a02d
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
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.