{ "contract_name": "dao-voting-cw721-roles", "contract_version": "2.6.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "InstantiateMsg", "type": "object", "required": [ "nft_contract" ], "properties": { "nft_contract": { "description": "Info about the associated NFT contract", "allOf": [ { "$ref": "#/definitions/NftContract" } ] } }, "additionalProperties": false, "definitions": { "MetadataExt": { "type": "object", "required": [ "weight" ], "properties": { "role": { "description": "Optional on-chain role for this member, can be used by other contracts to enforce permissions", "type": [ "string", "null" ] }, "weight": { "description": "The voting weight of this role", "type": "integer", "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false }, "NftContract": { "oneOf": [ { "type": "object", "required": [ "existing" ], "properties": { "existing": { "type": "object", "required": [ "address" ], "properties": { "address": { "description": "Address of an already instantiated cw721-weighted-roles token contract.", "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "new" ], "properties": { "new": { "type": "object", "required": [ "code_id", "initial_nfts", "label", "name", "symbol" ], "properties": { "code_id": { "description": "Code ID for cw721 token contract.", "type": "integer", "format": "uint64", "minimum": 0.0 }, "initial_nfts": { "description": "Initial NFTs to mint when instantiating the new cw721 contract. If empty, an error is thrown.", "type": "array", "items": { "$ref": "#/definitions/NftMintMsg" } }, "label": { "description": "Label to use for instantiated cw721 contract.", "type": "string" }, "name": { "description": "NFT collection name", "type": "string" }, "symbol": { "description": "NFT collection symbol", "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false } ] }, "NftMintMsg": { "type": "object", "required": [ "extension", "owner", "token_id" ], "properties": { "extension": { "description": "Any custom extension used by this contract", "allOf": [ { "$ref": "#/definitions/MetadataExt" } ] }, "owner": { "description": "The owner of the newly minter NFT", "type": "string" }, "token_id": { "description": "Unique ID of the NFT", "type": "string" }, "token_uri": { "description": "Universal resource identifier for this NFT Should point to a JSON file that conforms to the ERC721 Metadata JSON Schema", "type": [ "string", "null" ] } }, "additionalProperties": false } } }, "execute": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "ExecuteMsg", "type": "string", "enum": [] }, "query": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "QueryMsg", "oneOf": [ { "type": "object", "required": [ "config" ], "properties": { "config": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "description": "Returns the voting power for an address at a given height.", "type": "object", "required": [ "voting_power_at_height" ], "properties": { "voting_power_at_height": { "type": "object", "required": [ "address" ], "properties": { "address": { "type": "string" }, "height": { "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Returns the total voting power at a given block heigh.", "type": "object", "required": [ "total_power_at_height" ], "properties": { "total_power_at_height": { "type": "object", "properties": { "height": { "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Returns the address of the DAO this module belongs to.", "type": "object", "required": [ "dao" ], "properties": { "dao": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "description": "Returns contract version info.", "type": "object", "required": [ "info" ], "properties": { "info": { "type": "object", "additionalProperties": false } }, "additionalProperties": false } ] }, "migrate": null, "sudo": null, "responses": { "config": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Config", "type": "object", "required": [ "nft_address" ], "properties": { "nft_address": { "$ref": "#/definitions/Addr" } }, "additionalProperties": false, "definitions": { "Addr": { "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", "type": "string" } } }, "dao": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Addr", "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", "type": "string" }, "info": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "InfoResponse", "type": "object", "required": [ "info" ], "properties": { "info": { "$ref": "#/definitions/ContractVersion" } }, "additionalProperties": false, "definitions": { "ContractVersion": { "type": "object", "required": [ "contract", "version" ], "properties": { "contract": { "description": "contract is the crate name of the implementing contract, eg. `crate:cw20-base` we will use other prefixes for other languages, and their standard global namespacing", "type": "string" }, "version": { "description": "version is any string that this implementation knows. It may be simple counter \"1\", \"2\". or semantic version on release tags \"v0.7.0\", or some custom feature flag list. the only code that needs to understand the version parsing is code that knows how to migrate from the given contract (and is tied to it's implementation somehow)", "type": "string" } }, "additionalProperties": false } } }, "total_power_at_height": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "TotalPowerAtHeightResponse", "type": "object", "required": [ "height", "power" ], "properties": { "height": { "type": "integer", "format": "uint64", "minimum": 0.0 }, "power": { "$ref": "#/definitions/Uint128" } }, "additionalProperties": false, "definitions": { "Uint128": { "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", "type": "string" } } }, "voting_power_at_height": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "VotingPowerAtHeightResponse", "type": "object", "required": [ "height", "power" ], "properties": { "height": { "type": "integer", "format": "uint64", "minimum": 0.0 }, "power": { "$ref": "#/definitions/Uint128" } }, "additionalProperties": false, "definitions": { "Uint128": { "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", "type": "string" } } } } }