{ "contract_name": "stargaze-royalty-registry", "contract_version": "0.1.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "InstantiateMsg", "type": "object", "required": [ "config" ], "properties": { "config": { "$ref": "#/definitions/Config" } }, "additionalProperties": false, "definitions": { "Config": { "type": "object", "required": [ "max_share_delta", "update_wait_period" ], "properties": { "max_share_delta": { "description": "The maximum that can be added or removed from a royalty entry in a single update.", "allOf": [ { "$ref": "#/definitions/Decimal" } ] }, "update_wait_period": { "description": "The number of seconds to wait before updating a royalty entry.", "type": "integer", "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false }, "Decimal": { "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", "type": "string" } } }, "execute": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "ExecuteMsg", "oneOf": [ { "type": "object", "required": [ "initialize_collection_royalty" ], "properties": { "initialize_collection_royalty": { "type": "object", "required": [ "collection" ], "properties": { "collection": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "set_collection_royalty_default" ], "properties": { "set_collection_royalty_default": { "type": "object", "required": [ "collection", "recipient", "share" ], "properties": { "collection": { "type": "string" }, "recipient": { "type": "string" }, "share": { "$ref": "#/definitions/Decimal" } }, "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "update_collection_royalty_default" ], "properties": { "update_collection_royalty_default": { "type": "object", "required": [ "collection" ], "properties": { "collection": { "type": "string" }, "decrement": { "type": [ "boolean", "null" ] }, "recipient": { "type": [ "string", "null" ] }, "share_delta": { "anyOf": [ { "$ref": "#/definitions/Decimal" }, { "type": "null" } ] } }, "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "set_collection_royalty_protocol" ], "properties": { "set_collection_royalty_protocol": { "type": "object", "required": [ "collection", "protocol", "recipient", "share" ], "properties": { "collection": { "type": "string" }, "protocol": { "type": "string" }, "recipient": { "type": "string" }, "share": { "$ref": "#/definitions/Decimal" } }, "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "update_collection_royalty_protocol" ], "properties": { "update_collection_royalty_protocol": { "type": "object", "required": [ "collection", "protocol" ], "properties": { "collection": { "type": "string" }, "decrement": { "type": [ "boolean", "null" ] }, "protocol": { "type": "string" }, "recipient": { "type": [ "string", "null" ] }, "share_delta": { "anyOf": [ { "$ref": "#/definitions/Decimal" }, { "type": "null" } ] } }, "additionalProperties": false } }, "additionalProperties": false } ], "definitions": { "Decimal": { "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", "type": "string" } } }, "query": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "QueryMsg", "oneOf": [ { "type": "object", "required": [ "config" ], "properties": { "config": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "collection_royalty_default" ], "properties": { "collection_royalty_default": { "type": "object", "required": [ "collection" ], "properties": { "collection": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "collection_royalty_protocol" ], "properties": { "collection_royalty_protocol": { "type": "object", "required": [ "collection", "protocol" ], "properties": { "collection": { "type": "string" }, "protocol": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "royalty_protocol_by_collection" ], "properties": { "royalty_protocol_by_collection": { "type": "object", "required": [ "collection" ], "properties": { "collection": { "type": "string" }, "query_options": { "anyOf": [ { "$ref": "#/definitions/QueryOptions_for_String" }, { "type": "null" } ] } }, "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "royalty_payment" ], "properties": { "royalty_payment": { "type": "object", "required": [ "collection" ], "properties": { "collection": { "type": "string" }, "protocol": { "type": [ "string", "null" ] } }, "additionalProperties": false } }, "additionalProperties": false } ], "definitions": { "QueryBound_for_String": { "oneOf": [ { "type": "object", "required": [ "inclusive" ], "properties": { "inclusive": { "type": "string" } }, "additionalProperties": false }, { "type": "object", "required": [ "exclusive" ], "properties": { "exclusive": { "type": "string" } }, "additionalProperties": false } ] }, "QueryOptions_for_String": { "description": "QueryOptions are used to pass in options to a query function", "type": "object", "properties": { "descending": { "description": "Whether to sort items in ascending or descending order", "type": [ "boolean", "null" ] }, "limit": { "description": "The number of items that will be returned", "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "max": { "description": "The maximum key value to fetch", "anyOf": [ { "$ref": "#/definitions/QueryBound_for_String" }, { "type": "null" } ] }, "min": { "description": "The minimum key value to fetch", "anyOf": [ { "$ref": "#/definitions/QueryBound_for_String" }, { "type": "null" } ] } }, "additionalProperties": false } } }, "migrate": null, "sudo": null, "responses": { "collection_royalty_default": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Nullable_RoyaltyDefault", "anyOf": [ { "$ref": "#/definitions/RoyaltyDefault" }, { "type": "null" } ], "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" }, "Decimal": { "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", "type": "string" }, "RoyaltyDefault": { "type": "object", "required": [ "collection", "royalty_entry" ], "properties": { "collection": { "$ref": "#/definitions/Addr" }, "royalty_entry": { "$ref": "#/definitions/RoyaltyEntry" } }, "additionalProperties": false }, "RoyaltyEntry": { "type": "object", "required": [ "recipient", "share" ], "properties": { "recipient": { "description": "The address that will receive the royalty payments", "allOf": [ { "$ref": "#/definitions/Addr" } ] }, "share": { "description": "The percentage of sales that should be paid to the recipient", "allOf": [ { "$ref": "#/definitions/Decimal" } ] }, "updated": { "description": "The last time the royalty entry was updated", "anyOf": [ { "$ref": "#/definitions/Timestamp" }, { "type": "null" } ] } }, "additionalProperties": false }, "Timestamp": { "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", "allOf": [ { "$ref": "#/definitions/Uint64" } ] }, "Uint64": { "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", "type": "string" } } }, "collection_royalty_protocol": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Nullable_RoyaltyProtocol", "anyOf": [ { "$ref": "#/definitions/RoyaltyProtocol" }, { "type": "null" } ], "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" }, "Decimal": { "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", "type": "string" }, "RoyaltyEntry": { "type": "object", "required": [ "recipient", "share" ], "properties": { "recipient": { "description": "The address that will receive the royalty payments", "allOf": [ { "$ref": "#/definitions/Addr" } ] }, "share": { "description": "The percentage of sales that should be paid to the recipient", "allOf": [ { "$ref": "#/definitions/Decimal" } ] }, "updated": { "description": "The last time the royalty entry was updated", "anyOf": [ { "$ref": "#/definitions/Timestamp" }, { "type": "null" } ] } }, "additionalProperties": false }, "RoyaltyProtocol": { "type": "object", "required": [ "collection", "protocol", "royalty_entry" ], "properties": { "collection": { "$ref": "#/definitions/Addr" }, "protocol": { "$ref": "#/definitions/Addr" }, "royalty_entry": { "$ref": "#/definitions/RoyaltyEntry" } }, "additionalProperties": false }, "Timestamp": { "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", "allOf": [ { "$ref": "#/definitions/Uint64" } ] }, "Uint64": { "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", "type": "string" } } }, "config": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Config", "type": "object", "required": [ "max_share_delta", "update_wait_period" ], "properties": { "max_share_delta": { "description": "The maximum that can be added or removed from a royalty entry in a single update.", "allOf": [ { "$ref": "#/definitions/Decimal" } ] }, "update_wait_period": { "description": "The number of seconds to wait before updating a royalty entry.", "type": "integer", "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false, "definitions": { "Decimal": { "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", "type": "string" } } }, "royalty_payment": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "RoyaltyPaymentResponse", "type": "object", "properties": { "royalty_default": { "anyOf": [ { "$ref": "#/definitions/RoyaltyDefault" }, { "type": "null" } ] }, "royalty_protocol": { "anyOf": [ { "$ref": "#/definitions/RoyaltyProtocol" }, { "type": "null" } ] } }, "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" }, "Decimal": { "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", "type": "string" }, "RoyaltyDefault": { "type": "object", "required": [ "collection", "royalty_entry" ], "properties": { "collection": { "$ref": "#/definitions/Addr" }, "royalty_entry": { "$ref": "#/definitions/RoyaltyEntry" } }, "additionalProperties": false }, "RoyaltyEntry": { "type": "object", "required": [ "recipient", "share" ], "properties": { "recipient": { "description": "The address that will receive the royalty payments", "allOf": [ { "$ref": "#/definitions/Addr" } ] }, "share": { "description": "The percentage of sales that should be paid to the recipient", "allOf": [ { "$ref": "#/definitions/Decimal" } ] }, "updated": { "description": "The last time the royalty entry was updated", "anyOf": [ { "$ref": "#/definitions/Timestamp" }, { "type": "null" } ] } }, "additionalProperties": false }, "RoyaltyProtocol": { "type": "object", "required": [ "collection", "protocol", "royalty_entry" ], "properties": { "collection": { "$ref": "#/definitions/Addr" }, "protocol": { "$ref": "#/definitions/Addr" }, "royalty_entry": { "$ref": "#/definitions/RoyaltyEntry" } }, "additionalProperties": false }, "Timestamp": { "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", "allOf": [ { "$ref": "#/definitions/Uint64" } ] }, "Uint64": { "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", "type": "string" } } }, "royalty_protocol_by_collection": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Array_of_RoyaltyProtocol", "type": "array", "items": { "$ref": "#/definitions/RoyaltyProtocol" }, "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" }, "Decimal": { "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", "type": "string" }, "RoyaltyEntry": { "type": "object", "required": [ "recipient", "share" ], "properties": { "recipient": { "description": "The address that will receive the royalty payments", "allOf": [ { "$ref": "#/definitions/Addr" } ] }, "share": { "description": "The percentage of sales that should be paid to the recipient", "allOf": [ { "$ref": "#/definitions/Decimal" } ] }, "updated": { "description": "The last time the royalty entry was updated", "anyOf": [ { "$ref": "#/definitions/Timestamp" }, { "type": "null" } ] } }, "additionalProperties": false }, "RoyaltyProtocol": { "type": "object", "required": [ "collection", "protocol", "royalty_entry" ], "properties": { "collection": { "$ref": "#/definitions/Addr" }, "protocol": { "$ref": "#/definitions/Addr" }, "royalty_entry": { "$ref": "#/definitions/RoyaltyEntry" } }, "additionalProperties": false }, "Timestamp": { "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", "allOf": [ { "$ref": "#/definitions/Uint64" } ] }, "Uint64": { "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", "type": "string" } } } } }