Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to pass in the default.testnet-plan.yaml - list 5 (optional principal) parameter #1479

Closed
jovanvuleta opened this issue Jun 19, 2024 · 2 comments

Comments

@jovanvuleta
Copy link

How is list of optionals passed in the testnet deployment plan? - list 5 (optional principal) parameter

(define-public (initialize-governance (governance-multisigs (list 5 (optional principal))))
  (begin
    (asserts! (not (var-get governance-initialized)) ERR-CONTRACT-ALREADY-INITIALIZED)
    (try! (is-contract-deployer))
    (var-set governance-initialized true)
    (map set-governance-multisig governance-multisigs)
    SUCCESS
  )
)

Example:

          - contract-call:
                contract-id: ST2CY5V39NHDPWSXMW9QDT3HC3GD6Q6XX4CFRK9AG.governance
                expected-sender: ST2CY5V39NHDPWSXMW9QDT3HC3GD6Q6XX4CFRK9AG
                method: initialize-governance
                parameters:
                    - "'ST2CY5V39NHDPWSXMW9QDT3HC3GD6Q6XX4CFRK9AG none none none none"
                cost: 10800
@hugocaillard
Copy link
Collaborator

@jovanvuleta
You can do

parameters:
    - "(list (some 'ST2CY5V39NHDPWSXMW9QDT3HC3GD6Q6XX4CFRK9AG) none none none none)"

Linking to this issue so that we can add it to the documentation
hirosystems/docs#293

@hugocaillard
Copy link
Collaborator

I'm closing for now. Feel free to reopen if you need to

@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in DevTools Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants