Latest 25 from a total of 159 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Create Pool | 143941397 | 72 days ago | IN | 0 ETH | 0.000000013922 | ||||
| Create Pool | 143941354 | 72 days ago | IN | 0 ETH | 0.00000001671 | ||||
| Create Pool | 143941270 | 72 days ago | IN | 0 ETH | 0.000000030621 | ||||
| Create Pool | 143383815 | 85 days ago | IN | 0 ETH | 0.000000030416 | ||||
| Create Pool | 143229359 | 88 days ago | IN | 0 ETH | 0.000000002165 | ||||
| Create Pool | 143229330 | 88 days ago | IN | 0 ETH | 0.000000004899 | ||||
| Create Pool | 143229305 | 88 days ago | IN | 0 ETH | 0.00000000489 | ||||
| Create Pool | 142402823 | 107 days ago | IN | 0 ETH | 0.000000024045 | ||||
| Create Pool | 141804406 | 121 days ago | IN | 0 ETH | 0.000000025896 | ||||
| Create Pool | 141801123 | 121 days ago | IN | 0 ETH | 0.000000241051 | ||||
| Create Pool | 140339256 | 155 days ago | IN | 0 ETH | 0.000000020035 | ||||
| Create Pool | 139749026 | 169 days ago | IN | 0 ETH | 0.000000285141 | ||||
| Create Pool | 138934950 | 188 days ago | IN | 0 ETH | 0.000000026464 | ||||
| Create Pool | 138934377 | 188 days ago | IN | 0 ETH | 0.000000241237 | ||||
| Create Pool | 138529580 | 197 days ago | IN | 0 ETH | 0.000000316188 | ||||
| Create Pool | 138529449 | 197 days ago | IN | 0 ETH | 0.000000354785 | ||||
| Create Pool | 138529386 | 197 days ago | IN | 0 ETH | 0.000000343108 | ||||
| Create Pool | 138529316 | 197 days ago | IN | 0 ETH | 0.000000357159 | ||||
| Create Pool | 138483023 | 198 days ago | IN | 0 ETH | 0.000000246349 | ||||
| Create Pool | 138479422 | 198 days ago | IN | 0 ETH | 0.000000246511 | ||||
| Create Pool | 138478964 | 198 days ago | IN | 0 ETH | 0.000000065842 | ||||
| Create Pool | 138168402 | 206 days ago | IN | 0 ETH | 0.000000242924 | ||||
| Create Pool | 138168375 | 206 days ago | IN | 0 ETH | 0.000000242939 | ||||
| Create Pool | 138165075 | 206 days ago | IN | 0 ETH | 0.00000024642 | ||||
| Create Pool | 138165045 | 206 days ago | IN | 0 ETH | 0.000000245711 |
Latest 25 internal transactions (View All)
Cross-Chain Transactions
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1
pragma solidity =0.7.6;
import {Clones} from "@openzeppelin/contracts/proxy/Clones.sol";
import {IRootCLPoolFactory} from "../interfaces/pool/IRootCLPoolFactory.sol";
import {IRootCLPool} from "../interfaces/pool/IRootCLPool.sol";
import {ICrossChainRegistry} from "../interfaces/bridge/ICrossChainRegistry.sol";
/*
██╗ ██╗███████╗██╗ ██████╗ ██████╗ ██████╗ ██████╗ ███╗ ███╗███████╗
██║ ██║██╔════╝██║ ██╔═══██╗██╔══██╗██╔══██╗██╔═══██╗████╗ ████║██╔════╝
██║ ██║█████╗ ██║ ██║ ██║██║ ██║██████╔╝██║ ██║██╔████╔██║█████╗
╚██╗ ██╔╝██╔══╝ ██║ ██║ ██║██║ ██║██╔══██╗██║ ██║██║╚██╔╝██║██╔══╝
╚████╔╝ ███████╗███████╗╚██████╔╝██████╔╝██║ ██║╚██████╔╝██║ ╚═╝ ██║███████╗
╚═══╝ ╚══════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝
███████╗██╗ ██╗██████╗ ███████╗██████╗ ██████╗██╗ ██╗ █████╗ ██╗███╗ ██╗
██╔════╝██║ ██║██╔══██╗██╔════╝██╔══██╗██╔════╝██║ ██║██╔══██╗██║████╗ ██║
███████╗██║ ██║██████╔╝█████╗ ██████╔╝██║ ███████║███████║██║██╔██╗ ██║
╚════██║██║ ██║██╔═══╝ ██╔══╝ ██╔══██╗██║ ██╔══██║██╔══██║██║██║╚██╗██║
███████║╚██████╔╝██║ ███████╗██║ ██║╚██████╗██║ ██║██║ ██║██║██║ ╚████║
╚══════╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝
██████╗ ██████╗ ██████╗ ████████╗ ██████╗██╗ ██████╗ ██████╗ ██████╗ ██╗
██╔══██╗██╔═══██╗██╔═══██╗╚══██╔══╝██╔════╝██║ ██╔══██╗██╔═══██╗██╔═══██╗██║
██████╔╝██║ ██║██║ ██║ ██║ ██║ ██║ ██████╔╝██║ ██║██║ ██║██║
██╔══██╗██║ ██║██║ ██║ ██║ ██║ ██║ ██╔═══╝ ██║ ██║██║ ██║██║
██║ ██║╚██████╔╝╚██████╔╝ ██║ ╚██████╗███████╗██║ ╚██████╔╝╚██████╔╝███████╗
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═════╝╚══════╝╚═╝ ╚═════╝ ╚═════╝ ╚══════╝
███████╗ █████╗ ██████╗████████╗ ██████╗ ██████╗ ██╗ ██╗
██╔════╝██╔══██╗██╔════╝╚══██╔══╝██╔═══██╗██╔══██╗╚██╗ ██╔╝
█████╗ ███████║██║ ██║ ██║ ██║██████╔╝ ╚████╔╝
██╔══╝ ██╔══██║██║ ██║ ██║ ██║██╔══██╗ ╚██╔╝
██║ ██║ ██║╚██████╗ ██║ ╚██████╔╝██║ ██║ ██║
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝
*/
/// @title Velodrome Superchain Root CL Pool Factory
/// @notice Factory used to create RootCLPools
contract RootCLPoolFactory is IRootCLPoolFactory {
/// @inheritdoc IRootCLPoolFactory
address public immutable override implementation;
/// @inheritdoc IRootCLPoolFactory
address public immutable override bridge;
/// @inheritdoc IRootCLPoolFactory
address public override owner;
/// @inheritdoc IRootCLPoolFactory
mapping(int24 => uint24) public override tickSpacingToFee;
/// @inheritdoc IRootCLPoolFactory
mapping(uint256 => mapping(address => mapping(address => mapping(int24 => address)))) public override getPool;
/// @dev List of all pools
address[] internal _allPools;
int24[] private _tickSpacings;
constructor(address _owner, address _implementation, address _bridge) {
owner = _owner;
implementation = _implementation;
bridge = _bridge;
_enableTickSpacing(1, 100);
_enableTickSpacing(50, 500);
_enableTickSpacing(100, 500);
_enableTickSpacing(200, 3_000);
_enableTickSpacing(2_000, 10_000);
}
/// @inheritdoc IRootCLPoolFactory
function createPool(uint256 chainid, address tokenA, address tokenB, int24 tickSpacing)
external
override
returns (address pool)
{
require(ICrossChainRegistry(bridge).containsChain(chainid), "NR");
require(tokenA != tokenB, "S_A");
(address token0, address token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
require(token0 != address(0), "Z_A");
require(tickSpacingToFee[tickSpacing] != 0);
require(getPool[chainid][token0][token1][tickSpacing] == address(0), "AE");
pool = Clones.cloneDeterministic({
master: implementation,
salt: keccak256(abi.encodePacked(chainid, token0, token1, tickSpacing))
});
IRootCLPool(pool).initialize({
_chainid: chainid,
_factory: address(this),
_token0: token0,
_token1: token1,
_tickSpacing: tickSpacing
});
_allPools.push(pool);
getPool[chainid][token0][token1][tickSpacing] = pool;
// populate mapping in the reverse direction, deliberate choice to avoid the cost of comparing addresses
getPool[chainid][token1][token0][tickSpacing] = pool;
emit RootPoolCreated(token0, token1, tickSpacing, chainid, pool);
}
/// @inheritdoc IRootCLPoolFactory
function setOwner(address _owner) external override {
address cachedOwner = owner;
require(msg.sender == cachedOwner);
require(_owner != address(0));
emit OwnerChanged(cachedOwner, _owner);
owner = _owner;
}
/// @inheritdoc IRootCLPoolFactory
function enableTickSpacing(int24 tickSpacing, uint24 fee) public override {
require(msg.sender == owner);
_enableTickSpacing(tickSpacing, fee);
}
function _enableTickSpacing(int24 tickSpacing, uint24 fee) internal {
require(fee > 0 && fee <= 100_000);
// tick spacing is capped at 16384 to prevent the situation where tickSpacing is so large that
// TickBitmap#nextInitializedTickWithinOneWord overflows int24 container from a valid tick
// 16384 ticks represents a >5x price change with ticks of 1 bips
require(tickSpacing > 0 && tickSpacing < 16384);
require(tickSpacingToFee[tickSpacing] == 0);
tickSpacingToFee[tickSpacing] = fee;
_tickSpacings.push(tickSpacing);
emit TickSpacingEnabled(tickSpacing, fee);
}
/// @inheritdoc IRootCLPoolFactory
function tickSpacings() external view override returns (int24[] memory) {
return _tickSpacings;
}
/// @inheritdoc IRootCLPoolFactory
function allPools(uint256 index) external view override returns (address) {
return _allPools[index];
}
/// @inheritdoc IRootCLPoolFactory
function allPools() external view override returns (address[] memory) {
return _allPools;
}
/// @inheritdoc IRootCLPoolFactory
function allPoolsLength() external view override returns (uint256) {
return _allPools.length;
}
/// @inheritdoc IRootCLPoolFactory
function isPool(address) external pure override returns (bool) {
return false;
}
/// @inheritdoc IRootCLPoolFactory
function isPair(address) external pure override returns (bool) {
return false;
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for
* deploying minimal proxy contracts, also known as "clones".
*
* > To simply and cheaply clone contract functionality in an immutable way, this standard specifies
* > a minimal bytecode implementation that delegates all calls to a known, fixed address.
*
* The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`
* (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the
* deterministic method.
*
* _Available since v3.4._
*/
library Clones {
/**
* @dev Deploys and returns the address of a clone that mimics the behaviour of `master`.
*
* This function uses the create opcode, which should never revert.
*/
function clone(address master) internal returns (address instance) {
// solhint-disable-next-line no-inline-assembly
assembly {
let ptr := mload(0x40)
mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
mstore(add(ptr, 0x14), shl(0x60, master))
mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)
instance := create(0, ptr, 0x37)
}
require(instance != address(0), "ERC1167: create failed");
}
/**
* @dev Deploys and returns the address of a clone that mimics the behaviour of `master`.
*
* This function uses the create2 opcode and a `salt` to deterministically deploy
* the clone. Using the same `master` and `salt` multiple time will revert, since
* the clones cannot be deployed twice at the same address.
*/
function cloneDeterministic(address master, bytes32 salt) internal returns (address instance) {
// solhint-disable-next-line no-inline-assembly
assembly {
let ptr := mload(0x40)
mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
mstore(add(ptr, 0x14), shl(0x60, master))
mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)
instance := create2(0, ptr, 0x37, salt)
}
require(instance != address(0), "ERC1167: create2 failed");
}
/**
* @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
*/
function predictDeterministicAddress(address master, bytes32 salt, address deployer) internal pure returns (address predicted) {
// solhint-disable-next-line no-inline-assembly
assembly {
let ptr := mload(0x40)
mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
mstore(add(ptr, 0x14), shl(0x60, master))
mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf3ff00000000000000000000000000000000)
mstore(add(ptr, 0x38), shl(0x60, deployer))
mstore(add(ptr, 0x4c), salt)
mstore(add(ptr, 0x6c), keccak256(ptr, 0x37))
predicted := keccak256(add(ptr, 0x37), 0x55)
}
}
/**
* @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
*/
function predictDeterministicAddress(address master, bytes32 salt) internal view returns (address predicted) {
return predictDeterministicAddress(master, salt, address(this));
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;
import {IVoter} from "../../../core/interfaces/IVoter.sol";
/// @title Velodrome Superchain Root CL Pool Factory interface
/// @notice The Factory is used to create Root CL Pools
interface IRootCLPoolFactory {
event OwnerChanged(address indexed oldOwner, address indexed newOwner);
/// @notice Emitted when a root pool is created
/// @param token0 The first token of the root pool by address sort order
/// @param token1 The second token of the root pool by address sort order
/// @param tickSpacing The minimum number of ticks between initialized ticks
/// @param chainid The Chain ID of the root pool
/// @param pool The address of the root pool
event RootPoolCreated(
address indexed token0, address indexed token1, int24 indexed tickSpacing, uint256 chainid, address pool
);
/// @notice Emitted when a new tick spacing is enabled for pool creation via the factory
/// @param tickSpacing The minimum number of ticks between initialized ticks for pools
/// @param fee The default fee for a pool created with a given tickSpacing
event TickSpacingEnabled(int24 indexed tickSpacing, uint24 indexed fee);
/// @notice The address of the pool implementation contract used to deploy proxies / clones
/// @return The address of the pool implementation contract
function implementation() external view returns (address);
/// @notice Address of the bridge contract
/// @dev Used as a registry of chains
function bridge() external view returns (address);
/// @notice Returns the current owner of the root pool factory
/// @dev Can be changed by the current owner via setOwner
/// @return The address of the root pool factory owner
function owner() external view returns (address);
/// @notice Returns a default fee for a tick spacing.
/// @dev Use getFee for the most up to date fee for a given pool.
/// A tick spacing can never be removed, so this value should be hard coded or cached in the calling context
/// @param tickSpacing The enabled tick spacing. Returns 0 if not enabled
/// @return fee The default fee for the given tick spacing
function tickSpacingToFee(int24 tickSpacing) external view returns (uint24 fee);
/// @notice Returns a list of enabled tick spacings. Used to iterate through pools created by the factory
/// @dev Tick spacings cannot be removed. Tick spacings are not ordered
/// @return List of enabled tick spacings
function tickSpacings() external view returns (int24[] memory);
/// @notice Returns the root pool address for a given pair of tokens, a tick spacing and chainid, or address 0 if it does not exist
/// @dev tokenA and tokenB may be passed in either token0/token1 or token1/token0 order
/// @param chainid Chain ID associated with pool
/// @param tokenA The contract address of either token0 or token1
/// @param tokenB The contract address of the other token
/// @param tickSpacing The tick spacing of the pool
/// @return pool The pool address
function getPool(uint256 chainid, address tokenA, address tokenB, int24 tickSpacing)
external
view
returns (address pool);
/// @notice Return address of pool created by this factory given its `index`
/// @param index Index of the pool
/// @return The pool address in the given index
function allPools(uint256 index) external view returns (address);
/// @notice Returns all pools created by this factory
/// @return Array of pool addresses
function allPools() external view returns (address[] memory);
/// @notice Returns the number of pools created from this factory
/// @return Number of pools created from this factory
function allPoolsLength() external view returns (uint256);
/// @notice Always returns false as these pools are not real pools
/// @dev Guarantees gauges attached to pools must be created by the governor
function isPool(address pool) external view returns (bool);
/// @notice Always returns false as these pools are not real pools
/// @dev Guarantees gauges attached to pools must be created by the governor
function isPair(address pool) external view returns (bool);
/// @notice Creates a root pool for the given two tokens and a tick spacing
/// @param chainid leaf chain's chainid
/// @param tokenA One of the two tokens in the desired pool
/// @param tokenB The other of the two tokens in the desired pool
/// @param tickSpacing The desired tick spacing for the pool
/// @dev tokenA and tokenB may be passed in either order: token0/token1 or token1/token0. The call will
/// revert if the pool already exists, the tick spacing is invalid, or the token arguments are invalid
/// @return pool The address of the newly created pool
function createPool(uint256 chainid, address tokenA, address tokenB, int24 tickSpacing)
external
returns (address pool);
/// @notice Updates the owner of the root pool factory
/// @dev Must be called by the current owner
/// @param _owner The new owner of the root pool factory
function setOwner(address _owner) external;
/// @notice Enables a certain tickSpacing
/// @dev Tick spacings may never be removed once enabled
/// @param tickSpacing The spacing between ticks to be enforced in the pool
/// @param fee The default fee associated with a given tick spacing
function enableTickSpacing(int24 tickSpacing, uint24 fee) external;
}// SPDX-License-Identifier: MIT
pragma solidity =0.7.6;
interface IRootCLPool {
/// @notice Chain Id this pool links to
function chainid() external view returns (uint256);
/// @notice The contract that deployed the pool, which must adhere to the ICLFactory interface
/// @return The contract address
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function tickSpacing() external view returns (int24);
/// @notice Initialize function used in proxy deployment
/// @dev Can be called once only
/// Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value
/// @dev not locked because it initializes unlocked
/// @param _chainid Chain Id this pool links to
/// @param _factory The CL factory contract address
/// @param _token0 The first token of the pool by address sort order
/// @param _token1 The second token of the pool by address sort order
/// @param _tickSpacing The pool tick spacing
function initialize(uint256 _chainid, address _factory, address _token0, address _token1, int24 _tickSpacing)
external;
}// SPDX-License-Identifier: MIT
pragma solidity =0.7.6;
interface ICrossChainRegistry {
/// @notice Add support for a chain with messages forwarded to a given module
/// @dev Check module code if adding a new module for the first time
/// @param _chainid Chain ID to add
/// @param _module Module to forward messages to, must be registered
function registerChain(uint256 _chainid, address _module) external;
/// @notice Remove support for a chain
/// @param _chainid Chain ID to remove
function deregisterChain(uint256 _chainid) external;
/// @notice Add a module to be used for message forwarding
/// @dev Modules are deployed on other chains at the same address
/// @dev Modules are not trusted by default and must be checked prior to usage
/// @param _module Module to register
function addModule(address _module) external;
/// @notice Update a module used by a chain for message forwarding
/// @param _chainid Chain ID to update
/// @param _module Module to forward messages to
function setModule(uint256 _chainid, address _module) external;
/// @notice Get message module for a given chain
/// @param _chainid Chain ID to check
function chains(uint256 _chainid) external view returns (address);
/// @notice Get list of supported chains
function chainids() external view returns (uint256[] memory);
/// @notice Check if a chain is supported
/// @param _chainid Chain ID to check
function containsChain(uint256 _chainid) external view returns (bool);
/// @notice Get list of registered modules
function modules() external view returns (address[] memory);
/// @notice Check if a module is registered
/// @param _module Module to check
function containsModule(address _module) external view returns (bool);
}// SPDX-License-Identifier: MIT
pragma solidity =0.7.6;
pragma abicoder v2;
import {IVotingEscrow} from "contracts/core/interfaces/IVotingEscrow.sol";
import {IFactoryRegistry} from "contracts/core/interfaces/IFactoryRegistry.sol";
interface IVoter {
function ve() external view returns (IVotingEscrow);
/// @notice Address of Minter.sol
function minter() external view returns (address);
function governor() external view returns (address);
function vote(uint256 _tokenId, address[] calldata _poolVote, uint256[] calldata _weights) external;
function gauges(address _pool) external view returns (address);
function gaugeToFees(address _gauge) external view returns (address);
function gaugeToBribes(address _gauge) external view returns (address);
function createGauge(address _poolFactory, address _pool) external returns (address);
function distribute(address gauge) external;
function factoryRegistry() external view returns (IFactoryRegistry);
/// @dev Utility to distribute to gauges of pools in array.
/// @param _gauges Array of gauges to distribute to.
function distribute(address[] memory _gauges) external;
function isAlive(address _gauge) external view returns (bool);
function killGauge(address _gauge) external;
function emergencyCouncil() external view returns (address);
/// @notice Claim emissions from gauges.
/// @param _gauges Array of gauges to collect emissions from.
function claimRewards(address[] memory _gauges) external;
/// @notice Claim fees for a given NFT.
/// @dev Utility to help batch fee claims.
/// @param _fees Array of FeesVotingReward contracts to collect from.
/// @param _tokens Array of tokens that are used as fees.
/// @param _tokenId Id of veNFT that you wish to claim fees for.
function claimFees(address[] memory _fees, address[][] memory _tokens, uint256 _tokenId) external;
}// SPDX-License-Identifier: MIT
pragma solidity =0.7.6;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
interface IVotingEscrow is IERC721 {
function team() external returns (address);
/// @notice Check whether spender is owner or an approved user for a given veNFT
/// @param _spender .
/// @param _tokenId .
function isApprovedOrOwner(address _spender, uint256 _tokenId) external returns (bool);
/// @notice Deposit `_value` tokens for `msg.sender` and lock for `_lockDuration`
/// @param _value Amount to deposit
/// @param _lockDuration Number of seconds to lock tokens for (rounded down to nearest week)
/// @return TokenId of created veNFT
function createLock(uint256 _value, uint256 _lockDuration) external returns (uint256);
}// SPDX-License-Identifier: MIT
pragma solidity =0.7.6;
interface IFactoryRegistry {
function approve(address poolFactory, address votingRewardsFactory, address gaugeFactory) external;
function isPoolFactoryApproved(address poolFactory) external returns (bool);
function factoriesToPoolFactory(address poolFactory)
external
returns (address votingRewardsFactory, address gaugeFactory);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
import "../../introspection/IERC165.sol";
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(address from, address to, uint256 tokenId) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 tokenId) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.7.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": [
"@ensdomains/=node_modules/@ensdomains/",
"@solidity-parser/=node_modules/solhint/node_modules/@solidity-parser/",
"ds-test/=lib/forge-std/lib/ds-test/src/",
"forge-std/=lib/forge-std/src/",
"hardhat/=node_modules/hardhat/",
"@openzeppelin/=lib/openzeppelin-contracts/",
"@nomad-xyz/=lib/ExcessivelySafeCall/",
"@uniswap/=lib/solidity-lib/",
"base64-sol/=lib/base64/",
"ExcessivelySafeCall/=lib/ExcessivelySafeCall/src/",
"base64/=lib/base64/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/",
"solidity-lib/=lib/solidity-lib/contracts/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs"
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "istanbul",
"viaIR": false,
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_implementation","type":"address"},{"internalType":"address","name":"_bridge","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token0","type":"address"},{"indexed":true,"internalType":"address","name":"token1","type":"address"},{"indexed":true,"internalType":"int24","name":"tickSpacing","type":"int24"},{"indexed":false,"internalType":"uint256","name":"chainid","type":"uint256"},{"indexed":false,"internalType":"address","name":"pool","type":"address"}],"name":"RootPoolCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"int24","name":"tickSpacing","type":"int24"},{"indexed":true,"internalType":"uint24","name":"fee","type":"uint24"}],"name":"TickSpacingEnabled","type":"event"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"allPools","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allPools","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allPoolsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bridge","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainid","type":"uint256"},{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"int24","name":"tickSpacing","type":"int24"}],"name":"createPool","outputs":[{"internalType":"address","name":"pool","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int24","name":"tickSpacing","type":"int24"},{"internalType":"uint24","name":"fee","type":"uint24"}],"name":"enableTickSpacing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"int24","name":"","type":"int24"}],"name":"getPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isPair","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isPool","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int24","name":"","type":"int24"}],"name":"tickSpacingToFee","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tickSpacings","outputs":[{"internalType":"int24[]","name":"","type":"int24[]"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60c060405234801561001057600080fd5b50604051610d86380380610d868339818101604052606081101561003357600080fd5b5080516020820151604090920151600080546001600160a01b0384166001600160a01b03199091161790556001600160601b0319606084811b821660805282901b1660a052909190610087600160646100c4565b61009460326101f46100c4565b6100a160646101f46100c4565b6100ae60c8610bb86100c4565b6100bc6107d06127106100c4565b5050506101dd565b60008162ffffff161180156100e15750620186a08162ffffff1611155b6100ea57600080fd5b60008260020b13801561010157506140008260020b125b61010a57600080fd5b600282810b900b60009081526001602052604090205462ffffff161561012f57600080fd5b600282810b9081900b6000908152600160208190526040808320805462ffffff191662ffffff87811691821790925560048054948501815585527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b600a808604919091018054919095066003026101000a808402199091169287160291909117909255519092917febafae466a4a780a1d87f5fab2f52fad33be9151a7f69d099e8934c8de85b74791a35050565b60805160601c60a05160601c610b766102106000398061042f528061092f525080610409528061069e5250610b766000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638da5cb5b1161008c578063e5e31b1311610066578063e5e31b13146101c7578063e78cea92146102b0578063eee0fdb4146102b8578063efde4e64146102e3576100ea565b80638da5cb5b146102485780639cbbbe8614610250578063c5c63e65146102a8576100ea565b806341d1de97116100c857806341d1de97146101aa5780635b16ebb7146101c75780635c60da1b146102015780635f053aa014610209576100ea565b80630d08a067146100ef57806313af40351461014a578063380dc1c214610172575b600080fd5b61012e6004803603608081101561010557600080fd5b508035906001600160a01b0360208201358116916040810135909116906060013560020b6102fd565b604080516001600160a01b039092168252519081900360200190f35b6101706004803603602081101561016057600080fd5b50356001600160a01b0316610332565b005b6101926004803603602081101561018857600080fd5b503560020b6103c0565b6040805162ffffff9092168252519081900360200190f35b61012e600480360360208110156101c057600080fd5b50356103d7565b6101ed600480360360208110156101dd57600080fd5b50356001600160a01b0316610401565b604080519115158252519081900360200190f35b61012e610407565b61012e6004803603608081101561021f57600080fd5b508035906001600160a01b0360208201358116916040810135909116906060013560020b61042b565b61012e61083f565b61025861084e565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561029457818101518382015260200161027c565b505050509050019250505060405180910390f35b6102586108cc565b61012e61092d565b610170600480360360408110156102ce57600080fd5b50803560020b906020013562ffffff16610951565b6102eb610976565b60408051918252519081900360200190f35b60026020908152600094855260408086208252938552838520815291845282842090915282529020546001600160a01b031681565b6000546001600160a01b031633811461034a57600080fd5b6001600160a01b03821661035d57600080fd5b816001600160a01b0316816001600160a01b03167fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c60405160405180910390a350600080546001600160a01b0319166001600160a01b0392909216919091179055565b60016020526000908152604090205462ffffff1681565b6000600382815481106103e657fe5b6000918252602090912001546001600160a01b031692915050565b50600090565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e31b84d8866040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561049157600080fd5b505afa1580156104a5573d6000803e3d6000fd5b505050506040513d60208110156104bb57600080fd5b50516104f3576040805162461bcd60e51b8152602060048201526002602482015261272960f11b604482015290519081900360640190fd5b826001600160a01b0316846001600160a01b03161415610540576040805162461bcd60e51b8152602060048201526003602482015262535f4160e81b604482015290519081900360640190fd5b600080846001600160a01b0316866001600160a01b031610610563578486610566565b85855b90925090506001600160a01b0382166105ac576040805162461bcd60e51b81526020600482015260036024820152625a5f4160e81b604482015290519081900360640190fd5b600284810b900b60009081526001602052604090205462ffffff166105d057600080fd5b60008781526002602081815260408084206001600160a01b0387811686529083528185208682168652835281852089850b90940b855292909152909120541615610646576040805162461bcd60e51b8152602060048201526002602482015261414560f01b604482015290519081900360640190fd5b6040805160208082018a90526bffffffffffffffffffffffff19606086811b82168486015285901b166054830152600287900b60e81b60688301528251604b818403018152606b90920190925280519101206106c3907f00000000000000000000000000000000000000000000000000000000000000009061097c565b6040805163262817ab60e21b8152600481018a90523060248201526001600160a01b0385811660448301528481166064830152600288900b60848301529151929550908516916398a05eac9160a48082019260009290919082900301818387803b15801561073057600080fd5b505af1158015610744573d6000803e3d6000fd5b505060038054600181019091557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180546001600160a01b038088166001600160a01b0319928316811790935560008c81526002602081815260408084208b8616808652818452828620968c168087529684528286208f860b9586900b80885290855283872080548a168b1790558787529184528286208187528452828620918652908352938190208054909616871790955584518f8152908101959095528351909650919450927fdfe27e4df45bb402ebce64234f46c0b100d39bdfed49a120584effb3bd2e895892908290030190a45050949350505050565b6000546001600160a01b031681565b606060048054806020026020016040519081016040528092919081815260200182805480156108c257602002820191906000526020600020906000905b82829054906101000a900460020b60020b8152602001906003019060208260020104928301926001038202915080841161088b5790505b5050505050905090565b606060038054806020026020016040519081016040528092919081815260200182805480156108c257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610906575050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b0316331461096857600080fd5b6109728282610a27565b5050565b60035490565b6000604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528360601b60148201526e5af43d82803e903d91602b57fd5bf360881b6028820152826037826000f59150506001600160a01b038116610a21576040805162461bcd60e51b815260206004820152601760248201527f455243313136373a2063726561746532206661696c6564000000000000000000604482015290519081900360640190fd5b92915050565b60008162ffffff16118015610a445750620186a08162ffffff1611155b610a4d57600080fd5b60008260020b138015610a6457506140008260020b125b610a6d57600080fd5b600282810b900b60009081526001602052604090205462ffffff1615610a9257600080fd5b600282810b9081900b6000908152600160208190526040808320805462ffffff191662ffffff87811691821790925560048054948501815585527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b600a808604919091018054919095066003026101000a808402199091169287160291909117909255519092917febafae466a4a780a1d87f5fab2f52fad33be9151a7f69d099e8934c8de85b74791a3505056fea2646970667358221220ccd53493811e444f0367c36b6fd1bbd02ee3f3ff544ac504c3dda4bbfc4aef8264736f6c63430007060033000000000000000000000000ba4bb89f4d1e66aa86b60696534892ae0ccf91f5000000000000000000000000321f7dfb9b2ea9131b8c17691cf6e01e5c149ca8000000000000000000000000f278761576f45472bdd721eaca19317ce159c011
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638da5cb5b1161008c578063e5e31b1311610066578063e5e31b13146101c7578063e78cea92146102b0578063eee0fdb4146102b8578063efde4e64146102e3576100ea565b80638da5cb5b146102485780639cbbbe8614610250578063c5c63e65146102a8576100ea565b806341d1de97116100c857806341d1de97146101aa5780635b16ebb7146101c75780635c60da1b146102015780635f053aa014610209576100ea565b80630d08a067146100ef57806313af40351461014a578063380dc1c214610172575b600080fd5b61012e6004803603608081101561010557600080fd5b508035906001600160a01b0360208201358116916040810135909116906060013560020b6102fd565b604080516001600160a01b039092168252519081900360200190f35b6101706004803603602081101561016057600080fd5b50356001600160a01b0316610332565b005b6101926004803603602081101561018857600080fd5b503560020b6103c0565b6040805162ffffff9092168252519081900360200190f35b61012e600480360360208110156101c057600080fd5b50356103d7565b6101ed600480360360208110156101dd57600080fd5b50356001600160a01b0316610401565b604080519115158252519081900360200190f35b61012e610407565b61012e6004803603608081101561021f57600080fd5b508035906001600160a01b0360208201358116916040810135909116906060013560020b61042b565b61012e61083f565b61025861084e565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561029457818101518382015260200161027c565b505050509050019250505060405180910390f35b6102586108cc565b61012e61092d565b610170600480360360408110156102ce57600080fd5b50803560020b906020013562ffffff16610951565b6102eb610976565b60408051918252519081900360200190f35b60026020908152600094855260408086208252938552838520815291845282842090915282529020546001600160a01b031681565b6000546001600160a01b031633811461034a57600080fd5b6001600160a01b03821661035d57600080fd5b816001600160a01b0316816001600160a01b03167fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c60405160405180910390a350600080546001600160a01b0319166001600160a01b0392909216919091179055565b60016020526000908152604090205462ffffff1681565b6000600382815481106103e657fe5b6000918252602090912001546001600160a01b031692915050565b50600090565b7f000000000000000000000000321f7dfb9b2ea9131b8c17691cf6e01e5c149ca881565b60007f000000000000000000000000f278761576f45472bdd721eaca19317ce159c0116001600160a01b031663e31b84d8866040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561049157600080fd5b505afa1580156104a5573d6000803e3d6000fd5b505050506040513d60208110156104bb57600080fd5b50516104f3576040805162461bcd60e51b8152602060048201526002602482015261272960f11b604482015290519081900360640190fd5b826001600160a01b0316846001600160a01b03161415610540576040805162461bcd60e51b8152602060048201526003602482015262535f4160e81b604482015290519081900360640190fd5b600080846001600160a01b0316866001600160a01b031610610563578486610566565b85855b90925090506001600160a01b0382166105ac576040805162461bcd60e51b81526020600482015260036024820152625a5f4160e81b604482015290519081900360640190fd5b600284810b900b60009081526001602052604090205462ffffff166105d057600080fd5b60008781526002602081815260408084206001600160a01b0387811686529083528185208682168652835281852089850b90940b855292909152909120541615610646576040805162461bcd60e51b8152602060048201526002602482015261414560f01b604482015290519081900360640190fd5b6040805160208082018a90526bffffffffffffffffffffffff19606086811b82168486015285901b166054830152600287900b60e81b60688301528251604b818403018152606b90920190925280519101206106c3907f000000000000000000000000321f7dfb9b2ea9131b8c17691cf6e01e5c149ca89061097c565b6040805163262817ab60e21b8152600481018a90523060248201526001600160a01b0385811660448301528481166064830152600288900b60848301529151929550908516916398a05eac9160a48082019260009290919082900301818387803b15801561073057600080fd5b505af1158015610744573d6000803e3d6000fd5b505060038054600181019091557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180546001600160a01b038088166001600160a01b0319928316811790935560008c81526002602081815260408084208b8616808652818452828620968c168087529684528286208f860b9586900b80885290855283872080548a168b1790558787529184528286208187528452828620918652908352938190208054909616871790955584518f8152908101959095528351909650919450927fdfe27e4df45bb402ebce64234f46c0b100d39bdfed49a120584effb3bd2e895892908290030190a45050949350505050565b6000546001600160a01b031681565b606060048054806020026020016040519081016040528092919081815260200182805480156108c257602002820191906000526020600020906000905b82829054906101000a900460020b60020b8152602001906003019060208260020104928301926001038202915080841161088b5790505b5050505050905090565b606060038054806020026020016040519081016040528092919081815260200182805480156108c257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610906575050505050905090565b7f000000000000000000000000f278761576f45472bdd721eaca19317ce159c01181565b6000546001600160a01b0316331461096857600080fd5b6109728282610a27565b5050565b60035490565b6000604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528360601b60148201526e5af43d82803e903d91602b57fd5bf360881b6028820152826037826000f59150506001600160a01b038116610a21576040805162461bcd60e51b815260206004820152601760248201527f455243313136373a2063726561746532206661696c6564000000000000000000604482015290519081900360640190fd5b92915050565b60008162ffffff16118015610a445750620186a08162ffffff1611155b610a4d57600080fd5b60008260020b138015610a6457506140008260020b125b610a6d57600080fd5b600282810b900b60009081526001602052604090205462ffffff1615610a9257600080fd5b600282810b9081900b6000908152600160208190526040808320805462ffffff191662ffffff87811691821790925560048054948501815585527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b600a808604919091018054919095066003026101000a808402199091169287160291909117909255519092917febafae466a4a780a1d87f5fab2f52fad33be9151a7f69d099e8934c8de85b74791a3505056fea2646970667358221220ccd53493811e444f0367c36b6fd1bbd02ee3f3ff544ac504c3dda4bbfc4aef8264736f6c63430007060033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000ba4bb89f4d1e66aa86b60696534892ae0ccf91f5000000000000000000000000321f7dfb9b2ea9131b8c17691cf6e01e5c149ca8000000000000000000000000f278761576f45472bdd721eaca19317ce159c011
-----Decoded View---------------
Arg [0] : _owner (address): 0xBA4BB89f4d1E66AA86B60696534892aE0cCf91F5
Arg [1] : _implementation (address): 0x321f7Dfb9B2eA9131B8C17691CF6e01E5c149cA8
Arg [2] : _bridge (address): 0xF278761576f45472bdD721EACA19317cE159c011
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000ba4bb89f4d1e66aa86b60696534892ae0ccf91f5
Arg [1] : 000000000000000000000000321f7dfb9b2ea9131b8c17691cf6e01e5c149ca8
Arg [2] : 000000000000000000000000f278761576f45472bdd721eaca19317ce159c011
Net Worth in USD
Net Worth in ETH
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
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.