Pandora-Labs-Org / erc404

402 stars 186 forks source link

zsh: parse error near `}' #13

Closed slussshy closed 9 months ago

slussshy commented 9 months ago

I am a new learner here. I am trying to do a Quickstart in your latest tutorial and everything works fine installing forge etc. when I get to the step that runs the example code I get an error at the end zsh: parse error near `}':

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

import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; import {ERC404} from "erc404/ERC404.sol";

contract ExampleERC404 is Ownable, ERC404 { constructor( string memory name, string memory symbol, uint8 decimals, uint256 maxTotalSupplyERC721, address initialOwner ) ERC404(name, symbol, decimals) Ownable(initialOwner_) { setERC721TransferExempt(initialOwner, true); mintERC20(initialOwner, maxTotalSupplyERC721_ * units, false); }

function tokenURI(uint256 id) public pure override returns (string memory) { return string.concat("https://example.com/token/", Strings.toString(id)); }

function setERC721TransferExempt(address account, bool value) external onlyOwner { setERC721TransferExempt(account, value_); } }

zsh: parse error near `}'

How do I get around this problem? I have tried reinstalling zsh with homebrew. still the same. sorry if this is basic stuff but I searched the internet everywhere and can't find a straight answer.

mathdroid commented 9 months ago

image

Make a file with this content instead of copy-pasting this to the terminal :) @slussshy

slussshy commented 9 months ago

thanks! will do!