Skip to content

Commit

Permalink
Cargo schema + fix orch wasm build and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ismellike authored and Jake Hartnell committed Aug 14, 2024
1 parent 5ccaa5e commit 449e481
Show file tree
Hide file tree
Showing 31 changed files with 585 additions and 47 deletions.
198 changes: 171 additions & 27 deletions contracts/dao-dao-core/schema/dao-dao-core.json
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,10 @@
},
"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"
},
"DistributionMsg": {
"description": "The message types of the distribution module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto",
"oneOf": [
Expand Down Expand Up @@ -964,6 +968,31 @@
}
},
"additionalProperties": false
},
{
"description": "This is translated to a [[MsgFundCommunityPool](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#LL69C1-L76C2). `depositor` is automatically filled with the current contract's address.",
"type": "object",
"required": [
"fund_community_pool"
],
"properties": {
"fund_community_pool": {
"type": "object",
"required": [
"amount"
],
"properties": {
"amount": {
"description": "The amount to spend",
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
}
}
}
},
"additionalProperties": false
}
]
},
Expand Down Expand Up @@ -1039,6 +1068,36 @@
}
},
"additionalProperties": false
},
{
"description": "This maps directly to [MsgVoteWeighted](https://github.com/cosmos/cosmos-sdk/blob/v0.45.8/proto/cosmos/gov/v1beta1/tx.proto#L66-L78) in the Cosmos SDK with voter set to the contract address.",
"type": "object",
"required": [
"vote_weighted"
],
"properties": {
"vote_weighted": {
"type": "object",
"required": [
"options",
"proposal_id"
],
"properties": {
"options": {
"type": "array",
"items": {
"$ref": "#/definitions/WeightedVoteOption"
}
},
"proposal_id": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
}
}
},
"additionalProperties": false
}
]
},
Expand Down Expand Up @@ -1463,6 +1522,60 @@
},
"additionalProperties": false
},
{
"description": "Instantiates a new contracts from previously uploaded Wasm code using a predictable address derivation algorithm implemented in [`cosmwasm_std::instantiate2_address`].\n\nThis is translated to a [MsgInstantiateContract2](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L73-L96). `sender` is automatically filled with the current contract's address. `fix_msg` is automatically set to false.",
"type": "object",
"required": [
"instantiate2"
],
"properties": {
"instantiate2": {
"type": "object",
"required": [
"code_id",
"funds",
"label",
"msg",
"salt"
],
"properties": {
"admin": {
"type": [
"string",
"null"
]
},
"code_id": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"funds": {
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
},
"label": {
"description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace",
"type": "string"
},
"msg": {
"description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)",
"allOf": [
{
"$ref": "#/definitions/Binary"
}
]
},
"salt": {
"$ref": "#/definitions/Binary"
}
}
}
},
"additionalProperties": false
},
{
"description": "Migrates a given contracts to use new wasm code. Passes a MigrateMsg to allow us to customize behavior.\n\nOnly the contract admin (as defined in wasmd), if any, is able to make this call.\n\nThis is translated to a [MsgMigrateContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L86-L96). `sender` is automatically filled with the current contract's address.",
"type": "object",
Expand Down Expand Up @@ -1547,6 +1660,21 @@
"additionalProperties": false
}
]
},
"WeightedVoteOption": {
"type": "object",
"required": [
"option",
"weight"
],
"properties": {
"option": {
"$ref": "#/definitions/VoteOption"
},
"weight": {
"$ref": "#/definitions/Decimal"
}
}
}
}
},
Expand Down Expand Up @@ -2486,37 +2614,43 @@
},
"cw20_balances": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Cw20BalanceResponse",
"description": "Returned by the `Cw20Balances` query.",
"type": "object",
"required": [
"addr",
"balance"
],
"properties": {
"addr": {
"description": "The address of the token.",
"allOf": [
{
"$ref": "#/definitions/Addr"
}
]
},
"balance": {
"description": "The contract's balance.",
"allOf": [
{
"$ref": "#/definitions/Uint128"
}
]
}
"title": "Array_of_Cw20BalanceResponse",
"type": "array",
"items": {
"$ref": "#/definitions/Cw20BalanceResponse"
},
"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"
},
"Cw20BalanceResponse": {
"description": "Returned by the `Cw20Balances` query.",
"type": "object",
"required": [
"addr",
"balance"
],
"properties": {
"addr": {
"description": "The address of the token.",
"allOf": [
{
"$ref": "#/definitions/Addr"
}
]
},
"balance": {
"description": "The contract's balance.",
"allOf": [
{
"$ref": "#/definitions/Uint128"
}
]
}
},
"additionalProperties": false
},
"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"
Expand Down Expand Up @@ -2895,10 +3029,20 @@
},
"list_items": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Array_of_String",
"title": "Array_of_Tuple_of_String_and_String",
"type": "array",
"items": {
"type": "string"
"type": "array",
"items": [
{
"type": "string"
},
{
"type": "string"
}
],
"maxItems": 2,
"minItems": 2
}
},
"list_sub_daos": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,31 @@
}
},
"additionalProperties": false
},
{
"description": "This is translated to a [[MsgFundCommunityPool](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#LL69C1-L76C2). `depositor` is automatically filled with the current contract's address.",
"type": "object",
"required": [
"fund_community_pool"
],
"properties": {
"fund_community_pool": {
"type": "object",
"required": [
"amount"
],
"properties": {
"amount": {
"description": "The amount to spend",
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
}
}
}
},
"additionalProperties": false
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,31 @@
}
},
"additionalProperties": false
},
{
"description": "This is translated to a [[MsgFundCommunityPool](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#LL69C1-L76C2). `depositor` is automatically filled with the current contract's address.",
"type": "object",
"required": [
"fund_community_pool"
],
"properties": {
"fund_community_pool": {
"type": "object",
"required": [
"amount"
],
"properties": {
"amount": {
"description": "The amount to spend",
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
}
}
}
},
"additionalProperties": false
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,31 @@
}
},
"additionalProperties": false
},
{
"description": "This is translated to a [[MsgFundCommunityPool](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#LL69C1-L76C2). `depositor` is automatically filled with the current contract's address.",
"type": "object",
"required": [
"fund_community_pool"
],
"properties": {
"fund_community_pool": {
"type": "object",
"required": [
"amount"
],
"properties": {
"amount": {
"description": "The amount to spend",
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
}
}
}
},
"additionalProperties": false
}
]
},
Expand Down
Loading

0 comments on commit 449e481

Please sign in to comment.