Deploy using Foundry
Last updated
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.25;
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";
contract RolexYachtMaster40 is Ownable, ERC721 {
error NFTAlreadyMinted();
bool private _minted;
constructor() Ownable(msg.sender) ERC721("Rolex Yacht-Master 40", "") {}
function mint() public onlyOwner returns (uint256) {
if (_minted) {
revert NFTAlreadyMinted();
}
_safeMint(owner(), 0);
_minted = true;
return 0;
}
}forge build
[⠰] Compiling...
[⠔] Compiling 38 files with Solc 0.8.27
[⠒] Solc 0.8.27 finished in 1.01s
Compiler run successful!export PLUME_RPC_URL=https://testnet-rpc.plume.org
export CONTRACT_PATH=<contract_file>:<contract_name>
forge create $CONTRACT_PATH \
--rpc-url $PLUME_RPC_URL \
--broadcast \
--legacy --interactiveexport PLUME_RPC_URL=https://testnet-rpc.plume.org
export VERIFIER_URL=https://testnet-explorer.plume.org/api/
export CONTRACT_PATH=<contract_file>:<contract_name>
forge create $CONTRACT_PATH \
--rpc-url $PLUME_RPC_URL \
--verify \
--verifier blockscout \
--verifier-url $VERIFIER_URL \
--broadcast \
--legacy --interactiveNo files changed, compilation skipped
Enter private key:
Deployer: 0x32820DE739394C1ee69264ef3C0193E4B5C0122c
Deployed to: 0xa43a88ccfec87295aa0c5017a7ddcc5cdfcacdd0
Transaction hash: 0x1441297a9288fc37820a09e2e9b1d14d62b5d6341fd1e14159eabcedb7dfe115