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

compile failed #2

Open
summerxue1992 opened this issue Feb 19, 2021 · 3 comments
Open

compile failed #2

summerxue1992 opened this issue Feb 19, 2021 · 3 comments

Comments

@summerxue1992
Copy link

The master branch code failed to compile locally. Can you confirm that it was successfully compiled? There are a number of issues with the compiled version of Solc.

@xuemin007
Copy link

Me too.
There is an error in Factory.sol line 63

assembly {
chainId := chainid <---here should be chainid()
}

But, once the line is updated as chainid(), then there will be lots of errors in this file.

CompileError: /C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:100:5: TypeError: Overriding function is missing "override" specifier.
function approve(address spender, uint value) external returns (bool) {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:28:5: Overridden function is here:
function approve(address spender, uint value) external returns (bool);
^--------------------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:105:5: TypeError: Overriding function is missing "override" specifier.
function transfer(address to, uint value) external returns (bool) {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:30:5: Overridden function is here:
function transfer(address to, uint value) external returns (bool);
^----------------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:110:5: TypeError: Overriding function is missing "override" specifier.
function transferFrom(address from, address to, uint value) external returns (bool) {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:32:5: Overridden function is here:
function transferFrom(address from, address to, uint value) external returns (bool);
^----------------------------------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:118:5: TypeError: Overriding function is missing "override" specifier.
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:40:5: Overridden function is here:
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
^-----------------------------------------------------------------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:46:5: TypeError: Overriding public state variable is missing "override" specifier.
string public constant name = 'HSwap LP Token';
^--------------------------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:16:5: Overridden public state variable is here:
function name() external pure returns (string memory);
^----------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:47:5: TypeError: Overriding public state variable is missing "override" specifier.
string public constant symbol = 'HMDX';
^------------------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:18:5: Overridden public state variable is here:
function symbol() external pure returns (string memory);
^------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:48:5: TypeError: Overriding public state variable is missing "override" specifier.
uint8 public constant decimals = 18;
^---------------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:20:5: Overridden public state variable is here:
function decimals() external pure returns (uint8);
^------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:49:5: TypeError: Overriding public state variable is missing "override" specifier.
uint public totalSupply;
^----------------------^
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:22:5: Overridden public state variable is here:
function totalSupply() external view returns (uint);
^--------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:50:5: TypeError: Overriding public state variable is missing "override" specifier.
mapping(address => uint) public balanceOf;
^---------------------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:24:5: Overridden public state variable is here:
function balanceOf(address owner) external view returns (uint);
^-------------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:51:5: TypeError: Overriding public state variable is missing "override" specifier.
mapping(address => mapping(address => uint)) public allowance;
^-----------------------------------------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:26:5: Overridden public state variable is here:
function allowance(address owner, address spender) external view returns (uint);
^------------------------------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:53:5: TypeError: Overriding public state variable is missing "override" specifier.
bytes32 public DOMAIN_SEPARATOR;
^-----------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:34:5: Overridden public state variable is here:
function DOMAIN_SEPARATOR() external view returns (bytes32);
^----------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:55:5: TypeError: Overriding public state variable is missing "override" specifier.
bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;
^----------------------------------------------------------------------------------------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:36:5: Overridden public state variable is here:
function PERMIT_TYPEHASH() external pure returns (bytes32);
^---------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:56:5: TypeError: Overriding public state variable is missing "override" specifier.
mapping(address => uint) public nonces;
^------------------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:38:5: Overridden public state variable is here:
function nonces(address owner) external view returns (uint);
^----------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:160:5: TypeError: Overriding function is missing "override" specifier.
function getReserves() public view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast) {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:53:5: Overridden function is here:
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
^-----------------------------------------------------------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:188:5: TypeError: Overriding function is missing "override" specifier.
function initialize(address _token0, address _token1) external {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:73:5: Overridden function is here:
function initialize(address, address) external;
^---------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:235:5: TypeError: Overriding function is missing "override" specifier.
function mint(address to) external lock returns (uint liquidity) {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:61:5: Overridden function is here:
function mint(address to) external returns (uint liquidity);
^----------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:263:5: TypeError: Overriding function is missing "override" specifier.
function burn(address to) external lock returns (uint amount0, uint amount1) {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:63:5: Overridden function is here:
function burn(address to) external returns (uint amount0, uint amount1);
^----------------------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:295:5: TypeError: Overriding function is missing "override" specifier.
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external lock {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:65:5: Overridden function is here:
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
^----------------------------------------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:329:5: TypeError: Overriding function is missing "override" specifier.
function skim(address to) external lock {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:67:5: Overridden function is here:
function skim(address to) external;
^---------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:339:5: TypeError: Overriding function is missing "override" specifier.
function sync() external lock {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:69:5: Overridden function is here:
function sync() external;
^-----------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:343:5: TypeError: Overriding function is missing "override" specifier.
function price(address token, uint256 baseDecimal) public view returns (uint256) {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:71:5: Overridden function is here:
function price(address token, uint256 baseDecimal) external view returns (uint256);
^---------------------------------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:137:5: TypeError: Overriding public state variable is missing "override" specifier.
uint public constant MINIMUM_LIQUIDITY = 10 ** 3;
^----------------------------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:45:5: Overridden public state variable is here:
function MINIMUM_LIQUIDITY() external pure returns (uint);
^--------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:140:5: TypeError: Overriding public state variable is missing "override" specifier.
address public factory;
^--------------------^
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:47:5: Overridden public state variable is here:
function factory() external view returns (address);
^-------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:141:5: TypeError: Overriding public state variable is missing "override" specifier.
address public token0;
^-------------------^
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:49:5: Overridden public state variable is here:
function token0() external view returns (address);
^------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:142:5: TypeError: Overriding public state variable is missing "override" specifier.
address public token1;
^-------------------^
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:51:5: Overridden public state variable is here:
function token1() external view returns (address);
^------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:148:5: TypeError: Overriding public state variable is missing "override" specifier.
uint public price0CumulativeLast;
^------------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:55:5: Overridden public state variable is here:
function price0CumulativeLast() external view returns (uint);
^-----------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:149:5: TypeError: Overriding public state variable is missing "override" specifier.
uint public price1CumulativeLast;
^------------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:57:5: Overridden public state variable is here:
function price1CumulativeLast() external view returns (uint);
^-----------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:150:5: TypeError: Overriding public state variable is missing "override" specifier.
uint public kLast; // reserve0 * reserve1, as of immediately after the most recent liquidity event
^---------------^
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:59:5: Overridden public state variable is here:
function kLast() external view returns (uint);
^--------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:133:1: TypeError: Derived contract must override function "DOMAIN_SEPARATOR". Two or more base classes define function with same name and parameter types. Since one of the bases defines a public state variable which cannot be overridden, you have to change the inheritance layout or the names of the functions.
contract MdexPair is IMdexPair, MdexERC20 {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:53:5: Definition in "MdexERC20":
bytes32 public DOMAIN_SEPARATOR;
^-----------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:25:5: Definition in "IMdexPair":
function DOMAIN_SEPARATOR() external view returns (bytes32);
^----------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:133:1: TypeError: Derived contract must override function "PERMIT_TYPEHASH". Two or more base classes define function with same name and parameter types. Since one of the bases defines a public state variable which cannot be overridden, you have to change the inheritance layout or the names of the functions.
contract MdexPair is IMdexPair, MdexERC20 {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:55:5: Definition in "MdexERC20":
bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;
^----------------------------------------------------------------------------------------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:27:5: Definition in "IMdexPair":
function PERMIT_TYPEHASH() external pure returns (bytes32);
^---------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:133:1: TypeError: Derived contract must override function "allowance". Two or more base classes define function with same name and parameter types. Since one of the bases defines a public state variable which cannot be overridden, you have to change the inheritance layout or the names of the functions.
contract MdexPair is IMdexPair, MdexERC20 {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:51:5: Definition in "MdexERC20":
mapping(address => mapping(address => uint)) public allowance;
^-----------------------------------------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:17:5: Definition in "IMdexPair":
function allowance(address owner, address spender) external view returns (uint);
^------------------------------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:133:1: TypeError: Derived contract must override function "approve". Two or more base classes define function with same name and parameter types.
contract MdexPair is IMdexPair, MdexERC20 {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:100:5: Definition in "MdexERC20":
function approve(address spender, uint value) external returns (bool) {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:19:5: Definition in "IMdexPair":
function approve(address spender, uint value) external returns (bool);
^--------------------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:133:1: TypeError: Derived contract must override function "balanceOf". Two or more base classes define function with same name and parameter types. Since one of the bases defines a public state variable which cannot be overridden, you have to change the inheritance layout or the names of the functions.
contract MdexPair is IMdexPair, MdexERC20 {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:50:5: Definition in "MdexERC20":
mapping(address => uint) public balanceOf;
^---------------------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:15:5: Definition in "IMdexPair":
function balanceOf(address owner) external view returns (uint);
^-------------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:133:1: TypeError: Derived contract must override function "decimals". Two or more base classes define function with same name and parameter types. Since one of the bases defines a public state variable which cannot be overridden, you have to change the inheritance layout or the names of the functions.
contract MdexPair is IMdexPair, MdexERC20 {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:48:5: Definition in "MdexERC20":
uint8 public constant decimals = 18;
^---------------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:11:5: Definition in "IMdexPair":
function decimals() external pure returns (uint8);
^------------------------------------------------^

@dh12306
Copy link

dh12306 commented Jun 18, 2021

Me too.

There is an error in Factory.sol line 63

assembly {

chainId := chainid <---here should be chainid()
}
But, once the line is updated as chainid(), then there will be lots of errors in this file.

CompileError: /C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol💯5: TypeError: Overriding function is missing "override" specifier.
function approve(address spender, uint value) external returns (bool) {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:28:5: Overridden function is here:
function approve(address spender, uint value) external returns (bool);
^--------------------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:105:5: TypeError: Overriding function is missing "override" specifier.
function transfer(address to, uint value) external returns (bool) {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:30:5: Overridden function is here:
function transfer(address to, uint value) external returns (bool);
^----------------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:110:5: TypeError: Overriding function is missing "override" specifier.
function transferFrom(address from, address to, uint value) external returns (bool) {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:32:5: Overridden function is here:
function transferFrom(address from, address to, uint value) external returns (bool);
^----------------------------------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:118:5: TypeError: Overriding function is missing "override" specifier.
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:40:5: Overridden function is here:
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
^-----------------------------------------------------------------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:46:5: TypeError: Overriding public state variable is missing "override" specifier.
string public constant name = 'HSwap LP Token';
^--------------------------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:16:5: Overridden public state variable is here:
function name() external pure returns (string memory);
^----------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:47:5: TypeError: Overriding public state variable is missing "override" specifier.
string public constant symbol = 'HMDX';
^------------------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:18:5: Overridden public state variable is here:
function symbol() external pure returns (string memory);
^------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:48:5: TypeError: Overriding public state variable is missing "override" specifier.
uint8 public constant decimals = 18;
^---------------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:20:5: Overridden public state variable is here:
function decimals() external pure returns (uint8);
^------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:49:5: TypeError: Overriding public state variable is missing "override" specifier.
uint public totalSupply;
^----------------------^
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:22:5: Overridden public state variable is here:
function totalSupply() external view returns (uint);
^--------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:50:5: TypeError: Overriding public state variable is missing "override" specifier.
mapping(address => uint) public balanceOf;
^---------------------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:24:5: Overridden public state variable is here:
function balanceOf(address owner) external view returns (uint);
^-------------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:51:5: TypeError: Overriding public state variable is missing "override" specifier.
mapping(address => mapping(address => uint)) public allowance;
^-----------------------------------------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:26:5: Overridden public state variable is here:
function allowance(address owner, address spender) external view returns (uint);
^------------------------------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:53:5: TypeError: Overriding public state variable is missing "override" specifier.
bytes32 public DOMAIN_SEPARATOR;
^-----------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:34:5: Overridden public state variable is here:
function DOMAIN_SEPARATOR() external view returns (bytes32);
^----------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:55:5: TypeError: Overriding public state variable is missing "override" specifier.
bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;
^----------------------------------------------------------------------------------------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:36:5: Overridden public state variable is here:
function PERMIT_TYPEHASH() external pure returns (bytes32);
^---------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:56:5: TypeError: Overriding public state variable is missing "override" specifier.
mapping(address => uint) public nonces;
^------------------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:38:5: Overridden public state variable is here:
function nonces(address owner) external view returns (uint);
^----------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:160:5: TypeError: Overriding function is missing "override" specifier.
function getReserves() public view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast) {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:53:5: Overridden function is here:
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
^-----------------------------------------------------------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:188:5: TypeError: Overriding function is missing "override" specifier.
function initialize(address _token0, address _token1) external {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:73:5: Overridden function is here:
function initialize(address, address) external;
^---------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:235:5: TypeError: Overriding function is missing "override" specifier.
function mint(address to) external lock returns (uint liquidity) {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:61:5: Overridden function is here:
function mint(address to) external returns (uint liquidity);
^----------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:263:5: TypeError: Overriding function is missing "override" specifier.
function burn(address to) external lock returns (uint amount0, uint amount1) {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:63:5: Overridden function is here:
function burn(address to) external returns (uint amount0, uint amount1);
^----------------------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:295:5: TypeError: Overriding function is missing "override" specifier.
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external lock {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:65:5: Overridden function is here:
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
^----------------------------------------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:329:5: TypeError: Overriding function is missing "override" specifier.
function skim(address to) external lock {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:67:5: Overridden function is here:
function skim(address to) external;
^---------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:339:5: TypeError: Overriding function is missing "override" specifier.
function sync() external lock {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:69:5: Overridden function is here:
function sync() external;
^-----------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:343:5: TypeError: Overriding function is missing "override" specifier.
function price(address token, uint256 baseDecimal) public view returns (uint256) {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:71:5: Overridden function is here:
function price(address token, uint256 baseDecimal) external view returns (uint256);
^---------------------------------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:137:5: TypeError: Overriding public state variable is missing "override" specifier.
uint public constant MINIMUM_LIQUIDITY = 10 ** 3;
^----------------------------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:45:5: Overridden public state variable is here:
function MINIMUM_LIQUIDITY() external pure returns (uint);
^--------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:140:5: TypeError: Overriding public state variable is missing "override" specifier.
address public factory;
^--------------------^
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:47:5: Overridden public state variable is here:
function factory() external view returns (address);
^-------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:141:5: TypeError: Overriding public state variable is missing "override" specifier.
address public token0;
^-------------------^
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:49:5: Overridden public state variable is here:
function token0() external view returns (address);
^------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:142:5: TypeError: Overriding public state variable is missing "override" specifier.
address public token1;
^-------------------^
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:51:5: Overridden public state variable is here:
function token1() external view returns (address);
^------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:148:5: TypeError: Overriding public state variable is missing "override" specifier.
uint public price0CumulativeLast;
^------------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:55:5: Overridden public state variable is here:
function price0CumulativeLast() external view returns (uint);
^-----------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:149:5: TypeError: Overriding public state variable is missing "override" specifier.
uint public price1CumulativeLast;
^------------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:57:5: Overridden public state variable is here:
function price1CumulativeLast() external view returns (uint);
^-----------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:150:5: TypeError: Overriding public state variable is missing "override" specifier.
uint public kLast; // reserve0 * reserve1, as of immediately after the most recent liquidity event
^---------------^
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:59:5: Overridden public state variable is here:
function kLast() external view returns (uint);
^--------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:133:1: TypeError: Derived contract must override function "DOMAIN_SEPARATOR". Two or more base classes define function with same name and parameter types. Since one of the bases defines a public state variable which cannot be overridden, you have to change the inheritance layout or the names of the functions.
contract MdexPair is IMdexPair, MdexERC20 {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:53:5: Definition in "MdexERC20":
bytes32 public DOMAIN_SEPARATOR;
^-----------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:25:5: Definition in "IMdexPair":
function DOMAIN_SEPARATOR() external view returns (bytes32);
^----------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:133:1: TypeError: Derived contract must override function "PERMIT_TYPEHASH". Two or more base classes define function with same name and parameter types. Since one of the bases defines a public state variable which cannot be overridden, you have to change the inheritance layout or the names of the functions.
contract MdexPair is IMdexPair, MdexERC20 {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:55:5: Definition in "MdexERC20":
bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;
^----------------------------------------------------------------------------------------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:27:5: Definition in "IMdexPair":
function PERMIT_TYPEHASH() external pure returns (bytes32);
^---------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:133:1: TypeError: Derived contract must override function "allowance". Two or more base classes define function with same name and parameter types. Since one of the bases defines a public state variable which cannot be overridden, you have to change the inheritance layout or the names of the functions.
contract MdexPair is IMdexPair, MdexERC20 {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:51:5: Definition in "MdexERC20":
mapping(address => mapping(address => uint)) public allowance;
^-----------------------------------------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:17:5: Definition in "IMdexPair":
function allowance(address owner, address spender) external view returns (uint);
^------------------------------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:133:1: TypeError: Derived contract must override function "approve". Two or more base classes define function with same name and parameter types.
contract MdexPair is IMdexPair, MdexERC20 {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol💯5: Definition in "MdexERC20":
function approve(address spender, uint value) external returns (bool) {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:19:5: Definition in "IMdexPair":
function approve(address spender, uint value) external returns (bool);
^--------------------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:133:1: TypeError: Derived contract must override function "balanceOf". Two or more base classes define function with same name and parameter types. Since one of the bases defines a public state variable which cannot be overridden, you have to change the inheritance layout or the names of the functions.
contract MdexPair is IMdexPair, MdexERC20 {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:50:5: Definition in "MdexERC20":
mapping(address => uint) public balanceOf;
^---------------------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:15:5: Definition in "IMdexPair":
function balanceOf(address owner) external view returns (uint);
^-------------------------------------------------------------^
,/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:133:1: TypeError: Derived contract must override function "decimals". Two or more base classes define function with same name and parameter types. Since one of the bases defines a public state variable which cannot be overridden, you have to change the inheritance layout or the names of the functions.
contract MdexPair is IMdexPair, MdexERC20 {
^ (Relevant source part starts here and spans across multiple lines).
/C/GitLabs/mdexSwap/contracts/contracts/heco/Factory.sol:48:5: Definition in "MdexERC20":
uint8 public constant decimals = 18;
^---------------------------------^
/C/GitLabs/mdexSwap/contracts/contracts/interface/IMdexPair.sol:11:5: Definition in "IMdexPair":
function decimals() external pure returns (uint8);
^------------------------------------------------^

have u ever solved this problem? @xuemin007

@BIIYANG
Copy link

BIIYANG commented Nov 9, 2021

those contracts have ever deployed on the testchain ----- testnet.hecoinfo.com ? if yes, can you past the addresses about its contracts ? I need a stable test enviroment to test my programs.

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

No branches or pull requests

5 participants
@dh12306 @BIIYANG @summerxue1992 @xuemin007 and others