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

feat: add devnet package command #1116

Merged
merged 33 commits into from
Aug 29, 2023
Merged

feat: add devnet package command #1116

merged 33 commits into from
Aug 29, 2023

Conversation

csgui
Copy link
Contributor

@csgui csgui commented Aug 3, 2023

This PR adds the $ clarinet devnet package command.

The command should run inside a Clarinet project folder.

Issue: #1102

@csgui csgui requested a review from MicaiahReid August 3, 2023 18:17
Copy link
Contributor

@MicaiahReid MicaiahReid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 This is awesome work, so excited to have this!

There are a few notes I have on places where we should be able to reuse existing structs/code. Clarinet is so huge it's hard to find what's already been made and what you need to create from scratch 😅

components/clarinet-cli/src/devnet/package.rs Outdated Show resolved Hide resolved
components/clarinet-cli/src/devnet/package.rs Outdated Show resolved Hide resolved
components/clarinet-cli/src/devnet/package.rs Outdated Show resolved Hide resolved
components/clarinet-cli/src/devnet/package.rs Outdated Show resolved Hide resolved
components/clarinet-cli/src/devnet/package.rs Outdated Show resolved Hide resolved
components/clarinet-cli/src/devnet/package.rs Outdated Show resolved Hide resolved
MicaiahReid
MicaiahReid previously approved these changes Aug 9, 2023
components/clarinet-cli/src/frontend/cli.rs Outdated Show resolved Hide resolved
components/clarinet-cli/src/frontend/cli.rs Outdated Show resolved Hide resolved
components/clarinet-deployments/Cargo.toml Outdated Show resolved Hide resolved
components/clarinet-deployments/src/types.rs Outdated Show resolved Hide resolved
components/clarinet-deployments/src/types.rs Outdated Show resolved Hide resolved
components/clarinet-deployments/src/types.rs Outdated Show resolved Hide resolved
components/clarinet-deployments/src/types.rs Outdated Show resolved Hide resolved
components/clarinet-deployments/src/types.rs Outdated Show resolved Hide resolved
components/clarinet-deployments/src/types.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@MicaiahReid MicaiahReid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note from Ludo: We'll need to compile to wasm to make sure we aren't breaking anything

@csgui csgui requested a review from MicaiahReid August 18, 2023 14:08
@lgalabru
Copy link
Contributor

Thank you for this new feature @csgui!
Could you please add an example of what a packaged plan would looks like?

@csgui
Copy link
Contributor Author

csgui commented Aug 21, 2023

Hey @lgalabru ! Follow the output of the command, that is the packaged data.

