APE Price: $1.56 (-3.28%)

Contract Diff Checker

Contract Name:
ContractInteractions

Contract Source Code:

File 1 of 1 : ContractInteractions

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

interface IDixoToken {
    function transfer(address to, uint256 amount) external returns (bool);
    function balanceOf(address account) external view returns (uint256);
}

interface IRewards {
    function setEpisodeMetadata(
        uint256 episodeId,
        uint256 releaseTime,
        string calldata genre
    ) external;
}

contract ContractInteractions {
    IDixoToken public dixoToken = IDixoToken(0xdB5fFfc581cc045583CF58afcA4F9EBa40dDd002);
    IRewards public rewards = IRewards(0xCEC128f099FB4d2F852c27903d6c50aEeEdd3064);
    
    function sendTokensToRewards(uint256 amount) external {
        require(dixoToken.transfer(address(rewards), amount), "Transfer failed");
    }
    
    function setUpEpisode(
        uint256 episodeId,
        uint256 releaseTime,
        string calldata genre
    ) external {
        rewards.setEpisodeMetadata(episodeId, releaseTime, genre);
    }
    
    function checkTokenBalance(address account) external view returns (uint256) {
        return dixoToken.balanceOf(account);
    }
}

Please enter a contract address above to load the contract details and source code.

Context size (optional):