WolfLaunchPool

0x42d8ca0bb43ef67ac0d9d81ed443922ae24cac8d

Verification
Verified
v0.8.27+commit.40a35a09
Type
Contract
1,402 bytes
ABI entries
16
3 read · 5 write
License
none

Contract information

Address
0x42d8ca0bb43ef67ac0d9d81ed443922ae24cac8d
Chain
Robinhood Chain (4663)
Compiler
v0.8.27+commit.40a35a09
Optimization
Enabled
Creation tx
0xacba6b2bfc…0858180494

Token

Not a token

This contract does not expose ERC-20 metadata.

Read contract (3)

Token()address
getReserves()uint256, uint256
owner()address

Events (1)

OwnershipTransferred

ABI

[
  {
    "inputs": [
      {
        "internalType": "contract WolfLaunchERC20",
        "name": "token",
        "type": "address"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "constructor"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "owner",
        "type": "address"
      }
    ],
    "name": "OwnableInvalidOwner",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "account",
        "type": "address"
      }
    ],
    "name": "OwnableUnauthorizedAccount",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "ReentrancyGuardReentrantCall",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "TransferFailed",
    "type": "error"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "previousOwner",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "newOwner",
        "type": "address"
      }
    ],
    "name": "OwnershipTransferred",
    "type": "event"
  },
  {
    "stateMutability": "payable",
    "type": "fallback"
  },
  {
    "inputs": [],
    "name": "Token",
    "outputs": [
      {
        "internalType": "contract WolfLaunchERC20",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "getReserves",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "etherReserves",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "tokenReserves",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "graduate",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "owner",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "renounceOwnership",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "recipient",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      }
    ],
    "name": "transferNative",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "newOwner",
        "type": "address"
      }
    ],
    "name": "transferOwnership",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "recipient",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      }
    ],
    "name": "transferToken",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "stateMutability": "payable",
    "type": "receive"
  }
]

Source code

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.12;

import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; // @5.0.2
import "./WolfLauncherToken.sol";

contract WolfLaunchPool is Ownable, ReentrancyGuard {

    error TransferFailed();

    WolfLaunchERC20 public Token;

    constructor(WolfLaunchERC20 token) Ownable(msg.sender) {
        Token = token;
    }

    function graduate() public onlyOwner {
        uint balance = Token.balanceOf(address(this));
        if (!Token.transfer(owner(), balance)) revert TransferFailed();
        (bool sent, ) = owner().call{value: address(this).balance}("");
        if (!sent) revert TransferFailed();
    }

    function transferNative(address recipient, uint amount) public onlyOwner nonReentrant {
        (bool sent, ) = recipient.call{value: amount}("");
        if (!sent) revert TransferFailed();
    }

    function transferToken(address recipient, uint amount) public onlyOwner nonReentrant {
        if (!Token.transfer(recipient, amount)) revert TransferFailed();
    }

    function getReserves() public view returns (uint etherReserves, uint tokenReserves) {
        return (address(this).balance, Token.balanceOf(address(this)));
    }

    receive() external payable {
        return;
    }

    fallback() external payable {
        return;
    }

}
Chain explorer8407msChain node79ms