Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add http support for imports #233 #241

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

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
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.

None yet

2 participants