onflow / flixkit-go

Apache License 2.0
0 stars 7 forks source link

[BUG] Cadence 1.0 generation support #58

Open sisyphusSmiling opened 2 months ago

sisyphusSmiling commented 2 months ago

Current Behavior

Currently, attempting to generate templates using CLI preview build v1.17.1-cadence-v1.0.0-preview.20 results in an error that seems to associated with pulling v1 standards contracts.

Expected Behavior

Templates successfully generate with either updated core contract dependencies or those from my local project.

Steps To Reproduce

Using a Cadence 1.0 compatible project (I used this branch in one of my example repos) and a pre-release version of the CLI, run:

flow-c1 flix generate <TXN_FILEPATH>

Which results in an output like

❯ flow-c1 flix generate transactions/transfer_nft.cdc
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                           ⚠ Upgrade to Cadence 1.0
     The Crescendo network upgrade, including Cadence 1.0, is coming soon.
     You may need to update your existing contracts to support this change.
                     Please visit our migration guide here:
             https://cadence-lang.org/docs/cadence_migration_guide
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
error: `pub` is no longer a valid access keyword
  --> NonFungibleToken:47:0
   |
47 | pub contract interface NonFungibleToken {
   | ^^^
...

Environment

- OS: macOS Sonoma 14.4
- Flow CLI: v1.17.1-cadence-v1.0.0-preview.20

What are you currently working on that this is blocking?

Creating FLIX templates for the VM bridge repo