Skip to content

migration 4.22 -> 5.1.0 - contract.call and provider.waitForTransaction #547

@PhilippeR26

Description

@PhilippeR26

Describe the bug

  • contract.call return type changed in V5. V4 code do not compile anymore.
  • provider.waitForTransaction V4 code no more compile in V5.

To Reproduce

  • contract.call
    In V4, this code with contract.call and contract.meta-class is working :
    image
    bal1 type is any
    bal1b type is Result :
    image

In V5.1.0, I have these errors :
image
bal1 type is still any
bal1b type changed to Object
bal1.res still operates.
bal1b.res no more compile ('res' property do not exists in type 'Object')

  • provider.waitForTransaction
    compilation error in V5 : 2 args expected, but 1 received. Seems to be an optional parameter that is not really optional.

Expected behavior

  • contract.meta-class has migrated flawlessly. Same thing is expected from contract.call.
  • provider.waitForTransaction flawless migration.

Desktop (please complete the following information):

  • Browser & version [e.g. chrome, safari, webworker] N/A
  • Node version [e.g. 16.0.1]ts-node v10.9.1
  • Starknet.js version v4.22 & 5.1.0
  • Network [devnet, testnet] devnet

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions