Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Warn when creating a contract importing from @openzeppelin/contracts #1297

Closed
abcoathup opened this issue Nov 29, 2019 · 0 comments · Fixed by #1335
Closed

Warn when creating a contract importing from @openzeppelin/contracts #1297

abcoathup opened this issue Nov 29, 2019 · 0 comments · Fixed by #1335
Assignees
Labels
kind:enhancement Enhancement to an existing feature topic:upgrades Contract upgrades
Milestone

Comments

@abcoathup
Copy link
Contributor

Warn the user when creating a contract importing from @openzeppelin/contracts with a reference to the documentation: https://docs.openzeppelin.com/sdk/2.5/linking#linking-the-contracts-ethereum-package

(We may need to move the Note about using @openzeppelin/contracts-ethereum-package` so that it is visible when viewing the link)

So the warning could be something like the following:

oz create
...
Contract Test imports `@openzeppelin/contracts`. Change to `@openzeppelin/contracts-ethereum-package`. 
See https://docs.openzeppelin.com/sdk/2.5/linking#linking-the-contracts-ethereum-package.

Similar to the warning for an explicit constructor:

Contract Test has an explicit constructor. Change it to an initializer function. 
See https://docs.openzeppelin.com/sdk/2.5/writing_contracts.html#initializers.
@abcoathup abcoathup changed the title Warn when compiling a contract importing from @openzeppelin/contracts Warn when creating a contract importing from @openzeppelin/contracts Nov 29, 2019
@spalladino spalladino added kind:enhancement Enhancement to an existing feature priority:high labels Dec 4, 2019
@spalladino spalladino added this to the v2.6.1 milestone Dec 11, 2019
@spalladino spalladino added topic:upgrades Contract upgrades and removed component:cli labels Dec 11, 2019
@spalladino spalladino self-assigned this Dec 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind:enhancement Enhancement to an existing feature topic:upgrades Contract upgrades
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants