ETH Price: $2,642.36 (+1.37%)

Contract

0x461663D503A23fc31f02979B7714CB88bEBaffe1
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

Transaction Hash
Method
Block
From
To
Withdraw190548982024-01-21 11:20:23271 days ago1705836023IN
0x461663D5...8bEBaffe1
0 ETH0.0016724412.18023998
Batch Deposit190548902024-01-21 11:18:47271 days ago1705835927IN
0x461663D5...8bEBaffe1
0 ETH0.004118711.58266631
0x60c03461190548292024-01-21 11:06:35271 days ago1705835195IN
 Contract Creation
0 ETH0.0195024110.55130092

Latest 2 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
190548902024-01-21 11:18:47271 days ago1705835927
0x461663D5...8bEBaffe1
 Contract Creation0 ETH
190548292024-01-21 11:06:35271 days ago1705835195
0x461663D5...8bEBaffe1
 Contract Creation0 ETH
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x294E9041...c08F59abE
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
Ferc721Bridge

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 10 : Ferc721Bridge.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;
 
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/proxy/Clones.sol";
import "./interfaces/IFERC721.sol";
import "./interfaces/IFERC20.sol";
import "./FERC20.sol";

error NotCreatedByFactory();
error MintNotFinished();
error NotApprovedForAll();
error NotCreatedByBridge();
error AllowanceNotEnough();
error BalanceNotEnough();
error NotMultipleOfLimit();
error WithdrawAmountIsZero();

contract Ferc721Bridge {
		address public immutable factoryContractAddress;
		address public immutable tokenImplementation;

		mapping(address => uint64[]) public nftTokenIds;
		mapping(address => address) public ferc20Addresses; // ferc-721 => ferc-20 address
		mapping(address => address) public ferc721Addresses;  // ferc-20 => ferc-721 address

		event DeployERC20(address operator, address indexed from, address indexed ferc721Address, address indexed ferc20Address, uint256 limit);
		event ReceivedNFT(address operator, address indexed from, uint256 tokenId, address indexed ferc721Address, address indexed ferc20Address, uint256 limit);
		event ReceivedToken(address indexed from, uint256 ferc20Amount, uint256 ferc721Amount, address indexed ferc20Address, address indexed ferc721Address, uint256 limit);

		constructor(address _factoryContractAddress) {
			factoryContractAddress = _factoryContractAddress;
			tokenImplementation = address(new FERC20());
		}

    function withdraw(address ferc20Address, uint256 amount) public returns (bool) {
				IFERC20 ferc20 = IFERC20(ferc20Address);
				if(ferc20.bridgeContract() != address(this)) revert NotCreatedByBridge();
				if(ferc20.allowance(msg.sender, address(this)) < amount) revert AllowanceNotEnough();
				if(ferc20.balanceOf(msg.sender) < amount) revert BalanceNotEnough();

				address ferc721Address = ferc721Addresses[ferc20Address];
				IFERC721 ferc721 = IFERC721(ferc721Address);
				uint limit = ferc721.limit();
				if(amount / 1e18 % limit != 0) revert NotMultipleOfLimit();
				uint256 amountOfFERC721 = amount / limit / 1e18;
				if(amountOfFERC721 == 0) revert WithdrawAmountIsZero();
	
				// return back to depositer
				for(uint i; i < amountOfFERC721; i++) {
					ferc721.safeTransferFrom(address(this), msg.sender, nftTokenIds[ferc721Address][nftTokenIds[ferc721Address].length - 1]);
					nftTokenIds[ferc721Address].pop();
				}

				// burn ferc20
				ferc20.transferFrom(msg.sender, address(this), amount);
				ferc20.transfer(address(0x0), amount);

				emit ReceivedToken(msg.sender, amount, amountOfFERC721, msg.sender, ferc721Address, limit);
        return true;
    }

		function batchDeposit(address inscriptionAddress, uint[] calldata ids) public {
			IFERC721 inscription = IFERC721(inscriptionAddress);
			IFERC721.TokenData memory tokenData = inscription.tokenData();
			if(inscription.factoryContract() != factoryContractAddress) revert NotCreatedByFactory();
			if(tokenData.totalSupply < tokenData.max / tokenData.limit) revert MintNotFinished();
			if(!inscription.isApprovedForAll(msg.sender, address(this))) revert NotApprovedForAll();

			address ferc20Address = ferc20Addresses[inscriptionAddress];
			if(ferc20Address == address(0x0)) {
				ferc20Address = Clones.clone(tokenImplementation);
				FERC20(ferc20Address).initialize(inscriptionAddress);
				ferc721Addresses[ferc20Address] = inscriptionAddress;
				ferc20Addresses[inscriptionAddress] = ferc20Address;
				emit DeployERC20(msg.sender, msg.sender, inscriptionAddress, ferc20Address, tokenData.limit);
			}

			uint len = ids.length;
			for(uint i; i < len; i++) {
				inscription.transferFrom(msg.sender, address(this), ids[i]);
				nftTokenIds[inscriptionAddress].push(uint64(ids[i]));
				emit ReceivedNFT(msg.sender, msg.sender, ids[i], inscriptionAddress, ferc20Address, tokenData.limit);
			}
			FERC20(ferc20Address).mint(msg.sender, uint(tokenData.limit) * 1e18 * ids.length);
		}
		
		function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) public returns (bytes4) {
				if(IFERC721(msg.sender).factoryContract() != factoryContractAddress) revert NotCreatedByFactory();
				if(IFERC721(msg.sender).totalSupply() < IFERC721(msg.sender).max() / IFERC721(msg.sender).limit()) revert MintNotFinished();

				address ferc20Address = ferc20Addresses[msg.sender];
				if(ferc20Address == address(0x0)) {
					ferc20Address = Clones.clone(tokenImplementation);
					FERC20(ferc20Address).initialize(msg.sender);
					ferc721Addresses[ferc20Address] = msg.sender;
					ferc20Addresses[msg.sender] = ferc20Address;
					emit DeployERC20(operator, from, msg.sender, ferc20Address, IFERC721(msg.sender).limit());
				}
				nftTokenIds[msg.sender].push(uint64(tokenId));

				FERC20(ferc20Address).mint(from, IFERC721(msg.sender).limit() * 1e18);

				emit ReceivedNFT(operator, from, tokenId, msg.sender, ferc20Address, IFERC721(msg.sender).limit());
				return IERC721Receiver.onERC721Received.selector;
		}
}

