Skip to content

Conversation

@r-gochain
Copy link
Contributor

@r-gochain r-gochain commented Dec 30, 2021

adds support of the following imports

pragma solidity ^0.8.10;

import "https://raw.githubusercontent.com/nibbstack/erc721/master/src/contracts/tokens/nf-token-metadata.sol";
import "https://raw.githubusercontent.com/nibbstack/erc721/master/src/contracts/tokens/nf-token.sol";
import "https://raw.githubusercontent.com/nibbstack/erc721/master/src/contracts/tokens/erc721-metadata.sol";
import "https://raw.githubusercontent.com/nibbstack/erc721/master/src/contracts/ownership/ownable.sol";
import "https://raw.githubusercontent.com/nibbstack/erc721/master/src/contracts/tokens/erc721.sol";
import "https://raw.githubusercontent.com/nibbstack/erc721/master/src/contracts/tokens/erc721-token-receiver.sol";
import "https://raw.githubusercontent.com/nibbstack/erc721/master/src/contracts/utils/erc165.sol";
import "https://raw.githubusercontent.com/nibbstack/erc721/master/src/contracts/utils/supports-interface.sol";
import "https://raw.githubusercontent.com/nibbstack/erc721/master/src/contracts/utils/address-utils.sol";


contract newNFT is NFTokenMetadata, Ownable {

constructor() {
nftName = "Synth NFT";
nftSymbol = "SYN";
}

function mint(address _to, uint256 _tokenId,
string calldata _uri) external onlyOwner {
super._mint(_to, _tokenId);
super._setTokenUri(_tokenId, _uri);
}

}

@r-gochain r-gochain requested a review from treeder December 30, 2021 13:00
@r-gochain
Copy link
Contributor Author

@treeder wdyt?
The downside is that it requires you to build a list of dependencies and explicitly mention all of them in the header (in theory we could scan every file for imports and try to resolve them)

@treeder
Copy link
Contributor

treeder commented Jan 3, 2022

Why can't we just let solc handle it?

@r-gochain
Copy link
Contributor Author

@treeder because solc doesn't support that (only remix - they recommend using it) check this thread - #233 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants