Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 12 from a total of 12 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Create Bond | 17366031 | 427 days ago | IN | 0 ETH | 0.01670603 | ||||
Create Bond | 17216370 | 448 days ago | IN | 0 ETH | 0.05607772 | ||||
Create Bond | 17144894 | 458 days ago | IN | 0 ETH | 0.01478841 | ||||
Add Implementati... | 17144864 | 458 days ago | IN | 0 ETH | 0.00189728 | ||||
Add Implementati... | 17144858 | 458 days ago | IN | 0 ETH | 0.00194169 | ||||
Add New Implemen... | 17144757 | 458 days ago | IN | 0 ETH | 0.00195092 | ||||
Create Bond | 16900788 | 492 days ago | IN | 0 ETH | 0.00784389 | ||||
Add New Implemen... | 16900743 | 492 days ago | IN | 0 ETH | 0.00117707 | ||||
Create Bond | 16882375 | 495 days ago | IN | 0 ETH | 0.00566889 | ||||
Add New Implemen... | 16872150 | 496 days ago | IN | 0 ETH | 0.00123161 | ||||
Update Registry ... | 16872149 | 496 days ago | IN | 0 ETH | 0.00081688 | ||||
0x60803462 | 16872148 | 496 days ago | IN | 0 ETH | 0.02752304 |
Latest 5 internal transactions
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
17366031 | 427 days ago | Contract Creation | 0 ETH | |||
17216370 | 448 days ago | Contract Creation | 0 ETH | |||
17144894 | 458 days ago | Contract Creation | 0 ETH | |||
16900788 | 492 days ago | Contract Creation | 0 ETH | |||
16882375 | 495 days ago | Contract Creation | 0 ETH |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
BondSwapFactory
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED // Created by DegenLabs https://bondswap.org pragma solidity ^0.8.15; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "./interfaces/IBonds.sol"; import "./interfaces/IRegistry.sol"; contract BondSwapFactory is Ownable, Pausable, ReentrancyGuard { using SafeERC20 for IERC20; // ===== STATE VARIABLES ===== address public registry; uint256 public protocolFee; // 5 digit representation of 100%, 5000 = 50%, 700 = 7%, 50 = 0.5% etc address public protocolFeeAddress; string public baseURI = "https://bondswap.org/bonds/"; mapping(uint256 => address) public bondsImplVer; // versions of Bonds implementation contracts mapping(address => bool) public bondsImplVerBlacklist; // blacklisted implementations uint256 currentMaxImplVer; // ===== EVENTS ===== event BaseUriChanged(string newURI); event FeeChanged(uint256 newFee); event FeeAddressChanged(address newFeeAddress); event RegistryChanged(address newRegistryAddress); event FactoryMigrated(address newFactoryAddress); event NewImplementationAdded(address newImplementationContract, uint256 version); event ImplementationBlacklisted(address implementationBlacklisted); event ImplementationRemovedFromBlacklist(address implementationBlacklisted); constructor(uint256 _protocolFee, address _protocolFeeAddress) { protocolFee = _protocolFee; protocolFeeAddress = _protocolFeeAddress; } function createBond(BondInit.BondCreationSettings memory _settings) external whenNotPaused nonReentrant { address implAddr = bondsImplVer[_settings.bondContractVersion]; require(implAddr != address(0), "Factory:VERSION_NOT_FOUND"); require(bondsImplVerBlacklist[implAddr] == false, "Factory:VERSION_BLACKLISTED"); require(_settings.bondToken != address(0), "Factory:BOND_TOKEN_ZERO_ADDR"); require(_settings.bondCreator != address(0), "Factory:CREATOR_ZERO_ADDR"); uint256 symbolNumber = IRegistry(registry).symbolNumber(); uint8 decimals; try IERC20Metadata(_settings.bondToken).decimals() returns (uint8 v) { if (v > 64) { revert("Factory:DECIMALS_TOO_HIGH"); } decimals = v; } catch { revert("Factory:DECIMALS_ERROR"); } BondInit.BondContractConfig memory _conf = BondInit.BondContractConfig({ uri: baseURI, protocolFee: protocolFee, protocolFeeAddress: protocolFeeAddress, bondToken: _settings.bondToken, bondContractVersion: _settings.bondContractVersion, bondCreator: _settings.bondCreator, bondSymbolNumber: symbolNumber, bondTokenDecimals: decimals }); address newBond = clone(implAddr); IBonds(newBond).initialize(_conf); IRegistry(registry).register( _settings.bondToken, _settings.bondContractVersion, _settings.bondCreator, newBond, new bytes(0) // use abi.encode to encode params ); } function clone(address implementation) internal returns (address instance) { assembly { let ptr := mload(0x40) mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(ptr, 0x14), shl(0x60, implementation)) mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000) instance := create(0, ptr, 0x37) } require(instance != address(0), "Factory:CREATE_FAILED"); } // ======= OWNER SECTION ====== function recoverERC20(address tokenAddress, uint256 tokenAmount) external onlyOwner { IERC20(tokenAddress).safeTransfer(msg.sender, tokenAmount); } function recoverETH() external onlyOwner { (bool success, ) = payable(msg.sender).call{ value: address(this).balance }(""); require(success); } function updateProtocolFee(uint256 _protocolFee) external onlyOwner { require(_protocolFee < 10_000, "Factory:INVALID_FEE"); protocolFee = _protocolFee; emit FeeChanged(_protocolFee); } function updateProtocolFeeAddress(address _protocolFeeAddress) external onlyOwner { require(_protocolFeeAddress != address(0), "Factory:INVALID_ADDR"); protocolFeeAddress = _protocolFeeAddress; emit FeeAddressChanged(_protocolFeeAddress); } function updateRegistryAddress(address _registryAddress) external onlyOwner { require(_registryAddress != address(0), "Factory:INVALID_ADDR"); registry = _registryAddress; emit RegistryChanged(_registryAddress); } function migrateFactory(address _factory) external onlyOwner { require(_factory != address(0), "Factory:INVALID_ADDR"); _pause(); emit FactoryMigrated(_factory); } function updateBondImgURI(string memory _uri) external onlyOwner { baseURI = _uri; emit BaseUriChanged(_uri); } function addNewImplementation(address _newImpl) external onlyOwner { require(_newImpl != address(0), "Factory:INVALID_ADDR"); bondsImplVer[currentMaxImplVer] = _newImpl; emit NewImplementationAdded(_newImpl, currentMaxImplVer); currentMaxImplVer++; } function addImplementationToBlacklist(uint256 _implVer) external onlyOwner { require(bondsImplVer[_implVer] != address(0), "Factory:INVALID_ADDR"); address implAddr = bondsImplVer[_implVer]; bondsImplVerBlacklist[implAddr] = true; emit ImplementationBlacklisted(implAddr); } function removeImplementationFromBlacklist(uint256 _implVer) external onlyOwner { require(bondsImplVer[_implVer] != address(0), "Factory:INVALID_ADDR"); address implAddr = bondsImplVer[_implVer]; bondsImplVerBlacklist[implAddr] = false; emit ImplementationRemovedFromBlacklist(implAddr); } function pause() external onlyOwner { _pause(); } function unpause() external onlyOwner { _unpause(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ 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; 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 making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // 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 // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; 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 Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: UNLICENSED // Created by DegenLabs https://bondswap.org pragma solidity ^0.8.15; import "../libs/BondInit.sol"; interface IBonds { function initialize(BondInit.BondContractConfig memory _conf) external; }
// SPDX-License-Identifier: UNLICENSED // Created by DegenLabs https://bondswap.org pragma solidity ^0.8.15; interface IRegistry { function register( address _token, uint256 _version, address _creator, address _bondContract, bytes calldata _optionalData ) external; function symbolNumber() external returns (uint256); }
// SPDX-License-Identifier: UNLICENSED // Created by DegenLabs https://bondswap.org pragma solidity ^0.8.15; library BondInit { // BondContractConfig used as input in creating bonds contract proxy struct BondContractConfig { string uri; uint256 protocolFee; // 5 digit representation, 5000 = 50%, 700 = 7%, 50 = 0.5% etc address protocolFeeAddress; // protocol fee address address bondToken; // token that we buy bonds for uint8 bondTokenDecimals; // decimals for this token uint256 bondContractVersion; // implementation contract version address bondCreator; // address that created bonds/have permission to create new bond classes uint256 bondSymbolNumber; // used in ERC721 bond symbol } enum LpTokenType { NO_LP_TOKEN, UNISWAP_LP } // BondCreationSettings used as user input in BondsFactory struct BondCreationSettings { address bondToken; // token that we buy bonds for uint256 bondContractVersion; // implementation contract version address bondCreator; // address that created bonds/have permission to create new bond classes } }
{ "optimizer": { "enabled": true, "runs": 200 }, "viaIR": true, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"_protocolFee","type":"uint256"},{"internalType":"address","name":"_protocolFeeAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"newURI","type":"string"}],"name":"BaseUriChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newFactoryAddress","type":"address"}],"name":"FactoryMigrated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newFeeAddress","type":"address"}],"name":"FeeAddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"FeeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"implementationBlacklisted","type":"address"}],"name":"ImplementationBlacklisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"implementationBlacklisted","type":"address"}],"name":"ImplementationRemovedFromBlacklist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newImplementationContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"version","type":"uint256"}],"name":"NewImplementationAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newRegistryAddress","type":"address"}],"name":"RegistryChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"uint256","name":"_implVer","type":"uint256"}],"name":"addImplementationToBlacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newImpl","type":"address"}],"name":"addNewImplementation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"bondsImplVer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"bondsImplVerBlacklist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"bondToken","type":"address"},{"internalType":"uint256","name":"bondContractVersion","type":"uint256"},{"internalType":"address","name":"bondCreator","type":"address"}],"internalType":"struct BondInit.BondCreationSettings","name":"_settings","type":"tuple"}],"name":"createBond","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_factory","type":"address"}],"name":"migrateFactory","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protocolFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protocolFeeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"recoverETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"registry","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_implVer","type":"uint256"}],"name":"removeImplementationFromBlacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"updateBondImgURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_protocolFee","type":"uint256"}],"name":"updateProtocolFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_protocolFeeAddress","type":"address"}],"name":"updateProtocolFeeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_registryAddress","type":"address"}],"name":"updateRegistryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080346200016657601f62001b2438819003918201601f19168301916001600160401b038311848410176200016b578084926040948552833981010312620001665780516020909101516001600160a01b03918282169182900362000166576000805460405194339082167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08480a36001600160a81b0319163360ff60a01b19161781556001808055600554909181831c91831680156200015b575b60208310146200014757601f82116200011a575b50507f68747470733a2f2f626f6e64737761702e6f72672f626f6e64732f000000003660055550600355600480546001600160a01b0319169190911790556119a29081620001828239f35b60058152601f60208220920160051c8201915b8281106200013c5750620000cf565b81815583016200012d565b634e487b7160e01b81526022600452602490fd5b91607f1691620000bb565b600080fd5b634e487b7160e01b600052604160045260246000fdfe60806040526004361015610013575b600080fd5b60003560e01c80630614117a146101df57806313498b63146101d657806314ce31b8146101cd578063238aa5a3146101c457806323ef3491146101bb57806325b772de146101b2578063308efad5146101a95780633f4ba83a146101a05780634256dd78146101975780634cb6995a1461018e5780635c975abb146101855780636c0360eb1461017c578063715018a6146101735780637b1039991461016a5780638456cb59146101615780638980f11f146101585780638da5cb5b1461014f578063a2dcc2d014610146578063b0e21e8a1461013d578063c57a882514610134578063c62bc0ca1461012b578063cce516b7146101225763f2fde38b1461011a57600080fd5b61000e6111dc565b5061000e6111b2565b5061000e611107565b5061000e611093565b5061000e611074565b5061000e61103f565b5061000e611015565b5061000e610f3e565b5061000e610edb565b5061000e610eb1565b5061000e610e55565b5061000e610d84565b5061000e610c23565b5061000e610baf565b5061000e610b1c565b5061000e610a7f565b5061000e6109d7565b5061000e61094b565b5061000e61087e565b5061000e61083e565b5061000e6107c8565b5061000e610309565b5061000e6101f3565b600091031261000e57565b503461000e576000806003193601126102275761020e6112a0565b8080808047335af161021e6116a3565b50156102275780f35b80fd5b50634e487b7160e01b600052604160045260246000fd5b6060810190811067ffffffffffffffff82111761025d57604052565b61026561022a565b604052565b67ffffffffffffffff811161025d57604052565b6040810190811067ffffffffffffffff82111761025d57604052565b90601f8019910116810190811067ffffffffffffffff82111761025d57604052565b60405190610100820182811067ffffffffffffffff82111761025d57604052565b600435906001600160a01b038216820361000e57565b604435906001600160a01b038216820361000e57565b503461000e57606036600319011261000e576040805161032881610241565b6103306102dd565b815260209182820160243581526103456102f3565b828401908152610353611550565b60026001541461075957600260015561038761037a83516000526006602052604060002090565b546001600160a01b031690565b936001600160a01b039261039e84871615156112f8565b6001600160a01b0386166000908152600760205260409020546103c49060ff1615611344565b81516103eb906103e4906001600160a01b03165b6001600160a01b031690565b1515611390565b825161040a90610403906001600160a01b03166103d8565b15156113dc565b600254610421906103d8906001600160a01b031681565b93855197633c7c182160e21b8952600497818a8a816000809b5af1998a1561074c575b879a61071d575b50845189908390610466906103d8906001600160a01b031681565b8a5163313ce56760e01b815292839182905afa8891816106ee575b506104ce57885162461bcd60e51b81526020818c01818152601691810191909152752330b1ba37b93c9d2222a1a4a6a0a629afa2a92927a960511b604082015281906060010390fd5b0390fd5b8860ff829b95969798999b16116106a35790899a610588858a6105738d9e9d6105698c6105598f6105929b946105316105216105136003549b5460018060a01b031690565b93516001600160a01b031690565b945198516001600160a01b031690565b9861053a6102bc565b9e8f610544610c84565b815201526001600160a01b03909116908d0152565b6001600160a01b031660608b0152565b60ff166080890152565b60a08701526001600160a01b031660c0860152565b60e0840152611597565b928316803b1561067f578851631fd2937b60e31b815291889183918290849082906105bf9089830161145d565b03925af18015610696575b610683575b5060025461060d906105fd906105ef906103d8906001600160a01b031681565b95516001600160a01b031690565b935195516001600160a01b031690565b966106166114e0565b853b1561067f57879361063c9251998a988997889663290e431760e21b88528701611517565b03925af18015610672575b610659575b5061065660018055565b80f35b8061066661066c9261026a565b806101e8565b3861064c565b61067a611437565b610647565b8780fd5b806106666106909261026a565b386105cf565b61069e611437565b6105ca565b885162461bcd60e51b815260208186018181526019918101919091527f466163746f72793a444543494d414c535f544f4f5f4849474800000000000000604082015281906060010390fd5b61070f919250843d8611610716575b610707818361029a565b810190611444565b9038610481565b503d6106fd565b61073e919a50823d8411610745575b610736818361029a565b810190611428565b983861044b565b503d61072c565b610754611437565b610444565b825162461bcd60e51b815260048101869052601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b60209067ffffffffffffffff81116107bb575b601f01601f19160190565b6107c361022a565b6107b0565b503461000e57602036600319011261000e5760043567ffffffffffffffff811161000e573660238201121561000e5780600401356108058161079d565b90610813604051928361029a565b808252366024828501011161000e57602081600092602461083c960183860137830101526117a7565b005b503461000e57602036600319011261000e576001600160a01b036108606102dd565b166000526007602052602060ff604060002054166040519015158152f35b503461000e57602036600319011261000e576108986102dd565b6108a06112a0565b6108b46001600160a01b0382161515611764565b600854600090815260066020526040812080546001600160a01b0319166001600160a01b03841617905590600854604080516001600160a01b0390931683526020830182905290917fc037ef175078cb9682204e7fa0751474b9d7739100401a817e87d2bc82d222cd91819081010390a160001981146109375760010160085580f35b634e487b7160e01b82526011600452602482fd5b503461000e57602036600319011261000e576004356109686112a0565b7f82d17939c5f046f1c38691d5fb42e31e9f75f983d128c63c2ce73793b2f2a90e60206000928084526006825260018060a01b03906109ae826040872054161515611764565b845260068252604084205416808452600782526040842060ff198154169055604051908152a180f35b503461000e57602036600319011261000e577fdc152171996ab31ea044d1f083998178a0515971a850651a133f8d13027bb2776020610a146102dd565b610a1c6112a0565b6001600160a01b0316610a30811515611764565b610a38611550565b6000805460ff60a01b1916600160a01b1790556040513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258908390a1604051908152a1005b503461000e5760008060031936011261022757610a9a6112a0565b805460ff8160a01c1615610ae05760ff60a01b191681556040513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa90602090a180f35b60405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606490fd5b503461000e57602036600319011261000e57600435610b396112a0565b612710811015610b74576020817f6bbc57480a46553fa4d156ce702beef5f3ad66303b0ed1a5d4cb44966c6584c392600355604051908152a1005b60405162461bcd60e51b8152602060048201526013602482015272466163746f72793a494e56414c49445f46454560681b6044820152606490fd5b503461000e57602036600319011261000e577fd1e93c69f2847f79bfa4d71704aaa84a581729b4b1706d922ee42ba1848a45c96020610bec6102dd565b610bf46112a0565b6001600160a01b0316610c08811515611764565b600480546001600160a01b03191682179055604051908152a1005b503461000e57600036600319011261000e57602060ff60005460a01c166040519015158152f35b90600182811c92168015610c7a575b6020831014610c6457565b634e487b7160e01b600052602260045260246000fd5b91607f1691610c59565b6040519060008260055491610c9883610c4a565b80835292600190818116908115610d0e5750600114610cc1575b50610cbf9250038361029a565b565b60056000908152915060008051602061194d8339815191525b848310610cf35750610cbf935050810160200138610cb2565b81935090816020925483858a01015201910190918592610cda565b905060209250610cbf94915060ff191682840152151560051b82010138610cb2565b919082519283825260005b848110610d5c575050826000602080949584010152601f8019910116010190565b602081830181015184830182015201610d3b565b906020610d81928181520190610d30565b90565b503461000e57600080600319360112610227576040519080600554610da881610c4a565b80855291600191808316908115610e2b5750600114610de2575b610dde85610dd28187038261029a565b60405191829182610d70565b0390f35b92506005835260008051602061194d8339815191525b828410610e13575050508101602001610dd282610dde610dc2565b80546020858701810191909152909301928101610df8565b869550610dde96935060209250610dd294915060ff191682840152151560051b8201019293610dc2565b503461000e5760008060031936011261022757610e706112a0565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461000e57600036600319011261000e576002546040516001600160a01b039091168152602090f35b503461000e5760008060031936011261022757610ef66112a0565b610efe611550565b805460ff60a01b1916600160a01b1781556040513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25890602090a180f35b503461000e57604036600319011261000e57610ff2610f5b6102dd565b610f636112a0565b60405163a9059cbb60e01b602082019081523360248084019190915235604480840191909152825290916001600160a01b0316906000908190610fa760648661029a565b60405194610fb48661027e565b602086527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65646020870152519082855af1610fec6116a3565b916116d3565b805180610ffb57005b816020806110109361083c950101910161162c565b611644565b503461000e57600036600319011261000e576000546040516001600160a01b039091168152602090f35b503461000e57602036600319011261000e576004356000526006602052602060018060a01b0360406000205416604051908152f35b503461000e57600036600319011261000e576020600354604051908152f35b503461000e57602036600319011261000e577fdb0239c63d4033dcdd21bd44f8dd479a03efbae12f6bbe27c0a5f923d26514cc60206110d06102dd565b6110d86112a0565b6001600160a01b03166110ec811515611764565b600280546001600160a01b03191682179055604051908152a1005b503461000e57602036600319011261000e576004356111246112a0565b7f20395e2a325eeb7f6e57d3b5779c4ce1091382e7dcd154240cf097c82e9153ce6111ac600092808452600660205260018060a01b039061116c826040872054161515611764565b8452600660209081526040808620549290921680865260078252828620805460ff1916600117905591516001600160a01b03909216825290918291820190565b0390a180f35b503461000e57600036600319011261000e576004546040516001600160a01b039091168152602090f35b503461000e57602036600319011261000e576111f66102dd565b6111fe6112a0565b6001600160a01b03908116801561124c57600080546001600160a01b03198116831782559092167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b6000546001600160a01b031633036112b457565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b156112ff57565b60405162461bcd60e51b815260206004820152601960248201527f466163746f72793a56455253494f4e5f4e4f545f464f554e44000000000000006044820152606490fd5b1561134b57565b60405162461bcd60e51b815260206004820152601b60248201527f466163746f72793a56455253494f4e5f424c41434b4c495354454400000000006044820152606490fd5b1561139757565b60405162461bcd60e51b815260206004820152601c60248201527f466163746f72793a424f4e445f544f4b454e5f5a45524f5f41444452000000006044820152606490fd5b156113e357565b60405162461bcd60e51b815260206004820152601960248201527f466163746f72793a43524541544f525f5a45524f5f41444452000000000000006044820152606490fd5b9081602091031261000e575190565b506040513d6000823e3d90fd5b9081602091031261000e575160ff8116810361000e5790565b60208152815160e061147d61010092836020860152610120850190610d30565b936020810151604085015260018060a01b0380604083015116606086015260608201511660808501526114ba608082015160a086019060ff169052565b60a081015160c0858101919091528101516001600160a01b031682850152015191015290565b6040516020810181811067ffffffffffffffff82111761150a575b60405260008152906000368137565b61151261022a565b6114fb565b6001600160a01b039182168152602081019290925291821660408201529116606082015260a060808201819052610d8192910190610d30565b60ff60005460a01c1661155f57565b60405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606490fd5b604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b815260609190911b60148201526e5af43d82803e903d91602b57fd5bf360881b60288201526037906000f0906001600160a01b038216156115ef57565b60405162461bcd60e51b8152602060048201526015602482015274119858dd1bdc9e4e90d49150551157d19052531151605a1b6044820152606490fd5b9081602091031261000e5751801515810361000e5790565b1561164b57565b60405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b3d156116ce573d906116b48261079d565b916116c2604051938461029a565b82523d6000602084013e565b606090565b9192901561173557508151156116e7575090565b3b156116f05790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156117485750805190602001fd5b60405162461bcd60e51b81529081906104ca9060048301610d70565b1561176b57565b60405162461bcd60e51b81526020600482015260146024820152732330b1ba37b93c9d24a72b20a624a22fa0a2222960611b6044820152606490fd5b906117b06112a0565b81519167ffffffffffffffff83116118e0575b6117d7836117d2600554610c4a565b6118ed565b602080601f8511600114611847575090837f87cdeaffd8e70903d6ce7cc983fac3b09ca79e83818124c98e47a1d70f8027d693946118379360009161183c575b508160011b916000199060031b1c19161760055560405191829182610d70565b0390a1565b905082015138611817565b600560005290601f19851660008051602061194d833981519152926000905b8282106118c8575050946118379392600192827f87cdeaffd8e70903d6ce7cc983fac3b09ca79e83818124c98e47a1d70f8027d69798106118af575b5050811b01600555610dd2565b84015160001960f88460031b161c1916905538806118a2565b80600185968294968901518155019501930190611866565b6118e861022a565b6117c3565b601f81116118f9575050565b6000906005825260008051602061194d833981519152906020601f850160051c83019410611942575b601f0160051c01915b82811061193757505050565b81815560010161192b565b909250829061192256fe036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0a26469706673582212202c3b2f27169077755f51255dfc63d1fae60958465008a257d7b5f8252097a91164736f6c6343000811003300000000000000000000000000000000000000000000000000000000000000c80000000000000000000000007a2649bfc5a923f255ec1a5c82f13b9b2c96fa12
Deployed Bytecode
0x60806040526004361015610013575b600080fd5b60003560e01c80630614117a146101df57806313498b63146101d657806314ce31b8146101cd578063238aa5a3146101c457806323ef3491146101bb57806325b772de146101b2578063308efad5146101a95780633f4ba83a146101a05780634256dd78146101975780634cb6995a1461018e5780635c975abb146101855780636c0360eb1461017c578063715018a6146101735780637b1039991461016a5780638456cb59146101615780638980f11f146101585780638da5cb5b1461014f578063a2dcc2d014610146578063b0e21e8a1461013d578063c57a882514610134578063c62bc0ca1461012b578063cce516b7146101225763f2fde38b1461011a57600080fd5b61000e6111dc565b5061000e6111b2565b5061000e611107565b5061000e611093565b5061000e611074565b5061000e61103f565b5061000e611015565b5061000e610f3e565b5061000e610edb565b5061000e610eb1565b5061000e610e55565b5061000e610d84565b5061000e610c23565b5061000e610baf565b5061000e610b1c565b5061000e610a7f565b5061000e6109d7565b5061000e61094b565b5061000e61087e565b5061000e61083e565b5061000e6107c8565b5061000e610309565b5061000e6101f3565b600091031261000e57565b503461000e576000806003193601126102275761020e6112a0565b8080808047335af161021e6116a3565b50156102275780f35b80fd5b50634e487b7160e01b600052604160045260246000fd5b6060810190811067ffffffffffffffff82111761025d57604052565b61026561022a565b604052565b67ffffffffffffffff811161025d57604052565b6040810190811067ffffffffffffffff82111761025d57604052565b90601f8019910116810190811067ffffffffffffffff82111761025d57604052565b60405190610100820182811067ffffffffffffffff82111761025d57604052565b600435906001600160a01b038216820361000e57565b604435906001600160a01b038216820361000e57565b503461000e57606036600319011261000e576040805161032881610241565b6103306102dd565b815260209182820160243581526103456102f3565b828401908152610353611550565b60026001541461075957600260015561038761037a83516000526006602052604060002090565b546001600160a01b031690565b936001600160a01b039261039e84871615156112f8565b6001600160a01b0386166000908152600760205260409020546103c49060ff1615611344565b81516103eb906103e4906001600160a01b03165b6001600160a01b031690565b1515611390565b825161040a90610403906001600160a01b03166103d8565b15156113dc565b600254610421906103d8906001600160a01b031681565b93855197633c7c182160e21b8952600497818a8a816000809b5af1998a1561074c575b879a61071d575b50845189908390610466906103d8906001600160a01b031681565b8a5163313ce56760e01b815292839182905afa8891816106ee575b506104ce57885162461bcd60e51b81526020818c01818152601691810191909152752330b1ba37b93c9d2222a1a4a6a0a629afa2a92927a960511b604082015281906060010390fd5b0390fd5b8860ff829b95969798999b16116106a35790899a610588858a6105738d9e9d6105698c6105598f6105929b946105316105216105136003549b5460018060a01b031690565b93516001600160a01b031690565b945198516001600160a01b031690565b9861053a6102bc565b9e8f610544610c84565b815201526001600160a01b03909116908d0152565b6001600160a01b031660608b0152565b60ff166080890152565b60a08701526001600160a01b031660c0860152565b60e0840152611597565b928316803b1561067f578851631fd2937b60e31b815291889183918290849082906105bf9089830161145d565b03925af18015610696575b610683575b5060025461060d906105fd906105ef906103d8906001600160a01b031681565b95516001600160a01b031690565b935195516001600160a01b031690565b966106166114e0565b853b1561067f57879361063c9251998a988997889663290e431760e21b88528701611517565b03925af18015610672575b610659575b5061065660018055565b80f35b8061066661066c9261026a565b806101e8565b3861064c565b61067a611437565b610647565b8780fd5b806106666106909261026a565b386105cf565b61069e611437565b6105ca565b885162461bcd60e51b815260208186018181526019918101919091527f466163746f72793a444543494d414c535f544f4f5f4849474800000000000000604082015281906060010390fd5b61070f919250843d8611610716575b610707818361029a565b810190611444565b9038610481565b503d6106fd565b61073e919a50823d8411610745575b610736818361029a565b810190611428565b983861044b565b503d61072c565b610754611437565b610444565b825162461bcd60e51b815260048101869052601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b60209067ffffffffffffffff81116107bb575b601f01601f19160190565b6107c361022a565b6107b0565b503461000e57602036600319011261000e5760043567ffffffffffffffff811161000e573660238201121561000e5780600401356108058161079d565b90610813604051928361029a565b808252366024828501011161000e57602081600092602461083c960183860137830101526117a7565b005b503461000e57602036600319011261000e576001600160a01b036108606102dd565b166000526007602052602060ff604060002054166040519015158152f35b503461000e57602036600319011261000e576108986102dd565b6108a06112a0565b6108b46001600160a01b0382161515611764565b600854600090815260066020526040812080546001600160a01b0319166001600160a01b03841617905590600854604080516001600160a01b0390931683526020830182905290917fc037ef175078cb9682204e7fa0751474b9d7739100401a817e87d2bc82d222cd91819081010390a160001981146109375760010160085580f35b634e487b7160e01b82526011600452602482fd5b503461000e57602036600319011261000e576004356109686112a0565b7f82d17939c5f046f1c38691d5fb42e31e9f75f983d128c63c2ce73793b2f2a90e60206000928084526006825260018060a01b03906109ae826040872054161515611764565b845260068252604084205416808452600782526040842060ff198154169055604051908152a180f35b503461000e57602036600319011261000e577fdc152171996ab31ea044d1f083998178a0515971a850651a133f8d13027bb2776020610a146102dd565b610a1c6112a0565b6001600160a01b0316610a30811515611764565b610a38611550565b6000805460ff60a01b1916600160a01b1790556040513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258908390a1604051908152a1005b503461000e5760008060031936011261022757610a9a6112a0565b805460ff8160a01c1615610ae05760ff60a01b191681556040513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa90602090a180f35b60405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606490fd5b503461000e57602036600319011261000e57600435610b396112a0565b612710811015610b74576020817f6bbc57480a46553fa4d156ce702beef5f3ad66303b0ed1a5d4cb44966c6584c392600355604051908152a1005b60405162461bcd60e51b8152602060048201526013602482015272466163746f72793a494e56414c49445f46454560681b6044820152606490fd5b503461000e57602036600319011261000e577fd1e93c69f2847f79bfa4d71704aaa84a581729b4b1706d922ee42ba1848a45c96020610bec6102dd565b610bf46112a0565b6001600160a01b0316610c08811515611764565b600480546001600160a01b03191682179055604051908152a1005b503461000e57600036600319011261000e57602060ff60005460a01c166040519015158152f35b90600182811c92168015610c7a575b6020831014610c6457565b634e487b7160e01b600052602260045260246000fd5b91607f1691610c59565b6040519060008260055491610c9883610c4a565b80835292600190818116908115610d0e5750600114610cc1575b50610cbf9250038361029a565b565b60056000908152915060008051602061194d8339815191525b848310610cf35750610cbf935050810160200138610cb2565b81935090816020925483858a01015201910190918592610cda565b905060209250610cbf94915060ff191682840152151560051b82010138610cb2565b919082519283825260005b848110610d5c575050826000602080949584010152601f8019910116010190565b602081830181015184830182015201610d3b565b906020610d81928181520190610d30565b90565b503461000e57600080600319360112610227576040519080600554610da881610c4a565b80855291600191808316908115610e2b5750600114610de2575b610dde85610dd28187038261029a565b60405191829182610d70565b0390f35b92506005835260008051602061194d8339815191525b828410610e13575050508101602001610dd282610dde610dc2565b80546020858701810191909152909301928101610df8565b869550610dde96935060209250610dd294915060ff191682840152151560051b8201019293610dc2565b503461000e5760008060031936011261022757610e706112a0565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461000e57600036600319011261000e576002546040516001600160a01b039091168152602090f35b503461000e5760008060031936011261022757610ef66112a0565b610efe611550565b805460ff60a01b1916600160a01b1781556040513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25890602090a180f35b503461000e57604036600319011261000e57610ff2610f5b6102dd565b610f636112a0565b60405163a9059cbb60e01b602082019081523360248084019190915235604480840191909152825290916001600160a01b0316906000908190610fa760648661029a565b60405194610fb48661027e565b602086527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65646020870152519082855af1610fec6116a3565b916116d3565b805180610ffb57005b816020806110109361083c950101910161162c565b611644565b503461000e57600036600319011261000e576000546040516001600160a01b039091168152602090f35b503461000e57602036600319011261000e576004356000526006602052602060018060a01b0360406000205416604051908152f35b503461000e57600036600319011261000e576020600354604051908152f35b503461000e57602036600319011261000e577fdb0239c63d4033dcdd21bd44f8dd479a03efbae12f6bbe27c0a5f923d26514cc60206110d06102dd565b6110d86112a0565b6001600160a01b03166110ec811515611764565b600280546001600160a01b03191682179055604051908152a1005b503461000e57602036600319011261000e576004356111246112a0565b7f20395e2a325eeb7f6e57d3b5779c4ce1091382e7dcd154240cf097c82e9153ce6111ac600092808452600660205260018060a01b039061116c826040872054161515611764565b8452600660209081526040808620549290921680865260078252828620805460ff1916600117905591516001600160a01b03909216825290918291820190565b0390a180f35b503461000e57600036600319011261000e576004546040516001600160a01b039091168152602090f35b503461000e57602036600319011261000e576111f66102dd565b6111fe6112a0565b6001600160a01b03908116801561124c57600080546001600160a01b03198116831782559092167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b6000546001600160a01b031633036112b457565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b156112ff57565b60405162461bcd60e51b815260206004820152601960248201527f466163746f72793a56455253494f4e5f4e4f545f464f554e44000000000000006044820152606490fd5b1561134b57565b60405162461bcd60e51b815260206004820152601b60248201527f466163746f72793a56455253494f4e5f424c41434b4c495354454400000000006044820152606490fd5b1561139757565b60405162461bcd60e51b815260206004820152601c60248201527f466163746f72793a424f4e445f544f4b454e5f5a45524f5f41444452000000006044820152606490fd5b156113e357565b60405162461bcd60e51b815260206004820152601960248201527f466163746f72793a43524541544f525f5a45524f5f41444452000000000000006044820152606490fd5b9081602091031261000e575190565b506040513d6000823e3d90fd5b9081602091031261000e575160ff8116810361000e5790565b60208152815160e061147d61010092836020860152610120850190610d30565b936020810151604085015260018060a01b0380604083015116606086015260608201511660808501526114ba608082015160a086019060ff169052565b60a081015160c0858101919091528101516001600160a01b031682850152015191015290565b6040516020810181811067ffffffffffffffff82111761150a575b60405260008152906000368137565b61151261022a565b6114fb565b6001600160a01b039182168152602081019290925291821660408201529116606082015260a060808201819052610d8192910190610d30565b60ff60005460a01c1661155f57565b60405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606490fd5b604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b815260609190911b60148201526e5af43d82803e903d91602b57fd5bf360881b60288201526037906000f0906001600160a01b038216156115ef57565b60405162461bcd60e51b8152602060048201526015602482015274119858dd1bdc9e4e90d49150551157d19052531151605a1b6044820152606490fd5b9081602091031261000e5751801515810361000e5790565b1561164b57565b60405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b3d156116ce573d906116b48261079d565b916116c2604051938461029a565b82523d6000602084013e565b606090565b9192901561173557508151156116e7575090565b3b156116f05790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156117485750805190602001fd5b60405162461bcd60e51b81529081906104ca9060048301610d70565b1561176b57565b60405162461bcd60e51b81526020600482015260146024820152732330b1ba37b93c9d24a72b20a624a22fa0a2222960611b6044820152606490fd5b906117b06112a0565b81519167ffffffffffffffff83116118e0575b6117d7836117d2600554610c4a565b6118ed565b602080601f8511600114611847575090837f87cdeaffd8e70903d6ce7cc983fac3b09ca79e83818124c98e47a1d70f8027d693946118379360009161183c575b508160011b916000199060031b1c19161760055560405191829182610d70565b0390a1565b905082015138611817565b600560005290601f19851660008051602061194d833981519152926000905b8282106118c8575050946118379392600192827f87cdeaffd8e70903d6ce7cc983fac3b09ca79e83818124c98e47a1d70f8027d69798106118af575b5050811b01600555610dd2565b84015160001960f88460031b161c1916905538806118a2565b80600185968294968901518155019501930190611866565b6118e861022a565b6117c3565b601f81116118f9575050565b6000906005825260008051602061194d833981519152906020601f850160051c83019410611942575b601f0160051c01915b82811061193757505050565b81815560010161192b565b909250829061192256fe036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0a26469706673582212202c3b2f27169077755f51255dfc63d1fae60958465008a257d7b5f8252097a91164736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000c80000000000000000000000007a2649bfc5a923f255ec1a5c82f13b9b2c96fa12
-----Decoded View---------------
Arg [0] : _protocolFee (uint256): 200
Arg [1] : _protocolFeeAddress (address): 0x7a2649bFC5a923f255Ec1A5c82f13B9B2C96Fa12
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000c8
Arg [1] : 0000000000000000000000007a2649bfc5a923f255ec1a5c82f13b9b2c96fa12
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.