kadena-io / pact

The Pact Smart Contract Language
https://pact-language.readthedocs.io/en/stable/
BSD 3-Clause "New" or "Revised" License
580 stars 100 forks source link

Fix hyperlane types #1358

Closed jmcardon closed 1 month ago

jmcardon commented 4 months ago

Fixes our hyperlane type definitions to include the correct type schemas, as well as exporting schemas for hyperlane definitions

That is, we go from:

pact> hyperlane-message-id 
native `hyperlane-message-id`

  Get the Message Id of a Hyperlane Message object.

  Type:
  x:object:* -> string

to

pact> hyperlane-message-id 
native `hyperlane-message-id`

  Get the Message Id of a Hyperlane Message object.

  Type:
  x:object:{hyperlane-token-msg} -> string

As well as exporting the two necessary schemas:

pact> hyperlane-token-msg
(defschema
hyperlane-token-msg
"Schema type for hyperlane messages"

[ version:integer
, nonce:integer
, originDomain:integer
, destinationDomain:integer
, recipient:string
, tokenMessage:object:(defschema
hyperlane-token-erc20
"Schema type for ERC20 TokenMessage"

[recipient:string, amount:integer]) ])
pact> hyperlane-token-erc20
(defschema
hyperlane-token-erc20
"Schema type for ERC20 TokenMessage"

[recipient:string, amount:integer])

PR checklist:

Additionally, please justify why you should or should not do the following:


jmcardon commented 3 months ago

Drafting until I receive some feedback on the hyperlane msg format

rsoeldner commented 1 month ago

closed for #1362