diff --git a/contracts/external/cw-bounties/Cargo.toml b/contracts/external/cw-bounties/Cargo.toml index c7325d444..b589b3df2 100644 --- a/contracts/external/cw-bounties/Cargo.toml +++ b/contracts/external/cw-bounties/Cargo.toml @@ -7,7 +7,6 @@ license = { workspace = true } repository = { workspace = true } version = { workspace = true } - [lib] crate-type = ["cdylib", "rlib"] diff --git a/contracts/external/cw-bounties/schema/cw-bounties.json b/contracts/external/cw-bounties/schema/cw-bounties.json new file mode 100644 index 000000000..c25fd5419 --- /dev/null +++ b/contracts/external/cw-bounties/schema/cw-bounties.json @@ -0,0 +1,827 @@ +{ + "contract_name": "cw-bounties", + "contract_version": "2.1.0", + "idl_version": "1.0.0", + "instantiate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "type": "object", + "required": [ + "owner" + ], + "properties": { + "owner": { + "description": "Contract owner with the ability to create, pay out, close and update bounties. Must be a valid account address.", + "type": "string" + } + }, + "additionalProperties": false + }, + "execute": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "oneOf": [ + { + "description": "Creates a bounty (only owner)", + "type": "object", + "required": [ + "create" + ], + "properties": { + "create": { + "type": "object", + "required": [ + "amount", + "title" + ], + "properties": { + "amount": { + "description": "The amount the bounty is claimable for", + "allOf": [ + { + "$ref": "#/definitions/Coin" + } + ] + }, + "description": { + "description": "Bounty description and details", + "type": [ + "string", + "null" + ] + }, + "title": { + "description": "The title of the bounty", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Closes a bounty (only owner)", + "type": "object", + "required": [ + "close" + ], + "properties": { + "close": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "description": "The ID of the bounty to close", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Claims a bounty (only owner)", + "type": "object", + "required": [ + "pay_out" + ], + "properties": { + "pay_out": { + "type": "object", + "required": [ + "id", + "recipient" + ], + "properties": { + "id": { + "description": "Bounty id to claim", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "recipient": { + "description": "Recipient address where funds from bounty are claimed", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "TODO make vesting payout? Updates a bounty (only owner)", + "type": "object", + "required": [ + "update" + ], + "properties": { + "update": { + "type": "object", + "required": [ + "amount", + "id", + "title" + ], + "properties": { + "amount": { + "description": "The amount the bounty is claimable for", + "allOf": [ + { + "$ref": "#/definitions/Coin" + } + ] + }, + "description": { + "description": "Bounty description and details", + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "The ID of the bounty", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "title": { + "description": "The title of the bounty", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Update the contract's ownership. The `action` to be provided can be either to propose transferring ownership to an account, accept a pending ownership transfer, or renounce the ownership permanently.", + "type": "object", + "required": [ + "update_ownership" + ], + "properties": { + "update_ownership": { + "$ref": "#/definitions/Action" + } + }, + "additionalProperties": false + } + ], + "definitions": { + "Action": { + "description": "Actions that can be taken to alter the contract's ownership", + "oneOf": [ + { + "description": "Propose to transfer the contract's ownership to another account, optionally with an expiry time.\n\nCan only be called by the contract's current owner.\n\nAny existing pending ownership transfer is overwritten.", + "type": "object", + "required": [ + "transfer_ownership" + ], + "properties": { + "transfer_ownership": { + "type": "object", + "required": [ + "new_owner" + ], + "properties": { + "expiry": { + "anyOf": [ + { + "$ref": "#/definitions/Expiration" + }, + { + "type": "null" + } + ] + }, + "new_owner": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Accept the pending ownership transfer.\n\nCan only be called by the pending owner.", + "type": "string", + "enum": [ + "accept_ownership" + ] + }, + { + "description": "Give up the contract's ownership and the possibility of appointing a new owner.\n\nCan only be invoked by the contract's current owner.\n\nAny existing pending ownership transfer is canceled.", + "type": "string", + "enum": [ + "renounce_ownership" + ] + } + ] + }, + "Coin": { + "type": "object", + "required": [ + "amount", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + } + } + }, + "Expiration": { + "description": "Expiration represents a point in time when some event happens. It can compare with a BlockInfo and will return is_expired() == true once the condition is hit (and for every block in the future)", + "oneOf": [ + { + "description": "AtHeight will expire when `env.block.height` >= height", + "type": "object", + "required": [ + "at_height" + ], + "properties": { + "at_height": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + }, + { + "description": "AtTime will expire when `env.block.time` >= time", + "type": "object", + "required": [ + "at_time" + ], + "properties": { + "at_time": { + "$ref": "#/definitions/Timestamp" + } + }, + "additionalProperties": false + }, + { + "description": "Never will never expire. Used to express the empty variant", + "type": "object", + "required": [ + "never" + ], + "properties": { + "never": { + "type": "object", + "additionalProperties": false + } + }, + "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" + } + ] + }, + "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" + }, + "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" + } + } + }, + "query": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "oneOf": [ + { + "description": "Returns a single bounty by ID", + "type": "object", + "required": [ + "bounty" + ], + "properties": { + "bounty": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "List bounties", + "type": "object", + "required": [ + "bounties" + ], + "properties": { + "bounties": { + "type": "object", + "properties": { + "limit": { + "description": "The number of bounties to return", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0.0 + }, + "start_after": { + "description": "Used for pagination", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns the number of bounties", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Returns information about the current contract owner", + "type": "object", + "required": [ + "ownership" + ], + "properties": { + "ownership": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "migrate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MigrateMsg", + "type": "object", + "additionalProperties": false + }, + "sudo": null, + "responses": { + "bounties": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Array_of_Bounty", + "type": "array", + "items": { + "$ref": "#/definitions/Bounty" + }, + "definitions": { + "Bounty": { + "type": "object", + "required": [ + "amount", + "created_at", + "id", + "status", + "title" + ], + "properties": { + "amount": { + "description": "The amount the bounty is claimable for", + "allOf": [ + { + "$ref": "#/definitions/Coin" + } + ] + }, + "created_at": { + "description": "The timestamp when the bounty was created", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "description": { + "description": "Bounty description and details", + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "The ID for the bounty", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "status": { + "description": "The bounty status", + "allOf": [ + { + "$ref": "#/definitions/BountyStatus" + } + ] + }, + "title": { + "description": "The title of the bounty", + "type": "string" + }, + "updated_at": { + "description": "The timestamp when the bounty was last updated", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + }, + "BountyStatus": { + "description": "The status of the bounty", + "oneOf": [ + { + "description": "The bounty has been closed by the owner without being claimed", + "type": "object", + "required": [ + "closed" + ], + "properties": { + "closed": { + "type": "object", + "required": [ + "closed_at" + ], + "properties": { + "closed_at": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "The bounty has been claimed", + "type": "object", + "required": [ + "claimed" + ], + "properties": { + "claimed": { + "type": "object", + "required": [ + "claimed_at", + "claimed_by" + ], + "properties": { + "claimed_at": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "claimed_by": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "The bounty is open and available to be claimed", + "type": "string", + "enum": [ + "open" + ] + } + ] + }, + "Coin": { + "type": "object", + "required": [ + "amount", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + } + } + }, + "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" + } + } + }, + "bounty": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Bounty", + "type": "object", + "required": [ + "amount", + "created_at", + "id", + "status", + "title" + ], + "properties": { + "amount": { + "description": "The amount the bounty is claimable for", + "allOf": [ + { + "$ref": "#/definitions/Coin" + } + ] + }, + "created_at": { + "description": "The timestamp when the bounty was created", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "description": { + "description": "Bounty description and details", + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "The ID for the bounty", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "status": { + "description": "The bounty status", + "allOf": [ + { + "$ref": "#/definitions/BountyStatus" + } + ] + }, + "title": { + "description": "The title of the bounty", + "type": "string" + }, + "updated_at": { + "description": "The timestamp when the bounty was last updated", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false, + "definitions": { + "BountyStatus": { + "description": "The status of the bounty", + "oneOf": [ + { + "description": "The bounty has been closed by the owner without being claimed", + "type": "object", + "required": [ + "closed" + ], + "properties": { + "closed": { + "type": "object", + "required": [ + "closed_at" + ], + "properties": { + "closed_at": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "The bounty has been claimed", + "type": "object", + "required": [ + "claimed" + ], + "properties": { + "claimed": { + "type": "object", + "required": [ + "claimed_at", + "claimed_by" + ], + "properties": { + "claimed_at": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "claimed_by": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "The bounty is open and available to be claimed", + "type": "string", + "enum": [ + "open" + ] + } + ] + }, + "Coin": { + "type": "object", + "required": [ + "amount", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + } + } + }, + "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" + } + } + }, + "count": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "uint64", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "ownership": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Ownership_for_Addr", + "description": "The contract's ownership info", + "type": "object", + "properties": { + "owner": { + "description": "The contract's current owner. `None` if the ownership has been renounced.", + "anyOf": [ + { + "$ref": "#/definitions/Addr" + }, + { + "type": "null" + } + ] + }, + "pending_expiry": { + "description": "The deadline for the pending owner to accept the ownership. `None` if there isn't a pending ownership transfer, or if a transfer exists and it doesn't have a deadline.", + "anyOf": [ + { + "$ref": "#/definitions/Expiration" + }, + { + "type": "null" + } + ] + }, + "pending_owner": { + "description": "The account who has been proposed to take over the ownership. `None` if there isn't a pending ownership transfer.", + "anyOf": [ + { + "$ref": "#/definitions/Addr" + }, + { + "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" + }, + "Expiration": { + "description": "Expiration represents a point in time when some event happens. It can compare with a BlockInfo and will return is_expired() == true once the condition is hit (and for every block in the future)", + "oneOf": [ + { + "description": "AtHeight will expire when `env.block.height` >= height", + "type": "object", + "required": [ + "at_height" + ], + "properties": { + "at_height": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + }, + { + "description": "AtTime will expire when `env.block.time` >= time", + "type": "object", + "required": [ + "at_time" + ], + "properties": { + "at_time": { + "$ref": "#/definitions/Timestamp" + } + }, + "additionalProperties": false + }, + { + "description": "Never will never expire. Used to express the empty variant", + "type": "object", + "required": [ + "never" + ], + "properties": { + "never": { + "type": "object", + "additionalProperties": false + } + }, + "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" + } + } + } + } +}