g8keepPenaltyReceiver

g8keepPenaltyReceiver

Inherits: Ownable

Receives tokens from g8keep snipe protection penalties for [redacted].

State Variables

allowedTransferers

Mapping of addresses that are allowed to transfer tokens from the penalty receiver.

mapping(address => uint256) public allowedTransferers;

ALLOWED_TIME_DELAY

Guardrail to prevent a newly added transferer from transfering tokens immediately.

uint256 private constant ALLOWED_TIME_DELAY = 1 days;

Functions

onlyAllowedTransferer

modifier onlyAllowedTransferer();

constructor

Constructs the g8keepPenaltyReceiver contract.

constructor(address _defaultOwner);

Parameters

setAllowedTransferer

Admin function to configure a paired token.

function setAllowedTransferer(address transferer, bool allowed) external onlyOwner;

Parameters

transferToken

Transfers an amount of tokenAddress from the contract to to.

Throws when called by an address that is not an allowed transferer.

function transferToken(address tokenAddress, address to, uint256 amount) external onlyAllowedTransferer;

Parameters

Events

AllowedTransfererUpdated

Emitted when the penalty receiver owner updates an allowed transferer.

event AllowedTransfererUpdated(address indexed transferer, bool allowed, uint256 allowedTime);

Errors

NoUpdate

Thrown when allowing or removing a transferer and no change would be made.

error NoUpdate();

NotAllowed

Thrown when a transfer request is made by an address that is not allowed.

error NotAllowed();

WithdrawalFailed

Thrown when withdrawing a token from the contract and the withdrawal fails.

error WithdrawalFailed();

ZeroAddress

Thrown when attempting to set the zero address as an allowed transferer.

error ZeroAddress();

Last updated