File 2 of 10 : 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 3 of 10 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
}

File 4 of 10 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

File 5 of 10 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 6 of 10 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 7 of 10 : FERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;

import "./lib/ERC20.sol";
import "./interfaces/IFERC20.sol";
import "./interfaces/IFERC721.sol";

contract FERC20 is ERC20, IFERC20 {
		address public immutable bridgeContract;

		constructor() {
			bridgeContract = msg.sender;
		}

    function initialize(address _ferc721Address) public {
				require(msg.sender == bridgeContract, "only bridge factory can initialize");
				name = string(abi.encodePacked(IFERC721(_ferc721Address).symbol(), " {ferc-20}"));
			  symbol = IFERC721(_ferc721Address).symbol();
				decimals = 18;
    }

    function mint(address account, uint256 amount) public {
				require(msg.sender == bridgeContract, "only bridge factory can mint");
				_mint(account, amount);
		}
}

File 8 of 10 : IFERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IFERC20 is IERC20 {
	function bridgeContract() external view returns(address);
	function mint(address account, uint256 amount) external;
}

File 9 of 10 : IFERC721.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";

interface IFERC721 is IERC721 {
	struct TokenData {
		uint64  max;
		uint64  totalSupply;
		bool    needFerc;
		uint24  inscriptionId;
		uint24  limit;
		bytes9  tick;
	}

	function factoryContract() external view returns(address);
	function swapContract() external view returns(address);
	function wethContract() external view returns(address);
	function name() external view returns(string memory);
	function symbol() external view returns(string memory);
	function totalSupply() external view returns(uint);
	function max() external view returns(uint);
	function limit() external view returns(uint);
	function needFerc() external view returns(bool);
	function inscriptionId() external view returns(uint);
	function tokenData() external view returns(TokenData memory);
	function lastMintTimestamp(address addr) external view returns (uint);
}

File 10 of 10 : ERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

