metaplex-foundation / sugar

Candy Machine Rust CLI.
Apache License 2.0
198 stars 112 forks source link

[Bug]: freezeSolPayment escrow can not be initialized / freezeTokenPayment failing #438

Closed MarkSackerberg closed 1 year ago

MarkSackerberg commented 1 year ago

Issue description

Was going to write a guide on how to use the freeze Guards with sugar, but it looks like both are not properly working currently.

  1. sugar deploy
  2. sugar guard add with this config
    {
    "number": 10,
    "symbol": "NB",
    "sellerFeeBasisPoints": 100,
    "isMutable": true,
    "isSequential": false,
    "creators": [
    {
      "address": "Tes1zkZkXhgTaMFqVgbgvMsVkRJpq4Y6g54SbDBeKVV",
      "share": 100
    }
    ],
    "uploadMethod": "bundlr",
    "awsConfig": null,
    "nftStorageAuthToken": null,
    "shdwStorageAccount": null,
    "pinataConfig": null,
    "hiddenSettings": null,
    "guards": {
    "default": {
      "freezeSolPayment": {
            "value": 1,
            "destination": "Tes1zkZkXhgTaMFqVgbgvMsVkRJpq4Y6g54SbDBeKVV"
      }
    }
    }
    }
  3. sugar freeze initialize
    
    ubuntu@daily:~$ sugar freeze initialize
    [1/2] πŸ” Loading freeze guard information

πŸ›‘ Error running command (re-run needed): Could not load freeze escrow

Would have expected that it does not try to load an escrow but instead creates it.

Doing the same for `freezeTokenPayment` even results in 

ubuntu@daily:~$ sugar freeze initialize [1/2] πŸ” Loading freeze guard information

πŸ›‘ Error running command (re-run needed): Missing freeze sol payment guard



With these issues no freeze guard can be used with candy machine. (Creation of freeze guards with JS SDK works)

### Relevant log output

_No response_

### Priority this issue should have

Low (slightly annoying)
samuelvanderwaal commented 1 year ago

Thanks for the report! Do we know if this is actually a Sugar issue or an actual bug in CMV3?

MarkSackerberg commented 1 year ago

Accoding to reports on Discord freeze guards work using the JS SDK. I did not test myself though. Let me know in case you want me to test that.

febo commented 1 year ago

This is a Sugar issue, I am working on it.