Hello everyone.
I am trying to migrate from ReasonML to rescript (v9), and I am stuck here:
We've found a bug for you!
/home/ju/workspace/nomadic-labs/umami-wallet/umami/src/api/MetadataAPI.res:301:13-22
299 ┆
300 ┆ let readContractMetadata = (contract: Tzip12Tzip16Contract.t) =>
301 ┆ contract["tzip16"]().getMetadata(.)
302 ┆ ->ReTaquitoError.fromPromiseParsed
303 ┆ ->Promise.mapError(x =>
This expression has type
Js_OO.Meth.arity0<\"ReTaquitoTypes-Umami".Tzip16.t>
It is not a function.
Here is the source code: Files · sagotch@rescript-migration · Nomadic Labs / Umami Wallet group / umami · GitLab
And here are the files that might be interesting:
$ git grep tzip16
package.json: "@taquito/tzip16": "12.0.3",
src/api/MetadataAPI.res: toolkit->Toolkit.addExtension(ReTaquitoContracts.Extension.tzip16Module())
src/api/MetadataAPI.res: toolkit->Toolkit.addExtension(Extension.tzip16Module())
src/api/MetadataAPI.res: contract["tzip16"]().getMetadata(.)
src/api/MetadataAPI.res: toolkit->Toolkit.addExtension(Extension.tzip16Module())
src/api/MetadataAPI.res: contract["tzip16"]().getMetadata(.)
src/vendors/ReTaquitoContracts.res: @module("@taquito/tzip16") @new
src/vendors/ReTaquitoContracts.res: external tzip16Module: unit => t = "Tzip16Module"
src/vendors/ReTaquitoContracts.res: @module("@taquito/tzip16") external tzip16: abstraction = "tzip16"
src/vendors/ReTaquitoContracts.res: let at = (contract, pkh) => at(contract, pkh, ~extension=Extension.tzip16)
src/vendors/ReTaquitoContracts.res: compose(tzip12, tzip16)
src/vendors/ReTaquitoContracts.res: compose(tzip12, tzip16)
src/vendors/ReTaquitoContracts.res: compose(tzip12, tzip16)
src/vendors/ReTaquitoTypes.res: "tzip16": unit => Tzip16.t,
src/vendors/ReTaquitoTypes.res: "tzip16": unit => Tzip16.t,
src/vendors/ReTaquitoTypes.res: "tzip16": unit => Tzip16.t,
src/vendors/ReTaquitoTypes.res: "tzip16": unit => Tzip16.t,
yarn.lock: "@taquito/tzip16" "^12.0.3"
yarn.lock:"@taquito/tzip16@12.0.3", "@taquito/tzip16@^12.0.3":
(Can’t post more than 2 links)
Any hint?
PS: I already saw Upgrading to 9.1 and calling methods and tried the workaround explained without success (I did not keep the code to show, sorry).
PPS: I am from the OCaml world, so a lot of things that may be obvious are likely to be not that obvious to me.