ETH Price: $1,993.14 (+1.31%)
 

Overview

ETH Balance

Scroll LogoScroll LogoScroll Logo0 ETH

ETH Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Ownersh...62023-10-10 6:10:14529 days ago1696918214IN
Scroll: L2 Scroll Standard ERC20 Factory
0 ETH0.000000020.001

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
136400832025-02-24 18:11:4325 days ago1740420703
Scroll: L2 Scroll Standard ERC20 Factory
 Contract Creation0 ETH
126829952025-01-14 2:56:2667 days ago1736823386
Scroll: L2 Scroll Standard ERC20 Factory
 Contract Creation0 ETH
111757302024-11-17 15:38:04124 days ago1731857884
Scroll: L2 Scroll Standard ERC20 Factory
 Contract Creation0 ETH
111754752024-11-17 15:25:13124 days ago1731857113
Scroll: L2 Scroll Standard ERC20 Factory
 Contract Creation0 ETH
107417812024-11-02 7:31:45140 days ago1730532705
Scroll: L2 Scroll Standard ERC20 Factory
 Contract Creation0 ETH
101827912024-10-15 10:37:18157 days ago1728988638
Scroll: L2 Scroll Standard ERC20 Factory
 Contract Creation0 ETH
97425182024-09-30 9:52:27173 days ago1727689947
Scroll: L2 Scroll Standard ERC20 Factory
 Contract Creation0 ETH
92589692024-09-13 17:07:43189 days ago1726247263
Scroll: L2 Scroll Standard ERC20 Factory
 Contract Creation0 ETH
92584542024-09-13 16:42:03189 days ago1726245723
Scroll: L2 Scroll Standard ERC20 Factory
 Contract Creation0 ETH
91809882024-09-11 0:48:32192 days ago1726015712
Scroll: L2 Scroll Standard ERC20 Factory
 Contract Creation0 ETH
91337682024-09-09 9:52:31194 days ago1725875551
Scroll: L2 Scroll Standard ERC20 Factory
 Contract Creation0 ETH
91285882024-09-09 5:36:31194 days ago1725860191
Scroll: L2 Scroll Standard ERC20 Factory
 Contract Creation0 ETH
90524152024-09-06 14:40:31196 days ago1725633631
Scroll: L2 Scroll Standard ERC20 Factory
 Contract Creation0 ETH
89019112024-09-01 14:14:55201 days ago1725200095
Scroll: L2 Scroll Standard ERC20 Factory
 Contract Creation0 ETH
85703432024-08-21 9:39:36213 days ago1724233176
Scroll: L2 Scroll Standard ERC20 Factory
 Contract Creation0 ETH
84843852024-08-18 11:47:38215 days ago1723981658
Scroll: L2 Scroll Standard ERC20 Factory
 Contract Creation0 ETH
81280792024-08-06 14:08:25227 days ago1722953305
Scroll: L2 Scroll Standard ERC20 Factory
 Contract Creation0 ETH
73359042024-07-11 15:38:02253 days ago1720712282
Scroll: L2 Scroll Standard ERC20 Factory
 Contract Creation0 ETH
73223192024-07-11 4:13:16254 days ago1720671196
Scroll: L2 Scroll Standard ERC20 Factory
 Contract Creation0 ETH
71178742024-07-04 1:46:11261 days ago1720057571
Scroll: L2 Scroll Standard ERC20 Factory
 Contract Creation0 ETH
70284652024-06-30 23:12:37264 days ago1719789157
Scroll: L2 Scroll Standard ERC20 Factory
 Contract Creation0 ETH
67969662024-06-22 22:14:55272 days ago1719094495
Scroll: L2 Scroll Standard ERC20 Factory
 Contract Creation0 ETH
67642112024-06-21 18:56:33273 days ago1718996193
Scroll: L2 Scroll Standard ERC20 Factory
 Contract Creation0 ETH
65161482024-06-13 4:06:54282 days ago1718251614
Scroll: L2 Scroll Standard ERC20 Factory
 Contract Creation0 ETH
61752352024-06-01 7:50:56294 days ago1717228256
Scroll: L2 Scroll Standard ERC20 Factory
 Contract Creation0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ScrollStandardERC20Factory

Compiler Version
v0.8.16+commit.07a7930e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 5 : ScrollStandardERC20Factory.sol
// SPDX-License-Identifier: MIT

pragma solidity =0.8.16;

import {Clones} from "@openzeppelin/contracts/proxy/Clones.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";

import {IScrollStandardERC20Factory} from "./IScrollStandardERC20Factory.sol";

