23

I'm trying to test out Ampleforth on Rinkbey using Remix. Here are all the files that I copy into remix. https://github.com/cryptoghoulz/based-contracts/tree/master/contracts/v4

They compile fine, but when I deploy UFragments I get this error:

This contract may be abstract, not implement an abstract parent's methods completely or not invoke an inherited contract's constructor correctly.

Anyone know what could be going on? Thanks!

Richard Garfield
  • 1,017
  • 2
  • 10
  • 14
  • Yes: contract UFragments is ERC20Detailed, Ownable, and then contract ERC20Detailed is Initializable, IERC20. So you cannot deploy an instance of UFragments. You need to inherit this contract, and implement all functions not yet implemented (presumably, all of them are declared in IERC20). – goodvibration Aug 22 '20 at 06:44
  • @goodvibration but UFragments implements all 6 functions in IERC20... – Richard Garfield Aug 22 '20 at 19:15
  • Then look for other functions in other contracts which it inherits. – goodvibration Aug 22 '20 at 19:23
  • I had a same error message. Have you solved it yet? Thanks @Richard Garfield – Terrance Nov 23 '20 at 10:04

3 Answers3

42

I had the wrong compiled file selected in the remix "deploy" drop down bar -_- for some reason the default file is the highest one in the hierarchy

Richard Garfield
  • 1,017
  • 2
  • 10
  • 14
16

ScreenshotThis is certainly not a code error, not a compiler error. Just proper setting is required on IDE. Just see left hand side, the third tab in 'CONTRACT' section select 'OWNED'

Pritam Khedekar
  • 161
  • 1
  • 2
2

Same problem with me selected the wrong CONTRACT file,

enter image description here

Select the contract file from dropdown and it will deployed