Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
18250627 | 404 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Minimal Proxy Contract for 0xc06053fcad0a0df7cc32289a135bbea9030c010f
Contract Name:
SimpleERC20Escrow
Compiler Version
v0.8.13+commit.abaa5c0e
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2022-12-11 */ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.13; /// @dev Caution: We assume all failed transfers cause reverts and ignore the returned bool. interface IERC20 { function transfer(address,uint) external returns (bool); function transferFrom(address,address,uint) external returns (bool); function balanceOf(address) external view returns (uint); } /** @title Simple ERC20 Escrow @notice Collateral is stored in unique escrow contracts for every user and every market. @dev Caution: This is a proxy implementation. Follow proxy pattern best practices */ contract SimpleERC20Escrow { address public market; IERC20 public token; /** @notice Initialize escrow with a token @dev Must be called right after proxy is created @param _token The IERC20 token to be stored in this specific escrow */ function initialize(IERC20 _token, address) public { require(market == address(0), "ALREADY INITIALIZED"); market = msg.sender; token = _token; } /** @notice Transfers the associated ERC20 token to a recipient. @param recipient The address to receive payment from the escrow @param amount The amount of ERC20 token to be transferred. */ function pay(address recipient, uint amount) public { require(msg.sender == market, "ONLY MARKET"); token.transfer(recipient, amount); } /** @notice Get the token balance of the escrow @return Uint representing the token balance of the escrow */ function balance() public view returns (uint) { return token.balanceOf(address(this)); } /** @notice Function called by market on deposit. Function is empty for this escrow. @dev This function should remain callable by anyone to handle direct inbound transfers. */ function onDeposit() public { } }
[{"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"market","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"onDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"pay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ 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.