RelicHub

Description:

Smart contract deployed on Ethereum.

Blockchain: Ethereum

Source Code: View Code On The Blockchain

Solidity Source Code:

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

interface IRelicNFT {
    function mintReceipt(
        address to,
        uint256 ethIn,
        uint256 jujuBurned,
        uint256 poochMint,
        string calldata tag
    ) external returns (uint256 tokenId);
}

/**
 * @title RelicHub
 * @notice Single-purpose linker: any altar calls this; it mints on the canonical Relic NFT
 *         and emits a Link event that records which altar minted which tokenId.
 */
contract RelicHub {
    address public immutable relicNft;

    event RelicLinked(
        uint256 indexed tokenId,
        address indexed altar,
        address indexed to,
        uint256 ethIn,
        uint256 jujuBurned,
        uint256 poochMint,
        string tag
    );

    constructor(address _relicNft) {
        require(_relicNft != address(0), "HUB: relicNft=0");
        relicNft = _relicNft;
    }

    /// @dev Call from the altar. `msg.sender` is recorded as the altar.
    function mintForCaller(
        address to,
        uint256 ethIn,
        uint256 jujuBurned,
        uint256 poochMint,
        string calldata tag
    ) external returns (uint256 tokenId) {
        tokenId = IRelicNFT(relicNft).mintReceipt(to, ethIn, jujuBurned, poochMint, tag);
        emit RelicLinked(tokenId, msg.sender, to, ethIn, jujuBurned, poochMint, tag);
    }
}

Tags:
addr:0x72216840921fa18ccb498acef915c34130427da7|verified:true|block:23486290|tx:0x3e221d3d79ee5664532b5754acbd58f8ea7a77b784dc9a2cfb5c3323bfdec23f|first_check:1759389561

Submitted on: 2025-10-02 09:19:21

Comments

Log in to comment.

No comments yet.