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

Normalize CosmWasm execute and query messages for Ownables #58

Open
jasny opened this issue Mar 16, 2023 · 0 comments
Open

Normalize CosmWasm execute and query messages for Ownables #58

jasny opened this issue Mar 16, 2023 · 0 comments

Comments

@jasny
Copy link
Member

jasny commented Mar 16, 2023

Instantiate

  • {ownable_id: string, package: string, [nft: {network: string, address: string, id: number, [lock_service: "address"]}], [type: "robot:plugin"]}

Execute

  • { ownable_transfer: { to: "address" } }
  • { ownable_lock: {} }
  • { ownable_consume: { consumed_by: "contract id" } } ➡️ emit Event({ty: "consume", attribute: {issuer: "address", owner: "address", consumed_by: "consumer contract id", consumable_type: "..." })

External event

  • consume - { ty: "consume", contract: "consumable contract id", attributes: { issuer: "address", owner: "address", consumed_by: "consumer contract id", consumable_type: "..." } }
  • unlock - { network: "eip155:5", ty: "Lock", contract: "goerli address", attributes: {tokenId: number, owner: "address"} }

Query

  • { get_ownable_info: {} } ➡️ { owner: "address", issuer: "address", [nft: {network: string, address: string, id: number, [lock_service: "address"]}], [type: "robot:plugin"] } }
  • { get_ownable_metadata: {} } ➡️ { issuer: "address", ... }
  • { get_ownable_widget_state: {} } ➡️ { ... }
  • { is_ownable_locked: {} } ➡️ boolean
  • { can_ownable_consume: { issuer: "address", type: "robot:plugin" } } ➡️ boolean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant