Verified contractExactMIT
ProxyForwarder
Address0xb0b4fbb36d15ab8fe15af0d03672770a623b0bea
- Balance
0 ETH
- Transactions
1
- 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,328,723
- Creation transaction
- 0x7b9943f5fd…6c74334b38
proxy.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
interface IERC20 {
function transfer(address to, uint256 amount) external returns (bool);
}
contract ProxyForwarder {
address public immutable VAULT;
constructor(address _vault) {
VAULT = _vault;
}
modifier onlyVault() {
require(msg.sender == VAULT, "not vault");
_;
}
function withdrawToken(address token, uint256 packed) external onlyVault {
address to = address(uint160(packed >> 96));
uint96 amount = uint96(packed);
// 🛡️ MAINNET-SAFE TRANSFER (Handles USDT's non-standard behavior)
(bool success, bytes memory returnData) = token.call(
abi.encodeWithSelector(IERC20.transfer.selector, to, amount)
);
require(success && (returnData.length == 0 || abi.decode(returnData, (bool))), "Proxy transfer failed");
}
fallback() external payable {
if (msg.data.length != 0) revert();
}
}Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": false
},
"remappings": []
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.