/// @title ScrollStandardERC20Factory
/// @notice The `ScrollStandardERC20Factory` is used to deploy `ScrollStandardERC20` for `L2StandardERC20Gateway`.
/// It uses the `Clones` contract to deploy contract with minimum gas usage.
/// @dev The implementation of deployed token is non-upgradable. This design may be changed in the future.
contract ScrollStandardERC20Factory is Ownable, IScrollStandardERC20Factory {
    /// @notice The address of `ScrollStandardERC20` implementation.
    address public implementation;

    constructor(address _implementation) {
        require(_implementation != address(0), "zero implementation address");

        implementation = _implementation;
    }

    /// @inheritdoc IScrollStandardERC20Factory
    function computeL2TokenAddress(address _gateway, address _l1Token) external view returns (address) {
        // In StandardERC20Gateway, all corresponding l2 tokens are depoyed by Create2 with salt,
        // we can calculate the l2 address directly.
        bytes32 _salt = _getSalt(_gateway, _l1Token);

        return Clones.predictDeterministicAddress(implementation, _salt);
    }

    /// @inheritdoc IScrollStandardERC20Factory
    /// @dev This function should only be called by owner to avoid DDoS attack on StandardTokenBridge.
    function deployL2Token(address _gateway, address _l1Token) external onlyOwner returns (address) {
        bytes32 _salt = _getSalt(_gateway, _l1Token);

        address _l2Token = Clones.cloneDeterministic(implementation, _salt);

        emit DeployToken(_l1Token, _l2Token);

        return _l2Token;
    }

    function _getSalt(address _gateway, address _l1Token) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked(_gateway, keccak256(abi.encodePacked(_l1Token))));
    }
}

File 2 of 5 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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);
    }
}

File 3 of 5 : Clones.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/Clones.sol)

pragma solidity ^0.8.0;

/**
 * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for
 * deploying minimal proxy contracts, also known as "clones".
 *
 * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies
 * > a minimal bytecode implementation that delegates all calls to a known, fixed address.
 *
 * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`
 * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the
 * deterministic method.
 *
 * _Available since v3.4._
 */
library Clones {
    /**
     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
     *
     * This function uses the create opcode, which should never revert.
     */
    function clone(address implementation) internal returns (address instance) {
        /// @solidity memory-safe-assembly
        assembly {
            // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes
            // of the `implementation` address with the bytecode before the address.
            mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))
            // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.
            mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))
            instance := create(0, 0x09, 0x37)
        }
        require(instance != address(0), "ERC1167: create failed");
    }

    /**
     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
     *
     * This function uses the create2 opcode and a `salt` to deterministically deploy
     * the clone. Using the same `implementation` and `salt` multiple time will revert, since
     * the clones cannot be deployed twice at the same address.
     */
    function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) {
        /// @solidity memory-safe-assembly
        assembly {
            // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes
            // of the `implementation` address with the bytecode before the address.
            mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))
            // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.
            mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))
            instance := create2(0, 0x09, 0x37, salt)
        }
        require(instance != address(0), "ERC1167: create2 failed");
    }

    /**
     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
     */
    function predictDeterministicAddress(
        address implementation,
        bytes32 salt,
        address deployer
    ) internal pure returns (address predicted) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(add(ptr, 0x38), deployer)
            mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff)
            mstore(add(ptr, 0x14), implementation)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73)
            mstore(add(ptr, 0x58), salt)
            mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37))
            predicted := keccak256(add(ptr, 0x43), 0x55)
        }
    }

    /**
     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
     */
    function predictDeterministicAddress(
        address implementation,
        bytes32 salt
    ) internal view returns (address predicted) {
        return predictDeterministicAddress(implementation, salt, address(this));
    }
}

File 4 of 5 : Context.sol
// 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;
    }
}

File 5 of 5 : IScrollStandardERC20Factory.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.16;

interface IScrollStandardERC20Factory {
    /// @notice Emitted when a l2 token is deployed.
    /// @param _l1Token The address of the l1 token.
    /// @param _l2Token The address of the l2 token.
    event DeployToken(address indexed _l1Token, address indexed _l2Token);

    /// @notice Compute the corresponding l2 token address given l1 token address.
    /// @param _gateway The address of gateway contract.
    /// @param _l1Token The address of l1 token.
    function computeL2TokenAddress(address _gateway, address _l1Token) external view returns (address);

