Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
This contract has been partially verified via Sourcify.
View contract in Sourcify repository
- Contract name:
- ZeroTaxHandler
- Optimization enabled
- true
- Compiler version
- v0.8.11+commit.d7f03943
- Optimization runs
- 888
- EVM Version
- london
- Verified at
- 2026-04-15T00:58:14.183098Z
contracts/tax/ZeroTaxHandler.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
import "./ITaxHandler.sol";
/**
* @title Zero tax handler contract
* @dev This contract should only be used by protocols that collect taxes on certain transactions and want to set it to
* zero.
*/
contract ZeroTaxHandler is ITaxHandler {
/**
* @notice Get taxed tokens for transfers. This method always returns zero.
* @param benefactor Address of the benefactor.
* @param beneficiary Address of the beneficiary.
* @param amount Number of tokens in the transfer.
* @return Number of tokens to pay as tax. This is statically set to zero.
*/
function getTax(
address benefactor,
address beneficiary,
uint256 amount
) external pure override returns (uint256) {
// Silence a few warnings. This will be optimized out by the compiler.
benefactor;
beneficiary;
amount;
return 0;
}
}
/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
/**
* @title Tax handler interface
* @dev Any class that implements this interface can be used for protocol-specific tax calculations.
*/
interface ITaxHandler {
/**
* @notice Get number of tokens to pay as tax.
* @param benefactor Address of the benefactor.
* @param beneficiary Address of the beneficiary.
* @param amount Number of tokens in the transfer.
* @return Number of tokens to pay as tax.
*/
function getTax(
address benefactor,
address beneficiary,
uint256 amount
) external view returns (uint256);
}
/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
/**
* @title Tax handler interface
* @dev Any class that implements this interface can be used for protocol-specific tax calculations.
*/
interface ITaxHandler {
/**
* @notice Get number of tokens to pay as tax.
* @param benefactor Address of the benefactor.
* @param beneficiary Address of the beneficiary.
* @param amount Number of tokens in the transfer.
* @return Number of tokens to pay as tax.
*/
function getTax(
address benefactor,
address beneficiary,
uint256 amount
) external view returns (uint256);
}
Compiler Settings
{"remappings":[],"optimizer":{"runs":888,"enabled":true},"metadata":{"bytecodeHash":"none"},"libraries":{},"evmVersion":"london","compilationTarget":{"contracts/tax/ZeroTaxHandler.sol":"ZeroTaxHandler"}}
Contract ABI
[{"type":"function","stateMutability":"pure","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getTax","inputs":[{"type":"address","name":"benefactor","internalType":"address"},{"type":"address","name":"beneficiary","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]}]
Contract Creation Code
0x608060405234801561001057600080fd5b5060bf8061001f6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063d7ad21ac14602d575b600080fd5b60416038366004607b565b60009392505050565b60405190815260200160405180910390f35b803573ffffffffffffffffffffffffffffffffffffffff81168114607657600080fd5b919050565b600080600060608486031215608f57600080fd5b6096846053565b925060a2602085016053565b915060408401359050925092509256fea164736f6c634300080b000a
Deployed ByteCode
0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063d7ad21ac14602d575b600080fd5b60416038366004607b565b60009392505050565b60405190815260200160405180910390f35b803573ffffffffffffffffffffffffffffffffffffffff81168114607657600080fd5b919050565b600080600060608486031215608f57600080fd5b6096846053565b925060a2602085016053565b915060408401359050925092509256fea164736f6c634300080b000a