Source Code
Overview
ETH Balance
0 ETH
ETH Value
$0.00
Cross-Chain Transactions
Loading...
Loading
Contract Name:
BaseNameRegistry
Compiler Version
v0.8.18+commit.87f61d96
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
import {IBaseRegisterRouter} from "./Interface.sol";
import {RouterIntentEoaAdapterWithoutDataProvider, EoaExecutorWithoutDataProvider} from "@routerprotocol/intents-core/contracts/RouterIntentEoaAdapter.sol";
import {Errors} from "@routerprotocol/intents-core/contracts/utils/Errors.sol";
import {IERC20, SafeERC20} from "../../../utils/SafeERC20.sol";
import {BaseNameRegistryHelpers} from "./BaseNameHelpers.sol";
/**
* @title Base Name Registry
* @author Ateet Tiwari
* @notice External adapter to add name to base chain
*/
contract BaseNameRegistry is RouterIntentEoaAdapterWithoutDataProvider, BaseNameRegistryHelpers {
using SafeERC20 for IERC20;
constructor(
address __native,
address __wnative,
address __baseRegistry
)
RouterIntentEoaAdapterWithoutDataProvider(__native, __wnative)
BaseNameRegistryHelpers(__baseRegistry)
// solhint-disable-next-line no-empty-blocks
{
}
function name() public pure override returns (string memory) {
return "BaseRegistry";
}
/**
* @inheritdoc EoaExecutorWithoutDataProvider
*/
function execute(
bytes calldata data
) external payable override returns (address[] memory tokens) {
(address _recipient, uint256 _amount, IBaseRegisterRouter.RegisterRequest memory registeryData) = parseInputs(data);
// If the adapter is called using `call` and not `delegatecall`
if (address(this) == self()) {
require(
msg.value == _amount,
Errors.INSUFFICIENT_NATIVE_FUNDS_PASSED
);
} else if (_amount == type(uint256).max)
_amount = address(this).balance;
bytes memory logData;
(tokens, logData) = _registry(_recipient, _amount, registeryData);
emit ExecutionEvent(name(), logData);
return tokens;
}
//////////////////////////// ACTION LOGIC ////////////////////////////
function _registry(
address _recipient,
uint256 _amount,
IBaseRegisterRouter.RegisterRequest memory _registryParams
) internal returns (address[] memory tokens, bytes memory logData) {
uint priceRequired = registerModule.registerPrice(_registryParams.name, _registryParams.duration);
require(_amount >= priceRequired, "amount supplied is lesser than required");
registerModule.register{value: priceRequired}(_registryParams);
tokens = new address[](1);
tokens[0] = native();
logData = abi.encode(_recipient, _amount, true);
}
/**
* @dev function to parse input data.
* @param data input data.
*/
function parseInputs(
bytes memory data
)
public
pure
returns (address, uint256, IBaseRegisterRouter.RegisterRequest memory)
{
return
abi.decode(data, (address, uint256, IBaseRegisterRouter.RegisterRequest));
}
/**
* @dev function to parse input data for registry.
* @param data input data.
*/
function parseInputsRegistry(
bytes memory data
)
public
pure
returns (string memory,
address,
uint256,
address,
bytes[] memory,
bool)
{
return
abi.decode(data, (
string,
address,
uint256,
address,
bytes[],
bool));
}
// solhint-disable-next-line no-empty-blocks
receive() external payable {}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
import {IAdapterDataProvider} from "./interfaces/IAdapterDataProvider.sol";
/**
* @title AdapterDataProvider
* @author Router Protocol
* @notice This contract serves as the data provider for an intent adapter based on Router
* Cross-Chain Intent Framework.
*/
contract AdapterDataProvider is IAdapterDataProvider {
address private _owner;
mapping(address => bool) private _headRegistry;
mapping(address => bool) private _tailRegistry;
mapping(address => bool) private _inboundAssetRegistry;
mapping(address => bool) private _outboundAssetRegistry;
constructor(address __owner) {
_owner = __owner;
}
/**
* @inheritdoc IAdapterDataProvider
*/
function owner() external view returns (address) {
return _owner;
}
/**
* @inheritdoc IAdapterDataProvider
*/
function setOwner(address __owner) external onlyOwner {
_owner = __owner;
}
/**
* @inheritdoc IAdapterDataProvider
*/
function isAuthorizedPrecedingContract(
address precedingContract
) external view returns (bool) {
if (precedingContract == address(0)) return true;
return _headRegistry[precedingContract];
}
/**
* @inheritdoc IAdapterDataProvider
*/
function isAuthorizedSucceedingContract(
address succeedingContract
) external view returns (bool) {
if (succeedingContract == address(0)) return true;
return _tailRegistry[succeedingContract];
}
/**
* @inheritdoc IAdapterDataProvider
*/
function isValidInboundAsset(address asset) external view returns (bool) {
return _inboundAssetRegistry[asset];
}
/**
* @inheritdoc IAdapterDataProvider
*/
function isValidOutboundAsset(address asset) external view returns (bool) {
return _outboundAssetRegistry[asset];
}
/**
* @inheritdoc IAdapterDataProvider
*/
function setPrecedingContract(
address precedingContract,
bool isValid
) external onlyOwner {
_headRegistry[precedingContract] = isValid;
}
/**
* @inheritdoc IAdapterDataProvider
*/
function setSucceedingContract(
address succeedingContract,
bool isValid
) external onlyOwner {
_tailRegistry[succeedingContract] = isValid;
}
/**
* @inheritdoc IAdapterDataProvider
*/
function setInboundAsset(address asset, bool isValid) external onlyOwner {
_inboundAssetRegistry[asset] = isValid;
}
/**
* @inheritdoc IAdapterDataProvider
*/
function setOutboundAsset(address asset, bool isValid) external onlyOwner {
_outboundAssetRegistry[asset] = isValid;
}
/**
* @notice modifier to ensure that only owner can call this function
*/
modifier onlyOwner() {
_onlyOwner();
_;
}
function _onlyOwner() private view {
require(msg.sender == _owner, "Only owner");
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
import {Basic} from "./common/Basic.sol";
import {Errors} from "./utils/Errors.sol";
import {ReentrancyGuard} from "./utils/ReentrancyGuard.sol";
import {AdapterDataProvider} from "./AdapterDataProvider.sol";
/**
* @title BaseAdapter
* @author Router Protocol
* @notice This contract is the base implementation of an intent adapter based on Router
* Cross-Chain Intent Framework.
*/
abstract contract BaseAdapter is Basic, ReentrancyGuard {
address private immutable _self;
address private immutable _native;
address private immutable _wnative;
AdapterDataProvider private immutable _adapterDataProvider;
event ExecutionEvent(string indexed adapterName, bytes data);
event OperationFailedRefundEvent(
address token,
address recipient,
uint256 amount
);
event UnsupportedOperation(
address token,
address refundAddress,
uint256 amount
);
constructor(
address __native,
address __wnative,
bool __deployDataProvider,
address __owner
) {
_self = address(this);
_native = __native;
_wnative = __wnative;
AdapterDataProvider dataProvider;
if (__deployDataProvider)
dataProvider = new AdapterDataProvider(__owner);
else dataProvider = AdapterDataProvider(address(0));
_adapterDataProvider = dataProvider;
}
/**
* @dev function to get the address of weth
*/
function wnative() public view override returns (address) {
return _wnative;
}
/**
* @dev function to get the address of native token
*/
function native() public view override returns (address) {
return _native;
}
/**
* @dev function to get the AdapterDataProvider instance for this contract
*/
function adapterDataProvider() public view returns (AdapterDataProvider) {
return _adapterDataProvider;
}
/**
* @dev Function to check whether the contract is a valid preceding contract registered in
* the head registry.
* @dev This registry governs the initiation of the adapter, exclusively listing authorized
* preceding adapters.
* @notice Only the adapters documented in this registry can invoke the current adapter,
* thereby guaranteeing regulated and secure execution sequences.
* @param precedingContract Address of preceding contract.
* @return true if valid, false if invalid.
*/
function isAuthorizedPrecedingContract(
address precedingContract
) public view returns (bool) {
return
_adapterDataProvider.isAuthorizedPrecedingContract(
precedingContract
);
}
/**
* @dev Function to check whether the contract is a valid succeeding contract registered in
* the tail registry.
* @dev This registry dictates the potential succeeding actions by listing adapters that
* may be invoked following the current one.
* @notice Only the adapters documented in this registry can be invoked by the current adapter,
* thereby guaranteeing regulated and secure execution sequences.
* @param succeedingContract Address of succeeding contract.
* @return true if valid, false if invalid.
*/
function isAuthorizedSucceedingContract(
address succeedingContract
) public view returns (bool) {
return
_adapterDataProvider.isAuthorizedSucceedingContract(
succeedingContract
);
}
/**
* @dev Function to check whether the asset is a valid inbound asset registered in the inbound
* asset registry.
* @dev This registry keeps track of all the acceptable incoming assets, ensuring that the
* adapter only processes predefined asset types.
* @param asset Address of the asset.
* @return true if valid, false if invalid.
*/
function isValidInboundAsset(address asset) public view returns (bool) {
return _adapterDataProvider.isValidInboundAsset(asset);
}
/**
* @dev Function to check whether the asset is a valid outbound asset registered in the outbound
* asset registry.
* @dev It manages the types of assets that the adapter is allowed to output, thus controlling
* the flow’s output and maintaining consistency.
* @param asset Address of the asset.
* @return true if valid, false if invalid.
*/
function isValidOutboundAsset(address asset) public view returns (bool) {
return _adapterDataProvider.isValidOutboundAsset(asset);
}
/**
* @dev function to get the name of the adapter
*/
function name() public view virtual returns (string memory);
/**
* @dev function to get the address of the contract
*/
function self() public view returns (address) {
return _self;
}
}//SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
import {TokenInterface} from "./Interfaces.sol";
import {TokenUtilsBase} from "./TokenUtilsBase.sol";
abstract contract Basic is TokenUtilsBase {
function getTokenBal(address token) internal view returns (uint _amt) {
_amt = address(token) == native()
? address(this).balance
: TokenInterface(token).balanceOf(address(this));
}
function approve(address token, address spender, uint256 amount) internal {
// solhint-disable-next-line no-empty-blocks
try TokenInterface(token).approve(spender, amount) {} catch {
TokenInterface(token).approve(spender, 0);
TokenInterface(token).approve(spender, amount);
}
}
function convertNativeToWnative(uint amount) internal {
TokenInterface(wnative()).deposit{value: amount}();
}
function convertWnativeToNative(uint amount) internal {
TokenInterface(wnative()).withdraw(amount);
}
}//SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
interface TokenInterface {
function approve(address, uint256) external;
function transfer(address, uint) external;
function transferFrom(address, address, uint) external;
function deposit() external payable;
function withdraw(uint) external;
function balanceOf(address) external view returns (uint);
function decimals() external view returns (uint);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
import {IWETH} from "../interfaces/IWETH.sol";
import {SafeERC20, IERC20} from "../utils/SafeERC20.sol";
abstract contract TokenUtilsBase {
using SafeERC20 for IERC20;
function wnative() public view virtual returns (address);
function native() public view virtual returns (address);
function approveToken(
address _tokenAddr,
address _to,
uint256 _amount
) internal {
if (_tokenAddr == native()) return;
if (IERC20(_tokenAddr).allowance(address(this), _to) < _amount) {
IERC20(_tokenAddr).safeApprove(_to, _amount);
}
}
function pullTokensIfNeeded(
address _token,
address _from,
uint256 _amount
) internal returns (uint256) {
// handle max uint amount
if (_amount == type(uint256).max) {
_amount = getBalance(_token, _from);
}
if (
_from != address(0) &&
_from != address(this) &&
_token != native() &&
_amount != 0
) {
IERC20(_token).safeTransferFrom(_from, address(this), _amount);
}
return _amount;
}
function withdrawTokens(
address _token,
address _to,
uint256 _amount
) internal returns (uint256) {
if (_amount == type(uint256).max) {
_amount = getBalance(_token, address(this));
}
if (_to != address(0) && _to != address(this) && _amount != 0) {
if (_token != native()) {
IERC20(_token).safeTransfer(_to, _amount);
} else {
(bool success, ) = _to.call{value: _amount}("");
require(success, "native send fail");
}
}
return _amount;
}
function depositWnative(uint256 _amount) internal {
IWETH(wnative()).deposit{value: _amount}();
}
function withdrawWnative(uint256 _amount) internal {
IWETH(wnative()).withdraw(_amount);
}
function getBalance(
address _tokenAddr,
address _acc
) internal view returns (uint256) {
if (_tokenAddr == native()) {
return _acc.balance;
} else {
return IERC20(_tokenAddr).balanceOf(_acc);
}
}
function getTokenDecimals(address _token) internal view returns (uint256) {
if (_token == native()) return 18;
return IERC20(_token).decimals();
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
/**
* @title Interface for Adapter Data Provider contract for intent adapter.
* @author Router Protocol.
*/
interface IAdapterDataProvider {
/**
* @dev Function to get the address of owner.
*/
function owner() external view returns (address);
/**
* @dev Function to set the address of owner.
* @dev This function can only be called by the owner of this contract.
* @param __owner Address of the new owner
*/
function setOwner(address __owner) external;
/**
* @dev Function to check whether the contract is a valid preceding contract registered in
* the head registry.
* @dev This registry governs the initiation of the adapter, exclusively listing authorized
* preceding adapters.
* @notice Only the adapters documented in this registry can invoke the current adapter,
* thereby guaranteeing regulated and secure execution sequences.
* @param precedingContract Address of preceding contract.
* @return true if valid, false if invalid.
*/
function isAuthorizedPrecedingContract(
address precedingContract
) external view returns (bool);
/**
* @dev Function to check whether the contract is a valid succeeding contract registered in
* the tail registry.
* @dev This registry dictates the potential succeeding actions by listing adapters that
* may be invoked following the current one.
* @notice Only the adapters documented in this registry can be invoked by the current adapter,
* thereby guaranteeing regulated and secure execution sequences.
* @param succeedingContract Address of succeeding contract.
* @return true if valid, false if invalid.
*/
function isAuthorizedSucceedingContract(
address succeedingContract
) external view returns (bool);
/**
* @dev Function to check whether the asset is a valid inbound asset registered in the inbound
* asset registry.
* @dev This registry keeps track of all the acceptable incoming assets, ensuring that the
* adapter only processes predefined asset types.
* @param asset Address of the asset.
* @return true if valid, false if invalid.
*/
function isValidInboundAsset(address asset) external view returns (bool);
/**
* @dev Function to check whether the asset is a valid outbound asset registered in the outbound
* asset registry.
* @dev It manages the types of assets that the adapter is allowed to output, thus controlling
* the flow’s output and maintaining consistency.
* @param asset Address of the asset.
* @return true if valid, false if invalid.
*/
function isValidOutboundAsset(address asset) external view returns (bool);
/**
* @dev Function to set preceding contract (head registry) for the adapter.
* @dev This registry governs the initiation of the adapter, exclusively listing authorized
* preceding adapters.
* @notice Only the adapters documented in this registry can invoke the current adapter,
* thereby guaranteeing regulated and secure execution sequences.
* @param precedingContract Address of preceding contract.
* @param isValid Boolean value suggesting if this is a valid preceding contract.
*/
function setPrecedingContract(
address precedingContract,
bool isValid
) external;
/**
* @dev Function to set succeeding contract (tail registry) for the adapter.
* @dev This registry dictates the potential succeeding actions by listing adapters that
* may be invoked following the current one.
* @notice Only the adapters documented in this registry can be invoked by the current adapter,
* thereby guaranteeing regulated and secure execution sequences.
* @param succeedingContract Address of succeeding contract.
* @param isValid Boolean value suggesting if this is a valid succeeding contract.
*/
function setSucceedingContract(
address succeedingContract,
bool isValid
) external;
/**
* @dev Function to set inbound asset registry for the adapter.
* @dev This registry keeps track of all the acceptable incoming assets, ensuring that the
* adapter only processes predefined asset types.
* @param asset Address of the asset.
* @param isValid Boolean value suggesting if this is a valid inbound asset.
*/
function setInboundAsset(address asset, bool isValid) external;
/**
* @dev Function to set outbound asset registry for the adapter.
* @dev It manages the types of assets that the adapter is allowed to output, thus controlling
* the flow’s output and maintaining consistency.
* @param asset Address of the asset.
* @param isValid Boolean value suggesting if this is a valid inbound asset.
*/
function setOutboundAsset(address asset, bool isValid) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
interface IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
function totalSupply() external view returns (uint256 supply);
function balanceOf(address _owner) external view returns (uint256 balance);
function transfer(
address _to,
uint256 _value
) external returns (bool success);
function transferFrom(
address _from,
address _to,
uint256 _value
) external returns (bool success);
function approve(
address _spender,
uint256 _value
) external returns (bool success);
function allowance(
address _owner,
address _spender
) external view returns (uint256 remaining);
event Approval(
address indexed _owner,
address indexed _spender,
uint256 _value
);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
import {IERC20} from "../utils/SafeERC20.sol";
abstract contract IWETH {
function allowance(address, address) public view virtual returns (uint256);
function balanceOf(address) public view virtual returns (uint256);
function approve(address, uint256) public virtual;
function transfer(address, uint256) public virtual returns (bool);
function transferFrom(
address,
address,
uint256
) public virtual returns (bool);
function deposit() public payable virtual;
function withdraw(uint256) public virtual;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
import {BaseAdapter} from "./BaseAdapter.sol";
import {EoaExecutorWithDataProvider, EoaExecutorWithoutDataProvider} from "./utils/EoaExecutor.sol";
abstract contract RouterIntentEoaAdapterWithDataProvider is
BaseAdapter,
EoaExecutorWithDataProvider
{
constructor(
address __native,
address __wnative,
address __owner
)
BaseAdapter(__native, __wnative, true, __owner)
// solhint-disable-next-line no-empty-blocks
{
}
}
abstract contract RouterIntentEoaAdapterWithoutDataProvider is
BaseAdapter,
EoaExecutorWithoutDataProvider
{
constructor(
address __native,
address __wnative
)
BaseAdapter(__native, __wnative, false, address(0))
// solhint-disable-next-line no-empty-blocks
{
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
library Address {
//insufficient balance
error InsufficientBalance(uint256 available, uint256 required);
//unable to send value, recipient may have reverted
error SendingValueFail();
//insufficient balance for call
error InsufficientBalanceForCall(uint256 available, uint256 required);
//call to non-contract
error NonContractCall();
function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codehash;
bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
// solhint-disable-next-line no-inline-assembly
assembly {
codehash := extcodehash(account)
}
return (codehash != accountHash && codehash != 0x0);
}
function sendValue(address payable recipient, uint256 amount) internal {
uint256 balance = address(this).balance;
if (balance < amount) {
revert InsufficientBalance(balance, amount);
}
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{value: amount}("");
if (!(success)) {
revert SendingValueFail();
}
}
function functionCall(
address target,
bytes memory data
) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
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"
);
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
uint256 balance = address(this).balance;
if (balance < value) {
revert InsufficientBalanceForCall(balance, value);
}
return _functionCallWithValue(target, data, value, errorMessage);
}
function _functionCallWithValue(
address target,
bytes memory data,
uint256 weiValue,
string memory errorMessage
) private returns (bytes memory) {
if (!(isContract(target))) {
revert NonContractCall();
}
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.call{value: weiValue}(
data
);
if (success) {
return returndata;
} else {
// 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
// solhint-disable-next-line no-inline-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
abstract contract EoaExecutorWithDataProvider {
/**
* @dev function to execute an action on an adapter used in an EOA.
* @param precedingAdapter Address of the preceding adapter.
* @param succeedingAdapter Address of the succeeding adapter.
* @param data inputs data.
* @return tokens to be refunded to user at the end of tx.
*/
function execute(
address precedingAdapter,
address succeedingAdapter,
bytes calldata data
) external payable virtual returns (address[] memory tokens);
}
abstract contract EoaExecutorWithoutDataProvider {
/**
* @dev function to execute an action on an adapter used in an EOA.
* @param data inputs data.
* @return tokens to be refunded to user at the end of tx.
*/
function execute(
bytes calldata data
) external payable virtual returns (address[] memory tokens);
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.18;
/**
* @title Errors library
* @author Router Intents Error
* @notice Defines the error messages emitted by the contracts on Router Intents
*/
library Errors {
string public constant ARRAY_LENGTH_MISMATCH = "1"; // 'Array lengths mismatch'
string public constant INSUFFICIENT_NATIVE_FUNDS_PASSED = "2"; // 'Insufficient native tokens passed'
string public constant WRONG_BATCH_PROVIDED = "3"; // 'The targetLength, valueLength, callTypeLength, funcLength do not match in executeBatch transaction functions in batch transaction contract'
string public constant INVALID_CALL_TYPE = "4"; // 'The callType value can only be 1 (call)' and 2(delegatecall)'
string public constant ONLY_NITRO = "5"; // 'Only nitro can call this function'
string public constant ONLY_SELF = "6"; // 'Only the current contract can call this function'
string public constant ADAPTER_NOT_WHITELISTED = "7"; // 'Adapter not whitelisted'
string public constant FEE_WALLET_NOT_WHITELISTED = "8"; // 'Adapter not whitelisted'
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
error ReentrantCall();
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
if (_status == _ENTERED) {
revert ReentrantCall();
}
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
import {IERC20} from "../interfaces/IERC20.sol";
import {Address} from "./Address.sol";
import {SafeMath} from "./SafeMath.sol";
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(
token,
abi.encodeWithSelector(token.transfer.selector, to, value)
);
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(
token,
abi.encodeWithSelector(token.transferFrom.selector, from, to, value)
);
}
/// @dev Edited so it always first approves 0 and then the value, because of non standard tokens
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
_callOptionalReturn(
token,
abi.encodeWithSelector(token.approve.selector, spender, 0)
);
_callOptionalReturn(
token,
abi.encodeWithSelector(token.approve.selector, spender, value)
);
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender).add(
value
);
_callOptionalReturn(
token,
abi.encodeWithSelector(
token.approve.selector,
spender,
newAllowance
)
);
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender).sub(
value,
"SafeERC20: decreased allowance below zero"
);
_callOptionalReturn(
token,
abi.encodeWithSelector(
token.approve.selector,
spender,
newAllowance
)
);
}
function _callOptionalReturn(IERC20 token, bytes memory data) private {
bytes memory returndata = address(token).functionCall(
data,
"SafeERC20: low-level call failed"
);
if (returndata.length > 0) {
// Return data is optional
// solhint-disable-next-line max-line-length
require(
abi.decode(returndata, (bool)),
"SafeERC20: operation failed"
);
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: mul overflow");
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
import {IBaseRegisterRouter} from "./Interface.sol";
contract BaseNameRegistryHelpers {
IBaseRegisterRouter public immutable registerModule;
constructor(address __registerModule) {
registerModule = IBaseRegisterRouter(
__registerModule
);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {IWETH} from "../../../interfaces/IWETH.sol";
interface IBaseRegisterRouter {
struct RegisterRequest {
/// @dev The name being registered.
string name;
/// @dev The address of the owner for the name.
address owner;
/// @dev The duration of the registration in seconds.
uint256 duration;
/// @dev The address of the resolver to set for this name.
address resolver;
/// @dev Multicallable data bytes for setting records in the associated resolver upon reigstration.
bytes[] data;
/// @dev Bool to decide whether to set this name as the "primary" name for the `owner`.
bool reverseRecord;
}
struct Register {
address _recipient;
uint256 _amount;
bytes registeryData;
}
function register(RegisterRequest calldata request) external payable;
function registerPrice(string memory name, uint256 duration) external view returns (uint256);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
interface IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
function totalSupply() external view returns (uint256 supply);
function balanceOf(address _owner) external view returns (uint256 balance);
function transfer(
address _to,
uint256 _value
) external returns (bool success);
function transferFrom(
address _from,
address _to,
uint256 _value
) external returns (bool success);
function approve(
address _spender,
uint256 _value
) external returns (bool success);
function allowance(
address _owner,
address _spender
) external view returns (uint256 remaining);
event Approval(
address indexed _owner,
address indexed _spender,
uint256 _value
);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
import {IERC20} from "../utils/SafeERC20.sol";
abstract contract IWETH {
function allowance(address, address) public view virtual returns (uint256);
function balanceOf(address) public view virtual returns (uint256);
function approve(address, uint256) public virtual;
function transfer(address, uint256) public virtual returns (bool);
function transferFrom(
address,
address,
uint256
) public virtual returns (bool);
function deposit() public payable virtual;
function withdraw(uint256) public virtual;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
library Address {
//insufficient balance
error InsufficientBalance(uint256 available, uint256 required);
//unable to send value, recipient may have reverted
error SendingValueFail();
//insufficient balance for call
error InsufficientBalanceForCall(uint256 available, uint256 required);
//call to non-contract
error NonContractCall();
function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codehash;
bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
// solhint-disable-next-line no-inline-assembly
assembly {
codehash := extcodehash(account)
}
return (codehash != accountHash && codehash != 0x0);
}
function sendValue(address payable recipient, uint256 amount) internal {
uint256 balance = address(this).balance;
if (balance < amount) {
revert InsufficientBalance(balance, amount);
}
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{value: amount}("");
if (!(success)) {
revert SendingValueFail();
}
}
function functionCall(
address target,
bytes memory data
) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
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"
);
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
uint256 balance = address(this).balance;
if (balance < value) {
revert InsufficientBalanceForCall(balance, value);
}
return _functionCallWithValue(target, data, value, errorMessage);
}
function _functionCallWithValue(
address target,
bytes memory data,
uint256 weiValue,
string memory errorMessage
) private returns (bytes memory) {
if (!(isContract(target))) {
revert NonContractCall();
}
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.call{value: weiValue}(
data
);
if (success) {
return returndata;
} else {
// 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
// solhint-disable-next-line no-inline-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
import {IERC20} from "../interfaces/IERC20.sol";
import {Address} from "./Address.sol";
import {SafeMath} from "./SafeMath.sol";
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(
token,
abi.encodeWithSelector(token.transfer.selector, to, value)
);
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(
token,
abi.encodeWithSelector(token.transferFrom.selector, from, to, value)
);
}
/// @dev Edited so it always first approves 0 and then the value, because of non standard tokens
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
_callOptionalReturn(
token,
abi.encodeWithSelector(token.approve.selector, spender, 0)
);
_callOptionalReturn(
token,
abi.encodeWithSelector(token.approve.selector, spender, value)
);
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender).add(
value
);
_callOptionalReturn(
token,
abi.encodeWithSelector(
token.approve.selector,
spender,
newAllowance
)
);
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender).sub(
value,
"SafeERC20: decreased allowance below zero"
);
_callOptionalReturn(
token,
abi.encodeWithSelector(
token.approve.selector,
spender,
newAllowance
)
);
}
function _callOptionalReturn(IERC20 token, bytes memory data) private {
bytes memory returndata = address(token).functionCall(
data,
"SafeERC20: low-level call failed"
);
if (returndata.length > 0) {
// Return data is optional
// solhint-disable-next-line max-line-length
require(
abi.decode(returndata, (bool)),
"SafeERC20: operation failed"
);
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: mul overflow");
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
}{
"optimizer": {
"enabled": true,
"runs": 1000000
},
"viaIR": true,
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"metadata": {
"useLiteralContent": true
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"__native","type":"address"},{"internalType":"address","name":"__wnative","type":"address"},{"internalType":"address","name":"__baseRegistry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ReentrantCall","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"adapterName","type":"string"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"ExecutionEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"OperationFailedRefundEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"refundAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"UnsupportedOperation","type":"event"},{"inputs":[],"name":"adapterDataProvider","outputs":[{"internalType":"contract AdapterDataProvider","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"execute","outputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"precedingContract","type":"address"}],"name":"isAuthorizedPrecedingContract","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"succeedingContract","type":"address"}],"name":"isAuthorizedSucceedingContract","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"isValidInboundAsset","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"isValidOutboundAsset","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"native","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"parseInputs","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"bytes[]","name":"data","type":"bytes[]"},{"internalType":"bool","name":"reverseRecord","type":"bool"}],"internalType":"struct IBaseRegisterRouter.RegisterRequest","name":"","type":"tuple"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"parseInputsRegistry","outputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"},{"internalType":"bytes[]","name":"","type":"bytes[]"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"registerModule","outputs":[{"internalType":"contract IBaseRegisterRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"self","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wnative","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
610120346100ef57601f6112af38819003918201601f19168301916001600160401b038311848410176100f4578084926060946040528339810103126100ef576100488161010a565b90610061604061005a6020840161010a565b920161010a565b9160016000553060805260a05260c052600060e0526101009060018060a01b03168152604051611190918261011f833960805182818161060e0152610810015260a0518281816107580152610975015260c051826106ea015260e051828181610143015281816103b6015281816104770152818161058b015261067c01525181818161021b01526108770152f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036100ef5756fe60406080815260049081361015610020575b5050361561001e57600080fd5b005b600090813560e01c806306fdde0314610c0257806309c5eabe1461077c57806311b0b42d1461070e5780632cebdeb2146106a05780636af563e9146106325780637104ddb2146105c45780637e954a71146105035780639093410d146104b057806397555947146103ef578063abe667191461032e578063c64a252e1461023f578063e0f0da85146101d15763e34305b1146100bc5750610011565b346101cd57602092837ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c957803573ffffffffffffffffffffffffffffffffffffffff918282168092036101c5579060248692855194859384927fe34305b10000000000000000000000000000000000000000000000000000000084528301527f0000000000000000000000000000000000000000000000000000000000000000165afa9283156101ba57809361017d575b5050519015158152f35b909192508382813d83116101b3575b6101968183610d1d565b810103126101b057506101a890610ef3565b903880610173565b80fd5b503d61018c565b8251903d90823e3d90fd5b8480fd5b8280fd5b5080fd5b50346101cd57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cd576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b5090346101b05761024f36610dd4565b805181019060c081602084019303126101c95760208101519167ffffffffffffffff928381116101c55781602061028892850101610f91565b93610294868401610f39565b916060840151946102a760808601610f39565b9260a08601519182116101b05750916102da60c06102d36102ee9a9694602089976103229a0101610fab565b9401610ef3565b95845198899860c08a5260c08a0190610c73565b9473ffffffffffffffffffffffffffffffffffffffff80941660208a01528801521660608601528482036080860152610e31565b90151560a08301520390f35b50346101cd57602092837ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c957803573ffffffffffffffffffffffffffffffffffffffff918282168092036101c5579060248692855194859384927fabe667190000000000000000000000000000000000000000000000000000000084528301527f0000000000000000000000000000000000000000000000000000000000000000165afa9283156101ba57809361017d575050519015158152f35b50346101cd57602092837ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c957803573ffffffffffffffffffffffffffffffffffffffff918282168092036101c5579060248692855194859384927f975559470000000000000000000000000000000000000000000000000000000084528301527f0000000000000000000000000000000000000000000000000000000000000000165afa9283156101ba57809361017d575050519015158152f35b50346101cd5773ffffffffffffffffffffffffffffffffffffffff906104ff60606104e26104dd36610dd4565b611040565b855196909216865260208601529284015282916060830190610e86565b0390f35b50346101cd57602092837ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c957803573ffffffffffffffffffffffffffffffffffffffff918282168092036101c5579060248692855194859384927f7e954a710000000000000000000000000000000000000000000000000000000084528301527f0000000000000000000000000000000000000000000000000000000000000000165afa9283156101ba57809361017d575050519015158152f35b50346101cd57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cd576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346101cd57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cd576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346101cd57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cd576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346101cd57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cd576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50906020807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cd5783359067ffffffffffffffff928383116101b057366023840112156101b05782860135928484116101cd57602493368582840101116101c9576107f3916104dd9186369201610d98565b909573ffffffffffffffffffffffffffffffffffffffff929187307f0000000000000000000000000000000000000000000000000000000000000000861603610bf55750885161084281610d01565b600181527f320000000000000000000000000000000000000000000000000000000000000087820152883403610bb757505b837f0000000000000000000000000000000000000000000000000000000000000000168151878b8d818601516108da835195869485947fe72c1e550000000000000000000000000000000000000000000000000000000086528501526044840190610c73565b908d8301520381855afa908115610bad578791610b80575b50808a10610aff57813b15610afb578691888a928e6109418f51978896879586947fc7c79676000000000000000000000000000000000000000000000000000000008652850152830190610e86565b03925af18015610af157610ab3575b5087519561095d87610d01565b6001998a88528688019887368b37885115610a8857857f0000000000000000000000000000000000000000000000000000000000000000168a52858b519516888601528a8501528a606085015260608452608084019284841090841117610a5c5750508798969895949395527f747c4bdbdc67811d44a02055ff9315a921247b8ba675158870da5dd871caf329610a21610a0a6109f8610f00565b868b5192828480945193849201610c50565b810103902092895191829187835287830190610c73565b0390a2855195828701938388525180945286019693905b838210610a455786880387f35b845181168852968201969382019390850190610a38565b6041907f4e487b7100000000000000000000000000000000000000000000000000000000600052526000fd5b50603286917f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b818195929511610ac65788529238610950565b868260418c7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b89513d87823e3d90fd5b8680fd5b60848c60278b8b8f51937f08c379a00000000000000000000000000000000000000000000000000000000085528401528201527f616d6f756e7420737570706c696564206973206c6573736572207468616e207260448201527f65717569726564000000000000000000000000000000000000000000000000006064820152fd5b90508781813d8311610ba6575b610b978183610d1d565b81010312610afb5751386108f2565b503d610b8d565b8b513d89823e3d90fd5b8a610bf188928a8d519485947f08c379a0000000000000000000000000000000000000000000000000000000008652850152830190610c73565b0390fd5b1961087457479750610874565b50346101cd57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cd576104ff90610c3d610f00565b9051918291602083526020830190610c73565b60005b838110610c635750506000910152565b8181015183820152602001610c53565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093610caf81518092818752878088019101610c50565b0116010190565b60c0810190811067ffffffffffffffff821117610cd257604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff821117610cd257604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117610cd257604052565b67ffffffffffffffff8111610cd257601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b929192610da482610d5e565b91610db26040519384610d1d565b829481845281830111610dcf578281602093846000960137010152565b600080fd5b60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc820112610dcf576004359067ffffffffffffffff8211610dcf5780602383011215610dcf57816024610e2e93600401359101610d98565b90565b90815180825260208092019182818360051b85019501936000915b848310610e5c5750505050505090565b9091929394958480610e7683856001950387528a51610c73565b9801930193019194939290610e4c565b9060a080610ee8610ea0855160c0865260c0860190610c73565b73ffffffffffffffffffffffffffffffffffffffff80602088015116602087015260408701516040870152606087015116606086015260808601518582036080870152610e31565b930151151591015290565b51908115158203610dcf57565b60405190610f0d82610d01565b600c82527f42617365526567697374727900000000000000000000000000000000000000006020830152565b519073ffffffffffffffffffffffffffffffffffffffff82168203610dcf57565b90929192610f6781610d5e565b91610f756040519384610d1d565b829482845282820111610dcf576020610f8f930190610c50565b565b9080601f83011215610dcf578151610e2e92602001610f5a565b81601f82011215610dcf5780519067ffffffffffffffff92838311610cd2578260051b6040805195602095610fe287850189610d1d565b8752858088019386010194848611610dcf57868101935b86851061100b57505050505050505090565b8451838111610dcf57820186603f82011215610dcf57889161103588838886809601519101610f5a565b815201940193610ff9565b9060409081519261105084610cb6565b6060938481526000918260a0602093828582015282888201528289820152886080820152015280518101918083019187818503126101c557611093828201610f39565b9487820151988083015167ffffffffffffffff93848211611156579060c09101809703126101cd578851986110c78a610cb6565b848701518481116111565786866110e0928a0101610f91565b8a526110ed818801610f39565b858b015281870151908a015261110560808701610f39565b9089015260a08501519182116101b057509261114061114b9360c09373ffffffffffffffffffffffffffffffffffffffff9796840101610fab565b608088015201610ef3565b60a085015216929190565b8380fdfea26469706673582212204857d7d9c7897b1344e7fa4ae2f442b415b1928aaf39e46eb6b880730b2056cb64736f6c63430008120033000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee00000000000000000000000042000000000000000000000000000000000000060000000000000000000000004ccb0bb02fcaba27e82a56646e81d8c5bc4119a5
Deployed Bytecode
0x60406080815260049081361015610020575b5050361561001e57600080fd5b005b600090813560e01c806306fdde0314610c0257806309c5eabe1461077c57806311b0b42d1461070e5780632cebdeb2146106a05780636af563e9146106325780637104ddb2146105c45780637e954a71146105035780639093410d146104b057806397555947146103ef578063abe667191461032e578063c64a252e1461023f578063e0f0da85146101d15763e34305b1146100bc5750610011565b346101cd57602092837ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c957803573ffffffffffffffffffffffffffffffffffffffff918282168092036101c5579060248692855194859384927fe34305b10000000000000000000000000000000000000000000000000000000084528301527f0000000000000000000000000000000000000000000000000000000000000000165afa9283156101ba57809361017d575b5050519015158152f35b909192508382813d83116101b3575b6101968183610d1d565b810103126101b057506101a890610ef3565b903880610173565b80fd5b503d61018c565b8251903d90823e3d90fd5b8480fd5b8280fd5b5080fd5b50346101cd57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cd576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004ccb0bb02fcaba27e82a56646e81d8c5bc4119a5168152f35b5090346101b05761024f36610dd4565b805181019060c081602084019303126101c95760208101519167ffffffffffffffff928381116101c55781602061028892850101610f91565b93610294868401610f39565b916060840151946102a760808601610f39565b9260a08601519182116101b05750916102da60c06102d36102ee9a9694602089976103229a0101610fab565b9401610ef3565b95845198899860c08a5260c08a0190610c73565b9473ffffffffffffffffffffffffffffffffffffffff80941660208a01528801521660608601528482036080860152610e31565b90151560a08301520390f35b50346101cd57602092837ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c957803573ffffffffffffffffffffffffffffffffffffffff918282168092036101c5579060248692855194859384927fabe667190000000000000000000000000000000000000000000000000000000084528301527f0000000000000000000000000000000000000000000000000000000000000000165afa9283156101ba57809361017d575050519015158152f35b50346101cd57602092837ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c957803573ffffffffffffffffffffffffffffffffffffffff918282168092036101c5579060248692855194859384927f975559470000000000000000000000000000000000000000000000000000000084528301527f0000000000000000000000000000000000000000000000000000000000000000165afa9283156101ba57809361017d575050519015158152f35b50346101cd5773ffffffffffffffffffffffffffffffffffffffff906104ff60606104e26104dd36610dd4565b611040565b855196909216865260208601529284015282916060830190610e86565b0390f35b50346101cd57602092837ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101c957803573ffffffffffffffffffffffffffffffffffffffff918282168092036101c5579060248692855194859384927f7e954a710000000000000000000000000000000000000000000000000000000084528301527f0000000000000000000000000000000000000000000000000000000000000000165afa9283156101ba57809361017d575050519015158152f35b50346101cd57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cd576020905173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000406a8d90ed2d12a7ed09b5cad9cb57c6015d3bf1168152f35b50346101cd57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cd576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346101cd57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cd576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004200000000000000000000000000000000000006168152f35b50346101cd57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cd576020905173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee168152f35b50906020807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cd5783359067ffffffffffffffff928383116101b057366023840112156101b05782860135928484116101cd57602493368582840101116101c9576107f3916104dd9186369201610d98565b909573ffffffffffffffffffffffffffffffffffffffff929187307f000000000000000000000000406a8d90ed2d12a7ed09b5cad9cb57c6015d3bf1861603610bf55750885161084281610d01565b600181527f320000000000000000000000000000000000000000000000000000000000000087820152883403610bb757505b837f0000000000000000000000004ccb0bb02fcaba27e82a56646e81d8c5bc4119a5168151878b8d818601516108da835195869485947fe72c1e550000000000000000000000000000000000000000000000000000000086528501526044840190610c73565b908d8301520381855afa908115610bad578791610b80575b50808a10610aff57813b15610afb578691888a928e6109418f51978896879586947fc7c79676000000000000000000000000000000000000000000000000000000008652850152830190610e86565b03925af18015610af157610ab3575b5087519561095d87610d01565b6001998a88528688019887368b37885115610a8857857f000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee168a52858b519516888601528a8501528a606085015260608452608084019284841090841117610a5c5750508798969895949395527f747c4bdbdc67811d44a02055ff9315a921247b8ba675158870da5dd871caf329610a21610a0a6109f8610f00565b868b5192828480945193849201610c50565b810103902092895191829187835287830190610c73565b0390a2855195828701938388525180945286019693905b838210610a455786880387f35b845181168852968201969382019390850190610a38565b6041907f4e487b7100000000000000000000000000000000000000000000000000000000600052526000fd5b50603286917f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b818195929511610ac65788529238610950565b868260418c7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b89513d87823e3d90fd5b8680fd5b60848c60278b8b8f51937f08c379a00000000000000000000000000000000000000000000000000000000085528401528201527f616d6f756e7420737570706c696564206973206c6573736572207468616e207260448201527f65717569726564000000000000000000000000000000000000000000000000006064820152fd5b90508781813d8311610ba6575b610b978183610d1d565b81010312610afb5751386108f2565b503d610b8d565b8b513d89823e3d90fd5b8a610bf188928a8d519485947f08c379a0000000000000000000000000000000000000000000000000000000008652850152830190610c73565b0390fd5b1961087457479750610874565b50346101cd57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101cd576104ff90610c3d610f00565b9051918291602083526020830190610c73565b60005b838110610c635750506000910152565b8181015183820152602001610c53565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093610caf81518092818752878088019101610c50565b0116010190565b60c0810190811067ffffffffffffffff821117610cd257604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff821117610cd257604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117610cd257604052565b67ffffffffffffffff8111610cd257601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b929192610da482610d5e565b91610db26040519384610d1d565b829481845281830111610dcf578281602093846000960137010152565b600080fd5b60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc820112610dcf576004359067ffffffffffffffff8211610dcf5780602383011215610dcf57816024610e2e93600401359101610d98565b90565b90815180825260208092019182818360051b85019501936000915b848310610e5c5750505050505090565b9091929394958480610e7683856001950387528a51610c73565b9801930193019194939290610e4c565b9060a080610ee8610ea0855160c0865260c0860190610c73565b73ffffffffffffffffffffffffffffffffffffffff80602088015116602087015260408701516040870152606087015116606086015260808601518582036080870152610e31565b930151151591015290565b51908115158203610dcf57565b60405190610f0d82610d01565b600c82527f42617365526567697374727900000000000000000000000000000000000000006020830152565b519073ffffffffffffffffffffffffffffffffffffffff82168203610dcf57565b90929192610f6781610d5e565b91610f756040519384610d1d565b829482845282820111610dcf576020610f8f930190610c50565b565b9080601f83011215610dcf578151610e2e92602001610f5a565b81601f82011215610dcf5780519067ffffffffffffffff92838311610cd2578260051b6040805195602095610fe287850189610d1d565b8752858088019386010194848611610dcf57868101935b86851061100b57505050505050505090565b8451838111610dcf57820186603f82011215610dcf57889161103588838886809601519101610f5a565b815201940193610ff9565b9060409081519261105084610cb6565b6060938481526000918260a0602093828582015282888201528289820152886080820152015280518101918083019187818503126101c557611093828201610f39565b9487820151988083015167ffffffffffffffff93848211611156579060c09101809703126101cd578851986110c78a610cb6565b848701518481116111565786866110e0928a0101610f91565b8a526110ed818801610f39565b858b015281870151908a015261110560808701610f39565b9089015260a08501519182116101b057509261114061114b9360c09373ffffffffffffffffffffffffffffffffffffffff9796840101610fab565b608088015201610ef3565b60a085015216929190565b8380fdfea26469706673582212204857d7d9c7897b1344e7fa4ae2f442b415b1928aaf39e46eb6b880730b2056cb64736f6c63430008120033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee00000000000000000000000042000000000000000000000000000000000000060000000000000000000000004ccb0bb02fcaba27e82a56646e81d8c5bc4119a5
-----Decoded View---------------
Arg [0] : __native (address): 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
Arg [1] : __wnative (address): 0x4200000000000000000000000000000000000006
Arg [2] : __baseRegistry (address): 0x4cCb0BB02FCABA27e82a56646E81d8c5bC4119a5
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
Arg [1] : 0000000000000000000000004200000000000000000000000000000000000006
Arg [2] : 0000000000000000000000004ccb0bb02fcaba27e82a56646e81d8c5bc4119a5
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.