vittominacori / erc1363-payable-token

Reference implementation for the ERC-1363 Payable Token
https://vittominacori.github.io/erc1363-payable-token/
MIT License
132 stars 52 forks source link

"Usage" Documentation does not compile #20

Closed CalamariAce closed 10 months ago

CalamariAce commented 10 months ago

The "Usage" documentation gives the following code:

pragma solidity ^0.8.20;

import {ERC1363} from "erc-payable-token/contracts/token/ERC1363/ERC1363.sol";

contract MyToken is ERC1363 {
    constructor(string memory name, string memory symbol) ERC20(name, symbol) {
        // your stuff
    }

  // your stuff
}

However, pasting this into the current 0.40 version of Remix produces the following compilation error:

DeclarationError: Identifier not found or not unique.
 --> contracts/test.sol:6:59:
  |
6 |     constructor(string memory name, string memory symbol) ERC20(name, symbol) {
  |                                                           ^^^^^

Please advise how this contract should be inherited, as the documentation approach no longer appears to work. Thank you.

CalamariAce commented 10 months ago

It seems to work after replacing the import line with:

import "erc-payable-token/contracts/token/ERC1363/ERC1363.sol";

vittominacori commented 10 months ago

Fixed https://github.com/vittominacori/erc1363-payable-token/commit/886056dc94778b9b5175e7f66a88b53311624d5b

Thank you