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

import {Script, console} from "forge-std/Script.sol";
import {TokenRegistry} from "../../contracts/tokenization/TokenRegistry.sol";

contract RegisterToken is Script {
    function run(
        address registryAddress,
        address tokenAddress,
        string memory tokenId,
        string memory underlyingAsset,
        address issuer,
        string memory backingReserve
    ) external {
        TokenRegistry registry = TokenRegistry(registryAddress);
        
        vm.startBroadcast();
        registry.registerToken(
            tokenAddress,
            tokenId,
            underlyingAsset,
            issuer,
            backingReserve
        );
        vm.stopBroadcast();
        
        console.log("Token registered:", tokenId);
    }
}
