fuels-ts icon indicating copy to clipboard operation
fuels-ts copied to clipboard

Consider renaming method `call` to `submit`

Open arboleya opened this issue 1 year ago • 4 comments

Follows the ideas from:

  • https://github.com/FuelLabs/fuels-ts/issues/1451

We must first check for any problem or incoherence before renaming all call methods to submit.

The goal is to achieve improved semantics.

[!NOTE] Validate the impact of breaking changes with the @FuelLabs/frontend team.

arboleya avatar Nov 25 '23 16:11 arboleya

what happens with callParams?

LuizAsFight avatar Nov 28 '23 02:11 LuizAsFight

it's not a problem to be a breaking change if it makes sense and implement a consistent pattern across sdk

LuizAsFight avatar Nov 28 '23 02:11 LuizAsFight

We could also rename call -> submit but maintain the API, and keep a call function that calls submit if we are concerned about a breaking change. And annotate the deprecation.

danielbate avatar Nov 28 '23 15:11 danielbate

@LuizAsFight Good point.

Maybe something like requestParams() and submit() could work well together.

arboleya avatar Nov 28 '23 23:11 arboleya