{"deployment_plan":{"id":0,"name":"Devnet deployment","network":"devnet","stacks_node":"http://localhost:20443","bitcoin_node":"http://px-devnet:px-devnet@localhost:18443","genesis":null,"plan":{"batches":[{"id":0,"transactions":[{"RequirementPublish":{"contract_id":{"issuer":"ST1NXBK3K5YYMD6FD41MVNP3JS1GABZ8TRVX023PT","name":"nft-trait"},"remap_sender":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM","remap_principals":{"ST1NXBK3K5YYMD6FD41MVNP3JS1GABZ8TRVX023PT":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM"},"source":"KGRlZmluZS10cmFpdCBuZnQtdHJhaXQKICAoCiAgICA7OyBMYXN0IHRva2VuIElELCBsaW1pdGVkIHRvIHVpbnQgcmFuZ2UKICAgIChnZXQtbGFzdC10b2tlbi1pZCAoKSAocmVzcG9uc2UgdWludCB1aW50KSkKCiAgICA7OyBVUkkgZm9yIG1ldGFkYXRhIGFzc29jaWF0ZWQgd2l0aCB0aGUgdG9rZW4KICAgIChnZXQtdG9rZW4tdXJpICh1aW50KSAocmVzcG9uc2UgKG9wdGlvbmFsIChzdHJpbmctYXNjaWkgMjU2KSkgdWludCkpCgogICAgIDs7IE93bmVyIG9mIGEgZ2l2ZW4gdG9rZW4gaWRlbnRpZmllcgogICAgKGdldC1vd25lciAodWludCkgKHJlc3BvbnNlIChvcHRpb25hbCBwcmluY2lwYWwpIHVpbnQpKQoKICAgIDs7IFRyYW5zZmVyIGZyb20gdGhlIHNlbmRlciB0byBhIG5ldyBwcmluY2lwYWwKICAgICh0cmFuc2ZlciAodWludCBwcmluY2lwYWwgcHJpbmNpcGFsKSAocmVzcG9uc2UgYm9vbCB1aW50KSkKICApCik=","clarity_version":"Clarity1","cost":4670,"location":{"path":"./.cache/requirements/ST1NXBK3K5YYMD6FD41MVNP3JS1GABZ8TRVX023PT.nft-trait.clar"}}}],"epoch":"2.0"},{"id":1,"transactions":[{"RequirementPublish":{"contract_id":{"name":"sip-010-trait-ft-standard","issuer":"ST1NXBK3K5YYMD6FD41MVNP3JS1GABZ8TRVX023PT"},"remap_sender":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM","remap_principals":{"ST1NXBK3K5YYMD6FD41MVNP3JS1GABZ8TRVX023PT":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM"},"source":"KGRlZmluZS10cmFpdCBzaXAtMDEwLXRyYWl0CiAgKAogICAgOzsgVHJhbnNmZXIgZnJvbSB0aGUgY2FsbGVyIHRvIGEgbmV3IHByaW5jaXBhbAogICAgKHRyYW5zZmVyICh1aW50IHByaW5jaXBhbCBwcmluY2lwYWwgKG9wdGlvbmFsIChidWZmIDM0KSkpIChyZXNwb25zZSBib29sIHVpbnQpKQoKICAgIDs7IHRoZSBodW1hbiByZWFkYWJsZSBuYW1lIG9mIHRoZSB0b2tlbgogICAgKGdldC1uYW1lICgpIChyZXNwb25zZSAoc3RyaW5nLWFzY2lpIDMyKSB1aW50KSkKCiAgICA7OyB0aGUgdGlja2VyIHN5bWJvbCwgb3IgZW1wdHkgaWYgbm9uZQogICAgKGdldC1zeW1ib2wgKCkgKHJlc3BvbnNlIChzdHJpbmctYXNjaWkgMzIpIHVpbnQpKQoKICAgIDs7IHRoZSBudW1iZXIgb2YgZGVjaW1hbHMgdXNlZCwgZS5nLiA2IHdvdWxkIG1lYW4gMV8wMDBfMDAwIHJlcHJlc2VudHMgMSB0b2tlbgogICAgKGdldC1kZWNpbWFscyAoKSAocmVzcG9uc2UgdWludCB1aW50KSkKCiAgICA7OyB0aGUgYmFsYW5jZSBvZiB0aGUgcGFzc2VkIHByaW5jaXBhbAogICAgKGdldC1iYWxhbmNlIChwcmluY2lwYWwpIChyZXNwb25zZSB1aW50IHVpbnQpKQoKICAgIDs7IHRoZSBjdXJyZW50IHRvdGFsIHN1cHBseSAod2hpY2ggZG9lcyBub3QgbmVlZCB0byBiZSBhIGNvbnN0YW50KQogICAgKGdldC10b3RhbC1zdXBwbHkgKCkgKHJlc3BvbnNlIHVpbnQgdWludCkpCgogICAgOzsgYW4gb3B0aW9uYWwgVVJJIHRoYXQgcmVwcmVzZW50cyBtZXRhZGF0YSBvZiB0aGlzIHRva2VuCiAgICAoZ2V0LXRva2VuLXVyaSAoKSAocmVzcG9uc2UgKG9wdGlvbmFsIChzdHJpbmctdXRmOCAyNTYpKSB1aW50KSkKICApCik=","clarity_version":"Clarity1","cost":8390,"location":{"path":"./.cache/requirements/ST1NXBK3K5YYMD6FD41MVNP3JS1GABZ8TRVX023PT.sip-010-trait-ft-standard.clar"}}}],"epoch":"2.05"},{"id":2,"transactions":[{"RequirementPublish":{"contract_id":{"name":"subnet-traits-v1","issuer":"ST13F481SBR0R7Z6NMMH8YV2FJJYXA5JPA0AD3HP9"},"remap_sender":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM","remap_principals":{"ST13F481SBR0R7Z6NMMH8YV2FJJYXA5JPA0AD3HP9":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM"},"source":"OzsgSW4gb3JkZXIgdG8gc3VwcG9ydCB3aXRoZHJhd2luZyBhbiBhc3NldCB0aGF0IHdhcyBtaW50ZWQgb24gYSBzdWJuZXQsIHRoZQo7OyBMMSBjb250cmFjdCBtdXN0IGltcGxlbWVudCB0aGlzIHRyYWl0LgooZGVmaW5lLXRyYWl0IG1pbnQtZnJvbS1zdWJuZXQtdHJhaXQKICAoCiAgICA7OyBQcm9jZXNzIGEgd2l0aGRyYXdhbCBmcm9tIHRoZSBzdWJuZXQgZm9yIGFuIGFzc2V0IHdoaWNoIGRvZXMgbm90IHlldAogICAgOzsgZXhpc3Qgb24gdGhpcyBuZXR3b3JrLCBhbmQgdGh1cyByZXF1aXJlcyBhIG1pbnQuCiAgICAobWludC1mcm9tLXN1Ym5ldAogICAgICAoCiAgICAgICAgdWludCAgICAgICA7OyBhc3NldC1pZCAoTkZUKSBvciBhbW91bnQgKEZUKQogICAgICAgIHByaW5jaXBhbCAgOzsgc2VuZGVyCiAgICAgICAgcHJpbmNpcGFsICA7OyByZWNpcGllbnQKICAgICAgKQogICAgICAocmVzcG9uc2UgYm9vbCB1aW50KQogICAgKQogICkKKQ==","clarity_version":"Clarity2","cost":4810,"location":{"path":"./.cache/requirements/ST13F481SBR0R7Z6NMMH8YV2FJJYXA5JPA0AD3HP9.subnet-traits-v1.clar"}}},{"RequirementPublish":{"contract_id":{"name":"subnet-v1-2","issuer":"ST13F481SBR0R7Z6NMMH8YV2FJJYXA5JPA0AD3HP9"},"remap_sender":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM","remap_principals":{"ST13F481SBR0R7Z6NMMH8YV2FJJYXA5JPA0AD3HP9":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM"},"source":"OzsgVGhlIC5zdWJuZXQgY29udHJhY3QKCihkZWZpbmUtY29uc3RhbnQgQ09OVFJBQ1RfQUREUkVTUyAoYXMtY29udHJhY3QgdHgtc2VuZGVyKSkKCjs7IEVycm9yIGNvZGVzCihkZWZpbmUtY29uc3RhbnQgRVJSX0JMT0NLX0FMUkVBRFlfQ09NTUlUVEVEIDEpCihkZWZpbmUtY29uc3RhbnQgRVJSX0lOVkFMSURfTUlORVIgMikKKGRlZmluZS1jb25zdGFudCBFUlJfQ09OVFJBQ1RfQ0FMTF9GQUlMRUQgMykKKGRlZmluZS1jb25zdGFudCBFUlJfVFJBTlNGRVJfRkFJTEVEIDQpCihkZW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3QpCiAgICAgICAgICAgICAgICAgIChlcnIgRVJSX0FTU0VUX0FMUkVBRFlfQUxMT1dFRCkpCgogICAgICAgIChwcmludCB7CiAgICAgICAgICAgIGV2ZW50OiAicmVnaXN0ZXItY29udHJhY3QiLAogICAgICAgICAgICBhc3NldC10eXBlOiAiZnQiLAogICAgICAgICAgICBsMS1jb250cmFjdDogKGNvbnRyYWN0LW9mIGZ0LWNvbnRyYWN0KSwKICAgICAgICAgICAgbDItY29udHJhY3Q6IGwyLWNvbnRyYWN0CiAgICAgICAgfSkKCiAgICAgICAgKG9rIHRydWUpCiAgICApCikKCjs7IFJlZ2lzdGVyIGEgbmV3IE5GVCBjb250cmFjdCB0byBiZSBzdXBwb3J0ZWQgYnkgdGhpcyBzdWJuZXQuCihkZWZpbmUtcHVibGljIChyZWdpc3Rlci1uZXctbmZ0LWNvbnRyYWN0IChuZnQtY29udHJhY3QgPG5mdC10cmFpdD4pIChsMi1jb250cmFjdCBwcmluY2lwYWwpKQogICAgKGJlZ2luCiAgICAgICAgOzsgVmVyaWZ5IHRoYXQgdHgtc2VuZGVyIGlzIGFuIGF1dGhvcml6ZWQgYWRtaW4KICAgICAgICAoYXNzZXJ0cyEgKGlzLWFkbWluIHR4LXNlbmRlcikgKGVyciBFUlJfSU5WQUxJRF9NSU5FUikpCgogICAgICAgIDs7IFNldCB1cCB0aGUgYXNzZXRzIHRoYXQgdGhlIGNvbnRyYWN0IGlzIGFsbG93ZWQgdG8gdHJhbnNmZXIKICAgICAgICAoYXNzZXJ0cyEgKG1hcC1pbnNlcnQgYWxsb3dlZC1jb250cmFjdHMgKGNvbnRyYWN0LW9mIG5mdC1jb250cmFjdCkgbDItY29udHJhY3QpCiAgICAgICAgICAgICAgICAgIChlcnIgRVJSX0FTU0VUX0FMUkVBRFlfQUxMT1dFRCkpCgogICAgICAgIChwcmludCB7CiAgICAgICAgICAgIGV2ZW50OiAicmVnaXN0ZXItY29udHJhY3QiLAogICAgICAgICAgICBhc3NldC10eXB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QogICAgICAgICkKICAgICAgICA7OyBDaGVjayB0aGF0IHRoZSB0cmFuc2ZlciBzdWNjZWVkZWQKICAgICAgICAoYXNzZXJ0cyEgbWludC1yZXN1bHQgKGVyciBFUlJfTUlOVF9GQUlMRUQpKQoKICAgICAgICAob2sgdHJ1ZSkKICAgICkKKQoKKGRlZmluZS1wcml2YXRlIChpbm5lci10cmFuc2Zlci1vci1taW50LW5mdC1hc3NldAogICAgICAgIChuZnQtY29udHJhY3QgPG5mdC10cmFpdD4pCiAgICAgICAgKG5mdC1taW50LWNvbnRyYWN0IDxtaW50LWZyb20tc3VibmV0LXRyYWl0PikKICAgICAgICAoaWQgdWludCkKICAgICAgICAocmVjaXBpZW50IHByaW5jaXBhbCkKICAgICkKICAgIChsZXQgKAogICAgICAgICAgICAoY2FsbC1yZXN1bHQgKGNvbnRyYWN0LWNhbGw/IG5mdC1jb250cmFjdCBnZXQtb3duZXIgaWQpKQogICAgICAgICAgICAobmZ0LW93bmVyICh1bndyYXAhIGNhbGwtcmVzdWx0IChlcnIgRVJSX0NPTlRSQUNUX0NBTExfRkFJTEVEKSkpCiAgICAgICAgICAgIChjb250cmFjdC1vd25zLW5mdCAoaXMtZXEgbmZ0LW93bmVyIChzb21lIENPTlRSQUNUX0FERFJFU1MpKSkKICAgICAgICAgICAgKG5vLW93bmVyIChpcy1lcSBuZnQtb3duZXIgbm9uZSkpCiAgICAgICAgKQoKICAgICAgICAoaWYgY29udHJhY3Qtb3ducy1uZnQKICAgICAgICAgICAgKGlubmVyLXRyYW5zZmVyLW5mdC1hc3NldCBuZnQtY29udHJhY3QgaWQgQ09OVFJBQ1RfQUREUkVTUyByZWNpcGllbnQpCiAgICAgICAgICAgIChpZiBuby1vd25lcgogICAgICAgICAgICAgICAgOzsgVHJ5IG1pbnRpbmcgdGhlIGFzc2V0IGlmIHRoZXJlIGlzIG5vIGV4aXN0aW5nIG93bmVyIG9mIHRoaXMgTkZUCiAgICAgICAgICAgICAgICAoaW5uZXItbWludC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mZ0LWNvbnRyYWN0IGlkIHNlbmRlciBDT05UUkFDVF9BRERSRVNTKSkgKGVyciBFUlJfVFJBTlNGRVJfRkFJTEVEKSkKCiAgICAgICAgOzsgRW1pdCBhIHByaW50IGV2ZW50IC0gdGhlIG5vZGUgY29uc3VtZXMgdGhpcwogICAgICAgIChwcmludCB7CiAgICAgICAgICAgIGV2ZW50OiAiZGVwb3NpdC1uZnQiLAogICAgICAgICAgICBsMS1jb250cmFjdC1pZDogKGFzLWNvbnRyYWN0IG5mdC1jb250cmFjdCksCiAgICAgICAgICAgIG5mdC1pZDogaWQsCiAgICAgICAgICAgIHNlbmRlcjogc2VuZGVyLAogICAgICAgICAgICBzdWJuZXQtY29udHJhY3QtaWQ6IHN1Ym5ldC1jb250cmFjdC1pZCwKICAgICAgICB9KQoKICAgICAgICAob2sgdHJ1ZSkKICAgICkKKQoKCjs7IEhlbHBlciBmdW5jdGlvbiBmb3IgYHdpdGhkcmF3LW5mdC1hc3NldGAKOzsgUmV0dXJucyByZXNwb25zZTxib29sLCBpbnQ+CihkZWZpbmUtcHVibGljIChpbm5lci13aXRoZHJhdy1uZnQtYXNzZXQKICAgICAgICAobmZ0LWNvbnRyYWN0IDxuZnQtdHJhaXQ+KQogICAgICAgIChsMi1jb250cmFjdCBwcmluY2lwYWwpCiAgICAgICAgKGlkIHVpbnQpCiAgICAgICAgKHJlY2lwaWVudCBwcmluY2lwYWwpCiAgICAgICAgKHdpdGhkcmF3YWwtaWQgdWludCkKICAgICAgICAoaGVpZ2h0IHVpbnQpCiAgICAgICAgKG5mdC1taW50LWNvbnRyYWN0IChvcHRpb25hbCA8bWludC1mcm9tLXN1Ym5ldC10cmFpdD4pKQogICAgICAgICh3aXRoZHJhd2FsLXJvb3QgKGJ1ZmYgMzIpKQogICAgICAgICh3aXRoZHJhd2FsLWxlYWYtaGFzaCAoYnVmZiAzMikpCiAgICAgICAgKHNpYmxpbmctaGFzaGVzIChsaXN0IDUwIHsKICAgICAgICAgICAgaGFzaDogKGJ1ZmYgMzIpLAogICAgICAgICAgICBpcy1sZWZ0LXNpZGU6IGJvb2wsCiAgICAgICAgfSkpCiAgICApCiAgICAobGV0ICgoaGFzaGVzLWFyZS12YWxpZCAoY2hlY2std2l0aGRyYXdhbC1oYXNoZXMgd2l0aGRyYXdhbC1yb290IHdpdGhkcmF3YWwtbGVhZi1oYXNoIHNpYmxpbmctaGFzaGVzKSkpCgogICAgICAgIChhc3NlcnRzISAodHJ5ISBoYXNoZXMtYXJlLXZhbGlkKSAoZXJyIEVSUl9WQUxJREFUSU9OX0ZBSUxFRCkpCgogICAgICAgIDs7IGNoZWNrIHRoYXQgdGhlIHdpdGhkcmF3YWwgcmVxdWVzdCBkYXRhIG1hdGNoZXMgdGhlIHN1cHBsaWVkIGxlYWYgaGFzaAogICAgICAgIChhc3NlcnRzISAoaXMtZXEgd2l0aGRyYXdhbC1sZWFmLWhhc2gKICAgICAgICAgICAgICAgICAgICAgICAgIChsZWFmLWhhc2gtd2l0aGRyYXctbmZ0IGwyLWNvbnRyYWN0IGlkIHJlY2lwaWVudCB3aXRoZHJhd2FsLWlkIGhlaWdodCkpCiAgICAgICAgICAgICAgICAgIChlcnIgRVJSX1ZBTElEQVRJT05fTEVBRl9GQUlMRUQpKQoKICAgICAgICAoYXNzZXJ0cyEKICAgICAgICAgICAgKHRyeSEKICAgICAgICAgICAgICAgIChtYXRjaCBuZnQtbWludC1jb250cmFjdAogICAgICAgICAgICAgICAgICAgIG1pbnQtY29udHJhY3QgKGFzLWNvbnRyYWN0IChpbm5lci10cmFuc2Zlci1vci1taW50LW5mdC1hc3NldCBuZnQtY29udHJhY3QgbWludC1jb250cmFjdCBpZCByZWNpcGllbnQpKQogICAgICAgICAgICAgICAgICAgIChhcy1jb250cmFjdCAoaW5uZXItdHJhbnNmZXItd2l0aG91dC1taW50LW5mdC1hc3NldCBuZnQtY29udHJhY3QgaWQgcmVjaXBpZW50KSkKICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgKQ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rpb24gZW1pdHMgYSBwcmludCB3aXRoIGRldGFpbHMgb2YgdGhpcyBldmVudC4KOzsgUmV0dXJucyByZXNwb25zZTxib29sLCBpbnQ+CihkZWZpbmUtcHVibGljICh3aXRoZHJhdy1uZnQtYXNzZXQKICAgICAgICAobmZ0LWNvbnRyYWN0IDxuZnQtdHJhaXQ+KQogICAgICAgIChpZCB1aW50KQogICAgICAgIChyZWNpcGllbnQgcHJpbmNpcGFsKQogICAgICAgICh3aXRoZHJhd2FsLWlkIHVpbnQpCiAgICAgICAgKGhlaWdodCB1aW50KQogICAgICAgIChuZnQtbWludC1jb250cmFjdCAob3B0aW9uYWwgPG1pbnQtZnJvbS1zdWJuZXQtdHJhaXQ+KSkKICAgICAgICAod2l0aGRyYXdhbC1yb290IChidWZmIDMyKSkKICAgICAgICAod2l0aGRyYXdhbC1sZWFmLWhhc2ggKGJ1ZmYgMzIpKQogICAgICAgIChzaWJsaW5nLWhhc2hlcyAobGlzdCA1MCB7CiAgICAgICAgICAgIGhhc2g6IChidWZmIDMyKSwKICAgICAgICAgICAgaXMtbGVmdC1zaWRlOiBib29sLAogICAgICAgIH0pKQogICAgKQogICAgKGxldCAoCiAgICAgICAgICAgIDs7IENoZWNrIHRoYXQgdGhlIGFzc2V0IGJlbG9uZ3MgdG8gdGhlIGFsbG93ZWQtY29udHJhY3RzIG1hcAogICAgICAgICAgICAobDItY29udHJhY3QgKHVud3JhcCEgKG1hcC1nZXQ/IGFsbG93ZWQtY29udHJhY3RzIChjb250cmFjdC1vZiBuZnQtY29udHJhY3QpKSAoZXJyIEVSUl9ESVNBTExPV0VEX0FTU0VUKSkpCiAgICAgICAgKQogICAgICAgIChhc3NlcnRzIQogICAgICAgICAgICAodHJ5ISAoaW5uZXItd2l0aGRyYXctbmZ0LWFzc2V0CiAgICAgICAgICAgICAgICBuZnQtY29udHJhY3QKICAgICAgICAgICAgICAgIGwyLWNvbnRyYWN0CiAgICAgICAgICAgICAgICBpZAogICAgICAgICAgICAgICAgcmVjaXBpZW50CiAgICAgICAgICAgICAgICB3aXRoZHJhd2FsLWlkCiAgICAgICAgICAgICAgICBoZWlnaHQKICAgICAgICAgICAgICAgIG5mdC1taW50LWNvbnRyYWN0CiAgICAgICAgICAgICAgICB3aXRoZHJhd2FsLXJvb3QKICAgICAgICAgICAgICAgIHdpdGhkcmF3YWwtbGVhZi1oYXNoCiAgICAgICAgICAgICAgICBzaWJsaW5nLWhhc2hlcwogICAgICAgICAgICApKQogICAgICAgICAgICAoZXJyIEVSUl9UUkFOU0ZFUl9GQUlMRUQpCiAgICAgICAgKQoKICAgICAgICA7OyBFbWl0IGEgcHJpbnQgZXZlbnQKICAgICAgICAocHJpbnQgewogICAgICAgICAgICBldmVudDogIndpdGhkcmF3LW5mdCIsCiAgICAgICAgICAgIGwxLWNvbnRyYWN0LWlkOiAoYXMtY29udHJhY3QgbmZ0LWNvbnRyYWN0KSwKICAgICAgICAgICAgbmZ0LWlkOiBpZCwKICAgICAgICAgICAgcmVjaXBpZW50OiByZWNpcGllbnQKICAgICAgICB9KQoKICAgICAgICAob2sgdHJ1ZSkKICAgICkKKQoKCjs7IExpa2UgYGlubmVyLXRyYW5zZmVyLW9yLW1pbnQtbmZ0LWFzc2V0IGJ1dCB3aXRob3V0IGFsbG93aW5nIG9yIHJlcXVpcmluZyBhIG1pbnQgZnVuY3Rpb24uIEluIG9yZGVyIHRvIHdpdGhkcmF3LCB0aGUgdXNlciBtdXN0Cjs7IGhhdmUgdGhlIGFwcHJvcHJpYXRlIGJhbGFuY2UuCihkZWZpbmUtcHJpdmF0ZSAoaW5uZXItdHJhbnNmZXItd2l0aG91dC1taW50LW5mdC1hc3NldAogICAgICAgIChuZnQtY29udHJhY3QgPG5mdC10cmFpdD4pCiAgICAgICAgKGlkIHVpbnQpCiAgICAgICAgKHJlY2lwaWVudCBwcmluY2lwYWwpCiAgICApCiAgICAobGV0ICgKICAgICAgICAgICAgKGNhbGwtcmVzdWx0IChjb250cmFjdC1jYWxsPyBu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YXQgdGhlIHRyYW5zZmVyIHN1Y2NlZWRlZAogICAgICAgIChhc3NlcnRzISBtaW50LXJlc3VsdCAoZXJyIEVSUl9NSU5UX0ZBSUxFRCkpCgogICAgICAgIChvayB0cnVlKQogICAgKQopCgooZGVmaW5lLXByaXZhdGUgKGlubmVyLXRyYW5zZmVyLW9yLW1pbnQtZnQtYXNzZXQKICAgICAgICAoZnQtY29udHJhY3QgPGZ0LXRyYWl0PikKICAgICAgICAoZnQtbWludC1jb250cmFjdCA8bWludC1mcm9tLXN1Ym5ldC10cmFpdD4pCiAgICAgICAgKGFtb3VudCB1aW50KQogICAgICAgIChyZWNpcGllbnQgcHJpbmNpcGFsKQogICAgICAgIChtZW1vIChvcHRpb25hbCAoYnVmZiAzNCkpKQogICAgKQogICAgKGxldCAoCiAgICAgICAgICAgIChjYWxsLXJlc3VsdCAoY29udHJhY3QtY2FsbD8gZnQtY29udHJhY3QgZ2V0LWJhbGFuY2UgQ09OVFJBQ1RfQUREUkVTUykpCiAgICAgICAgICAgIChjb250cmFjdC1mdC1iYWxhbmNlICh1bndyYXAhIGNhbGwtcmVzdWx0IChlcnIgRVJSX0NPTlRSQUNUX0NBTExfRkFJTEVEKSkpCiAgICAgICAgICAgIChjb250cmFjdC1vd25zLWVub3VnaCAoPj0gY29udHJhY3QtZnQtYmFsYW5jZSBhbW91bnQpKQogICAgICAgICAgICAoYW1vdW50LXRvLXRyYW5zZmVyIChpZiBjb250cmFjdC1vd25zLWVub3VnaCBhbW91bnQgY29udHJhY3QtZnQtYmFsYW5jZSkpCiAgICAgICAgICAgIChhbW91bnQtdG8tbWludCAoLSBhbW91bnQgYW1vdW50LXRvLXRyYW5zZmVyKSkKICAgICAgICApCgogICAgICAgIDs7IENoZWNrIHRoYXQgdGhlIHRvdGFsIGJhbGFuY2UgYmV0d2VlbiB0aGUgdHJhbnNmZXIgYW5kIG1pbnQgaXMgZXF1YWwgdG8gdGhlIG9yaWdpbmFsIGJhbGFuY2UKICAgICAgICAoYXNzZXJ0cyEgKGlzLWVxIGFtb3VudCAoKyBhbW91bnQtdG8tdHJhbnNmZXIgYW1vdW50LXRvLW1pbnQpKSAoZXJyIEVSUl9JTl9DT01QVVRBVElPTikpCgogICAgICAgIChhbmQKICAgICAgICAgICAgKD4gYW1vdW50LXRvLXRyYW5zZmVyIHUwKQogICAgICAgICAgICAodHJ5ISAoaW5uZXItdHJhbnNmZXItZnQtYXNzZXQgZnQtY29udHJhY3QgYW1vdW50LXRvLXRyYW5zZmVyIENPTlRSQUNUX0FERFJFU1MgcmVjaXBpZW50IG1lbW8pKQogICAgICAgICkKICAgICAgICAoYW5kCiAgICAgICAgICAgICg+IGFtb3VudC10by1taW50IHUwKQogICAgICAgICAgICAodHJ5ISAoaW5uZXItbWludC1mdC1hc3NldCBmdC1taW50LWNvbnRyYWN0IGFtb3VudC10by1taW50IENPTlRSQUNUX0FERFJFU1MgcmVjaXBpZW50KSkKICAgICAgICApCgogICAgICAgIChvayB0cnVlKQogICAgKQopCgo7OyBBIHVzZXIgY2FsbHMgdGhpcyBmdW5jdGlvbiB0byBkZXBvc2l0IGEgZnVuZ2libGUgdG9rZW4gaW50byB0aGUgY29udHJhY3QuCjs7IFRoZSBmdW5jdGlvbiBlbWl0cyBhIHByaW50IHdpdGggZGV0YWlscyBvZiB0aGlzIGV2ZW50Lgo7OyBSZXR1cm5zIHJlc3BvbnNlPGJvb2wsIGludD4KKGRlZmluZS1wdWJsaWMgKGRlcG9zaXQtZnQtYXNzZXQKICAgICAgICAoZnQtY29udHJhY3QgPGZ0LXRyYWl0PikKICAgICAgICAoYW1vdW50IHVpbnQpCiAgICAgICAgKHNlbmRlciBwcmluY2lwYWwpCiAgICAgICAgKG1lbW8gKG9wdGlvbmFsIChidWZmIDM0KSkpCiAgICApCiAgICAobGV0ICgKICAgICAgICAgICAgOzsgQ2hlY2sgdGhhdCB0aGUgYXNzZXQgYmVsb25ncyB0byB0aGUgYWxsb3dlZC1jb250cmFjdHMgbWFwCiAgICAgICAgICAgIChzdWJuZXQtY29udHJhY3QtaWQgKHVud3JhcCEgKG1hcC1nZXQ/IGFsbG93ZWQtY29udHJhY3RzIChjb250cmFjdC1vZiBmdC1jb250cmFjdCkpIChlcnIgRVJSX0RJU0FMTE9XRURfQVNTRVQpKSkKICAgICAgICApCiAgICAgICAgOzsgVHJ5IHRvIHRyYW5zZmVyIHRoZSBGVCB0byB0aGlzIGNvbnRyYWN0CiAgICAgICAgKGFzc2VydHMhICh0cnkhIChpbm5lci10cmFuc2Zlci1mdC1hc3NldCBmdC1jb250cmFjdCBhbW91bnQgc2VuZGVyIENPTlRSQUNUX0FERFJFU1MgbWVtbykpIChlcnIgRVJSX1RSQU5TRkVSX0ZBSUxFRCkpCgogICAgICAgIChsZXQgKAogICAgICAgICAgICAgICAgKGZ0LW5hbWUgKHVud3JhcCEgKGNvbnRyYWN0LWNhbGw/IGZ0LWNvbnRyYWN0IGdldC1uYW1lKSAoZXJyIEVSUl9DT05UUkFDVF9DQUxMX0ZBSUxFRCkpKQogICAgICAgICAgICApCiAgICAgICAgICAgIDs7IEVtaXQgYSBwcmludCBldmVudCAtIHRoZSBub2RlIGNvbnN1bWVzIHRoaXMKICAgICAgICAgICAgKHByaW50IHsKICAgICAgICAgICAgICAgIGV2ZW50OiAiZGVwb3NpdC1mdCIsCiAgICAgICAgICAgICAgICBsMS1jb250cmFjdC1pZDogKGFzLWNvbnRyYWN0IGZ0LWNvbnRyYWN0KSwKICAgICAgICAgICAgICAgIGZ0LW5hbWU6IGZ0LW5hbWUsCiAgICAgICAgICAgICAgICBmdC1hbW91bnQ6IGFtb3VudCwKICAgICAgICAgICAgICAgIHNlbmRlcjogc2VuZGVyLAogICAgICAgICAgICAgICAgc3VibmV0LWNvbnRyYWN0LWlkOiBzdWJuZXQtY29udHJhY3QtaWQsCiAgICAgICAgICAgIH0pCiAgICAgICAgKQoKICAgICAgICAob2sgdHJ1ZSkKICAgICkKKQoKOzsgVGhpcyBmdW5jdGlvbiBwZXJm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BsZWFmIGhhc2gKICAgICAgICAoYXNzZXJ0cyEgKGlzLWVxIHdpdGhkcmF3YWwtbGVhZi1oYXNoCiAgICAgICAgICAgICAgICAgICAgICAgICAobGVhZi1oYXNoLXdpdGhkcmF3LWZ0IChjb250cmFjdC1vZiBmdC1jb250cmFjdCkgYW1vdW50IHJlY2lwaWVudCB3aXRoZHJhd2FsLWlkIGhlaWdodCkpCiAgICAgICAgICAgICAgICAgIChlcnIgRVJSX1ZBTElEQVRJT05fTEVBRl9GQUlMRUQpKQoKICAgICAgICAoYXNzZXJ0cyEKICAgICAgICAgICAgKHRyeSEKICAgICAgICAgICAgICAgIChtYXRjaCBmdC1taW50LWNvbnRyYWN0CiAgICAgICAgICAgICAgICAgICAgbWludC1jb250cmFjdCAoYXMtY29udHJhY3QgKGlubmVyLXRyYW5zZmVyLW9yLW1pbnQtZnQtYXNzZXQgZnQtY29udHJhY3QgbWludC1jb250cmFjdCBhbW91bnQgcmVjaXBpZW50IG1lbW8pKQogICAgICAgICAgICAgICAgICAgIChhcy1jb250cmFjdCAoaW5uZXItdHJhbnNmZXItZnQtYXNzZXQgZnQtY29udHJhY3QgYW1vdW50IENPTlRSQUNUX0FERFJFU1MgcmVjaXBpZW50IG1lbW8pKQogICAgICAgICAgICAgICAgKQogICAgICAgICAgICApCiAgICAgICAgICAgIChlcnIgRVJSX1RSQU5TRkVSX0ZBSUxFRCkKICAgICAgICApCgogICAgICAgIChhc3NlcnRzIQogICAgICAgICAgKGZpbmlzaC13aXRoZHJhdyB7IHdpdGhkcmF3YWwtbGVhZi1oYXNoOiB3aXRoZHJhd2FsLWxlYWYtaGFzaCwgd2l0aGRyYXdhbC1yb290LWhhc2g6IHdpdGhkcmF3YWwtcm9vdCB9KQogICAgICAgICAgKGVyciBFUlJfV0lUSERSQVdBTF9BTFJFQURZX1BST0NFU1NFRCkpCgogICAgICAgIChvayB0cnVlKQogICAgKQopCgo7OyBBIHVzZXIgY2FuIGNhbGwgdGhpcyBmdW5jdG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QogICAgICAgIChtZW1vIChvcHRpb25hbCAoYnVmZiAzNCkpKQogICAgICAgIChmdC1taW50LWNvbnRyYWN0IChvcHRpb25hbCA8bWludC1mcm9tLXN1Ym5ldC10cmFpdD4pKQogICAgICAgICh3aXRoZHJhd2FsLXJvb3QgKGJ1ZmYgMzIpKQogICAgICAgICh3aXRoZHJhd2FsLWxlYWYtaGFzaCAoYnVmZiAzMikpCiAgICAgICAgKHNpYmxpbmctaGFzaGVzIChsaXN0IDUwIHsKICAgICAgICAgICAgaGFzaDogKGJ1ZmYgMzIpLAogICAgICAgICAgICBpcy1sZWZ0LXNpZGU6IGJvb2wsCiAgICAgICAgfSkpCiAgICApCiAgICAoYmVnaW4KICAgICAgICA7OyBDaGVjayB0aGF0IHRoZSB3aXRoZHJhdyBhbW91bnQgaXMgcG9zaXRpdmUKICAgICAgICAoYXNzZXJ0cyEgKD4gYW1vdW50IHUwKSAoZXJyIEVSUl9BVFRFTVBUX1RPX1RSQU5TRkVSX1pFUk9fQU1PVU5UKSkKCiAgICAgICAgOzsgQ2hlY2sgdGhhdCB0aGUgYXNzZXQgYmVsb25ncyB0byB0aGUgYWxsb3dlZC1jb250cmFjdHMgbWFwCiAgICAgICAgKHVud3JhcCEgKG1hcC1nZXQ/IGFsbG93ZWQtY29udHJhY3RzIChjb250cmFjdC1vZiBmdC1jb250cmFjdCkpIChlcnIgRVJSX0RJU0FMTE9XRURfQVNTRVQpKQoKICAgICAgICAoYXNzZXJ0cyEKICAgICAgICAgICAgKHRyeSEgKGlubmVyLXdpdGhkcmF3LWZ0LWFzc2V0CiAgICAgICAgICAgICAgICBmdC1jb250cmFjdAogICAgICAgICAgICAgICAgYW1vdW50CiAgICAgICAgICAgICAgICByZWNpcGllbnQKICAgICAgICAgICAgICAgIHdpdGhkcmF3YWwtaWQKICAgICAgICAgICAgICAgIGhlaWdodAogICAgICAgICAgICAgICAgbWVtbwogICAgICAgICAgICAgICAgZnQtbWludC1jb250cmFjdAogICAgICAgICAgICAgICAgd2l0aGRyYXdhbC1yb290CiAgICAgICAgICAgICAgICB3aXRoZHJhd2FsLWxlYWYtaGFzaAogICAgICAgICAgICAgICAgc2libGluZy1oYXNoZXMpKQogICAgICAgICAgICAoZXJyIEVSUl9UUkFOU0ZFUl9GQUlMRUQpCiAgICAgICAgKQoKICAgICAgICAobGV0ICgKICAgICAgICAgICAgICAgIChmdC1uYW1lICh1bndyYXAhIChjb250cmFjdC1jYWxsPyBmdC1jb250cmFjdCBnZXQtbmFtZSkgKGVyciBFUlJfQ09OVFJBQ1RfQ0FMTF9GQUlMRUQpKSkKICAgICAgICAgICAgKQogICAgICAgICAgICA7OyBFbWl0IGEgcHJpbnQgZXZlbnQKICAgICAgICAgICAgKHByaW50IHsKICAgICAgICAgICAgICAgIGV2ZW50OiAid2l0aGRyYXctZnQiLAogICAgICAgICAgICAgICAgbDEtY29udHJhY3QtaWQ6IChhcy1jb250cmFjdCBmdC1jb250cmFjdCksCiAgICAgICAgICAgICAgICBmdC1uYW1lOiBmdC1uYW1lLAogICAgICAgICAgICAgICAgZnQtYW1vdW50OiBhbW91bnQsCiAgICAgICAgICAgICAgICByZWNpcGllbnQ6IHJlY2lwaWVudCwKICAgICAgICAgICAgfSkKICAgICAgICApCgogICAgICAgIChvayB0cnVlKQogICAgKQopCgoKOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Cjs7IEZPUiBTVFggVFJBTlNGRVJTCgoKOzsgSGVscGVyIGZ1bmN0aW9uIHRoYXQgdHJhbnNmZXJzIHRoZSBnaXZlbiBhbW91bnQgZnJvbSB0aGUgc3BlY2lmaWVkIGZ1bmdpYmxlIHRva2VuIGZyb20gdGhlIGdpdmVuIHNlbmRlciB0byB0aGUgZ2l2ZW4gcmVjaXBpZW50Lgo7OyBSZXR1cm5zIHJlc3BvbnNlPGJvb2wsIGludD4KKGRlZmluZS1wcml2YXRlIChpbm5lci10cmF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6ICJkZXBvc2l0LXN0eCIsIHNlbmRlcjogc2VuZGVyLCBhbW91bnQ6IGFtb3VudCB9KQoKICAgICAgICAob2sgdHJ1ZSkKICAgICkKKQoKKGRlZmluZS1yZWFkLW9ubHkgKGxlYWYtaGFzaC13aXRoZHJhdy1zdHgKICAgICAgICAoYW1vdW50IHVpbnQpCiAgICAgICAgKHJlY2lwaWVudCBwcmluY2lwYWwpCiAgICAgICAgKHdpdGhkcmF3YWwtaWQgdWludCkKICAgICAgICAoaGVpZ2h0IHVpbnQpCiAgICApCiAgICAoc2hhNTEyLzI1NiAoY29uY2F0IDB4MDAgKHVud3JhcC1wYW5pYyAodG8tY29uc2Vuc3VzLWJ1ZmY/CiAgICAgICAgewogICAgICAgICAgICB0eXBlOiAic3R4IiwKICAgICAgICAgICAgYW1vdW50OiBhbW91bnQsCiAgICAgICAgICAgIHJlY2lwaWVudDogcmVjaXBpZW50LAogICAgICAgICAgICB3aXRoZHJhd2FsLWlkOiB3aXRoZHJhd2FsLWlkLAogICAgICAgICAgICBoZWlnaHQ6IGhlaWdodAogICAgICAgIH0pKSkKICAgICkKKQoKKGRlZmluZS1yZWFkLW9ubHkgKGxlYWYtaGFzaC13aXRoZHJhdy1uZnQKICAgICAgICAoYXNzZXQtY29udHJhY3QgcHJpbmNpcGFsKQogICAgICAgIChuZnQtaWQgdWludCkKICAgICAgICAocmVjaXBpZW50IHByaW5jaXBhbCkKICAgICAgICAod2l0aGRyYXdhbC1pZCB1aW50KQogICAgICAgIChoZWlnaHQgdWludCkKICAgICkKICAgIChzaGE1MTIvMjU2IChjb25jYXQgMHgwMCAodW53cmFwLXBhbmljICh0by1jb25zZW5zdXMtYnVmZj8KICAgICAgICB7CiAgICAgICAgICAgIHR5cGU6ICJuZnQiLAogICAgICAgICAgICBuZnQtaWQ6IG5mdC1pZCwKICAgICAgICAgICAgYXNzZXQtY29udHJhY3Q6IGFzc2V0LWNvbnRyYWN0LAogICAgICAgICAgICByZWNpcGllbnQ6IHJlY2lwaWVudCwKICAgICAgICAgICAgd2l0aGRyYXdhbC1pZDogd2l0aGRyYXdhbC1pZCwKICAgICAgICAgICAgaGVpZ2h0OiBoZWlnaHQKICAgICAgICB9KSkpCiAgICApCikKCihkZWZpbmUtcmVhZC1vbmx5IChsZWFmLWhhc2gtd2l0aGRyYXctZnQKICAgICAgICAoYXNzZXQtY29udHJhY3QgcHJpbmNpcGFsKQogICAgICAgIChhbW91bnQgdWludCkKICAgICAgICAocmVjaXBpZW50IHByaW5jaXBhbCkKICAgICAgICAod2l0aGRyYXdhbC1pZCB1aW50KQogICAgICAgIChoZWlnaHQgdWludCkKICAgICkKICAgIChzaGE1MTIvMjU2IChjb25jYXQgMHgwMCAodW53cmFwLXBhbmljICh0by1jb25zZW5zdXMtYnVmZj8KICAgICAgICB7CiAgICAgICAgICAgIHR5cGU6ICJmdCIsCiAgICAgICAgICAgIGFtb3VudDogYW1vdW50LAogICAgICAgICAgICBhc3NldC1jb250cmFjdDogYXNzZXQtY29udHJhY3QsCiAgICAgICAgICAgIHJlY2lwaWVudDogcmVjaXBpZW50LAogICAgICAgICAgICB3aXRoZHJhd2FsLWlkOiB3aXRoZHJhd2FsLWlkLAogICAgICAgICAgICBoZWlnaHQ6IGhlaWdodAogICAgICAgIH0pKSkKICAgICkKKQoKOzsgQSB1c2VyIGNhbGxzIHRoaXMgZnVuY3Rpb24gdG8gd2l0aGRyYXcgU1RYIGZyb20gdGhpcyBjb250cmFjdC4KOzsgSW4gb3JkZXIgZm9yIHRoaXMgd2l0aGRyYXdhbCB0byBnbyB0aHJvdWdoLCB0aGUgZ2l2ZW4gd2l0aGRyYXdhbCBtdXN0IGhhdmUgYmVlbiBpbmNsdWRlZAo7OyBpbiBhIHdpdGhkcmF3YWwgTWVya2xlIHRyZWUgYSBzdWJuZXQgbWluZXIgc3VibWl0dGVkLiBUaGUgdXNlciBtdXN0IHByb3ZpZGUgdGhlIGxlYWYKOzsgaGFzaCBvZiB0aGVpciB3aXRoZHJhd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vbmNhdHMgdGhlIHR3byBnaXZlbiBoYXNoZXMgaW4gdGhlIGNvcnJlY3Qgb3JkZXIuIEl0IGFsc28gcHJlcGVuZHMgdGhlIGJ1ZmYgYDB4MDFgLCB3aGljaCBpcwo7OyBhIHRhZyBkZW5vdGluZyBhIG5vZGUgKHZlcnN1cyBhIGxlYWYpLgo7OyBSZXR1cm5zIGEgYnVmZgooZGVmaW5lLXByaXZhdGUgKGNyZWF0ZS1ub2RlLWhhc2gKICAgICAgICAoY3Vyci1oYXNoIChidWZmIDMyKSkKICAgICAgICAoc2libGluZy1oYXNoIChidWZmIDMyKSkKICAgICAgICAoaXMtc2libGluZy1sZWZ0LXNpZGUgYm9vbCkKICAgICkKICAgIChsZXQgKAogICAgICAgICAgICAoY29uY2F0dGVkLWhhc2ggKGlmIGlzLXNpYmxpbmctbGVmdC1zaWRlCiAgICAgICAgICAgICAgICAgICAgKGNvbmNhdCBzaWJsaW5nLWhhc2ggY3Vyci1oYXNoKQogICAgICAgICAgICAgICAgICAgIChjb25jYXQgY3Vyci1oYXNoIHNpYmxpbmctaGFzaCkKICAgICAgICAgICAgICAgICkpCiAgICAgICAgICApCgogICAgICAgICAgKGNvbmNhdCAweDAxIGNvbmNhdHRlZC1oYXNoKQogICAgKQopCgo7OyBUaGlzIGZ1bmN0aW9uIGhhc2hlcyB0aGUgY3VyciBoYXNoIHdpdGggaXRzIHNpYmxpbmcgaGFzaC4KOzsgUmV0dXJucyAoYnVmZiAzMikKKGRlZmluZS1wcml2YXRlIChoYXNoLWhlbHAKICAgICAgICAoc2libGluZyB7CiAgICAgICAgICAgIGhhc2g6IChidWZmIDMyKSwKICAgICAgICAgICAgaXMtbGVmdC1zaWRlOiBib29sLAogICAgICAgIH0pCiAgICAgICAgKGN1cnItbm9kZS1oYXNoIChidWZmIDMyKSkKICAgICkKICAgIChsZXQgKAogICAgICAgICAgICAoc2libGluZy1oYXNoIChnZXQgaGFzaCBzaWJsaW5nKSkKICAgICAgICAgICAgKGlz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5zZmVycmVkLgo7OyBJdCBhZGRzIHRoZSB3aXRoZHJhd2FsIGxlYWYgaGFzaCB0byBhIG1hcCBvZiBwcm9jZXNzZWQgbGVhdmVzLiBUaGlzIGVuc3VyZXMgdGhhdAo7OyB0aGlzIHdpdGhkcmF3YWwgbGVhZiBjYW4ndCBiZSB1c2VkIGFnYWluIHRvIHdpdGhkcmF3IGFkZGl0aW9uYWwgZnVuZHMuCjs7IFJldHVybnMgYm9vbAooZGVmaW5lLXByaXZhdGUgKGZpbmlzaC13aXRoZHJhdwogICAgICAgICh3aXRoZHJhdy1pbmZvIHsKICAgICAgICAgICAgd2l0aGRyYXdhbC1sZWFmLWhhc2g6IChidWZmIDMyKSwKICAgICAgICAgICAgd2l0aGRyYXdhbC1yb290LWhhc2g6IChidWZmIDMyKQogICAgICAgIH0pCiAgICApCiAgICAobWFwLWluc2VydCBwcm9jZXNzZWQtd2l0aGRyYXdhbC1sZWF2ZXMtbWFwIHdpdGhkcmF3LWluZm8gdHJ1ZSkKKQo=","clarity_version":"Clarity2","cost":290960,"location":{"path":"./.cache/requirements/ST13F481SBR0R7Z6NMMH8YV2FJJYXA5JPA0AD3HP9.subnet-v1-2.clar"}}},{"ContractPublish":{"contract_name":"px","expected_sender":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM","location":{"path":"contracts/px.clar"},"source":"Cjs7IHRpdGxlOiBweAo7OyB2ZXJzaW9uOgo7OyBzdW1tYXJ5Ogo7OyBkZXNjcmlwdGlvbjogQWxsb3dzIHVzZXJzIHRvIHBheSB0byB1cGRhdGUgZGF0YSBpbiBhIG1hdHJpeC4gCjs7ICBFYWNoIG1hdHJpeCB2YWx1ZSBtdXN0IGJlIGEgaGV4YWRlY2ltYWwgdmFsdWUgZnJvbSAweDAwMDAwMCB0byAweGZmZmZmZiwgcmVwcmVzZW50aW5nIGEgY29sb3IgdG8gYmUgZGlzcGxheWVkIG9uIGEgZ3JpZCBpbiBhIHdlYiBwYWdlLi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2MgdWludCkgKHZhbHVlIChidWZmIDMpKSkgCiAgICAoYmVnaW4gCiAgICAgICAgKGlmICg+PSBsb2MgTUFYX0xPQykKICAgICAgICAgICAgKGVyciAiTG9jYXRpb24gb3V0IG9mIGJvdW5kcy4iKQogICAgICAgICAgICAoaWYgKD4gdmFsdWUgTUFYX1ZBTCkKICAgICAgICAgICAgICAgIChlcnIgIlZhbHVlIG11c3QgYmUgbGVzcyB0aGFuIDB4ZmZmZmZmLiIpCiAgICAgICAgICAgICAgICAoaWYgKDwgdmFsdWUgTUlOX1ZBTCkKICAgICAgICAgICAgICAgICAgICAoZXJyICJWYWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAweDAwMDAwMC4iKQogICAgICAgICAgICAgICAgICAgIChvayAobWFwLXNldCBwaXhlbHMgbG9jIHZhbHVlKSkKICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgKQogICAgICAgICkKICAgICkKKQo7OyByZWFkIG9ubHkgZnVuY3Rpb25zCjs7CgooZGVmaW5lLXJlYWQtb25seSAoZ2V0LXZhbHVlLWF0IChsb2MgdWludCkpCiAgICAoaWYgKD49IGxvYyBNQVhfTE9DKQogICAgICAgIChlcnIgIk91dCBvZiBib3VuZHMuIikKICAgICAgICAob2sgKGRlZmF1bHQtdG8gMHhmZmZmZmYgKG1hcC1nZXQ/IHBpeGVscyBsb2MpKSkKICAgICkKKQoKKGRlZmluZS1yZWFkLW9ubHkgKGdldC1hbGwpIAogICAgKG1hcCBnZXQtdmFsdWUtYXQgQUxMX0xPQ1MpCikKCihkZWZpbmUtcmVhZC1vbmx5IChnZW5lc2lzLXRpbWUgKGhlaWdodCB1aW50KSkKICAgIChnZXQtYmxvY2staW5mbz8gdGltZSBoZWlnaHQpCikKOzsgcHJpdmF0ZSBmdW5jdGlvbnMKOzsK","clarity_version":"Clarity2","cost":18060,"anchor_block_only":true}}],"epoch":"2.1"},{"id":3,"transactions":[{"ContractCall":{"contract_id":{"issuer":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM","name":"px"},"expected_sender":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM","method":"get-value-at","parameters":["0x0100000000000000000000000000000059"],"cost":2240,"anchor_block_only":false}},{"BtcTransfer":{"expected_sender":"mweN5WVqadScHdA81aATSdcVr4B6dNokqx","recipient":"mzxXgV6e4BZSsz8zVHm3TmqbECt7mbuErt","sats_amount":200,"sats_per_byte":20}},{"StxTransfer":{"expected_sender":"ST2REHHS5J3CERCRBEPMGH7921Q6PYKAADT7JP2VB","recipient":"ST3AM1A56AK2C1XAFJ4115ZSV26EB49BVQ10MGCS0","mstx_amount":200,"memo":[66,84,67,32,97,110,100,32,83,84,88,32,72,111,100,108,114,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"cost":2240,"anchor_block_only":true}}],"epoch":null}]},"contracts":{"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.px":["Cjs7IHRpdGxlOiBweAo7OyB2ZXJzaW9uOgo7OyBzdW1tYXJ5Ogo7OyBkZXNjcmlwdGlvbjogQWxsb3dzIHVzZXJzIHRvIHBheSB0byB1cGRhdGUgZGF0YSBpbiBhIG1hdHJpeC4gCjs7ICBFYWNoIG1hdHJpeCB2YWx1ZSBtdXN0IGJlIGEgaGV4YWRlY2ltYWwgdmFsdWUgZnJvbSAweDAwMDAwMCB0byAweGZmZmZmZiwgcmVwcmVzZW50aW5nIGEgY29sb3IgdG8gYmUgZGlzcGxheWVkIG9uIGEgZ3JpZCBpbiBhIHdlYiBwYWdlLiAKOzsgIEVhY2ggbWF0cml4IGtleSBjb3JyZXNwb25kcyB0byB0aGUgbG9jYXRpb24gb2YgdGhlIGdyaWQsIHdoaWNoIGlzIDEwMHgxMDAgY2VsbHMuCgo7OyB0cmFpdHMKOzsKCjs7IHRva2VuIGRlZmluaXRpb25zCjs7IAoKOzsgY29uc3RhbnRzCjs7CihkZWZpbmUtY29uc3RhbnQ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bHVlIG11c3QgYmUgbGVzcyB0aGFuIDB4ZmZmZmZmLiIpCiAgICAgICAgICAgICAgICAoaWYgKDwgdmFsdWUgTUlOX1ZBTCkKICAgICAgICAgICAgICAgICAgICAoZXJyICJWYWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAweDAwMDAwMC4iKQogICAgICAgICAgICAgICAgICAgIChvayAobWFwLXNldCBwaXhlbHMgbG9jIHZhbHVlKSkKICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgKQogICAgICAgICkKICAgICkKKQo7OyByZWFkIG9ubHkgZnVuY3Rpb25zCjs7CgooZGVmaW5lLXJlYWQtb25seSAoZ2V0LXZhbHVlLWF0IChsb2MgdWludCkpCiAgICAoaWYgKD49IGxvYyBNQVhfTE9DKQogICAgICAgIChlcnIgIk91dCBvZiBib3VuZHMuIikKICAgICAgICAob2sgKGRlZmF1bHQtdG8gMHhmZmZmZmYgKG1hcC1nZXQ/IHBpeGVscyBsb2MpKSkKICAgICkKKQoKKGRlZmluZS1yZWFkLW9ubHkgKGdldC1hbGwpIAogICAgKG1hcCBnZXQtdmFsdWUtYXQgQUxMX0xPQ1MpCikKCihkZWZpbmUtcmVhZC1vbmx5IChnZW5lc2lzLXRpbWUgKGhlaWdodCB1aW50KSkKICAgIChnZXQtYmxvY2staW5mbz8gdGltZSBoZWlnaHQpCikKOzsgcHJpdmF0ZSBmdW5jdGlvbnMKOzsK",{"path":"contracts/px.clar"}]}},"network_manifest":{"network":{"name":"devnet","stacks_node_rpc_address":null,"bitcoin_node_rpc_address":null,"deployment_fee_rate":10,"sats_per_bytes":10},"accounts":{"deployer":{"label":"deployer","mnemonic":"twice kind fence tip hidden tilt action fragile skin nothing glory cousin green tomorrow spring wrist shed math olympic multiply hip blue scout claw","derivation":"m/44'/5757'/0'/0/0","balance":100000000000000,"stx_address":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM","btc_address":"mqVnk6NPRdhntvfm4hh9vvjiRkFDUuSYsH","is_mainnet":false},"faucet":{"label":"faucet","mnemonic":"shadow private easily thought say logic fault paddle word top book during ignore notable orange flight clock image wealth health outside kitten belt reform","derivation":"m/44'/5757'/0'/0/0","balance":100000000000000,"stx_address":"STNHKEPYEPJ8ET55ZZ0M5A34J0R3N5FM2CMMMAZ6","btc_address":"mjSrB3wS4xab3kYqFktwBzfTdPg367ZJ2d","is_mainnet":false},"wallet_1":{"label":"wallet_1","mnemonic":"sell invite acquire kitten bamboo drastic jelly vivid peace spawn twice guilt pave pen trash pretty park cube fragile unaware remain midnight betray rebuild","derivation":"m/44'/5757'/0'/0/0","balance":100000000000000,"stx_address":"ST1SJ3DTE5DN7X54YDH5D64R3BCB6A2AG2ZQ8YPD5","btc_address":"mr1iPkD9N3RJZZxXRk7xF9d36gffa6exNC","is_mainnet":false},"wallet_2":{"label":"wallet_2","mnemonic":"rib pottery simple supply scrap pair able spot destroy mistake yard wrong frog update exclude country traffic kick grace cement west gather subject oil","derivation":"m/44'/5757'/0'/0/0","balance":100000000000000,"stx_address":"ST39PM053V14N2GN61QPX52Q44954B6739M7R1KZM","btc_address":"mznoriK1DC7WJiMeJVwjDfwkUP6kMUgUKs","is_mainnet":false}},"devnet":{"name":"devnet","network_id":null,"orchestrator_ingestion_port":20445,"orchestrator_control_port":20446,"bitcoin_node_p2p_port":18444,"bitcoin_node_rpc_port":18443,"bitcoin_node_username":"px-devnet","bitcoin_node_password":"px-devnet","stacks_node_p2p_port":20444,"stacks_node_rpc_port":20443,"stacks_node_wait_time_for_microblocks":50,"stacks_node_first_attempt_time_ms":500,"stacks_node_subsequent_attempt_time_ms":1000,"stacks_node_events_observers":[],"stacks_node_env_vars":[],"stacks_api_port":3999,"stacks_api_events_port":3700,"stacks_api_env_vars":[],"stacks_explorer_port":8000,"stacks_explorer_env_vars":[],"bitcoin_explorer_port":8001,"bitcoin_controller_block_time":1000,"bitcoin_controller_automining_disabled":false,"miner_stx_address":"ST1SJ3DTE5DN7X54YDH5D64R3BCB6A2AG2ZQ8YPD5","miner_secret_key_hex":"7287ba251d44a4d3fd9276c88ce34c5c52a038955511cccaf77e61068649c17801","miner_btc_address":"mr1iPkD9N3RJZZxXRk7xF9d36gffa6exNC","miner_mnemonic":"sell invite acquire kitten bamboo drastic jelly vivid peace spawn twice guilt pave pen trash pretty park cube fragile unaware remain midnight betray rebuild","miner_derivation_path":"m/44'/5757'/0'/0/0","miner_coinbase_recipient":"ST1SJ3DTE5DN7X54YDH5D64R3BCB6A2AG2ZQ8YPD5","faucet_stx_address":"STNHKEPYEPJ8ET55ZZ0M5A34J0R3N5FM2CMMMAZ6","faucet_secret_key_hex":"de433bdfa14ec43aa1098d5be594c8ffb20a31485ff9de2923b2689471c401b801","faucet_btc_address":"mjSrB3wS4xab3kYqFktwBzfTdPg367ZJ2d","faucet_mnemonic":"shadow private easily thought say logic fault paddle word top book during ignore notable orange flight clock image wealth health outside kitten belt reform","faucet_derivation_path":"m/44'/5757'/0'/0/0","working_dir":"/Users/micaiahreid/work/stx-px/tmp","postgres_port":5432,"postgres_username":"postgres","postgres_password":"postgres","stacks_api_postgres_database":"stacks_api","subnet_api_postgres_database":"subnet_api","pox_stacking_orders":[{"start_at_cycle":3,"duration":12,"wallet":"wallet_1","slots":2,"btc_address":"mr1iPkD9N3RJZZxXRk7xF9d36gffa6exNC"},{"start_at_cycle":3,"duration":12,"wallet":"wallet_2","slots":1,"btc_address":"muYdXKmX9bByAueDe6KFfHd5Ff1gdN9ErG"},{"start_at_cycle":3,"duration":12,"wallet":"wallet_3","slots":1,"btc_address":"mvZtbibDAAA3WLpY7zXXFqRa3T4XSknBX7"}],"execute_script":[],"bitcoin_node_image_url":"quay.io/hirosystems/bitcoind:devnet-v3","stacks_node_image_url":"quay.io/hirosystems/stacks-node:devnet-2.4.0.0.0","stacks_api_image_url":"hirosystems/stacks-blockchain-api:latest","stacks_explorer_image_url":"hirosystems/explorer:latest","postgres_image_url":"postgres:14","bitcoin_explorer_image_url":"quay.io/hirosystems/bitcoin-explorer:devnet","disable_bitcoin_explorer":false,"disable_stacks_explorer":false,"disable_stacks_api":false,"bind_containers_volumes":false,"enable_subnet_node":true,"subnet_node_image_url":"hirosystems/stacks-subnets:0.8.1","subnet_leader_stx_address":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM","subnet_leader_secret_key_hex":"753b7cc01a1a2e86221266a154af739463fce51219d97e4f856cd7200c3bd2a601","subnet_leader_btc_address":"mqVnk6NPRdhntvfm4hh9vvjiRkFDUuSYsH","subnet_leader_mnemonic":"twice kind fence tip hidden tilt action fragile skin nothing glory cousin green tomorrow spring wrist shed math olympic multiply hip blue scout claw","subnet_leader_derivation_path":"m/44'/5757'/0'/0/0","subnet_node_p2p_port":30444,"subnet_node_rpc_port":30443,"subnet_events_ingestion_port":30445,"subnet_node_events_observers":[],"subnet_contract_id":"ST173JK7NZBA4BS05ZRATQH1K89YJMTGEH1Z5J52E.subnet-v3-0-1","remapped_subnet_contract_id":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.subnet-v3-0-1","subnet_node_env_vars":[],"subnet_api_image_url":"hirosystems/stacks-blockchain-api:latest","subnet_api_port":13999,"subnet_api_events_port":13700,"subnet_api_env_vars":[],"disable_subnet_api":false,"docker_host":"unix:///var/run/docker.sock","components_host":"127.0.0.1","epoch_2_0":100,"epoch_2_05":102,"epoch_2_1":106,"epoch_2_2":103,"epoch_2_3":104,"epoch_2_4":105,"pox_2_activation":102,"use_docker_gateway_routing":false,"docker_platform":"linux/amd64"}},"project_manifest":{"project":{"name":"px","description":"","authors":[],"telemetry":true,"cache_dir":"./.cache","requirements":[]},"contracts":{"px":{"path":"contracts/px.clar","clarity_version":2,"epoch":2.1},"test":{"path":"contracts/test.clar","clarity_version":2,"epoch":2.1}},"repl":{"analysis":{"passes":["check_checker"],"check_checker":{"strict":true,"trusted_sender":false,"trusted_caller":false,"callee_filter":false}}}}}

@MicaiahReid MicaiahReid removed the request for review from hugocaillard August 29, 2023 15:09
@sabbyanandan
Copy link
Contributor

Fascinating work, @csgui! 👏🏽

@MicaiahReid MicaiahReid enabled auto-merge (squash) August 29, 2023 15:26
@lgalabru lgalabru merged commit 0dbf1aa into develop Aug 29, 2023
11 of 15 checks passed
@lgalabru lgalabru deleted the devnet-package branch August 29, 2023 15:28
hugocaillard added a commit that referenced this pull request Sep 6, 2023
@MicaiahReid MicaiahReid changed the title add devnet package command feat: add devnet package command Sep 12, 2023
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

Successfully merging this pull request may close these issues.

4 participants