// SPDX-License-Identifier: MIT
pragma solidity 0.8.35;
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
/// @notice Asset custody for NFT staking rewards. Only the immutable controller can pay or withdraw.
contract dont_buyRewardsPool is ReentrancyGuard {
bytes32 public constant launchFingerprint = 0x3d7d1f8ea899b837b07927361412eeceae2ec5e8942d8de61c4313b18f527718;
using SafeERC20 for IERC20;
IERC20 public immutable rewardAsset;
address public immutable controller;
uint256 public totalFunded;
uint256 public totalPaid;
uint256 public totalExcessWithdrawn;
error InvalidAddress();
error OnlyController(address caller);
error ZeroAmount();
error InsufficientAssets(uint256 requested, uint256 available);
event RewardsFunded(address indexed funder, uint256 requested, uint256 received);
event RewardPaid(address indexed account, uint256 amount);
event ExcessWithdrawn(address indexed recipient, uint256 amount);
constructor(IERC20 rewardAsset_, address controller_) {
if (
address(rewardAsset_) == address(0) || controller_ == address(0)
|| address(rewardAsset_).code.length == 0
) revert InvalidAddress();
rewardAsset = rewardAsset_;
controller = controller_;
}
modifier onlyController() {
if (msg.sender != controller) revert OnlyController(msg.sender);
_;
}
function fund(uint256 amount) external nonReentrant returns (uint256 received) {
if (amount == 0) revert ZeroAmount();
uint256 beforeBalance = rewardAsset.balanceOf(address(this));
rewardAsset.safeTransferFrom(msg.sender, address(this), amount);
received = rewardAsset.balanceOf(address(this)) - beforeBalance;
if (received == 0) revert ZeroAmount();
totalFunded += received;
emit RewardsFunded(msg.sender, amount, received);
}
function availableRewards() public view returns (uint256) {
return rewardAsset.balanceOf(address(this));
}
function pay(address account, uint256 amount) external onlyController nonReentrant {
if (account == address(0)) revert InvalidAddress();
uint256 available = availableRewards();
if (amount == 0 || amount > available) revert InsufficientAssets(amount, available);
totalPaid += amount;
rewardAsset.safeTransfer(account, amount);
emit RewardPaid(account, amount);
}
function withdrawExcess(address recipient, uint256 amount) external onlyController nonReentrant {
if (recipient == address(0)) revert InvalidAddress();
uint256 available = availableRewards();
if (amount == 0 || amount > available) revert InsufficientAssets(amount, available);
totalExcessWithdrawn += amount;
rewardAsset.safeTransfer(recipient, amount);
emit ExcessWithdrawn(recipient, amount);
}
}[
{
"type": "constructor",
"inputs": [
{
"name": "rewardAsset_",
"type": "address",
"internalType": "contract IERC20"
},
{
"name": "controller_",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "nonpayable"
},
{
"name": "InsufficientAssets",
"type": "error",
"inputs": [
{
"name": "requested",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "available",
"type": "uint256",
"internalType": "uint256"
}
]
},
{
"name": "InvalidAddress",
"type": "error",
"inputs": []
},
{
"name": "OnlyController",
"type": "error",
"inputs": [
{
"name": "caller",
"type": "address",
"internalType": "address"
}
]
},
{
"name": "ReentrancyGuardReentrantCall",
"type": "error",
"inputs": []
},
{
"name": "SafeERC20FailedOperation",
"type": "error",
"inputs": [
{
"name": "token",
"type": "address",
"internalType": "address"
}
]
},
{
"name": "ZeroAmount",
"type": "error",
"inputs": []
},
{
"name": "ExcessWithdrawn",
"type": "event",
"inputs": [
{
"name": "recipient",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"name": "RewardPaid",
"type": "event",
"inputs": [
{
"name": "account",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"name": "RewardsFunded",
"type": "event",
"inputs": [
{
"name": "funder",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "requested",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "received",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"name": "availableRewards",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "controller",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"name": "fund",
"type": "function",
"inputs": [
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "received",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "nonpayable"
},
{
"name": "launchFingerprint",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"name": "pay",
"type": "function",
"inputs": [
{
"name": "account",
"type": "address",
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "rewardAsset",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IERC20"
}
],
"stateMutability": "view"
},
{
"name": "totalExcessWithdrawn",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "totalFunded",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "totalPaid",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "withdrawExcess",
"type": "function",
"inputs": [
{
"name": "recipient",
"type": "address",
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
}
]0x608060405234801561000f575f5ffd5b50600436106100b9575f3560e01c8063ad044f4911610072578063ca1d209d11610058578063ca1d209d14610184578063e7b0f66614610197578063f77c4791146101a0575f5ffd5b8063ad044f4914610169578063c407687614610171575f5ffd5b80632aedc7b7116100a25780632aedc7b7146101255780636e90013d1461014c578063879d909014610161575f5ffd5b80630ac6702a146100bd5780632699d0a21461010e575b5f5ffd5b6100e47f000000000000000000000000fa7c98477db844332def72e9876dd3be740b5e4181565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b61011760025481565b604051908152602001610105565b6101177f3d7d1f8ea899b837b07927361412eeceae2ec5e8942d8de61c4313b18f52771881565b61015f61015a366004610b3f565b6101c7565b005b6101176103c0565b6101175f5481565b61015f61017f366004610b3f565b610473565b610117610192366004610b81565b610631565b61011760015481565b6100e47f000000000000000000000000817d3f0bc373d6d28a20a181ac9ca0ee82f6b3d581565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000817d3f0bc373d6d28a20a181ac9ca0ee82f6b3d5161461023d576040517fa3646b5f0000000000000000000000000000000000000000000000000000000081523360048201526024015b60405180910390fd5b6102456108d7565b73ffffffffffffffffffffffffffffffffffffffff8216610292576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61029b6103c0565b90508115806102a957508082115b156102ea576040517fb97fded10000000000000000000000000000000000000000000000000000000081526004810183905260248101829052604401610234565b8160025f8282546102fb9190610bc5565b90915550610342905073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000fa7c98477db844332def72e9876dd3be740b5e41168484610905565b8273ffffffffffffffffffffffffffffffffffffffff167f9bdedcc968f2c0682145c20289dfbb3081a39684571116ab45eabfef512e94738360405161038a91815260200190565b60405180910390a2506103bc60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5050565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f907f000000000000000000000000fa7c98477db844332def72e9876dd3be740b5e4173ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa15801561044a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061046e9190610bde565b905090565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000817d3f0bc373d6d28a20a181ac9ca0ee82f6b3d516146104e4576040517fa3646b5f000000000000000000000000000000000000000000000000000000008152336004820152602401610234565b6104ec6108d7565b73ffffffffffffffffffffffffffffffffffffffff8216610539576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6105426103c0565b905081158061055057508082115b15610591576040517fb97fded10000000000000000000000000000000000000000000000000000000081526004810183905260248101829052604401610234565b8160015f8282546105a29190610bc5565b909155506105e9905073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000fa7c98477db844332def72e9876dd3be740b5e41168484610905565b8273ffffffffffffffffffffffffffffffffffffffff167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04868360405161038a91815260200190565b5f61063a6108d7565b815f03610673576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f907f000000000000000000000000fa7c98477db844332def72e9876dd3be740b5e4173ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa1580156106fd573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107219190610bde565b905061076573ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000fa7c98477db844332def72e9876dd3be740b5e4116333086610965565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015281907f000000000000000000000000fa7c98477db844332def72e9876dd3be740b5e4173ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa1580156107ef573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108139190610bde565b61081d9190610bf5565b9150815f03610858576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815f5f8282546108689190610bc5565b9091555050604080518481526020810184905233917f17c4c73fe3b5d172ec864d377fb9e2323d3f90de65eed172cc20232b48ab2ae1910160405180910390a2506108d260017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b919050565b6108df6109c7565b60027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b6109128383836001610a24565b610960576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610234565b505050565b610973848484846001610aac565b6109c1576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610234565b50505050565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0054600203610a22576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b6040517fa9059cbb000000000000000000000000000000000000000000000000000000005f81815273ffffffffffffffffffffffffffffffffffffffff8616600452602485905291602083604481808b5af1925060015f51148316610aa0578383151615610a94573d5f823e3d81fd5b5f873b113d1516831692505b60405250949350505050565b6040517f23b872dd000000000000000000000000000000000000000000000000000000005f81815273ffffffffffffffffffffffffffffffffffffffff8781166004528616602452604485905291602083606481808c5af1925060015f51148316610b2e578383151615610b22573d5f823e3d81fd5b5f883b113d1516831692505b604052505f60605295945050505050565b5f5f60408385031215610b50575f5ffd5b823573ffffffffffffffffffffffffffffffffffffffff81168114610b73575f5ffd5b946020939093013593505050565b5f60208284031215610b91575f5ffd5b5035919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b80820180821115610bd857610bd8610b98565b92915050565b5f60208284031215610bee575f5ffd5b5051919050565b81810381811115610bd857610bd8610b9856fea2646970667358221220713844556dbf19ab396ab292d307cbd232fe91d496644df91929d8d9e7d8113764736f6c63430008230033
| Token | Symbol | Balance | Price | Value |
|---|---|---|---|---|
| dont.buy (dont.buy) | dont.buy | 100,000 | — | — |
| Type | Age | Block | Details |
|---|---|---|---|
| no cross-chain L1↔L2 transactions for this address | |||
| Transaction Hash | Method | Block | Age | From | To | Type | Item | ||
|---|---|---|---|---|---|---|---|---|---|
| no NFT transfers for this address yet | |||||||||
| Txn Hash | Age | Event | Topics / Data |
|---|---|---|---|
| 0xd47e4a…7ee908 | 22 days agoSat, 25 Jul 2026 22:16:35 UTC | 0x17c4c7…2ae1 | [0] 0x000000000000…c1865d59 data: 0x000000000000000000…f6800000 |
| Transaction Hash | Method ? | Block | Age | From | To | Amount | Txn Fee ? | ||
|---|---|---|---|---|---|---|---|---|---|
| 0xd47e4a…7ee908 | fund | 19,361,562 | 22 days agoSat, 25 Jul 2026 22:16:35 UTC | 0xf073…5d59 | IN | dont_buyRewardsPool | $0.000 ETH | 0.00000606 |
| Transaction Hash | Method | Block | Age | From | To | Amount | Token | ||
|---|---|---|---|---|---|---|---|---|---|
| 0xd47e4aa6…7ee908 | Transfer | 19,361,562 | 22 days agoSat, 25 Jul 2026 22:16:35 UTC | 0xf073…5d59 | IN | 0x9533…ac90 | 99,999.999999 dont.buy | dont.buy (dont.buy) |
| Block | Age | Parent Transaction Hash | Type | Method | From | To | Value | |
|---|---|---|---|---|---|---|---|---|
| 19,361,546 | 22 days agoSat, 25 Jul 2026 22:16:34 UTC | 0x56161d…579c88 | CREATE2 | 0x512bfb8e | 0x4e59…956c | IN | 0x9533…ac90 | 0 ETH |