Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Latest 25 from a total of 235 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Create Split | 7673086 | 8 days ago | IN | 0 ETH | 0.00211397 | ||||
Create Split | 7672956 | 8 days ago | IN | 0 ETH | 0.00225375 | ||||
Create Split | 7672888 | 8 days ago | IN | 0 ETH | 0.00242845 | ||||
Create Split | 7672131 | 9 days ago | IN | 0 ETH | 0.00067685 | ||||
Create Split | 7671489 | 9 days ago | IN | 0 ETH | 0.00120775 | ||||
Create Split | 7671476 | 9 days ago | IN | 0 ETH | 0.00106875 | ||||
Create Split | 7671411 | 9 days ago | IN | 0 ETH | 0.00120695 | ||||
Create Split | 7671364 | 9 days ago | IN | 0 ETH | 0.00150391 | ||||
Create Split | 7543310 | 27 days ago | IN | 0 ETH | 0.00038496 | ||||
Create Split | 7444806 | 41 days ago | IN | 0 ETH | 0.00444149 | ||||
Create Split | 7403027 | 47 days ago | IN | 0 ETH | 0.00178168 | ||||
Create Split | 7369224 | 52 days ago | IN | 0 ETH | 0.0005059 | ||||
Create Split | 7262577 | 68 days ago | IN | 0 ETH | 0.00322447 | ||||
Create Split | 7262560 | 68 days ago | IN | 0 ETH | 0.00339163 | ||||
Create Split | 7262463 | 68 days ago | IN | 0 ETH | 0.00146243 | ||||
Create Split | 7249335 | 70 days ago | IN | 0 ETH | 0.00252221 | ||||
Create Split | 7222486 | 74 days ago | IN | 0 ETH | 0.00175971 | ||||
Create Split | 7216688 | 75 days ago | IN | 0 ETH | 0.00664017 | ||||
Create Split | 7209013 | 76 days ago | IN | 0 ETH | 0.0002862 | ||||
Create Split | 7201954 | 77 days ago | IN | 0 ETH | 0.00213821 | ||||
Create Split | 7129377 | 88 days ago | IN | 0 ETH | 0.00631929 | ||||
Create Split | 7125894 | 88 days ago | IN | 0 ETH | 0.00046706 | ||||
Create Split | 7125833 | 88 days ago | IN | 0 ETH | 0.00049582 | ||||
Create Split | 7125678 | 88 days ago | IN | 0 ETH | 0.00089089 | ||||
Create Split | 7124754 | 88 days ago | IN | 0 ETH | 0.00409799 |
Latest 25 internal transactions (View All)
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Source Code Verified (Exact Match)
Contract Name:
PullSplitFactory
Compiler Version
v0.8.23+commit.f704f362
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.23; import { SplitFactoryV2 } from "../SplitFactoryV2.sol"; import { PullSplit } from "./PullSplit.sol"; /** * @title Pull split factory * @author Splits * @notice Minimal smart wallet clone-factory for pull flow splitters. */ contract PullSplitFactory is SplitFactoryV2 { /* -------------------------------------------------------------------------- */ /* CONSTRUCTOR */ /* -------------------------------------------------------------------------- */ constructor(address _splitsWarehouse) { SPLIT_WALLET_IMPLEMENTATION = address(new PullSplit(_splitsWarehouse)); } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.23; import { Clone } from "../libraries/Clone.sol"; import { SplitV2Lib } from "../libraries/SplitV2.sol"; import { Nonces } from "../utils/Nonces.sol"; import { SplitWalletV2 } from "./SplitWalletV2.sol"; /** * @title SplitFactoryV2 * @author Splits * @notice Minimal smart wallet clone-factory for v2 splitters. */ abstract contract SplitFactoryV2 is Nonces { /* -------------------------------------------------------------------------- */ /* EVENTS */ /* -------------------------------------------------------------------------- */ event SplitCreated(address indexed split, SplitV2Lib.Split splitParams, address owner, address creator); /* -------------------------------------------------------------------------- */ /* STORAGE */ /* -------------------------------------------------------------------------- */ /// @notice address of Split Wallet V2 implementation. address public immutable SPLIT_WALLET_IMPLEMENTATION; /* -------------------------------------------------------------------------- */ /* EXTERNAL FUNCTIONS */ /* -------------------------------------------------------------------------- */ /** * @notice Create a new split using create2. * @param _splitParams Params to create split with. * @param _owner Owner of created split. * @param _creator Creator of created split. * @param _salt Salt for create2. */ function createSplitDeterministic( SplitV2Lib.Split calldata _splitParams, address _owner, address _creator, bytes32 _salt ) external returns (address split) { split = Clone.cloneDeterministic({ _implementation: SPLIT_WALLET_IMPLEMENTATION, _salt: _getSalt({ _splitParams: _splitParams, _owner: _owner, _salt: _salt }) }); SplitWalletV2(split).initialize(_splitParams, _owner); emit SplitCreated({ split: split, splitParams: _splitParams, owner: _owner, creator: _creator }); } /** * @notice Create a new split with params and owner. * @dev Uses a hash-based incrementing nonce over params and owner. * @param _splitParams Params to create split with. * @param _owner Owner of created split. * @param _creator Creator of created split. */ function createSplit( SplitV2Lib.Split calldata _splitParams, address _owner, address _creator ) external returns (address split) { bytes32 hash = keccak256(abi.encode(_splitParams, _owner)); split = Clone.cloneDeterministic({ _implementation: SPLIT_WALLET_IMPLEMENTATION, _salt: keccak256(bytes.concat(hash, abi.encode(useNonce(hash)))) }); SplitWalletV2(split).initialize(_splitParams, _owner); emit SplitCreated({ split: split, splitParams: _splitParams, owner: _owner, creator: _creator }); } /** * @notice Predict the address of a new split based on split params, owner, and salt. * @param _splitParams Params to create split with * @param _owner Owner of created split * @param _salt Salt for create2 */ function predictDeterministicAddress( SplitV2Lib.Split calldata _splitParams, address _owner, bytes32 _salt ) external view returns (address) { return _predictDeterministicAddress({ _splitParams: _splitParams, _owner: _owner, _salt: _salt }); } /** * @notice Predict the address of a new split based on the nonce of the hash of the params and owner. * @param _splitParams Params to create split with. * @param _owner Owner of created split. */ function predictDeterministicAddress( SplitV2Lib.Split calldata _splitParams, address _owner ) external view returns (address) { bytes32 hash = keccak256(abi.encode(_splitParams, _owner)); return Clone.predictDeterministicAddress({ _implementation: SPLIT_WALLET_IMPLEMENTATION, _salt: keccak256(bytes.concat(hash, abi.encode(nonces(hash)))), _deployer: address(this) }); } /** * @notice Predict the address of a new split and check if it is deployed. * @param _splitParams Params to create split with. * @param _owner Owner of created split. * @param _salt Salt for create2. */ function isDeployed( SplitV2Lib.Split calldata _splitParams, address _owner, bytes32 _salt ) external view returns (address split, bool exists) { split = _predictDeterministicAddress({ _splitParams: _splitParams, _owner: _owner, _salt: _salt }); exists = split.code.length > 0; } /* -------------------------------------------------------------------------- */ /* PRIVATE/INTERNAL FUNCTIONS */ /* -------------------------------------------------------------------------- */ function _getSalt( SplitV2Lib.Split calldata _splitParams, address _owner, bytes32 _salt ) internal pure returns (bytes32) { return keccak256(bytes.concat(abi.encode(_splitParams, _owner), _salt)); } function _predictDeterministicAddress( SplitV2Lib.Split calldata _splitParams, address _owner, bytes32 _salt ) internal view returns (address) { return Clone.predictDeterministicAddress({ _implementation: SPLIT_WALLET_IMPLEMENTATION, _salt: _getSalt({ _splitParams: _splitParams, _owner: _owner, _salt: _salt }), _deployer: address(this) }); } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.23; import { Cast } from "../../libraries/Cast.sol"; import { SplitV2Lib } from "../../libraries/SplitV2.sol"; import { SplitWalletV2 } from "../SplitWalletV2.sol"; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; /** * @title Pull Split Wallet * @author Splits * @notice The implementation logic for a splitter that distributes using the splits warehouse. * @dev `SplitProxy` handles `receive()` itself to avoid the gas cost with `DELEGATECALL`. */ contract PullSplit is SplitWalletV2 { using SplitV2Lib for SplitV2Lib.Split; using SafeERC20 for IERC20; using Cast for address; /* -------------------------------------------------------------------------- */ /* CONSTRUCTOR & INITIALIZER */ /* -------------------------------------------------------------------------- */ constructor(address _splitWarehouse) SplitWalletV2(_splitWarehouse) { } /* -------------------------------------------------------------------------- */ /* PUBLIC/EXTERNAL FUNCTIONS */ /* -------------------------------------------------------------------------- */ /** * @notice Distributes the tokens in the split & Warehouse to the recipients through the warehouse. * @dev The split must be initialized and the hash of _split must match splitHash. * @param _split The split struct containing the split data that gets distributed. * @param _token The token to distribute. * @param _distributor The distributor of the split. */ function distribute( SplitV2Lib.Split calldata _split, address _token, address _distributor ) external override pausable { if (splitHash != _split.getHash()) revert InvalidSplit(); (uint256 splitBalance, uint256 warehouseBalance) = getSplitBalance(_token); // @solidity memory-safe-assembly assembly { // splitBalance -= uint(splitBalance > 0); splitBalance := sub(splitBalance, iszero(iszero(splitBalance))) // warehouseBalance -= uint(warehouseBalance > 0); warehouseBalance := sub(warehouseBalance, iszero(iszero(warehouseBalance))) } if (splitBalance > 0) depositToWarehouse(_token, splitBalance); _distribute({ _split: _split, _token: _token, _amount: warehouseBalance + splitBalance, _distributor: _distributor }); } /** * @notice Distributes a specific amount of tokens in the split & Warehouse to the recipients through the warehouse. * @dev The split must be initialized and the hash of _split must match splitHash. * @dev Will revert if the amount of tokens to transfer or distribute doesn't exist. * @param _split The split struct containing the split data that gets distributed. * @param _token The token to distribute. * @param _distributeAmount The amount of tokens to distribute. * @param _performWarehouseTransfer if true, deposits all but 1 amount of tokens to the warehouse. * @param _distributor The distributor of the split. */ function distribute( SplitV2Lib.Split calldata _split, address _token, uint256 _distributeAmount, bool _performWarehouseTransfer, address _distributor ) external override pausable { if (splitHash != _split.getHash()) revert InvalidSplit(); if (_performWarehouseTransfer) { uint256 amount = (_token == NATIVE_TOKEN ? address(this).balance : IERC20(_token).balanceOf(address(this))) - 1; depositToWarehouse(_token, amount); } _distribute({ _split: _split, _token: _token, _amount: _distributeAmount, _distributor: _distributor }); } /** * @notice Deposits tokens to the warehouse. * @param _token The token to deposit. * @param _amount The amount of tokens to deposit */ function depositToWarehouse(address _token, uint256 _amount) public { if (_token == NATIVE_TOKEN) { SPLITS_WAREHOUSE.deposit{ value: _amount }({ receiver: address(this), token: _token, amount: _amount }); } else { try SPLITS_WAREHOUSE.deposit({ receiver: address(this), token: _token, amount: _amount }) { } catch { IERC20(_token).approve({ spender: address(SPLITS_WAREHOUSE), amount: type(uint256).max }); SPLITS_WAREHOUSE.deposit({ receiver: address(this), token: _token, amount: _amount }); } } } /* -------------------------------------------------------------------------- */ /* INTERNAL/PRIVATE */ /* -------------------------------------------------------------------------- */ /// @dev Assumes the amount is already deposited to the warehouse. function _distribute( SplitV2Lib.Split calldata _split, address _token, uint256 _amount, address _distributor ) internal { (uint256[] memory amounts, uint256 distibutorReward) = _split.getDistributions(_amount); SPLITS_WAREHOUSE.batchTransfer({ receivers: _split.recipients, token: _token, amounts: amounts }); if (distibutorReward > 0) { SPLITS_WAREHOUSE.transfer({ receiver: _distributor, id: _token.toUint256(), amount: distibutorReward }); } emit SplitDistributed({ token: _token, distributor: _distributor, amount: _amount }); } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.23; /** * @title Modified minimal proxy * @author Splits * @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibClone.sol) * @dev Modified minimal proxy includes a `receive()` method that emits the * `ReceiveETH(uint256)` event to skip `DELEGATECALL` when there is no calldata. * Enables us to accept hard gas-capped `sends` & `transfers` for maximum backwards * composability. */ // solhint-disable no-inline-assembly library Clone { error DeploymentFailed(); uint256 private constant FREE_PTR = 0x40; uint256 private constant ZERO_PTR = 0x60; /// @dev Deploys a modified minimal proxy of `implementation` function cloneDeterministic(address _implementation, bytes32 _salt) internal returns (address instance) { assembly ("memory-safe") { /** * --------------------------------------------------------------------------+ * CREATION (9 bytes - 0x09) | * --------------------------------------------------------------------------| * Opcode | Mnemonic | Stack | Memory | * --------------------------------------------------------------------------| * 60 runSize | PUSH1 runSize | r | | * 3d | RETURNDATASIZE | 0 r | | * 81 | DUP2 | r 0 r | | * 60 offset | PUSH1 offset | o r 0 r | | * 3d | RETURNDATASIZE | 0 o r 0 r | | * 39 | CODECOPY | 0 r | [0..runSize): runtime code | * f3 | RETURN | | [0..runSize): runtime code | * --------------------------------------------------------------------------| * RUNTIME (89 bytes - 0x59) | * --------------------------------------------------------------------------| * Opcode | Mnemonic | Stack | Memory | * --------------------------------------------------------------------------| * | * 36 | CALLDATASIZE | cds | | * 60 0x2c | PUSH1 0x2c | 0x2c cds | | * 57 | JUMPI | | | * 34 | CALLVALUE | cv | | * 3d | RETURNDATASIZE | 0 cv | | * 52 | MSTORE | | [0..0x20): callvalue | * 7f sig | PUSH32 0x9e.. | sig | [0..0x20): callvalue | * 59 | MSIZE | 0x20 sig | [0..0x20): callvalue | * 3d | RETURNDATASIZE | 0 0x20 sig | [0..0x20): callvalue | * a1 | LOG1 | | [0..0x20): callvalue | * 00 | STOP | | [0..0x20): callvalue | * 5b | JUMPDEST | | | * | * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: | * 3d | RETURNDATASIZE | 0 | | * 3d | RETURNDATASIZE | 0 0 | | * 3d | RETURNDATASIZE | 0 0 0 | | * 3d | RETURNDATASIZE | 0 0 0 0 | | * | * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: | * 36 | CALLDATASIZE | cds 0 0 0 0 | | * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | | * 3d | RETURNDATASIZE | 0 0 cds 0 0 0 0 | | * 37 | CALLDATACOPY | 0 0 0 0 | [0..cds): calldata | * | * ::: delegate call to the implementation contract :::::::::::::::::::::::: | * 36 | CALLDATASIZE | cds 0 0 0 0 | [0..cds): calldata | * 3d | RETURNDATASIZE | 0 cds 0 0 0 0 | [0..cds): calldata | * 73 addr | PUSH20 addr | addr 0 cds 0 0 0 0 | [0..cds): calldata | * 5a | GAS | gas addr 0 cds 0 0 0 0 | [0..cds): calldata | * f4 | DELEGATECALL | success 0 0 | [0..cds): calldata | * | * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: | * 3d | RETURNDATASIZE | rds success 0 0 | [0..cds): calldata | * 3d | RETURNDATASIZE | rds rds success 0 0 | [0..cds): calldata | * 93 | SWAP4 | 0 rds success 0 rds | [0..cds): calldata | * 80 | DUP1 | 0 0 rds success 0 rds | [0..cds): calldata | * 3e | RETURNDATACOPY | success 0 rds | [0..rds): returndata | * | * 60 0x57 | PUSH1 0x57 | 0x57 success 0 rds | [0..rds): returndata | * 57 | JUMPI | 0 rds | [0..rds): returndata | * | * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: | * fd | REVERT | | [0..rds): returndata | * | * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: | * 5b | JUMPDEST | 0 rds | [0..rds): returndata | * f3 | RETURN | | [0..rds): returndata | * --------------------------------------------------------------------------+ * TOTAL INIT (98 bytes - 0x62) | * --------------------------------------------------------------------------| */ // save free pointer let fp := mload(FREE_PTR) mstore(0x51, 0x5af43d3d93803e605757fd5bf3) // 13 bytes mstore(0x44, _implementation) // 20 bytes mstore(0x30, 0x593da1005b3d3d3d3d363d3d37363d73) // 16 bytes // `keccak256("ReceiveETH(uint256)")` mstore(0x20, 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff) // 32 bytes mstore(0x00, 0x60593d8160093d39f336602c57343d527f) // 17 bytes // total: 113 bytes = 0x71 // offset: 15 bytes = 0x0f // data: 98 bytes = 0x62 instance := create2(0, 0x0f, 0x71, _salt) // restore free pointer, zero slot mstore(FREE_PTR, fp) mstore(ZERO_PTR, 0) // If `instance` is zero, revert. if iszero(instance) { // Store the function selector of `DeploymentFailed()`. mstore(0x00, 0x30116425) // Revert with (offset, size). revert(0x1c, 0x04) } } } function initCodeHash(address _implementation) internal pure returns (bytes32 hash) { /// @solidity memory-safe-assembly assembly { // save free pointer let fp := mload(FREE_PTR) mstore(0x51, 0x5af43d3d93803e605757fd5bf3) // 13 bytes mstore(0x44, _implementation) // 20 bytes mstore(0x30, 0x593da1005b3d3d3d3d363d3d37363d73) // 16 bytes // `keccak256("ReceiveETH(uint256)")` mstore(0x20, 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff) // 32 bytes mstore(0x00, 0x60593d8160093d39f336602c57343d527f) // 17 bytes hash := keccak256(0x0f, 0x71) // restore free pointer, zero slot mstore(FREE_PTR, fp) mstore(ZERO_PTR, 0) } } function predictDeterministicAddress( address _implementation, bytes32 _salt, address _deployer ) internal pure returns (address predicted) { bytes32 hash = initCodeHash(_implementation); predicted = predictDeterministicAddress({ _hash: hash, _salt: _salt, _deployer: _deployer }); } function predictDeterministicAddress( bytes32 _hash, bytes32 _salt, address _deployer ) internal pure returns (address predicted) { /// @solidity memory-safe-assembly assembly { // Compute and store the bytecode hash. mstore8(0x00, 0xff) // Write the prefix. mstore(0x35, _hash) mstore(0x01, shl(96, _deployer)) mstore(0x15, _salt) predicted := keccak256(0x00, 0x55) mstore(0x35, 0) // Restore the overwritten part of the free memory pointer. } } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.23; library SplitV2Lib { /* -------------------------------------------------------------------------- */ /* ERRORS */ /* -------------------------------------------------------------------------- */ error InvalidSplit_TotalAllocationMismatch(); error InvalidSplit_LengthMismatch(); /* -------------------------------------------------------------------------- */ /* STRUCTS */ /* -------------------------------------------------------------------------- */ /** * @notice Split struct * @dev This struct is used to store the split information. * @dev There are no hard caps on the number of recipients/totalAllocation/allocation unit. Thus the chain and its * gas limits will dictate these hard caps. Please double check if the split you are creating can be distributed on * the chain. * @param recipients The recipients of the split. * @param allocations The allocations of the split. * @param totalAllocation The total allocation of the split. * @param distributionIncentive The incentive for distribution. Limits max incentive to 6.5%. */ struct Split { address[] recipients; uint256[] allocations; uint256 totalAllocation; uint16 distributionIncentive; } /* -------------------------------------------------------------------------- */ /* CONSTANTS */ /* -------------------------------------------------------------------------- */ uint256 internal constant PERCENTAGE_SCALE = 1e6; /* -------------------------------------------------------------------------- */ /* FUNCTIONS */ /* -------------------------------------------------------------------------- */ function getHash(Split calldata _split) internal pure returns (bytes32) { return keccak256(abi.encode(_split)); } function getHashMem(Split memory _split) internal pure returns (bytes32) { return keccak256(abi.encode(_split)); } function validate(Split calldata _split) internal pure { uint256 numOfRecipients = _split.recipients.length; if (_split.allocations.length != numOfRecipients) { revert InvalidSplit_LengthMismatch(); } uint256 totalAllocation; for (uint256 i; i < numOfRecipients; ++i) { totalAllocation += _split.allocations[i]; } if (totalAllocation != _split.totalAllocation) revert InvalidSplit_TotalAllocationMismatch(); } function getDistributions( Split calldata _split, uint256 _amount ) internal pure returns (uint256[] memory amounts, uint256 distributorReward) { uint256 numOfRecipients = _split.recipients.length; amounts = new uint256[](numOfRecipients); distributorReward = calculateDistributorReward(_split, _amount); _amount -= distributorReward; for (uint256 i; i < numOfRecipients; ++i) { amounts[i] = calculateAllocatedAmount(_split, _amount, i); } } function calculateAllocatedAmount( Split calldata _split, uint256 _amount, uint256 _index ) internal pure returns (uint256 allocatedAmount) { allocatedAmount = _amount * _split.allocations[_index] / _split.totalAllocation; } function calculateDistributorReward( Split calldata _split, uint256 _amount ) internal pure returns (uint256 distributorReward) { distributorReward = _amount * _split.distributionIncentive / PERCENTAGE_SCALE; } // only used in tests function getDistributionsMem( Split memory _split, uint256 _amount ) internal pure returns (uint256[] memory amounts, uint256 distributorReward) { uint256 numOfRecipients = _split.recipients.length; amounts = new uint256[](numOfRecipients); distributorReward = _amount * _split.distributionIncentive / PERCENTAGE_SCALE; _amount -= distributorReward; for (uint256 i; i < numOfRecipients; ++i) { amounts[i] = _amount * _split.allocations[i] / _split.totalAllocation; } } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.23; /** * @title Track hash Nonces * @dev Inspired by OpenZeppelin's Nonces.sol */ abstract contract Nonces { mapping(bytes32 hash => uint256) private _nonces; /** * @dev Returns the next unused nonce for a hash. */ function nonces(bytes32 _hash) public view virtual returns (uint256) { return _nonces[_hash]; } /** * @dev Consumes a nonce. * * Returns the current value and increments nonce. */ function useNonce(bytes32 _hash) internal virtual returns (uint256) { // For each hash, the nonce has an initial value of 0, can only be incremented by one, and cannot be // decremented or reset. This guarantees that the nonce never overflows. unchecked { // It is important to do x++ and not ++x here. return _nonces[_hash]++; } } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.23; import { ISplitsWarehouse } from "../interfaces/ISplitsWarehouse.sol"; import { Cast } from "../libraries/Cast.sol"; import { SplitV2Lib } from "../libraries/SplitV2.sol"; import { ERC1271 } from "../utils/ERC1271.sol"; import { Wallet } from "../utils/Wallet.sol"; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; /** * @title Split Wallet V2 * @author Splits * @notice Base splitter contract. * @dev `SplitProxy` handles `receive()` itself to avoid the gas cost with `DELEGATECALL`. */ abstract contract SplitWalletV2 is Wallet, ERC1271 { using SplitV2Lib for SplitV2Lib.Split; using Cast for address; /* -------------------------------------------------------------------------- */ /* ERRORS */ /* -------------------------------------------------------------------------- */ error UnauthorizedInitializer(); error InvalidSplit(); /* -------------------------------------------------------------------------- */ /* EVENTS */ /* -------------------------------------------------------------------------- */ event SplitUpdated(SplitV2Lib.Split _split); event SplitDistributed(address indexed token, address indexed distributor, uint256 amount); /* -------------------------------------------------------------------------- */ /* CONSTANTS/IMMUTABLES */ /* -------------------------------------------------------------------------- */ /// @notice address of Splits Warehouse ISplitsWarehouse public immutable SPLITS_WAREHOUSE; /// @notice address of Split Wallet V2 factory address public immutable FACTORY; /// @notice address of native token address public immutable NATIVE_TOKEN; /* -------------------------------------------------------------------------- */ /* STORAGE */ /* -------------------------------------------------------------------------- */ /// @notice the split hash - Keccak256 hash of the split struct bytes32 public splitHash; /* -------------------------------------------------------------------------- */ /* CONSTRUCTOR & INITIALIZER */ /* -------------------------------------------------------------------------- */ constructor(address _splitWarehouse) ERC1271("splitWallet", "2") { SPLITS_WAREHOUSE = ISplitsWarehouse(_splitWarehouse); NATIVE_TOKEN = SPLITS_WAREHOUSE.NATIVE_TOKEN(); FACTORY = msg.sender; } /** * @notice Initializes the split wallet with a split and its corresponding data. * @dev Only the factory can call this function. * @param _split The split struct containing the split data that gets initialized. */ function initialize(SplitV2Lib.Split calldata _split, address _owner) external { if (msg.sender != FACTORY) revert UnauthorizedInitializer(); _split.validate(); splitHash = _split.getHash(); Wallet.__initWallet(_owner); } /* -------------------------------------------------------------------------- */ /* PUBLIC/EXTERNAL FUNCTIONS */ /* -------------------------------------------------------------------------- */ function distribute(SplitV2Lib.Split calldata _split, address _token, address _distributor) external virtual; function distribute( SplitV2Lib.Split calldata _split, address _token, uint256 _distributeAmount, bool _performWarehouseTransfer, address _distributor ) external virtual; /** * @notice Gets the total token balance of the split wallet and the warehouse. * @param _token The token to get the balance of. * @return splitBalance The token balance in the split wallet. * @return warehouseBalance The token balance in the warehouse of the split wallet. */ function getSplitBalance(address _token) public view returns (uint256 splitBalance, uint256 warehouseBalance) { splitBalance = (_token == NATIVE_TOKEN) ? address(this).balance : IERC20(_token).balanceOf(address(this)); warehouseBalance = SPLITS_WAREHOUSE.balanceOf(address(this), _token.toUint256()); } /** * @notice Updates the split. * @dev Only the owner can call this function. * @param _split The new split struct. */ function updateSplit(SplitV2Lib.Split calldata _split) external onlyOwner { // throws error if invalid _split.validate(); splitHash = _split.getHash(); emit SplitUpdated(_split); } /* -------------------------------------------------------------------------- */ /* INTERNAL FUNCTIONS */ /* -------------------------------------------------------------------------- */ function getSigner() internal view override returns (address) { return owner; } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.23; library Cast { error Overflow(); function toAddress(uint256 _value) internal pure returns (address) { return address(toUint160(_value)); } function toUint256(address _value) internal pure returns (uint256) { return uint256(uint160(_value)); } function toUint160(uint256 _x) internal pure returns (uint160 y) { if (_x >> 160 != 0) revert Overflow(); // solhint-disable-next-line no-inline-assembly assembly { y := _x } } }
// 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: GPL-3.0-or-later pragma solidity ^0.8.23; import { IERC6909 } from "./IERC6909.sol"; interface ISplitsWarehouse is IERC6909 { function NATIVE_TOKEN() external view returns (address); function deposit(address receiver, address token, uint256 amount) external payable; function batchDeposit(address[] calldata receivers, address token, uint256[] calldata amounts) external; function batchTransfer(address[] calldata receivers, address token, uint256[] calldata amounts) external; function withdraw(address owner, address token) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.23; import { EIP712 } from "@openzeppelin/contracts/utils/cryptography/EIP712.sol"; import { SignatureChecker } from "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol"; /** * @notice ERC-1271 with guards for same signer being used on multiple splits * @author Splits * Based on coinbase (https://github.com/coinbase/smart-wallet/blob/main/src/ERC1271.sol) */ abstract contract ERC1271 is EIP712 { /* -------------------------------------------------------------------------- */ /* CONSTANTS */ /* -------------------------------------------------------------------------- */ /** * @dev We use `bytes32 hash` rather than `bytes message` * In the EIP-712 context, `bytes message` would be useful for showing users a full message * they are signing in some wallet preview. But in this case, to prevent replay * across accounts, we are always dealing with nested messages, and so the * input should be a EIP-191 or EIP-712 output hash. * E.g. The input hash would be result of * * keccak256("\x19\x01" || someDomainSeparator || hashStruct(someStruct)) * * OR * * keccak256("\x19Ethereum Signed Message:\n" || len(someMessage) || someMessage), */ bytes32 private constant _MESSAGE_TYPEHASH = keccak256("SplitWalletMessage(bytes32 hash)"); /* -------------------------------------------------------------------------- */ /* CONSTRUCTOR */ /* -------------------------------------------------------------------------- */ /** * @dev Initializes the {EIP712} domain separator. */ constructor(string memory _name, string memory _version) EIP712(_name, _version) { } /* -------------------------------------------------------------------------- */ /* PUBLIC FUNCTIONS */ /* -------------------------------------------------------------------------- */ /** * @notice Validates the signature with ERC1271 return, so that this account can also be used as a signer. */ function isValidSignature(bytes32 hash, bytes calldata signature) public view virtual returns (bytes4 result) { if ( SignatureChecker.isValidSignatureNow({ signer: getSigner(), hash: replaySafeHash(hash), signature: signature }) ) { // bytes4(keccak256("isValidSignature(bytes32,bytes)")) return 0x1626ba7e; } return 0xffffffff; } /** * @dev Returns an EIP-712-compliant hash of `hash`, * where the domainSeparator includes address(this) and block.chainId * to protect against the same signature being used for many accounts. * @return * keccak256(\x19\x01 || this.domainSeparator || * hashStruct(SplitWalletMessage({ * hash: `hash` * })) * ) */ function replaySafeHash(bytes32 hash) public view virtual returns (bytes32) { return _hashTypedDataV4(keccak256(abi.encode(_MESSAGE_TYPEHASH, hash))); } /// @dev returns the ERC1271 signer. function getSigner() internal view virtual returns (address); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.23; import { Pausable } from "./Pausable.sol"; import { ERC1155Holder } from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol"; import { ERC721Holder } from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; /** * @title Wallet Implementation * @author Splits * @notice Minimal smart wallet clone-implementation. */ abstract contract Wallet is Pausable, ERC721Holder, ERC1155Holder { /* -------------------------------------------------------------------------- */ /* ERRORS */ /* -------------------------------------------------------------------------- */ error InvalidCalldataForEOA(Call call); /* -------------------------------------------------------------------------- */ /* STRUCTS */ /* -------------------------------------------------------------------------- */ struct Call { address to; uint256 value; bytes data; } /* -------------------------------------------------------------------------- */ /* EVENTS */ /* -------------------------------------------------------------------------- */ event ExecCalls(Call[] calls); /* -------------------------------------------------------------------------- */ /* CONSTRUCTOR & INITIALIZER */ /* -------------------------------------------------------------------------- */ function __initWallet(address _owner) internal { __initPausable(_owner, false); } /* -------------------------------------------------------------------------- */ /* FUNCTONS */ /* -------------------------------------------------------------------------- */ /** * @notice Execute a batch of calls. * @dev The calls are executed in order, reverting if any of them fails. Can * only be called by the owner. * @param _calls The calls to execute */ function execCalls(Call[] calldata _calls) external payable returns (uint256 blockNumber, bytes[] memory returnData) { address caller = msg.sender; blockNumber = block.number; uint256 length = _calls.length; returnData = new bytes[](length); bool success; for (uint256 i; i < length; ++i) { // prevent user from executing calls after transferring ownership. if (caller != owner) revert Unauthorized(); Call calldata calli = _calls[i]; if (calli.to.code.length == 0) { // When the call is to an EOA, the calldata must be empty. if (calli.data.length > 0) revert InvalidCalldataForEOA({ call: calli }); } (success, returnData[i]) = calli.to.call{ value: calli.value }(calli.data); // solhint-disable-next-line require(success, string(returnData[i])); } emit ExecCalls({ calls: _calls }); } }
// 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) (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); } } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.23; import { IERC165 } from "./IERC165.sol"; /// @title ERC6909 Core Interface /// @author jtriley.eth interface IERC6909 is IERC165 { /// @notice The event emitted when a transfer occurs. /// @param caller The caller of the transfer. /// @param sender The address of the sender. /// @param receiver The address of the receiver. /// @param id The id of the token. /// @param amount The amount of the token. event Transfer( address caller, address indexed sender, address indexed receiver, uint256 indexed id, uint256 amount ); /// @notice The event emitted when an operator is set. /// @param owner The address of the owner. /// @param spender The address of the spender. /// @param approved The approval status. event OperatorSet(address indexed owner, address indexed spender, bool approved); /// @notice The event emitted when an approval occurs. /// @param owner The address of the owner. /// @param spender The address of the spender. /// @param id The id of the token. /// @param amount The amount of the token. event Approval(address indexed owner, address indexed spender, uint256 indexed id, uint256 amount); /// @notice Owner balance of an id. /// @param owner The address of the owner. /// @param id The id of the token. /// @return amount The balance of the token. function balanceOf(address owner, uint256 id) external view returns (uint256 amount); /// @notice Spender allowance of an id. /// @param owner The address of the owner. /// @param spender The address of the spender. /// @param id The id of the token. /// @return amount The allowance of the token. function allowance(address owner, address spender, uint256 id) external view returns (uint256 amount); /// @notice Checks if a spender is approved by an owner as an operator /// @param owner The address of the owner. /// @param spender The address of the spender. /// @return approved The approval status. function isOperator(address owner, address spender) external view returns (bool approved); /// @notice Transfers an amount of an id from the caller to a receiver. /// @param receiver The address of the receiver. /// @param id The id of the token. /// @param amount The amount of the token. function transfer(address receiver, uint256 id, uint256 amount) external returns (bool); /// @notice Transfers an amount of an id from a sender to a receiver. /// @param sender The address of the sender. /// @param receiver The address of the receiver. /// @param id The id of the token. /// @param amount The amount of the token. function transferFrom(address sender, address receiver, uint256 id, uint256 amount) external returns (bool); /// @notice Approves an amount of an id to a spender. /// @param spender The address of the spender. /// @param id The id of the token. /// @param amount The amount of the token. function approve(address spender, uint256 id, uint256 amount) external returns (bool); /// @notice Sets or removes a spender as an operator for the caller. /// @param spender The address of the spender. /// @param approved The approval status. function setOperator(address spender, bool approved) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/EIP712.sol) pragma solidity ^0.8.8; import "./ECDSA.sol"; import "../ShortStrings.sol"; import "../../interfaces/IERC5267.sol"; /** * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. * * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible, * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding * they need in their contracts using a combination of `abi.encode` and `keccak256`. * * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * * The implementation of the domain separator was designed to be as efficient as possible while still properly updating * the chain id to protect against replay attacks on an eventual fork of the chain. * * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain * separator of the implementation contract. This will cause the `_domainSeparatorV4` function to always rebuild the * separator from the immutable values, which is cheaper than accessing a cached version in cold storage. * * _Available since v3.4._ * * @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment */ abstract contract EIP712 is IERC5267 { using ShortStrings for *; bytes32 private constant _TYPE_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to // invalidate the cached domain separator if the chain id changes. bytes32 private immutable _cachedDomainSeparator; uint256 private immutable _cachedChainId; address private immutable _cachedThis; bytes32 private immutable _hashedName; bytes32 private immutable _hashedVersion; ShortString private immutable _name; ShortString private immutable _version; string private _nameFallback; string private _versionFallback; /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ constructor(string memory name, string memory version) { _name = name.toShortStringWithFallback(_nameFallback); _version = version.toShortStringWithFallback(_versionFallback); _hashedName = keccak256(bytes(name)); _hashedVersion = keccak256(bytes(version)); _cachedChainId = block.chainid; _cachedDomainSeparator = _buildDomainSeparator(); _cachedThis = address(this); } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { if (address(this) == _cachedThis && block.chainid == _cachedChainId) { return _cachedDomainSeparator; } else { return _buildDomainSeparator(); } } function _buildDomainSeparator() private view returns (bytes32) { return keccak256(abi.encode(_TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this))); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash); } /** * @dev See {EIP-5267}. * * _Available since v4.9._ */ function eip712Domain() public view virtual override returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions ) { return ( hex"0f", // 01111 _name.toStringWithFallback(_nameFallback), _version.toStringWithFallback(_versionFallback), block.chainid, address(this), bytes32(0), new uint256[](0) ); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/SignatureChecker.sol) pragma solidity ^0.8.0; import "./ECDSA.sol"; import "../../interfaces/IERC1271.sol"; /** * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like * Argent and Gnosis Safe. * * _Available since v4.1._ */ library SignatureChecker { /** * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`. * * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus * change through time. It could return true at block N and false at block N+1 (or the opposite). */ function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) { (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature); return (error == ECDSA.RecoverError.NoError && recovered == signer) || isValidERC1271SignatureNow(signer, hash, signature); } /** * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated * against the signer smart contract using ERC1271. * * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus * change through time. It could return true at block N and false at block N+1 (or the opposite). */ function isValidERC1271SignatureNow( address signer, bytes32 hash, bytes memory signature ) internal view returns (bool) { (bool success, bytes memory result) = signer.staticcall( abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature) ); return (success && result.length >= 32 && abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector)); } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.23; import { Ownable } from "./Ownable.sol"; /** * @title Pausable Implementation * @author Splits * @notice Pausable clone-implementation */ abstract contract Pausable is Ownable { /* -------------------------------------------------------------------------- */ /* ERRORS */ /* -------------------------------------------------------------------------- */ error Paused(); /* -------------------------------------------------------------------------- */ /* EVENTS */ /* -------------------------------------------------------------------------- */ event SetPaused(bool paused); /* -------------------------------------------------------------------------- */ /* STORAGE */ /* -------------------------------------------------------------------------- */ bool public paused; /* -------------------------------------------------------------------------- */ /* CONSTRUCTOR & INITIALIZER */ /* -------------------------------------------------------------------------- */ function __initPausable(address _owner, bool _paused) internal virtual { __initOwnable(_owner); paused = _paused; } /* -------------------------------------------------------------------------- */ /* MODIFIERS */ /* -------------------------------------------------------------------------- */ modifier pausable() virtual { address owner_ = owner; if (paused) { // solhint-disable-next-line avoid-tx-origin if (msg.sender != owner_ && tx.origin != owner_ && msg.sender != address(this)) { revert Paused(); } } _; } /* -------------------------------------------------------------------------- */ /* PUBLIC/EXTERNAL FUNCTIONS */ /* -------------------------------------------------------------------------- */ function setPaused(bool _paused) public virtual onlyOwner { paused = _paused; emit SetPaused({ paused: _paused }); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol) pragma solidity ^0.8.0; import "./ERC1155Receiver.sol"; /** * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens. * * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be * stuck. * * @dev _Available since v3.1._ */ contract ERC1155Holder is ERC1155Receiver { function onERC1155Received( address, address, uint256, uint256, bytes memory ) public virtual override returns (bytes4) { return this.onERC1155Received.selector; } function onERC1155BatchReceived( address, address, uint256[] memory, uint256[] memory, bytes memory ) public virtual override returns (bytes4) { return this.onERC1155BatchReceived.selector; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/utils/ERC721Holder.sol) pragma solidity ^0.8.0; import "../IERC721Receiver.sol"; /** * @dev Implementation of the {IERC721Receiver} interface. * * Accepts all token transfers. * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}. */ contract ERC721Holder is IERC721Receiver { /** * @dev See {IERC721Receiver-onERC721Received}. * * Always returns `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4) { return this.onERC721Received.selector; } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.23; interface IERC165 { /// @notice Checks if a contract implements an interface. /// @param interfaceId The interface identifier, as specified in ERC-165. /// @return supported True if the contract implements `interfaceId` and /// `interfaceId` is not 0xffffffff, false otherwise. function supportsInterface(bytes4 interfaceId) external view returns (bool supported); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV // Deprecated in v4.8 } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) { // 32 is the length in bytes of hash, // enforced by the type signature above /// @solidity memory-safe-assembly assembly { mstore(0x00, "\x19Ethereum Signed Message:\n32") mstore(0x1c, hash) message := keccak256(0x00, 0x3c) } } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) mstore(ptr, "\x19\x01") mstore(add(ptr, 0x02), domainSeparator) mstore(add(ptr, 0x22), structHash) data := keccak256(ptr, 0x42) } } /** * @dev Returns an Ethereum Signed Data with intended validator, created from a * `validator` and `data` according to the version 0 of EIP-191. * * See {recover}. */ function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x00", validator, data)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/ShortStrings.sol) pragma solidity ^0.8.8; import "./StorageSlot.sol"; // | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | // | length | 0x BB | type ShortString is bytes32; /** * @dev This library provides functions to convert short memory strings * into a `ShortString` type that can be used as an immutable variable. * * Strings of arbitrary length can be optimized using this library if * they are short enough (up to 31 bytes) by packing them with their * length (1 byte) in a single EVM word (32 bytes). Additionally, a * fallback mechanism can be used for every other case. * * Usage example: * * ```solidity * contract Named { * using ShortStrings for *; * * ShortString private immutable _name; * string private _nameFallback; * * constructor(string memory contractName) { * _name = contractName.toShortStringWithFallback(_nameFallback); * } * * function name() external view returns (string memory) { * return _name.toStringWithFallback(_nameFallback); * } * } * ``` */ library ShortStrings { // Used as an identifier for strings longer than 31 bytes. bytes32 private constant _FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF; error StringTooLong(string str); error InvalidShortString(); /** * @dev Encode a string of at most 31 chars into a `ShortString`. * * This will trigger a `StringTooLong` error is the input string is too long. */ function toShortString(string memory str) internal pure returns (ShortString) { bytes memory bstr = bytes(str); if (bstr.length > 31) { revert StringTooLong(str); } return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length)); } /** * @dev Decode a `ShortString` back to a "normal" string. */ function toString(ShortString sstr) internal pure returns (string memory) { uint256 len = byteLength(sstr); // using `new string(len)` would work locally but is not memory safe. string memory str = new string(32); /// @solidity memory-safe-assembly assembly { mstore(str, len) mstore(add(str, 0x20), sstr) } return str; } /** * @dev Return the length of a `ShortString`. */ function byteLength(ShortString sstr) internal pure returns (uint256) { uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF; if (result > 31) { revert InvalidShortString(); } return result; } /** * @dev Encode a string into a `ShortString`, or write it to storage if it is too long. */ function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) { if (bytes(value).length < 32) { return toShortString(value); } else { StorageSlot.getStringSlot(store).value = value; return ShortString.wrap(_FALLBACK_SENTINEL); } } /** * @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}. */ function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) { if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) { return toString(value); } else { return store; } } /** * @dev Return the length of a string that was encoded to `ShortString` or written to storage using {setWithFallback}. * * WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of * actual characters as the UTF-8 encoding of a single character can span over multiple bytes. */ function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) { if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) { return byteLength(value); } else { return bytes(store).length; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5267.sol) pragma solidity ^0.8.0; interface IERC5267 { /** * @dev MAY be emitted to signal that the domain could have changed. */ event EIP712DomainChanged(); /** * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712 * signature. */ function eip712Domain() external view returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions ); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC1271 standard signature validation method for * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271]. * * _Available since v4.1._ */ interface IERC1271 { /** * @dev Should return whether the signature provided is valid for the provided data * @param hash Hash of the data to be signed * @param signature Signature byte array associated with _data */ function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.23; /// @title Ownable Implementation /// @author Splits /// @notice Ownable clone-implementation abstract contract Ownable { /* -------------------------------------------------------------------------- */ /* ERRORS */ /* -------------------------------------------------------------------------- */ error Unauthorized(); /* -------------------------------------------------------------------------- */ /* EVENTS */ /* -------------------------------------------------------------------------- */ event OwnershipTransferred(address indexed oldOwner, address indexed newOwner); /* -------------------------------------------------------------------------- */ /* STORAGE */ /* -------------------------------------------------------------------------- */ address public owner; /* -------------------------------------------------------------------------- */ /* CONSTRUCTOR & INITIALIZER */ /* -------------------------------------------------------------------------- */ function __initOwnable(address _owner) internal virtual { emit OwnershipTransferred({ oldOwner: address(0), newOwner: _owner }); owner = _owner; } /* -------------------------------------------------------------------------- */ /* MODIFIERS */ /* -------------------------------------------------------------------------- */ modifier onlyOwner() virtual { if (msg.sender != owner && msg.sender != address(this)) revert Unauthorized(); _; } /* -------------------------------------------------------------------------- */ /* FUNCTIONS */ /* -------------------------------------------------------------------------- */ function transferOwnership(address _owner) public virtual onlyOwner { emit OwnershipTransferred({ oldOwner: owner, newOwner: _owner }); owner = _owner; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol) pragma solidity ^0.8.0; import "../IERC1155Receiver.sol"; import "../../../utils/introspection/ERC165.sol"; /** * @dev _Available since v3.1._ */ abstract contract ERC1155Receiver is ERC165, IERC1155Receiver { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._ * _Available since v4.9 for `string`, `bytes`._ */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "remappings": [ "@prb/test/=node_modules/@prb/test/src/", "forge-std/=node_modules/forge-std/src/", "@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/", "solady/=node_modules/solady/src/", "multicaller/=node_modules/multicaller/" ], "optimizer": { "enabled": true, "runs": 5000000 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "evmVersion": "shanghai", "viaIR": true, "libraries": {} }
[{"inputs":[{"internalType":"address","name":"_splitsWarehouse","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"split","type":"address"},{"components":[{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"allocations","type":"uint256[]"},{"internalType":"uint256","name":"totalAllocation","type":"uint256"},{"internalType":"uint16","name":"distributionIncentive","type":"uint16"}],"indexed":false,"internalType":"struct SplitV2Lib.Split","name":"splitParams","type":"tuple"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"creator","type":"address"}],"name":"SplitCreated","type":"event"},{"inputs":[],"name":"SPLIT_WALLET_IMPLEMENTATION","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"allocations","type":"uint256[]"},{"internalType":"uint256","name":"totalAllocation","type":"uint256"},{"internalType":"uint16","name":"distributionIncentive","type":"uint16"}],"internalType":"struct SplitV2Lib.Split","name":"_splitParams","type":"tuple"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_creator","type":"address"}],"name":"createSplit","outputs":[{"internalType":"address","name":"split","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"allocations","type":"uint256[]"},{"internalType":"uint256","name":"totalAllocation","type":"uint256"},{"internalType":"uint16","name":"distributionIncentive","type":"uint16"}],"internalType":"struct SplitV2Lib.Split","name":"_splitParams","type":"tuple"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_creator","type":"address"},{"internalType":"bytes32","name":"_salt","type":"bytes32"}],"name":"createSplitDeterministic","outputs":[{"internalType":"address","name":"split","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"allocations","type":"uint256[]"},{"internalType":"uint256","name":"totalAllocation","type":"uint256"},{"internalType":"uint16","name":"distributionIncentive","type":"uint16"}],"internalType":"struct SplitV2Lib.Split","name":"_splitParams","type":"tuple"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"bytes32","name":"_salt","type":"bytes32"}],"name":"isDeployed","outputs":[{"internalType":"address","name":"split","type":"address"},{"internalType":"bool","name":"exists","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_hash","type":"bytes32"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"allocations","type":"uint256[]"},{"internalType":"uint256","name":"totalAllocation","type":"uint256"},{"internalType":"uint16","name":"distributionIncentive","type":"uint16"}],"internalType":"struct SplitV2Lib.Split","name":"_splitParams","type":"tuple"},{"internalType":"address","name":"_owner","type":"address"}],"name":"predictDeterministicAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"allocations","type":"uint256[]"},{"internalType":"uint256","name":"totalAllocation","type":"uint256"},{"internalType":"uint16","name":"distributionIncentive","type":"uint16"}],"internalType":"struct SplitV2Lib.Split","name":"_splitParams","type":"tuple"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"bytes32","name":"_salt","type":"bytes32"}],"name":"predictDeterministicAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a0346100d9576001600160401b0390601f613add38819003918201601f1916830191848311848410176100c5578084926020946040528339810103126100d957516001600160a01b039190828116908190036100d95760405191612ee090818401908111848210176100c5576020928492610bfd843981520301905ff080156100ba5716608052604051610b1f90816100de823960805181818160b601528181610169015281816102740152818161047e01526105d70152f35b6040513d5f823e3d90fd5b634e487b7160e01b5f52604160045260245ffd5b5f80fdfe6080604090808252600480361015610015575f80fd5b5f3560e01c9182632556fa39146105115750816380ebf0ab146103935781639e317f121461034f578163cd6bc12114610314578163e9889edd1461023a578163f79918b0146100de575063fc6119b11461006d575f80fd5b346100da575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100da576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b5f80fd5b9050346100da577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6080813601126100da5781359067ffffffffffffffff82116100da5760809082840192360301126100da5761013961069b565b906101426106be565b73ffffffffffffffffffffffffffffffffffffffff61018d6101676064358686610a88565b7f00000000000000000000000000000000000000000000000000000000000000006109ff565b1693843b156100da575f8385926101ce895194859384937fbaa7fda4000000000000000000000000000000000000000000000000000000008552840161087b565b038183895af1801561023057926102187fb3ec24e9259e438f9917b49f27c0dd89a11b7626cb63e6fc977863c0b26a681b9360209896938896610221575b508651938493846109c3565b0390a251908152f35b61022a906108af565b5f61020c565b86513d5f823e3d90fd5b82346100da5760209073ffffffffffffffffffffffffffffffffffffffff61030c61026d610267366106e1565b91610a88565b30906103077f000000000000000000000000000000000000000000000000000000000000000090604051916c5af43d3d93803e605757fd5bf36051526044526f593da1005b3d3d3d3d363d3d37363d736030527f9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff6020527060593d8160093d39f336602c57343d527f5f526071600f20916040525f606052565b610acb565b915191168152f35b82346100da5761032961026d610267366106e1565b803b151573ffffffffffffffffffffffffffffffffffffffff8351921682526020820152f35b82346100da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100da57602091355f525f8252805f20549051908152f35b82346100da577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc9181833601126100da5780359267ffffffffffffffff84116100da5760809084360301126100da5761030c61047173ffffffffffffffffffffffffffffffffffffffff9261041f61044b61040c61069b565b875192839160209a8b840196018661087b565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0810183528261090c565b519020805f525f8652845f2054908551918783015286825261046c826108f0565b610976565b84815191012030906103077f000000000000000000000000000000000000000000000000000000000000000090604051916c5af43d3d93803e605757fd5bf36051526044526f593da1005b3d3d3d3d363d3d37363d736030527f9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff6020527060593d8160093d39f336602c57343d527f5f526071600f20916040525f606052565b9083346100da577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6060813601126100da5782359067ffffffffffffffff82116100da5760809082850192360301126100da5761056c61069b565b906105756106be565b73ffffffffffffffffffffffffffffffffffffffff6105fb6105cf602098898101906105a68161041f8a8a8661087b565b519020805f525f8a52875f20908154916001830190558851918b8301528a825261046c826108f0565b8881519101207f00000000000000000000000000000000000000000000000000000000000000006109ff565b1694853b156100da575f83859261063c885194859384937fbaa7fda4000000000000000000000000000000000000000000000000000000008552840161087b565b0381838a5af18015610691578694927fb3ec24e9259e438f9917b49f27c0dd89a11b7626cb63e6fc977863c0b26a681b94926102189261068257508651938493846109c3565b61068b906108af565b8961020c565b85513d5f823e3d90fd5b6024359073ffffffffffffffffffffffffffffffffffffffff821682036100da57565b6044359073ffffffffffffffffffffffffffffffffffffffff821682036100da57565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc906060828201126100da576004359167ffffffffffffffff83116100da57826080920301126100da576004019060243573ffffffffffffffffffffffffffffffffffffffff811681036100da579060443590565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1823603018112156100da57016020813591019167ffffffffffffffff82116100da578160051b360383136100da57565b608082016107b78280610756565b608085529182905260a08401915f905b808210610843575050506107de6020830183610756565b909284830360208601528183527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82116100da5760609160051b8094602085013760408101356040860152013561ffff81168091036100da5760606020940152010190565b90919283359073ffffffffffffffffffffffffffffffffffffffff82168092036100da576001918152602080910194019201906107c7565b9073ffffffffffffffffffffffffffffffffffffffff6108a86020929594956040855260408501906107a9565b9416910152565b67ffffffffffffffff81116108c357604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040810190811067ffffffffffffffff8211176108c357604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176108c357604052565b908151915f5b838110610963575050015f815290565b8060208092840101518185015201610953565b6109c1909291926109956040519485926020840152604083019061094d565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0810184528361090c565b565b916109db6040929594956060855260608501906107a9565b9473ffffffffffffffffffffffffffffffffffffffff809216602085015216910152565b9190604051926c5af43d3d93803e605757fd5bf36051526044526f593da1005b3d3d3d3d363d3d37363d736030527f9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff6020527060593d8160093d39f336602c57343d527f5f526071600f5ff5916040525f6060528115610a7b57565b63301164255f526004601cfd5b6040519291610aa0918491610995916020840161087b565b610ac560206040518093610ab7838301809761094d565b90815203808452018261090c565b51902090565b91909160ff5f5360355260601b60015260155260555f20905f60355256fea264697066735822122046c5a1a71bd141fb8e248b1bac6b5c70cd0779352f1d62755449a7be3b9fe92464736f6c634300081700336101c0604090808252346200025157620000339062002ee0803803809162000028828562000271565b833981019062000295565b908051620000418162000255565b600b8152602091828201926a1cdc1b1a5d15d85b1b195d60aa1b84528151926200006b8462000255565b60018452818401601960f91b81526200008482620002b6565b9561012096875262000096866200047f565b92610140938452519020948560e05251902093610100968588524660a052845195848701927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f84528688015260608701524660808701523060a087015260a0865260c086019186831060018060401b038411176200023d57828652865190206080523060c0526001600160a01b0316610160818152630c7df65960e21b835293908190839060049082905afa95861562000233575f96620001f7575b5050506101a09384526101809233845251946128b396876200062d8839608051876126f0015260a051876127bc015260c051876126c1015260e0518761273f0152518661276501525185610bf101525184610c1b01525183818161066e015281816118790152818161192701528181611d030152612210015251828181610a6b0152610e3a01525181818161075c01528181610dcc0152818161184f0152611c9f0152f35b620002209396509060c091813d106200022a575b62000217828562000271565b01019062000295565b925f808062000152565b3d91506200020b565b85513d5f823e3d90fd5b634e487b7160e01b5f52604160045260245ffd5b5f80fd5b604081019081106001600160401b038211176200023d57604052565b601f909101601f19168101906001600160401b038211908210176200023d57604052565b908160209103126200025157516001600160a01b0381168103620002515790565b805160209081811015620003505750601f825111620002f15780825192015190808310620002e357501790565b825f19910360031b1b161790565b90604051809263305a27a960e01b82528060048301528251908160248401525f935b82851062000336575050604492505f838284010152601f80199101168101030190fd5b848101820151868601604401529381019385935062000313565b9192916001600160401b0381116200023d5760019182548381811c9116801562000474575b828210146200046057601f81116200042a575b5080601f8311600114620003c65750819293945f92620003ba575b50505f19600383901b1c191690821b17905560ff90565b015190505f80620003a3565b90601f19831695845f52825f20925f905b888210620004125750508385969710620003f9575b505050811b01905560ff90565b01515f1960f88460031b161c191690555f8080620003ec565b808785968294968601518155019501930190620003d7565b835f5283601f835f20920160051c820191601f850160051c015b8281106200045457505062000388565b5f815501849062000444565b634e487b7160e01b5f52602260045260245ffd5b90607f169062000375565b8051602090818110156200050b5750601f825111620004ac5780825192015190808310620002e357501790565b90604051809263305a27a960e01b82528060048301528251908160248401525f935b828510620004f1575050604492505f838284010152601f80199101168101030190fd5b8481018201518686016044015293810193859350620004ce565b906001600160401b0382116200023d57600254926001938481811c9116801562000621575b838210146200046057601f8111620005ea575b5081601f84116001146200058257509282939183925f9462000576575b50501b915f199060031b1c19161760025560ff90565b015192505f8062000560565b919083601f19811660025f52845f20945f905b88838310620005cf5750505010620005b6575b505050811b0160025560ff90565b01515f1960f88460031b161c191690555f8080620005a8565b85870151885590960195948501948793509081019062000595565b60025f5284601f845f20920160051c820191601f860160051c015b8281106200061557505062000543565b5f815501859062000605565b90607f16906200053056fe6080604081815260049182361015610015575f80fd5b5f3560e01c90816301ffc9a71461131e57508063150b7a02146112945780631626ba7e146111f457806316c38b3c146110f15780631d43d55e146110af578063286617de14610fbc5780632d3f553714610e5e5780632dd3100014610df057806331f7d96414610d825780635c975abb14610d3f5780636d22448914610d0357806384b0196e14610bbd5780638da5cb5b14610b6c578063b8d63f4514610b20578063baa7fda4146109f7578063bc197c811461093c578063ce1506be146108f9578063d47b287e14610692578063dfb7ce8314610624578063f23a6e611461059a578063f2fde38b146104b35763f69e64b214610111575f80fd5b602091827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261032c57803567ffffffffffffffff80821161032c573660238301121561032c578183013590811161032c5760246005918060051b3683828701011161032c57869592826101888a97946115fb565b956101958951978861149d565b8187527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06101c2836115fb565b015f5b8181106104a45750505f957fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7d86360301965b838110610330575050508751948188870189885252888087019487010194838101945f925b8484106102cb578b8b8b7f79dfcb184c75a8c53199ae76930d72ffcdac408a45ea4b710dfe3f2d35a45a268c8c038da18251918383019343845281840152815180945260608301938160608260051b8601019301915f955b8287106102815785850386f35b9091929382806102bb837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa08a60019603018652885161156c565b9601920196019592919092610274565b909192939495967fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc089829d9c9d0301835287358281121561032c578c6103186001938a8884950101611ee9565b9901930194019291959493909a999a61021c565b5f80fd5b73ffffffffffffffffffffffffffffffffffffffff5f9b9a9b989798969495965416330361047c578581841b890101358781121561032c5788018a87820161037781611e77565b3b15610426575b915f929182604461039d6103928796611e77565b926064860190611e98565b8094519485928337810186815203930135905af16103b9611fad565b6103c3838c611fdc565b526103ce828b611fdc565b5190156103e85750600101999899969596949392946101f7565b826104228d92898e519485947f08c379a000000000000000000000000000000000000000000000000000000000865285015283019061156c565b0390fd5b90506104356064830182611e98565b9050610442578b9061037e565b836104228e928a8f519485947fa6335651000000000000000000000000000000000000000000000000000000008652850152830190611ee9565b5088517f82b42900000000000000000000000000000000000000000000000000000000008152fd5b60608982018b015289016101c5565b503461032c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261032c576104eb6113d9565b5f549073ffffffffffffffffffffffffffffffffffffffff90818316938433141580610590575b61056857507fffffffffffffffffffffffff00000000000000000000000000000000000000009394501680937f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a316175f55005b8590517f82b42900000000000000000000000000000000000000000000000000000000008152fd5b5030331415610512565b503461032c5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261032c576105d26113d9565b506105db6113fc565b5060843567ffffffffffffffff811161032c576020926105fd9136910161154e565b50517ff23a6e61000000000000000000000000000000000000000000000000000000008152f35b503461032c575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261032c576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461032c577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc60a08136011261032c5782359067ffffffffffffffff821161032c57608090828501923603011261032c576106ec6113fc565b60643592831515840361032c576084359373ffffffffffffffffffffffffffffffffffffffff90818616860361032c575f5460ff8382169160a01c166108a0575b5060035461073a86612140565b0361087857610756575b505061075493506044359161215b565b005b828116907f00000000000000000000000000000000000000000000000000000000000000001681036107f257505047935b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85019485116107c657506107bf6107549482611835565b5f80610744565b6011907f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b60206024918351928380927f70a08231000000000000000000000000000000000000000000000000000000008252308b8301525afa91821561086f57505f9161083d575b5093610787565b90506020813d602011610867575b816108586020938361149d565b8101031261032c57515f610836565b3d915061084b565b513d5f823e3d90fd5b8683517fbcd55b0f000000000000000000000000000000000000000000000000000000008152fd5b8033141590816108ee575b50806108e4575b6108bc575f61072d565b8683517f9e87fac8000000000000000000000000000000000000000000000000000000008152fd5b50303314156108b2565b90503214155f6108ab565b503461032c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261032c5761093560209235611de3565b9051908152f35b503461032c5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261032c576109746113d9565b5061097d6113fc565b5067ffffffffffffffff60443581811161032c5761099e9036908501611613565b5060643581811161032c576109b69036908501611613565b5060843590811161032c576020926109d09136910161154e565b50517fbc197c81000000000000000000000000000000000000000000000000000000008152f35b50903461032c577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc828136011261032c5781359067ffffffffffffffff821161032c57608090828401923603011261032c57610a516113fc565b9173ffffffffffffffffffffffffffffffffffffffff93847f0000000000000000000000000000000000000000000000000000000000000000163303610afa57505080610aa0610aa592612081565b612140565b60035516805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a37fffffffffffffffffffffff0000000000000000000000000000000000000000005f5416175f555f80f35b517f0d622feb000000000000000000000000000000000000000000000000000000008152fd5b503461032c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261032c57610b60610b5b6113d9565b611c83565b82519182526020820152f35b503461032c575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261032c5760209073ffffffffffffffffffffffffffffffffffffffff5f54169051908152f35b503461032c575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261032c57610c157f0000000000000000000000000000000000000000000000000000000000000000612430565b90610c3f7f00000000000000000000000000000000000000000000000000000000000000006125a2565b815193602085019085821067ffffffffffffffff831117610cd7575082610ca69592610cb392610cd395525f845281519687967f0f00000000000000000000000000000000000000000000000000000000000000885260e0602089015260e088019061156c565b918683039087015261156c565b904660608501523060808501525f60a085015283820360c08501526115c8565b0390f35b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b503461032c575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261032c576020906003549051908152f35b503461032c575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261032c5760209060ff5f5460a01c1690519015158152f35b503461032c575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261032c576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461032c575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261032c576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461032c577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc60608136011261032c5782359067ffffffffffffffff821161032c57608090828501923603011261032c57610eb86113fc565b6044359273ffffffffffffffffffffffffffffffffffffffff808516850361032c5760ff5f549182169160a01c16610f63575b50600354610ef884612140565b03610f3b57506107549350610f26610f0f82611c83565b8115158083039203610f2c575b8015159003611c49565b9161215b565b610f368285611835565b610f1c565b8490517fbcd55b0f000000000000000000000000000000000000000000000000000000008152fd5b803314159081610fb1575b5080610fa7575b610f7f575f610eeb565b8490517f9e87fac8000000000000000000000000000000000000000000000000000000008152fd5b5030331415610f75565b90503214155f610f6e565b503461032c577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc9160208336011261032c5780359267ffffffffffffffff841161032c57608090848301943603011261032c5773ffffffffffffffffffffffffffffffffffffffff5f5416331415806110a5575b61107e577f52cd08e805db808b670064dedc5cf97374a918fc17c82d7097753189550e8d51611079848461106382612081565b61106c82612140565b6003555191829182611b93565b0390a1005b90517f82b42900000000000000000000000000000000000000000000000000000000008152fd5b5030331415611030565b503461032c577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261032c576107546110e86113d9565b60243590611835565b503461032c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261032c5781359182151580930361032c575f549073ffffffffffffffffffffffffffffffffffffffff8216331415806111ea575b6111c3577f3c70af01296aef045b2f5c9d3c30b05d4428fd257145b9c7fcd76418e65b598060208585857fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff74ff00000000000000000000000000000000000000008460a01b169116175f5551908152a1005b82517f82b42900000000000000000000000000000000000000000000000000000000008152fd5b5030331415611151565b503461032c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261032c5767ffffffffffffffff9160243583811161032c573660238201121561032c578082013593841161032c57366024858301011161032c576020937fffffffff0000000000000000000000000000000000000000000000000000000092602461128c93019035611673565b915191168152f35b503461032c5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261032c576112cc6113d9565b506112d56113fc565b5060643567ffffffffffffffff811161032c576020926112f79136910161154e565b50517f150b7a02000000000000000000000000000000000000000000000000000000008152f35b833461032c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261032c5735907fffffffff00000000000000000000000000000000000000000000000000000000821680920361032c57817f4e2312e000000000000000000000000000000000000000000000000000000000602093149081156113af575b5015158152f35b7f01ffc9a700000000000000000000000000000000000000000000000000000000915014836113a8565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361032c57565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361032c57565b359073ffffffffffffffffffffffffffffffffffffffff8216820361032c57565b67ffffffffffffffff811161145457604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040810190811067ffffffffffffffff82111761145457604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761145457604052565b67ffffffffffffffff811161145457601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b929192611524826114de565b91611532604051938461149d565b82948184528183011161032c578281602093845f960137010152565b9080601f8301121561032c5781602061156993359101611518565b90565b91908251928382525f5b8481106115b45750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6020809697860101520116010190565b602081830181015184830182015201611576565b9081518082526020808093019301915f5b8281106115e7575050505090565b8351855293810193928101926001016115d9565b67ffffffffffffffff81116114545760051b60200190565b9080601f8301121561032c57602090823561162d816115fb565b9361163b604051958661149d565b81855260208086019260051b82010192831161032c57602001905b828210611664575050505090565b81358152908301908301611656565b9190916116a473ffffffffffffffffffffffffffffffffffffffff9361169c855f541693611de3565b933691611518565b6116ae8184612675565b60058196929610156117f0571594856117e4575b5050831561171a575b5050506116f6577fffffffff0000000000000000000000000000000000000000000000000000000090565b7f1626ba7e0000000000000000000000000000000000000000000000000000000090565b5f9293509082916040516117978161176b60208201947f1626ba7e00000000000000000000000000000000000000000000000000000000998a8752602484015260406044840152606483019061156c565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0810183528261149d565b51915afa906117a4611fad565b826117d6575b826117ba575b50505f80806116cb565b90915060208180518101031261032c5760200151145f806117b0565b9150602082511015916117aa565b16821493505f806116c2565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b9081602091031261032c5751801515810361032c5790565b73ffffffffffffffffffffffffffffffffffffffff8181167f00000000000000000000000000000000000000000000000000000000000000008216810361192257507f00000000000000000000000000000000000000000000000000000000000000001691823b1561032c576040517f8340f54900000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff9290921660248301526044820181905290915f91839160649183915af180156119175761190c5750565b61191590611440565b565b6040513d5f823e3d90fd5b9291907f00000000000000000000000000000000000000000000000000000000000000001690813b1561032c576040517f8340f5490000000000000000000000000000000000000000000000000000000080825230600483015273ffffffffffffffffffffffffffffffffffffffff83166024830152604482018590525f959091868160648183895af19081611adb575b50611ad357602086916044604051809481937f095ea7b30000000000000000000000000000000000000000000000000000000083528960048401527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60248401525af18015611ac857611a99575b50823b15611a955760405190815230600482015273ffffffffffffffffffffffffffffffffffffffff919091166024820152604481019290925282908290606490829084905af18015611a8a57611a76575050565b611a808291611440565b611a875750565b80fd5b6040513d84823e3d90fd5b8480fd5b611aba9060203d602011611ac1575b611ab2818361149d565b81019061181d565b505f611a21565b503d611aa8565b6040513d88823e3d90fd5b505050505050565b611ae6919750611440565b5f955f6119b3565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18236030181121561032c57016020813591019167ffffffffffffffff821161032c578160051b3603831361032c57565b9190808252602080920192915f5b828110611b5d575050505090565b90919293828060019273ffffffffffffffffffffffffffffffffffffffff611b848961141f565b16815201950193929101611b4f565b9060208252611bb6611ba58280611aee565b6080602086015260a0850191611b41565b611bc36020830183611aee565b90927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08584030160408601528183527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821161032c5760609160051b80946020850137604081013582860152013561ffff811680910361032c5760806020940152010190565b91908201809211611c5657565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b73ffffffffffffffffffffffffffffffffffffffff90811691907f000000000000000000000000000000000000000000000000000000000000000081168303611d65576020475b936044604051809481937efdd58e00000000000000000000000000000000000000000000000000000000835230600484015260248301527f0000000000000000000000000000000000000000000000000000000000000000165afa908115611917575f91611d36575090565b90506020813d602011611d5d575b81611d516020938361149d565b8101031261032c575190565b3d9150611d44565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152602081602481875afa8015611917575f90611db0575b60209150611cca565b506020813d602011611ddb575b81611dca6020938361149d565b8101031261032c5760209051611da7565b3d9150611dbd565b6040519060208201907f27494ec45ae688e7b2451f36d0c95ff88538e2aeba4442f5a7a84fb2268f97348252604083015260408252606082019180831067ffffffffffffffff84111761145457604292604052519020611e416126aa565b90604051917f19010000000000000000000000000000000000000000000000000000000000008352600283015260228201522090565b3573ffffffffffffffffffffffffffffffffffffffff8116810361032c5790565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561032c570180359067ffffffffffffffff821161032c5760200191813603831361032c57565b73ffffffffffffffffffffffffffffffffffffffff611f078261141f565b1682526020810135602083015260408101357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18236030181121561032c5701906020823592019167ffffffffffffffff811161032c57803603831361032c57601f817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09260809560606040870152816060870152868601375f8582860101520116010190565b3d15611fd7573d90611fbe826114de565b91611fcc604051938461149d565b82523d5f602084013e565b606090565b8051821015611ff05760209160051b010190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561032c570180359067ffffffffffffffff821161032c57602001918160051b3603831361032c57565b9190811015611ff05760051b0190565b61208b818061201d565b602083019291508061209d848461201d565b90500361211657915f925f915b8183106120e95750505060400135036120bf57565b60046040517f123c9c81000000000000000000000000000000000000000000000000000000008152fd5b90919361210d60019161210687612100868961201d565b90612071565b3590611c49565b940191906120aa565b60046040517f40fa044d000000000000000000000000000000000000000000000000000000008152fd5b6040516121558161176b602082019485611b93565b51902090565b9093925f9461216a838061201d565b929050612176836115fb565b936040906121868251968761149d565b848652612192856115fb565b947fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0602096013687890137606082013561ffff811680910361032c576121dc620f4240918a61286a565b0490818903898111611c56575f5b8281106123c95750505073ffffffffffffffffffffffffffffffffffffffff94612237867f000000000000000000000000000000000000000000000000000000000000000016938061201d565b9190843b1561032c57612285926122bd5f938a895196879586957f2e72102f000000000000000000000000000000000000000000000000000000008752606060048801526064870191611b41565b91169c8d60248501527ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8483030160448501526115c8565b038183875af180156123bf576123ac575b5080612306575b50507f562c19c0e7b3493417e3cf5103baa939f4d0e9c1087be236aebb46b84e09c7d99495969750519586521693a3565b899160648792855194859384927f095bcdb60000000000000000000000000000000000000000000000000000000084528a8a1660048501528c602485015260448401525af180156123a2577f562c19c0e7b3493417e3cf5103baa939f4d0e9c1087be236aebb46b84e09c7d99697989950612385575b889796956122d5565b61239b90853d8711611ac157611ab2818361149d565b505f61237c565b82513d8b823e3d90fd5b6123b7919a50611440565b5f985f6122ce565b84513d5f823e3d90fd5b6123e36123dc826121008c89018961201d565b358361286a565b9086860135801561240357600192046123fc828d611fdc565b52016121ea565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b60ff81146124865760ff811690601f821161245c576040519161245283611481565b8252602082015290565b60046040517fb3512b0c000000000000000000000000000000000000000000000000000000008152fd5b506040515f60018054918260011c60018416928315612598575b602094858310851461256b57828752869490811561252c57506001146124cf575b50506115699250038261149d565b9093915060015f527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6935f915b81831061251457505061156993508201015f806124c1565b855487840185015294850194869450918301916124fc565b90506115699593507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201015f806124c1565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b90607f16906124a0565b60ff81146125c45760ff811690601f821161245c576040519161245283611481565b506040515f600254906001908260011c6001841692831561266b575b602094858310851461256b57828752869490811561252c575060011461260e5750506115699250038261149d565b9093915060025f527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace935f915b81831061265357505061156993508201015f806124c1565b8554878401850152948501948694509183019161263b565b90607f16906125e0565b9060418151145f146126a15761269d91602082015190606060408401519301515f1a906127e2565b9091565b50505f90600290565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163014806127b9575b15612712577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f82527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a0815260c0810181811067ffffffffffffffff8211176114545760405251902090565b507f000000000000000000000000000000000000000000000000000000000000000046146126e9565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841161285f576020935f9360ff60809460405194855216868401526040830152606082015282805260015afa15611917575f5173ffffffffffffffffffffffffffffffffffffffff81161561285757905f90565b505f90600190565b505050505f90600390565b81810292918115918404141715611c565756fea264697066735822122033c05176c9de37df48f65e722fa9d6f2f8c6c08a8a42f42affa25d5b5c07194b64736f6c634300081700330000000000000000000000008fb66f38cf86a3d5e8768f8f1754a24a6c661fb8
Deployed Bytecode
0x6080604090808252600480361015610015575f80fd5b5f3560e01c9182632556fa39146105115750816380ebf0ab146103935781639e317f121461034f578163cd6bc12114610314578163e9889edd1461023a578163f79918b0146100de575063fc6119b11461006d575f80fd5b346100da575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100da576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000006291497d1206618fc810900d2e7e9af6aa1f1b99168152f35b5f80fd5b9050346100da577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6080813601126100da5781359067ffffffffffffffff82116100da5760809082840192360301126100da5761013961069b565b906101426106be565b73ffffffffffffffffffffffffffffffffffffffff61018d6101676064358686610a88565b7f0000000000000000000000006291497d1206618fc810900d2e7e9af6aa1f1b996109ff565b1693843b156100da575f8385926101ce895194859384937fbaa7fda4000000000000000000000000000000000000000000000000000000008552840161087b565b038183895af1801561023057926102187fb3ec24e9259e438f9917b49f27c0dd89a11b7626cb63e6fc977863c0b26a681b9360209896938896610221575b508651938493846109c3565b0390a251908152f35b61022a906108af565b5f61020c565b86513d5f823e3d90fd5b82346100da5760209073ffffffffffffffffffffffffffffffffffffffff61030c61026d610267366106e1565b91610a88565b30906103077f0000000000000000000000006291497d1206618fc810900d2e7e9af6aa1f1b9990604051916c5af43d3d93803e605757fd5bf36051526044526f593da1005b3d3d3d3d363d3d37363d736030527f9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff6020527060593d8160093d39f336602c57343d527f5f526071600f20916040525f606052565b610acb565b915191168152f35b82346100da5761032961026d610267366106e1565b803b151573ffffffffffffffffffffffffffffffffffffffff8351921682526020820152f35b82346100da5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100da57602091355f525f8252805f20549051908152f35b82346100da577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc9181833601126100da5780359267ffffffffffffffff84116100da5760809084360301126100da5761030c61047173ffffffffffffffffffffffffffffffffffffffff9261041f61044b61040c61069b565b875192839160209a8b840196018661087b565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0810183528261090c565b519020805f525f8652845f2054908551918783015286825261046c826108f0565b610976565b84815191012030906103077f0000000000000000000000006291497d1206618fc810900d2e7e9af6aa1f1b9990604051916c5af43d3d93803e605757fd5bf36051526044526f593da1005b3d3d3d3d363d3d37363d736030527f9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff6020527060593d8160093d39f336602c57343d527f5f526071600f20916040525f606052565b9083346100da577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6060813601126100da5782359067ffffffffffffffff82116100da5760809082850192360301126100da5761056c61069b565b906105756106be565b73ffffffffffffffffffffffffffffffffffffffff6105fb6105cf602098898101906105a68161041f8a8a8661087b565b519020805f525f8a52875f20908154916001830190558851918b8301528a825261046c826108f0565b8881519101207f0000000000000000000000006291497d1206618fc810900d2e7e9af6aa1f1b996109ff565b1694853b156100da575f83859261063c885194859384937fbaa7fda4000000000000000000000000000000000000000000000000000000008552840161087b565b0381838a5af18015610691578694927fb3ec24e9259e438f9917b49f27c0dd89a11b7626cb63e6fc977863c0b26a681b94926102189261068257508651938493846109c3565b61068b906108af565b8961020c565b85513d5f823e3d90fd5b6024359073ffffffffffffffffffffffffffffffffffffffff821682036100da57565b6044359073ffffffffffffffffffffffffffffffffffffffff821682036100da57565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc906060828201126100da576004359167ffffffffffffffff83116100da57826080920301126100da576004019060243573ffffffffffffffffffffffffffffffffffffffff811681036100da579060443590565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1823603018112156100da57016020813591019167ffffffffffffffff82116100da578160051b360383136100da57565b608082016107b78280610756565b608085529182905260a08401915f905b808210610843575050506107de6020830183610756565b909284830360208601528183527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82116100da5760609160051b8094602085013760408101356040860152013561ffff81168091036100da5760606020940152010190565b90919283359073ffffffffffffffffffffffffffffffffffffffff82168092036100da576001918152602080910194019201906107c7565b9073ffffffffffffffffffffffffffffffffffffffff6108a86020929594956040855260408501906107a9565b9416910152565b67ffffffffffffffff81116108c357604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040810190811067ffffffffffffffff8211176108c357604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176108c357604052565b908151915f5b838110610963575050015f815290565b8060208092840101518185015201610953565b6109c1909291926109956040519485926020840152604083019061094d565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0810184528361090c565b565b916109db6040929594956060855260608501906107a9565b9473ffffffffffffffffffffffffffffffffffffffff809216602085015216910152565b9190604051926c5af43d3d93803e605757fd5bf36051526044526f593da1005b3d3d3d3d363d3d37363d736030527f9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff6020527060593d8160093d39f336602c57343d527f5f526071600f5ff5916040525f6060528115610a7b57565b63301164255f526004601cfd5b6040519291610aa0918491610995916020840161087b565b610ac560206040518093610ab7838301809761094d565b90815203808452018261090c565b51902090565b91909160ff5f5360355260601b60015260155260555f20905f60355256fea264697066735822122046c5a1a71bd141fb8e248b1bac6b5c70cd0779352f1d62755449a7be3b9fe92464736f6c63430008170033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000008fb66f38cf86a3d5e8768f8f1754a24a6c661fb8
-----Decoded View---------------
Arg [0] : _splitsWarehouse (address): 0x8fb66F38cF86A3d5e8768f8F1754A24A6c661Fb8
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000008fb66f38cf86a3d5e8768f8f1754a24a6c661fb8
Deployed Bytecode Sourcemap
299:433:30:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1120:52:27;299:433:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;:::i;:::-;;1920:185:27;2024:70;299:433:30;;2024:70:27;;;:::i;:::-;1976:27;1920:185;:::i;:::-;299:433:30;2116:53:27;;;;;;299:433:30;;;;2116:53:27;299:433:30;;2116:53:27;;;;;299:433:30;2116:53:27;;;;;:::i;:::-;;;;;;;;;;;;2185:91;;2116:53;299:433:30;2116:53:27;;;;;;;299:433:30;;;;2185:91:27;;;;;:::i;:::-;;;;299:433:30;;;;;2116:53:27;;;;:::i;:::-;;;;;299:433:30;;;;;;;;;;;;;;;;;9366:80:25;5931:70:27;299:433:30;;;:::i;:::-;5931:70:27;;:::i;:::-;6034:4;5883:27;9315:29:25;5883:27:27;8273:815:25;8410:672;;;;;;;;;;;;;;;;;;;;;;;;;;8273:815;9315:29;9366:80;:::i;:::-;299:433:30;;;;;;;;;;;;9366:80:25;5931:70:27;299:433:30;;;:::i;9366:80:25:-;5039:17:27;;:21;;299:433:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9366:80:25;4371:44:27;299:433:30;;4198:32:27;;299:433:30;;:::i;:::-;;;;;;;4198:32:27;;;;299:433:30;;4198:32:27;;:::i;:::-;;;;;;;;;:::i;:::-;299:433:30;4188:43:27;;299:433:30;;;;;;;;;;;;;4390:24:27;;;;299:433:30;4390:24:27;;;;;;:::i;:::-;4371:44;:::i;:::-;299:433:30;;;;;4361:55:27;4449:4;4313:27;9315:29:25;4313:27:27;8273:815:25;8410:672;;;;;;;;;;;;;;;;;;;;;;;;;;8273:815;299:433:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;:::i;:::-;;2849:172:27;2963:46;299:433:30;2797:32:27;;;;;;;;;;;;:::i;:::-;299:433:30;2787:43:27;;299:433:30;;;;;;;;;;;;;;;;;;;;2982:26:27;;;;299:433:30;2982:26:27;;;;;;:::i;2963:46::-;299:433:30;;;;;2953:57:27;2905:27;2849:172;:::i;:::-;299:433:30;3032:53:27;;;;;;299:433:30;;;;3032:53:27;299:433:30;;3032:53:27;;;;;299:433:30;3032:53:27;;;;;:::i;:::-;;;;;;;;;;;;;;3101:91;3032:53;;3101:91;3032:53;;;299:433:30;;;3101:91:27;;;;;:::i;3032:53::-;;;;:::i;:::-;;;;;299:433:30;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;:::o;:::-;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;:::o;:::-;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::o;727:7540:25:-;;;841:7420;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;727:7540::o;841:7420::-;;;;;;;5329:267:27;299:433:30;;;5329:267:27;5548:32;;299:433:30;;5548:32:27;;;;;;:::i;:::-;299:433:30;5548:32:27;299:433:30;;;;;;;;;;;:::i;:::-;;;;;;;;;;;:::i;:::-;;5525:64:27;;5329:267;:::o;9459:614:25:-;;;;9698:369;;;;;;;;;;;;;;;;;;9459:614::o
Swarm Source
ipfs://33c05176c9de37df48f65e722fa9d6f2f8c6c08a8a42f42affa25d5b5c07194b
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.