Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

initFunction and initArgs logic is wrong #943

Closed
@MaksymZavershynskyi

Description

Describe the bug
When user specifies initArgs but does not specify initFunction the error message intended by the code here does not show: https://github.com/near/near-cli/blob/master/commands/dev-deploy.js#L87-L98 . It appears the logic in this code is wrong.

To Reproduce

  1. Deploy and initialize the contract using initArgs but omitting initFunction, e.g.:
near deploy --accountId=mycontract01.testnet --wasmFile=res/ft_lockup.wasm --initArgs '{<add args here>}'
  1. Observe that no error message is created and initialization function is not called.

Expected behavior
Error message is displayed OR new function is used by the default.

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions