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);
}
}
Submitted on: 2025-10-02 09:19:21
Comments
Log in to comment.
No comments yet.