contract ERC20 is IERC20 {
    uint public totalSupply;
    mapping(address => uint) public balanceOf;
    mapping(address => mapping(address => uint)) public allowance;
    string public name;
    string public symbol;
    uint8 public decimals;

    function transfer(address recipient, uint amount) external returns (bool) {
				balanceOf[msg.sender] -= amount;
        balanceOf[recipient] += amount;
        emit Transfer(msg.sender, recipient, amount);
        return true;
    }

    function approve(address spender, uint amount) external returns (bool) {
        allowance[msg.sender][spender] = amount;
        emit Approval(msg.sender, spender, amount);
        return true;
    }

    function transferFrom(
        address sender,
        address recipient,
        uint amount
    ) external returns (bool) {
        allowance[sender][msg.sender] -= amount;
        balanceOf[sender] -= amount;
        balanceOf[recipient] += amount;
        emit Transfer(sender, recipient, amount);
        return true;
    }

    function _mint(address account, uint256 amount) internal {
        require(account != address(0), "ERC20: mint to the zero address");
        totalSupply += amount;
        unchecked {
            // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
            balanceOf[account] += amount;
        }
        emit Transfer(address(0), account, amount);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_factoryContractAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AllowanceNotEnough","type":"error"},{"inputs":[],"name":"BalanceNotEnough","type":"error"},{"inputs":[],"name":"MintNotFinished","type":"error"},{"inputs":[],"name":"NotApprovedForAll","type":"error"},{"inputs":[],"name":"NotCreatedByBridge","type":"error"},{"inputs":[],"name":"NotCreatedByFactory","type":"error"},{"inputs":[],"name":"NotMultipleOfLimit","type":"error"},{"inputs":[],"name":"WithdrawAmountIsZero","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"ferc721Address","type":"address"},{"indexed":true,"internalType":"address","name":"ferc20Address","type":"address"},{"indexed":false,"internalType":"uint256","name":"limit","type":"uint256"}],"name":"DeployERC20","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"ferc721Address","type":"address"},{"indexed":true,"internalType":"address","name":"ferc20Address","type":"address"},{"indexed":false,"internalType":"uint256","name":"limit","type":"uint256"}],"name":"ReceivedNFT","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"ferc20Amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ferc721Amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"ferc20Address","type":"address"},{"indexed":true,"internalType":"address","name":"ferc721Address","type":"address"},{"indexed":false,"internalType":"uint256","name":"limit","type":"uint256"}],"name":"ReceivedToken","type":"event"},{"inputs":[{"internalType":"address","name":"inscriptionAddress","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"batchDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"factoryContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"ferc20Addresses","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"ferc721Addresses","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"nftTokenIds","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokenImplementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"ferc20Address","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060408181526004918236101561001657600080fd5b600090813560e01c908163150b7a0214610bf95750806324727dc814610b995780632f3a3d5d14610b5557806359e45d5814610b1a578063732e0a1d14610ad65780639b1efbdc14610a9b578063c340a8d6146105185763f3fef3a31461007c57600080fd5b3461028157816003193601126102815761009461114c565b825163cd59658360e01b8152602094602480359391926001600160a01b03928316929088818681875afa9081156104905787916104eb575b5081309116036104db578651636eb1769f60e11b8152338582019081523060208201528990829081906040010381875afa9081156104905790869188916104aa575b501061049a5786516370a0823160e01b8152338582015288818481875afa90811561049057908691889161045f575b501061044f578286526002885286862054169486519363a4d66daf60e01b8552888582818a5afa948515610445578295610411575b50841561040157670de0b6b3a764000085818804066103f3576101958688611206565b049384156103e457825b8581106102e8575088516323b872dd60e01b815233838201908152306020820152604081018990528b9082908190606001038187865af180156102de579184918c9493610297575b50916044916000938a8d51988996879563a9059cbb60e01b87528601528401525af1801561028b57610252575b50508451928352858301528382015233907f1568e058b11bd0a0d4f0b417a4f870b354866b7f958986c8164e75a17af9635660603392a45160018152f35b8782813d8311610284575b61026781836111c5565b8101031261028157506102799061124b565b503880610214565b80fd5b503d61025d565b508651903d90823e3d90fd5b809250849193943d83116102d7575b6102b081836111c5565b810103126102d3578a92846000936102c960449461124b565b50919350916101e7565b8380fd5b503d6102a6565b8a513d86823e3d90fd5b888452838b528984208054600019918282019182116103d2579061030b91611162565b9190548b3b156103c45786808d8f8b606491519485938492632142170760e11b84528d3090850152339084015267ffffffffffffffff809860039b8c1b1c1660448401525af180156103c8578f909189926103ae575b508d8252528c8720918254801561039c57610397959491019291906103868484611162565b81939154921b1b1916905555611226565b61019f565b634e487b7160e01b8952603188528989fd5b6103b8915061119b565b6103c457868e38610361565b8680fd5b8e513d8a823e3d90fd5b634e487b7160e01b8752601186528787fd5b50875163a393d14b60e01b8152fd5b5087516263a2f160e51b8152fd5b634e487b7160e01b825260129052fd5b9094508881813d831161043e575b61042981836111c5565b8101031261043957519338610172565b600080fd5b503d61041f565b88513d84823e3d90fd5b8651639882883560e01b81528490fd5b8092508a8092503d8311610489575b61047881836111c5565b81010312610439578590513861013d565b503d61046e565b88513d89823e3d90fd5b86516348159c7560e11b81528490fd5b8092508a8092503d83116104d4575b6104c381836111c5565b81010312610439578590513861010e565b503d6104b9565b8651634fc244cb60e11b81528490fd5b61050b9150893d8b11610511575b61050381836111c5565b8101906111e7565b386100cc565b503d6104f9565b509034610a975780600319360112610a975761053261114c565b9060249384359267ffffffffffffffff808511610a935736602386011215610a935784830135918183116103c457878601958836918560051b0101116103c45784516224fd6560e41b81526001600160a01b0391821696909260c08487818b5afa938415610a895789946109bf575b508651636f08e4a560e11b8152602090818189818d5afa9081156109b5578b91610998575b5084807f0000000000000000000000008465286310a84dff3c2a9f707d3e6b552409ddc716911603610988578181860151169860808387511696019962ffffff96878c5116908115610976570484161161096657885163e985e9c560e01b8152338982019081523060208201528390829081906040010381855afa90811561095c578c91610923575b501561091357808b526001825284898c20541693841561082f575b8b5b88811061073057505050505016945116670de0b6b3a76400008082029180830482148115171561071e5783020291818304149015171561070a57849550833b156107065782516340c10f1960e01b815233928101928352602083019190915292849184919082908490829060400103925af19081156106fd57506106ed5750f35b6106f69061119b565b6102815780f35b513d84823e3d90fd5b8480fd5b85601183634e487b7160e01b600052526000fd5b634e487b7160e01b8852601185528888fd5b61073b818a8461127d565b35833b1561082b578b516323b872dd60e01b815233818d019081523060208201526040810192909252908e9082908190606001038183885af1801561081f578c8f8c9389936107ff575b50916107a3856107fa969593858a6107ab9752808c5220938861127d565b35169061128d565b8c896107b8838d8761127d565b359151168d5191338352878301528d82015284898916917f30c1b6af7016a54d7a823a59780dde142cb21844cb32965993d457d277738b3160603392a4611226565b61066c565b9150925061080d915061119b565b61081b5788858c8f38610785565b8c80fd5b8e8d51903d90823e3d90fd5b8d80fd5b935061085a7f0000000000000000000000006cea46e4372edb789dec3075210ec384c7583b146112cf565b93858516803b1561081b57828d8f8c908e5193849263189acdbd60e31b84528301528183865af1801561081f57908e916108ff575b50819052600284528c818c808320926bffffffffffffffffffffffff60a01b93878582541617905586815260018852209182541617905582888d51168c5190338252868201527f791dc3c592030bf4663f565dca458fa1357e342c6e96ea23536fd333d02ad9f28d3392a461066a565b6109089061119b565b61081b578c3861088f565b885163cd7769ff60e01b81528890fd5b90508281813d8311610955575b61093a81836111c5565b810103126109515761094b9061124b565b3861064f565b8b80fd5b503d610930565b8a513d8e823e3d90fd5b88516321b6aead60e21b81528890fd5b634e487b7160e01b8e5260128b528e8efd5b875163a2e5167160e01b81528790fd5b6109af9150823d84116105115761050381836111c5565b386105c6565b89513d8d823e3d90fd5b90935060c0813d8211610a81575b816109da60c093836111c5565b81010312610a7d5786519060c0820182811086821117610a6957885260a090610a0281611258565b8352610a1060208201611258565b6020840152610a2089820161124b565b89840152610a306060820161126d565b6060840152610a416080820161126d565b608084015201516001600160b81b031981168103610a655760a082015292386105a1565b8980fd5b8b604189634e487b7160e01b600052526000fd5b8880fd5b3d91506109cd565b87513d8b823e3d90fd5b8580fd5b5080fd5b509034610a97576020366003190112610a97576020916001600160a01b0390829082610ac561114c565b168152600185522054169051908152f35b509034610a975781600319360112610a9757517f0000000000000000000000008465286310a84dff3c2a9f707d3e6b552409ddc76001600160a01b03168152602090f35b509034610a97576020366003190112610a97576020916001600160a01b0390829082610b4461114c565b168152600285522054169051908152f35b509034610a975781600319360112610a9757517f0000000000000000000000006cea46e4372edb789dec3075210ec384c7583b146001600160a01b03168152602090f35b509034610a975780600319360112610a9757610bb361114c565b6001600160a01b031682526020829052808220805460243593908410156102815750610bea60209367ffffffffffffffff92611162565b92905490519260031b1c168152f35b93905034610a97576080366003190112610a9757610c1561114c565b6024359290916001600160a01b03808516929190838603611148576044359167ffffffffffffffff606435818111610a935736602382011215610a9357808301358281116103c4573691016024011161070657636f08e4a560e11b8a526020998a818481335afa908115610e8e57869161112b575b5083807f0000000000000000000000008465286310a84dff3c2a9f707d3e6b552409ddc71691160361111c5788516318160ddd60e01b8152908a828481335afa918215610e8e5786926110ed575b508951636ac5db1960e01b8152918b838581335afa928315610eda5787936110be575b508a5163a4d66daf60e01b80825293908d818781335afa90811561105e57899161108f575b50610d2a91611206565b1161107f57839033875260018c52818b8820541690878d8315610ee4575b338252528b8820610d5b9188169061128d565b16978951908282528b828581335afa918215610eda578792610eab575b50670de0b6b3a764000091828102928184041490151715610e9857893b156103c4578a516340c10f1960e01b81526001600160a01b039091168482019081526020810192909252908690829081906040010381838d5af18015610e8e578b92918791610e75575b50508951928391825281335afa938415610e6a5793610e3b575b5086519416845286840152848301527f30c1b6af7016a54d7a823a59780dde142cb21844cb32965993d457d277738b3160603393a451630a85bd0160e11b8152f35b9092508781813d8311610e63575b610e5381836111c5565b8101031261043957519138610df9565b503d610e49565b8851903d90823e3d90fd5b610e819192935061119b565b6107065789908538610ddf565b8a513d88823e3d90fd5b634e487b7160e01b875260118452602487fd5b9091508b81813d8311610ed3575b610ec381836111c5565b8101031261043957519038610d78565b503d610eb9565b8b513d89823e3d90fd5b5050915050610f127f0000000000000000000000006cea46e4372edb789dec3075210ec384c7583b146112cf565b84811691823b1561107b578b5163189acdbd60e31b81523386820152888160248183885af1801561105e57611068575b5082885260028d528c60018d8a20916bffffffffffffffffffffffff60a01b923384825416179055338b5252838d8a20918254161790558b51928484528d848781335afa93841561105e578e889493928f8d8f918e95869a610ff4575b50516001600160a01b039092168252602082019890985295969495610d5b9533917f791dc3c592030bf4663f565dca458fa1357e342c6e96ea23536fd333d02ad9f29080604081015b0390a490919250610d48565b9798505050509550905082813d8311611057575b61101281836111c5565b8101031261043957888e88958f8d8f91610fe87f791dc3c592030bf4663f565dca458fa1357e342c6e96ea23536fd333d02ad9f291610d5b99519b9a99509150610f9f565b503d611008565b8d513d8b823e3d90fd5b6110749098919861119b565b9638610f42565b8780fd5b89516321b6aead60e21b81528390fd5b90508d81813d83116110b7575b6110a681836111c5565b81010312610a7d5751610d2a610d20565b503d61109c565b9092508b81813d83116110e6575b6110d681836111c5565b810103126103c457519138610cfb565b503d6110cc565b9091508a81813d8311611115575b61110581836111c5565b81010312610a9357519038610cd8565b503d6110fb565b50875163a2e5167160e01b8152fd5b61114291508b3d8d116105115761050381836111c5565b38610c8a565b8280fd5b600435906001600160a01b038216820361043957565b919091805483101561118557600052601860206000208360021c019260031b1690565b634e487b7160e01b600052603260045260246000fd5b67ffffffffffffffff81116111af57604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff8211176111af57604052565b9081602091031261043957516001600160a01b03811681036104395790565b8115611210570490565b634e487b7160e01b600052601260045260246000fd5b60001981146112355760010190565b634e487b7160e01b600052601160045260246000fd5b5190811515820361043957565b519067ffffffffffffffff8216820361043957565b519062ffffff8216820361043957565b91908110156111855760051b0190565b8054680100000000000000008110156111af576112af91600182018155611162565b819291549060031b9167ffffffffffffffff809116831b921b1916179055565b6e5af43d82803e903d91602b57fd5bf390763d602d80600a3d3981f3363d3d373d3d3d363d7300000062ffffff8260881c161760005260781b17602052603760096000f0906001600160a01b0382161561132557565b60405162461bcd60e51b8152602060048201526016602482015275115490cc4c4d8dce8818dc99585d194819985a5b195960521b6044820152606490fdfea26469706673582212208d949aca633b2edb519bddc6548d20f3e17b762cefc692f905677be5e060c19f64736f6c63430008120033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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
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.