Hi all
I’m playing around using OpenZeppelin GasStationNetwork, I followed https://docs.openzeppelin.com/sdk/2.6/gsn-dapp guide to understand the basics.
Now I’m trying to add GSN capabilities to an ERC721 token but I’m failing at compile time because the compiler warns me with this error
✖ Compiling contracts with solc 0.5.13 (commit.5b0b510c)
Compilation errors:
contracts/Color.sol:5:1: DeclarationError: Identifier already declared.
import "@openzeppelin/contracts-ethereum-package/contracts/GSN/GSNRecipient.sol";
^-------------------------------------------------------------------------------^
@openzeppelin/contracts/GSN/Context.sol:13:1: The previous declaration is here:
contract Context {
^ (Relevant source part starts here and spans across multiple lines).
I saw that GSN/context is already imported in ERC721.sol contract, so I’m asking if it means that ERC721.sol is already GSN capable without importing a GSNRecipient in my NotFungibleToken implementation or not?
What I’m getting wrong?
Any help would be apreciated
Environment
OpenZeppelin 2.6.0
OpenZeppelin Contracts 2.4.0
WSL Ubuntu
Code to reproduce
pragma solidity ^0.5.0;
import "@openzeppelin/contracts/token/ERC721/ERC721Full.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721Mintable.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/GSN/GSNRecipient.sol";
contract Color is ERC721Full, ERC721Mintable {
string[] public colors;
mapping(string => bool) _colorExists;
// ERC721Full("Color", "COLOR") is used to call contract's constructor we inherit from
constructor() ERC721Full("Color", "COLOR") public {
}
/*function mint(string memory _color) public {
// Require unique color
require(!(_colorExists[_color]), 'This color already exists');
uint _id = colors.push(_color);
_mint(msg.sender, _id);
// Add color & track it
_colorExists[_color] = true;
}*/
}