    /// @notice Deploy the corresponding l2 token address given l1 token address.
    /// @param _gateway The address of gateway contract.
    /// @param _l1Token The address of l1 token.
    function deployL2Token(address _gateway, address _l1Token) external returns (address);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_implementation","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_l1Token","type":"address"},{"indexed":true,"internalType":"address","name":"_l2Token","type":"address"}],"name":"DeployToken","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"},{"inputs":[{"internalType":"address","name":"_gateway","type":"address"},{"internalType":"address","name":"_l1Token","type":"address"}],"name":"computeL2TokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_gateway","type":"address"},{"internalType":"address","name":"_l1Token","type":"address"}],"name":"deployL2Token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b5060405161063e38038061063e83398101604081905261002f91610107565b610038336100b7565b6001600160a01b0381166100925760405162461bcd60e51b815260206004820152601b60248201527f7a65726f20696d706c656d656e746174696f6e20616464726573730000000000604482015260640160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055610137565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561011957600080fd5b81516001600160a01b038116811461013057600080fd5b9392505050565b6104f8806101466000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80635c60da1b1461006757806361e98ca114610096578063715018a6146100a95780637bdbcbbf146100b35780638da5cb5b146100c6578063f2fde38b146100d7575b600080fd5b60015461007a906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b61007a6100a4366004610474565b6100ea565b6100b161011a565b005b61007a6100c1366004610474565b61012e565b6000546001600160a01b031661007a565b6100b16100e53660046104a7565b6101aa565b6000806100f78484610228565b600154909150610110906001600160a01b0316826102ae565b9150505b92915050565b610122610311565b61012c600061036b565b565b6000610138610311565b60006101448484610228565b600154909150600090610160906001600160a01b0316836103bb565b9050806001600160a01b0316846001600160a01b03167f07ab516ad4f19b4465f15fa7c2dbc064f18e734a0846d6e0932da244aa3d8a7160405160405180910390a3949350505050565b6101b2610311565b6001600160a01b03811661021c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b6102258161036b565b50565b6040516bffffffffffffffffffffffff19606083901b16602082015260009083906034016040516020818303038152906040528051906020012060405160200161029092919060609290921b6bffffffffffffffffffffffff19168252601482015260340190565b60405160208183030381529060405280519060200120905092915050565b6040513060388201526f5af43d82803e903d91602b57fd5bf3ff602482015260148101839052733d602d80600a3d3981f3363d3d373d3d3d363d738152605881018290526037600c820120607882015260556043909101206000905b9392505050565b6000546001600160a01b0316331461012c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610213565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008360601b60e81c176000526e5af43d82803e903d91602b57fd5bf38360781b1760205281603760096000f590506001600160a01b0381166101145760405162461bcd60e51b815260206004820152601760248201527f455243313136373a2063726561746532206661696c65640000000000000000006044820152606401610213565b80356001600160a01b038116811461046f57600080fd5b919050565b6000806040838503121561048757600080fd5b61049083610458565b915061049e60208401610458565b90509250929050565b6000602082840312156104b957600080fd5b61030a8261045856fea264697066735822122084c328862f7290ccd4008fc248ca10439f2a88f3d9f2b534833eff2a50d7f4d764736f6c63430008100033000000000000000000000000c7d86908ccf644db7c69437d5852cedbc1ad3f69

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100625760003560e01c80635c60da1b1461006757806361e98ca114610096578063715018a6146100a95780637bdbcbbf146100b35780638da5cb5b146100c6578063f2fde38b146100d7575b600080fd5b60015461007a906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b61007a6100a4366004610474565b6100ea565b6100b161011a565b005b61007a6100c1366004610474565b61012e565b6000546001600160a01b031661007a565b6100b16100e53660046104a7565b6101aa565b6000806100f78484610228565b600154909150610110906001600160a01b0316826102ae565b9150505b92915050565b610122610311565b61012c600061036b565b565b6000610138610311565b60006101448484610228565b600154909150600090610160906001600160a01b0316836103bb565b9050806001600160a01b0316846001600160a01b03167f07ab516ad4f19b4465f15fa7c2dbc064f18e734a0846d6e0932da244aa3d8a7160405160405180910390a3949350505050565b6101b2610311565b6001600160a01b03811661021c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b6102258161036b565b50565b6040516bffffffffffffffffffffffff19606083901b16602082015260009083906034016040516020818303038152906040528051906020012060405160200161029092919060609290921b6bffffffffffffffffffffffff19168252601482015260340190565b60405160208183030381529060405280519060200120905092915050565b6040513060388201526f5af43d82803e903d91602b57fd5bf3ff602482015260148101839052733d602d80600a3d3981f3363d3d373d3d3d363d738152605881018290526037600c820120607882015260556043909101206000905b9392505050565b6000546001600160a01b0316331461012c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610213565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008360601b60e81c176000526e5af43d82803e903d91602b57fd5bf38360781b1760205281603760096000f590506001600160a01b0381166101145760405162461bcd60e51b815260206004820152601760248201527f455243313136373a2063726561746532206661696c65640000000000000000006044820152606401610213565b80356001600160a01b038116811461046f57600080fd5b919050565b6000806040838503121561048757600080fd5b61049083610458565b915061049e60208401610458565b90509250929050565b6000602082840312156104b957600080fd5b61030a8261045856fea264697066735822122084c328862f7290ccd4008fc248ca10439f2a88f3d9f2b534833eff2a50d7f4d764736f6c63430008100033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000c7d86908ccf644db7c69437d5852cedbc1ad3f69

-----Decoded View---------------
Arg [0] : _implementation (address): 0xC7d86908ccf644Db7C69437D5852CedBC1aD3f69

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000c7d86908ccf644db7c69437d5852cedbc1ad3f69


Block Transaction Gas Used Reward
view all blocks sequenced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.